@cumulus/api-client
Version:
API client for working with the Cumulus archive API
38 lines • 1.94 kB
TypeScript
import { MigrationCountsPayload } from '@cumulus/types/api/migrationCounts';
import { ReplaySqsMessagesPayload } from '@cumulus/types/api/replaySqsMessages';
import { ApiGatewayLambdaHttpProxyResponse, InvokeApiFunction } from './types';
/**
* POST a request to start a replay of Kinesis message
*
* @param {Object} params - params
* @param {string} params.prefix - the prefix configured for the stack
* @param {Object} params.payload - payload to post to the endpoint
* @param {Function} params.callback - async function to invoke the api lambda
* that takes a prefix / user payload. Defaults
* to cumulusApiClient.invokeApi
* @returns {Promise<Object>} - promise that resolves to the output
* of the API lambda
*/
export declare const postKinesisReplays: (params: {
prefix: string;
payload: MigrationCountsPayload;
callback?: InvokeApiFunction;
}) => Promise<ApiGatewayLambdaHttpProxyResponse>;
/**
* POST a request to start replaying archived SQS Messages
*
* @param {Object} params - params
* @param {string} params.prefix - the prefix configured for the stack
* @param {Object} params.payload - payload to post to the endpoint
* @param {Function} params.callback - async function to invoke the api lambda
* that takes a prefix / user payload. Defaults
* to cumulusApiClient.invokeApi
* @returns {Promise<Object>} - promise that resolves to the output
* of the API lambda
*/
export declare const replaySqsMessages: (params: {
prefix: string;
payload: ReplaySqsMessagesPayload;
callback?: InvokeApiFunction;
}) => Promise<ApiGatewayLambdaHttpProxyResponse>;
//# sourceMappingURL=replays.d.ts.map