twilio 6.0.0 → 6.0.2

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 (121) hide show
  1. package/lib/rest/ConversationsBase.d.ts +3 -0
  2. package/lib/rest/ConversationsBase.js +5 -0
  3. package/lib/rest/InsightsBase.d.ts +3 -0
  4. package/lib/rest/InsightsBase.js +5 -0
  5. package/lib/rest/IntelligenceBase.d.ts +3 -0
  6. package/lib/rest/IntelligenceBase.js +5 -0
  7. package/lib/rest/KnowledgeBase.d.ts +3 -0
  8. package/lib/rest/KnowledgeBase.js +5 -0
  9. package/lib/rest/Memory.d.ts +4 -0
  10. package/lib/rest/Memory.js +8 -0
  11. package/lib/rest/MemoryBase.d.ts +13 -0
  12. package/lib/rest/MemoryBase.js +31 -0
  13. package/lib/rest/Twilio.d.ts +5 -0
  14. package/lib/rest/Twilio.js +5 -0
  15. package/lib/rest/VoiceBase.d.ts +3 -0
  16. package/lib/rest/VoiceBase.js +5 -0
  17. package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
  18. package/lib/rest/api/v2010/account/call/recording.js +4 -0
  19. package/lib/rest/api/v2010/account/call/transcription.d.ts +1 -1
  20. package/lib/rest/api/v2010/account/call/transcription.js +6 -4
  21. package/lib/rest/api/v2010/account/call.d.ts +2 -0
  22. package/lib/rest/api/v2010/account/call.js +4 -0
  23. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
  24. package/lib/rest/api/v2010/account/conference/participant.js +4 -0
  25. package/lib/rest/conversations/V2.d.ts +38 -0
  26. package/lib/rest/conversations/V2.js +72 -0
  27. package/lib/rest/conversations/v2/action.d.ts +241 -0
  28. package/lib/rest/conversations/v2/action.js +246 -0
  29. package/lib/rest/conversations/v2/communication.d.ts +479 -0
  30. package/lib/rest/conversations/v2/communication.js +436 -0
  31. package/lib/rest/conversations/v2/configuration.d.ts +906 -0
  32. package/lib/rest/conversations/v2/configuration.js +619 -0
  33. package/lib/rest/conversations/v2/conversation.d.ts +936 -0
  34. package/lib/rest/conversations/v2/conversation.js +664 -0
  35. package/lib/rest/conversations/v2/operation.d.ts +167 -0
  36. package/lib/rest/conversations/v2/operation.js +170 -0
  37. package/lib/rest/conversations/v2/participant.d.ts +469 -0
  38. package/lib/rest/conversations/v2/participant.js +442 -0
  39. package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
  40. package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
  41. package/lib/rest/insights/V3.d.ts +20 -0
  42. package/lib/rest/insights/V3.js +42 -0
  43. package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
  44. package/lib/rest/insights/v1/call/event.d.ts +4 -4
  45. package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
  46. package/lib/rest/insights/v3/metadata.d.ts +115 -0
  47. package/lib/rest/insights/v3/metadata.js +118 -0
  48. package/lib/rest/insights/v3/query.d.ts +180 -0
  49. package/lib/rest/insights/v3/query.js +214 -0
  50. package/lib/rest/intelligence/V3.d.ts +35 -0
  51. package/lib/rest/intelligence/V3.js +65 -0
  52. package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
  53. package/lib/rest/intelligence/v3/configuration.js +528 -0
  54. package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
  55. package/lib/rest/intelligence/v3/conversation.js +342 -0
  56. package/lib/rest/intelligence/v3/operator.d.ts +619 -0
  57. package/lib/rest/intelligence/v3/operator.js +493 -0
  58. package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
  59. package/lib/rest/intelligence/v3/operatorResult.js +478 -0
  60. package/lib/rest/intelligence/v3/version.d.ts +469 -0
  61. package/lib/rest/intelligence/v3/version.js +341 -0
  62. package/lib/rest/knowledge/V2.d.ts +31 -0
  63. package/lib/rest/knowledge/V2.js +62 -0
  64. package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
  65. package/lib/rest/knowledge/v2/chunk.js +178 -0
  66. package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
  67. package/lib/rest/knowledge/v2/knowledge.js +466 -0
  68. package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
  69. package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
  70. package/lib/rest/knowledge/v2/operation.d.ts +162 -0
  71. package/lib/rest/knowledge/v2/operation.js +175 -0
  72. package/lib/rest/knowledge/v2/search.d.ts +180 -0
  73. package/lib/rest/knowledge/v2/search.js +174 -0
  74. package/lib/rest/memory/V1.d.ts +76 -0
  75. package/lib/rest/memory/V1.js +140 -0
  76. package/lib/rest/memory/v1/bulk.d.ts +129 -0
  77. package/lib/rest/memory/v1/bulk.js +158 -0
  78. package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
  79. package/lib/rest/memory/v1/conversationSummary.js +473 -0
  80. package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
  81. package/lib/rest/memory/v1/dataMapping.js +512 -0
  82. package/lib/rest/memory/v1/event.d.ts +153 -0
  83. package/lib/rest/memory/v1/event.js +159 -0
  84. package/lib/rest/memory/v1/identifier.d.ts +362 -0
  85. package/lib/rest/memory/v1/identifier.js +369 -0
  86. package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
  87. package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
  88. package/lib/rest/memory/v1/import.d.ts +292 -0
  89. package/lib/rest/memory/v1/import.js +280 -0
  90. package/lib/rest/memory/v1/lookup.d.ts +82 -0
  91. package/lib/rest/memory/v1/lookup.js +118 -0
  92. package/lib/rest/memory/v1/observation.d.ts +521 -0
  93. package/lib/rest/memory/v1/observation.js +477 -0
  94. package/lib/rest/memory/v1/operation.d.ts +162 -0
  95. package/lib/rest/memory/v1/operation.js +175 -0
  96. package/lib/rest/memory/v1/profile.d.ts +548 -0
  97. package/lib/rest/memory/v1/profile.js +531 -0
  98. package/lib/rest/memory/v1/recall.d.ts +306 -0
  99. package/lib/rest/memory/v1/recall.js +234 -0
  100. package/lib/rest/memory/v1/revision.d.ts +246 -0
  101. package/lib/rest/memory/v1/revision.js +195 -0
  102. package/lib/rest/memory/v1/store.d.ts +544 -0
  103. package/lib/rest/memory/v1/store.js +534 -0
  104. package/lib/rest/memory/v1/trait.d.ts +233 -0
  105. package/lib/rest/memory/v1/trait.js +190 -0
  106. package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
  107. package/lib/rest/memory/v1/traitGroup.js +555 -0
  108. package/lib/rest/messaging/v2/channelsSender.d.ts +8 -0
  109. package/lib/rest/messaging/v2/channelsSender.js +2 -0
  110. package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
  111. package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
  112. package/lib/rest/studio/v2/flow.d.ts +4 -0
  113. package/lib/rest/studio/v2/flow.js +8 -0
  114. package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
  115. package/lib/rest/verify/v2/service/webhook.js +8 -8
  116. package/lib/rest/voice/V3.d.ts +15 -0
  117. package/lib/rest/voice/V3.js +37 -0
  118. package/lib/rest/voice/v3/transcription.d.ts +378 -0
  119. package/lib/rest/voice/v3/transcription.js +264 -0
  120. package/lib/twiml/VoiceResponse.d.ts +8 -0
  121. package/package.json +1 -1
