oci-objectstorage 2.121.1 → 2.122.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.
Files changed (31) hide show
  1. package/lib/client.d.ts +9 -0
  2. package/lib/client.js +67 -0
  3. package/lib/client.js.map +1 -1
  4. package/lib/model/batch-delete-object-identifier.d.ts +37 -0
  5. package/lib/model/batch-delete-object-identifier.js +32 -0
  6. package/lib/model/batch-delete-object-identifier.js.map +1 -0
  7. package/lib/model/batch-delete-objects-details.d.ts +37 -0
  8. package/lib/model/batch-delete-objects-details.js +64 -0
  9. package/lib/model/batch-delete-objects-details.js.map +1 -0
  10. package/lib/model/batch-delete-objects-result.d.ts +36 -0
  11. package/lib/model/batch-delete-objects-result.js +74 -0
  12. package/lib/model/batch-delete-objects-result.js.map +1 -0
  13. package/lib/model/deleted-object-result.d.ts +35 -0
  14. package/lib/model/deleted-object-result.js +32 -0
  15. package/lib/model/deleted-object-result.js.map +1 -0
  16. package/lib/model/failed-object-result.d.ts +41 -0
  17. package/lib/model/failed-object-result.js +32 -0
  18. package/lib/model/failed-object-result.js.map +1 -0
  19. package/lib/model/index.d.ts +10 -0
  20. package/lib/model/index.js +12 -2
  21. package/lib/model/index.js.map +1 -1
  22. package/lib/request/batch-delete-objects-request.d.ts +37 -0
  23. package/lib/request/batch-delete-objects-request.js +15 -0
  24. package/lib/request/batch-delete-objects-request.js.map +1 -0
  25. package/lib/request/index.d.ts +2 -0
  26. package/lib/request/index.js.map +1 -1
  27. package/lib/response/batch-delete-objects-response.d.ts +29 -0
  28. package/lib/response/batch-delete-objects-response.js +15 -0
  29. package/lib/response/batch-delete-objects-response.js.map +1 -0
  30. package/lib/response/index.d.ts +2 -0
  31. package/package.json +3 -3
package/lib/client.d.ts CHANGED
@@ -111,6 +111,15 @@ export declare class ObjectStorageClient {
111
111
  * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/objectstorage/AbortMultipartUpload.ts.html |here} to see how to use AbortMultipartUpload API.
112
112
  */
113
113
  abortMultipartUpload(abortMultipartUploadRequest: requests.AbortMultipartUploadRequest): Promise<responses.AbortMultipartUploadResponse>;
114
+ /**
115
+ * Deletes a batch of objects.
116
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
117
+ * @param BatchDeleteObjectsRequest
118
+ * @return BatchDeleteObjectsResponse
119
+ * @throws OciError when an error occurs
120
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/objectstorage/BatchDeleteObjects.ts.html |here} to see how to use BatchDeleteObjects API.
121
+ */
122
+ batchDeleteObjects(batchDeleteObjectsRequest: requests.BatchDeleteObjectsRequest): Promise<responses.BatchDeleteObjectsResponse>;
114
123
  /**
115
124
  * Cancels a work request.
116
125
  *
package/lib/client.js CHANGED
@@ -281,6 +281,73 @@ class ObjectStorageClient {
281
281
  }
282
282
  });
283
283
  }
284
+ /**
285
+ * Deletes a batch of objects.
286
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
287
+ * @param BatchDeleteObjectsRequest
288
+ * @return BatchDeleteObjectsResponse
289
+ * @throws OciError when an error occurs
290
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/objectstorage/BatchDeleteObjects.ts.html |here} to see how to use BatchDeleteObjects API.
291
+ */
292
+ batchDeleteObjects(batchDeleteObjectsRequest) {
293
+ return __awaiter(this, void 0, void 0, function* () {
294
+ if (this.logger)
295
+ this.logger.debug("Calling operation ObjectStorageClient#batchDeleteObjects.");
296
+ const operationName = "batchDeleteObjects";
297
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/BatchDeleteObjects";
298
+ const pathParams = {
299
+ "{namespaceName}": batchDeleteObjectsRequest.namespaceName,
300
+ "{bucketName}": batchDeleteObjectsRequest.bucketName
301
+ };
302
+ const queryParams = {};
303
+ let headerParams = {
304
+ "Content-Type": common.Constants.APPLICATION_JSON,
305
+ "opc-client-request-id": batchDeleteObjectsRequest.opcClientRequestId
306
+ };
307
+ const requiredParams = new Set(["namespaceName", "bucketName"]);
308
+ let endpoint = common.EndpointBuilder.populateServiceParamsInEndpoint(this.endpoint, pathParams, queryParams, requiredParams);
309
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
310
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, batchDeleteObjectsRequest.retryConfiguration, specRetryConfiguration);
311
+ if (this.logger)
312
+ retrier.logger = this.logger;
313
+ const request = yield oci_common_2.composeRequest({
314
+ baseEndpoint: endpoint,
315
+ defaultHeaders: this._defaultHeaders,
316
+ path: "/n/{namespaceName}/b/{bucketName}/actions/batchDeleteObjects",
317
+ method: "POST",
318
+ bodyContent: common.ObjectSerializer.serialize(batchDeleteObjectsRequest.batchDeleteObjectsDetails, "BatchDeleteObjectsDetails", model.BatchDeleteObjectsDetails.getJsonObj),
319
+ pathParams: pathParams,
320
+ headerParams: headerParams,
321
+ queryParams: queryParams
322
+ });
323
+ try {
324
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
325
+ const sdkResponse = oci_common_2.composeResponse({
326
+ responseObject: {},
327
+ body: yield response.json(),
328
+ bodyKey: "batchDeleteObjectsResult",
329
+ bodyModel: model.BatchDeleteObjectsResult,
330
+ type: "model.BatchDeleteObjectsResult",
331
+ responseHeaders: [
332
+ {
333
+ value: response.headers.get("opc-client-request-id"),
334
+ key: "opcClientRequestId",
335
+ dataType: "string"
336
+ },
337
+ {
338
+ value: response.headers.get("opc-request-id"),
339
+ key: "opcRequestId",
340
+ dataType: "string"
341
+ }
342
+ ]
343
+ });
344
+ return sdkResponse;
345
+ }
346
+ catch (err) {
347
+ throw err;
348
+ }
349
+ });
350
+ }
284
351
  /**
285
352
  * Cancels a work request.
286
353
  *