@cumulus/api-client 15.0.4 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +0,0 @@
1
- import { MigrationCountsPayload } from '@cumulus/types/api/migrationCounts';
2
- import { ApiGatewayLambdaHttpProxyResponse, InvokeApiFunction } from './types';
3
- /**
4
- * POST a request to start a migrationCounts run
5
- *
6
- * @param {Object} params - params
7
- * @param {string} params.prefix - the prefix configured for the stack
8
- * @param {Object} params.payload - payload to post to the endpoint
9
- * @param {Function} params.callback - async function to invoke the api lambda
10
- * that takes a prefix / user payload. Defaults
11
- * to cumulusApiClient.invokeApi
12
- * @returns {Promise<Object>} - promise that resolves to the output
13
- * of the API lambda
14
- */
15
- export declare const postMigrationCounts: (params: {
16
- prefix: string;
17
- payload: MigrationCountsPayload;
18
- callback?: InvokeApiFunction;
19
- }) => Promise<ApiGatewayLambdaHttpProxyResponse>;
20
- //# sourceMappingURL=migrationCounts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrationCounts.d.ts","sourceRoot":"","sources":["src/migrationCounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,iCAAiC,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,WAAkB;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,sBAAsB,CAAA;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B,KAAG,QAAQ,iCAAiC,CAgB5C,CAAC"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.postMigrationCounts = void 0;
4
- const cumulusApiClient_1 = require("./cumulusApiClient");
5
- /**
6
- * POST a request to start a migrationCounts run
7
- *
8
- * @param {Object} params - params
9
- * @param {string} params.prefix - the prefix configured for the stack
10
- * @param {Object} params.payload - payload to post to the endpoint
11
- * @param {Function} params.callback - async function to invoke the api lambda
12
- * that takes a prefix / user payload. Defaults
13
- * to cumulusApiClient.invokeApi
14
- * @returns {Promise<Object>} - promise that resolves to the output
15
- * of the API lambda
16
- */
17
- const postMigrationCounts = async (params) => {
18
- const { prefix, payload, callback = cumulusApiClient_1.invokeApi } = params;
19
- return await callback({
20
- prefix,
21
- payload: {
22
- httpMethod: 'POST',
23
- resource: '/{proxy+}',
24
- headers: {
25
- 'Content-Type': 'application/json',
26
- },
27
- path: '/migrationCounts',
28
- body: JSON.stringify(payload),
29
- },
30
- expectedStatusCodes: 202,
31
- });
32
- };
33
- exports.postMigrationCounts = postMigrationCounts;
34
- //# sourceMappingURL=migrationCounts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrationCounts.js","sourceRoot":"","sources":["src/migrationCounts.ts"],"names":[],"mappings":";;;AACA,yDAA+C;AAG/C;;;;;;;;;;;GAWG;AACI,MAAM,mBAAmB,GAAG,KAAK,EAAE,MAIzC,EAA8C,EAAE;IAC/C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,4BAAS,EAAE,GAAG,MAAM,CAAC;IAEzD,OAAO,MAAM,QAAQ,CAAC;QACpB,MAAM;QACN,OAAO,EAAE;YACP,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,WAAW;YACrB,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;SAC9B;QACD,mBAAmB,EAAE,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B"}
@@ -1,37 +0,0 @@
1
- import { MigrationCountsPayload } from '@cumulus/types/api/migrationCounts';
2
- import { invokeApi } from './cumulusApiClient';
3
- import { ApiGatewayLambdaHttpProxyResponse, InvokeApiFunction } from './types';
4
-
5
- /**
6
- * POST a request to start a migrationCounts run
7
- *
8
- * @param {Object} params - params
9
- * @param {string} params.prefix - the prefix configured for the stack
10
- * @param {Object} params.payload - payload to post to the endpoint
11
- * @param {Function} params.callback - async function to invoke the api lambda
12
- * that takes a prefix / user payload. Defaults
13
- * to cumulusApiClient.invokeApi
14
- * @returns {Promise<Object>} - promise that resolves to the output
15
- * of the API lambda
16
- */
17
- export const postMigrationCounts = async (params: {
18
- prefix: string,
19
- payload: MigrationCountsPayload
20
- callback?: InvokeApiFunction
21
- }): Promise<ApiGatewayLambdaHttpProxyResponse> => {
22
- const { prefix, payload, callback = invokeApi } = params;
23
-
24
- return await callback({
25
- prefix,
26
- payload: {
27
- httpMethod: 'POST',
28
- resource: '/{proxy+}',
29
- headers: {
30
- 'Content-Type': 'application/json',
31
- },
32
- path: '/migrationCounts',
33
- body: JSON.stringify(payload),
34
- },
35
- expectedStatusCodes: 202,
36
- });
37
- };