oci-objectstorage 2.3.1 → 2.5.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.
Files changed (63) hide show
  1. package/LICENSE.txt +6 -0
  2. package/lib/client.d.ts +220 -50
  3. package/lib/client.js +269 -55
  4. package/lib/client.js.map +1 -1
  5. package/lib/model/rename-object-details.d.ts +3 -1
  6. package/lib/model/rename-object-details.js.map +1 -1
  7. package/lib/request/abort-multipart-upload-request.d.ts +1 -1
  8. package/lib/request/cancel-work-request-request.d.ts +1 -1
  9. package/lib/request/commit-multipart-upload-request.d.ts +1 -1
  10. package/lib/request/copy-object-request.d.ts +7 -1
  11. package/lib/request/create-bucket-request.d.ts +1 -1
  12. package/lib/request/create-multipart-upload-request.d.ts +7 -1
  13. package/lib/request/create-preauthenticated-request-request.d.ts +1 -1
  14. package/lib/request/create-replication-policy-request.d.ts +1 -1
  15. package/lib/request/create-retention-rule-request.d.ts +1 -1
  16. package/lib/request/delete-bucket-request.d.ts +1 -1
  17. package/lib/request/delete-object-lifecycle-policy-request.d.ts +1 -1
  18. package/lib/request/delete-object-request.d.ts +1 -1
  19. package/lib/request/delete-preauthenticated-request-request.d.ts +1 -1
  20. package/lib/request/delete-replication-policy-request.d.ts +1 -1
  21. package/lib/request/delete-retention-rule-request.d.ts +1 -1
  22. package/lib/request/get-bucket-request.d.ts +4 -3
  23. package/lib/request/get-bucket-request.js.map +1 -1
  24. package/lib/request/get-namespace-metadata-request.d.ts +1 -1
  25. package/lib/request/get-namespace-request.d.ts +1 -1
  26. package/lib/request/get-object-lifecycle-policy-request.d.ts +1 -1
  27. package/lib/request/get-object-request.d.ts +4 -3
  28. package/lib/request/get-preauthenticated-request-request.d.ts +1 -1
  29. package/lib/request/get-replication-policy-request.d.ts +1 -1
  30. package/lib/request/get-retention-rule-request.d.ts +1 -1
  31. package/lib/request/get-work-request-request.d.ts +1 -1
  32. package/lib/request/head-bucket-request.d.ts +4 -3
  33. package/lib/request/head-object-request.d.ts +4 -3
  34. package/lib/request/list-buckets-request.d.ts +1 -1
  35. package/lib/request/list-multipart-upload-parts-request.d.ts +1 -1
  36. package/lib/request/list-multipart-uploads-request.d.ts +1 -1
  37. package/lib/request/list-object-versions-request.d.ts +1 -1
  38. package/lib/request/list-objects-request.d.ts +1 -1
  39. package/lib/request/list-preauthenticated-requests-request.d.ts +1 -1
  40. package/lib/request/list-replication-policies-request.d.ts +1 -1
  41. package/lib/request/list-replication-sources-request.d.ts +1 -1
  42. package/lib/request/list-retention-rules-request.d.ts +1 -1
  43. package/lib/request/list-work-request-errors-request.d.ts +1 -1
  44. package/lib/request/list-work-request-logs-request.d.ts +1 -1
  45. package/lib/request/list-work-requests-request.d.ts +1 -1
  46. package/lib/request/make-bucket-writable-request.d.ts +1 -1
  47. package/lib/request/put-object-lifecycle-policy-request.d.ts +1 -1
  48. package/lib/request/put-object-request.d.ts +7 -1
  49. package/lib/request/reencrypt-bucket-request.d.ts +1 -1
  50. package/lib/request/reencrypt-object-request.d.ts +1 -1
  51. package/lib/request/rename-object-request.d.ts +1 -1
  52. package/lib/request/restore-objects-request.d.ts +1 -1
  53. package/lib/request/update-bucket-request.d.ts +1 -1
  54. package/lib/request/update-namespace-metadata-request.d.ts +1 -1
  55. package/lib/request/update-object-storage-tier-request.d.ts +1 -1
  56. package/lib/request/update-retention-rule-request.d.ts +1 -1
  57. package/lib/request/upload-part-request.d.ts +7 -1
  58. package/lib/upload-manager/node-fs-blob.js +2 -1
  59. package/lib/upload-manager/node-fs-blob.js.map +1 -1
  60. package/lib/upload-manager/upload-manager.js +52 -10
  61. package/lib/upload-manager/upload-manager.js.map +1 -1
  62. package/lib/upload-manager/upload-options.d.ts +1 -0
  63. package/package.json +3 -3
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/DeletePreauthenticatedRequest.ts.html |here} to see how to use DeletePreauthenticatedRequestRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/DeletePreauthenticatedRequest.ts.html |here} to see how to use DeletePreauthenticatedRequestRequest.
16
16
  */
