ts-lambda-api - v2.5.3
    Preparing search index...

    Interface ClientProtocol<Request, Response>Internal

    A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object.

    use $ClientProtocol

    interface ClientProtocol<Request, Response> {
        deserializeResponse<Output extends MetadataBearer>(
            operationSchema: OperationSchema,
            context: HandlerExecutionContext & SerdeFunctions,
            response: Response,
        ): Promise<Output>;
        getPayloadCodec(): Codec<any, any>;
        getRequestType(): new (...args: any[]) => Request;
        getResponseType(): new (...args: any[]) => Response;
        getShapeId(): string;
        serializeRequest<Input extends object>(
            operationSchema: OperationSchema,
            input: Input,
            context: HandlerExecutionContext & SerdeFunctions & EndpointBearer,
        ): Promise<Request>;
        setSerdeContext(serdeContext: SerdeFunctions): void;
        updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request;
    }

    Type Parameters

    • Request
    • Response

    Hierarchy (View Summary)

    Index

    Methods

    • Returns Codec<any, any>

      the payload codec if the requests/responses have a symmetric format. It otherwise may return null.

    • Returns new (...args: any[]) => Request

    • Returns new (...args: any[]) => Response

    • Returns string

      the Smithy qualified shape id.