@azure/communication-phone-numbers 1.3.0-alpha.20230820.1 → 1.3.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +37 -44
- package/dist/index.js +492 -678
- package/dist/index.js.map +1 -1
- package/dist-esm/src/generated/src/index.js +1 -0
- package/dist-esm/src/generated/src/index.js.map +1 -1
- package/dist-esm/src/generated/src/lroImpl.js +11 -15
- package/dist-esm/src/generated/src/lroImpl.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/mappers.js +122 -0
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +15 -2
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/phoneNumbers.js +170 -116
- package/dist-esm/src/generated/src/operations/phoneNumbers.js.map +1 -1
- package/dist-esm/src/generated/src/operationsInterfaces/phoneNumbers.js.map +1 -1
- package/dist-esm/src/generated/src/pagingHelper.js +32 -0
- package/dist-esm/src/generated/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/generated/src/phoneNumbersClient.js +4 -22
- package/dist-esm/src/generated/src/phoneNumbersClient.js.map +1 -1
- package/dist-esm/src/generated/src/siprouting/models/index.js +1 -6
- package/dist-esm/src/generated/src/siprouting/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/siprouting/models/mappers.js +0 -166
- package/dist-esm/src/generated/src/siprouting/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/siprouting/models/parameters.js +2 -48
- package/dist-esm/src/generated/src/siprouting/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/siprouting/operations/sipRouting.js +1 -35
- package/dist-esm/src/generated/src/siprouting/operations/sipRouting.js.map +1 -1
- package/dist-esm/src/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -1
- package/dist-esm/src/generated/src/siprouting/sipRoutingClientContext.js +2 -2
- package/dist-esm/src/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
- package/dist-esm/src/generated/src/tracing.js +1 -1
- package/dist-esm/src/generated/src/tracing.js.map +1 -1
- package/dist-esm/src/mappers.js +3 -31
- package/dist-esm/src/mappers.js.map +1 -1
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/phoneNumbersClient.js +19 -3
- package/dist-esm/src/phoneNumbersClient.js.map +1 -1
- package/dist-esm/src/sipRoutingClient.js +69 -192
- package/dist-esm/src/sipRoutingClient.js.map +1 -1
- package/dist-esm/src/utils/constants.js +1 -1
- package/dist-esm/src/utils/constants.js.map +1 -1
- package/package.json +15 -14
- package/types/communication-phone-numbers.d.ts +58 -131
@@ -7,11 +7,12 @@
|
|
7
7
|
*/
|
8
8
|
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
9
9
|
import { tracingClient } from "../tracing";
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
10
11
|
import * as coreClient from "@azure/core-client";
|
11
12
|
import * as Mappers from "../models/mappers";
|
12
13
|
import * as Parameters from "../models/parameters";
|
13
14
|
import { LroEngine } from "@azure/core-lro";
|
14
|
-
import {
|
15
|
+
import { createLroSpec } from "../lroImpl";
|
15
16
|
/// <reference lib="esnext.asynciterable" />
|
16
17
|
/** Class containing PhoneNumbers operations. */
|
17
18
|
export class PhoneNumbersImpl {
|
@@ -37,20 +38,31 @@ export class PhoneNumbersImpl {
|
|
37
38
|
[Symbol.asyncIterator]() {
|
38
39
|
return this;
|
39
40
|
},
|
40
|
-
byPage: () => {
|
41
|
-
|
41
|
+
byPage: (settings) => {
|
42
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
43
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
44
|
+
}
|
45
|
+
return this.listAreaCodesPagingPage(countryCode, phoneNumberType, options, settings);
|
42
46
|
}
|
43
47
|
};
|
44
48
|
}
|
45
|
-
listAreaCodesPagingPage(countryCode, phoneNumberType, options) {
|
49
|
+
listAreaCodesPagingPage(countryCode, phoneNumberType, options, settings) {
|
46
50
|
return __asyncGenerator(this, arguments, function* listAreaCodesPagingPage_1() {
|
47
|
-
let result
|
48
|
-
|
49
|
-
|
51
|
+
let result;
|
52
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
53
|
+
if (!continuationToken) {
|
54
|
+
result = yield __await(this._listAreaCodes(countryCode, phoneNumberType, options));
|
55
|
+
let page = result.areaCodes || [];
|
56
|
+
continuationToken = result.nextLink;
|
57
|
+
setContinuationToken(page, continuationToken);
|
58
|
+
yield yield __await(page);
|
59
|
+
}
|
50
60
|
while (continuationToken) {
|
51
|
-
result = yield __await(this._listAreaCodesNext(countryCode,
|
61
|
+
result = yield __await(this._listAreaCodesNext(countryCode, continuationToken, options));
|
52
62
|
continuationToken = result.nextLink;
|
53
|
-
|
63
|
+
let page = result.areaCodes || [];
|
64
|
+
setContinuationToken(page, continuationToken);
|
65
|
+
yield yield __await(page);
|
54
66
|
}
|
55
67
|
});
|
56
68
|
}
|
@@ -58,16 +70,11 @@ export class PhoneNumbersImpl {
|
|
58
70
|
return __asyncGenerator(this, arguments, function* listAreaCodesPagingAll_1() {
|
59
71
|
var _a, e_1, _b, _c;
|
60
72
|
try {
|
61
|
-
for (var _d = true, _e = __asyncValues(this.listAreaCodesPagingPage(countryCode, phoneNumberType, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
73
|
+
for (var _d = true, _e = __asyncValues(this.listAreaCodesPagingPage(countryCode, phoneNumberType, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
62
74
|
_c = _f.value;
|
63
75
|
_d = false;
|
64
|
-
|
65
|
-
|
66
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
67
|
-
}
|
68
|
-
finally {
|
69
|
-
_d = true;
|
70
|
-
}
|
76
|
+
const page = _c;
|
77
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
71
78
|
}
|
72
79
|
}
|
73
80
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
@@ -92,20 +99,31 @@ export class PhoneNumbersImpl {
|
|
92
99
|
[Symbol.asyncIterator]() {
|
93
100
|
return this;
|
94
101
|
},
|
95
|
-
byPage: () => {
|
96
|
-
|
102
|
+
byPage: (settings) => {
|
103
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
104
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
105
|
+
}
|
106
|
+
return this.listAvailableCountriesPagingPage(options, settings);
|
97
107
|
}
|
98
108
|
};
|
99
109
|
}
|
100
|
-
listAvailableCountriesPagingPage(options) {
|
110
|
+
listAvailableCountriesPagingPage(options, settings) {
|
101
111
|
return __asyncGenerator(this, arguments, function* listAvailableCountriesPagingPage_1() {
|
102
|
-
let result
|
103
|
-
|
104
|
-
|
112
|
+
let result;
|
113
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
114
|
+
if (!continuationToken) {
|
115
|
+
result = yield __await(this._listAvailableCountries(options));
|
116
|
+
let page = result.countries || [];
|
117
|
+
continuationToken = result.nextLink;
|
118
|
+
setContinuationToken(page, continuationToken);
|
119
|
+
yield yield __await(page);
|
120
|
+
}
|
105
121
|
while (continuationToken) {
|
106
122
|
result = yield __await(this._listAvailableCountriesNext(continuationToken, options));
|
107
123
|
continuationToken = result.nextLink;
|
108
|
-
|
124
|
+
let page = result.countries || [];
|
125
|
+
setContinuationToken(page, continuationToken);
|
126
|
+
yield yield __await(page);
|
109
127
|
}
|
110
128
|
});
|
111
129
|
}
|
@@ -113,16 +131,11 @@ export class PhoneNumbersImpl {
|
|
113
131
|
return __asyncGenerator(this, arguments, function* listAvailableCountriesPagingAll_1() {
|
114
132
|
var _a, e_2, _b, _c;
|
115
133
|
try {
|
116
|
-
for (var _d = true, _e = __asyncValues(this.listAvailableCountriesPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
134
|
+
for (var _d = true, _e = __asyncValues(this.listAvailableCountriesPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
117
135
|
_c = _f.value;
|
118
136
|
_d = false;
|
119
|
-
|
120
|
-
|
121
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
122
|
-
}
|
123
|
-
finally {
|
124
|
-
_d = true;
|
125
|
-
}
|
137
|
+
const page = _c;
|
138
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
126
139
|
}
|
127
140
|
}
|
128
141
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
@@ -148,20 +161,31 @@ export class PhoneNumbersImpl {
|
|
148
161
|
[Symbol.asyncIterator]() {
|
149
162
|
return this;
|
150
163
|
},
|
151
|
-
byPage: () => {
|
152
|
-
|
164
|
+
byPage: (settings) => {
|
165
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
166
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
167
|
+
}
|
168
|
+
return this.listAvailableLocalitiesPagingPage(countryCode, options, settings);
|
153
169
|
}
|
154
170
|
};
|
155
171
|
}
|
156
|
-
listAvailableLocalitiesPagingPage(countryCode, options) {
|
172
|
+
listAvailableLocalitiesPagingPage(countryCode, options, settings) {
|
157
173
|
return __asyncGenerator(this, arguments, function* listAvailableLocalitiesPagingPage_1() {
|
158
|
-
let result
|
159
|
-
|
160
|
-
|
174
|
+
let result;
|
175
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
176
|
+
if (!continuationToken) {
|
177
|
+
result = yield __await(this._listAvailableLocalities(countryCode, options));
|
178
|
+
let page = result.phoneNumberLocalities || [];
|
179
|
+
continuationToken = result.nextLink;
|
180
|
+
setContinuationToken(page, continuationToken);
|
181
|
+
yield yield __await(page);
|
182
|
+
}
|
161
183
|
while (continuationToken) {
|
162
184
|
result = yield __await(this._listAvailableLocalitiesNext(countryCode, continuationToken, options));
|
163
185
|
continuationToken = result.nextLink;
|
164
|
-
|
186
|
+
let page = result.phoneNumberLocalities || [];
|
187
|
+
setContinuationToken(page, continuationToken);
|
188
|
+
yield yield __await(page);
|
165
189
|
}
|
166
190
|
});
|
167
191
|
}
|
@@ -169,16 +193,11 @@ export class PhoneNumbersImpl {
|
|
169
193
|
return __asyncGenerator(this, arguments, function* listAvailableLocalitiesPagingAll_1() {
|
170
194
|
var _a, e_3, _b, _c;
|
171
195
|
try {
|
172
|
-
for (var _d = true, _e = __asyncValues(this.listAvailableLocalitiesPagingPage(countryCode, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
196
|
+
for (var _d = true, _e = __asyncValues(this.listAvailableLocalitiesPagingPage(countryCode, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
173
197
|
_c = _f.value;
|
174
198
|
_d = false;
|
175
|
-
|
176
|
-
|
177
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
178
|
-
}
|
179
|
-
finally {
|
180
|
-
_d = true;
|
181
|
-
}
|
199
|
+
const page = _c;
|
200
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
182
201
|
}
|
183
202
|
}
|
184
203
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
@@ -204,20 +223,31 @@ export class PhoneNumbersImpl {
|
|
204
223
|
[Symbol.asyncIterator]() {
|
205
224
|
return this;
|
206
225
|
},
|
207
|
-
byPage: () => {
|
208
|
-
|
226
|
+
byPage: (settings) => {
|
227
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
228
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
229
|
+
}
|
230
|
+
return this.listOfferingsPagingPage(countryCode, options, settings);
|
209
231
|
}
|
210
232
|
};
|
211
233
|
}
|
212
|
-
listOfferingsPagingPage(countryCode, options) {
|
234
|
+
listOfferingsPagingPage(countryCode, options, settings) {
|
213
235
|
return __asyncGenerator(this, arguments, function* listOfferingsPagingPage_1() {
|
214
|
-
let result
|
215
|
-
|
216
|
-
|
236
|
+
let result;
|
237
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
238
|
+
if (!continuationToken) {
|
239
|
+
result = yield __await(this._listOfferings(countryCode, options));
|
240
|
+
let page = result.phoneNumberOfferings || [];
|
241
|
+
continuationToken = result.nextLink;
|
242
|
+
setContinuationToken(page, continuationToken);
|
243
|
+
yield yield __await(page);
|
244
|
+
}
|
217
245
|
while (continuationToken) {
|
218
246
|
result = yield __await(this._listOfferingsNext(countryCode, continuationToken, options));
|
219
247
|
continuationToken = result.nextLink;
|
220
|
-
|
248
|
+
let page = result.phoneNumberOfferings || [];
|
249
|
+
setContinuationToken(page, continuationToken);
|
250
|
+
yield yield __await(page);
|
221
251
|
}
|
222
252
|
});
|
223
253
|
}
|
@@ -225,16 +255,11 @@ export class PhoneNumbersImpl {
|
|
225
255
|
return __asyncGenerator(this, arguments, function* listOfferingsPagingAll_1() {
|
226
256
|
var _a, e_4, _b, _c;
|
227
257
|
try {
|
228
|
-
for (var _d = true, _e = __asyncValues(this.listOfferingsPagingPage(countryCode, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
258
|
+
for (var _d = true, _e = __asyncValues(this.listOfferingsPagingPage(countryCode, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
229
259
|
_c = _f.value;
|
230
260
|
_d = false;
|
231
|
-
|
232
|
-
|
233
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
234
|
-
}
|
235
|
-
finally {
|
236
|
-
_d = true;
|
237
|
-
}
|
261
|
+
const page = _c;
|
262
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
238
263
|
}
|
239
264
|
}
|
240
265
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
@@ -259,20 +284,31 @@ export class PhoneNumbersImpl {
|
|
259
284
|
[Symbol.asyncIterator]() {
|
260
285
|
return this;
|
261
286
|
},
|
262
|
-
byPage: () => {
|
263
|
-
|
287
|
+
byPage: (settings) => {
|
288
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
289
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
290
|
+
}
|
291
|
+
return this.listPhoneNumbersPagingPage(options, settings);
|
264
292
|
}
|
265
293
|
};
|
266
294
|
}
|
267
|
-
listPhoneNumbersPagingPage(options) {
|
295
|
+
listPhoneNumbersPagingPage(options, settings) {
|
268
296
|
return __asyncGenerator(this, arguments, function* listPhoneNumbersPagingPage_1() {
|
269
|
-
let result
|
270
|
-
|
271
|
-
|
297
|
+
let result;
|
298
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
299
|
+
if (!continuationToken) {
|
300
|
+
result = yield __await(this._listPhoneNumbers(options));
|
301
|
+
let page = result.phoneNumbers || [];
|
302
|
+
continuationToken = result.nextLink;
|
303
|
+
setContinuationToken(page, continuationToken);
|
304
|
+
yield yield __await(page);
|
305
|
+
}
|
272
306
|
while (continuationToken) {
|
273
307
|
result = yield __await(this._listPhoneNumbersNext(continuationToken, options));
|
274
308
|
continuationToken = result.nextLink;
|
275
|
-
|
309
|
+
let page = result.phoneNumbers || [];
|
310
|
+
setContinuationToken(page, continuationToken);
|
311
|
+
yield yield __await(page);
|
276
312
|
}
|
277
313
|
});
|
278
314
|
}
|
@@ -280,16 +316,11 @@ export class PhoneNumbersImpl {
|
|
280
316
|
return __asyncGenerator(this, arguments, function* listPhoneNumbersPagingAll_1() {
|
281
317
|
var _a, e_5, _b, _c;
|
282
318
|
try {
|
283
|
-
for (var _d = true, _e = __asyncValues(this.listPhoneNumbersPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
319
|
+
for (var _d = true, _e = __asyncValues(this.listPhoneNumbersPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
284
320
|
_c = _f.value;
|
285
321
|
_d = false;
|
286
|
-
|
287
|
-
|
288
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
289
|
-
}
|
290
|
-
finally {
|
291
|
-
_d = true;
|
292
|
-
}
|
322
|
+
const page = _c;
|
323
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
293
324
|
}
|
294
325
|
}
|
295
326
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
@@ -356,7 +387,7 @@ export class PhoneNumbersImpl {
|
|
356
387
|
return this.client.sendOperationRequest(args, spec);
|
357
388
|
});
|
358
389
|
};
|
359
|
-
const
|
390
|
+
const sendOperationFn = async (args, spec) => {
|
360
391
|
var _a;
|
361
392
|
let currentRawResponse = undefined;
|
362
393
|
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
@@ -375,7 +406,17 @@ export class PhoneNumbersImpl {
|
|
375
406
|
}
|
376
407
|
};
|
377
408
|
};
|
378
|
-
const lro =
|
409
|
+
const lro = createLroSpec({
|
410
|
+
sendOperationFn,
|
411
|
+
args: {
|
412
|
+
countryCode,
|
413
|
+
phoneNumberType,
|
414
|
+
assignmentType,
|
415
|
+
capabilities,
|
416
|
+
options
|
417
|
+
},
|
418
|
+
spec: searchAvailablePhoneNumbersOperationSpec
|
419
|
+
});
|
379
420
|
const poller = new LroEngine(lro, {
|
380
421
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
381
422
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
@@ -417,7 +458,7 @@ export class PhoneNumbersImpl {
|
|
417
458
|
return this.client.sendOperationRequest(args, spec);
|
418
459
|
});
|
419
460
|
};
|
420
|
-
const
|
461
|
+
const sendOperationFn = async (args, spec) => {
|
421
462
|
var _a;
|
422
463
|
let currentRawResponse = undefined;
|
423
464
|
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
@@ -436,7 +477,11 @@ export class PhoneNumbersImpl {
|
|
436
477
|
}
|
437
478
|
};
|
438
479
|
};
|
439
|
-
const lro =
|
480
|
+
const lro = createLroSpec({
|
481
|
+
sendOperationFn,
|
482
|
+
args: { options },
|
483
|
+
spec: purchasePhoneNumbersOperationSpec
|
484
|
+
});
|
440
485
|
const poller = new LroEngine(lro, {
|
441
486
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
442
487
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
@@ -484,7 +529,7 @@ export class PhoneNumbersImpl {
|
|
484
529
|
return this.client.sendOperationRequest(args, spec);
|
485
530
|
});
|
486
531
|
};
|
487
|
-
const
|
532
|
+
const sendOperationFn = async (args, spec) => {
|
488
533
|
var _a;
|
489
534
|
let currentRawResponse = undefined;
|
490
535
|
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
@@ -503,7 +548,11 @@ export class PhoneNumbersImpl {
|
|
503
548
|
}
|
504
549
|
};
|
505
550
|
};
|
506
|
-
const lro =
|
551
|
+
const lro = createLroSpec({
|
552
|
+
sendOperationFn,
|
553
|
+
args: { phoneNumber, options },
|
554
|
+
spec: updateCapabilitiesOperationSpec
|
555
|
+
});
|
507
556
|
const poller = new LroEngine(lro, {
|
508
557
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
509
558
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
@@ -544,7 +593,7 @@ export class PhoneNumbersImpl {
|
|
544
593
|
return this.client.sendOperationRequest(args, spec);
|
545
594
|
});
|
546
595
|
};
|
547
|
-
const
|
596
|
+
const sendOperationFn = async (args, spec) => {
|
548
597
|
var _a;
|
549
598
|
let currentRawResponse = undefined;
|
550
599
|
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
@@ -563,7 +612,11 @@ export class PhoneNumbersImpl {
|
|
563
612
|
}
|
564
613
|
};
|
565
614
|
};
|
566
|
-
const lro =
|
615
|
+
const lro = createLroSpec({
|
616
|
+
sendOperationFn,
|
617
|
+
args: { phoneNumber, options },
|
618
|
+
spec: releasePhoneNumberOperationSpec
|
619
|
+
});
|
567
620
|
const poller = new LroEngine(lro, {
|
568
621
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
569
622
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
@@ -589,16 +642,24 @@ export class PhoneNumbersImpl {
|
|
589
642
|
return this.client.sendOperationRequest({ options }, listPhoneNumbersOperationSpec);
|
590
643
|
});
|
591
644
|
}
|
645
|
+
/**
|
646
|
+
* Searches for number format and operator information for a given list of phone numbers.
|
647
|
+
* @param options The options parameters.
|
648
|
+
*/
|
649
|
+
async operatorInformationSearch(options) {
|
650
|
+
return tracingClient.withSpan("PhoneNumbersClient.operatorInformationSearch", options !== null && options !== void 0 ? options : {}, async (options) => {
|
651
|
+
return this.client.sendOperationRequest({ options }, operatorInformationSearchOperationSpec);
|
652
|
+
});
|
653
|
+
}
|
592
654
|
/**
|
593
655
|
* ListAreaCodesNext
|
594
656
|
* @param countryCode The ISO 3166-2 country code, e.g. US.
|
595
|
-
* @param phoneNumberType Filter by numberType, e.g. Geographic, TollFree.
|
596
657
|
* @param nextLink The nextLink from the previous successful call to the ListAreaCodes method.
|
597
658
|
* @param options The options parameters.
|
598
659
|
*/
|
599
|
-
async _listAreaCodesNext(countryCode,
|
660
|
+
async _listAreaCodesNext(countryCode, nextLink, options) {
|
600
661
|
return tracingClient.withSpan("PhoneNumbersClient._listAreaCodesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
601
|
-
return this.client.sendOperationRequest({ countryCode,
|
662
|
+
return this.client.sendOperationRequest({ countryCode, nextLink, options }, listAreaCodesNextOperationSpec);
|
602
663
|
});
|
603
664
|
}
|
604
665
|
/**
|
@@ -942,6 +1003,27 @@ const listPhoneNumbersOperationSpec = {
|
|
942
1003
|
headerParameters: [Parameters.accept],
|
943
1004
|
serializer
|
944
1005
|
};
|
1006
|
+
const operatorInformationSearchOperationSpec = {
|
1007
|
+
path: "/operatorInformation/:search",
|
1008
|
+
httpMethod: "POST",
|
1009
|
+
responses: {
|
1010
|
+
200: {
|
1011
|
+
bodyMapper: Mappers.OperatorInformationResult
|
1012
|
+
},
|
1013
|
+
default: {
|
1014
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
1015
|
+
}
|
1016
|
+
},
|
1017
|
+
requestBody: {
|
1018
|
+
parameterPath: { phoneNumbers: ["options", "phoneNumbers"] },
|
1019
|
+
mapper: Object.assign(Object.assign({}, Mappers.OperatorInformationRequest), { required: true })
|
1020
|
+
},
|
1021
|
+
queryParameters: [Parameters.apiVersion, Parameters.options],
|
1022
|
+
urlParameters: [Parameters.endpoint],
|
1023
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
1024
|
+
mediaType: "json",
|
1025
|
+
serializer
|
1026
|
+
};
|
945
1027
|
const listAreaCodesNextOperationSpec = {
|
946
1028
|
path: "{nextLink}",
|
947
1029
|
httpMethod: "GET",
|
@@ -953,15 +1035,6 @@ const listAreaCodesNextOperationSpec = {
|
|
953
1035
|
bodyMapper: Mappers.CommunicationErrorResponse
|
954
1036
|
}
|
955
1037
|
},
|
956
|
-
queryParameters: [
|
957
|
-
Parameters.phoneNumberType,
|
958
|
-
Parameters.skip,
|
959
|
-
Parameters.maxPageSize,
|
960
|
-
Parameters.assignmentType,
|
961
|
-
Parameters.locality,
|
962
|
-
Parameters.administrativeDivision,
|
963
|
-
Parameters.apiVersion
|
964
|
-
],
|
965
1038
|
urlParameters: [
|
966
1039
|
Parameters.endpoint,
|
967
1040
|
Parameters.countryCode,
|
@@ -981,11 +1054,6 @@ const listAvailableCountriesNextOperationSpec = {
|
|
981
1054
|
bodyMapper: Mappers.CommunicationErrorResponse
|
982
1055
|
}
|
983
1056
|
},
|
984
|
-
queryParameters: [
|
985
|
-
Parameters.skip,
|
986
|
-
Parameters.maxPageSize,
|
987
|
-
Parameters.apiVersion
|
988
|
-
],
|
989
1057
|
urlParameters: [Parameters.endpoint, Parameters.nextLink],
|
990
1058
|
headerParameters: [Parameters.accept, Parameters.acceptLanguage],
|
991
1059
|
serializer
|
@@ -1001,12 +1069,6 @@ const listAvailableLocalitiesNextOperationSpec = {
|
|
1001
1069
|
bodyMapper: Mappers.CommunicationErrorResponse
|
1002
1070
|
}
|
1003
1071
|
},
|
1004
|
-
queryParameters: [
|
1005
|
-
Parameters.skip,
|
1006
|
-
Parameters.maxPageSize,
|
1007
|
-
Parameters.administrativeDivision,
|
1008
|
-
Parameters.apiVersion
|
1009
|
-
],
|
1010
1072
|
urlParameters: [
|
1011
1073
|
Parameters.endpoint,
|
1012
1074
|
Parameters.countryCode,
|
@@ -1026,13 +1088,6 @@ const listOfferingsNextOperationSpec = {
|
|
1026
1088
|
bodyMapper: Mappers.CommunicationErrorResponse
|
1027
1089
|
}
|
1028
1090
|
},
|
1029
|
-
queryParameters: [
|
1030
|
-
Parameters.skip,
|
1031
|
-
Parameters.maxPageSize,
|
1032
|
-
Parameters.assignmentType,
|
1033
|
-
Parameters.apiVersion,
|
1034
|
-
Parameters.phoneNumberType1
|
1035
|
-
],
|
1036
1091
|
urlParameters: [
|
1037
1092
|
Parameters.endpoint,
|
1038
1093
|
Parameters.countryCode,
|
@@ -1052,7 +1107,6 @@ const listPhoneNumbersNextOperationSpec = {
|
|
1052
1107
|
bodyMapper: Mappers.CommunicationErrorResponse
|
1053
1108
|
}
|
1054
1109
|
},
|
1055
|
-
queryParameters: [Parameters.skip, Parameters.apiVersion, Parameters.top],
|
1056
1110
|
urlParameters: [Parameters.endpoint, Parameters.nextLink],
|
1057
1111
|
headerParameters: [Parameters.accept],
|
1058
1112
|
serializer
|