17
17
  export interface DeletePreauthenticatedRequestRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/DeleteReplicationPolicy.ts.html |here} to see how to use DeleteReplicationPolicyRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/DeleteReplicationPolicy.ts.html |here} to see how to use DeleteReplicationPolicyRequest.
16
16
  */
17
17
  export interface DeleteReplicationPolicyRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/DeleteRetentionRule.ts.html |here} to see how to use DeleteRetentionRuleRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/DeleteRetentionRule.ts.html |here} to see how to use DeleteRetentionRuleRequest.
16
16
  */
17
17
  export interface DeleteRetentionRuleRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetBucket.ts.html |here} to see how to use GetBucketRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetBucket.ts.html |here} to see how to use GetBucketRequest.
16
16
  */
17
17
  export interface GetBucketRequest extends common.BaseRequest {
18
18
  /**
@@ -33,8 +33,9 @@ export interface GetBucketRequest extends common.BaseRequest {
33
33
  */
34
34
  "ifMatch"?: string;
35
35
  /**
36
- * The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should
37
- * fail if the resource already exists.
36
+ * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not
37
+ * match the ETag of the existing resource, the request returns the expected response. If the ETag matches
38
+ * the ETag of the existing resource, the request returns an HTTP 304 status without a response body.
38
39
  *
39
40
  */
40
41
  "ifNoneMatch"?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"get-bucket-request.js","sourceRoot":"","sources":["../../../../../lib/objectstorage/lib/request/get-bucket-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA8CH,IAAiB,gBAAgB,CAMhC;AAND,WAAiB,gBAAgB;IAC/B,IAAY,MAIX;IAJD,WAAY,MAAM;QAChB,+CAAqC,CAAA;QACrC,6CAAmC,CAAA;QACnC,qCAA2B,CAAA;IAC7B,CAAC,EAJW,MAAM,GAAN,uBAAM,KAAN,uBAAM,QAIjB;AACH,CAAC,EANgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAMhC"}
1
+ {"version":3,"file":"get-bucket-request.js","sourceRoot":"","sources":["../../../../../lib/objectstorage/lib/request/get-bucket-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA+CH,IAAiB,gBAAgB,CAMhC;AAND,WAAiB,gBAAgB;IAC/B,IAAY,MAIX;IAJD,WAAY,MAAM;QAChB,+CAAqC,CAAA;QACrC,6CAAmC,CAAA;QACnC,qCAA2B,CAAA;IAC7B,CAAC,EAJW,MAAM,GAAN,uBAAM,KAAN,uBAAM,QAIjB;AACH,CAAC,EANgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAMhC"}
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetNamespaceMetadata.ts.html |here} to see how to use GetNamespaceMetadataRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetNamespaceMetadata.ts.html |here} to see how to use GetNamespaceMetadataRequest.
16
16
  */
17
17
  export interface GetNamespaceMetadataRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetNamespace.ts.html |here} to see how to use GetNamespaceRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetNamespace.ts.html |here} to see how to use GetNamespaceRequest.
16
16
  */
17
17
  export interface GetNamespaceRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetObjectLifecyclePolicy.ts.html |here} to see how to use GetObjectLifecyclePolicyRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetObjectLifecyclePolicy.ts.html |here} to see how to use GetObjectLifecyclePolicyRequest.
16
16
  */
17
17
  export interface GetObjectLifecyclePolicyRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetObject.ts.html |here} to see how to use GetObjectRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetObject.ts.html |here} to see how to use GetObjectRequest.
16
16
  */