@@ -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;
@@ -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"];
@@ -16,6 +16,14 @@ export declare class PublicApiCreateRoleAssignmentRequest {
16
16
  * Twilio Sid representing identity of this assignment
17
17
  */
18
18
  "identity": string;
19
+ /**
20
+ * The resource type for resource-level role assignments
21
+ */
22
+ "resourceType"?: string | null;
23
+ /**
24
+ * The resource id for resource-level role assignments
25
+ */
26
+ "resourceId"?: string | null;
19
27
  constructor(payload: any);
20
28
  }
21
29
  /**
@@ -35,6 +43,10 @@ export interface RoleAssignmentListInstanceEachOptions {
35
43
  identity?: string;
36
44
  /** */
37
45
  scope?: string;
46
+ /** Filter by resource type for resource-level role assignments */
47
+ resourceType?: string;
48
+ /** Filter by resource id for resource-level role assignments */
49
+ resourceId?: string;
38
50
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
39
51
  callback?: (item: RoleAssignmentInstance, done: (err?: Error) => void) => void;
40
52
  /** Function to be called upon completion of streaming */
@@ -52,6 +64,10 @@ export interface RoleAssignmentListInstanceOptions {
52
64
  identity?: string;
53
65
  /** */
54
66
  scope?: string;
67
+ /** Filter by resource type for resource-level role assignments */
68
+ resourceType?: string;
69
+ /** Filter by resource id for resource-level role assignments */
70
+ resourceId?: string;
55
71
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
56
72
  limit?: number;
57
73
  }
@@ -65,6 +81,10 @@ export interface RoleAssignmentListInstancePageOptions {
65
81
  identity?: string;
66
82
  /** */
67
83
  scope?: string;
84
+ /** Filter by resource type for resource-level role assignments */
85
+ resourceType?: string;
86
+ /** Filter by resource id for resource-level role assignments */
87
+ resourceId?: string;
68
88
  /** Page Number, this value is simply for client state */
69
89
  pageNumber?: number;
70
90
  /** PageToken provided by the API */
@@ -120,6 +140,8 @@ interface RoleAssignmentResource {
120
140
  role_sid: string;
121
141
  scope: string;
122
142
  identity: string;
143
+ resource_type: string;
144
+ resource_id: string;
123
145
  code: number;
124
146
  message: string;
125
147
  moreInfo: string;
@@ -146,6 +168,14 @@ export declare class RoleAssignmentInstance {
146
168
  * Twilio Sid representing scope of this assignment
147
169
  */
148
170
  identity: string;
171
+ /**
172
+ * The resource type for resource-level role assignments
173
+ */
174
+ resourceType: string;
175
+ /**
176
+ * The resource id for resource-level role assignments
177
+ */
178
+ resourceId: string;
149
179
  /**
150
180
  * Twilio-specific error code
151
181
  */
@@ -189,6 +219,8 @@ export declare class RoleAssignmentInstance {
189
219
  roleSid: string;
190
220
  scope: string;
191
221
  identity: string;
222
+ resourceType: string;
223
+ resourceId: string;
192
224
  code: number;
193
225
  message: string;
194
226
  moreInfo: string;