@azure/storage-blob 12.30.0 → 12.31.0-alpha.20260203.6

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 (125) hide show
  1. package/dist/browser/BlobBatchClient.d.ts.map +1 -1
  2. package/dist/browser/BlobBatchClient.js +2 -2
  3. package/dist/browser/BlobBatchClient.js.map +1 -1
  4. package/dist/browser/BlobQueryResponse-browser.d.mts.map +1 -1
  5. package/dist/browser/BlobQueryResponse-browser.mjs.map +1 -1
  6. package/dist/browser/BlobQueryResponse.common.d.ts +291 -0
  7. package/dist/browser/BlobQueryResponse.common.d.ts.map +1 -0
  8. package/dist/browser/BlobQueryResponse.common.js +363 -0
  9. package/dist/browser/BlobQueryResponse.common.js.map +1 -0
  10. package/dist/browser/BlobQueryResponse.d.ts +1 -290
  11. package/dist/browser/BlobQueryResponse.js +1 -360
  12. package/dist/browser/Clients.js +4 -4
  13. package/dist/browser/Clients.js.map +1 -1
  14. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.d.mts +3 -0
  15. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.d.mts.map +1 -0
  16. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.mjs +5 -0
  17. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.mjs.map +1 -0
  18. package/dist/browser/generatedModels.d.ts +63 -2
  19. package/dist/browser/generatedModels.d.ts.map +1 -1
  20. package/dist/browser/generatedModels.js.map +1 -1
  21. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +17 -0
  22. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +1 -0
  23. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +18 -0
  24. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +1 -0
  25. package/dist/browser/utils/constants.js +1 -1
  26. package/dist/browser/utils/constants.js.map +1 -1
  27. package/dist/commonjs/BlobBatchClient.d.ts.map +1 -1
  28. package/dist/commonjs/BlobBatchClient.js +2 -2
  29. package/dist/commonjs/BlobBatchClient.js.map +1 -1
  30. package/dist/commonjs/BlobDownloadResponse.d.ts +2 -1
  31. package/dist/commonjs/BlobDownloadResponse.d.ts.map +1 -1
  32. package/dist/commonjs/BlobDownloadResponse.js.map +1 -1
  33. package/dist/commonjs/BlobQueryResponse.common.d.ts +291 -0
  34. package/dist/commonjs/BlobQueryResponse.common.d.ts.map +1 -0
  35. package/dist/commonjs/BlobQueryResponse.common.js +367 -0
  36. package/dist/commonjs/BlobQueryResponse.common.js.map +1 -0
  37. package/dist/commonjs/BlobQueryResponse.d.ts +2 -1
  38. package/dist/commonjs/BlobQueryResponse.d.ts.map +1 -1
  39. package/dist/commonjs/BlobQueryResponse.js.map +1 -1
  40. package/dist/commonjs/Clients.js +4 -4
  41. package/dist/commonjs/Clients.js.map +1 -1
  42. package/dist/commonjs/generatedModels.d.ts +63 -2
  43. package/dist/commonjs/generatedModels.d.ts.map +1 -1
  44. package/dist/commonjs/generatedModels.js.map +1 -1
  45. package/dist/commonjs/index.d.ts +1 -0
  46. package/dist/commonjs/index.d.ts.map +1 -1
  47. package/dist/commonjs/index.js.map +1 -1
  48. package/dist/commonjs/tsdoc-metadata.json +1 -1
  49. package/dist/commonjs/utils/constants.js +1 -1
  50. package/dist/commonjs/utils/constants.js.map +1 -1
  51. package/dist/esm/BlobBatchClient.d.ts.map +1 -1
  52. package/dist/esm/BlobBatchClient.js +2 -2
  53. package/dist/esm/BlobBatchClient.js.map +1 -1
  54. package/dist/esm/BlobDownloadResponse.d.ts +2 -1
  55. package/dist/esm/BlobDownloadResponse.d.ts.map +1 -1
  56. package/dist/esm/BlobDownloadResponse.js.map +1 -1
  57. package/dist/esm/BlobQueryResponse.common.d.ts +291 -0
  58. package/dist/esm/BlobQueryResponse.common.d.ts.map +1 -0
  59. package/dist/esm/BlobQueryResponse.common.js +363 -0
  60. package/dist/esm/BlobQueryResponse.common.js.map +1 -0
  61. package/dist/esm/BlobQueryResponse.d.ts +2 -1
  62. package/dist/esm/BlobQueryResponse.d.ts.map +1 -1
  63. package/dist/esm/BlobQueryResponse.js.map +1 -1
  64. package/dist/esm/Clients.js +4 -4
  65. package/dist/esm/Clients.js.map +1 -1
  66. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.d.mts +3 -0
  67. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.d.mts.map +1 -0
  68. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.mjs +5 -0
  69. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.mjs.map +1 -0
  70. package/dist/esm/generatedModels.d.ts +63 -2
  71. package/dist/esm/generatedModels.d.ts.map +1 -1
  72. package/dist/esm/generatedModels.js.map +1 -1
  73. package/dist/esm/index.d.ts +1 -0
  74. package/dist/esm/index.d.ts.map +1 -1
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +17 -0
  77. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +1 -0
  78. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +18 -0
  79. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +1 -0
  80. package/dist/esm/utils/constants.js +1 -1
  81. package/dist/esm/utils/constants.js.map +1 -1
  82. package/dist/react-native/BlobBatchClient.d.ts.map +1 -1
  83. package/dist/react-native/BlobBatchClient.js +2 -2
  84. package/dist/react-native/BlobBatchClient.js.map +1 -1
  85. package/dist/react-native/BlobDownloadResponse-react-native.d.mts.map +1 -0
  86. package/dist/react-native/BlobDownloadResponse-react-native.mjs.map +1 -0
  87. package/dist/react-native/BlobDownloadResponse.d.ts +2 -369
  88. package/dist/react-native/BlobDownloadResponse.js +5 -463
  89. package/dist/react-native/BlobQueryResponse-react-native.d.mts.map +1 -0
  90. package/dist/react-native/BlobQueryResponse-react-native.mjs.map +1 -0
  91. package/dist/react-native/BlobQueryResponse.common.d.ts +291 -0
  92. package/dist/react-native/BlobQueryResponse.common.d.ts.map +1 -0
  93. package/dist/react-native/BlobQueryResponse.common.js +363 -0
  94. package/dist/react-native/BlobQueryResponse.common.js.map +1 -0
  95. package/dist/react-native/BlobQueryResponse.d.ts +2 -294
  96. package/dist/react-native/BlobQueryResponse.js +2 -367
  97. package/dist/react-native/Clients.js +4 -4
  98. package/dist/react-native/Clients.js.map +1 -1
  99. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts +3 -0
  100. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts.map +1 -0
  101. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs +5 -0
  102. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs.map +1 -0
  103. package/dist/react-native/generatedModels.d.ts +63 -2
  104. package/dist/react-native/generatedModels.d.ts.map +1 -1
  105. package/dist/react-native/generatedModels.js.map +1 -1
  106. package/dist/react-native/index.d.ts +1 -0
  107. package/dist/react-native/index.d.ts.map +1 -1
  108. package/dist/react-native/index.js.map +1 -1
  109. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +17 -0
  110. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +1 -0
  111. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +18 -0
  112. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +1 -0
  113. package/dist/react-native/utils/constants.js +1 -1
  114. package/dist/react-native/utils/constants.js.map +1 -1
  115. package/dist/react-native/utils/utils-react-native.d.mts.map +1 -0
  116. package/dist/react-native/utils/utils-react-native.mjs.map +1 -0
  117. package/dist/react-native/utils/utils.d.ts +6 -46
  118. package/dist/react-native/utils/utils.js +13 -127
  119. package/package.json +15 -15
  120. package/dist/react-native/BlobDownloadResponse.d.ts.map +0 -1
  121. package/dist/react-native/BlobDownloadResponse.js.map +0 -1
  122. package/dist/react-native/BlobQueryResponse.d.ts.map +0 -1
  123. package/dist/react-native/BlobQueryResponse.js.map +0 -1
  124. package/dist/react-native/utils/utils.d.ts.map +0 -1
  125. package/dist/react-native/utils/utils.js.map +0 -1
