twilio 5.13.1 → 6.0.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 (151) hide show
  1. package/README.md +2 -4
  2. package/lib/rest/ConversationsBase.d.ts +3 -0
  3. package/lib/rest/ConversationsBase.js +5 -0
  4. package/lib/rest/InsightsBase.d.ts +3 -0
  5. package/lib/rest/InsightsBase.js +5 -0
  6. package/lib/rest/IntelligenceBase.d.ts +3 -0
  7. package/lib/rest/IntelligenceBase.js +5 -0
  8. package/lib/rest/KnowledgeBase.d.ts +3 -0
  9. package/lib/rest/KnowledgeBase.js +5 -0
  10. package/lib/rest/Memory.d.ts +4 -0
  11. package/lib/rest/Memory.js +8 -0
  12. package/lib/rest/MemoryBase.d.ts +13 -0
  13. package/lib/rest/MemoryBase.js +31 -0
  14. package/lib/rest/MessagingBase.d.ts +3 -0
  15. package/lib/rest/MessagingBase.js +5 -0
  16. package/lib/rest/Twilio.d.ts +5 -0
  17. package/lib/rest/Twilio.js +5 -0
  18. package/lib/rest/VoiceBase.d.ts +3 -0
  19. package/lib/rest/VoiceBase.js +5 -0
  20. package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
  21. package/lib/rest/api/v2010/account/call/recording.js +4 -0
  22. package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
  23. package/lib/rest/api/v2010/account/call/transcription.js +6 -0
  24. package/lib/rest/api/v2010/account/call.d.ts +2 -0
  25. package/lib/rest/api/v2010/account/call.js +4 -0
  26. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
  27. package/lib/rest/api/v2010/account/conference/participant.js +4 -0
  28. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  29. package/lib/rest/api/v2010/account/message.js +4 -0
  30. package/lib/rest/conversations/V2.d.ts +35 -0
  31. package/lib/rest/conversations/V2.js +67 -0
  32. package/lib/rest/conversations/v2/communication.d.ts +479 -0
  33. package/lib/rest/conversations/v2/communication.js +436 -0
  34. package/lib/rest/conversations/v2/configuration.d.ts +906 -0
  35. package/lib/rest/conversations/v2/configuration.js +619 -0
  36. package/lib/rest/conversations/v2/conversation.d.ts +936 -0
  37. package/lib/rest/conversations/v2/conversation.js +664 -0
  38. package/lib/rest/conversations/v2/operation.d.ts +167 -0
  39. package/lib/rest/conversations/v2/operation.js +170 -0
  40. package/lib/rest/conversations/v2/participant.d.ts +469 -0
  41. package/lib/rest/conversations/v2/participant.js +442 -0
  42. package/lib/rest/flexApi/V1.d.ts +0 -5
  43. package/lib/rest/flexApi/V1.js +0 -7
  44. package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
  45. package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
  46. package/lib/rest/iam/V1.d.ts +3 -0
  47. package/lib/rest/iam/V1.js +5 -0
  48. package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
  49. package/lib/rest/iam/v1/rolePermission.js +181 -0
  50. package/lib/rest/insights/V3.d.ts +20 -0
  51. package/lib/rest/insights/V3.js +42 -0
  52. package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
  53. package/lib/rest/insights/v1/call/event.d.ts +4 -4
  54. package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
  55. package/lib/rest/insights/v2/inbound.d.ts +8 -8
  56. package/lib/rest/insights/v2/inbound.js +4 -4
  57. package/lib/rest/insights/v2/outbound.d.ts +8 -8
  58. package/lib/rest/insights/v2/outbound.js +4 -4
  59. package/lib/rest/insights/v2/report.d.ts +8 -8
  60. package/lib/rest/insights/v2/report.js +4 -4
  61. package/lib/rest/insights/v3/metadata.d.ts +115 -0
  62. package/lib/rest/insights/v3/metadata.js +118 -0
  63. package/lib/rest/insights/v3/query.d.ts +180 -0
  64. package/lib/rest/insights/v3/query.js +214 -0
  65. package/lib/rest/intelligence/V3.d.ts +35 -0
  66. package/lib/rest/intelligence/V3.js +65 -0
  67. package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
  68. package/lib/rest/intelligence/v3/configuration.js +528 -0
  69. package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
  70. package/lib/rest/intelligence/v3/conversation.js +342 -0
  71. package/lib/rest/intelligence/v3/operator.d.ts +619 -0
  72. package/lib/rest/intelligence/v3/operator.js +493 -0
  73. package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
  74. package/lib/rest/intelligence/v3/operatorResult.js +478 -0
  75. package/lib/rest/intelligence/v3/version.d.ts +469 -0
  76. package/lib/rest/intelligence/v3/version.js +341 -0
  77. package/lib/rest/knowledge/V2.d.ts +31 -0
  78. package/lib/rest/knowledge/V2.js +62 -0
  79. package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
  80. package/lib/rest/knowledge/v2/chunk.js +178 -0
  81. package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
  82. package/lib/rest/knowledge/v2/knowledge.js +466 -0
  83. package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
  84. package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
  85. package/lib/rest/knowledge/v2/operation.d.ts +162 -0
  86. package/lib/rest/knowledge/v2/operation.js +175 -0
  87. package/lib/rest/knowledge/v2/search.d.ts +180 -0
  88. package/lib/rest/{flexApi/v1/createFlexInstance.js → knowledge/v2/search.js} +45 -36
  89. package/lib/rest/memory/V1.d.ts +76 -0
  90. package/lib/rest/memory/V1.js +140 -0
  91. package/lib/rest/memory/v1/bulk.d.ts +129 -0
  92. package/lib/rest/memory/v1/bulk.js +158 -0
  93. package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
  94. package/lib/rest/memory/v1/conversationSummary.js +473 -0
  95. package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
  96. package/lib/rest/memory/v1/dataMapping.js +512 -0
  97. package/lib/rest/memory/v1/event.d.ts +153 -0
  98. package/lib/rest/memory/v1/event.js +159 -0
  99. package/lib/rest/memory/v1/identifier.d.ts +362 -0
  100. package/lib/rest/memory/v1/identifier.js +369 -0
  101. package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
  102. package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
  103. package/lib/rest/memory/v1/import.d.ts +292 -0
  104. package/lib/rest/memory/v1/import.js +280 -0
  105. package/lib/rest/memory/v1/lookup.d.ts +82 -0
  106. package/lib/rest/memory/v1/lookup.js +118 -0
  107. package/lib/rest/memory/v1/observation.d.ts +521 -0
  108. package/lib/rest/memory/v1/observation.js +477 -0
  109. package/lib/rest/memory/v1/operation.d.ts +162 -0
  110. package/lib/rest/memory/v1/operation.js +175 -0
  111. package/lib/rest/memory/v1/profile.d.ts +441 -0
  112. package/lib/rest/memory/v1/profile.js +467 -0
  113. package/lib/rest/memory/v1/recall.d.ts +306 -0
  114. package/lib/rest/memory/v1/recall.js +234 -0
  115. package/lib/rest/memory/v1/revision.d.ts +246 -0
  116. package/lib/rest/memory/v1/revision.js +195 -0
  117. package/lib/rest/memory/v1/store.d.ts +503 -0
  118. package/lib/rest/memory/v1/store.js +482 -0
  119. package/lib/rest/memory/v1/trait.d.ts +233 -0
  120. package/lib/rest/memory/v1/trait.js +190 -0
  121. package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
  122. package/lib/rest/memory/v1/traitGroup.js +555 -0
  123. package/lib/rest/messaging/V3.d.ts +15 -0
  124. package/lib/rest/messaging/V3.js +37 -0
  125. package/lib/rest/messaging/v2/channelsSender.d.ts +9 -1
  126. package/lib/rest/messaging/v2/channelsSender.js +2 -0
  127. package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
  128. package/lib/rest/messaging/v3/typingIndicator.js +114 -0
  129. package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
  130. package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
  131. package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
  132. package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
  133. package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
  134. package/lib/rest/studio/v2/flow/execution.js +6 -0
  135. package/lib/rest/studio/v2/flow.d.ts +4 -0
  136. package/lib/rest/studio/v2/flow.js +8 -0
  137. package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
  138. package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
  139. package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
  140. package/lib/rest/verify/v2/service/newChallenge.js +2 -2
  141. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  142. package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
  143. package/lib/rest/verify/v2/service/webhook.js +8 -8
  144. package/lib/rest/video/v1/room.d.ts +4 -1
  145. package/lib/rest/voice/V3.d.ts +15 -0
  146. package/lib/rest/voice/V3.js +37 -0
  147. package/lib/rest/voice/v3/transcription.d.ts +378 -0
  148. package/lib/rest/voice/v3/transcription.js +264 -0
  149. package/lib/twiml/VoiceResponse.d.ts +18 -0
  150. package/package.json +2 -2
  151. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
