Constructors

Properties

cognitoErrorMap: Map<new (...args: any[]) => Error, ErrorConfig> = ...

Methods

  • transforms an array of resource definitions to a keyed json object by given key (default of id attribute) mutates the response object given context aware attribute access restrictions

    Type Parameters

    • T

    Parameters

    • collection: T[]

      collection/array of the api responses objects

    • OptionalabacRestrictions: string[]

      attributes that should be redacted from output

    • key: string = "id"

      attribute to use for key in json object.

    Returns Record<string, T>

  • Parameters

    • statusCode: number
    • body: any

    Returns {
        body: string;
        headers: {
            "Access-Control-Allow-Credentials": boolean;
            "Access-Control-Allow-Origin": string;
            "Content-Type": string;
        };
        statusCode: number;
    }

  • Parameters

    • error: unknown

    Returns never

  • Type Parameters

    • T

    Parameters

    • obj: T

    Returns T

  • verifies if object keys should be excluded from API response mutates the response collection given context aware attribute access restrictions

    Type Parameters

    • T

    Parameters

    • collection: T[]

      collection/array of the api responses objects

    • OptionalabacRestrictions: string[]

      attribute access control restrictions

    Returns any[]