@@ -1,363 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- /**
4
- * ONLY AVAILABLE IN BROWSER RUNTIME.
5
- *
6
- * BlobQueryResponse implements BlobDownloadResponseModel interface, and in browser runtime it will
7
- * parse avro data returned by blob query.
8
- */
9
- export class BlobQueryResponse {
10
- /**
11
- * Indicates that the service supports
12
- * requests for partial file content.
13
- *
14
- * @readonly
15
- */
16
- get acceptRanges() {
17
- return this.originalResponse.acceptRanges;
18
- }
19
- /**
20
- * Returns if it was previously specified
21
- * for the file.
22
- *
23
- * @readonly
24
- */
25
- get cacheControl() {
26
- return this.originalResponse.cacheControl;
27
- }
28
- /**
29
- * Returns the value that was specified
30
- * for the 'x-ms-content-disposition' header and specifies how to process the
31
- * response.
32
- *
33
- * @readonly
34
- */
35
- get contentDisposition() {
36
- return this.originalResponse.contentDisposition;
37
- }
38
- /**
39
- * Returns the value that was specified
40
- * for the Content-Encoding request header.
41
- *
42
- * @readonly
43
- */
44
- get contentEncoding() {
45
- return this.originalResponse.contentEncoding;
46
- }
47
- /**
48
- * Returns the value that was specified
49
- * for the Content-Language request header.
50
- *
51
- * @readonly
52
- */
53
- get contentLanguage() {
54
- return this.originalResponse.contentLanguage;
55
- }
56
- /**
57
- * The current sequence number for a
58
- * page blob. This header is not returned for block blobs or append blobs.
59
- *
60
- * @readonly
61
- */
62
- get blobSequenceNumber() {
63
- return this.originalResponse.blobSequenceNumber;
64
- }
65
- /**
66
- * The blob's type. Possible values include:
67
- * 'BlockBlob', 'PageBlob', 'AppendBlob'.
68
- *
69
- * @readonly
70
- */
71
- get blobType() {
72
- return this.originalResponse.blobType;
73
- }
74
- /**
75
- * The number of bytes present in the
76
- * response body.
77
- *
78
- * @readonly
79
- */
80
- get contentLength() {
81
- return this.originalResponse.contentLength;
82
- }
83
- /**
84
- * If the file has an MD5 hash and the
85
- * request is to read the full file, this response header is returned so that
86
- * the client can check for message content integrity. If the request is to
87
- * read a specified range and the 'x-ms-range-get-content-md5' is set to
88
- * true, then the request returns an MD5 hash for the range, as long as the
89
- * range size is less than or equal to 4 MB. If neither of these sets of
90
- * conditions is true, then no value is returned for the 'Content-MD5'
91
- * header.
92
- *
93
- * @readonly
94
- */
95
- get contentMD5() {
96
- return this.originalResponse.contentMD5;
97
- }
98
- /**
99
- * Indicates the range of bytes returned if
100
- * the client requested a subset of the file by setting the Range request
101
- * header.
102
- *
103
- * @readonly
104
- */
105
- get contentRange() {
106
- return this.originalResponse.contentRange;
107
- }
108
- /**
109
- * The content type specified for the file.
110
- * The default content type is 'application/octet-stream'
111
- *
112
- * @readonly
113
- */
114
- get contentType() {
115
- return this.originalResponse.contentType;
116
- }
117
- /**
118
- * Conclusion time of the last attempted
119
- * Copy File operation where this file was the destination file. This value
120
- * can specify the time of a completed, aborted, or failed copy attempt.
121
- *
122
- * @readonly
123
- */
124
- get copyCompletedOn() {
125
- return undefined;
126
- }
127
- /**
128
- * String identifier for the last attempted Copy
129
- * File operation where this file was the destination file.
130
- *
131
- * @readonly
132
- */
133
- get copyId() {
134
- return this.originalResponse.copyId;
135
- }
136
- /**
137
- * Contains the number of bytes copied and
138
- * the total bytes in the source in the last attempted Copy File operation
139
- * where this file was the destination file. Can show between 0 and
140
- * Content-Length bytes copied.
141
- *
142
- * @readonly
143
- */
144
- get copyProgress() {
145
- return this.originalResponse.copyProgress;
146
- }
147
- /**
148
- * URL up to 2KB in length that specifies the
149
- * source file used in the last attempted Copy File operation where this file
150
- * was the destination file.
151
- *
152
- * @readonly
153
- */
154
- get copySource() {
155
- return this.originalResponse.copySource;
156
- }
157
- /**
158
- * State of the copy operation
159
- * identified by 'x-ms-copy-id'. Possible values include: 'pending',
160
- * 'success', 'aborted', 'failed'
161
- *
162
- * @readonly
163
- */
164
- get copyStatus() {
165
- return this.originalResponse.copyStatus;
166
- }
167
- /**
168
- * Only appears when
169
- * x-ms-copy-status is failed or pending. Describes cause of fatal or
170
- * non-fatal copy operation failure.
171
- *
172
- * @readonly
173
- */
174
- get copyStatusDescription() {
175
- return this.originalResponse.copyStatusDescription;
176
- }
177
- /**
178
- * When a blob is leased,
179
- * specifies whether the lease is of infinite or fixed duration. Possible
180
- * values include: 'infinite', 'fixed'.
181
- *
182
- * @readonly
183
- */
184
- get leaseDuration() {
185
- return this.originalResponse.leaseDuration;
186
- }
187
- /**
188
- * Lease state of the blob. Possible
189
- * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.
190
- *
191
- * @readonly
192
- */
193
- get leaseState() {
194
- return this.originalResponse.leaseState;
195
- }
196
- /**
197
- * The current lease status of the
198
- * blob. Possible values include: 'locked', 'unlocked'.
199
- *
200
- * @readonly
201
- */
202
- get leaseStatus() {
203
- return this.originalResponse.leaseStatus;
204
- }
205
- /**
206
- * A UTC date/time value generated by the service that
207
- * indicates the time at which the response was initiated.
208
- *
209
- * @readonly
210
- */
211
- get date() {
212
- return this.originalResponse.date;
213
- }
214
- /**
215
- * The number of committed blocks
216
- * present in the blob. This header is returned only for append blobs.
217
- *
218
- * @readonly
219
- */
220
- get blobCommittedBlockCount() {
221
- return this.originalResponse.blobCommittedBlockCount;
222
- }
223
- /**
224
- * The ETag contains a value that you can use to
225
- * perform operations conditionally, in quotes.
226
- *
227
- * @readonly
228
- */
229
- get etag() {
230
- return this.originalResponse.etag;
231
- }
232
- /**
233
- * The error code.
234
- *
235
- * @readonly
236
- */
237
- get errorCode() {
238
- return this.originalResponse.errorCode;
239
- }
240
- /**
241
- * The value of this header is set to
242
- * true if the file data and application metadata are completely encrypted
243
- * using the specified algorithm. Otherwise, the value is set to false (when
244
- * the file is unencrypted, or if only parts of the file/application metadata
245
- * are encrypted).
246
- *
247
- * @readonly
248
- */
249
- get isServerEncrypted() {
250
- return this.originalResponse.isServerEncrypted;
251
- }
252
- /**
253
- * If the blob has a MD5 hash, and if
254
- * request contains range header (Range or x-ms-range), this response header
255
- * is returned with the value of the whole blob's MD5 value. This value may
256
- * or may not be equal to the value returned in Content-MD5 header, with the
257
- * latter calculated from the requested range.
258
- *
259
- * @readonly
260
- */
261
- get blobContentMD5() {
262
- return this.originalResponse.blobContentMD5;
263
- }
264
- /**
265
- * Returns the date and time the file was last
266
- * modified. Any operation that modifies the file or its properties updates
267
- * the last modified time.
268
- *
269
- * @readonly
270
- */
271
- get lastModified() {
272
- return this.originalResponse.lastModified;
273
- }
274
- /**
275
- * A name-value pair
276
- * to associate with a file storage object.
277
- *
278
- * @readonly
279
- */
280
- get metadata() {
281
- return this.originalResponse.metadata;
282
- }
283
- /**
284
- * This header uniquely identifies the request
285
- * that was made and can be used for troubleshooting the request.
286
- *
287
- * @readonly
288
- */
289
- get requestId() {
290
- return this.originalResponse.requestId;
291
- }
292
- /**
293
- * If a client request id header is sent in the request, this header will be present in the
294
- * response with the same value.
295
- *
296
- * @readonly
297
- */
298
- get clientRequestId() {
299
- return this.originalResponse.clientRequestId;
300
- }
301
- /**
302
- * Indicates the version of the File service used
303
- * to execute the request.
304
- *
305
- * @readonly
306
- */
307
- get version() {
308
- return this.originalResponse.version;
309
- }
310
- /**
311
- * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned
312
- * when the blob was encrypted with a customer-provided key.
313
- *
314
- * @readonly
315
- */
316
- get encryptionKeySha256() {
317
- return this.originalResponse.encryptionKeySha256;
318
- }
319
- /**
320
- * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
321
- * true, then the request returns a crc64 for the range, as long as the range size is less than
322
- * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is
323
- * specified in the same request, it will fail with 400(Bad Request)
324
- */
325
- get contentCrc64() {
326
- return this.originalResponse.contentCrc64;
327
- }
328
- /**
329
- * The response body as a browser Blob.
330
- * Always undefined in node.js.
331
- *
332
- * @readonly
333
- */
334
- get blobBody() {
335
- throw Error(`Quick query in browser is not supported yet.`);
336
- }
337
- /**
338
- * The response body as a node.js Readable stream.
339
- * Always undefined in the browser.
340
- *
341
- * @readonly
342
- */
343
- get readableStreamBody() {
344
- return undefined;
345
- }
346
- /**
347
- * The HTTP response.
348
- */
349
- get _response() {
350
- return this.originalResponse._response;
351
- }
352
- originalResponse;
353
- /**
354
- * Creates an instance of BlobQueryResponse.
355
- *
356
- * @param originalResponse -
357
- * @param options -
358
- */
359
- constructor(originalResponse, _options = {}) {
360
- this.originalResponse = originalResponse;
361
- }
362
- }
3
+ export { BlobQueryResponse } from "./BlobQueryResponse.common.js";
363
4
  //# sourceMappingURL=BlobQueryResponse-browser.mjs.map
