@azure/storage-queue 12.8.0-alpha.20220127.2 → 12.8.0-alpha.20220128.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/dist/index.js CHANGED
@@ -11,6 +11,27 @@ var coreTracing = require('@azure/core-tracing');
11
11
  var tslib = require('tslib');
12
12
  require('@azure/core-paging');
13
13
 
14
+ function _interopNamespace(e) {
15
+ if (e && e.__esModule) return e;
16
+ var n = Object.create(null);
17
+ if (e) {
18
+ Object.keys(e).forEach(function (k) {
19
+ if (k !== 'default') {
20
+ var d = Object.getOwnPropertyDescriptor(e, k);
21
+ Object.defineProperty(n, k, d.get ? d : {
22
+ enumerable: true,
23
+ get: function () { return e[k]; }
24
+ });
25
+ }
26
+ });
27
+ }
28
+ n["default"] = e;
29
+ return Object.freeze(n);
30
+ }
31
+
32
+ var coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);
33
+ var os__namespace = /*#__PURE__*/_interopNamespace(os);
34
+
14
35
  // Copyright (c) Microsoft Corporation.
15
36
  // Licensed under the MIT license.
16
37
  /**
@@ -400,7 +421,7 @@ const StorageQueueLoggingAllowedQueryParameters = [
400
421
  */
401
422
  const packageName = "azure-storage-queue";
402
423
  const packageVersion = "12.8.0-beta.2";
