@cumulus/api-client
Version:
API client for working with the Cumulus archive API
35 lines • 1.05 kB
TypeScript
import pRetry from 'p-retry';
export declare type HttpMethod = 'DELETE' | 'GET' | 'POST' | 'PUT' | 'PATCH';
export interface ApiGatewayLambdaProxyPayload {
resource: '/{proxy+}';
httpMethod: HttpMethod;
path: string;
headers?: {
[key: string]: string | undefined;
};
queryStringParameters?: {
[key: string]: string | string[] | undefined;
};
body?: string;
}
export interface ApiGatewayLambdaHttpProxyResponse {
statusCode: number;
headers: {
[key: string]: string;
};
body: string;
isBase64Encoded: boolean;
}
export interface ApiGatewayLambdaErrorResponse {
errorMessage: string;
errorType: string;
trace: string[];
}
export interface InvokeApiFunctionParams {
prefix: string;
payload: ApiGatewayLambdaProxyPayload;
pRetryOptions?: pRetry.Options;
expectedStatusCodes?: number | number[];
}
export declare type InvokeApiFunction = (params: InvokeApiFunctionParams) => Promise<ApiGatewayLambdaHttpProxyResponse>;
//# sourceMappingURL=types.d.ts.map