twilio 5.13.0 → 6.0.0

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 (57) hide show
  1. package/README.md +2 -4
  2. package/lib/rest/InsightsBase.d.ts +3 -0
  3. package/lib/rest/InsightsBase.js +5 -0
  4. package/lib/rest/MessagingBase.d.ts +3 -0
  5. package/lib/rest/MessagingBase.js +5 -0
  6. package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
  7. package/lib/rest/api/v2010/account/call/transcription.js +4 -0
  8. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  9. package/lib/rest/api/v2010/account/message.js +4 -0
  10. package/lib/rest/flexApi/V1.d.ts +0 -5
  11. package/lib/rest/flexApi/V1.js +0 -7
  12. package/lib/rest/iam/V1.d.ts +3 -0
  13. package/lib/rest/iam/V1.js +5 -0
  14. package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
  15. package/lib/rest/iam/v1/rolePermission.js +181 -0
  16. package/lib/rest/insights/V2.d.ts +21 -0
  17. package/lib/rest/insights/V2.js +46 -0
  18. package/lib/rest/insights/v2/inbound.d.ts +436 -0
  19. package/lib/rest/insights/v2/inbound.js +342 -0
  20. package/lib/rest/insights/v2/outbound.d.ts +529 -0
  21. package/lib/rest/insights/v2/outbound.js +392 -0
  22. package/lib/rest/insights/v2/report.d.ts +783 -0
  23. package/lib/rest/insights/v2/report.js +550 -0
  24. package/lib/rest/messaging/V3.d.ts +15 -0
  25. package/lib/rest/messaging/V3.js +37 -0
  26. package/lib/rest/messaging/v2/channelsSender.d.ts +4 -0
  27. package/lib/rest/messaging/v2/channelsSender.js +1 -0
  28. package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
  29. package/lib/rest/messaging/v3/typingIndicator.js +114 -0
  30. package/lib/rest/numbers/V1.d.ts +8 -0
  31. package/lib/rest/numbers/V1.js +12 -0
  32. package/lib/rest/numbers/v1/embeddedSession.d.ts +84 -0
  33. package/lib/rest/numbers/v1/embeddedSession.js +115 -0
  34. package/lib/rest/numbers/v1/senderIdRegistration.d.ts +181 -0
  35. package/lib/rest/numbers/v1/senderIdRegistration.js +146 -0
  36. package/lib/rest/numbers/v2/application.d.ts +191 -4
  37. package/lib/rest/numbers/v2/application.js +176 -3
  38. package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
  39. package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
  40. package/lib/rest/previewIam/versionless/organization/user.d.ts +65 -0
  41. package/lib/rest/previewIam/versionless/organization/user.js +72 -1
  42. package/lib/rest/studio/v2/flow/execution.d.ts +24 -0
  43. package/lib/rest/studio/v2/flow/execution.js +10 -0
  44. package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -0
  45. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  46. package/lib/rest/studio/v2/flow.d.ts +6 -0
  47. package/lib/rest/studio/v2/flow.js +2 -0
  48. package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
  49. package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
  50. package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
  51. package/lib/rest/verify/v2/service/newChallenge.js +2 -2
  52. package/lib/rest/verify/v2/service/verification.d.ts +2 -2
  53. package/lib/rest/video/v1/room.d.ts +4 -1
  54. package/lib/twiml/VoiceResponse.d.ts +10 -0
  55. package/package.json +2 -2
  56. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
  57. package/lib/rest/flexApi/v1/createFlexInstance.js +0 -165