17
17
  export interface GetObjectRequest extends common.BaseRequest {
18
18
  /**
@@ -43,8 +43,9 @@ export interface GetObjectRequest extends common.BaseRequest {
43
43
  */
44
44
  "ifMatch"?: string;
45
45
  /**
46
- * The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should
47
- * fail if the resource already exists.
46
+ * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not
47
+ * match the ETag of the existing resource, the request returns the expected response. If the ETag matches
48
+ * the ETag of the existing resource, the request returns an HTTP 304 status without a response body.
48
49
  *
49
50
  */
50
51
  "ifNoneMatch"?: string;
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetPreauthenticatedRequest.ts.html |here} to see how to use GetPreauthenticatedRequestRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetPreauthenticatedRequest.ts.html |here} to see how to use GetPreauthenticatedRequestRequest.
16
16
  */
17
17
  export interface GetPreauthenticatedRequestRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetReplicationPolicy.ts.html |here} to see how to use GetReplicationPolicyRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetReplicationPolicy.ts.html |here} to see how to use GetReplicationPolicyRequest.
16
16
  */
17
17
  export interface GetReplicationPolicyRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetRetentionRule.ts.html |here} to see how to use GetRetentionRuleRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetRetentionRule.ts.html |here} to see how to use GetRetentionRuleRequest.
16
16
  */
17
17
  export interface GetRetentionRuleRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/GetWorkRequest.ts.html |here} to see how to use GetWorkRequestRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/GetWorkRequest.ts.html |here} to see how to use GetWorkRequestRequest.
16
16
  */
17
17
  export interface GetWorkRequestRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/HeadBucket.ts.html |here} to see how to use HeadBucketRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/HeadBucket.ts.html |here} to see how to use HeadBucketRequest.
16
16
  */
17
17
  export interface HeadBucketRequest extends common.BaseRequest {
18
18
  /**
@@ -33,8 +33,9 @@ export interface HeadBucketRequest extends common.BaseRequest {
33
33
  */
34
34
  "ifMatch"?: string;
35
35
  /**
36
- * The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should
37
- * fail if the resource already exists.
36
+ * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not
37
+ * match the ETag of the existing resource, the request returns the expected response. If the ETag matches
38
+ * the ETag of the existing resource, the request returns an HTTP 304 status without a response body.
38
39
  *
39
40
  */
40
41
  "ifNoneMatch"?: string;
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/HeadObject.ts.html |here} to see how to use HeadObjectRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/HeadObject.ts.html |here} to see how to use HeadObjectRequest.
16
16
  */
17
17
  export interface HeadObjectRequest extends common.BaseRequest {
18
18
  /**
@@ -43,8 +43,9 @@ export interface HeadObjectRequest extends common.BaseRequest {
43
43
  */
44
44
  "ifMatch"?: string;
45
45
  /**
46
- * The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should
47
- * fail if the resource already exists.
46
+ * The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not
47
+ * match the ETag of the existing resource, the request returns the expected response. If the ETag matches
48
+ * the ETag of the existing resource, the request returns an HTTP 304 status without a response body.
48
49
  *
49
50
  */
50
51
  "ifNoneMatch"?: string;
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListBuckets.ts.html |here} to see how to use ListBucketsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListBuckets.ts.html |here} to see how to use ListBucketsRequest.
16
16
  */
17
17
  export interface ListBucketsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListMultipartUploadParts.ts.html |here} to see how to use ListMultipartUploadPartsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListMultipartUploadParts.ts.html |here} to see how to use ListMultipartUploadPartsRequest.
16
16
  */
17
17
  export interface ListMultipartUploadPartsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListMultipartUploads.ts.html |here} to see how to use ListMultipartUploadsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListMultipartUploads.ts.html |here} to see how to use ListMultipartUploadsRequest.
16
16
  */
17
17
  export interface ListMultipartUploadsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListObjectVersions.ts.html |here} to see how to use ListObjectVersionsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListObjectVersions.ts.html |here} to see how to use ListObjectVersionsRequest.
16
16
  */
17
17
  export interface ListObjectVersionsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListObjects.ts.html |here} to see how to use ListObjectsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListObjects.ts.html |here} to see how to use ListObjectsRequest.
16
16
  */
17
17
  export interface ListObjectsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListPreauthenticatedRequests.ts.html |here} to see how to use ListPreauthenticatedRequestsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListPreauthenticatedRequests.ts.html |here} to see how to use ListPreauthenticatedRequestsRequest.
