@azure/data-tables 13.2.2-alpha.20230321.1 → 13.2.2-alpha.20230425.1
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/dist/index.js +63 -25
- package/dist/index.js.map +1 -1
- package/dist-esm/src/TableClient.js +12 -5
- package/dist-esm/src/TableClient.js.map +1 -1
- package/dist-esm/src/TableServiceClient.js +12 -5
- package/dist-esm/src/TableServiceClient.js.map +1 -1
- package/dist-esm/src/sas/sasQueryParameters.js +35 -15
- package/dist-esm/src/sas/sasQueryParameters.js.map +1 -1
- package/dist-esm/src/sas/tableSasSignatureValues.js +4 -0
- package/dist-esm/src/sas/tableSasSignatureValues.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -228,6 +228,20 @@ function truncatedISO8061Date(date, withMilliseconds = true) {
|
|
|
228
228
|
* NOTE: Instances of this class are immutable.
|
|
229
229
|
*/
|
|
230
230
|
class SasQueryParameters {
|
|
231
|
+
/**
|
|
232
|
+
* Optional. IP range allowed for this SAS.
|
|
233
|
+
*
|
|
234
|
+
* @readonly
|
|
235
|
+
*/
|
|
236
|
+
get ipRange() {
|
|
237
|
+
if (this.ipRangeInner) {
|
|
238
|
+
return {
|
|
239
|
+
end: this.ipRangeInner.end,
|
|
240
|
+
start: this.ipRangeInner.start,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
231
245
|
/**
|
|
232
246
|
* Creates an instance of SASQueryParameters.
|
|
233
247
|
*
|
|
@@ -247,6 +261,10 @@ class SasQueryParameters {
|
|
|
247
261
|
this.ipRangeInner = options.ipRange;
|
|
248
262
|
this.identifier = options.identifier;
|
|
249
263
|
this.tableName = options.tableName;
|
|
264
|
+
this.endPartitionKey = options.endPartitionKey;
|
|
265
|
+
this.endRowKey = options.endRowKey;
|
|
266
|
+
this.startPartitionKey = options.startPartitionKey;
|
|
267
|
+
this.startRowKey = options.startRowKey;
|
|
250
268
|
if (options.userDelegationKey) {
|
|
251
269
|
this.signedOid = options.userDelegationKey.signedObjectId;
|
|
252
270
|
this.signedTenantId = options.userDelegationKey.signedTenantId;
|
|
@@ -258,20 +276,6 @@ class SasQueryParameters {
|
|
|
258
276
|
this.correlationId = options.correlationId;
|
|
259
277
|
}
|
|
260
278
|
}
|
|
261
|
-
/**
|
|
262
|
-
* Optional. IP range allowed for this SAS.
|
|
263
|
-
*
|
|
264
|
-
* @readonly
|
|
265
|
-
*/
|
|
266
|
-
get ipRange() {
|
|
267
|
-
if (this.ipRangeInner) {
|
|
268
|
-
return {
|
|
269
|
-
end: this.ipRangeInner.end,
|
|
270
|
-
start: this.ipRangeInner.start,
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
return undefined;
|
|
274
|
-
}
|
|
275
279
|
/**
|
|
276
280
|
* Encodes all SAS query parameters into a string that can be appended to a URL.
|
|
277
281
|
*
|
|
@@ -302,7 +306,11 @@ class SasQueryParameters {
|
|
|
302
306
|
"rsct",
|
|
303
307
|
"saoid",
|
|
304
308
|
"scid",
|
|
305
|
-
"tn",
|
|
309
|
+
"tn",
|
|
310
|
+
"srk",
|
|
311
|
+
"spk",
|
|
312
|
+
"epk",
|
|
313
|
+
"erk", // EndRowKey
|
|
306
314
|
];
|
|
307
315
|
const queries = [];
|
|
308
316
|
for (const param of params) {
|
|
@@ -364,6 +372,18 @@ class SasQueryParameters {
|
|
|
364
372
|
case "tn":
|
|
365
373
|
this.tryAppendQueryParameter(queries, param, this.tableName);
|
|
366
374
|
break;
|
|
375
|
+
case "spk":
|
|
376
|
+
this.tryAppendQueryParameter(queries, param, this.startPartitionKey);
|
|
377
|
+
break;
|
|
378
|
+
case "srk":
|
|
379
|
+
this.tryAppendQueryParameter(queries, param, this.startRowKey);
|
|
380
|
+
break;
|
|
381
|
+
case "epk":
|
|
382
|
+
this.tryAppendQueryParameter(queries, param, this.endPartitionKey);
|
|
383
|
+
break;
|
|
384
|
+
case "erk":
|
|
385
|
+
this.tryAppendQueryParameter(queries, param, this.endRowKey);
|
|
386
|
+
break;
|
|
367
387
|
}
|
|
368
388
|
}
|
|
369
389
|
return queries.join("&");
|
|
@@ -721,6 +741,10 @@ function generateTableSasQueryParameters(tableName, credential, tableSasSignatur
|
|
|
721
741
|
ipRange: tableSasSignatureValues.ipRange,
|
|
722
742
|
identifier: tableSasSignatureValues.identifier,
|
|
723
743
|
tableName,
|
|
744
|
+
startPartitionKey: tableSasSignatureValues.startPartitionKey,
|
|
745
|
+
startRowKey: tableSasSignatureValues.startRowKey,
|
|
746
|
+
endPartitionKey: tableSasSignatureValues.endPartitionKey,
|
|
747
|
+
endRowKey: tableSasSignatureValues.endRowKey,
|
|
724
748
|
});
|
|
725
749
|
}
|
|
726
750
|
function getCanonicalName(accountName, tableName) {
|
|
@@ -3632,22 +3656,29 @@ class TableServiceClient {
|
|
|
3632
3656
|
}
|
|
3633
3657
|
listTablesAll(options) {
|
|
3634
3658
|
return tslib.__asyncGenerator(this, arguments, function* listTablesAll_1() {
|
|
3635
|
-
var e_1,
|
|
3659
|
+
var _a, e_1, _b, _c;
|
|
3636
3660
|
const firstPage = yield tslib.__await(this._listTables(options));
|
|
3637
3661
|
const { continuationToken } = firstPage;
|
|
3638
3662
|
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstPage)));
|
|
3639
3663
|
if (continuationToken) {
|
|
3640
3664
|
const optionsWithContinuation = Object.assign(Object.assign({}, options), { continuationToken });
|
|
3641
3665
|
try {
|
|
3642
|
-
for (var
|
|
3643
|
-
|
|
3644
|
-
|
|
3666
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listTablesPage(optionsWithContinuation)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
3667
|
+
_c = _f.value;
|
|
3668
|
+
_d = false;
|
|
3669
|
+
try {
|
|
3670
|
+
const page = _c;
|
|
3671
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
3672
|
+
}
|
|
3673
|
+
finally {
|
|
3674
|
+
_d = true;
|
|
3675
|
+
}
|
|
3645
3676
|
}
|
|
3646
3677
|
}
|
|
3647
3678
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3648
3679
|
finally {
|
|
3649
3680
|
try {
|
|
3650
|
-
if (
|
|
3681
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
3651
3682
|
}
|
|
3652
3683
|
finally { if (e_1) throw e_1.error; }
|
|
3653
3684
|
}
|
|
@@ -4628,21 +4659,28 @@ class TableClient {
|
|
|
4628
4659
|
}
|
|
4629
4660
|
listEntitiesAll(tableName, options) {
|
|
4630
4661
|
return tslib.__asyncGenerator(this, arguments, function* listEntitiesAll_1() {
|
|
4631
|
-
var e_1,
|
|
4662
|
+
var _a, e_1, _b, _c;
|
|
4632
4663
|
const firstPage = yield tslib.__await(this._listEntities(tableName, options));
|
|
4633
4664
|
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstPage)));
|
|
4634
4665
|
if (firstPage.continuationToken) {
|
|
4635
4666
|
const optionsWithContinuation = Object.assign(Object.assign({}, options), { continuationToken: firstPage.continuationToken });
|
|
4636
4667
|
try {
|
|
4637
|
-
for (var
|
|
4638
|
-
|
|
4639
|
-
|
|
4668
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listEntitiesPage(tableName, optionsWithContinuation)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
4669
|
+
_c = _f.value;
|
|
4670
|
+
_d = false;
|
|
4671
|
+
try {
|
|
4672
|
+
const page = _c;
|
|
4673
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
4674
|
+
}
|
|
4675
|
+
finally {
|
|
4676
|
+
_d = true;
|
|
4677
|
+
}
|
|
4640
4678
|
}
|
|
4641
4679
|
}
|
|
4642
4680
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4643
4681
|
finally {
|
|
4644
4682
|
try {
|
|
4645
|
-
if (
|
|
4683
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
4646
4684
|
}
|
|
4647
4685
|
finally { if (e_1) throw e_1.error; }
|
|
4648
4686
|
}
|