@@ -0,0 +1,550 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Sample/reference Twilio API.
9
+ * This is the reference API for the rest-proxy server.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ReportInstance = exports.ReportContextImpl = exports.VoiceIntegrityCallsPerBundle = exports.VoiceIntegrity = exports.StirShakenPercentage = exports.StirShakenCallCount = exports.StirShakenAnswerRate = exports.StirShaken = exports.ReportMetadata = exports.ReportFilter = exports.InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection = exports.InsightsV2InboundPhoneNumberReportCallStatePercentage = exports.InsightsV2CreateAccountReportRequestTimeRange = exports.InsightsV2CreateAccountReportRequest = exports.CountyCarrierValueCarriers = exports.CountyCarrierValue = exports.BrandedUseCaseDetail = exports.BrandedCalling = exports.AccountReportNetworkIssuesTwilioGateway = exports.AccountReportNetworkIssuesSdk = exports.AccountReportNetworkIssues = exports.AccountReportKYTOutboundCarrierCalling = exports.AccountReportKYT = exports.AccountReportCallType = exports.AccountReportCallState = exports.AccountReportCallDirection = exports.AccountReportAnsweringMachineDetection = exports.AccountReport = void 0;
17
+ exports.ReportListInstance = ReportListInstance;
18
+ const util_1 = require("util");
19
+ const deserialize = require("../../../base/deserialize");
20
+ const serialize = require("../../../base/serialize");
21
+ const utility_1 = require("../../../base/utility");
22
+ class AccountReport {
23
+ constructor(payload) {
24
+ this.callDeliverabilityScore = payload["call_deliverability_score"];
25
+ this.callAnswerScore = payload["call_answer_score"];
26
+ this.totalCalls = payload["total_calls"];
27
+ this.callDirection = payload["call_direction"];
28
+ this.callState = payload["call_state"];
29
+ this.callType = payload["call_type"];
30
+ this.aloc = payload["aloc"];
31
+ this.twilioEdgeLocation = payload["twilio_edge_location"];
32
+ this.callerCountryCode = payload["caller_country_code"];
33
+ this.calleeCountryCode = payload["callee_country_code"];
34
+ this.averageQueueTimeMs = payload["average_queue_time_ms"];
35
+ this.silentCallsPercentage = payload["silent_calls_percentage"];
36
+ this.networkIssues = payload["network_issues"];
37
+ this.kYT = payload["KYT"];
38
+ this.answeringMachineDetection = payload["answering_machine_detection"];
39
+ }
40
+ }
41
+ exports.AccountReport = AccountReport;
42
+ /**
43
+ * Number of calls made in each answering machine detection.
44
+ */
45
+ class AccountReportAnsweringMachineDetection {
46
+ constructor(payload) {
47
+ this.totalCalls = payload["total_calls"];
48
+ this.answeredByHumanPercentage = payload["answered_by_human_percentage"];
49
+ this.answeredByMachinePercentage =
50
+ payload["answered_by_machine_percentage"];
51
+ }
52
+ }
53
+ exports.AccountReportAnsweringMachineDetection = AccountReportAnsweringMachineDetection;
54
+ /**
55
+ * Number of calls made in each direction.
56
+ */
57
+ class AccountReportCallDirection {
58
+ constructor(payload) {
59
+ this.outbound = payload["outbound"];
60
+ this.inbound = payload["inbound"];
61
+ }
62
+ }
63
+ exports.AccountReportCallDirection = AccountReportCallDirection;
64
+ /**
65
+ * Number of calls made in each state.
66
+ */
67
+ class AccountReportCallState {
68
+ constructor(payload) {
69
+ this.completed = payload["completed"];
70
+ this.fail = payload["fail"];
71
+ this.busy = payload["busy"];
72
+ this.noanswer = payload["noanswer"];
73
+ this.canceled = payload["canceled"];
74
+ }
75
+ }
76
+ exports.AccountReportCallState = AccountReportCallState;
77
+ /**
78
+ * Number of calls made in each type. `carrier`, `sip`, `trunking`, `client`, `whatsapp`
79
+ */
80
+ class AccountReportCallType {
81
+ constructor(payload) {
82
+ this.carrier = payload["carrier"];
83
+ this.sip = payload["sip"];
84
+ this.trunking = payload["trunking"];
85
+ this.client = payload["client"];
86
+ this.whatsapp = payload["whatsapp"];
87
+ }
88
+ }
89
+ exports.AccountReportCallType = AccountReportCallType;
90
+ /**
91
+ * Know Your Traffic (KYT) metrics focused on outbound carrier performance and trust signals for the report period.
92
+ */
93
+ class AccountReportKYT {
94
+ constructor(payload) {
95
+ this.outboundCarrierCalling = payload["outbound_carrier_calling"];
96
+ }
97
+ }
98
+ exports.AccountReportKYT = AccountReportKYT;
99
+ /**
100
+ * KYT metrics for outbound carrier calling.
101
+ */
102
+ class AccountReportKYTOutboundCarrierCalling {
103
+ constructor(payload) {
104
+ this.uniqueCallingNumbers = payload["unique_calling_numbers"];
105
+ this.uniqueCalledNumbers = payload["unique_called_numbers"];
106
+ this.blockedCallsByCarrier = payload["blocked_calls_by_carrier"];
107
+ this.shortDurationCallsPercentage =
108
+ payload["short_duration_calls_percentage"];
109
+ this.longDurationCallsPercentage =
110
+ payload["long_duration_calls_percentage"];
111
+ this.potentialRobocallsPercentage =
112
+ payload["potential_robocalls_percentage"];
113
+ this.brandedCalling = payload["branded_calling"];
114
+ this.voiceIntegrity = payload["voice_integrity"];
115
+ this.stirShaken = payload["stir_shaken"];
116
+ }
117
+ }
118
+ exports.AccountReportKYTOutboundCarrierCalling = AccountReportKYTOutboundCarrierCalling;
119
+ /**
120
+ * Network-quality indicators for SDK and Twilio Gateway traffic during the report period.
121
+ */
122
+ class AccountReportNetworkIssues {
123
+ constructor(payload) {
124
+ this.sdk = payload["sdk"];
125
+ this.twilioGateway = payload["twilio_gateway"];
126
+ }
127
+ }
128
+ exports.AccountReportNetworkIssues = AccountReportNetworkIssues;
129
+ /**
130
+ * Network issues of calls for client type. This is indicative of local network issues.
131
+ */
132
+ class AccountReportNetworkIssuesSdk {
133
+ constructor(payload) {
134
+ this.iceFailuresPercentage = payload["ice_failures_percentage"];
135
+ this.highLatencyPercentage = payload["high_latency_percentage"];
136
+ this.highPacketLossPercentage = payload["high_packet_loss_percentage"];
137
+ this.highJitterPercentage = payload["high_jitter_percentage"];
138
+ }
139
+ }
140
+ exports.AccountReportNetworkIssuesSdk = AccountReportNetworkIssuesSdk;
141
+ /**
142
+ * Network related metrics for Twilio Gateway calls only.
143
+ */
144
+ class AccountReportNetworkIssuesTwilioGateway {
145
+ constructor(payload) {
146
+ this.highLatencyPercentage = payload["high_latency_percentage"];
147
+ this.highPacketLossPercentage = payload["high_packet_loss_percentage"];
148
+ this.highJitterPercentage = payload["high_jitter_percentage"];
149
+ }
150
+ }
151
+ exports.AccountReportNetworkIssuesTwilioGateway = AccountReportNetworkIssuesTwilioGateway;
152
+ /**
153
+ * Metrics related to Branded Calling bundled calls including CTIA for the report period.
154
+ */
155
+ class BrandedCalling {
156
+ constructor(payload) {
157
+ this.totalBrandedCalls = payload["total_branded_calls"];
158
+ this.percentBrandedCalls = payload["percent_branded_calls"];
159
+ this.answerRate = payload["answer_rate"];
160
+ this.humanAnswerRate = payload["human_answer_rate"];
161
+ this.engagementRate = payload["engagement_rate"];
162
+ this.byUseCase = payload["by_use_case"];
163
+ }
164
+ }
165
+ exports.BrandedCalling = BrandedCalling;
166
+ /**
167
+ * Associated metrics for Branded calls grouped by each use case.
168
+ */
169
+ class BrandedUseCaseDetail {
170
+ constructor(payload) {
171
+ this.useCase = payload["use_case"];
172
+ this.enabledPhonenumbers = payload["enabled_phonenumbers"];
173
+ this.totalCalls = payload["total_calls"];
174
+ this.answerRate = payload["answer_rate"];
175
+ this.humanAnswerRate = payload["human_answer_rate"];
176
+ this.engagementRate = payload["engagement_rate"];
177
+ }
178
+ }
179
+ exports.BrandedUseCaseDetail = BrandedUseCaseDetail;
180
+ class CountyCarrierValue {
181
+ constructor(payload) {
182
+ this.country = payload["country"];
183
+ this.carriers = payload["carriers"];
184
+ }
185
+ }
186
+ exports.CountyCarrierValue = CountyCarrierValue;
187
+ class CountyCarrierValueCarriers {
188
+ constructor(payload) {
189
+ this.carrier = payload["carrier"];
190
+ this.totalCalls = payload["total_calls"];
191
+ this.blockedCalls = payload["blocked_calls"];
192
+ this.blockedCallsPercentage = payload["blocked_calls_percentage"];
193
+ }
194
+ }
195
+ exports.CountyCarrierValueCarriers = CountyCarrierValueCarriers;
196
+ class InsightsV2CreateAccountReportRequest {
197
+ constructor(payload) {
198
+ this.timeRange = payload["time_range"];
199
+ this.filters = payload["filters"];
200
+ }
201
+ }
202
+ exports.InsightsV2CreateAccountReportRequest = InsightsV2CreateAccountReportRequest;
203
+ /**
204
+ * Optional start and end date time for the report window. Defaults to the most recent 7 days when omitted.
205
+ */
206
+ class InsightsV2CreateAccountReportRequestTimeRange {
207
+ constructor(payload) {
208
+ this.startDatetime = payload["start_datetime"];
209
+ this.endDatetime = payload["end_datetime"];
210
+ }
211
+ }
212
+ exports.InsightsV2CreateAccountReportRequestTimeRange = InsightsV2CreateAccountReportRequestTimeRange;
213
+ /**
214
+ * Percentage of calls made in each state.
215
+ */
216
+ class InsightsV2InboundPhoneNumberReportCallStatePercentage {
217
+ constructor(payload) {
218
+ this.completed = payload["completed"];
219
+ this.fail = payload["fail"];
220
+ this.busy = payload["busy"];
221
+ this.noanswer = payload["noanswer"];
222
+ this.canceled = payload["canceled"];
223
+ }
224
+ }
225
+ exports.InsightsV2InboundPhoneNumberReportCallStatePercentage = InsightsV2InboundPhoneNumberReportCallStatePercentage;
226
+ /**
227
+ * Number of calls made in answering machine detection (AMD) enabled.
228
+ */
229
+ class InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection {
230
+ constructor(payload) {
231
+ this.totalCalls = payload["total_calls"];
232
+ this.answeredByHumanPercentage = payload["answered_by_human_percentage"];
233
+ this.answeredByMachinePercentage =
234
+ payload["answered_by_machine_percentage"];
235
+ }
236
+ }
237
+ exports.InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection = InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection;
238
+ class ReportFilter {
239
+ constructor(payload) {
240
+ this.key = payload["key"];
241
+ this.values = payload["values"];
242
+ }
243
+ }
244
+ exports.ReportFilter = ReportFilter;
245
+ class ReportMetadata {
246
+ constructor(payload) {
247
+ this.startDatetime = payload["start_datetime"];
248
+ this.endDatetime = payload["end_datetime"];
249
+ this.filters = payload["filters"];
250
+ }
251
+ }
252
+ exports.ReportMetadata = ReportMetadata;
253
+ /**
254
+ * Metrics related to STIR/SHAKEN attestation A, B, and C for the report period.
255
+ */
256
+ class StirShaken {
257
+ constructor(payload) {
258
+ this.callCount = payload["call_count"];
259
+ this.percentage = payload["percentage"];
260
+ this.answerRate = payload["answer_rate"];
261
+ }
262
+ }
263
+ exports.StirShaken = StirShaken;
264
+ /**
265
+ * Answer rate for each STIR/SHAKEN attestation category.
266
+ */
267
+ class StirShakenAnswerRate {
268
+ constructor(payload) {
269
+ this.stshA = payload["stsh_a"];
270
+ this.stshB = payload["stsh_b"];
271
+ this.stshC = payload["stsh_c"];
272
+ }
273
+ }
274
+ exports.StirShakenAnswerRate = StirShakenAnswerRate;
275
+ /**
276
+ * Total number of calls for each STIR/SHAKEN attestation category.
277
+ */
278
+ class StirShakenCallCount {
279
+ constructor(payload) {
280
+ this.stshA = payload["stsh_a"];
281
+ this.stshB = payload["stsh_b"];
282
+ this.stshC = payload["stsh_c"];
283
+ }
284
+ }
285
+ exports.StirShakenCallCount = StirShakenCallCount;
286
+ /**
287
+ * Percentage of calls for each STIR/SHAKEN attestation category.
288
+ */
289
+ class StirShakenPercentage {
290
+ constructor(payload) {
291
+ this.stshA = payload["stsh_a"];
292
+ this.stshB = payload["stsh_b"];
293
+ this.stshC = payload["stsh_c"];
294
+ }
295
+ }
296
+ exports.StirShakenPercentage = StirShakenPercentage;
297
+ /**
298
+ * Metrics related to Voice Integrity enabled calls for the report period.
299
+ */
300
+ class VoiceIntegrity {
301
+ constructor(payload) {
302
+ this.enabledCalls = payload["enabled_calls"];
303
+ this.enabledPercentage = payload["enabled_percentage"];
304
+ this.callsPerBundle = payload["calls_per_bundle"];
305
+ }
306
+ }
307
+ exports.VoiceIntegrity = VoiceIntegrity;
308
+ class VoiceIntegrityCallsPerBundle {
309
+ constructor(payload) {
310
+ this.bundleSid = payload["bundle_sid"];
311
+ this.enabledPhonenumbers = payload["enabled_phonenumbers"];
312
+ this.totalCalls = payload["total_calls"];
313
+ this.answerRate = payload["answer_rate"];
314
+ this.humanAnswerRate = payload["human_answer_rate"];
315
+ }
316
+ }
317
+ exports.VoiceIntegrityCallsPerBundle = VoiceIntegrityCallsPerBundle;
318
+ class ReportContextImpl {
319
+ constructor(_version, reportId) {
320
+ this._version = _version;
321
+ if (!(0, utility_1.isValidPathParam)(reportId)) {
322
+ throw new Error("Parameter 'reportId' is not valid.");
323
+ }
324
+ this._solution = { reportId };
325
+ this._uri = `/Voice/Reports/${reportId}`;
326
+ }
327
+ create(params, headers, callback) {
328
+ if (params instanceof Function) {
329
+ callback = params;
330
+ params = {};
331
+ }
332
+ else {
333
+ params = params || {};
334
+ }
335
+ let data = {};
336
+ data = params;
337
+ if (headers === null || headers === undefined) {
338
+ headers = {};
339
+ }
340
+ headers["Content-Type"] = "application/json";
341
+ headers["Accept"] = "application/json";
342
+ const instance = this;
343
+ let operationVersion = instance._version, operationPromise = operationVersion.create({
344
+ uri: instance._uri,
345
+ method: "post",
346
+ data,
347
+ headers,
348
+ });
349
+ operationPromise = operationPromise.then((payload) => new ReportInstance(operationVersion, payload, instance._solution.reportId));
350
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
351
+ return operationPromise;
352
+ }
353
+ createWithHttpInfo(params, headers, callback) {
354
+ if (params instanceof Function) {
355
+ callback = params;
356
+ params = {};
357
+ }
358
+ else {
359
+ params = params || {};
360
+ }
361
+ let data = {};
362
+ data = params;
363
+ if (headers === null || headers === undefined) {
364
+ headers = {};
365
+ }
366
+ headers["Content-Type"] = "application/json";
367
+ headers["Accept"] = "application/json";
368
+ const instance = this;
369
+ let operationVersion = instance._version;
370
+ // CREATE, FETCH, UPDATE operations
371
+ let operationPromise = operationVersion
372
+ .createWithResponseInfo({
373
+ uri: instance._uri,
374
+ method: "post",
375
+ data,
376
+ headers,
377
+ })
378
+ .then((response) => ({
379
+ ...response,
380
+ body: new ReportInstance(operationVersion, response.body, instance._solution.reportId),
381
+ }));
382
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
383
+ return operationPromise;
384
+ }
385
+ fetch(callback) {
386
+ const headers = {};
387
+ headers["Accept"] = "application/json";
388
+ const instance = this;
389
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
390
+ uri: instance._uri,
391
+ method: "get",
392
+ headers,
393
+ });
394
+ operationPromise = operationPromise.then((payload) => new ReportInstance(operationVersion, payload, instance._solution.reportId));
395
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
396
+ return operationPromise;
397
+ }
398
+ fetchWithHttpInfo(callback) {
399
+ const headers = {};
400
+ headers["Accept"] = "application/json";
401
+ const instance = this;
402
+ let operationVersion = instance._version;
403
+ // CREATE, FETCH, UPDATE operations
404
+ let operationPromise = operationVersion
405
+ .fetchWithResponseInfo({
406
+ uri: instance._uri,
407
+ method: "get",
408
+ headers,
409
+ })
410
+ .then((response) => ({
411
+ ...response,
412
+ body: new ReportInstance(operationVersion, response.body, instance._solution.reportId),
413
+ }));
414
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
415
+ return operationPromise;
416
+ }
417
+ /**
418
+ * Provide a user-friendly representation
419
+ *
420
+ * @returns Object
421
+ */
422
+ toJSON() {
423
+ return this._solution;
424
+ }
425
+ [util_1.inspect.custom](_depth, options) {
426
+ return (0, util_1.inspect)(this.toJSON(), options);
427
+ }
428
+ }
429
+ exports.ReportContextImpl = ReportContextImpl;
430
+ class ReportInstance {
431
+ constructor(_version, payload, reportId) {
432
+ this._version = _version;
433
+ this.accountSid = payload.account_sid;
434
+ this.reportId = payload.report_id;
435
+ this.status = payload.status;
436
+ this.requestMeta =
437
+ payload.request_meta !== null && payload.request_meta !== undefined
438
+ ? new ReportMetadata(payload.request_meta)
439
+ : null;
440
+ this.url = payload.url;
441
+ this.handle = payload.handle;
442
+ this.totalCalls = deserialize.integer(payload.total_calls);
443
+ this.callAnswerScore = payload.call_answer_score;
444
+ this.callStatePercentage =
445
+ payload.call_state_percentage !== null &&
446
+ payload.call_state_percentage !== undefined
447
+ ? new InsightsV2InboundPhoneNumberReportCallStatePercentage(payload.call_state_percentage)
448
+ : null;
449
+ this.silentCallsPercentage = payload.silent_calls_percentage;
450
+ this.callsByDeviceType = payload.calls_by_device_type;
451
+ this.answerRateDeviceType = payload.answer_rate_device_type;
452
+ this.blockedCallsByCarrier =
453
+ payload.blocked_calls_by_carrier !== null &&
454
+ payload.blocked_calls_by_carrier !== undefined
455
+ ? payload.blocked_calls_by_carrier.map((payload) => new CountyCarrierValue(payload))
456
+ : null;
457
+ this.shortDurationCallsPercentage = payload.short_duration_calls_percentage;
458
+ this.longDurationCallsPercentage = payload.long_duration_calls_percentage;
459
+ this.potentialRobocallsPercentage = payload.potential_robocalls_percentage;
460
+ this.answeringMachineDetection =
461
+ payload.answering_machine_detection !== null &&
462
+ payload.answering_machine_detection !== undefined
463
+ ? new InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection(payload.answering_machine_detection)
464
+ : null;
465
+ this.report =
466
+ payload.report !== null && payload.report !== undefined
467
+ ? new AccountReport(payload.report)
468
+ : null;
469
+ this._solution = { reportId: reportId || this.reportId };
470
+ }
471
+ get _proxy() {
472
+ this._context =
473
+ this._context ||
474
+ new ReportContextImpl(this._version, this._solution.reportId);
475
+ return this._context;
476
+ }
477
+ create(params, callback) {
478
+ return this._proxy.create(params, callback);
479
+ }
480
+ createWithHttpInfo(params, callback) {
481
+ return this._proxy.createWithHttpInfo(params, callback);
482
+ }
483
+ /**
484
+ * Fetch a ReportInstance
485
+ *
486
+ * @param callback - Callback to handle processed record
487
+ *
488
+ * @returns Resolves to processed ReportInstance
489
+ */
490
+ fetch(callback) {
491
+ return this._proxy.fetch(callback);
492
+ }
493
+ /**
494
+ * Fetch a ReportInstance and return HTTP info
495
+ *
496
+ * @param callback - Callback to handle processed record
497
+ *
498
+ * @returns Resolves to processed ReportInstance with HTTP metadata
499
+ */
500
+ fetchWithHttpInfo(callback) {
501
+ return this._proxy.fetchWithHttpInfo(callback);
502
+ }
503
+ /**
504
+ * Provide a user-friendly representation
505
+ *
506
+ * @returns Object
507
+ */
508
+ toJSON() {
509
+ return {
510
+ accountSid: this.accountSid,
511
+ reportId: this.reportId,
512
+ status: this.status,
513
+ requestMeta: this.requestMeta,
514
+ url: this.url,
515
+ handle: this.handle,
516
+ totalCalls: this.totalCalls,
517
+ callAnswerScore: this.callAnswerScore,
518
+ callStatePercentage: this.callStatePercentage,
519
+ silentCallsPercentage: this.silentCallsPercentage,
520
+ callsByDeviceType: this.callsByDeviceType,
521
+ answerRateDeviceType: this.answerRateDeviceType,
522
+ blockedCallsByCarrier: this.blockedCallsByCarrier,
523
+ shortDurationCallsPercentage: this.shortDurationCallsPercentage,
524
+ longDurationCallsPercentage: this.longDurationCallsPercentage,
525
+ potentialRobocallsPercentage: this.potentialRobocallsPercentage,
526
+ answeringMachineDetection: this.answeringMachineDetection,
527
+ report: this.report,
528
+ };
529
+ }
530
+ [util_1.inspect.custom](_depth, options) {
531
+ return (0, util_1.inspect)(this.toJSON(), options);
532
+ }
533
+ }
534
+ exports.ReportInstance = ReportInstance;
535
+ function ReportListInstance(version) {
536
+ const instance = ((reportId) => instance.get(reportId));
537
+ instance.get = function get(reportId) {
538
+ return new ReportContextImpl(version, reportId);
539
+ };
540
+ instance._version = version;
541
+ instance._solution = {};
542
+ instance._uri = ``;
543
+ instance.toJSON = function toJSON() {
544
+ return instance._solution;
545
+ };
546
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
547
+ return (0, util_1.inspect)(instance.toJSON(), options);
548
+ };
549
+ return instance;
550
+ }
@@ -0,0 +1,15 @@
1
+ import MessagingBase from "../MessagingBase";
2
+ import Version from "../../base/Version";
3
+ import { TypingIndicatorListInstance } from "./v3/typingIndicator";
4
+ export default class V3 extends Version {
5
+ /**
6
+ * Initialize the V3 version of Messaging
7
+ *
8
+ * @param domain - The Twilio (Twilio.Messaging) domain
9
+ */
10
+ constructor(domain: MessagingBase);
11
+ /** typingIndicator - { Twilio.Messaging.V3.TypingIndicatorListInstance } resource */
12
+ protected _typingIndicator?: TypingIndicatorListInstance;
13
+ /** Getter for typingIndicator resource */
14
+ get typingIndicator(): TypingIndicatorListInstance;
15
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Messaging
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ const Version_1 = __importDefault(require("../../base/Version"));
20
+ const typingIndicator_1 = require("./v3/typingIndicator");
21
+ class V3 extends Version_1.default {
22
+ /**
23
+ * Initialize the V3 version of Messaging
24
+ *
25
+ * @param domain - The Twilio (Twilio.Messaging) domain
26
+ */
27
+ constructor(domain) {
28
+ super(domain, "v3");
29
+ }
30
+ /** Getter for typingIndicator resource */
31
+ get typingIndicator() {
32
+ this._typingIndicator =
33
+ this._typingIndicator || (0, typingIndicator_1.TypingIndicatorListInstance)(this);
34
+ return this._typingIndicator;
35
+ }
36
+ }
37
+ exports.default = V3;
@@ -27,6 +27,10 @@ export declare class MessagingV2ChannelsSenderConfiguration {
27
27
  * The SID of the Twilio Voice application.
28
28
  */
29
29
  "voiceApplicationSid"?: string | null;
30
+ /**
31
+ * The account type for ISV Account Type Migration. Set to \'ISV\' or \'ISVSubAccount\' to configure, empty string to clear, or omit to preserve the existing value.
32
+ */
33
+ "accountType"?: string | null;
30
34
  constructor(payload: any);
31
35
  }
32
36
  export declare class MessagingV2ChannelsSenderOfflineReasonsItems {
@@ -32,6 +32,7 @@ class MessagingV2ChannelsSenderConfiguration {
32
32
  this.verificationMethod = payload["verification_method"];
33
33
  this.verificationCode = payload["verification_code"];
34
34
  this.voiceApplicationSid = payload["voice_application_sid"];
35
+ this.accountType = payload["account_type"];
35
36
  }
36
37
  }
37
38
  exports.MessagingV2ChannelsSenderConfiguration = MessagingV2ChannelsSenderConfiguration;