403
- class StorageClientContext extends coreHttp.ServiceClient {
424
+ class StorageClientContext extends coreHttp__namespace.ServiceClient {
404
425
  /**
405
426
  * Initializes a new instance of the StorageClientContext class.
406
427
  * @param url The URL of the service account, queue or message that is the target of the desired
@@ -416,7 +437,7 @@ class StorageClientContext extends coreHttp.ServiceClient {
416
437
  options = {};
417
438
  }
418
439
  if (!options.userAgent) {
419
- const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
440
+ const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();
420
441
  options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
421
442
  }
422
443
  super(undefined, options);
@@ -724,6 +745,10 @@ function appendToURLQuery(url, queryParts) {
724
745
  }
725
746
 
726
747
  // Copyright (c) Microsoft Corporation.
748
+ /**
749
+ * Protocols for generated SAS.
750
+ */
751
+ exports.SASProtocol = void 0;
727
752
  (function (SASProtocol) {
728
753
  /**
729
754
  * Protocol that allows HTTPS only
@@ -1225,6 +1250,10 @@ class StorageBrowserPolicyFactory {
1225
1250
  }
1226
1251
 
1227
1252
  // Copyright (c) Microsoft Corporation.
1253
+ /**
1254
+ * RetryPolicy types.
1255
+ */
1256
+ exports.StorageRetryPolicyType = void 0;
1228
1257
  (function (StorageRetryPolicyType) {
1229
1258
  /**
1230
1259
  * Exponential retry. Retry time delay grows exponentially.
@@ -1495,7 +1524,7 @@ class TelemetryPolicyFactory {
1495
1524
  userAgentInfo.push(libInfo);
1496
1525
  }
1497
1526
  // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
1498
- const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`;
1527
+ const runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;
1499
1528
  if (userAgentInfo.indexOf(runtimeInfo) === -1) {
1500
1529
  userAgentInfo.push(runtimeInfo);
1501
1530
  }
@@ -3704,7 +3733,7 @@ class Service {
3704
3733
  setProperties(properties, options) {
3705
3734
  const operationArguments = {
3706
3735
  properties,
3707
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3736
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3708
3737
  };
3709
3738
  return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
3710
3739
  }
@@ -3715,9 +3744,9 @@ class Service {
3715
3744
  */
3716
3745
  getProperties(options) {
3717
3746
  const operationArguments = {
3718
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3747
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3719
3748
  };
3720
- return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
3749
+ return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
3721
3750
  }
3722
3751
  /**
3723
3752
  * Retrieves statistics related to replication for the Queue service. It is only available on the
@@ -3727,7 +3756,7 @@ class Service {
3727
3756
  */
3728
3757
  getStatistics(options) {
3729
3758
  const operationArguments = {
3730
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3759
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3731
3760
  };
3732
3761
  return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
3733
3762
  }
@@ -3737,13 +3766,13 @@ class Service {
3737
3766
  */
3738
3767
  listQueuesSegment(options) {
3739
3768
  const operationArguments = {
3740
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3769
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3741
3770
  };
3742
3771
  return this.client.sendOperationRequest(operationArguments, listQueuesSegmentOperationSpec);
3743
3772
  }
3744
3773
  }
3745
3774
  // Operation Specifications
3746
- const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true);
3775
+ const xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
3747
3776
  const setPropertiesOperationSpec = {
3748
3777
  path: "/",
3749
3778
  httpMethod: "PUT",
@@ -3772,9 +3801,9 @@ const setPropertiesOperationSpec = {
3772
3801
  isXML: true,
3773
3802
  contentType: "application/xml; charset=utf-8",
3774
3803
  mediaType: "xml",
3775
- serializer: xmlSerializer
3804
+ serializer: xmlSerializer$3
3776
3805
  };
3777
- const getPropertiesOperationSpec = {
3806
+ const getPropertiesOperationSpec$1 = {
3778
3807
  path: "/",
3779
3808
  httpMethod: "GET",
3780
3809
  responses: {
@@ -3799,7 +3828,7 @@ const getPropertiesOperationSpec = {
3799
3828
  accept1
3800
3829
  ],
3801
3830
  isXML: true,
3802
- serializer: xmlSerializer
3831
+ serializer: xmlSerializer$3
3803
3832
  };
3804
3833
  const getStatisticsOperationSpec = {
3805
3834
  path: "/",
@@ -3826,7 +3855,7 @@ const getStatisticsOperationSpec = {
3826
3855
  accept1
3827
3856
  ],
3828
3857
  isXML: true,
3829
- serializer: xmlSerializer
3858
+ serializer: xmlSerializer$3
3830
3859
  };
3831
3860
  const listQueuesSegmentOperationSpec = {
3832
3861
  path: "/",
@@ -3856,7 +3885,7 @@ const listQueuesSegmentOperationSpec = {
3856
3885
  accept1
3857
3886
  ],
3858
3887
  isXML: true,
3859
- serializer: xmlSerializer
3888
+ serializer: xmlSerializer$3
3860
3889
  };
3861
3890
 
3862
3891
  /*
@@ -3881,7 +3910,7 @@ class Queue {
3881
3910
  */
3882
3911
  create(options) {
3883
3912
  const operationArguments = {
3884
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3913
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3885
3914
  };
3886
3915
  return this.client.sendOperationRequest(operationArguments, createOperationSpec);
3887
3916
  }
@@ -3891,9 +3920,9 @@ class Queue {
3891
3920
  */
3892
3921
  delete(options) {
3893
3922
  const operationArguments = {
3894
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3923
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3895
3924
  };
3896
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
3925
+ return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
3897
3926
  }
3898
3927
  /**
3899
3928
  * Retrieves user-defined metadata and queue properties on the specified queue. Metadata is associated
@@ -3902,9 +3931,9 @@ class Queue {
3902
3931
  */
3903
3932
  getProperties(options) {
3904
3933
  const operationArguments = {
3905
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3934
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3906
3935
  };
3907
- return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
3936
+ return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
3908
3937
  }
3909
3938
  /**
3910
3939
  * sets user-defined metadata on the specified queue. Metadata is associated with the queue as
@@ -3913,7 +3942,7 @@ class Queue {
3913
3942
  */
3914
3943
  setMetadata(options) {
3915
3944
  const operationArguments = {
3916
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3945
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3917
3946
  };
3918
3947
  return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
3919
3948
  }
@@ -3924,7 +3953,7 @@ class Queue {
3924
3953
  */
3925
3954
  getAccessPolicy(options) {
3926
3955
  const operationArguments = {
3927
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3956
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3928
3957
  };
3929
3958
  return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
3930
3959
  }
@@ -3934,13 +3963,13 @@ class Queue {
3934
3963
  */
3935
3964
  setAccessPolicy(options) {
3936
3965
  const operationArguments = {
3937
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
3966
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
3938
3967
  };
3939
3968
  return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
3940
3969
  }
3941
3970
  }
3942
3971
  // Operation Specifications
3943
- const xmlSerializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ true);
3972
+ const xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
3944
3973
  const createOperationSpec = {
3945
3974
  path: "/{queueName}",
3946
3975
  httpMethod: "PUT",
@@ -3965,9 +3994,9 @@ const createOperationSpec = {
3965
3994
  metadata
3966
3995
  ],
3967
3996
  isXML: true,
3968
- serializer: xmlSerializer$1
3997
+ serializer: xmlSerializer$2
3969
3998
  };
3970
- const deleteOperationSpec = {
3999
+ const deleteOperationSpec$1 = {
3971
4000
  path: "/{queueName}",
3972
4001
  httpMethod: "DELETE",
3973
4002
  responses: {
@@ -3987,9 +4016,9 @@ const deleteOperationSpec = {
3987
4016
  accept1
3988
4017
  ],
3989
4018
  isXML: true,
3990
- serializer: xmlSerializer$1
4019
+ serializer: xmlSerializer$2
3991
4020
  };
3992
- const getPropertiesOperationSpec$1 = {
4021
+ const getPropertiesOperationSpec = {
3993
4022
  path: "/{queueName}",
3994
4023
  httpMethod: "GET",
3995
4024
  responses: {
@@ -4009,7 +4038,7 @@ const getPropertiesOperationSpec$1 = {
4009
4038
  accept1
4010
4039
  ],
4011
4040
  isXML: true,
4012
- serializer: xmlSerializer$1
4041
+ serializer: xmlSerializer$2
4013
4042
  };
4014
4043
  const setMetadataOperationSpec = {
4015
4044
  path: "/{queueName}",
@@ -4032,7 +4061,7 @@ const setMetadataOperationSpec = {
4032
4061
  metadata
4033
4062
  ],
4034
4063
  isXML: true,
4035
- serializer: xmlSerializer$1
4064
+ serializer: xmlSerializer$2
4036
4065
  };
4037
4066
  const getAccessPolicyOperationSpec = {
4038
4067
  path: "/{queueName}",
@@ -4066,7 +4095,7 @@ const getAccessPolicyOperationSpec = {
4066
4095
  accept1
4067
4096
  ],
4068
4097
  isXML: true,
4069
- serializer: xmlSerializer$1
4098
+ serializer: xmlSerializer$2
4070
4099
  };
4071
4100
  const setAccessPolicyOperationSpec = {
4072
4101
  path: "/{queueName}",
@@ -4092,7 +4121,7 @@ const setAccessPolicyOperationSpec = {
4092
4121
  isXML: true,
4093
4122
  contentType: "application/xml; charset=utf-8",
4094
4123
  mediaType: "xml",
4095
- serializer: xmlSerializer$1
4124
+ serializer: xmlSerializer$2
4096
4125
  };
4097
4126
 
4098
4127
  /*
@@ -4117,7 +4146,7 @@ class Messages {
4117
4146
  */
4118
4147
  dequeue(options) {
4119
4148
  const operationArguments = {
4120
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
4149
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
4121
4150
  };
4122
4151
  return this.client.sendOperationRequest(operationArguments, dequeueOperationSpec);
4123
4152
  }
@@ -4127,7 +4156,7 @@ class Messages {
4127
4156
  */
4128
4157
  clear(options) {
4129
4158
  const operationArguments = {
4130
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
4159
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
4131
4160
  };
4132
4161
  return this.client.sendOperationRequest(operationArguments, clearOperationSpec);
4133
4162
  }
@@ -4142,7 +4171,7 @@ class Messages {
4142
4171
  enqueue(queueMessage, options) {
4143
4172
  const operationArguments = {
4144
4173
  queueMessage,
4145
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
4174
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
4146
4175
  };
4147
4176
  return this.client.sendOperationRequest(operationArguments, enqueueOperationSpec);
4148
4177
  }
@@ -4153,13 +4182,13 @@ class Messages {
4153
4182
  */
4154
4183
  peek(options) {
4155
4184
  const operationArguments = {
4156
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
4185
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
4157
4186
  };
4158
4187
  return this.client.sendOperationRequest(operationArguments, peekOperationSpec);
4159
4188
  }
4160
4189
  }
4161
4190
  // Operation Specifications
4162
- const xmlSerializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ true);
4191
+ const xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
4163
4192
  const dequeueOperationSpec = {
4164
4193
  path: "/{queueName}/messages",
4165
4194
  httpMethod: "GET",
@@ -4196,7 +4225,7 @@ const dequeueOperationSpec = {
4196
4225
  accept1
4197
4226
  ],
4198
4227
  isXML: true,
4199
- serializer: xmlSerializer$2
4228
+ serializer: xmlSerializer$1
4200
4229
  };
4201
4230
  const clearOperationSpec = {
4202
4231
  path: "/{queueName}/messages",
@@ -4218,7 +4247,7 @@ const clearOperationSpec = {
4218
4247
  accept1
4219
4248
  ],
4220
4249
  isXML: true,
4221
- serializer: xmlSerializer$2
4250
+ serializer: xmlSerializer$1
4222
4251
  };
4223
4252
  const enqueueOperationSpec = {
4224
4253
  path: "/{queueName}/messages",
@@ -4258,7 +4287,7 @@ const enqueueOperationSpec = {
4258
4287
  isXML: true,
4259
4288
  contentType: "application/xml; charset=utf-8",
4260
4289
  mediaType: "xml",
4261
- serializer: xmlSerializer$2
4290
+ serializer: xmlSerializer$1
4262
4291
  };
4263
4292
  const peekOperationSpec = {
4264
4293
  path: "/{queueName}/messages",
@@ -4296,7 +4325,7 @@ const peekOperationSpec = {
4296
4325
  accept1
4297
4326
  ],
4298
4327
  isXML: true,
4299
- serializer: xmlSerializer$2
4328
+ serializer: xmlSerializer$1
4300
4329
  };
4301
4330
 
4302
4331
  /*
@@ -4333,7 +4362,7 @@ class MessageId {
4333
4362
  const operationArguments = {
4334
4363
  popReceipt,
4335
4364
  visibilityTimeout,
4336
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
4365
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
4337
4366
  };
4338
4367
  return this.client.sendOperationRequest(operationArguments, updateOperationSpec);
4339
4368
  }
@@ -4346,13 +4375,13 @@ class MessageId {
4346
4375
  delete(popReceipt, options) {
4347
4376
  const operationArguments = {
4348
4377
  popReceipt,
4349
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
4378
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
4350
4379
  };
4351
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
4380
+ return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
4352
4381
  }
4353
4382
  }
4354
4383
  // Operation Specifications
4355
- const xmlSerializer$3 = new coreHttp.Serializer(Mappers, /* isXml */ true);
4384
+ const xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
4356
4385
  const updateOperationSpec = {
4357
4386
  path: "/{queueName}/messages/{messageid}",
4358
4387
  httpMethod: "PUT",
@@ -4381,9 +4410,9 @@ const updateOperationSpec = {
4381
4410
  isXML: true,
4382
4411
  contentType: "application/xml; charset=utf-8",
4383
4412
  mediaType: "xml",
4384
- serializer: xmlSerializer$3
4413
+ serializer: xmlSerializer
4385
4414
  };
4386
- const deleteOperationSpec$1 = {
4415
+ const deleteOperationSpec = {
4387
4416
  path: "/{queueName}/messages/{messageid}",
4388
4417
  httpMethod: "DELETE",
4389
4418
  responses: {
@@ -4403,7 +4432,7 @@ const deleteOperationSpec$1 = {
4403
4432
  accept1
4404
4433
  ],
4405
4434
  isXML: true,
4406
- serializer: xmlSerializer$3
4435
+ serializer: xmlSerializer
4407
4436
  };
4408
4437
 
4409
4438
  // Copyright (c) Microsoft Corporation.
@@ -5750,39 +5779,27 @@ class QueueServiceClient extends StorageClient {
5750
5779
 
5751
5780
  Object.defineProperty(exports, 'BaseRequestPolicy', {
5752
5781
  enumerable: true,
5753
- get: function () {
5754
- return coreHttp.BaseRequestPolicy;
5755
- }
5782
+ get: function () { return coreHttp.BaseRequestPolicy; }
5756
5783
  });
5757
5784
  Object.defineProperty(exports, 'HttpHeaders', {
5758
5785
  enumerable: true,
5759
- get: function () {
5760
- return coreHttp.HttpHeaders;
5761
- }
5786
+ get: function () { return coreHttp.HttpHeaders; }
5762
5787
  });
5763
5788
  Object.defineProperty(exports, 'RequestPolicyOptions', {
5764
5789
  enumerable: true,
5765
- get: function () {
5766
- return coreHttp.RequestPolicyOptions;
5767
- }
5790
+ get: function () { return coreHttp.RequestPolicyOptions; }
5768
5791
  });
5769
5792
  Object.defineProperty(exports, 'RestError', {
5770
5793
  enumerable: true,
5771
- get: function () {
5772
- return coreHttp.RestError;
5773
- }
5794
+ get: function () { return coreHttp.RestError; }
5774
5795
  });
5775
5796
  Object.defineProperty(exports, 'WebResource', {
5776
5797
  enumerable: true,
5777
- get: function () {
5778
- return coreHttp.WebResource;
5779
- }
5798
+ get: function () { return coreHttp.WebResource; }
5780
5799
  });
5781
5800
  Object.defineProperty(exports, 'deserializationPolicy', {
5782
5801
  enumerable: true,
5783
- get: function () {
5784
- return coreHttp.deserializationPolicy;
5785
- }
5802
+ get: function () { return coreHttp.deserializationPolicy; }
5786
5803
  });
5787
5804
  exports.AccountSASPermissions = AccountSASPermissions;
5788
5805
  exports.AccountSASResourceTypes = AccountSASResourceTypes;