@cumulus/api-client 18.2.1 → 18.2.2

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.
package/src/granules.ts CHANGED
@@ -15,21 +15,30 @@ type AssociateExecutionRequest = {
15
15
  executionArn: string
16
16
  };
17
17
 
18
+ const encodeGranulesURIComponent = (
19
+ granuleId: string,
20
+ collectionId: string | undefined
21
+ ): string =>
22
+ (collectionId
23
+ ? `/granules/${encodeURIComponent(collectionId)}/${encodeURIComponent(granuleId)}`
24
+ : `/granules/${encodeURIComponent(granuleId)}`); // Fetching a granule without a collectionId is supported but deprecated
25
+
18
26
  /**
19
27
  * GET raw response from /granules/{granuleId} or /granules/{collectionId}/{granuleId}
20
28
  *
21
- * @param {Object} params - params
22
- * @param {string} params.prefix - the prefix configured for the stack
23
- * @param {string} params.granuleId - a granule ID
24
- * @param {Object} [params.query] - query to pass the API lambda
25
- * @param {number[] | number} params.expectedStatusCodes - the statusCodes which the granule API is
26
- * is expecting for the invokeApi Response,
27
- * default is 200
28
- * @param {Function} params.callback - async function to invoke the api lambda
29
- * that takes a prefix / user payload,
30
- * cumulusApiClient.invokeApifunction
31
- * is the default to invoke the api lambda
32
- * @returns {Promise<Object>} - the granule fetched by the API
29
+ * @param params - params
30
+ * @param params.prefix - the prefix configured for the stack
31
+ * @param params.granuleId - a granule ID
32
+ * @param [params.collectionId] - a collection ID
33
+ * @param [params.query] - query to pass the API lambda
34
+ * @param params.expectedStatusCodes - the statusCodes which the granule API is
35
+ * is expecting for the invokeApi Response,
36
+ * default is 200
37
+ * @param params.callback - async function to invoke the api lambda
38
+ * that takes a prefix / user payload,
39
+ * cumulusApiClient.invokeApifunction
40
+ * is the default to invoke the api lambda
41
+ * @returns - the granule fetched by the API
33
42
  */
