@roarkanalytics/sdk 2.26.0 → 2.27.0

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 (72) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +8 -7
  7. package/client.js.map +1 -1
  8. package/client.mjs +8 -7
  9. package/client.mjs.map +1 -1
  10. package/internal/tslib.js +17 -17
  11. package/internal/utils/query.d.mts +2 -0
  12. package/internal/utils/query.d.mts.map +1 -0
  13. package/internal/utils/query.d.ts +2 -0
  14. package/internal/utils/query.d.ts.map +1 -0
  15. package/internal/utils/query.js +10 -0
  16. package/internal/utils/query.js.map +1 -0
  17. package/internal/utils/query.mjs +6 -0
  18. package/internal/utils/query.mjs.map +1 -0
  19. package/internal/utils.d.mts +1 -0
  20. package/internal/utils.d.ts +1 -0
  21. package/internal/utils.js +1 -0
  22. package/internal/utils.js.map +1 -1
  23. package/internal/utils.mjs +1 -0
  24. package/package.json +7 -1
  25. package/resources/call.d.mts +32 -0
  26. package/resources/call.d.mts.map +1 -1
  27. package/resources/call.d.ts +32 -0
  28. package/resources/call.d.ts.map +1 -1
  29. package/resources/metric-collection-job.d.mts +12 -0
  30. package/resources/metric-collection-job.d.mts.map +1 -1
  31. package/resources/metric-collection-job.d.ts +12 -0
  32. package/resources/metric-collection-job.d.ts.map +1 -1
  33. package/resources/metric-policy.d.mts +6 -6
  34. package/resources/metric-policy.d.mts.map +1 -1
  35. package/resources/metric-policy.d.ts +6 -6
  36. package/resources/metric-policy.d.ts.map +1 -1
  37. package/resources/simulation-job.d.mts +6 -6
  38. package/resources/simulation-job.d.mts.map +1 -1
  39. package/resources/simulation-job.d.ts +6 -6
  40. package/resources/simulation-job.d.ts.map +1 -1
  41. package/resources/simulation-persona.d.mts +18 -18
  42. package/resources/simulation-persona.d.mts.map +1 -1
  43. package/resources/simulation-persona.d.ts +18 -18
  44. package/resources/simulation-persona.d.ts.map +1 -1
  45. package/resources/simulation-run-plan-job.d.mts +3 -3
  46. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  47. package/resources/simulation-run-plan-job.d.ts +3 -3
  48. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  49. package/resources/simulation-scenario.d.mts +76 -7
  50. package/resources/simulation-scenario.d.mts.map +1 -1
  51. package/resources/simulation-scenario.d.ts +76 -7
  52. package/resources/simulation-scenario.d.ts.map +1 -1
  53. package/resources/webhook.d.mts +4 -4
  54. package/resources/webhook.d.mts.map +1 -1
  55. package/resources/webhook.d.ts +4 -4
  56. package/resources/webhook.d.ts.map +1 -1
  57. package/src/client.ts +11 -10
  58. package/src/internal/utils/query.ts +7 -0
  59. package/src/internal/utils.ts +1 -0
  60. package/src/resources/call.ts +35 -0
  61. package/src/resources/metric-collection-job.ts +15 -0
  62. package/src/resources/metric-policy.ts +6 -6
  63. package/src/resources/simulation-job.ts +54 -6
  64. package/src/resources/simulation-persona.ts +162 -18
  65. package/src/resources/simulation-run-plan-job.ts +34 -3
  66. package/src/resources/simulation-scenario.ts +100 -7
  67. package/src/resources/webhook.ts +8 -0
  68. package/src/version.ts +1 -1
  69. package/version.d.mts +1 -1
  70. package/version.d.ts +1 -1
  71. package/version.js +1 -1
  72. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -11,7 +11,7 @@ import type { APIResponseProps } from './internal/parse';
11
11
  import { getPlatformHeaders } from './internal/detect-platform';
12
12
  import * as Shims from './internal/shims';
13
13
  import * as Opts from './internal/request-options';
14
- import * as qs from './internal/qs';
14
+ import { stringifyQuery } from './internal/utils/query';
15
15
  import { VERSION } from './version';
16
16
  import * as Errors from './core/error';
17
17
  import * as Uploads from './core/uploads';
