twilio 5.12.2 → 5.13.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 (108) hide show
  1. package/README.md +1 -0
  2. package/lib/rest/InsightsBase.d.ts +3 -0
  3. package/lib/rest/InsightsBase.js +5 -0
  4. package/lib/rest/api/v2010/account/call/payment.d.ts +6 -2
  5. package/lib/rest/api/v2010/account/call/payment.js +8 -0
  6. package/lib/rest/api/v2010/account/call/transcription.d.ts +4 -0
  7. package/lib/rest/api/v2010/account/call/transcription.js +8 -0
  8. package/lib/rest/api/v2010/account/token.d.ts +1 -0
  9. package/lib/rest/api/v2010/account/token.js +10 -1
  10. package/lib/rest/assistants/v1/assistant/feedback.d.ts +1 -0
  11. package/lib/rest/assistants/v1/assistant/feedback.js +6 -0
  12. package/lib/rest/assistants/v1/assistant/message.d.ts +1 -0
  13. package/lib/rest/assistants/v1/assistant/message.js +7 -0
  14. package/lib/rest/assistants/v1/assistant.d.ts +6 -0
  15. package/lib/rest/assistants/v1/assistant.js +58 -2
  16. package/lib/rest/assistants/v1/knowledge.d.ts +3 -0
  17. package/lib/rest/assistants/v1/knowledge.js +24 -0
  18. package/lib/rest/assistants/v1/tool.d.ts +4 -0
  19. package/lib/rest/assistants/v1/tool.js +40 -1
  20. package/lib/rest/content/v1/content/approvalCreate.d.ts +1 -0
  21. package/lib/rest/content/v1/content/approvalCreate.js +4 -0
  22. package/lib/rest/content/v1/content.d.ts +27 -0
  23. package/lib/rest/content/v1/content.js +171 -0
  24. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +2 -0
  25. package/lib/rest/flexApi/v1/createFlexInstance.js +6 -0
  26. package/lib/rest/iam/v1/oAuthApp.d.ts +4 -0
  27. package/lib/rest/iam/v1/oAuthApp.js +28 -1
  28. package/lib/rest/insights/V2.d.ts +21 -0
  29. package/lib/rest/insights/V2.js +46 -0
  30. package/lib/rest/insights/v2/inbound.d.ts +436 -0
  31. package/lib/rest/insights/v2/inbound.js +342 -0
  32. package/lib/rest/insights/v2/outbound.d.ts +529 -0
  33. package/lib/rest/insights/v2/outbound.js +392 -0
  34. package/lib/rest/insights/v2/report.d.ts +783 -0
  35. package/lib/rest/insights/v2/report.js +550 -0
  36. package/lib/rest/intelligence/v2/operatorType.d.ts +6 -0
  37. package/lib/rest/intelligence/v2/operatorType.js +4 -0
  38. package/lib/rest/knowledge/v1/knowledge.d.ts +3 -0
  39. package/lib/rest/knowledge/v1/knowledge.js +23 -0
  40. package/lib/rest/lookups/v2/bucket.d.ts +1 -0
  41. package/lib/rest/lookups/v2/bucket.js +4 -0
  42. package/lib/rest/lookups/v2/lookupOverride.d.ts +1 -0
  43. package/lib/rest/lookups/v2/lookupOverride.js +4 -0
  44. package/lib/rest/lookups/v2/phoneNumber.d.ts +9 -0
  45. package/lib/rest/lookups/v2/phoneNumber.js +94 -8
  46. package/lib/rest/lookups/v2/query.d.ts +15 -0
  47. package/lib/rest/lookups/v2/query.js +113 -1
  48. package/lib/rest/lookups/v2/rateLimit.d.ts +1 -0
  49. package/lib/rest/lookups/v2/rateLimit.js +11 -1
  50. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +2 -0
  51. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +13 -1
  52. package/lib/rest/marketplace/v1/referralConversion.d.ts +1 -0
  53. package/lib/rest/marketplace/v1/referralConversion.js +3 -0
  54. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +78 -5
  55. package/lib/rest/messaging/v1/service/usAppToPerson.js +60 -20
  56. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +26 -24
  57. package/lib/rest/messaging/v2/channelsSender.d.ts +18 -0
  58. package/lib/rest/messaging/v2/channelsSender.js +115 -6
  59. package/lib/rest/numbers/V1.d.ts +8 -0
  60. package/lib/rest/numbers/V1.js +12 -0
  61. package/lib/rest/numbers/v1/embeddedSession.d.ts +84 -0
  62. package/lib/rest/numbers/v1/embeddedSession.js +115 -0
  63. package/lib/rest/numbers/v1/portingPortIn.d.ts +5 -0
  64. package/lib/rest/numbers/v1/portingPortIn.js +67 -2
  65. package/lib/rest/numbers/v1/senderIdRegistration.d.ts +181 -0
  66. package/lib/rest/numbers/v1/senderIdRegistration.js +146 -0
  67. package/lib/rest/numbers/v2/application.d.ts +194 -4
  68. package/lib/rest/numbers/v2/application.js +188 -3
  69. package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +1 -0
  70. package/lib/rest/previewIam/versionless/organization/roleAssignment.js +5 -0
  71. package/lib/rest/previewIam/versionless/organization/user.d.ts +69 -0
  72. package/lib/rest/previewIam/versionless/organization/user.js +117 -4
  73. package/lib/rest/pricing/v1/messaging/country.d.ts +3 -0
  74. package/lib/rest/pricing/v1/messaging/country.js +26 -2
  75. package/lib/rest/pricing/v1/phoneNumber/country.d.ts +1 -0
  76. package/lib/rest/pricing/v1/phoneNumber/country.js +10 -1
  77. package/lib/rest/pricing/v1/voice/country.d.ts +2 -0
  78. package/lib/rest/pricing/v1/voice/country.js +21 -2
  79. package/lib/rest/pricing/v1/voice/number.d.ts +2 -0
  80. package/lib/rest/pricing/v1/voice/number.js +19 -2
  81. package/lib/rest/pricing/v2/country.d.ts +2 -0
  82. package/lib/rest/pricing/v2/country.js +22 -2
  83. package/lib/rest/pricing/v2/number.d.ts +2 -0
  84. package/lib/rest/pricing/v2/number.js +22 -2
  85. package/lib/rest/pricing/v2/voice/country.d.ts +2 -0
  86. package/lib/rest/pricing/v2/voice/country.js +22 -2
  87. package/lib/rest/pricing/v2/voice/number.d.ts +2 -0
  88. package/lib/rest/pricing/v2/voice/number.js +20 -2
  89. package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
  90. package/lib/rest/studio/v2/flow/execution.js +4 -0
  91. package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -0
  92. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  93. package/lib/rest/studio/v2/flow.d.ts +6 -0
  94. package/lib/rest/studio/v2/flow.js +2 -0
  95. package/lib/rest/verify/v2/service/approveChallenge.d.ts +2 -0
  96. package/lib/rest/verify/v2/service/approveChallenge.js +13 -0
  97. package/lib/rest/verify/v2/service/newChallenge.d.ts +1 -0
  98. package/lib/rest/verify/v2/service/newChallenge.js +4 -0
  99. package/lib/rest/verify/v2/service/newFactor.d.ts +3 -0
  100. package/lib/rest/verify/v2/service/newFactor.js +16 -0
  101. package/lib/rest/verify/v2/service/newVerifyFactor.d.ts +2 -0
  102. package/lib/rest/verify/v2/service/newVerifyFactor.js +12 -0
  103. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  104. package/lib/rest/video/v1/room/participant/subscribeRules.d.ts +1 -0
  105. package/lib/rest/video/v1/room/participant/subscribeRules.js +12 -1
  106. package/lib/rest/video/v1/room/recordingRules.d.ts +1 -0
  107. package/lib/rest/video/v1/room/recordingRules.js +11 -1
  108. package/package.json +4 -4
