@cfxlabsinc/b2b-services
    Preparing search index...

    Type Alias RequestReplay

    RequestReplay: (
        args: {
            context: Context;
            event: APIGatewayProxyEvent;
            idempotencyKey: string | undefined;
            keylessReplay: boolean;
            route: string;
            run: () => Promise<LambdaResponse>;
            scope: string;
        },
    ) => Promise<LambdaResponse>

    Replays a request that already succeeded under the same scope and key.

    createHttpLambdaHandler calls this after resolveCustomerId, so the scope is the resolved customer rather than a second read of the credential headers.

    Type Declaration

      • (
            args: {
                context: Context;
                event: APIGatewayProxyEvent;
                idempotencyKey: string | undefined;
                keylessReplay: boolean;
                route: string;
                run: () => Promise<LambdaResponse>;
                scope: string;
            },
        ): Promise<LambdaResponse>
      • Parameters

        • args: {
              context: Context;
              event: APIGatewayProxyEvent;
              idempotencyKey: string | undefined;
              keylessReplay: boolean;
              route: string;
              run: () => Promise<LambdaResponse>;
              scope: string;
          }
          • context: Context
          • event: APIGatewayProxyEvent
          • idempotencyKey: string | undefined

            Normalised by the caller; absent falls back to keylessReplay.

          • keylessReplay: boolean

            With no key, replay an identical request inside the keyless TTL. The caller sets it only for an opted-in /v1/ route with a resolved customer.

          • route: string

            The matched route template, logged on a replay or a 409. Never the concrete path.

          • run: () => Promise<LambdaResponse>
          • scope: string

            Resolved customer, or the service name for a request carrying no customer.

        Returns Promise<LambdaResponse>