@azure/arm-servicebus 6.2.0-alpha.20250718.1 → 6.2.0-alpha.20250730.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.
Files changed (114) hide show
  1. package/dist/browser/lroImpl.js +11 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +288 -137
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/disasterRecoveryConfigs.js +45 -79
  6. package/dist/browser/operations/disasterRecoveryConfigs.js.map +1 -1
  7. package/dist/browser/operations/migrationConfigs.js +34 -46
  8. package/dist/browser/operations/migrationConfigs.js.map +1 -1
  9. package/dist/browser/operations/namespaces.js +111 -169
  10. package/dist/browser/operations/namespaces.js.map +1 -1
  11. package/dist/browser/operations/operations.js +23 -40
  12. package/dist/browser/operations/operations.js.map +1 -1
  13. package/dist/browser/operations/privateEndpointConnections.js +34 -46
  14. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  15. package/dist/browser/operations/privateLinkResources.js +1 -0
  16. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  17. package/dist/browser/operations/queues.js +45 -79
  18. package/dist/browser/operations/queues.js.map +1 -1
  19. package/dist/browser/operations/rules.js +23 -40
  20. package/dist/browser/operations/rules.js.map +1 -1
  21. package/dist/browser/operations/subscriptions.js +23 -40
  22. package/dist/browser/operations/subscriptions.js.map +1 -1
  23. package/dist/browser/operations/topics.js +45 -79
  24. package/dist/browser/operations/topics.js.map +1 -1
  25. package/dist/browser/pagingHelper.js +2 -4
  26. package/dist/browser/pagingHelper.js.map +1 -1
  27. package/dist/browser/serviceBusManagementClient.js +23 -5
  28. package/dist/browser/serviceBusManagementClient.js.map +1 -1
  29. package/dist/commonjs/lroImpl.js +11 -3
  30. package/dist/commonjs/lroImpl.js.map +1 -1
  31. package/dist/commonjs/models/mappers.js +288 -137
  32. package/dist/commonjs/models/mappers.js.map +1 -1
  33. package/dist/commonjs/operations/disasterRecoveryConfigs.js +45 -78
  34. package/dist/commonjs/operations/disasterRecoveryConfigs.js.map +1 -1
  35. package/dist/commonjs/operations/migrationConfigs.js +34 -45
  36. package/dist/commonjs/operations/migrationConfigs.js.map +1 -1
  37. package/dist/commonjs/operations/namespaces.js +111 -168
  38. package/dist/commonjs/operations/namespaces.js.map +1 -1
  39. package/dist/commonjs/operations/operations.js +23 -39
  40. package/dist/commonjs/operations/operations.js.map +1 -1
  41. package/dist/commonjs/operations/privateEndpointConnections.js +34 -45
  42. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  43. package/dist/commonjs/operations/privateLinkResources.js +1 -0
  44. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  45. package/dist/commonjs/operations/queues.js +45 -78
  46. package/dist/commonjs/operations/queues.js.map +1 -1
  47. package/dist/commonjs/operations/rules.js +23 -39
  48. package/dist/commonjs/operations/rules.js.map +1 -1
  49. package/dist/commonjs/operations/subscriptions.js +23 -39
  50. package/dist/commonjs/operations/subscriptions.js.map +1 -1
  51. package/dist/commonjs/operations/topics.js +45 -78
  52. package/dist/commonjs/operations/topics.js.map +1 -1
  53. package/dist/commonjs/pagingHelper.js +2 -4
  54. package/dist/commonjs/pagingHelper.js.map +1 -1
  55. package/dist/commonjs/serviceBusManagementClient.js +23 -5
  56. package/dist/commonjs/serviceBusManagementClient.js.map +1 -1
  57. package/dist/commonjs/tsdoc-metadata.json +1 -1
  58. package/dist/esm/lroImpl.js +11 -3
  59. package/dist/esm/lroImpl.js.map +1 -1
  60. package/dist/esm/models/mappers.js +288 -137
  61. package/dist/esm/models/mappers.js.map +1 -1
  62. package/dist/esm/operations/disasterRecoveryConfigs.js +45 -79
  63. package/dist/esm/operations/disasterRecoveryConfigs.js.map +1 -1
  64. package/dist/esm/operations/migrationConfigs.js +34 -46
  65. package/dist/esm/operations/migrationConfigs.js.map +1 -1
  66. package/dist/esm/operations/namespaces.js +111 -169
  67. package/dist/esm/operations/namespaces.js.map +1 -1
  68. package/dist/esm/operations/operations.js +23 -40
  69. package/dist/esm/operations/operations.js.map +1 -1
  70. package/dist/esm/operations/privateEndpointConnections.js +34 -46
  71. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  72. package/dist/esm/operations/privateLinkResources.js +1 -0
  73. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  74. package/dist/esm/operations/queues.js +45 -79
  75. package/dist/esm/operations/queues.js.map +1 -1
  76. package/dist/esm/operations/rules.js +23 -40
  77. package/dist/esm/operations/rules.js.map +1 -1
  78. package/dist/esm/operations/subscriptions.js +23 -40
  79. package/dist/esm/operations/subscriptions.js.map +1 -1
  80. package/dist/esm/operations/topics.js +45 -79
  81. package/dist/esm/operations/topics.js.map +1 -1
  82. package/dist/esm/pagingHelper.js +2 -4
  83. package/dist/esm/pagingHelper.js.map +1 -1
  84. package/dist/esm/serviceBusManagementClient.js +23 -5
  85. package/dist/esm/serviceBusManagementClient.js.map +1 -1
  86. package/dist/react-native/lroImpl.js +11 -3
  87. package/dist/react-native/lroImpl.js.map +1 -1
  88. package/dist/react-native/models/mappers.js +288 -137
  89. package/dist/react-native/models/mappers.js.map +1 -1
  90. package/dist/react-native/operations/disasterRecoveryConfigs.js +45 -79
  91. package/dist/react-native/operations/disasterRecoveryConfigs.js.map +1 -1
  92. package/dist/react-native/operations/migrationConfigs.js +34 -46
  93. package/dist/react-native/operations/migrationConfigs.js.map +1 -1
  94. package/dist/react-native/operations/namespaces.js +111 -169
  95. package/dist/react-native/operations/namespaces.js.map +1 -1
  96. package/dist/react-native/operations/operations.js +23 -40
  97. package/dist/react-native/operations/operations.js.map +1 -1
  98. package/dist/react-native/operations/privateEndpointConnections.js +34 -46
  99. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  100. package/dist/react-native/operations/privateLinkResources.js +1 -0
  101. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  102. package/dist/react-native/operations/queues.js +45 -79
  103. package/dist/react-native/operations/queues.js.map +1 -1
  104. package/dist/react-native/operations/rules.js +23 -40
  105. package/dist/react-native/operations/rules.js.map +1 -1
  106. package/dist/react-native/operations/subscriptions.js +23 -40
  107. package/dist/react-native/operations/subscriptions.js.map +1 -1
  108. package/dist/react-native/operations/topics.js +45 -79
  109. package/dist/react-native/operations/topics.js.map +1 -1
  110. package/dist/react-native/pagingHelper.js +2 -4
  111. package/dist/react-native/pagingHelper.js.map +1 -1
  112. package/dist/react-native/serviceBusManagementClient.js +23 -5
  113. package/dist/react-native/serviceBusManagementClient.js.map +1 -1
  114. package/package.json +2 -2
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Namespaces operations. */
20
20
  class NamespacesImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Namespaces class.