@@ -20,6 +20,10 @@ const deserialize = require("../../../base/deserialize");
20
20
  const serialize = require("../../../base/serialize");
21
21
  const utility_1 = require("../../../base/utility");
22
22
  class OverridesRequest {
23
+ constructor(payload) {
24
+ this.lineType = payload["line_type"];
25
+ this.reason = payload["reason"];
26
+ }
23
27
  }
24
28
  exports.OverridesRequest = OverridesRequest;
25
29
  class LookupOverrideContextImpl {
@@ -4,11 +4,13 @@ import { ApiResponse } from "../../../base/ApiResponse";
4
4
  export declare class CallForwardingInfo {
5
5
  "callForwardingEnabled"?: boolean;
6
6
  "errorCode"?: number;
7
+ constructor(payload: any);
7
8
  }
8
9
  export declare class CallerNameInfo {
9
10
  "callerName"?: string;
10
11
  "callerType"?: string;
11
12
  "errorCode"?: number;
13
+ constructor(payload: any);
12
14
  }
13
15
  export declare class IdentityMatchInfo {
14
16
  "firstNameMatch"?: string;
@@ -23,15 +25,18 @@ export declare class IdentityMatchInfo {
23
25
  "summaryScore"?: number;
24
26
  "errorCode"?: number;
25
27
  "errorMessage"?: string;
28
+ constructor(payload: any);
26
29
  }
27
30
  export declare class LastSimSwapInfo {
28
31
  "lastSimSwapDate"?: Date;
29
32
  "swappedPeriod"?: string;
30
33
  "swappedInPeriod"?: boolean;
34
+ constructor(payload: any);
31
35
  }
32
36
  export declare class LineStatusInfo {
33
37
  "status"?: string;
34
38
  "errorCode"?: number;
39
+ constructor(payload: any);
35
40
  }
36
41
  export declare class LineTypeIntelligenceInfo {
37
42
  "mobileCountryCode"?: string;
@@ -39,11 +44,13 @@ export declare class LineTypeIntelligenceInfo {
39
44
  "carrierName"?: string;
40
45
  "type"?: string;
41
46
  "errorCode"?: number;
47
+ constructor(payload: any);
42
48
  }
43
49
  export declare class ReassignedNumberInfo {
44
50
  "lastVerifiedDate"?: string;
45
51
  "isNumberReassigned"?: string;
46
52
  "errorCode"?: string;
53
+ constructor(payload: any);
47
54
  }
48
55
  export declare class SimSwapInfo {
49
56
  "lastSimSwap"?: LastSimSwapInfo;
@@ -51,6 +58,7 @@ export declare class SimSwapInfo {
51
58
  "mobileCountryCode"?: string;
52
59
  "mobileNetworkCode"?: string;
53
60
  "errorCode"?: number;
61
+ constructor(payload: any);
54
62
  }
55
63
  export declare class SmsPumpingRiskInfo {
56
64
  "carrierRiskCategory"?: string;
@@ -59,6 +67,7 @@ export declare class SmsPumpingRiskInfo {
59
67
  "numberBlockedLast3Months"?: boolean;
60
68
  "smsPumpingRiskScore"?: number;
61
69
  "errorCode"?: number;
70
+ constructor(payload: any);
62
71
  }
63
72
  /**
64
73
  * Contains reasons why a phone number is invalid. Possible values: TOO_SHORT, TOO_LONG, INVALID_BUT_POSSIBLE, INVALID_COUNTRY_CODE, INVALID_LENGTH, NOT_A_NUMBER.
@@ -20,30 +20,89 @@ const deserialize = require("../../../base/deserialize");
20
20
  const serialize = require("../../../base/serialize");
21
21
  const utility_1 = require("../../../base/utility");
22
22
  class CallForwardingInfo {
23
+ constructor(payload) {
24
+ this.callForwardingEnabled = payload["call_forwarding_enabled"];
25
+ this.errorCode = payload["error_code"];
26
+ }
23
27
  }
24
28
  exports.CallForwardingInfo = CallForwardingInfo;
25
29
  class CallerNameInfo {
30
+ constructor(payload) {
31
+ this.callerName = payload["caller_name"];
32
+ this.callerType = payload["caller_type"];
33
+ this.errorCode = payload["error_code"];
34
+ }
26
35
  }
27
36
  exports.CallerNameInfo = CallerNameInfo;
28
37
  class IdentityMatchInfo {
38
+ constructor(payload) {
39
+ this.firstNameMatch = payload["first_name_match"];
40
+ this.lastNameMatch = payload["last_name_match"];
41
+ this.addressLinesMatch = payload["address_lines_match"];
42
+ this.cityMatch = payload["city_match"];
43
+ this.stateMatch = payload["state_match"];
44
+ this.postalCodeMatch = payload["postal_code_match"];
45
+ this.addressCountryMatch = payload["address_country_match"];
46
+ this.nationalIdMatch = payload["national_id_match"];
47
+ this.dateOfBirthMatch = payload["date_of_birth_match"];
48
+ this.summaryScore = payload["summary_score"];
49
+ this.errorCode = payload["error_code"];
50
+ this.errorMessage = payload["error_message"];
51
+ }
29
52
  }
30
53
  exports.IdentityMatchInfo = IdentityMatchInfo;
31
54
  class LastSimSwapInfo {
55
+ constructor(payload) {
56
+ this.lastSimSwapDate = payload["last_sim_swap_date"];
57
+ this.swappedPeriod = payload["swapped_period"];
58
+ this.swappedInPeriod = payload["swapped_in_period"];
59
+ }
32
60
  }
33
61
  exports.LastSimSwapInfo = LastSimSwapInfo;
34
62
  class LineStatusInfo {
63
+ constructor(payload) {
64
+ this.status = payload["status"];
65
+ this.errorCode = payload["error_code"];
66
+ }
35
67
  }
36
68
  exports.LineStatusInfo = LineStatusInfo;
37
69
  class LineTypeIntelligenceInfo {
70
+ constructor(payload) {
71
+ this.mobileCountryCode = payload["mobile_country_code"];
72
+ this.mobileNetworkCode = payload["mobile_network_code"];
73
+ this.carrierName = payload["carrier_name"];
74
+ this.type = payload["type"];
75
+ this.errorCode = payload["error_code"];
76
+ }
38
77
  }
39
78
  exports.LineTypeIntelligenceInfo = LineTypeIntelligenceInfo;
40
79
  class ReassignedNumberInfo {
80
+ constructor(payload) {
81
+ this.lastVerifiedDate = payload["last_verified_date"];
82
+ this.isNumberReassigned = payload["is_number_reassigned"];
83
+ this.errorCode = payload["error_code"];
84
+ }
41
85
  }
42
86
  exports.ReassignedNumberInfo = ReassignedNumberInfo;
43
87
  class SimSwapInfo {
88
+ constructor(payload) {
89
+ this.lastSimSwap = payload["last_sim_swap"];
90
+ this.carrierName = payload["carrier_name"];
91
+ this.mobileCountryCode = payload["mobile_country_code"];
92
+ this.mobileNetworkCode = payload["mobile_network_code"];
93
+ this.errorCode = payload["error_code"];
94
+ }
44
95
  }
45
96
  exports.SimSwapInfo = SimSwapInfo;
46
97
  class SmsPumpingRiskInfo {
98
+ constructor(payload) {
99
+ this.carrierRiskCategory = payload["carrier_risk_category"];
100
+ this.numberBlocked = payload["number_blocked"];
101
+ this.numberBlockedDate = payload["number_blocked_date"];
102
+ this.numberBlockedLast3Months = payload["number_blocked_last_3_months"];
103
+ this.smsPumpingRiskScore = payload["sms_pumping_risk_score"];
104
+ this.errorCode = payload["error_code"];
105
+ }
47
106
  }
48
107
  exports.SmsPumpingRiskInfo = SmsPumpingRiskInfo;
49
108
  class PhoneNumberContextImpl {
@@ -187,14 +246,41 @@ class PhoneNumberInstance {
187
246
  this.nationalFormat = payload.national_format;
188
247
  this.valid = payload.valid;
189
248
  this.validationErrors = payload.validation_errors;
190
- this.callerName = payload.caller_name;
191
- this.simSwap = payload.sim_swap;
192
- this.callForwarding = payload.call_forwarding;
193
- this.lineTypeIntelligence = payload.line_type_intelligence;
194
- this.lineStatus = payload.line_status;
195
- this.identityMatch = payload.identity_match;
196
- this.reassignedNumber = payload.reassigned_number;
197
- this.smsPumpingRisk = payload.sms_pumping_risk;
249
+ this.callerName =
250
+ payload.caller_name !== null && payload.caller_name !== undefined
251
+ ? new CallerNameInfo(payload.caller_name)
252
+ : null;
253
+ this.simSwap =
254
+ payload.sim_swap !== null && payload.sim_swap !== undefined
255
+ ? new SimSwapInfo(payload.sim_swap)
256
+ : null;
257
+ this.callForwarding =
258
+ payload.call_forwarding !== null && payload.call_forwarding !== undefined
259
+ ? new CallForwardingInfo(payload.call_forwarding)
260
+ : null;
261
+ this.lineTypeIntelligence =
262
+ payload.line_type_intelligence !== null &&
263
+ payload.line_type_intelligence !== undefined
264
+ ? new LineTypeIntelligenceInfo(payload.line_type_intelligence)
265
+ : null;
266
+ this.lineStatus =
267
+ payload.line_status !== null && payload.line_status !== undefined
268
+ ? new LineStatusInfo(payload.line_status)
269
+ : null;
270
+ this.identityMatch =
271
+ payload.identity_match !== null && payload.identity_match !== undefined
272
+ ? new IdentityMatchInfo(payload.identity_match)
273
+ : null;
274
+ this.reassignedNumber =
275
+ payload.reassigned_number !== null &&
276
+ payload.reassigned_number !== undefined
277
+ ? new ReassignedNumberInfo(payload.reassigned_number)
278
+ : null;
279
+ this.smsPumpingRisk =
280
+ payload.sms_pumping_risk !== null &&
281
+ payload.sms_pumping_risk !== undefined
282
+ ? new SmsPumpingRiskInfo(payload.sms_pumping_risk)
283
+ : null;
198
284
  this.phoneNumberQualityScore = payload.phone_number_quality_score;
199
285
  this.preFill = payload.pre_fill;
200
286
  this.url = payload.url;
@@ -4,11 +4,13 @@ import { ApiResponse } from "../../../base/ApiResponse";
4
4
  export declare class CallForwardingInfo {
5
5
  "callForwardingEnabled"?: boolean;
6
6
  "errorCode"?: number;
7
+ constructor(payload: any);
7
8
  }
8
9
  export declare class CallerNameInfo {
9
10
  "callerName"?: string;
10
11
  "callerType"?: string;
11
12
  "errorCode"?: number;
13
+ constructor(payload: any);
12
14
  }
13
15
  export declare class IdentityMatchInfo {
14
16
  "firstNameMatch"?: string;
@@ -23,6 +25,7 @@ export declare class IdentityMatchInfo {
23
25
  "summaryScore"?: number;
24
26
  "errorCode"?: number;
25
27
  "errorMessage"?: string;
28
+ constructor(payload: any);
26
29
  }
27
30
  export declare class IdentityMatchParameters {
28
31
  "firstName"?: string;
@@ -35,15 +38,18 @@ export declare class IdentityMatchParameters {
35
38
  "addressCountryCode"?: string;
36
39
  "nationalId"?: string;
37
40
  "dateOfBirth"?: string;
41
+ constructor(payload: any);
38
42
  }
39
43
  export declare class LastSimSwapInfo {
40
44
  "lastSimSwapDate"?: Date;
41
45
  "swappedPeriod"?: string;
42
46
  "swappedInPeriod"?: boolean;
47
+ constructor(payload: any);
43
48
  }
44
49
  export declare class LineStatusInfo {
45
50
  "status"?: string;
46
51
  "errorCode"?: number;
52
+ constructor(payload: any);
47
53
  }
48
54
  export declare class LineTypeIntelligenceInfo {
49
55
  "mobileCountryCode"?: string;
@@ -51,6 +57,7 @@ export declare class LineTypeIntelligenceInfo {
51
57
  "carrierName"?: string;
52
58
  "type"?: string;
53
59
  "errorCode"?: number;
60
+ constructor(payload: any);
54
61
  }
55
62
  export declare class LookupBatchRequest {
56
63
  /**
@@ -63,6 +70,7 @@ export declare class LookupBatchRequest {
63
70
  "identityMatch"?: IdentityMatchParameters;
64
71
  "reassignedNumber"?: ReassignedNumberParameters;
65
72
  "smsPumpingRisk"?: RiskParameters;
73
+ constructor(payload: any);
66
74
  }
67
75
  export declare class LookupBatchResponse {
68
76
  /**
@@ -89,20 +97,25 @@ export declare class LookupBatchResponse {
89
97
  "smsPumpingRisk"?: SmsPumpingRiskInfo;
90
98
  "phoneNumberQualityScore"?: any | null;
91
99
  "preFill"?: any | null;
100
+ constructor(payload: any);
92
101
  }
93
102
  export declare class LookupRequest {
94
103
  "phoneNumbers"?: Array<LookupBatchRequest>;
104
+ constructor(payload: any);
95
105
  }
96
106
  export declare class ReassignedNumberInfo {
97
107
  "lastVerifiedDate"?: string;
98
108
  "isNumberReassigned"?: string;
99
109
  "errorCode"?: string;
110
+ constructor(payload: any);
100
111
  }
101
112
  export declare class ReassignedNumberParameters {
102
113
  "lastVerifiedDate"?: string;
114
+ constructor(payload: any);
103
115
  }
104
116
  export declare class RiskParameters {
105
117
  "partnerSubId"?: string;
118
+ constructor(payload: any);
106
119
  }
107
120
  export declare class SimSwapInfo {
108
121
  "lastSimSwap"?: LastSimSwapInfo;
@@ -110,6 +123,7 @@ export declare class SimSwapInfo {
110
123
  "mobileCountryCode"?: string;
111
124
  "mobileNetworkCode"?: string;
112
125
  "errorCode"?: number;
126
+ constructor(payload: any);
113
127
  }
114
128
  export declare class SmsPumpingRiskInfo {
115
129
  "carrierRiskCategory"?: string;
@@ -118,6 +132,7 @@ export declare class SmsPumpingRiskInfo {
118
132
  "numberBlockedLast3Months"?: boolean;
119
133
  "smsPumpingRiskScore"?: number;
120
134
  "errorCode"?: number;
135
+ constructor(payload: any);
121
136
  }
122
137
  /**
123
138
  * Options to pass to create a QueryInstance
@@ -19,48 +19,157 @@ const util_1 = require("util");
19
19
  const deserialize = require("../../../base/deserialize");
20
20
  const serialize = require("../../../base/serialize");
21
21
  class CallForwardingInfo {
22
+ constructor(payload) {
23
+ this.callForwardingEnabled = payload["call_forwarding_enabled"];
24
+ this.errorCode = payload["error_code"];
25
+ }
22
26
  }
23
27
  exports.CallForwardingInfo = CallForwardingInfo;
24
28
  class CallerNameInfo {
29
+ constructor(payload) {
30
+ this.callerName = payload["caller_name"];
31
+ this.callerType = payload["caller_type"];
32
+ this.errorCode = payload["error_code"];
33
+ }
25
34
  }
26
35
  exports.CallerNameInfo = CallerNameInfo;
27
36
  class IdentityMatchInfo {
37
+ constructor(payload) {
38
+ this.firstNameMatch = payload["first_name_match"];
39
+ this.lastNameMatch = payload["last_name_match"];
40
+ this.addressLinesMatch = payload["address_lines_match"];
41
+ this.cityMatch = payload["city_match"];
42
+ this.stateMatch = payload["state_match"];
43
+ this.postalCodeMatch = payload["postal_code_match"];
44
+ this.addressCountryMatch = payload["address_country_match"];
45
+ this.nationalIdMatch = payload["national_id_match"];
46
+ this.dateOfBirthMatch = payload["date_of_birth_match"];
47
+ this.summaryScore = payload["summary_score"];
48
+ this.errorCode = payload["error_code"];
49
+ this.errorMessage = payload["error_message"];
50
+ }
28
51
  }
29
52
  exports.IdentityMatchInfo = IdentityMatchInfo;
30
53
  class IdentityMatchParameters {
54
+ constructor(payload) {
55
+ this.firstName = payload["first_name"];
56
+ this.lastName = payload["last_name"];
57
+ this.addressLine1 = payload["address_line1"];
58
+ this.addressLine2 = payload["address_line2"];
59
+ this.city = payload["city"];
60
+ this.state = payload["state"];
61
+ this.postalCode = payload["postal_code"];
62
+ this.addressCountryCode = payload["address_country_code"];
63
+ this.nationalId = payload["national_id"];
64
+ this.dateOfBirth = payload["date_of_birth"];
65
+ }
31
66
  }
32
67
  exports.IdentityMatchParameters = IdentityMatchParameters;
33
68
  class LastSimSwapInfo {
69
+ constructor(payload) {
70
+ this.lastSimSwapDate = payload["last_sim_swap_date"];
71
+ this.swappedPeriod = payload["swapped_period"];
72
+ this.swappedInPeriod = payload["swapped_in_period"];
73
+ }
34
74
  }
35
75
  exports.LastSimSwapInfo = LastSimSwapInfo;
36
76
  class LineStatusInfo {
77
+ constructor(payload) {
78
+ this.status = payload["status"];
79
+ this.errorCode = payload["error_code"];
80
+ }
37
81
  }
38
82
  exports.LineStatusInfo = LineStatusInfo;
39
83
  class LineTypeIntelligenceInfo {
84
+ constructor(payload) {
85
+ this.mobileCountryCode = payload["mobile_country_code"];
86
+ this.mobileNetworkCode = payload["mobile_network_code"];
87
+ this.carrierName = payload["carrier_name"];
88
+ this.type = payload["type"];
89
+ this.errorCode = payload["error_code"];
90
+ }
40
91
  }
41
92
  exports.LineTypeIntelligenceInfo = LineTypeIntelligenceInfo;
42
93
  class LookupBatchRequest {
94
+ constructor(payload) {
95
+ this.correlationId = payload["correlation_id"];
96
+ this.phoneNumber = payload["phone_number"];
97
+ this.fields = payload["fields"];
98
+ this.countryCode = payload["country_code"];
99
+ this.identityMatch = payload["identity_match"];
100
+ this.reassignedNumber = payload["reassigned_number"];
101
+ this.smsPumpingRisk = payload["sms_pumping_risk"];
102
+ }
43
103
  }
44
104
  exports.LookupBatchRequest = LookupBatchRequest;
45
105
  class LookupBatchResponse {
106
+ constructor(payload) {
107
+ this.correlationId = payload["correlation_id"];
108
+ this.twilioErrorCode = payload["twilio_error_code"];
109
+ this.callingCountryCode = payload["calling_country_code"];
110
+ this.countryCode = payload["country_code"];
111
+ this.phoneNumber = payload["phone_number"];
112
+ this.nationalFormat = payload["national_format"];
113
+ this.valid = payload["valid"];
114
+ this.validationErrors = payload["validation_errors"];
115
+ this.callerName = payload["caller_name"];
116
+ this.simSwap = payload["sim_swap"];
117
+ this.callForwarding = payload["call_forwarding"];
118
+ this.lineTypeIntelligence = payload["line_type_intelligence"];
119
+ this.lineStatus = payload["line_status"];
120
+ this.identityMatch = payload["identity_match"];
121
+ this.reassignedNumber = payload["reassigned_number"];
122
+ this.smsPumpingRisk = payload["sms_pumping_risk"];
123
+ this.phoneNumberQualityScore = payload["phone_number_quality_score"];
124
+ this.preFill = payload["pre_fill"];
125
+ }
46
126
  }
47
127
  exports.LookupBatchResponse = LookupBatchResponse;
48
128
  class LookupRequest {
129
+ constructor(payload) {
130
+ this.phoneNumbers = payload["phone_numbers"];
131
+ }
49
132
  }
50
133
  exports.LookupRequest = LookupRequest;
51
134
  class ReassignedNumberInfo {
135
+ constructor(payload) {
136
+ this.lastVerifiedDate = payload["last_verified_date"];
137
+ this.isNumberReassigned = payload["is_number_reassigned"];
138
+ this.errorCode = payload["error_code"];
139
+ }
52
140
  }
53
141
  exports.ReassignedNumberInfo = ReassignedNumberInfo;
54
142
  class ReassignedNumberParameters {
143
+ constructor(payload) {
144
+ this.lastVerifiedDate = payload["last_verified_date"];
145
+ }
55
146
  }
56
147
  exports.ReassignedNumberParameters = ReassignedNumberParameters;
57
148
  class RiskParameters {
149
+ constructor(payload) {
150
+ this.partnerSubId = payload["partner_sub_id"];
151
+ }
58
152
  }
59
153
  exports.RiskParameters = RiskParameters;
60
154
  class SimSwapInfo {
155
+ constructor(payload) {
156
+ this.lastSimSwap = payload["last_sim_swap"];
157
+ this.carrierName = payload["carrier_name"];
158
+ this.mobileCountryCode = payload["mobile_country_code"];
159
+ this.mobileNetworkCode = payload["mobile_network_code"];
160
+ this.errorCode = payload["error_code"];
161
+ }
61
162
  }
62
163
  exports.SimSwapInfo = SimSwapInfo;
63
164
  class SmsPumpingRiskInfo {
165
+ constructor(payload) {
166
+ this.carrierRiskCategory = payload["carrier_risk_category"];
167
+ this.numberBlocked = payload["number_blocked"];
168
+ this.numberBlockedDate = payload["number_blocked_date"];
169
+ this.numberBlockedLast3Months = payload["number_blocked_last_3_months"];
170
+ this.smsPumpingRiskScore = payload["sms_pumping_risk_score"];
171
+ this.errorCode = payload["error_code"];
172
+ }
64
173
  }
65
174
  exports.SmsPumpingRiskInfo = SmsPumpingRiskInfo;
66
175
  function QueryListInstance(version) {
@@ -135,7 +244,10 @@ function QueryListInstance(version) {
135
244
  class QueryInstance {
136
245
  constructor(_version, payload) {
137
246
  this._version = _version;
138
- this.phoneNumbers = payload.phone_numbers;
247
+ this.phoneNumbers =
248
+ payload.phone_numbers !== null && payload.phone_numbers !== undefined
249
+ ? payload.phone_numbers.map((payload) => new LookupBatchResponse(payload))
250
+ : null;
139
251
  }
140
252
  /**
141
253
  * Provide a user-friendly representation
@@ -25,6 +25,7 @@ export declare class RateLimitResponse {
25
25
  * Time to live of the rule
26
26
  */
27
27
  "ttl"?: number;
28
+ constructor(payload: any);
28
29
  }
29
30
  /**
30
31
  * Options to pass to fetch a RateLimitInstance
@@ -22,6 +22,13 @@ const serialize = require("../../../base/serialize");
22
22
  * Rate limit response schema
23
23
  */
24
24
  class RateLimitResponse {
25
+ constructor(payload) {
26
+ this.field = payload["field"];
27
+ this.limit = payload["limit"];
28
+ this.bucket = payload["bucket"];
29
+ this.owner = payload["owner"];
30
+ this.ttl = payload["ttl"];
31
+ }
25
32
  }
26
33
  exports.RateLimitResponse = RateLimitResponse;
27
34
  function RateLimitListInstance(version) {
@@ -92,7 +99,10 @@ function RateLimitListInstance(version) {
92
99
  class RateLimitInstance {
93
100
  constructor(_version, payload) {
94
101
  this._version = _version;
95
- this.rateLimits = payload.rate_limits;
102
+ this.rateLimits =
103
+ payload.rate_limits !== null && payload.rate_limits !== undefined
104
+ ? payload.rate_limits.map((payload) => new RateLimitResponse(payload))
105
+ : null;
96
106
  }
97
107
  /**
98
108
  * Provide a user-friendly representation
@@ -7,6 +7,7 @@ export declare class MarketplaceV1InstalledAddOnInstalledAddOnUsage {
7
7
  */
8
8
  "totalSubmitted"?: number;
9
9
  "billableItems": Array<MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems>;
10
+ constructor(payload: any);
10
11
  }
11
12
  export declare class MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems {
12
13
  /**
@@ -21,6 +22,7 @@ export declare class MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems
21
22
  * Whether the billing event was successfully generated for this Billable Item.
22
23
  */
23
24
  "submitted"?: boolean;
25
+ constructor(payload: any);
24
26
  }
25
27
  /**
26
28
  * Options to pass to create a InstalledAddOnUsageInstance
@@ -20,9 +20,18 @@ const deserialize = require("../../../../base/deserialize");
20
20
  const serialize = require("../../../../base/serialize");
21
21
  const utility_1 = require("../../../../base/utility");
22
22
  class MarketplaceV1InstalledAddOnInstalledAddOnUsage {
23
+ constructor(payload) {
24
+ this.totalSubmitted = payload["total_submitted"];
25
+ this.billableItems = payload["billable_items"];
26
+ }
23
27
  }
24
28
  exports.MarketplaceV1InstalledAddOnInstalledAddOnUsage = MarketplaceV1InstalledAddOnInstalledAddOnUsage;
25
29
  class MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems {
30
+ constructor(payload) {
31
+ this.quantity = payload["quantity"];
32
+ this.sid = payload["sid"];
33
+ this.submitted = payload["submitted"];
34
+ }
26
35
  }
27
36
  exports.MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems = MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems;
28
37
  function InstalledAddOnUsageListInstance(version, installedAddOnSid) {
@@ -93,7 +102,10 @@ class InstalledAddOnUsageInstance {
93
102
  constructor(_version, payload, installedAddOnSid) {
94
103
  this._version = _version;
95
104
  this.totalSubmitted = payload.total_submitted;
96
- this.billableItems = payload.billable_items;
105
+ this.billableItems =
106
+ payload.billable_items !== null && payload.billable_items !== undefined
107
+ ? payload.billable_items.map((payload) => new MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems(payload))
108
+ : null;
97
109
  }
98
110
  /**
99
111
  * Provide a user-friendly representation
@@ -3,6 +3,7 @@ import V1 from "../V1";
3
3
  import { ApiResponse } from "../../../base/ApiResponse";
4
4
  export declare class CreateReferralConversionRequest {
5
5
  "referralAccountSid"?: string;
6
+ constructor(payload: any);
6
7
  }
7
8
  /**
8
9
  * Options to pass to create a ReferralConversionInstance
@@ -19,6 +19,9 @@ const util_1 = require("util");
19
19
  const deserialize = require("../../../base/deserialize");
20
20
  const serialize = require("../../../base/serialize");
21
21
  class CreateReferralConversionRequest {
22
+ constructor(payload) {
23
+ this.referralAccountSid = payload["referral_account_sid"];
24
+ }
22
25
  }
23
26
  exports.CreateReferralConversionRequest = CreateReferralConversionRequest;
24
27
  function ReferralConversionListInstance(version) {