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,758 @@
1
+ import { inspect, InspectOptions } from "util";
2
+ import TokenPage, { TokenPaginationPayload } from "../../../base/TokenPage";
3
+ import Response from "../../../http/response";
4
+ import V1 from "../V1";
5
+ import { ApiResponse } from "../../../base/ApiResponse";
6
+ export declare class Meta {
7
+ /**
8
+ * The key of the list property contains the actual data items. This enables programmatic iteration over paginated results.
9
+ */
10
+ "key"?: string;
11
+ "pageSize"?: number;
12
+ "nextToken"?: string;
13
+ "previousToken"?: string;
14
+ constructor(payload: any);
15
+ }
16
+ export declare class PatchTraitGroupRequest {
17
+ /**
18
+ * Updated description of the Trait Group
19
+ */
20
+ "description"?: string;
21
+ /**
22
+ * Map of traits to add, update, or remove in this Trait Group, where the key is the trait name. - To update/add a trait: provide the complete TraitDefinition object - To remove a trait: set dataType to an empty string (\"\")
23
+ */
24
+ "traits"?: {
25
+ [key: string]: TraitDefinition;
26
+ };
27
+ constructor(payload: any);
28
+ }
29
+ /**
30
+ * A Trait is a single attribute or characteristic of a profile, such as age, location, or preferences.
31
+ */
32
+ export declare class TraitDefinition {
33
+ /**
34
+ * Data type of the Trait, such as STRING, NUMBER, BOOLEAN, ARRAY. For DELETE operations in PATCH requests, set this to an empty string (\"\") to mark the trait for deletion.
35
+ */
36
+ "dataType": string;
37
+ /**
38
+ * Description of the Trait, providing additional context or information.
39
+ */
40
+ "description"?: string;
41
+ /**
42
+ * The name of the identifier type to promote the trait value to, such as \'\'email\'\', \'\'phone\'\', \'\'user_id\'\', etc. This allows the trait to be mapped to an identifier in Identity Resolution. The identifier type should be configured in the Identity Resolution Settings.
43
+ */
44
+ "idTypePromotion"?: string;
45
+ constructor(payload: any);
46
+ }
47
+ export declare class TraitGroup {
48
+ /**
49
+ * Provides a unique and addressable name to be assigned to this Trait Group
50
+ */
51
+ "displayName": string;
52
+ /**
53
+ * description of the Trait Group
54
+ */
55
+ "description"?: string;
56
+ /**
57
+ * Map of traits that are part of this Trait Group, where the key is the trait name and the value is the trait\'s definition.
58
+ */
59
+ "traits"?: {
60
+ [key: string]: TraitGroupCoreTraitsValue;
61
+ };
62
+ /**
63
+ * The current version number of the Trait Group. Incremented on each successful update.
64
+ */
65
+ "version": number;
66
+ constructor(payload: any);
67
+ }
68
+ /**
69
+ * A Trait is a single attribute or characteristic of a profile, such as age, location, or preferences.
70
+ */
71
+ export declare class TraitGroupCoreTraitsValue {
72
+ /**
73
+ * Data type of the Trait, such as STRING, NUMBER, BOOLEAN, ARRAY. For DELETE operations in PATCH requests, set this to an empty string (\"\") to mark the trait for deletion.
74
+ */
75
+ "dataType": string;
76
+ /**
77
+ * Description of the Trait, providing additional context or information.
78
+ */
79
+ "description"?: string;
80
+ "validationRule"?: ValidationRule;
81
+ /**
82
+ * The name of the identifier type to promote the trait value to, such as \'\'email\'\', \'\'phone\'\', \'\'user_id\'\', etc. This allows the trait to be mapped to an identifier in Identity Resolution. The identifier type should be configured in the Identity Resolution Settings.
83
+ */
84
+ "idTypePromotion"?: string;
85
+ constructor(payload: any);
86
+ }
87
+ /**
88
+ * Payload schema for creating Trait Groups.
89
+ */
90
+ export declare class TraitGroupRequest {
91
+ /**
92
+ * Unique name of the Trait Group
93
+ */
94
+ "displayName": string;
95
+ /**
96
+ * description of the Trait Group
97
+ */
98
+ "description"?: string;
99
+ /**
100
+ * Map of traits belonging to this Trait Group, keyed by trait name.
101
+ */
102
+ "traits"?: {
103
+ [key: string]: TraitGroupCoreTraitsValue;
104
+ };
105
+ constructor(payload: any);
106
+ }
107
+ export declare class ValidationRule {
108
+ /**
109
+ * Regex pattern (max 1000 chars)
110
+ */
111
+ "pattern"?: string;
112
+ /**
113
+ * Minimum string length
114
+ */
115
+ "minLength"?: number;
116
+ /**
117
+ * Maximum string length
118
+ */
119
+ "maxLength"?: number;
120
+ /**
121
+ * Discriminator field indicating this is an array validation rule.
122
+ */
123
+ "ruleType": string;
124
+ /**
125
+ * Minimum value
126
+ */
127
+ "min"?: number;
128
+ /**
129
+ * Maximum value
130
+ */
131
+ "max"?: number;
132
+ /**
133
+ * Minimum number of items
134
+ */
135
+ "minItems"?: number;
136
+ /**
137
+ * Maximum number of items
138
+ */
139
+ "maxItems"?: number;
140
+ constructor(payload: any);
141
+ }
142
+ /**
143
+ * Options to pass to fetch a TraitGroupInstance
144
+ */
145
+ export interface TraitGroupContextFetchOptions {
146
+ /** Whether to include trait definitions in the response */
147
+ includeTraits?: boolean;
148
+ /** The maximum number of items to return per page, maximum of 100. */
149
+ pageSize?: number;
150
+ /** The token for the page of results to retrieve. */
151
+ pageToken?: string;
152
+ /** Either \'ASC\' or \'DESC\' to sort results ascending or descending respectively. */
153
+ orderBy?: "ASC" | "DESC";
154
+ }
155
+ /**
156
+ * Options to pass to patch a TraitGroupInstance
157
+ */
158
+ export interface TraitGroupContextPatchOptions {
159
+ /** Allows for optimistic concurrency control by making the request conditional. Server will only act if the resource\'s current Entity Tag (ETag) matches the one provided, preventing accidental overwrites. */
160
+ ifMatch?: string;
161
+ /** */
162
+ patchTraitGroupRequest?: PatchTraitGroupRequest;
163
+ }
164
+ /**
165
+ * Options to pass to create a TraitGroupInstance
166
+ */
167
+ export interface TraitGroupListInstanceCreateOptions {
168
+ /** */
169
+ traitGroupRequest?: TraitGroupRequest;
170
+ }
171
+ /**
172
+ * Options to pass to each
173
+ */
174
+ export interface TraitGroupListInstanceEachOptions {
175
+ /** Whether to include trait definitions in the response */
176
+ includeTraits?: boolean;
177
+ /** The maximum number of items to return per page, maximum of 100. */
178
+ pageSize?: number;
179
+ /** The token for the page of results to retrieve. */
180
+ pageToken?: string;
181
+ /** Either \'ASC\' or \'DESC\' to sort results ascending or descending respectively. */
182
+ orderBy?: "ASC" | "DESC";
183
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
184
+ callback?: (item: TraitGroupInstance, done: (err?: Error) => void) => void;
185
+ /** Function to be called upon completion of streaming */
186
+ done?: Function;
187
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
188
+ limit?: number;
189
+ }
190
+ /**
191
+ * Options to pass to list
192
+ */
193
+ export interface TraitGroupListInstanceOptions {
194
+ /** Whether to include trait definitions in the response */
195
+ includeTraits?: boolean;
196
+ /** The maximum number of items to return per page, maximum of 100. */
197
+ pageSize?: number;
198
+ /** The token for the page of results to retrieve. */
199
+ pageToken?: string;
200
+ /** Either \'ASC\' or \'DESC\' to sort results ascending or descending respectively. */
201
+ orderBy?: "ASC" | "DESC";
202
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
203
+ limit?: number;
204
+ }
205
+ /**
206
+ * Options to pass to page
207
+ */
208
+ export interface TraitGroupListInstancePageOptions {
209
+ /** Whether to include trait definitions in the response */
210
+ includeTraits?: boolean;
211
+ /** The maximum number of items to return per page, maximum of 100. */
212
+ pageSize?: number;
213
+ /** The token for the page of results to retrieve. */
214
+ pageToken?: string;
215
+ /** Either \'ASC\' or \'DESC\' to sort results ascending or descending respectively. */
216
+ orderBy?: "ASC" | "DESC";
217
+ }
218
+ export interface TraitGroupContext {
219
+ /**
220
+ * Remove a TraitGroupInstance
221
+ *
222
+ * @param callback - Callback to handle processed record
223
+ *
224
+ * @returns Resolves to processed TraitGroupInstance
225
+ */
226
+ remove(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
227
+ /**
228
+ * Remove a TraitGroupInstance and return HTTP info
229
+ *
230
+ * @param callback - Callback to handle processed record
231
+ *
232
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
233
+ */
234
+ removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
235
+ /**
236
+ * Fetch a TraitGroupInstance
237
+ *
238
+ * @param callback - Callback to handle processed record
239
+ *
240
+ * @returns Resolves to processed TraitGroupInstance
241
+ */
242
+ fetch(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
243
+ /**
244
+ * Fetch a TraitGroupInstance
245
+ *
246
+ * @param params - Parameter for request
247
+ * @param callback - Callback to handle processed record
248
+ *
249
+ * @returns Resolves to processed TraitGroupInstance
250
+ */
251
+ fetch(params: TraitGroupContextFetchOptions, callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
252
+ /**
253
+ * Fetch a TraitGroupInstance and return HTTP info
254
+ *
255
+ * @param callback - Callback to handle processed record
256
+ *
257
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
258
+ */
259
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
260
+ /**
261
+ * Fetch a TraitGroupInstance and return HTTP info
262
+ *
263
+ * @param params - Parameter for request
264
+ * @param callback - Callback to handle processed record
265
+ *
266
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
267
+ */
268
+ fetchWithHttpInfo(params: TraitGroupContextFetchOptions, callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
269
+ /**
270
+ * Patch a TraitGroupInstance
271
+ *
272
+ * @param callback - Callback to handle processed record
273
+ *
274
+ * @returns Resolves to processed TraitGroupInstance
275
+ */
276
+ patch(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
277
+ /**
278
+ * Patch a TraitGroupInstance
279
+ *
280
+ * @param params - Body for request
281
+ * @param headers - header params for request
282
+ * @param callback - Callback to handle processed record
283
+ *
284
+ * @returns Resolves to processed TraitGroupInstance
285
+ */
286
+ patch(params: PatchTraitGroupRequest, headers?: any, callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
287
+ /**
288
+ * Patch a TraitGroupInstance and return HTTP info
289
+ *
290
+ * @param callback - Callback to handle processed record
291
+ *
292
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
293
+ */
294
+ patchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
295
+ /**
296
+ * Patch a TraitGroupInstance and return HTTP info
297
+ *
298
+ * @param params - Body for request
299
+ * @param headers - header params for request
300
+ * @param callback - Callback to handle processed record
301
+ *
302
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
303
+ */
304
+ patchWithHttpInfo(params: PatchTraitGroupRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
305
+ /**
306
+ * Provide a user-friendly representation
307
+ */
308
+ toJSON(): any;
309
+ [inspect.custom](_depth: any, options: InspectOptions): any;
310
+ }
311
+ export interface TraitGroupContextSolution {
312
+ storeId: string;
313
+ traitGroupName: string;
314
+ }
315
+ export declare class TraitGroupContextImpl implements TraitGroupContext {
316
+ protected _version: V1;
317
+ protected _solution: TraitGroupContextSolution;
318
+ protected _uri: string;
319
+ constructor(_version: V1, storeId: string, traitGroupName: string);
320
+ remove(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
321
+ removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
322
+ fetch(params?: TraitGroupContextFetchOptions | ((error: Error | null, item?: TraitGroupInstance) => any), callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
323
+ fetchWithHttpInfo(params?: TraitGroupContextFetchOptions | ((error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any), callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
324
+ patch(params?: PatchTraitGroupRequest | ((error: Error | null, item?: TraitGroupInstance) => any), headers?: any, callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
325
+ patchWithHttpInfo(params?: PatchTraitGroupRequest | ((error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any), headers?: any, callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
326
+ /**
327
+ * Provide a user-friendly representation
328
+ *
329
+ * @returns Object
330
+ */
331
+ toJSON(): TraitGroupContextSolution;
332
+ [inspect.custom](_depth: any, options: InspectOptions): string;
333
+ }
334
+ /**
335
+ * Nested model for Meta
336
+ */
337
+ export interface Meta {
338
+ key?: string;
339
+ pageSize?: number;
340
+ nextToken?: string;
341
+ previousToken?: string;
342
+ }
343
+ /**
344
+ * Nested model for PatchTraitGroupRequest
345
+ */
346
+ export interface PatchTraitGroupRequest {
347
+ description?: string;
348
+ traits?: {
349
+ [key: string]: TraitDefinition;
350
+ };
351
+ }
352
+ /**
353
+ * Nested model for TraitDefinition
354
+ */
355
+ export interface TraitDefinition {
356
+ dataType: string;
357
+ description?: string;
358
+ idTypePromotion?: string;
359
+ }
360
+ /**
361
+ * Nested model for TraitGroup
362
+ */
363
+ export interface TraitGroup {
364
+ displayName: string;
365
+ description?: string;
366
+ traits?: {
367
+ [key: string]: TraitGroupCoreTraitsValue;
368
+ };
369
+ version: number;
370
+ }
371
+ /**
372
+ * Nested model for TraitGroupCoreTraitsValue
373
+ */
374
+ export interface TraitGroupCoreTraitsValue {
375
+ dataType: string;
376
+ description?: string;
377
+ validationRule?: ValidationRule;
378
+ idTypePromotion?: string;
379
+ }
380
+ /**
381
+ * Nested model for TraitGroupRequest
382
+ */
383
+ export interface TraitGroupRequest {
384
+ displayName: string;
385
+ description?: string;
386
+ traits?: {
387
+ [key: string]: TraitGroupCoreTraitsValue;
388
+ };
389
+ }
390
+ /**
391
+ * Nested model for ValidationRule
392
+ */
393
+ export interface ValidationRule {
394
+ pattern?: string;
395
+ minLength?: number;
396
+ maxLength?: number;
397
+ ruleType: string;
398
+ min?: number;
399
+ max?: number;
400
+ minItems?: number;
401
+ maxItems?: number;
402
+ }
403
+ interface TraitGroupPayload extends TokenPaginationPayload {
404
+ traitGroups: TraitGroupResource[];
405
+ }
406
+ /**
407
+ * Response model for DeleteTraitGroup202Response operations
408
+ */
409
+ interface DeleteTraitGroup202Response_ResponseResource {
410
+ message?: string;
411
+ statusUrl?: string;
412
+ }
413
+ /**
414
+ * Response model for PatchTraitGroup202Response operations
415
+ */
416
+ interface PatchTraitGroup202Response_ResponseResource {
417
+ message?: string;
418
+ statusUrl?: string;
419
+ }
420
+ /**
421
+ * Response model for TraitGroup operations
422
+ */
423
+ interface TraitGroup_ResponseResource {
424
+ displayName: string;
425
+ description?: string;
426
+ traits?: {
427
+ [key: string]: TraitGroupCoreTraitsValue;
428
+ };
429
+ version: number;
430
+ }
431
+ /**
432
+ * Response model for FetchTraitGroup200Response operations
433
+ */
434
+ interface FetchTraitGroup200Response_ResponseResource {
435
+ traitGroup?: TraitGroup;
436
+ meta?: Meta;
437
+ }
438
+ /**
439
+ * Response model for CreateTraitGroup202Response operations
440
+ */
441
+ interface CreateTraitGroup202Response_ResponseResource {
442
+ message?: string;
443
+ statusUrl?: string;
444
+ }
445
+ /**
446
+ * Union type for all possible response models
447
+ */
448
+ type TraitGroupResource = DeleteTraitGroup202Response_ResponseResource | PatchTraitGroup202Response_ResponseResource | TraitGroup_ResponseResource | FetchTraitGroup200Response_ResponseResource | CreateTraitGroup202Response_ResponseResource;
449
+ export declare class TraitGroupInstance {
450
+ protected _version: V1;
451
+ protected _solution: TraitGroupContextSolution;
452
+ protected _context?: TraitGroupContext;
453
+ constructor(_version: V1, _payload: TraitGroupResource, storeId: string, traitGroupName?: string);
454
+ message?: string;
455
+ /**
456
+ * URI to check operation status.
457
+ */
458
+ statusUrl?: string;
459
+ /**
460
+ * Provides a unique and addressable name to be assigned to this Trait Group
461
+ */
462
+ displayName?: string;
463
+ /**
464
+ * description of the Trait Group
465
+ */
466
+ description?: string;
467
+ /**
468
+ * Map of traits that are part of this Trait Group, where the key is the trait name and the value is the trait\'s definition.
469
+ */
470
+ traits?: {
471
+ [key: string]: TraitGroupCoreTraitsValue;
472
+ };
473
+ /**
474
+ * The current version number of the Trait Group. Incremented on each successful update.
475
+ */
476
+ version?: number;
477
+ traitGroup?: TraitGroup;
478
+ meta?: Meta;
479
+ private get _proxy();
480
+ /**
481
+ * Remove a TraitGroupInstance
482
+ *
483
+ * @param callback - Callback to handle processed record
484
+ *
485
+ * @returns Resolves to processed TraitGroupInstance
486
+ */
487
+ remove(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
488
+ /**
489
+ * Remove a TraitGroupInstance and return HTTP info
490
+ *
491
+ * @param callback - Callback to handle processed record
492
+ *
493
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
494
+ */
495
+ removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
496
+ /**
497
+ * Fetch a TraitGroupInstance
498
+ *
499
+ * @param callback - Callback to handle processed record
500
+ *
501
+ * @returns Resolves to processed TraitGroupInstance
502
+ */
503
+ fetch(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
504
+ /**
505
+ * Fetch a TraitGroupInstance
506
+ *
507
+ * @param params - Parameter for request
508
+ * @param callback - Callback to handle processed record
509
+ *
510
+ * @returns Resolves to processed TraitGroupInstance
511
+ */
512
+ fetch(params: TraitGroupContextFetchOptions, callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
513
+ /**
514
+ * Fetch a TraitGroupInstance and return HTTP info
515
+ *
516
+ * @param callback - Callback to handle processed record
517
+ *
518
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
519
+ */
520
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
521
+ /**
522
+ * Fetch a TraitGroupInstance and return HTTP info
523
+ *
524
+ * @param params - Parameter for request
525
+ * @param callback - Callback to handle processed record
526
+ *
527
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
528
+ */
529
+ fetchWithHttpInfo(params: TraitGroupContextFetchOptions, callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
530
+ /**
531
+ * Patch a TraitGroupInstance
532
+ *
533
+ * @param callback - Callback to handle processed record
534
+ *
535
+ * @returns Resolves to processed TraitGroupInstance
536
+ */
537
+ patch(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
538
+ /**
539
+ * Patch a TraitGroupInstance
540
+ *
541
+ * @param params - Body for request
542
+ * @param headers - header params for request
543
+ * @param callback - Callback to handle processed record
544
+ *
545
+ * @returns Resolves to processed TraitGroupInstance
546
+ */
547
+ patch(params: PatchTraitGroupRequest, headers?: any, callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
548
+ /**
549
+ * Patch a TraitGroupInstance and return HTTP info
550
+ *
551
+ * @param callback - Callback to handle processed record
552
+ *
553
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
554
+ */
555
+ patchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
556
+ /**
557
+ * Patch a TraitGroupInstance and return HTTP info
558
+ *
559
+ * @param params - Body for request
560
+ * @param headers - header params for request
561
+ * @param callback - Callback to handle processed record
562
+ *
563
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
564
+ */
565
+ patchWithHttpInfo(params: PatchTraitGroupRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
566
+ /**
567
+ * Provide a user-friendly representation
568
+ *
569
+ * @returns Object
570
+ */
571
+ toJSON(): {
572
+ message: string;
573
+ statusUrl: string;
574
+ displayName: string;
575
+ description: string;
576
+ traits: {
577
+ [key: string]: TraitGroupCoreTraitsValue;
578
+ };
579
+ version: number;
580
+ traitGroup: TraitGroup;
581
+ meta: Meta;
582
+ };
583
+ [inspect.custom](_depth: any, options: InspectOptions): string;
584
+ }
585
+ export interface TraitGroupSolution {
586
+ storeId: string;
587
+ }
588
+ export interface TraitGroupListInstance {
589
+ _version: V1;
590
+ _solution: TraitGroupSolution;
591
+ _uri: string;
592
+ (traitGroupName: string): TraitGroupContext;
593
+ get(traitGroupName: string): TraitGroupContext;
594
+ /**
595
+ * Create a TraitGroupInstance
596
+ *
597
+ * @param callback - Callback to handle processed record
598
+ *
599
+ * @returns Resolves to processed TraitGroupInstance
600
+ */
601
+ create(callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
602
+ /**
603
+ * Create a TraitGroupInstance
604
+ *
605
+ * @param params - Body for request
606
+ * @param headers - header params for request
607
+ * @param callback - Callback to handle processed record
608
+ *
609
+ * @returns Resolves to processed TraitGroupInstance
610
+ */
611
+ create(params: TraitGroupRequest, headers?: any, callback?: (error: Error | null, item?: TraitGroupInstance) => any): Promise<TraitGroupInstance>;
612
+ /**
613
+ * Create a TraitGroupInstance and return HTTP info
614
+ *
615
+ * @param callback - Callback to handle processed record
616
+ *
617
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
618
+ */
619
+ createWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
620
+ /**
621
+ * Create a TraitGroupInstance and return HTTP info
622
+ *
623
+ * @param params - Body for request
624
+ * @param headers - header params for request
625
+ * @param callback - Callback to handle processed record
626
+ *
627
+ * @returns Resolves to processed TraitGroupInstance with HTTP metadata
628
+ */
629
+ createWithHttpInfo(params: TraitGroupRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<TraitGroupInstance>) => any): Promise<ApiResponse<TraitGroupInstance>>;
630
+ /**
631
+ * Streams TraitGroupInstance records from the API.
632
+ *
633
+ * This operation lazily loads records as efficiently as possible until the limit
634
+ * is reached.
635
+ *
636
+ * The results are passed into the callback function, so this operation is memory
637
+ * efficient.
638
+ *
639
+ * If a function is passed as the first argument, it will be used as the callback
640
+ * function.
641
+ *
642
+ * @param { TraitGroupListInstanceEachOptions } [params] - Options for request
643
+ * @param { function } [callback] - Function to process each record
644
+ */
645
+ each(callback?: (item: TraitGroupInstance, done: (err?: Error) => void) => void): void;
646
+ each(params: TraitGroupListInstanceEachOptions, callback?: (item: TraitGroupInstance, done: (err?: Error) => void) => void): void;
647
+ /**
648
+ * Streams TraitGroupInstance records from the API with HTTP metadata captured per page.
649
+ *
650
+ * This operation lazily loads records as efficiently as possible until the limit
651
+ * is reached. HTTP metadata (status code, headers) is captured for each page request.
652
+ *
653
+ * The results are passed into the callback function, so this operation is memory
654
+ * efficient.
655
+ *
656
+ * If a function is passed as the first argument, it will be used as the callback
657
+ * function.
658
+ *
659
+ * @param { TraitGroupListInstanceEachOptions } [params] - Options for request
660
+ * @param { function } [callback] - Function to process each record
661
+ */
662
+ eachWithHttpInfo(callback?: (item: TraitGroupInstance, done: (err?: Error) => void) => void): void;
663
+ eachWithHttpInfo(params: TraitGroupListInstanceEachOptions, callback?: (item: TraitGroupInstance, done: (err?: Error) => void) => void): void;
664
+ /**
665
+ * Retrieve a single target page of TraitGroupInstance records from the API.
666
+ *
667
+ * The request is executed immediately.
668
+ *
669
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
670
+ * @param { function } [callback] - Callback to handle list of records
671
+ */
672
+ getPage(targetUrl: string, callback?: (error: Error | null, items: TraitGroupPage) => any): Promise<TraitGroupPage>;
673
+ /**
674
+ * Retrieve a single target page of TraitGroupInstance records from the API with HTTP metadata.
675
+ *
676
+ * The request is executed immediately.
677
+ *
678
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
679
+ * @param { function } [callback] - Callback to handle list of records with metadata
680
+ */
681
+ getPageWithHttpInfo(targetUrl: string, callback?: (error: Error | null, items: ApiResponse<TraitGroupPage>) => any): Promise<ApiResponse<TraitGroupPage>>;
682
+ /**
683
+ * Lists TraitGroupInstance records from the API as a list.
684
+ *
685
+ * If a function is passed as the first argument, it will be used as the callback
686
+ * function.
687
+ *
688
+ * @param { TraitGroupListInstanceOptions } [params] - Options for request
689
+ * @param { function } [callback] - Callback to handle list of records
690
+ */
691
+ list(callback?: (error: Error | null, items: TraitGroupInstance[]) => any): Promise<TraitGroupInstance[]>;
692
+ list(params: TraitGroupListInstanceOptions, callback?: (error: Error | null, items: TraitGroupInstance[]) => any): Promise<TraitGroupInstance[]>;
693
+ /**
694
+ * Lists TraitGroupInstance records from the API as a list with HTTP metadata.
695
+ *
696
+ * Returns all records along with HTTP metadata from the first page fetched.
697
+ *
698
+ * If a function is passed as the first argument, it will be used as the callback
699
+ * function.
700
+ *
701
+ * @param { TraitGroupListInstanceOptions } [params] - Options for request
702
+ * @param { function } [callback] - Callback to handle list of records with metadata
703
+ */
704
+ listWithHttpInfo(callback?: (error: Error | null, items: ApiResponse<TraitGroupInstance[]>) => any): Promise<ApiResponse<TraitGroupInstance[]>>;
705
+ listWithHttpInfo(params: TraitGroupListInstanceOptions, callback?: (error: Error | null, items: ApiResponse<TraitGroupInstance[]>) => any): Promise<ApiResponse<TraitGroupInstance[]>>;
706
+ /**
707
+ * Retrieve a single page of TraitGroupInstance records from the API.
708
+ *
709
+ * The request is executed immediately.
710
+ *
711
+ * If a function is passed as the first argument, it will be used as the callback
712
+ * function.
713
+ *
714
+ * @param { TraitGroupListInstancePageOptions } [params] - Options for request
715
+ * @param { function } [callback] - Callback to handle list of records
716
+ */
717
+ page(callback?: (error: Error | null, items: TraitGroupPage) => any): Promise<TraitGroupPage>;
718
+ page(params: TraitGroupListInstancePageOptions, callback?: (error: Error | null, items: TraitGroupPage) => any): Promise<TraitGroupPage>;
719
+ /**
720
+ * Retrieve a single page of TraitGroupInstance records from the API with HTTP metadata.
721
+ *
722
+ * The request is executed immediately.
723
+ *
724
+ * If a function is passed as the first argument, it will be used as the callback
725
+ * function.
726
+ *
727
+ * @param { TraitGroupListInstancePageOptions } [params] - Options for request
728
+ * @param { function } [callback] - Callback to handle list of records with metadata
729
+ */
730
+ pageWithHttpInfo(callback?: (error: Error | null, items: ApiResponse<TraitGroupPage>) => any): Promise<ApiResponse<TraitGroupPage>>;
731
+ pageWithHttpInfo(params: TraitGroupListInstancePageOptions, callback?: (error: Error | null, items: ApiResponse<TraitGroupPage>) => any): Promise<ApiResponse<TraitGroupPage>>;
732
+ /**
733
+ * Provide a user-friendly representation
734
+ */
735
+ toJSON(): any;
736
+ [inspect.custom](_depth: any, options: InspectOptions): any;
737
+ }
738
+ export declare function TraitGroupListInstance(version: V1, storeId: string): TraitGroupListInstance;
739
+ export declare class TraitGroupPage extends TokenPage<V1, TraitGroupPayload, TraitGroupResource, TraitGroupInstance> {
740
+ /**
741
+ * Initialize the TraitGroupPage
742
+ *
743
+ * @param version - Version of the resource
744
+ * @param response - Response from the API
745
+ * @param uri - URI of the resource
746
+ * @param params - Query parameters
747
+ * @param solution - Path solution
748
+ */
749
+ constructor(version: V1, response: Response<string>, uri: string, params: any, solution: TraitGroupSolution);
750
+ /**
751
+ * Build an instance of TraitGroupInstance
752
+ *
753
+ * @param payload - Payload response from the API
754
+ */
755
+ getInstance(payload: TraitGroupResource): TraitGroupInstance;
756
+ [inspect.custom](depth: any, options: InspectOptions): string;
757
+ }
758
+ export {};