16
16
  */
17
17
  export interface ListPreauthenticatedRequestsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListReplicationPolicies.ts.html |here} to see how to use ListReplicationPoliciesRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListReplicationPolicies.ts.html |here} to see how to use ListReplicationPoliciesRequest.
16
16
  */
17
17
  export interface ListReplicationPoliciesRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListReplicationSources.ts.html |here} to see how to use ListReplicationSourcesRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListReplicationSources.ts.html |here} to see how to use ListReplicationSourcesRequest.
16
16
  */
17
17
  export interface ListReplicationSourcesRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListRetentionRules.ts.html |here} to see how to use ListRetentionRulesRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListRetentionRules.ts.html |here} to see how to use ListRetentionRulesRequest.
16
16
  */
17
17
  export interface ListRetentionRulesRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrorsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrorsRequest.
16
16
  */
17
17
  export interface ListWorkRequestErrorsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogsRequest.
16
16
  */
17
17
  export interface ListWorkRequestLogsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ListWorkRequests.ts.html |here} to see how to use ListWorkRequestsRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ListWorkRequests.ts.html |here} to see how to use ListWorkRequestsRequest.
16
16
  */
17
17
  export interface ListWorkRequestsRequest extends common.BaseRequest {
18
18
  /**
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/MakeBucketWritable.ts.html |here} to see how to use MakeBucketWritableRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/MakeBucketWritable.ts.html |here} to see how to use MakeBucketWritableRequest.
16
16
  */
17
17
  export interface MakeBucketWritableRequest extends common.BaseRequest {
18
18
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/PutObjectLifecyclePolicy.ts.html |here} to see how to use PutObjectLifecyclePolicyRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/PutObjectLifecyclePolicy.ts.html |here} to see how to use PutObjectLifecyclePolicyRequest.
17
17
  */
18
18
  export interface PutObjectLifecyclePolicyRequest extends common.BaseRequest {
19
19
  /**
@@ -15,7 +15,7 @@ import * as model from "../model";
15
15
  import common = require("oci-common");
16
16
  import stream = require("stream");
17
17
  /**
18
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/PutObject.ts.html |here} to see how to use PutObjectRequest.
18
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/PutObject.ts.html |here} to see how to use PutObjectRequest.
19
19
  */
20
20
  export interface PutObjectRequest extends common.BaseRequest {
21
21
  /**
@@ -134,6 +134,12 @@ export interface PutObjectRequest extends common.BaseRequest {
134
134
  *
135
135
  */
136
136
  "opcSseCustomerKeySha256"?: string;
137
+ /**
138
+ * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key
139
+ * Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
140
+ *
141
+ */
142
+ "opcSseKmsKeyId"?: string;
137
143
  /**
138
144
  * The storage tier that the object should be stored in. If not specified, the object will be stored in
139
145
  * the same storage tier as the bucket.
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import common = require("oci-common");
14
14
  /**
15
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ReencryptBucket.ts.html |here} to see how to use ReencryptBucketRequest.
15
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ReencryptBucket.ts.html |here} to see how to use ReencryptBucketRequest.
16
16
  */
17
17
  export interface ReencryptBucketRequest extends common.BaseRequest {
18
18
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/ReencryptObject.ts.html |here} to see how to use ReencryptObjectRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/ReencryptObject.ts.html |here} to see how to use ReencryptObjectRequest.
17
17
  */
18
18
  export interface ReencryptObjectRequest extends common.BaseRequest {
19
19
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/RenameObject.ts.html |here} to see how to use RenameObjectRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/RenameObject.ts.html |here} to see how to use RenameObjectRequest.
17
17
  */
18
18
  export interface RenameObjectRequest extends common.BaseRequest {
19
19
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/RestoreObjects.ts.html |here} to see how to use RestoreObjectsRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/RestoreObjects.ts.html |here} to see how to use RestoreObjectsRequest.
17
17
  */
18
18
  export interface RestoreObjectsRequest extends common.BaseRequest {
19
19
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/UpdateBucket.ts.html |here} to see how to use UpdateBucketRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/UpdateBucket.ts.html |here} to see how to use UpdateBucketRequest.
17
17
  */