@@ -245,7 +245,7 @@ export class BlobClient extends StorageClient {
245
245
  options.conditions = options.conditions || {};
246
246
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
247
247
  return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => {
248
- const res = assertResponse(await this.blobContext.download({
248
+ const res = assertResponse((await this.blobContext.download({
249
249
  abortSignal: options.abortSignal,
250
250
  leaseAccessConditions: options.conditions,
251
251
  modifiedAccessConditions: {
@@ -261,7 +261,7 @@ export class BlobClient extends StorageClient {
261
261
  snapshot: options.snapshot,
262
262
  cpkInfo: options.customerProvidedKey,
263
263
  tracingOptions: updatedOptions.tracingOptions,
264
- }));
264
+ })));
265
265
  const wrappedRes = {
266
266
  ...res,
267
267
  _response: res._response, // _response is made non-enumerable
@@ -1583,7 +1583,7 @@ export class BlockBlobClient extends BlobClient {
1583
1583
  throw new Error("This operation currently is only supported in Node.js.");
1584
1584
  }
1585
1585
  return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => {
1586
- const response = assertResponse(await this._blobContext.query({
1586
+ const response = assertResponse((await this._blobContext.query({
1587
1587
  abortSignal: options.abortSignal,
1588
1588
  queryRequest: {
1589
1589
  queryType: "SQL",
@@ -1598,7 +1598,7 @@ export class BlockBlobClient extends BlobClient {
1598
1598
  },
1599
1599
  cpkInfo: options.customerProvidedKey,
1600
1600
  tracingOptions: updatedOptions.tracingOptions,
1601
- }));
1601
+ })));
1602
1602
  return new BlobQueryResponse(response, {
1603
1603
  abortSignal: options.abortSignal,
1604
1604
  onProgress: options.onProgress,