34
43
  export const getGranuleResponse = async (params: {
35
44
  prefix: string,
@@ -48,12 +57,7 @@ export const getGranuleResponse = async (params: {
48
57
  callback = invokeApi,
49
58
  } = params;
50
59
 
51
- let path = `/granules/${collectionId}/${granuleId}`;
52
-
53
- // Fetching a granule without a collectionId is supported but deprecated
54
- if (!collectionId) {
55
- path = `/granules/${granuleId}`;
56
- }
60
+ const path = encodeGranulesURIComponent(granuleId, collectionId);
57
61
 
58
62
  return await callback({
59
63
  prefix,
@@ -70,15 +74,17 @@ export const getGranuleResponse = async (params: {
70
74
  /**
71
75
  * GET granule record from /granules/{granuleId} or /granules/{collectionId}/{granuleId}
72
76
  *
73
- * @param {Object} params - params
74
- * @param {string} params.prefix - the prefix configured for the stack
75
- * @param {string} params.granuleId - a granule ID
76
- * @param {Object} [params.query] - query to pass the API lambda
77
- * @param {Function} params.callback - async function to invoke the api lambda
78
- * that takes a prefix / user payload. Defaults
79
- * to cumulusApiClient.invokeApifunction to invoke the
80
- * api lambda
81
- * @returns {Promise<Object>} - the granule fetched by the API
77
+ * @param params - params
78
+ * @param params.prefix - the prefix configured for the stack
79
+ * @param params.granuleId - a granule ID
80
+ * @param [params.collectionId] - a collection ID
81
+ * @param [params.query] - query to pass the API lambda
82
+ * @param params.callback - async function to invoke the api lambda
83
+ * that takes a prefix / user payload. Defaults
84
+ * to cumulusApiClient.invokeApifunction to
85
+ * invoke the
86
+ * api lambda
87
+ * @returns - the granule fetched by the API
82
88
  */
83
89
  export const getGranule = async (params: {
84
90
  prefix: string,
@@ -94,13 +100,16 @@ export const getGranule = async (params: {
94
100
  /**
95
101
  * Wait for a granule to be present in the database (using pRetry)
96
102
  *
97
- * @param {Object} params - params
98
- * @param {string} params.granuleId - granuleId to wait for
99
- * @param {number} params.retries - number of times to retry
100
- * @param {Function} params.callback - async function to invoke the api lambda
101
- * that takes a prefix / user payload. Defaults
102
- * to cumulusApiClient.invokeApifunction to invoke the
103
- * api lambda
103
+ * @param params - params
104
+ * @param params.prefix - the prefix configured for the stack
105
+ * @param params.granuleId - granuleId to wait for
106
+ * @param [params.status] - expected granule status
107
+ * @param [params.retries] - number of times to retry
108
+ * @param [params.pRetryOptions] - options for pRetry
109
+ * @param [params.callback] - async function to invoke the api lambda
110
+ * that takes a prefix / user payload. Defaults
111
+ * to cumulusApiClient.invokeApifunction to invoke the
112
+ * api lambda
104
113
  */
105
114
  export const waitForGranule = async (params: {
106
115
  prefix: string,
@@ -156,16 +165,17 @@ export const waitForGranule = async (params: {
156
165
  * Reingest a granule from the Cumulus API
157
166
  * PATCH /granules/{}
158
167
  *
159
- * @param {Object} params - params
160
- * @param {string} params.prefix - the prefix configured for the stack
161
- * @param {string} params.granuleId - a granule ID
162
- * @param {string} params.workflowName - Optional WorkflowName
163
- * @param {string} params.executionArn - Optional executionArn
164
- * @param {Function} params.callback - async function to invoke the api lambda
165
- * that takes a prefix / user payload. Defaults
166
- * to cumulusApiClient.invokeApifunction to invoke the
167
- * api lambda
168
- * @returns {Promise<Object>} - the granule fetched by the API
168
+ * @param params - params
169
+ * @param params.prefix - the prefix configured for the stack
170
+ * @param params.granuleId - a granule ID
171
+ * @param [params.collectionId] - a collection ID
172
+ * @param params.workflowName - Optional WorkflowName
173
+ * @param params.executionArn - Optional executionArn
174
+ * @param params.callback - async function to invoke the api lambda
175
+ * that takes a prefix / user payload. Defaults
176
+ * to cumulusApiClient.invokeApifunction to invoke the
177
+ * api lambda
178
+ * @returns - the granule fetched by the API
169
179
  */
170
180
  export const reingestGranule = async (params: {
171
181
  prefix: string,
@@ -184,12 +194,7 @@ export const reingestGranule = async (params: {
184
194
  callback = invokeApi,
185
195
  } = params;
186
196
 
187
- let path = `/granules/${collectionId}/${granuleId}`;
188
-
189
- // Fetching a granule without a collectionId is supported but deprecated
190
- if (!collectionId) {
191
- path = `/granules/${granuleId}`;
192
- }
197
+ const path = encodeGranulesURIComponent(granuleId, collectionId);
193
198
 
194
199
  return await callback({
195
200
  prefix: prefix,
@@ -214,14 +219,15 @@ export const reingestGranule = async (params: {
214
219
  * Removes a granule from CMR via the Cumulus API
215
220
  * PATCH /granules/{granuleId}
216
221
  *
217
- * @param {Object} params - params
218
- * @param {string} params.prefix - the prefix configured for the stack
219
- * @param {string} params.granuleId - a granule ID
220
- * @param {Function} params.callback - async function to invoke the api lambda
221
- * that takes a prefix / user payload. Defaults
222
- * to cumulusApiClient.invokeApifunction to invoke the
223
- * api lambda
224
- * @returns {Promise<Object>} - the granule fetched by the API
222
+ * @param params - params
223
+ * @param params.prefix - the prefix configured for the stack
224
+ * @param params.granuleId - a granule ID
225
+ * @param [params.collectionId] - a collection ID
226
+ * @param params.callback - async function to invoke the api lambda
227
+ * that takes a prefix / user payload. Defaults
228
+ * to cumulusApiClient.invokeApifunction to invoke the
229
+ * api lambda
230
+ * @returns - the granule fetched by the API
225
231
  */
226
232
  export const removeFromCMR = async (params: {
227
233
  prefix: string,
@@ -231,12 +237,7 @@ export const removeFromCMR = async (params: {
231
237
  }): Promise<ApiGatewayLambdaHttpProxyResponse> => {
232
238
  const { prefix, granuleId, collectionId, callback = invokeApi } = params;
233
239
 
234
- let path = `/granules/${collectionId}/${granuleId}`;
235
-
236
- // Fetching a granule without a collectionId is supported but deprecated
237
- if (!collectionId) {
238
- path = `/granules/${granuleId}`;
239
- }
240
+ const path = encodeGranulesURIComponent(granuleId, collectionId);
240
241
 
241
242
  return await callback({
242
243
  prefix: prefix,
@@ -257,15 +258,17 @@ export const removeFromCMR = async (params: {
257
258
  * Run a workflow with the given granule as the payload
258
259
  * PATCH /granules/{granuleId}
259
260
  *
260
- * @param {Object} params - params
261
- * @param {string} params.prefix - the prefix configured for the stack
262
- * @param {string} params.granuleId - a granule ID
263
- * @param {string} params.workflow - workflow to be run with given granule
264
- * @param {Function} params.callback - async function to invoke the api lambda
265
- * that takes a prefix / user payload. Defaults
266
- * to cumulusApiClient.invokeApifunction to invoke the
267
- * api lambda
268
- * @returns {Promise<Object>} - the granule fetched by the API
261
+ * @param params - params
262
+ * @param params.prefix - the prefix configured for the stack
263
+ * @param params.granuleId - a granule ID
264
+ * @param [params.collectionId] - a collection ID
265
+ * @param params.workflow - workflow to be run with given granule
266
+ * @param params.callback - async function to invoke the api lambda
267
+ * that takes a prefix / user payload. Defaults
268
+ * to cumulusApiClient.invokeApifunction to invoke the
269
+ * api lambda
270
+ * @param [params.meta] - metadata
271
+ * @returns - the granule fetched by the API
269
272
  */
270
273
  export const applyWorkflow = async (params: {
271
274
  prefix: string,
@@ -284,12 +287,7 @@ export const applyWorkflow = async (params: {
284
287
  callback = invokeApi,
285
288
  } = params;
286
289
 
287
- let path = `/granules/${collectionId}/${granuleId}`;
288
-
289
- // Fetching a granule without a collectionId is supported but deprecated
290
- if (!collectionId) {
291
- path = `/granules/${granuleId}`;
292
- }
290
+ const path = encodeGranulesURIComponent(granuleId, collectionId);
293
291
 
294
292
  return await callback({
295
293
  prefix: prefix,
@@ -310,15 +308,16 @@ export const applyWorkflow = async (params: {
310
308
  * Delete a granule from Cumulus via the API lambda
311
309
  * DELETE /granules/${granuleId}
312
310
  *
313
- * @param {Object} params - params
314
- * @param {pRetry.Options} params.pRetryObject - pRetry options object
315
- * @param {string} params.prefix - the prefix configured for the stack
316
- * @param {string} params.granuleId - a granule ID
317
- * @param {Function} params.callback - async function to invoke the api lambda
318
- * that takes a prefix / user payload. Defaults
319
- * to cumulusApiClient.invokeApifunction to invoke the
320
- * api lambda
321
- * @returns {Promise<Object>} - the delete confirmation from the API
311
+ * @param params - params
312
+ * @param params.pRetryOptions - pRetry options object
313
+ * @param params.prefix - the prefix configured for the stack
314
+ * @param params.granuleId - a granule ID
315
+ * @param [params.collectionId] - a collection ID
316
+ * @param params.callback - async function to invoke the api lambda
317
+ * that takes a prefix / user payload. Defaults
318
+ * to cumulusApiClient.invokeApifunction to invoke the
319
+ * api lambda
320
+ * @returns - the delete confirmation from the API
322
321
  */
323
322
  export const deleteGranule = async (params: {
324
323
  prefix: string,
@@ -335,12 +334,7 @@ export const deleteGranule = async (params: {
335
334
  callback = invokeApi,
336
335
  } = params;
337
336
 
338
- let path = `/granules/${collectionId}/${granuleId}`;
339
-
340
- // Fetching a granule without a collectionId is supported but deprecated
341
- if (!collectionId) {
342
- path = `/granules/${granuleId}`;
343
- }
337
+ const path = encodeGranulesURIComponent(granuleId, collectionId);
344
338
 
345
339
  return await callback({
346
340
  prefix: prefix,
@@ -357,15 +351,16 @@ export const deleteGranule = async (params: {
357
351
  * Move a granule via the API
358
352
  * PATCH /granules/{granuleId}
359
353
  *
360
- * @param {Object} params - params
361
- * @param {string} params.prefix - the prefix configured for the stack
362
- * @param {string} params.granuleId - a granule ID
363
- * @param {Array<Object>} params.destinations - move granule destinations
364
- * @param {Function} params.callback - async function to invoke the api lambda
365
- * that takes a prefix / user payload. Defaults
366
- * to cumulusApiClient.invokeApifunction to invoke
367
- * the api lambda
368
- * @returns {Promise<Object>} - the move response from the API
354
+ * @param params - params
355
+ * @param params.prefix - the prefix configured for the stack
356
+ * @param params.granuleId - a granule ID
357
+ * @param [params.collectionId] - a collection ID
358
+ * @param params.destinations - move granule destinations
359
+ * @param params.callback - async function to invoke the api lambda
360
+ * that takes a prefix / user payload. Defaults
361
+ * to cumulusApiClient.invokeApifunction to invoke
362
+ * the api lambda
363
+ * @returns - the move response from the API
369
364
  */
370
365
  export const moveGranule = async (params: {
371
366
  prefix: string,
@@ -382,12 +377,7 @@ export const moveGranule = async (params: {
382
377
  callback = invokeApi,
383
378
  } = params;
384
379
 
385
- let path = `/granules/${collectionId}/${granuleId}`;
386
-
387
- // Fetching a granule without a collectionId is supported but deprecated
388
- if (!collectionId) {
389
- path = `/granules/${granuleId}`;
390
- }
380
+ const path = encodeGranulesURIComponent(granuleId, collectionId);
391
381
 
392
382
  return await callback({
393
383
  prefix: prefix,
@@ -407,14 +397,15 @@ export const moveGranule = async (params: {
407
397
  /**
408
398
  * Removed a granule from CMR and delete from Cumulus via the API
409
399
  *
410
- * @param {Object} params - params
411
- * @param {string} params.prefix - the prefix configured for the stack
412
- * @param {string} params.granuleId - a granule ID
413
- * @param {Function} params.callback - async function to invoke the api lambda
414
- * that takes a prefix / user payload. Defaults
415
- * to cumulusApiClient.invokeApifunction to invoke the
416
- * api lambda
417
- * @returns {Promise<Object>} - the delete confirmation from the API
400
+ * @param params - params
401
+ * @param params.prefix - the prefix configured for the stack
402
+ * @param params.granuleId - a granule ID
403
+ * @param [params.collectionId] - a collection ID
404
+ * @param params.callback - async function to invoke the api lambda
405
+ * that takes a prefix / user payload. Defaults
406
+ * to cumulusApiClient.invokeApifunction to invoke the
407
+ * api lambda
408
+ * @returns - the delete confirmation from the API
418
409
  */
419
410
  export const removePublishedGranule = async (params: {
420
411
  prefix: string,
@@ -432,13 +423,16 @@ export const removePublishedGranule = async (params: {
432
423
  /**
433
424
  * Query granules stored in cumulus
434
425
  * GET /granules
435
- * @param {Object} params - params
436
- * @param {Object} [params.query] - query to pass the API lambda
437
- * @param {Function} params.callback - async function to invoke the api lambda
438
- * that takes a prefix / user payload. Defaults
439
- * to cumulusApiClient.invokeApifunction to invoke the
440
- * api lambda
441
- * @returns {Promise<Object>} - the response from the callback
426
+ *
427
+ * @param params - params
428
+ * @param params.prefix - the prefix configured for the stack
429
+ * @param [params.query] - query to pass the API lambda
430
+ * @param [params.query.fields]
431
+ * @param params.callback - async function to invoke the api lambda
432
+ * that takes a prefix / user payload. Defaults
433
+ * to cumulusApiClient.invokeApifunction to invoke the
434
+ * api lambda
435
+ * @returns - the response from the callback
442
436
  */
443
437
  export const listGranules = async (params: {
444
438
  prefix: string,
@@ -464,13 +458,15 @@ export const listGranules = async (params: {
464
458
  /**
465
459
  * Create granule into cumulus.
466
460
  * POST /granules
467
- * @param {Object} params - params
468
- * @param {Object} [params.body] - granule to pass the API lambda
469
- * @param {Function} params.callback - async function to invoke the api lambda
470
- * that takes a prefix / user payload. Defaults
471
- * to cumulusApiClient.invokeApifunction to invoke the
472
- * api lambda
473
- * @returns {Promise<Object>} - the response from the callback
461
+ *
462
+ * @param params - params
463
+ * @param params.prefix - the prefix configured for the stack
464
+ * @param [params.body] - granule to pass the API lambda
465
+ * @param params.callback - async function to invoke the api lambda
466
+ * that takes a prefix / user payload. Defaults
467
+ * to cumulusApiClient.invokeApifunction to invoke the
468
+ * api lambda
469
+ * @returns - the response from the callback
474
470
  */
475
471
  export const createGranule = async (params: {
476
472
  prefix: string,
@@ -496,13 +492,15 @@ export const createGranule = async (params: {
496
492
  * be removed if not specified and in some cases replaced with defaults.
497
493
  * Granule execution association history will be retained.
498
494
  * PUT /granules/{collectionId}/{granuleId}
499
- * @param {Object} params - params
500
- * @param {Object} [params.body] - granule to pass the API lambda
501
- * @param {Function} params.callback - async function to invoke the api lambda
502
- * that takes a prefix / user payload. Defaults
503
- * to cumulusApiClient.invokeApifunction to invoke the
504
- * api lambda
505
- * @returns {Promise<Object>} - the response from the callback
495
+ *
496
+ * @param params - params
497
+ * @param params.prefix - the prefix configured for the stack
498
+ * @param [params.body] - granule to pass the API lambda
499
+ * @param params.callback - async function to invoke the api lambda
500
+ * that takes a prefix / user payload. Defaults
501
+ * to cumulusApiClient.invokeApifunction to invoke the
502
+ * api lambda
503
+ * @returns - the response from the callback
506
504
  */
507
505
  export const replaceGranule = async (params: {
508
506
  prefix: string,
@@ -511,12 +509,14 @@ export const replaceGranule = async (params: {
511
509
  }): Promise<ApiGatewayLambdaHttpProxyResponse> => {
512
510
  const { prefix, body, callback = invokeApi } = params;
513
511
 
512
+ const path = encodeGranulesURIComponent(body.granuleId, body.collectionId);
513
+
514
514
  return await callback({
515
515
  prefix,
516
516
  payload: {
517
517
  httpMethod: 'PUT',
518
518
  resource: '/{proxy+}',
519
- path: `/granules/${body.collectionId}/${body.granuleId}`,
519
+ path,
520
520
  headers: {
521
521
  'Content-Type': 'application/json',
522
522
  'Cumulus-API-Version': '2',
@@ -532,13 +532,17 @@ export const replaceGranule = async (params: {
532
532
  * not be overwritten if not specified, null values will be removed and in
533
533
  * some cases replaced with defaults.
534
534
  * PATCH /granules/{granuleId}
535
- * @param {Object} params - params
536
- * @param {Object} [params.body] - granule to pass the API lambda
537
- * @param {Function} params.callback - async function to invoke the api lambda
538
- * that takes a prefix / user payload. Defaults
539
- * to cumulusApiClient.invokeApifunction to invoke the
540
- * api lambda
541
- * @returns {Promise<Object>} - the response from the callback
535
+ *
536
+ * @param params - params
537
+ * @param params.prefix - the prefix configured for the stack
538
+ * @param [params.body] - granule to pass the API lambda
539
+ * @param params.granuleId - a granule ID
540
+ * @param [params.collectionId] - a collection ID
541
+ * @param params.callback - async function to invoke the api lambda
542
+ * that takes a prefix / user payload. Defaults
543
+ * to cumulusApiClient.invokeApifunction to invoke the
544
+ * api lambda
545
+ * @returns - the response from the callback
542
546
  */
543
547
  export const updateGranule = async (params: {
544
548
  prefix: string,
@@ -549,12 +553,7 @@ export const updateGranule = async (params: {
549
553
  }): Promise<ApiGatewayLambdaHttpProxyResponse> => {
550
554
  const { prefix, granuleId, collectionId, body, callback = invokeApi } = params;
551
555
 
552
- let path = `/granules/${collectionId}/${granuleId}`;
553
-
554
- // Fetching a granule without a collectionId is supported but deprecated
555
- if (!collectionId) {
556
- path = `/granules/${granuleId}`;
557
- }
556
+ const path = encodeGranulesURIComponent(granuleId, collectionId);
558
557
 
559
558
  return await callback({
560
559
  prefix,
@@ -572,13 +571,15 @@ export const updateGranule = async (params: {
572
571
  /**
573
572
  * Associate an execution with a granule in cumulus.
574
573
  * POST /granules/{granuleId}/execution
575
- * @param {Object} params - params
576
- * @param {Object} [params.body] - granule and execution info to pass the API lambda
577
- * @param {Function} params.callback - async function to invoke the api lambda
578
- * that takes a prefix / user payload. Defaults
579
- * to cumulusApiClient.invokeApifunction to invoke the
580
- * api lambda
581
- * @returns {Promise<Object>} - the response from the callback
574
+ *
575
+ * @param params - params
576
+ * @param params.prefix - the prefix configured for the stack
577
+ * @param [params.body] - granule and execution info to pass the API lambda
578
+ * @param params.callback - async function to invoke the api lambda
579
+ * that takes a prefix / user payload. Defaults
580
+ * to cumulusApiClient.invokeApifunction to invoke the
581
+ * api lambda
582
+ * @returns - the response from the callback
582
583
  */
583
584
  export const associateExecutionWithGranule = async (params: {
584
585
  prefix: string,
@@ -587,12 +588,14 @@ export const associateExecutionWithGranule = async (params: {
587
588
  }): Promise<ApiGatewayLambdaHttpProxyResponse> => {
588
589
  const { prefix, body, callback = invokeApi } = params;
589
590
 
591
+ const path = encodeGranulesURIComponent(body.granuleId, undefined);
592
+
590
593
  return await callback({
591
594
  prefix,
592
595
  payload: {
593
596
  httpMethod: 'POST',
594
597
  resource: '/{proxy+}',
595
- path: `/granules/${body.granuleId}/executions`,
598
+ path: `${path}/executions`,
596
599
  headers: { 'Content-Type': 'application/json' },
597
600
  body: JSON.stringify(body),
598
601
  },
@@ -602,13 +605,15 @@ export const associateExecutionWithGranule = async (params: {
602
605
  /**
603
606
  * Bulk operations on granules stored in cumulus
604
607
  * POST /granules/bulk
605
- * @param {Object} params - params
606
- * @param {Object} params.body - body to pass the API lambda
607
- * @param {Function} params.callback - async function to invoke the api lambda
608
- * that takes a prefix / user payload. Defaults
609
- * to cumulusApiClient.invokeApifunction to invoke the
610
- * api lambda
611
- * @returns {Promise<Object>} - the response from the callback
608
+ *
609
+ * @param params - params
610
+ * @param params.prefix - the prefix configured for the stack
611
+ * @param params.body - body to pass the API lambda
612
+ * @param params.callback - async function to invoke the api lambda
613
+ * that takes a prefix / user payload. Defaults
614
+ * to cumulusApiClient.invokeApifunction to invoke the
615
+ * api lambda
616
+ * @returns - the response from the callback
612
617
  */
613
618
  export const bulkGranules = async (params: {
614
619
  prefix: string,
@@ -635,13 +640,15 @@ export const bulkGranules = async (params: {
635
640
  /**
636
641
  * Bulk delete granules stored in cumulus
637
642
  * POST /granules/bulkDelete
638
- * @param {Object} params - params
639
- * @param {Object} params.body - body to pass the API lambda
640
- * @param {Function} params.callback - async function to invoke the api lambda
641
- * that takes a prefix / user payload. Defaults
642
- * to cumulusApiClient.invokeApifunction to invoke the
643
- * api lambda
644
- * @returns {Promise<Object>} - the response from the callback
643
+ *
644
+ * @param params - params
645
+ * @param params.prefix - the prefix configured for the stack
646
+ * @param params.body - body to pass the API lambda
647
+ * @param params.callback - async function to invoke the api lambda
648
+ * that takes a prefix / user payload. Defaults
649
+ * to cumulusApiClient.invokeApifunction to invoke the
650
+ * api lambda
651
+ * @returns - the response from the callback
645
652
  */
646
653
  export const bulkDeleteGranules = async (params: {
647
654
  prefix: string,
@@ -691,15 +698,15 @@ export const bulkReingestGranules = async (params: {
691
698
  * Bulk Granule Operations
692
699
  * POST /granules/bulk
693
700
  *
694
- * @param {Object} params - params
695
- * @param {string} params.prefix - the prefix configured for the stack
696
- * @param {Array<ApiGranuleRecord>} params.granules - the granules to have bulk operation on
697
- * @param {string} params.workflowName - workflowName for the bulk operation execution
698
- * @param {Function} params.callback - async function to invoke the api lambda
699
- * that takes a prefix / user payload. Defaults
700
- * to cumulusApiClient.invokeApifunction to invoke the
701
- * api lambda
702
- * @returns {Promise<Object>} - the response from the callback
701
+ * @param params - params
702
+ * @param params.prefix - the prefix configured for the stack
703
+ * @param params.granules - the granules to have bulk operation on
704
+ * @param params.workflowName - workflowName for the bulk operation execution
705
+ * @param params.callback - async function to invoke the api lambda
706
+ * that takes a prefix / user payload. Defaults
707
+ * to cumulusApiClient.invokeApifunction to invoke the
708
+ * api lambda
709
+ * @returns - the response from the callback
703
710
  */
704
711
  export const bulkOperation = async (params: {
705
712
  prefix: string,