@@ -337,8 +337,8 @@ export class Roark {
337
337
  return buildHeaders([{ Authorization: `Bearer ${this.bearerToken}` }]);
338
338
  }
339
339
 
340
- protected stringifyQuery(query: Record<string, unknown>): string {
341
- return qs.stringify(query, { arrayFormat: 'comma' });
340
+ protected stringifyQuery(query: object | Record<string, unknown>): string {
341
+ return stringifyQuery(query);
342
342
  }
343
343
 
344
344
  private getUserAgent(): string {
@@ -370,12 +370,13 @@ export class Roark {
370
370
  : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
371
371
 
372
372
  const defaultQuery = this.defaultQuery();
373
- if (!isEmptyObj(defaultQuery)) {
374
- query = { ...defaultQuery, ...query };
373
+ const pathQuery = Object.fromEntries(url.searchParams);
374
+ if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
375
+ query = { ...pathQuery, ...defaultQuery, ...query };
375
376
  }
376
377
 
377
378
  if (typeof query === 'object' && query && !Array.isArray(query)) {
378
- url.search = this.stringifyQuery(query as Record<string, unknown>);
379
+ url.search = this.stringifyQuery(query);
379
380
  }
380
381
 
381
382
  return url.toString();
@@ -680,9 +681,9 @@ export class Roark {
680
681
  }
681
682
  }
682
683
 
683
- // If the API asks us to wait a certain amount of time (and it's a reasonable amount),
684
- // just do what it says, but otherwise calculate a default
685
- if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
684
+ // If the API asks us to wait a certain amount of time, just do what it
685
+ // says, but otherwise calculate a default
686
+ if (timeoutMillis === undefined) {
686
687
  const maxRetries = options.maxRetries ?? this.maxRetries;
687
688
  timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
688
689
  }
@@ -814,7 +815,7 @@ export class Roark {
814
815
  ) {
815
816
  return {
816
817
  bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
817
- body: this.stringifyQuery(body as Record<string, unknown>),
818
+ body: this.stringifyQuery(body),
818
819
  };
819
820
  } else {
820
821
  return this.#encoder({ body, headers });
@@ -0,0 +1,7 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import * as qs from '../qs/stringify';
4
+
5
+ export function stringifyQuery(query: object | Record<string, unknown>) {
6
+ return qs.stringify(query, { arrayFormat: 'comma' });
7
+ }
@@ -6,3 +6,4 @@ export * from './utils/env';
6
6
  export * from './utils/log';
7
7
  export * from './utils/uuid';
8
8
  export * from './utils/sleep';
9
+ export * from './utils/query';
@@ -217,6 +217,11 @@ export namespace CallListResponse {
217
217
  | 'UNKNOWN'
218
218
  | null;
219
219
 
220
+ /**
221
+ * IDs of metric policies that have been applied to this call
222
+ */
223
+ policyIds?: Array<string> | null;
224
+
220
225
  /**
221
226
  * Custom properties associated with the call
222
227
  */
@@ -382,6 +387,11 @@ export namespace CallGetByIDResponse {
382
387
  | 'UNKNOWN'
383
388
  | null;
384
389
 
390
+ /**
391
+ * IDs of metric policies that have been applied to this call
392
+ */
393
+ policyIds?: Array<string> | null;
394
+
385
395
  /**
386
396
  * Custom properties associated with the call
387
397
  */
@@ -850,6 +860,11 @@ export namespace CallListMetricsResponse {
850
860
  */
851
861
  participantRole?: 'agent' | 'customer';
852
862
 
863
+ /**
864
+ * IDs of metric policies that triggered this metric computation
865
+ */
866
+ policyIds?: Array<string>;
867
+
853
868
  /**
854
869
  * Segment information (for SEGMENT context metrics)
855
870
  */
@@ -1550,8 +1565,14 @@ export namespace CallCreateParams {
1550
1565
  * the agents array this tool invocation belongs to
1551
1566
  */
1552
1567
  export interface Agent {
1568
+ /**
1569
+ * The custom ID set on the agent
1570
+ */
1553
1571
  customId?: string;
1554
1572
 
1573
+ /**
1574
+ * The Roark ID of the agent
1575
+ */
1555
1576
  roarkId?: string;
1556
1577
  }
1557
1578
  }
@@ -1565,15 +1586,29 @@ export namespace CallCreateParams {
1565
1586
 
1566
1587
  text: string;
1567
1588
 
1589
+ /**
1590
+ * Metadata about the agent that spoke this turn - used to match which agent from
1591
+ * the `agents` array this transcript entry belongs to
1592
+ */
1568
1593
  agent?: TranscriptEntryAgent.Agent;
1569
1594
 
1570
1595
  languageCode?: string;
1571
1596
  }
1572
1597
 
1573
1598
  export namespace TranscriptEntryAgent {
1599
+ /**
1600
+ * Metadata about the agent that spoke this turn - used to match which agent from
1601
+ * the `agents` array this transcript entry belongs to
1602
+ */
1574
1603
  export interface Agent {
1604
+ /**
1605
+ * The custom ID set on the agent
1606
+ */
1575
1607
  customId?: string;
1576
1608
 
1609
+ /**
1610
+ * The Roark ID of the agent
1611
+ */
1577
1612
  roarkId?: string;
1578
1613
  }
1579
1614
  }
@@ -77,6 +77,11 @@ export namespace MetricCollectionJobCreateResponse {
77
77
  */
78
78
  failedItems: number;
79
79
 
80
+ /**
81
+ * IDs of the metric policies that triggered this job
82
+ */
83
+ policyIds: Array<string>;
84
+
80
85
  /**
81
86
  * When the job started processing
82
87
  */
@@ -148,6 +153,11 @@ export namespace MetricCollectionJobListResponse {
148
153
  */
149
154
  failedItems: number;
150
155
 
156
+ /**
157
+ * IDs of the metric policies that triggered this job
158
+ */
159
+ policyIds: Array<string>;
160
+
151
161
  /**
152
162
  * When the job started processing
153
163
  */
@@ -234,6 +244,11 @@ export namespace MetricCollectionJobGetByIDResponse {
234
244
  */
235
245
  failedItems: number;
236
246
 
247
+ /**
248
+ * IDs of the metric policies that triggered this job
249
+ */
250
+ policyIds: Array<string>;
251
+
237
252
  /**
238
253
  * When the job started processing
239
254
  */
@@ -169,7 +169,7 @@ export namespace MetricPolicyCreateResponse {
169
169
  * Type of condition: AGENT (match by agent ID), CALL_SOURCE (match by source e.g.
170
170
  * VAPI, RETELL), CALL_PROPERTY (match by call property key/value)
171
171
  */
172
- conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY';
172
+ conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
173
173
 
174
174
  /**
175
175
  * Value to compare against. Required for CALL_PROPERTY conditions.
@@ -268,7 +268,7 @@ export namespace MetricPolicyUpdateResponse {
268
268
  * Type of condition: AGENT (match by agent ID), CALL_SOURCE (match by source e.g.
269
269
  * VAPI, RETELL), CALL_PROPERTY (match by call property key/value)
270
270
  */
271
- conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY';
271
+ conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
272
272
 
273
273
  /**
274
274
  * Value to compare against. Required for CALL_PROPERTY conditions.
@@ -369,7 +369,7 @@ export namespace MetricPolicyListResponse {
369
369
  * Type of condition: AGENT (match by agent ID), CALL_SOURCE (match by source e.g.
370
370
  * VAPI, RETELL), CALL_PROPERTY (match by call property key/value)
371
371
  */
372
- conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY';
372
+ conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
373
373
 
374
374
  /**
375
375
  * Value to compare against. Required for CALL_PROPERTY conditions.
@@ -498,7 +498,7 @@ export namespace MetricPolicyGetByIDResponse {
498
498
  * Type of condition: AGENT (match by agent ID), CALL_SOURCE (match by source e.g.
499
499
  * VAPI, RETELL), CALL_PROPERTY (match by call property key/value)
500
500
  */
501
- conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY';
501
+ conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
502
502
 
503
503
  /**
504
504
  * Value to compare against. Required for CALL_PROPERTY conditions.
@@ -556,7 +556,7 @@ export namespace MetricPolicyCreateParams {
556
556
  * Type of condition: AGENT (match by agent ID), CALL_SOURCE (match by source e.g.
557
557
  * VAPI, RETELL), CALL_PROPERTY (match by call property key/value)
558
558
  */
559
- conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY';
559
+ conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
560
560
 
561
561
  /**
562
562
  * Comparison operator. Required for CALL_PROPERTY conditions.
@@ -620,7 +620,7 @@ export namespace MetricPolicyUpdateParams {
620
620
  * Type of condition: AGENT (match by agent ID), CALL_SOURCE (match by source e.g.
621
621
  * VAPI, RETELL), CALL_PROPERTY (match by call property key/value)
622
622
  */
623
- conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY';
623
+ conditionType: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
624
624
 
625
625
  /**
626
626
  * Comparison operator. Required for CALL_PROPERTY conditions.
@@ -158,7 +158,14 @@ export namespace SimulationJobGetByIDResponse {
158
158
  | 'IT'
159
159
  | 'ID'
160
160
  | 'TH'
161
- | 'JP';
161
+ | 'JP'
162
+ | 'NZ'
163
+ | 'PH'
164
+ | 'SG'
165
+ | 'MY'
166
+ | 'HK'
167
+ | 'TR'
168
+ | 'PT';
162
169
 
163
170
  /**
164
171
  * Background noise setting
@@ -176,7 +183,7 @@ export namespace SimulationJobGetByIDResponse {
176
183
  /**
177
184
  * Base emotional state of the persona
178
185
  */
179
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
186
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
180
187
 
181
188
  /**
182
189
  * How the persona confirms information
@@ -226,7 +233,24 @@ export namespace SimulationJobGetByIDResponse {
226
233
  /**
227
234
  * Primary language ISO 639-1 code for the persona
228
235
  */
229
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
236
+ language:
237
+ | 'EN'
238
+ | 'ES'
239
+ | 'DE'
240
+ | 'HI'
241
+ | 'FR'
242
+ | 'NL'
243
+ | 'AR'
244
+ | 'EL'
245
+ | 'IT'
246
+ | 'ID'
247
+ | 'TH'
248
+ | 'JA'
249
+ | 'TL'
250
+ | 'MS'
251
+ | 'ZH'
252
+ | 'TR'
253
+ | 'PT';
230
254
 
231
255
  /**
232
256
  * How reliable the persona's memory is
@@ -415,7 +439,14 @@ export namespace SimulationJobLookupResponse {
415
439
  | 'IT'
416
440
  | 'ID'
417
441
  | 'TH'
418
- | 'JP';
442
+ | 'JP'
443
+ | 'NZ'
444
+ | 'PH'
445
+ | 'SG'
446
+ | 'MY'
447
+ | 'HK'
448
+ | 'TR'
449
+ | 'PT';
419
450
 
420
451
  /**
421
452
  * Background noise setting
@@ -433,7 +464,7 @@ export namespace SimulationJobLookupResponse {
433
464
  /**
434
465
  * Base emotional state of the persona
435
466
  */
436
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
467
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
437
468
 
438
469
  /**
439
470
  * How the persona confirms information
@@ -483,7 +514,24 @@ export namespace SimulationJobLookupResponse {
483
514
  /**
484
515
  * Primary language ISO 639-1 code for the persona
485
516
  */
486
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
517
+ language:
518
+ | 'EN'
519
+ | 'ES'
520
+ | 'DE'
521
+ | 'HI'
522
+ | 'FR'
523
+ | 'NL'
524
+ | 'AR'
525
+ | 'EL'
526
+ | 'IT'
527
+ | 'ID'
528
+ | 'TH'
529
+ | 'JA'
530
+ | 'TL'
531
+ | 'MS'
532
+ | 'ZH'
533
+ | 'TR'
534
+ | 'PT';
487
535
 
488
536
  /**
489
537
  * How reliable the persona's memory is
@@ -105,7 +105,14 @@ export namespace SimulationPersonaCreateResponse {
105
105
  | 'IT'
106
106
  | 'ID'
107
107
  | 'TH'
108
- | 'JP';
108
+ | 'JP'
109
+ | 'NZ'
110
+ | 'PH'
111
+ | 'SG'
112
+ | 'MY'
113
+ | 'HK'
114
+ | 'TR'
115
+ | 'PT';
109
116
 
110
117
  /**
111
118
  * Background noise setting
@@ -123,7 +130,7 @@ export namespace SimulationPersonaCreateResponse {
123
130
  /**
124
131
  * Base emotional state of the persona
125
132
  */
126
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
133
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
127
134
 
128
135
  /**
129
136
  * How the persona confirms information
@@ -173,7 +180,24 @@ export namespace SimulationPersonaCreateResponse {
173
180
  /**
174
181
  * Primary language ISO 639-1 code for the persona
175
182
  */
176
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
183
+ language:
184
+ | 'EN'
185
+ | 'ES'
186
+ | 'DE'
187
+ | 'HI'
188
+ | 'FR'
189
+ | 'NL'
190
+ | 'AR'
191
+ | 'EL'
192
+ | 'IT'
193
+ | 'ID'
194
+ | 'TH'
195
+ | 'JA'
196
+ | 'TL'
197
+ | 'MS'
198
+ | 'ZH'
199
+ | 'TR'
200
+ | 'PT';
177
201
 
178
202
  /**
179
203
  * How reliable the persona's memory is
@@ -258,7 +282,14 @@ export namespace SimulationPersonaUpdateResponse {
258
282
  | 'IT'
259
283
  | 'ID'
260
284
  | 'TH'
261
- | 'JP';
285
+ | 'JP'
286
+ | 'NZ'
287
+ | 'PH'
288
+ | 'SG'
289
+ | 'MY'
290
+ | 'HK'
291
+ | 'TR'
292
+ | 'PT';
262
293
 
263
294
  /**
264
295
  * Background noise setting
@@ -276,7 +307,7 @@ export namespace SimulationPersonaUpdateResponse {
276
307
  /**
277
308
  * Base emotional state of the persona
278
309
  */
279
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
310
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
280
311
 
281
312
  /**
282
313
  * How the persona confirms information
@@ -326,7 +357,24 @@ export namespace SimulationPersonaUpdateResponse {
326
357
  /**
327
358
  * Primary language ISO 639-1 code for the persona
328
359
  */
329
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
360
+ language:
361
+ | 'EN'
362
+ | 'ES'
363
+ | 'DE'
364
+ | 'HI'
365
+ | 'FR'
366
+ | 'NL'
367
+ | 'AR'
368
+ | 'EL'
369
+ | 'IT'
370
+ | 'ID'
371
+ | 'TH'
372
+ | 'JA'
373
+ | 'TL'
374
+ | 'MS'
375
+ | 'ZH'
376
+ | 'TR'
377
+ | 'PT';
330
378
 
331
379
  /**
332
380
  * How reliable the persona's memory is
@@ -413,7 +461,14 @@ export namespace SimulationPersonaListResponse {
413
461
  | 'IT'
414
462
  | 'ID'
415
463
  | 'TH'
416
- | 'JP';
464
+ | 'JP'
465
+ | 'NZ'
466
+ | 'PH'
467
+ | 'SG'
468
+ | 'MY'
469
+ | 'HK'
470
+ | 'TR'
471
+ | 'PT';
417
472
 
418
473
  /**
419
474
  * Background noise setting
@@ -431,7 +486,7 @@ export namespace SimulationPersonaListResponse {
431
486
  /**
432
487
  * Base emotional state of the persona
433
488
  */
434
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
489
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
435
490
 
436
491
  /**
437
492
  * How the persona confirms information
@@ -481,7 +536,24 @@ export namespace SimulationPersonaListResponse {
481
536
  /**
482
537
  * Primary language ISO 639-1 code for the persona
483
538
  */
484
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
539
+ language:
540
+ | 'EN'
541
+ | 'ES'
542
+ | 'DE'
543
+ | 'HI'
544
+ | 'FR'
545
+ | 'NL'
546
+ | 'AR'
547
+ | 'EL'
548
+ | 'IT'
549
+ | 'ID'
550
+ | 'TH'
551
+ | 'JA'
552
+ | 'TL'
553
+ | 'MS'
554
+ | 'ZH'
555
+ | 'TR'
556
+ | 'PT';
485
557
 
486
558
  /**
487
559
  * How reliable the persona's memory is
@@ -583,7 +655,14 @@ export namespace SimulationPersonaGetByIDResponse {
583
655
  | 'IT'
584
656
  | 'ID'
585
657
  | 'TH'
586
- | 'JP';
658
+ | 'JP'
659
+ | 'NZ'
660
+ | 'PH'
661
+ | 'SG'
662
+ | 'MY'
663
+ | 'HK'
664
+ | 'TR'
665
+ | 'PT';
587
666
 
588
667
  /**
589
668
  * Background noise setting
@@ -601,7 +680,7 @@ export namespace SimulationPersonaGetByIDResponse {
601
680
  /**
602
681
  * Base emotional state of the persona
603
682
  */
604
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
683
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
605
684
 
606
685
  /**
607
686
  * How the persona confirms information
@@ -651,7 +730,24 @@ export namespace SimulationPersonaGetByIDResponse {
651
730
  /**
652
731
  * Primary language ISO 639-1 code for the persona
653
732
  */
654
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
733
+ language:
734
+ | 'EN'
735
+ | 'ES'
736
+ | 'DE'
737
+ | 'HI'
738
+ | 'FR'
739
+ | 'NL'
740
+ | 'AR'
741
+ | 'EL'
742
+ | 'IT'
743
+ | 'ID'
744
+ | 'TH'
745
+ | 'JA'
746
+ | 'TL'
747
+ | 'MS'
748
+ | 'ZH'
749
+ | 'TR'
750
+ | 'PT';
655
751
 
656
752
  /**
657
753
  * How reliable the persona's memory is
@@ -726,7 +822,14 @@ export interface SimulationPersonaCreateParams {
726
822
  | 'IT'
727
823
  | 'ID'
728
824
  | 'TH'
729
- | 'JP';
825
+ | 'JP'
826
+ | 'NZ'
827
+ | 'PH'
828
+ | 'SG'
829
+ | 'MY'
830
+ | 'HK'
831
+ | 'TR'
832
+ | 'PT';
730
833
 
731
834
  /**
732
835
  * Gender of the persona
@@ -736,7 +839,24 @@ export interface SimulationPersonaCreateParams {
736
839
  /**
737
840
  * Primary language ISO 639-1 code for the persona
738
841
  */
739
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
842
+ language:
843
+ | 'EN'
844
+ | 'ES'
845
+ | 'DE'
846
+ | 'HI'
847
+ | 'FR'
848
+ | 'NL'
849
+ | 'AR'
850
+ | 'EL'
851
+ | 'IT'
852
+ | 'ID'
853
+ | 'TH'
854
+ | 'JA'
855
+ | 'TL'
856
+ | 'MS'
857
+ | 'ZH'
858
+ | 'TR'
859
+ | 'PT';
740
860
 
741
861
  /**
742
862
  * The name the agent will identify as during conversations
@@ -764,7 +884,7 @@ export interface SimulationPersonaCreateParams {
764
884
  /**
765
885
  * Base emotional state of the persona
766
886
  */
767
- baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
887
+ baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
768
888
 
769
889
  /**
770
890
  * How the persona confirms information
@@ -858,7 +978,14 @@ export interface SimulationPersonaUpdateParams {
858
978
  | 'IT'
859
979
  | 'ID'
860
980
  | 'TH'
861
- | 'JP';
981
+ | 'JP'
982
+ | 'NZ'
983
+ | 'PH'
984
+ | 'SG'
985
+ | 'MY'
986
+ | 'HK'
987
+ | 'TR'
988
+ | 'PT';
862
989
 
863
990
  /**
864
991
  * Background noise setting
@@ -881,7 +1008,7 @@ export interface SimulationPersonaUpdateParams {
881
1008
  /**
882
1009
  * Base emotional state of the persona
883
1010
  */
884
- baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
1011
+ baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
885
1012
 
886
1013
  /**
887
1014
  * How the persona confirms information
@@ -931,7 +1058,24 @@ export interface SimulationPersonaUpdateParams {
931
1058
  /**
932
1059
  * Primary language ISO 639-1 code for the persona
933
1060
  */
934
- language?: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
1061
+ language?:
1062
+ | 'EN'
1063
+ | 'ES'
1064
+ | 'DE'
1065
+ | 'HI'
1066
+ | 'FR'
1067
+ | 'NL'
1068
+ | 'AR'
1069
+ | 'EL'
1070
+ | 'IT'
1071
+ | 'ID'
1072
+ | 'TH'
1073
+ | 'JA'
1074
+ | 'TL'
1075
+ | 'MS'
1076
+ | 'ZH'
1077
+ | 'TR'
1078
+ | 'PT';
935
1079
 
936
1080
  /**
937
1081
  * How reliable the persona's memory is