23
24
  * @param client Reference to the service client
@@ -39,52 +40,35 @@ class NamespacesImpl {
39
40
  return this;
40
41
  },
41
42
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
43
44
  throw new Error("maxPageSize is not supported by this operation.");
44
45
  }
45
46
  return this.listPagingPage(options, settings);
46
47
  }
47
48
  };
48
49
  }
49
- listPagingPage(options, settings) {
50
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield tslib_1.__await(this._list(options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
- yield yield tslib_1.__await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield tslib_1.__await(this._listNext(continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
- yield yield tslib_1.__await(page);
66
- }
67
- });
50
+ async *listPagingPage(options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._list(options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listNext(continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
+ yield page;
66
+ }
68
67
  }
69
- listPagingAll(options) {
70
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
68
+ async *listPagingAll(options) {
69
+ for await (const page of this.listPagingPage(options)) {
70
+ yield* page;
71
+ }
88
72
  }
89
73
  /**
90
74
  * Gets the available namespaces within a resource group.
@@ -101,52 +85,35 @@ class NamespacesImpl {
101
85
  return this;
102
86
  },
103
87
  byPage: (settings) => {
104
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
88
+ if (settings?.maxPageSize) {
105
89
  throw new Error("maxPageSize is not supported by this operation.");
106
90
  }
107
91
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
108
92
  }
109
93
  };
110
94
  }
111
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
112
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
113
- let result;
114
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
115
- if (!continuationToken) {
116
- result = yield tslib_1.__await(this._listByResourceGroup(resourceGroupName, options));
117
- let page = result.value || [];
118
- continuationToken = result.nextLink;
119
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
120
- yield yield tslib_1.__await(page);
121
- }
122
- while (continuationToken) {
123
- result = yield tslib_1.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
124
- continuationToken = result.nextLink;
125
- let page = result.value || [];
126
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
127
- yield yield tslib_1.__await(page);
128
- }
129
- });
95
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
96
+ let result;
97
+ let continuationToken = settings?.continuationToken;
98
+ if (!continuationToken) {
99
+ result = await this._listByResourceGroup(resourceGroupName, options);
100
+ let page = result.value || [];
101
+ continuationToken = result.nextLink;
102
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
103
+ yield page;
104
+ }
105
+ while (continuationToken) {
106
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
107
+ continuationToken = result.nextLink;
108
+ let page = result.value || [];
109
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
110
+ yield page;
111
+ }
130
112
  }
131
- listByResourceGroupPagingAll(resourceGroupName, options) {
132
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
133
- var _a, e_2, _b, _c;
134
- try {
135
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
136
- _c = _f.value;
137
- _d = false;
138
- const page = _c;
139
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
140
- }
141
- }
142
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
143
- finally {
144
- try {
145
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
146
- }
147
- finally { if (e_2) throw e_2.error; }
148
- }
149
- });
113
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
114
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
115
+ yield* page;
116
+ }
150
117
  }
151
118
  /**
152
119
  * Gets list of NetworkRuleSet for a Namespace.
@@ -164,52 +131,35 @@ class NamespacesImpl {
164
131
  return this;
165
132
  },
166
133
  byPage: (settings) => {
167
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
134
+ if (settings?.maxPageSize) {
168
135
  throw new Error("maxPageSize is not supported by this operation.");
169
136
  }
170
137
  return this.listNetworkRuleSetsPagingPage(resourceGroupName, namespaceName, options, settings);
171
138
  }
172
139
  };
173
140
  }
174
- listNetworkRuleSetsPagingPage(resourceGroupName, namespaceName, options, settings) {
175
- return tslib_1.__asyncGenerator(this, arguments, function* listNetworkRuleSetsPagingPage_1() {
176
- let result;
177
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
178
- if (!continuationToken) {
179
- result = yield tslib_1.__await(this._listNetworkRuleSets(resourceGroupName, namespaceName, options));
180
- let page = result.value || [];
181
- continuationToken = result.nextLink;
182
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
183
- yield yield tslib_1.__await(page);
184
- }
185
- while (continuationToken) {
186
- result = yield tslib_1.__await(this._listNetworkRuleSetsNext(resourceGroupName, namespaceName, continuationToken, options));
187
- continuationToken = result.nextLink;
188
- let page = result.value || [];
189
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
190
- yield yield tslib_1.__await(page);
191
- }
192
- });
141
+ async *listNetworkRuleSetsPagingPage(resourceGroupName, namespaceName, options, settings) {
142
+ let result;
143
+ let continuationToken = settings?.continuationToken;
144
+ if (!continuationToken) {
145
+ result = await this._listNetworkRuleSets(resourceGroupName, namespaceName, options);
146
+ let page = result.value || [];
147
+ continuationToken = result.nextLink;
148
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
149
+ yield page;
150
+ }
151
+ while (continuationToken) {
152
+ result = await this._listNetworkRuleSetsNext(resourceGroupName, namespaceName, continuationToken, options);
153
+ continuationToken = result.nextLink;
154
+ let page = result.value || [];
155
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
156
+ yield page;
157
+ }
193
158
  }
194
- listNetworkRuleSetsPagingAll(resourceGroupName, namespaceName, options) {
195
- return tslib_1.__asyncGenerator(this, arguments, function* listNetworkRuleSetsPagingAll_1() {
196
- var _a, e_3, _b, _c;
197
- try {
198
- for (var _d = true, _e = tslib_1.__asyncValues(this.listNetworkRuleSetsPagingPage(resourceGroupName, namespaceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
199
- _c = _f.value;
200
- _d = false;
201
- const page = _c;
202
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
203
- }
204
- }
205
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
206
- finally {
207
- try {
208
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
209
- }
210
- finally { if (e_3) throw e_3.error; }
211
- }
212
- });
159
+ async *listNetworkRuleSetsPagingAll(resourceGroupName, namespaceName, options) {
160
+ for await (const page of this.listNetworkRuleSetsPagingPage(resourceGroupName, namespaceName, options)) {
161
+ yield* page;
162
+ }
213
163
  }
214
164
  /**
215
165
  * Gets the authorization rules for a namespace.
@@ -227,52 +177,35 @@ class NamespacesImpl {
227
177
  return this;
228
178
  },
229
179
  byPage: (settings) => {
230
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
180
+ if (settings?.maxPageSize) {
231
181
  throw new Error("maxPageSize is not supported by this operation.");
232
182
  }
233
183
  return this.listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options, settings);
234
184
  }
235
185
  };
236
186
  }
237
- listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options, settings) {
238
- return tslib_1.__asyncGenerator(this, arguments, function* listAuthorizationRulesPagingPage_1() {
239
- let result;
240
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
241
- if (!continuationToken) {
242
- result = yield tslib_1.__await(this._listAuthorizationRules(resourceGroupName, namespaceName, options));
243
- let page = result.value || [];
244
- continuationToken = result.nextLink;
245
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
246
- yield yield tslib_1.__await(page);
247
- }
248
- while (continuationToken) {
249
- result = yield tslib_1.__await(this._listAuthorizationRulesNext(resourceGroupName, namespaceName, continuationToken, options));
250
- continuationToken = result.nextLink;
251
- let page = result.value || [];
252
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
253
- yield yield tslib_1.__await(page);
254
- }
255
- });
187
+ async *listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options, settings) {
188
+ let result;
189
+ let continuationToken = settings?.continuationToken;
190
+ if (!continuationToken) {
191
+ result = await this._listAuthorizationRules(resourceGroupName, namespaceName, options);
192
+ let page = result.value || [];
193
+ continuationToken = result.nextLink;
194
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
195
+ yield page;
196
+ }
197
+ while (continuationToken) {
198
+ result = await this._listAuthorizationRulesNext(resourceGroupName, namespaceName, continuationToken, options);
199
+ continuationToken = result.nextLink;
200
+ let page = result.value || [];
201
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
202
+ yield page;
203
+ }
256
204
  }
257
- listAuthorizationRulesPagingAll(resourceGroupName, namespaceName, options) {
258
- return tslib_1.__asyncGenerator(this, arguments, function* listAuthorizationRulesPagingAll_1() {
259
- var _a, e_4, _b, _c;
260
- try {
261
- for (var _d = true, _e = tslib_1.__asyncValues(this.listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
262
- _c = _f.value;
263
- _d = false;
264
- const page = _c;
265
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
266
- }
267
- }
268
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
269
- finally {
270
- try {
271
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
272
- }
273
- finally { if (e_4) throw e_4.error; }
274
- }
275
- });
205
+ async *listAuthorizationRulesPagingAll(resourceGroupName, namespaceName, options) {
206
+ for await (const page of this.listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options)) {
207
+ yield* page;
208
+ }
276
209
  }
277
210
  /**
278
211
  * Gets all the available namespaces within the subscription, irrespective of the resource groups.
@@ -302,14 +235,19 @@ class NamespacesImpl {
302
235
  return this.client.sendOperationRequest(args, spec);
303
236
  };
304
237
  const sendOperation = async (args, spec) => {
305
- var _a;
306
238
  let currentRawResponse = undefined;
307
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
239
+ const providedCallback = args.options?.onResponse;
308
240
  const callback = (rawResponse, flatResponse) => {
309
241
  currentRawResponse = rawResponse;
310
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
242
+ providedCallback?.(rawResponse, flatResponse);
243
+ };
244
+ const updatedArgs = {
245
+ ...args,
246
+ options: {
247
+ ...args.options,
248
+ onResponse: callback
249
+ }
311
250
  };
312
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
313
251
  const flatResponse = await directSendOperation(updatedArgs, spec);
314
252
  return {
315
253
  flatResponse,
@@ -322,8 +260,8 @@ class NamespacesImpl {
322
260
  };
323
261
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, namespaceName, parameters, options }, createOrUpdateOperationSpec);
324
262
  const poller = new core_lro_1.LroEngine(lro, {
325
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
326
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
263
+ resumeFrom: options?.resumeFrom,
264
+ intervalInMs: options?.updateIntervalInMs
327
265
  });
328
266
  await poller.poll();
329
267
  return poller;
@@ -352,14 +290,19 @@ class NamespacesImpl {
352
290
  return this.client.sendOperationRequest(args, spec);
353
291
  };
354
292
  const sendOperation = async (args, spec) => {
355
- var _a;
356
293
  let currentRawResponse = undefined;
357
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
294
+ const providedCallback = args.options?.onResponse;
358
295
  const callback = (rawResponse, flatResponse) => {
359
296
  currentRawResponse = rawResponse;
360
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
297
+ providedCallback?.(rawResponse, flatResponse);
298
+ };
299
+ const updatedArgs = {
300
+ ...args,
301
+ options: {
302
+ ...args.options,
303
+ onResponse: callback
304
+ }
361
305
  };
362
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
363
306
  const flatResponse = await directSendOperation(updatedArgs, spec);
364
307
  return {
365
308
  flatResponse,
@@ -372,8 +315,8 @@ class NamespacesImpl {
372
315
  };
373
316
  const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, namespaceName, options }, deleteOperationSpec);
374
317
  const poller = new core_lro_1.LroEngine(lro, {
375
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
376
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
318
+ resumeFrom: options?.resumeFrom,
319
+ intervalInMs: options?.updateIntervalInMs
377
320
  });
378
321
  await poller.poll();
379
322
  return poller;