18
18
  export interface UpdateBucketRequest extends common.BaseRequest {
19
19
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/UpdateNamespaceMetadata.ts.html |here} to see how to use UpdateNamespaceMetadataRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/UpdateNamespaceMetadata.ts.html |here} to see how to use UpdateNamespaceMetadataRequest.
17
17
  */
18
18
  export interface UpdateNamespaceMetadataRequest extends common.BaseRequest {
19
19
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/UpdateObjectStorageTier.ts.html |here} to see how to use UpdateObjectStorageTierRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/UpdateObjectStorageTier.ts.html |here} to see how to use UpdateObjectStorageTierRequest.
17
17
  */
18
18
  export interface UpdateObjectStorageTierRequest extends common.BaseRequest {
19
19
  /**
@@ -13,7 +13,7 @@
13
13
  import * as model from "../model";
14
14
  import common = require("oci-common");
15
15
  /**
16
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/UpdateRetentionRule.ts.html |here} to see how to use UpdateRetentionRuleRequest.
16
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/UpdateRetentionRule.ts.html |here} to see how to use UpdateRetentionRuleRequest.
17
17
  */
18
18
  export interface UpdateRetentionRuleRequest extends common.BaseRequest {
19
19
  /**
@@ -14,7 +14,7 @@
14
14
  import common = require("oci-common");
15
15
  import stream = require("stream");
16
16
  /**
17
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.3.1/objectstorage/UploadPart.ts.html |here} to see how to use UploadPartRequest.
17
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.5.2/objectstorage/UploadPart.ts.html |here} to see how to use UploadPartRequest.
18
18
  */
19
19
  export interface UploadPartRequest extends common.BaseRequest {
20
20
  /**
@@ -100,4 +100,10 @@ export interface UploadPartRequest extends common.BaseRequest {
100
100
  *
101
101
  */
102
102
  "opcSseCustomerKeySha256"?: string;
103
+ /**
104
+ * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key
105
+ * Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
106
+ *
107
+ */
108
+ "opcSseKmsKeyId"?: string;
103
109
  }
@@ -38,13 +38,14 @@ class NodeFSBlob {
38
38
  */
39
39
  getData() {
40
40
  return __awaiter(this, void 0, void 0, function* () {
41
+ const end = this.fileSize === 0 ? this.end : this.end - 1;
41
42
  return fs_1.createReadStream(this.filePath, {
42
43
  start: this.start,
43
44
  // As per https://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options, end is inclusive.
44
45
  // However, as per https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice, end is non-inclusive.
45
46
  // Read till end - 1 to match Blob's behavior
46
47
  // Note: if this.end = 0, and end: -1, we will have an issue giving The value of "end" is out of range. It must be >= 0 and <= 2 ** 53 - 1. Received -1
47
- end: this.end,
48
+ end: end,
48
49
  highWaterMark: this.highWaterMark
49
50
  });
50
51
  });
@@ -1 +1 @@
1
- {"version":3,"file":"node-fs-blob.js","sourceRoot":"","sources":["../../../../../lib/objectstorage/lib/upload-manager/node-fs-blob.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;AAEH,2BAA8D;AAE9D,mCAAoC;AAGpC;;GAEG;AACH,MAAa,UAAU;IAQrB,YACmB,QAAgB,EAChB,aAAqB,EACtC,KAAc,EACd,GAAY,EACZ,QAAiB;QAJA,aAAQ,GAAR,QAAQ,CAAQ;QAChB,kBAAa,GAAb,aAAa,CAAQ;QARxC,SAAI,GAAW,EAAE,CAAC;QAahB,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,aAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;QACzD,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC;QAEhC,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE;YAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;SAC1B;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;IACpC,CAAC;IAED;;;OAGG;IACU,OAAO;;YAClB,OAAO,qBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACrC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,+FAA+F;gBAC/F,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WAAW;;YACtB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;gBAC3B,OAAO,CAAC,iBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;OAGG;IACU,IAAI;;YACf,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;KAAA;IAEY,cAAc,CAAC,MAAgB;;YAC1C,MAAM,MAAM,GAAa,EAAE,CAAC;YAC5B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC/C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC1E,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IACD;;;OAGG;IACI,MAAM;QACX,MAAM,uEAAuE,CAAC;IAChF,CAAC;CACF;AA1GD,gCA0GC"}
@@ -19,12 +19,25 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
19
19
  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
20
20
  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
21
21
  };
22
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
23
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
24
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
25
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
26
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
27
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
28
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
29
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
30
+ function fulfill(value) { resume("next", value); }
31
+ function reject(value) { resume("throw", value); }
32
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
33
+ };
22
34
  Object.defineProperty(exports, "__esModule", { value: true });
23
35
  exports.UploadManager = void 0;
24
36
  const index_1 = require("../../index");
25
37
  const oci_common_1 = require("oci-common");
26
38
  const await_semaphore_1 = require("await-semaphore");
27
39
  const blob_factory_1 = require("./blob-factory");
40
+ const node_fs_blob_1 = require("./node-fs-blob");
28
41
  class UploadManager {
29
42
  constructor(client, options) {
30
43
  this.client = client;
@@ -119,13 +132,24 @@ class UploadManager {
119
132
  return __awaiter(this, void 0, void 0, function* () {
120
133
  try {
121
134
  return yield semaphore.use(() => __awaiter(this, void 0, void 0, function* () {
122
- const contentDetails = {
123
- uploadPartBody: content.data,
124
- contentLength: content.size
125
- };
126
- const contentMD5Hash = this.options.enforceMD5
127
- ? { contentMD5: content.md5Hash }
128
- : {};
135
+ let contentDetails = {};
136
+ let contentMD5Hash = {};
137
+ if (content instanceof node_fs_blob_1.NodeFSBlob) {
138
+ contentDetails = {
139
+ uploadPartBody: yield content.getData(),
140
+ contentLength: content.size
141
+ };
142
+ contentMD5Hash = this.options.enforceMD5
143
+ ? { contentMD5: yield content.getMD5Hash() }
144
+ : {};
145
+ }
146
+ else if ("data" in content) {
147
+ contentDetails = {
148
+ uploadPartBody: content.data,
149
+ contentLength: content.size
150
+ };
151
+ contentMD5Hash = this.options.enforceMD5 ? { contentMD5: content.md5Hash } : {};
152
+ }
129
153
  const uploadPartDetails = {
130
154
  uploadId: uploadId,
131
155
  uploadPartNum: uploadPartNum
@@ -165,8 +189,14 @@ class UploadManager {
165
189
  let uploadPartNum = 1;
166
190
  const semaphore = new await_semaphore_1.Semaphore(this.options.maxConcurrentUploads);
167
191
  const partUploadPromises = [];
168
- let body = yield content.getData();
169
- const dataFeeder = oci_common_1.getChunk(body, this.options.partSize);
192
+ let dataFeeder;
193
+ if (this.options.disableBufferingForFiles && content instanceof node_fs_blob_1.NodeFSBlob) {
194
+ dataFeeder = getFileChunk(content, this.options.partSize);
195
+ }
196
+ else {
197
+ let body = yield content.getData();
198
+ dataFeeder = oci_common_1.getChunk(body, this.options.partSize);
199
+ }
170
200
  try {
171
201
  for (var dataFeeder_1 = __asyncValues(dataFeeder), dataFeeder_1_1; dataFeeder_1_1 = yield dataFeeder_1.next(), !dataFeeder_1_1.done;) {
172
202
  const dataPart = dataFeeder_1_1.value;
@@ -250,6 +280,18 @@ UploadManager.defaultUploadOptions = {
250
280
  maxConcurrentUploads: 5,
251
281
  allowedMemoryUsage: 5 * 20 * 1024 * 1024,
252
282
  enforceMD5: false,
253
- isDisableAutoAbort: false
283
+ isDisableAutoAbort: false,
284
+ disableBufferingForFiles: true
254
285
  };
286
+ function getFileChunk(content, partSize) {
287
+ return FileChunk(content, partSize);
288
+ }
289
+ function FileChunk(content, partSize) {
290
+ return __asyncGenerator(this, arguments, function* FileChunk_1() {
291
+ let totalSize = content.size;
292
+ for (let currentChunkStart = 0; currentChunkStart < totalSize; currentChunkStart += partSize) {
293
+ yield yield __await(content.slice(currentChunkStart, currentChunkStart + partSize));
294
+ }
295
+ });
296
+ }
255
297
  //# sourceMappingURL=upload-manager.js.map