@@ -0,0 +1,555 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio Memory API
9
+ * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities.
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
+ exports.TraitGroupPage = exports.TraitGroupInstance = exports.TraitGroupContextImpl = exports.ValidationRule = exports.TraitGroupRequest = exports.TraitGroupCoreTraitsValue = exports.TraitGroup = exports.TraitDefinition = exports.PatchTraitGroupRequest = exports.Meta = void 0;
20
+ exports.TraitGroupListInstance = TraitGroupListInstance;
21
+ const util_1 = require("util");
22
+ const TokenPage_1 = __importDefault(require("../../../base/TokenPage"));
23
+ const deserialize = require("../../../base/deserialize");
24
+ const serialize = require("../../../base/serialize");
25
+ const utility_1 = require("../../../base/utility");
26
+ class Meta {
27
+ constructor(payload) {
28
+ this.key = payload["key"];
29
+ this.pageSize = payload["pageSize"];
30
+ this.nextToken = payload["nextToken"];
31
+ this.previousToken = payload["previousToken"];
32
+ }
33
+ }
34
+ exports.Meta = Meta;
35
+ class PatchTraitGroupRequest {
36
+ constructor(payload) {
37
+ this.description = payload["description"];
38
+ this.traits = payload["traits"];
39
+ }
40
+ }
41
+ exports.PatchTraitGroupRequest = PatchTraitGroupRequest;
42
+ /**
43
+ * A Trait is a single attribute or characteristic of a profile, such as age, location, or preferences.
44
+ */
45
+ class TraitDefinition {
46
+ constructor(payload) {
47
+ this.dataType = payload["dataType"];
48
+ this.description = payload["description"];
49
+ this.idTypePromotion = payload["idTypePromotion"];
50
+ }
51
+ }
52
+ exports.TraitDefinition = TraitDefinition;
53
+ class TraitGroup {
54
+ constructor(payload) {
55
+ this.displayName = payload["displayName"];
56
+ this.description = payload["description"];
57
+ this.traits = payload["traits"];
58
+ this.version = payload["version"];
59
+ }
60
+ }
61
+ exports.TraitGroup = TraitGroup;
62
+ /**
63
+ * A Trait is a single attribute or characteristic of a profile, such as age, location, or preferences.
64
+ */
65
+ class TraitGroupCoreTraitsValue {
66
+ constructor(payload) {
67
+ this.dataType = payload["dataType"];
68
+ this.description = payload["description"];
69
+ this.validationRule = payload["validationRule"];
70
+ this.idTypePromotion = payload["idTypePromotion"];
71
+ }
72
+ }
73
+ exports.TraitGroupCoreTraitsValue = TraitGroupCoreTraitsValue;
74
+ /**
75
+ * Payload schema for creating Trait Groups.
76
+ */
77
+ class TraitGroupRequest {
78
+ constructor(payload) {
79
+ this.displayName = payload["displayName"];
80
+ this.description = payload["description"];
81
+ this.traits = payload["traits"];
82
+ }
83
+ }
84
+ exports.TraitGroupRequest = TraitGroupRequest;
85
+ class ValidationRule {
86
+ constructor(payload) {
87
+ this.pattern = payload["pattern"];
88
+ this.minLength = payload["minLength"];
89
+ this.maxLength = payload["maxLength"];
90
+ this.ruleType = payload["ruleType"];
91
+ this.min = payload["min"];
92
+ this.max = payload["max"];
93
+ this.minItems = payload["minItems"];
94
+ this.maxItems = payload["maxItems"];
95
+ }
96
+ }
97
+ exports.ValidationRule = ValidationRule;
98
+ class TraitGroupContextImpl {
99
+ constructor(_version, storeId, traitGroupName) {
100
+ this._version = _version;
101
+ if (!(0, utility_1.isValidPathParam)(storeId)) {
102
+ throw new Error("Parameter 'storeId' is not valid.");
103
+ }
104
+ if (!(0, utility_1.isValidPathParam)(traitGroupName)) {
105
+ throw new Error("Parameter 'traitGroupName' is not valid.");
106
+ }
107
+ this._solution = { storeId, traitGroupName };
108
+ this._uri = `/ControlPlane/Stores/${storeId}/TraitGroups/${traitGroupName}`;
109
+ }
110
+ remove(callback) {
111
+ const headers = {};
112
+ headers["Accept"] = "application/json";
113
+ const instance = this;
114
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
115
+ uri: instance._uri,
116
+ method: "delete",
117
+ headers,
118
+ });
119
+ operationPromise = operationPromise.then((payload) => new TraitGroupInstance(operationVersion, payload, instance._solution.storeId, instance._solution.traitGroupName));
120
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
121
+ return operationPromise;
122
+ }
123
+ removeWithHttpInfo(callback) {
124
+ const headers = {};
125
+ headers["Accept"] = "application/json";
126
+ const instance = this;
127
+ let operationVersion = instance._version;
128
+ // DELETE operation that returns a response model
129
+ let operationPromise = operationVersion
130
+ .fetchWithResponseInfo({
131
+ uri: instance._uri,
132
+ method: "delete",
133
+ headers,
134
+ })
135
+ .then((response) => ({
136
+ ...response,
137
+ body: new TraitGroupInstance(operationVersion, response.body, instance._solution.storeId, instance._solution.traitGroupName),
138
+ }));
139
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
140
+ return operationPromise;
141
+ }
142
+ fetch(params, callback) {
143
+ if (params instanceof Function) {
144
+ callback = params;
145
+ params = {};
146
+ }
147
+ else {
148
+ params = params || {};
149
+ }
150
+ let data = {};
151
+ if (params["includeTraits"] !== undefined)
152
+ data["includeTraits"] = serialize.bool(params["includeTraits"]);
153
+ if (params["pageSize"] !== undefined)
154
+ data["pageSize"] = params["pageSize"];
155
+ if (params["pageToken"] !== undefined)
156
+ data["pageToken"] = params["pageToken"];
157
+ if (params["orderBy"] !== undefined)
158
+ data["orderBy"] = params["orderBy"];
159
+ const headers = {};
160
+ headers["Accept"] = "application/json";
161
+ const instance = this;
162
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
163
+ uri: instance._uri,
164
+ method: "get",
165
+ params: data,
166
+ headers,
167
+ });
168
+ operationPromise = operationPromise.then((payload) => new TraitGroupInstance(operationVersion, payload, instance._solution.storeId, instance._solution.traitGroupName));
169
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
170
+ return operationPromise;
171
+ }
172
+ fetchWithHttpInfo(params, callback) {
173
+ if (params instanceof Function) {
174
+ callback = params;
175
+ params = {};
176
+ }
177
+ else {
178
+ params = params || {};
179
+ }
180
+ let data = {};
181
+ if (params["includeTraits"] !== undefined)
182
+ data["includeTraits"] = serialize.bool(params["includeTraits"]);
183
+ if (params["pageSize"] !== undefined)
184
+ data["pageSize"] = params["pageSize"];
185
+ if (params["pageToken"] !== undefined)
186
+ data["pageToken"] = params["pageToken"];
187
+ if (params["orderBy"] !== undefined)
188
+ data["orderBy"] = params["orderBy"];
189
+ const headers = {};
190
+ headers["Accept"] = "application/json";
191
+ const instance = this;
192
+ let operationVersion = instance._version;
193
+ // CREATE, FETCH, UPDATE operations
194
+ let operationPromise = operationVersion
195
+ .fetchWithResponseInfo({
196
+ uri: instance._uri,
197
+ method: "get",
198
+ params: data,
199
+ headers,
200
+ })
201
+ .then((response) => ({
202
+ ...response,
203
+ body: new TraitGroupInstance(operationVersion, response.body, instance._solution.storeId, instance._solution.traitGroupName),
204
+ }));
205
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
206
+ return operationPromise;
207
+ }
208
+ patch(params, headers, callback) {
209
+ if (params instanceof Function) {
210
+ callback = params;
211
+ params = {};
212
+ }
213
+ else {
214
+ params =
215
+ params ||
216
+ {};
217
+ }
218
+ let data = {};
219
+ data = params;
220
+ if (headers === null || headers === undefined) {
221
+ headers = {};
222
+ }
223
+ headers["Content-Type"] = "application/json";
224
+ headers["Accept"] = "application/json";
225
+ const instance = this;
226
+ let operationVersion = instance._version, operationPromise = operationVersion.patch({
227
+ uri: instance._uri,
228
+ method: "patch",
229
+ data,
230
+ headers,
231
+ });
232
+ operationPromise = operationPromise.then((payload) => new TraitGroupInstance(operationVersion, payload, instance._solution.storeId, instance._solution.traitGroupName));
233
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
234
+ return operationPromise;
235
+ }
236
+ patchWithHttpInfo(params, headers, callback) {
237
+ if (params instanceof Function) {
238
+ callback = params;
239
+ params = {};
240
+ }
241
+ else {
242
+ params =
243
+ params ||
244
+ {};
245
+ }
246
+ let data = {};
247
+ data = params;
248
+ if (headers === null || headers === undefined) {
249
+ headers = {};
250
+ }
251
+ headers["Content-Type"] = "application/json";
252
+ headers["Accept"] = "application/json";
253
+ const instance = this;
254
+ let operationVersion = instance._version;
255
+ // CREATE, FETCH, UPDATE operations
256
+ let operationPromise = operationVersion
257
+ .patchWithResponseInfo({
258
+ uri: instance._uri,
259
+ method: "patch",
260
+ data,
261
+ headers,
262
+ })
263
+ .then((response) => ({
264
+ ...response,
265
+ body: new TraitGroupInstance(operationVersion, response.body, instance._solution.storeId, instance._solution.traitGroupName),
266
+ }));
267
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
268
+ return operationPromise;
269
+ }
270
+ /**
271
+ * Provide a user-friendly representation
272
+ *
273
+ * @returns Object
274
+ */
275
+ toJSON() {
276
+ return this._solution;
277
+ }
278
+ [util_1.inspect.custom](_depth, options) {
279
+ return (0, util_1.inspect)(this.toJSON(), options);
280
+ }
281
+ }
282
+ exports.TraitGroupContextImpl = TraitGroupContextImpl;
283
+ class TraitGroupInstance {
284
+ constructor(_version, _payload, storeId, traitGroupName) {
285
+ this._version = _version;
286
+ const payload = _payload;
287
+ this.message = payload.message;
288
+ this.statusUrl = payload.statusUrl;
289
+ this.displayName = payload.displayName;
290
+ this.description = payload.description;
291
+ this.traits = payload.traits;
292
+ this.version = deserialize.integer(payload.version);
293
+ this.traitGroup =
294
+ payload.traitGroup !== null && payload.traitGroup !== undefined
295
+ ? new TraitGroup(payload.traitGroup)
296
+ : null;
297
+ this.meta =
298
+ payload.meta !== null && payload.meta !== undefined
299
+ ? new Meta(payload.meta)
300
+ : null;
301
+ this._solution = { storeId, traitGroupName: traitGroupName };
302
+ }
303
+ get _proxy() {
304
+ this._context =
305
+ this._context ||
306
+ new TraitGroupContextImpl(this._version, this._solution.storeId, this._solution.traitGroupName);
307
+ return this._context;
308
+ }
309
+ /**
310
+ * Remove a TraitGroupInstance
311
+ *
312
+ * @param callback - Callback to handle processed record
313
+ *
314
+ * @returns Resolves to processed TraitGroupInstance
315
+ */
316
+ remove(callback) {
317
+ return this._proxy.remove(callback);
318
+ }
319
+ /**
320
+ * Remove a TraitGroupInstance and return HTTP info
321
+ *
322
+ * @param callback - Callback to handle processed record
323
+ *
324
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
325
+ */
326
+ removeWithHttpInfo(callback) {
327
+ return this._proxy.removeWithHttpInfo(callback);
328
+ }
329
+ fetch(params, callback) {
330
+ return this._proxy.fetch(params, callback);
331
+ }
332
+ fetchWithHttpInfo(params, callback) {
333
+ return this._proxy.fetchWithHttpInfo(params, callback);
334
+ }
335
+ patch(params, callback) {
336
+ return this._proxy.patch(params, callback);
337
+ }
338
+ patchWithHttpInfo(params, callback) {
339
+ return this._proxy.patchWithHttpInfo(params, callback);
340
+ }
341
+ /**
342
+ * Provide a user-friendly representation
343
+ *
344
+ * @returns Object
345
+ */
346
+ toJSON() {
347
+ return {
348
+ message: this.message,
349
+ statusUrl: this.statusUrl,
350
+ displayName: this.displayName,
351
+ description: this.description,
352
+ traits: this.traits,
353
+ version: this.version,
354
+ traitGroup: this.traitGroup,
355
+ meta: this.meta,
356
+ };
357
+ }
358
+ [util_1.inspect.custom](_depth, options) {
359
+ return (0, util_1.inspect)(this.toJSON(), options);
360
+ }
361
+ }
362
+ exports.TraitGroupInstance = TraitGroupInstance;
363
+ function TraitGroupListInstance(version, storeId) {
364
+ if (!(0, utility_1.isValidPathParam)(storeId)) {
365
+ throw new Error("Parameter 'storeId' is not valid.");
366
+ }
367
+ const instance = ((traitGroupName) => instance.get(traitGroupName));
368
+ instance.get = function get(traitGroupName) {
369
+ return new TraitGroupContextImpl(version, storeId, traitGroupName);
370
+ };
371
+ instance._version = version;
372
+ instance._solution = { storeId };
373
+ instance._uri = `/ControlPlane/Stores/${storeId}/TraitGroups`;
374
+ instance.create = function create(params, headers, callback) {
375
+ if (params instanceof Function) {
376
+ callback = params;
377
+ params = {};
378
+ }
379
+ else {
380
+ params =
381
+ params || {};
382
+ }
383
+ let data = {};
384
+ data = params;
385
+ if (headers === null || headers === undefined) {
386
+ headers = {};
387
+ }
388
+ headers["Content-Type"] = "application/json";
389
+ headers["Accept"] = "application/json";
390
+ let operationVersion = version, operationPromise = operationVersion.create({
391
+ uri: instance._uri,
392
+ method: "post",
393
+ data,
394
+ headers,
395
+ });
396
+ operationPromise = operationPromise.then((payload) => new TraitGroupInstance(operationVersion, payload, instance._solution.storeId));
397
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
398
+ return operationPromise;
399
+ };
400
+ instance.createWithHttpInfo = function createWithHttpInfo(params, headers, callback) {
401
+ if (params instanceof Function) {
402
+ callback = params;
403
+ params = {};
404
+ }
405
+ else {
406
+ params =
407
+ params || {};
408
+ }
409
+ let data = {};
410
+ data = params;
411
+ if (headers === null || headers === undefined) {
412
+ headers = {};
413
+ }
414
+ headers["Content-Type"] = "application/json";
415
+ headers["Accept"] = "application/json";
416
+ let operationVersion = version;
417
+ // CREATE, FETCH, UPDATE operations
418
+ let operationPromise = operationVersion
419
+ .createWithResponseInfo({
420
+ uri: instance._uri,
421
+ method: "post",
422
+ data,
423
+ headers,
424
+ })
425
+ .then((response) => ({
426
+ ...response,
427
+ body: new TraitGroupInstance(operationVersion, response.body, instance._solution.storeId),
428
+ }));
429
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
430
+ return operationPromise;
431
+ };
432
+ instance.page = function page(params, callback) {
433
+ if (params instanceof Function) {
434
+ callback = params;
435
+ params = {};
436
+ }
437
+ else {
438
+ params = params || {};
439
+ }
440
+ let data = {};
441
+ if (params["includeTraits"] !== undefined)
442
+ data["includeTraits"] = serialize.bool(params["includeTraits"]);
443
+ if (params["pageSize"] !== undefined)
444
+ data["pageSize"] = params["pageSize"];
445
+ if (params["pageToken"] !== undefined)
446
+ data["pageToken"] = params["pageToken"];
447
+ if (params["orderBy"] !== undefined)
448
+ data["orderBy"] = params["orderBy"];
449
+ const headers = {};
450
+ headers["Accept"] = "application/json";
451
+ let operationVersion = version, operationPromise = operationVersion.page({
452
+ uri: instance._uri,
453
+ method: "get",
454
+ params: data,
455
+ headers,
456
+ });
457
+ operationPromise = operationPromise.then((payload) => new TraitGroupPage(operationVersion, payload, instance._uri, data, instance._solution));
458
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
459
+ return operationPromise;
460
+ };
461
+ instance.each = instance._version.each;
462
+ instance.list = instance._version.list;
463
+ instance.getPage = function getPage(targetUrl, callback) {
464
+ const operationPromise = instance._version._domain.twilio.request({
465
+ method: "get",
466
+ uri: targetUrl,
467
+ });
468
+ let pagePromise = operationPromise.then((payload) => new TraitGroupPage(instance._version, payload, instance._uri, {}, instance._solution));
469
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
470
+ return pagePromise;
471
+ };
472
+ instance.pageWithHttpInfo = function pageWithHttpInfo(params, callback) {
473
+ if (params instanceof Function) {
474
+ callback = params;
475
+ params = {};
476
+ }
477
+ else {
478
+ params = params || {};
479
+ }
480
+ let data = {};
481
+ if (params["includeTraits"] !== undefined)
482
+ data["includeTraits"] = serialize.bool(params["includeTraits"]);
483
+ if (params["pageSize"] !== undefined)
484
+ data["pageSize"] = params["pageSize"];
485
+ if (params["pageToken"] !== undefined)
486
+ data["pageToken"] = params["pageToken"];
487
+ if (params["orderBy"] !== undefined)
488
+ data["orderBy"] = params["orderBy"];
489
+ const headers = {};
490
+ headers["Accept"] = "application/json";
491
+ let operationVersion = version;
492
+ // For page operations, use page() directly as it already returns { statusCode, body, headers }
493
+ // IMPORTANT: Pass full response to Page constructor, not response.body
494
+ let operationPromise = operationVersion
495
+ .page({ uri: instance._uri, method: "get", params: data, headers })
496
+ .then((response) => ({
497
+ statusCode: response.statusCode,
498
+ headers: response.headers,
499
+ body: new TraitGroupPage(operationVersion, response, instance._uri, data, instance._solution),
500
+ }));
501
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
502
+ return operationPromise;
503
+ };
504
+ instance.each = instance._version.each;
505
+ instance.eachWithHttpInfo = instance._version.eachWithHttpInfo;
506
+ instance.list = instance._version.list;
507
+ instance.listWithHttpInfo = instance._version.listWithHttpInfo;
508
+ instance.getPageWithHttpInfo = function getPageWithHttpInfo(targetUrl, callback) {
509
+ // Use request() directly as it already returns { statusCode, body, headers }
510
+ const operationPromise = instance._version._domain.twilio.request({
511
+ method: "get",
512
+ uri: targetUrl,
513
+ });
514
+ let pagePromise = operationPromise.then((response) => ({
515
+ statusCode: response.statusCode,
516
+ headers: response.headers,
517
+ body: new TraitGroupPage(instance._version, response, instance._uri, {}, instance._solution),
518
+ }));
519
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
520
+ return pagePromise;
521
+ };
522
+ instance.toJSON = function toJSON() {
523
+ return instance._solution;
524
+ };
525
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
526
+ return (0, util_1.inspect)(instance.toJSON(), options);
527
+ };
528
+ return instance;
529
+ }
530
+ class TraitGroupPage extends TokenPage_1.default {
531
+ /**
532
+ * Initialize the TraitGroupPage
533
+ *
534
+ * @param version - Version of the resource
535
+ * @param response - Response from the API
536
+ * @param uri - URI of the resource
537
+ * @param params - Query parameters
538
+ * @param solution - Path solution
539
+ */
540
+ constructor(version, response, uri, params, solution) {
541
+ super(version, response, uri, params, solution);
542
+ }
543
+ /**
544
+ * Build an instance of TraitGroupInstance
545
+ *
546
+ * @param payload - Payload response from the API
547
+ */
548
+ getInstance(payload) {
549
+ return new TraitGroupInstance(this._version, payload, this._solution.storeId);
550
+ }
551
+ [util_1.inspect.custom](depth, options) {
552
+ return (0, util_1.inspect)(this.toJSON(), options);
553
+ }
554
+ }
555
+ exports.TraitGroupPage = TraitGroupPage;
@@ -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;
@@ -28,7 +28,7 @@ export declare class MessagingV2ChannelsSenderConfiguration {
28
28
  */
29
29
  "voiceApplicationSid"?: string | null;
30
30
  /**
31
- * The account type for ISV Account Type Migration. Set to \'ISV\' or \'ISVSubAccount\' to configure, null or empty string to clear, or omit to preserve the existing value.
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
32
  */
33
33
  "accountType"?: string | null;
34
34
  constructor(payload: any);
@@ -88,6 +88,10 @@ export declare class MessagingV2ChannelsSenderProfile {
88
88
  * The color theme of the sender. Must be in hex format and have at least a 4:5:1 contrast ratio against white.
89
89
  */
90
90
  "accentColor"?: string | null;
91
+ /**
92
+ * The messaging use case type for the RCS sender. Allowed values are `PROMOTIONAL`, `TRANSACTIONAL`, `OTP`, `MULTI_USE`. Defaults to `MULTI_USE` if not provided. Cannot be modified after launch.
93
+ */
94
+ "useCase"?: string | null;
91
95
  /**
92
96
  * The vertical of the sender. Allowed values are: - `Alcohol` - `Automotive` - `Beauty, Spa and Salon` - `Clothing and Apparel` - `Education` - `Entertainment` - `Event Planning and Service` - `Finance and Banking` - `Food and Grocery` - `Hotel and Lodging` - `Matrimony Service` - `Medical and Health` - `Non-profit` - `Online Gambling` - `OTC Drugs` - `Other` - `Physical Gambling` - `Professional Services` - `Public Service` - `Restaurant` - `Shopping and Retail` - `Travel and Transportation`
93
97
  */
@@ -146,6 +150,10 @@ export declare class MessagingV2ChannelsSenderProfileGenericResponse {
146
150
  * The color theme of the sender. Must be in hex format and have at least a 4:5:1 contrast ratio against white.
147
151
  */
148
152
  "accentColor"?: string | null;
153
+ /**
154
+ * The messaging use case type for the RCS sender. Allowed values are `PROMOTIONAL`, `TRANSACTIONAL`, `OTP`, `MULTI_USE`. Defaults to `MULTI_USE` if not provided. Cannot be modified after launch.
155
+ */
156
+ "useCase"?: string | null;
149
157
  /**
150
158
  * The vertical of the sender. Allowed values are: - `Alcohol` - `Automotive` - `Beauty, Spa and Salon` - `Clothing and Apparel` - `Education` - `Entertainment` - `Event Planning and Service` - `Finance and Banking` - `Food and Grocery` - `Hotel and Lodging` - `Matrimony Service` - `Medical and Health` - `Non-profit` - `Online Gambling` - `OTC Drugs` - `Other` - `Physical Gambling` - `Professional Services` - `Public Service` - `Restaurant` - `Shopping and Retail` - `Travel and Transportation`
151
159
  */
@@ -58,6 +58,7 @@ class MessagingV2ChannelsSenderProfile {
58
58
  this.privacyUrl = payload["privacy_url"];
59
59
  this.termsOfServiceUrl = payload["terms_of_service_url"];
60
60
  this.accentColor = payload["accent_color"];
61
+ this.useCase = payload["use_case"];
61
62
  this.vertical = payload["vertical"];
62
63
  this.websites = payload["websites"];
63
64
  this.emails = payload["emails"];
@@ -79,6 +80,7 @@ class MessagingV2ChannelsSenderProfileGenericResponse {
79
80
  this.privacyUrl = payload["privacy_url"];
80
81
  this.termsOfServiceUrl = payload["terms_of_service_url"];
81
82
  this.accentColor = payload["accent_color"];
83
+ this.useCase = payload["use_case"];
82
84
  this.vertical = payload["vertical"];
83
85
  this.websites = payload["websites"];
84
86
  this.emails = payload["emails"];