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
@@ -8,6 +8,7 @@ import { ApprovalFetchListInstance } from "./content/approvalFetch";
8
8
  export declare class AuthenticationAction {
9
9
  "type": AuthenticationActionType;
10
10
  "copyCodeText": string;
11
+ constructor(payload: any);
11
12
  }
12
13
  export type AuthenticationActionType = "COPY_CODE";
13
14
  export declare class CallToActionAction {
@@ -17,6 +18,7 @@ export declare class CallToActionAction {
17
18
  "phone"?: string;
18
19
  "code"?: string;
19
20
  "id"?: string;
21
+ constructor(payload: any);
20
22
  }
21
23
  export type CallToActionActionType = "URL" | "PHONE_NUMBER" | "COPY_CODE" | "VOICE_CALL" | "VOICE_CALL_REQUEST";
22
24
  export declare class CardAction {
@@ -27,6 +29,7 @@ export declare class CardAction {
27
29
  "id"?: string;
28
30
  "code"?: string;
29
31
  "webviewSize"?: WebviewSizeType;
32
+ constructor(payload: any);
30
33
  }
31
34
  export type CardActionType = "URL" | "PHONE_NUMBER" | "QUICK_REPLY" | "COPY_CODE" | "VOICE_CALL";
32
35
  export declare class CarouselAction {
@@ -35,6 +38,7 @@ export declare class CarouselAction {
35
38
  "url"?: string;
36
39
  "phone"?: string;
37
40
  "id"?: string;
41
+ constructor(payload: any);
38
42
  }
39
43
  export type CarouselActionType = "URL" | "PHONE_NUMBER" | "QUICK_REPLY";
40
44
  export declare class CarouselCard {
@@ -42,6 +46,7 @@ export declare class CarouselCard {
42
46
  "body": string;
43
47
  "media": string;
44
48
  "actions": Array<CarouselAction>;
49
+ constructor(payload: any);
45
50
  }
46
51
  export declare class CatalogItem {
47
52
  "id"?: string;
@@ -50,6 +55,7 @@ export declare class CatalogItem {
50
55
  "mediaUrl"?: string;
51
56
  "price"?: number;
52
57
  "description"?: string;
58
+ constructor(payload: any);
53
59
  }
54
60
  /**
55
61
  * Content creation request body
@@ -70,6 +76,7 @@ export declare class ContentCreateRequest {
70
76
  */
71
77
  "language": string;
72
78
  "types": Types;
79
+ constructor(payload: any);
73
80
  }
74
81
  /**
75
82
  * Content update request body
@@ -90,6 +97,7 @@ export declare class ContentUpdateRequest {
90
97
  */
91
98
  "language"?: string;
92
99
  "types": Types;
100
+ constructor(payload: any);
93
101
  }
94
102
  export declare class FlowsPage {
95
103
  "id": string;
@@ -97,20 +105,24 @@ export declare class FlowsPage {
97
105
  "title": string;
98
106
  "subtitle"?: string;
99
107
  "layout": Array<FlowsPageComponent>;
108
+ constructor(payload: any);
100
109
  }
101
110
  export declare class FlowsPageComponent {
102
111
  "label"?: string;
103
112
  "type": string;
113
+ constructor(payload: any);
104
114
  }
105
115
  export declare class ListItem {
106
116
  "id": string;
107
117
  "item": string;
108
118
  "description"?: string;
119
+ constructor(payload: any);
109
120
  }
110
121
  export declare class QuickReplyAction {
111
122
  "type"?: QuickReplyActionType;
112
123
  "title": string;
113
124
  "id"?: string;
125
+ constructor(payload: any);
114
126
  }
115
127
  export type QuickReplyActionType = "QUICK_REPLY";
116
128
  /**
@@ -119,6 +131,7 @@ export type QuickReplyActionType = "QUICK_REPLY";
119
131
  export declare class TwilioCallToAction {
120
132
  "body": string;
121
133
  "actions": Array<CallToActionAction>;
134
+ constructor(payload: any);
122
135
  }
123
136
  /**
124
137
  * twilio/card is a structured template which can be used to send a series of related information. It must include a title and at least one additional field.
@@ -128,6 +141,7 @@ export declare class TwilioCard {
128
141
  "subtitle"?: string;
129
142
  "media"?: Array<string>;
130
143
  "actions"?: Array<CardAction>;
144
+ constructor(payload: any);
131
145
  }
132
146
  /**
133
147
  * twilio/carousel templates allow you to send a single text message accompanied by a set of up to 10 carousel cards in a horizontally scrollable view
@@ -135,6 +149,7 @@ export declare class TwilioCard {
135
149
  export declare class TwilioCarousel {
136
150
  "body": string;
137
151
  "cards": Array<CarouselCard>;
152
+ constructor(payload: any);
138
153
  }
139
154
  /**
140
155
  * twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.
@@ -146,6 +161,7 @@ export declare class TwilioCatalog {
146
161
  "id"?: string;
147
162
  "items"?: Array<CatalogItem>;
148
163
  "dynamicItems"?: string;
164
+ constructor(payload: any);
149
165
  }
150
166
  /**
151
167
  * twilio/flows templates allow you to send multiple messages in a set order with text or select options
@@ -157,6 +173,7 @@ export declare class TwilioFlows {
157
173
  "mediaUrl"?: string;
158
174
  "pages": Array<FlowsPage>;
159
175
  "type": string;
176
+ constructor(payload: any);
160
177
  }
161
178
  /**
162
179
  * twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.
@@ -165,6 +182,7 @@ export declare class TwilioListPicker {
165
182
  "body": string;
166
183
  "button": string;
167
184
  "items": Array<ListItem>;
185
+ constructor(payload: any);
168
186
  }
169
187
  /**
170
188
  * twilio/location type contains a location pin and an optional label, which can be used to enhance delivery notifications or connect recipients to physical experiences you offer.
@@ -175,6 +193,7 @@ export declare class TwilioLocation {
175
193
  "label"?: string;
176
194
  "id"?: string;
177
195
  "address"?: string;
196
+ constructor(payload: any);
178
197
  }
179
198
  /**
180
199
  * twilio/media is used to send file attachments, or to send long text via MMS in the US and Canada. As such, the twilio/media type must contain at least ONE of text or media content.
@@ -182,6 +201,7 @@ export declare class TwilioLocation {
182
201
  export declare class TwilioMedia {
183
202
  "body"?: string;
184
203
  "media": Array<string>;
204
+ constructor(payload: any);
185
205
  }
186
206
  /**
187
207
  * twilio/quick-reply templates let recipients tap, rather than type, to respond to the message.
@@ -189,6 +209,7 @@ export declare class TwilioMedia {
189
209
  export declare class TwilioQuickReply {
190
210
  "body": string;
191
211
  "actions": Array<QuickReplyAction>;
212
+ constructor(payload: any);
192
213
  }
193
214
  /**
194
215
  * twilio/schedule templates allow us to send a message with a schedule with different time slots
@@ -197,12 +218,14 @@ export declare class TwilioSchedule {
197
218
  "id": string;
198
219
  "title": string;
199
220
  "timeSlots": string;
221
+ constructor(payload: any);
200
222
  }
201
223
  /**
202
224
  * Type containing only plain text-based content
203
225
  */
204
226
  export declare class TwilioText {
205
227
  "body": string;
228
+ constructor(payload: any);
206
229
  }
207
230
  /**
208
231
  * Content types
@@ -222,6 +245,7 @@ export declare class Types {
222
245
  "whatsappCard"?: WhatsappCard | null;
223
246
  "whatsappAuthentication"?: WhatsappAuthentication | null;
224
247
  "whatsappFlows"?: WhatsappFlows | null;
248
+ constructor(payload: any);
225
249
  }
226
250
  export type WebviewSizeType = "TALL" | "FULL" | "HALF" | "NONE";
227
251
  /**
@@ -231,6 +255,7 @@ export declare class WhatsappAuthentication {
231
255
  "addSecurityRecommendation"?: boolean;
232
256
  "codeExpirationMinutes"?: number;
233
257
  "actions": Array<AuthenticationAction>;
258
+ constructor(payload: any);
234
259
  }
235
260
  /**
236
261
  * whatsapp/card is a structured template which can be used to send a series of related information. It must include a body and at least one additional field.
@@ -241,6 +266,7 @@ export declare class WhatsappCard {
241
266
  "media"?: Array<string>;
242
267
  "headerText"?: string;
243
268
  "actions"?: Array<CardAction>;
269
+ constructor(payload: any);
244
270
  }
245
271
  /**
246
272
  * whatsapp/flows templates allow you to send multiple messages in a set order with text or select options
@@ -254,6 +280,7 @@ export declare class WhatsappFlows {
254
280
  "flowToken"?: string;
255
281
  "flowFirstPageId"?: string;
256
282
  "isFlowFirstPageEndpoint"?: boolean;
283
+ constructor(payload: any);
257
284
  }
258
285
  /**
259
286
  * Options to pass to update a ContentInstance
@@ -26,135 +26,306 @@ const utility_1 = require("../../../base/utility");
26
26
  const approvalCreate_1 = require("./content/approvalCreate");
27
27
  const approvalFetch_1 = require("./content/approvalFetch");
28
28
  class AuthenticationAction {
29
+ constructor(payload) {
30
+ this.type = payload["type"];
31
+ this.copyCodeText = payload["copy_code_text"];
32
+ }
29
33
  }
30
34
  exports.AuthenticationAction = AuthenticationAction;
31
35
  class CallToActionAction {
36
+ constructor(payload) {
37
+ this.type = payload["type"];
38
+ this.title = payload["title"];
39
+ this.url = payload["url"];
40
+ this.phone = payload["phone"];
41
+ this.code = payload["code"];
42
+ this.id = payload["id"];
43
+ }
32
44
  }
33
45
  exports.CallToActionAction = CallToActionAction;
34
46
  class CardAction {
47
+ constructor(payload) {
48
+ this.type = payload["type"];
49
+ this.title = payload["title"];
50
+ this.url = payload["url"];
51
+ this.phone = payload["phone"];
52
+ this.id = payload["id"];
53
+ this.code = payload["code"];
54
+ this.webviewSize = payload["webview_size"];
55
+ }
35
56
  }
36
57
  exports.CardAction = CardAction;
37
58
  class CarouselAction {
59
+ constructor(payload) {
60
+ this.type = payload["type"];
61
+ this.title = payload["title"];
62
+ this.url = payload["url"];
63
+ this.phone = payload["phone"];
64
+ this.id = payload["id"];
65
+ }
38
66
  }
39
67
  exports.CarouselAction = CarouselAction;
40
68
  class CarouselCard {
69
+ constructor(payload) {
70
+ this.title = payload["title"];
71
+ this.body = payload["body"];
72
+ this.media = payload["media"];
73
+ this.actions = payload["actions"];
74
+ }
41
75
  }
42
76
  exports.CarouselCard = CarouselCard;
43
77
  class CatalogItem {
78
+ constructor(payload) {
79
+ this.id = payload["id"];
80
+ this.sectionTitle = payload["section_title"];
81
+ this.name = payload["name"];
82
+ this.mediaUrl = payload["media_url"];
83
+ this.price = payload["price"];
84
+ this.description = payload["description"];
85
+ }
44
86
  }
45
87
  exports.CatalogItem = CatalogItem;
46
88
  /**
47
89
  * Content creation request body
48
90
  */
49
91
  class ContentCreateRequest {
92
+ constructor(payload) {
93
+ this.friendlyName = payload["friendly_name"];
94
+ this.variables = payload["variables"];
95
+ this.language = payload["language"];
96
+ this.types = payload["types"];
97
+ }
50
98
  }
51
99
  exports.ContentCreateRequest = ContentCreateRequest;
52
100
  /**
53
101
  * Content update request body
54
102
  */
55
103
  class ContentUpdateRequest {
104
+ constructor(payload) {
105
+ this.friendlyName = payload["friendly_name"];
106
+ this.variables = payload["variables"];
107
+ this.language = payload["language"];
108
+ this.types = payload["types"];
109
+ }
56
110
  }
57
111
  exports.ContentUpdateRequest = ContentUpdateRequest;
58
112
  class FlowsPage {
113
+ constructor(payload) {
114
+ this.id = payload["id"];
115
+ this.nextPageId = payload["next_page_id"];
116
+ this.title = payload["title"];
117
+ this.subtitle = payload["subtitle"];
118
+ this.layout = payload["layout"];
119
+ }
59
120
  }
60
121
  exports.FlowsPage = FlowsPage;
61
122
  class FlowsPageComponent {
123
+ constructor(payload) {
124
+ this.label = payload["label"];
125
+ this.type = payload["type"];
126
+ }
62
127
  }
63
128
  exports.FlowsPageComponent = FlowsPageComponent;
64
129
  class ListItem {
130
+ constructor(payload) {
131
+ this.id = payload["id"];
132
+ this.item = payload["item"];
133
+ this.description = payload["description"];
134
+ }
65
135
  }
66
136
  exports.ListItem = ListItem;
67
137
  class QuickReplyAction {
138
+ constructor(payload) {
139
+ this.type = payload["type"];
140
+ this.title = payload["title"];
141
+ this.id = payload["id"];
142
+ }
68
143
  }
69
144
  exports.QuickReplyAction = QuickReplyAction;
70
145
  /**
71
146
  * twilio/call-to-action buttons let recipients tap to trigger actions such as launching a website or making a phone call.
72
147
  */
73
148
  class TwilioCallToAction {
149
+ constructor(payload) {
150
+ this.body = payload["body"];
151
+ this.actions = payload["actions"];
152
+ }
74
153
  }
75
154
  exports.TwilioCallToAction = TwilioCallToAction;
76
155
  /**
77
156
  * twilio/card is a structured template which can be used to send a series of related information. It must include a title and at least one additional field.
78
157
  */
79
158
  class TwilioCard {
159
+ constructor(payload) {
160
+ this.title = payload["title"];
161
+ this.subtitle = payload["subtitle"];
162
+ this.media = payload["media"];
163
+ this.actions = payload["actions"];
164
+ }
80
165
  }
81
166
  exports.TwilioCard = TwilioCard;
82
167
  /**
83
168
  * twilio/carousel templates allow you to send a single text message accompanied by a set of up to 10 carousel cards in a horizontally scrollable view
84
169
  */
85
170
  class TwilioCarousel {
171
+ constructor(payload) {
172
+ this.body = payload["body"];
173
+ this.cards = payload["cards"];
174
+ }
86
175
  }
87
176
  exports.TwilioCarousel = TwilioCarousel;
88
177
  /**
89
178
  * twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.
90
179
  */
91
180
  class TwilioCatalog {
181
+ constructor(payload) {
182
+ this.title = payload["title"];
183
+ this.body = payload["body"];
184
+ this.subtitle = payload["subtitle"];
185
+ this.id = payload["id"];
186
+ this.items = payload["items"];
187
+ this.dynamicItems = payload["dynamic_items"];
188
+ }
92
189
  }
93
190
  exports.TwilioCatalog = TwilioCatalog;
94
191
  /**
95
192
  * twilio/flows templates allow you to send multiple messages in a set order with text or select options
96
193
  */
97
194
  class TwilioFlows {
195
+ constructor(payload) {
196
+ this.body = payload["body"];
197
+ this.buttonText = payload["button_text"];
198
+ this.subtitle = payload["subtitle"];
199
+ this.mediaUrl = payload["media_url"];
200
+ this.pages = payload["pages"];
201
+ this.type = payload["type"];
202
+ }
98
203
  }
99
204
  exports.TwilioFlows = TwilioFlows;
100
205
  /**
101
206
  * twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.
102
207
  */
103
208
  class TwilioListPicker {
209
+ constructor(payload) {
210
+ this.body = payload["body"];
211
+ this.button = payload["button"];
212
+ this.items = payload["items"];
213
+ }
104
214
  }
105
215
  exports.TwilioListPicker = TwilioListPicker;
106
216
  /**
107
217
  * twilio/location type contains a location pin and an optional label, which can be used to enhance delivery notifications or connect recipients to physical experiences you offer.
108
218
  */
109
219
  class TwilioLocation {
220
+ constructor(payload) {
221
+ this.latitude = payload["latitude"];
222
+ this.longitude = payload["longitude"];
223
+ this.label = payload["label"];
224
+ this.id = payload["id"];
225
+ this.address = payload["address"];
226
+ }
110
227
  }
111
228
  exports.TwilioLocation = TwilioLocation;
112
229
  /**
113
230
  * twilio/media is used to send file attachments, or to send long text via MMS in the US and Canada. As such, the twilio/media type must contain at least ONE of text or media content.
114
231
  */
115
232
  class TwilioMedia {
233
+ constructor(payload) {
234
+ this.body = payload["body"];
235
+ this.media = payload["media"];
236
+ }
116
237
  }
117
238
  exports.TwilioMedia = TwilioMedia;
118
239
  /**
119
240
  * twilio/quick-reply templates let recipients tap, rather than type, to respond to the message.
120
241
  */
121
242
  class TwilioQuickReply {
243
+ constructor(payload) {
244
+ this.body = payload["body"];
245
+ this.actions = payload["actions"];
246
+ }
122
247
  }
123
248
  exports.TwilioQuickReply = TwilioQuickReply;
124
249
  /**
125
250
  * twilio/schedule templates allow us to send a message with a schedule with different time slots
126
251
  */
127
252
  class TwilioSchedule {
253
+ constructor(payload) {
254
+ this.id = payload["id"];
255
+ this.title = payload["title"];
256
+ this.timeSlots = payload["timeSlots"];
257
+ }
128
258
  }
129
259
  exports.TwilioSchedule = TwilioSchedule;
130
260
  /**
131
261
  * Type containing only plain text-based content
132
262
  */
133
263
  class TwilioText {
264
+ constructor(payload) {
265
+ this.body = payload["body"];
266
+ }
134
267
  }
135
268
  exports.TwilioText = TwilioText;
136
269
  /**
137
270
  * Content types
138
271
  */
139
272
  class Types {
273
+ constructor(payload) {
274
+ this.twilioText = payload["twilio/text"];
275
+ this.twilioMedia = payload["twilio/media"];
276
+ this.twilioLocation = payload["twilio/location"];
277
+ this.twilioListPicker = payload["twilio/list-picker"];
278
+ this.twilioCallToAction = payload["twilio/call-to-action"];
279
+ this.twilioQuickReply = payload["twilio/quick-reply"];
280
+ this.twilioCard = payload["twilio/card"];
281
+ this.twilioCatalog = payload["twilio/catalog"];
282
+ this.twilioCarousel = payload["twilio/carousel"];
283
+ this.twilioFlows = payload["twilio/flows"];
284
+ this.twilioSchedule = payload["twilio/schedule"];
285
+ this.whatsappCard = payload["whatsapp/card"];
286
+ this.whatsappAuthentication = payload["whatsapp/authentication"];
287
+ this.whatsappFlows = payload["whatsapp/flows"];
288
+ }
140
289
  }
141
290
  exports.Types = Types;
142
291
  /**
143
292
  * whatsApp/authentication templates let companies deliver WA approved one-time-password button.
144
293
  */
145
294
  class WhatsappAuthentication {
295
+ constructor(payload) {
296
+ this.addSecurityRecommendation = payload["add_security_recommendation"];
297
+ this.codeExpirationMinutes = payload["code_expiration_minutes"];
298
+ this.actions = payload["actions"];
299
+ }
146
300
  }
147
301
  exports.WhatsappAuthentication = WhatsappAuthentication;
148
302
  /**
149
303
  * whatsapp/card is a structured template which can be used to send a series of related information. It must include a body and at least one additional field.
150
304
  */
151
305
  class WhatsappCard {
306
+ constructor(payload) {
307
+ this.body = payload["body"];
308
+ this.footer = payload["footer"];
309
+ this.media = payload["media"];
310
+ this.headerText = payload["header_text"];
311
+ this.actions = payload["actions"];
312
+ }
152
313
  }
153
314
  exports.WhatsappCard = WhatsappCard;
154
315
  /**
155
316
  * whatsapp/flows templates allow you to send multiple messages in a set order with text or select options
156
317
  */
157
318
  class WhatsappFlows {
319
+ constructor(payload) {
320
+ this.body = payload["body"];
321
+ this.buttonText = payload["button_text"];
322
+ this.subtitle = payload["subtitle"];
323
+ this.mediaUrl = payload["media_url"];
324
+ this.flowId = payload["flow_id"];
325
+ this.flowToken = payload["flow_token"];
326
+ this.flowFirstPageId = payload["flow_first_page_id"];
327
+ this.isFlowFirstPageEndpoint = payload["is_flow_first_page_endpoint"];
328
+ }
158
329
  }
159
330
  exports.WhatsappFlows = WhatsappFlows;
160
331
  class ContentContextImpl {
@@ -3,12 +3,14 @@ import V1 from "../V1";
3
3
  import { ApiResponse } from "../../../base/ApiResponse";
4
4
  export declare class CreateInstanceRequestBody {
5
5
  "conversation"?: CreateInstanceRequestBodyConversation;
6
+ constructor(payload: any);
6
7
  }
7
8
  export declare class CreateInstanceRequestBodyConversation {
8
9
  /**
9
10
  * Set newly created conversation service as the default conversation service
10
11
  */
11
12
  "_default"?: boolean;
13
+ constructor(payload: any);
12
14
  }
13
15
  /**
14
16
  * Options to pass to create a CreateFlexInstanceInstance
@@ -19,9 +19,15 @@ const util_1 = require("util");
19
19
  const deserialize = require("../../../base/deserialize");
20
20
  const serialize = require("../../../base/serialize");
21
21
  class CreateInstanceRequestBody {
22
+ constructor(payload) {
23
+ this.conversation = payload["Conversation"];
24
+ }
22
25
  }
23
26
  exports.CreateInstanceRequestBody = CreateInstanceRequestBody;
24
27
  class CreateInstanceRequestBodyConversation {
28
+ constructor(payload) {
29
+ this._default = payload["Default"];
30
+ }
25
31
  }
26
32
  exports.CreateInstanceRequestBodyConversation = CreateInstanceRequestBodyConversation;
27
33
  class CreateFlexInstanceContextImpl {
@@ -9,6 +9,7 @@ export declare class IamV1AccountVendorOauthAppCreateRequest {
9
9
  "clientSid"?: string | null;
10
10
  "policy"?: IamV1OrganizationVendoroauthappPolicy;
11
11
  "accessTokenTtl"?: number;
12
+ constructor(payload: any);
12
13
  }
13
14
  export declare class IamV1AccountVendorOauthAppUpdateRequest {
14
15
  "type"?: string | null;
@@ -16,6 +17,7 @@ export declare class IamV1AccountVendorOauthAppUpdateRequest {
16
17
  "description"?: string | null;
17
18
  "policy"?: IamV1OrganizationVendorOauthAppUpdateRequestPolicy | null;
18
19
  "accessTokenTtl"?: number | null;
20
+ constructor(payload: any);
19
21
  }
20
22
  export declare class IamV1OrganizationVendorOauthAppUpdateRequestPolicy {
21
23
  /**
@@ -26,6 +28,7 @@ export declare class IamV1OrganizationVendorOauthAppUpdateRequestPolicy {
26
28
  * Set of permissions explicitly denied
27
29
  */
28
30
  "deny"?: Array<string>;
31
+ constructor(payload: any);
29
32
  }
30
33
  export declare class IamV1OrganizationVendoroauthappPolicy {
31
34
  /**
@@ -36,6 +39,7 @@ export declare class IamV1OrganizationVendoroauthappPolicy {
36
39
  * Set of permissions explicitly denied
37
40
  */
38
41
  "deny"?: Array<string>;
42
+ constructor(payload: any);
39
43
  }
40
44
  /**
41
45
  * Options to pass to update a OAuthAppInstance
@@ -20,15 +20,39 @@ const deserialize = require("../../../base/deserialize");
20
20
  const serialize = require("../../../base/serialize");
21
21
  const utility_1 = require("../../../base/utility");
22
22
  class IamV1AccountVendorOauthAppCreateRequest {
23
+ constructor(payload) {
24
+ this.type = payload["type"];
25
+ this.friendlyName = payload["friendly_name"];
26
+ this.ownerSid = payload["owner_sid"];
27
+ this.description = payload["description"];
28
+ this.clientSid = payload["client_sid"];
29
+ this.policy = payload["policy"];
30
+ this.accessTokenTtl = payload["access_token_ttl"];
31
+ }
23
32
  }
24
33
  exports.IamV1AccountVendorOauthAppCreateRequest = IamV1AccountVendorOauthAppCreateRequest;
25
34
  class IamV1AccountVendorOauthAppUpdateRequest {
35
+ constructor(payload) {
36
+ this.type = payload["type"];
37
+ this.friendlyName = payload["friendly_name"];
38
+ this.description = payload["description"];
39
+ this.policy = payload["policy"];
40
+ this.accessTokenTtl = payload["access_token_ttl"];
41
+ }
26
42
  }
27
43
  exports.IamV1AccountVendorOauthAppUpdateRequest = IamV1AccountVendorOauthAppUpdateRequest;
28
44
  class IamV1OrganizationVendorOauthAppUpdateRequestPolicy {
45
+ constructor(payload) {
46
+ this.allow = payload["allow"];
47
+ this.deny = payload["deny"];
48
+ }
29
49
  }
30
50
  exports.IamV1OrganizationVendorOauthAppUpdateRequestPolicy = IamV1OrganizationVendorOauthAppUpdateRequestPolicy;
31
51
  class IamV1OrganizationVendoroauthappPolicy {
52
+ constructor(payload) {
53
+ this.allow = payload["allow"];
54
+ this.deny = payload["deny"];
55
+ }
32
56
  }
33
57
  exports.IamV1OrganizationVendoroauthappPolicy = IamV1OrganizationVendoroauthappPolicy;
34
58
  class OAuthAppContextImpl {
@@ -139,7 +163,10 @@ class OAuthAppInstance {
139
163
  this.createdBy = payload.created_by;
140
164
  this.secret = payload.secret;
141
165
  this.status = payload.status;
142
- this.policy = payload.policy;
166
+ this.policy =
167
+ payload.policy !== null && payload.policy !== undefined
168
+ ? new IamV1OrganizationVendoroauthappPolicy(payload.policy)
169
+ : null;
143
170
  this.accessTokenTtl = deserialize.integer(payload.access_token_ttl);
144
171
  this.code = payload.code;
145
172
  this.message = payload.message;
@@ -0,0 +1,21 @@
1
+ import InsightsBase from "../InsightsBase";
2
+ import Version from "../../base/Version";
3
+ import { InboundListInstance } from "./v2/inbound";
4
+ import { OutboundListInstance } from "./v2/outbound";
5
+ import { ReportListInstance } from "./v2/report";
6
+ export default class V2 extends Version {
7
+ /**
8
+ * Initialize the V2 version of Insights
9
+ *
10
+ * @param domain - The Twilio (Twilio.Insights) domain
11
+ */
12
+ constructor(domain: InsightsBase);
13
+ /** reports - { Twilio.Insights.V2.ReportListInstance } resource */
14
+ protected _reports?: ReportListInstance;
15
+ /** Accessor for inbound resource */
16
+ inbound(reportId: string): InboundListInstance;
17
+ /** Accessor for outbound resource */
18
+ outbound(reportId: string): OutboundListInstance;
19
+ /** Getter for reports resource */
20
+ get reports(): ReportListInstance;
21
+ }
@@ -0,0 +1,46 @@
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
+ 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 inbound_1 = require("./v2/inbound");
21
+ const outbound_1 = require("./v2/outbound");
22
+ const report_1 = require("./v2/report");
23
+ class V2 extends Version_1.default {
24
+ /**
25
+ * Initialize the V2 version of Insights
26
+ *
27
+ * @param domain - The Twilio (Twilio.Insights) domain
28
+ */
29
+ constructor(domain) {
30
+ super(domain, "v2");
31
+ }
32
+ /** Accessor for inbound resource */
33
+ inbound(reportId) {
34
+ return (0, inbound_1.InboundListInstance)(this, reportId);
35
+ }
36
+ /** Accessor for outbound resource */
37
+ outbound(reportId) {
38
+ return (0, outbound_1.OutboundListInstance)(this, reportId);
39
+ }
40
+ /** Getter for reports resource */
41
+ get reports() {
42
+ this._reports = this._reports || (0, report_1.ReportListInstance)(this);
43
+ return this._reports;
44
+ }
45
+ }
46
+ exports.default = V2;