@roarkanalytics/sdk 2.23.1 → 2.25.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 (107) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +18 -23
  3. package/client.d.mts +14 -8
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +14 -8
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -3
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/call.d.mts +0 -20
  13. package/resources/call.d.mts.map +1 -1
  14. package/resources/call.d.ts +0 -20
  15. package/resources/call.d.ts.map +1 -1
  16. package/resources/evaluation.d.mts +0 -2783
  17. package/resources/evaluation.d.mts.map +1 -1
  18. package/resources/evaluation.d.ts +0 -2783
  19. package/resources/evaluation.d.ts.map +1 -1
  20. package/resources/evaluation.js +0 -46
  21. package/resources/evaluation.js.map +1 -1
  22. package/resources/evaluation.mjs +0 -46
  23. package/resources/evaluation.mjs.map +1 -1
  24. package/resources/index.d.mts +6 -4
  25. package/resources/index.d.mts.map +1 -1
  26. package/resources/index.d.ts +6 -4
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js +5 -1
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs +5 -3
  31. package/resources/index.mjs.map +1 -1
  32. package/resources/integrations.d.mts +0 -110
  33. package/resources/integrations.d.mts.map +1 -1
  34. package/resources/integrations.d.ts +0 -110
  35. package/resources/integrations.d.ts.map +1 -1
  36. package/resources/integrations.js +0 -37
  37. package/resources/integrations.js.map +1 -1
  38. package/resources/integrations.mjs +0 -37
  39. package/resources/integrations.mjs.map +1 -1
  40. package/resources/metric-collection-job.d.mts +237 -0
  41. package/resources/metric-collection-job.d.mts.map +1 -0
  42. package/resources/metric-collection-job.d.ts +237 -0
  43. package/resources/metric-collection-job.d.ts.map +1 -0
  44. package/resources/metric-collection-job.js +29 -0
  45. package/resources/metric-collection-job.js.map +1 -0
  46. package/resources/metric-collection-job.mjs +25 -0
  47. package/resources/metric-collection-job.mjs.map +1 -0
  48. package/resources/metric-policy.d.mts +502 -0
  49. package/resources/metric-policy.d.mts.map +1 -0
  50. package/resources/metric-policy.d.ts +502 -0
  51. package/resources/metric-policy.d.ts.map +1 -0
  52. package/resources/metric-policy.js +76 -0
  53. package/resources/metric-policy.js.map +1 -0
  54. package/resources/metric-policy.mjs +72 -0
  55. package/resources/metric-policy.mjs.map +1 -0
  56. package/resources/metric.d.mts +188 -2
  57. package/resources/metric.d.mts.map +1 -1
  58. package/resources/metric.d.ts +188 -2
  59. package/resources/metric.d.ts.map +1 -1
  60. package/resources/metric.js +21 -0
  61. package/resources/metric.js.map +1 -1
  62. package/resources/metric.mjs +21 -0
  63. package/resources/metric.mjs.map +1 -1
  64. package/resources/simulation-job.d.mts +12 -2
  65. package/resources/simulation-job.d.mts.map +1 -1
  66. package/resources/simulation-job.d.ts +12 -2
  67. package/resources/simulation-job.d.ts.map +1 -1
  68. package/resources/simulation-persona.d.mts +36 -6
  69. package/resources/simulation-persona.d.mts.map +1 -1
  70. package/resources/simulation-persona.d.ts +36 -6
  71. package/resources/simulation-persona.d.ts.map +1 -1
  72. package/resources/simulation-run-plan-job.d.mts +41 -5
  73. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  74. package/resources/simulation-run-plan-job.d.ts +41 -5
  75. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  76. package/resources/simulation-run-plan-job.js +4 -3
  77. package/resources/simulation-run-plan-job.js.map +1 -1
  78. package/resources/simulation-run-plan-job.mjs +4 -3
  79. package/resources/simulation-run-plan-job.mjs.map +1 -1
  80. package/resources/simulation-run-plan.d.mts +90 -16
  81. package/resources/simulation-run-plan.d.mts.map +1 -1
  82. package/resources/simulation-run-plan.d.ts +90 -16
  83. package/resources/simulation-run-plan.d.ts.map +1 -1
  84. package/resources/simulation-run-plan.js +2 -2
  85. package/resources/simulation-run-plan.mjs +2 -2
  86. package/resources/simulation-scenario.d.mts +27 -7
  87. package/resources/simulation-scenario.d.mts.map +1 -1
  88. package/resources/simulation-scenario.d.ts +27 -7
  89. package/resources/simulation-scenario.d.ts.map +1 -1
  90. package/src/client.ts +59 -43
  91. package/src/resources/call.ts +0 -20
  92. package/src/resources/evaluation.ts +1 -3570
  93. package/src/resources/index.ts +27 -22
  94. package/src/resources/integrations.ts +1 -131
  95. package/src/resources/metric-collection-job.ts +307 -0
  96. package/src/resources/metric-policy.ts +679 -0
  97. package/src/resources/metric.ts +233 -2
  98. package/src/resources/simulation-job.ts +14 -2
  99. package/src/resources/simulation-persona.ts +42 -6
  100. package/src/resources/simulation-run-plan-job.ts +46 -4
  101. package/src/resources/simulation-run-plan.ts +102 -16
  102. package/src/resources/simulation-scenario.ts +49 -3
  103. package/src/version.ts +1 -1
  104. package/version.d.mts +1 -1
  105. package/version.d.ts +1 -1
  106. package/version.js +1 -1
  107. package/version.mjs +1 -1
@@ -18,10 +18,10 @@ export class SimulationRunPlan extends APIResource {
18
18
  * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
19
19
  * ],
20
20
  * direction: 'INBOUND',
21
- * evaluators: [
21
+ * maxSimulationDurationSeconds: 300,
22
+ * metrics: [
22
23
  * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
23
24
  * ],
24
- * maxSimulationDurationSeconds: 300,
25
25
  * name: 'My Run Plan',
26
26
  * personas: [
27
27
  * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
@@ -154,7 +154,12 @@ export namespace SimulationRunPlanCreateResponse {
154
154
  direction: 'INBOUND' | 'OUTBOUND';
155
155
 
156
156
  /**
157
- * Evaluators included in this run plan
157
+ * Phrases that trigger end of call. Empty array means disabled.
158
+ */
159
+ endCallPhrases: Array<string>;
160
+
161
+ /**
162
+ * Deprecated: Use metrics instead. Evaluators included in this run plan.
158
163
  */
159
164
  evaluators: Array<RunPlan.Evaluator>;
160
165
 
@@ -178,6 +183,11 @@ export namespace SimulationRunPlanCreateResponse {
178
183
  */
179
184
  maxSimulationDurationSeconds: number;
180
185
 
186
+ /**
187
+ * Metric definitions included in this run plan
188
+ */
189
+ metrics: Array<RunPlan.Metric>;
190
+
181
191
  /**
182
192
  * Name of the run plan
183
193
  */
@@ -223,6 +233,10 @@ export namespace SimulationRunPlanCreateResponse {
223
233
  id: string;
224
234
  }
225
235
 
236
+ export interface Metric {
237
+ id: string;
238
+ }
239
+
226
240
  export interface Persona {
227
241
  id: string;
228
242
  }
@@ -302,7 +316,12 @@ export namespace SimulationRunPlanUpdateResponse {
302
316
  direction: 'INBOUND' | 'OUTBOUND';
303
317
 
304
318
  /**
305
- * Evaluators included in this run plan
319
+ * Phrases that trigger end of call. Empty array means disabled.
320
+ */
321
+ endCallPhrases: Array<string>;
322
+
323
+ /**
324
+ * Deprecated: Use metrics instead. Evaluators included in this run plan.
306
325
  */
307
326
  evaluators: Array<Data.Evaluator>;
308
327
 
@@ -326,6 +345,11 @@ export namespace SimulationRunPlanUpdateResponse {
326
345
  */
327
346
  maxSimulationDurationSeconds: number;
328
347
 
348
+ /**
349
+ * Metric definitions included in this run plan
350
+ */
351
+ metrics: Array<Data.Metric>;
352
+
329
353
  /**
330
354
  * Name of the run plan
331
355
  */
@@ -371,6 +395,10 @@ export namespace SimulationRunPlanUpdateResponse {
371
395
  id: string;
372
396
  }
373
397
 
398
+ export interface Metric {
399
+ id: string;
400
+ }
401
+
374
402
  export interface Persona {
375
403
  id: string;
376
404
  }
@@ -416,7 +444,12 @@ export namespace SimulationRunPlanListResponse {
416
444
  direction: 'INBOUND' | 'OUTBOUND';
417
445
 
418
446
  /**
419
- * Evaluators included in this run plan
447
+ * Phrases that trigger end of call. Empty array means disabled.
448
+ */
449
+ endCallPhrases: Array<string>;
450
+
451
+ /**
452
+ * Deprecated: Use metrics instead. Evaluators included in this run plan.
420
453
  */
421
454
  evaluators: Array<Data.Evaluator>;
422
455
 
@@ -440,6 +473,11 @@ export namespace SimulationRunPlanListResponse {
440
473
  */
441
474
  maxSimulationDurationSeconds: number;
442
475
 
476
+ /**
477
+ * Metric definitions included in this run plan
478
+ */
479
+ metrics: Array<Data.Metric>;
480
+
443
481
  /**
444
482
  * Name of the run plan
445
483
  */
@@ -485,6 +523,10 @@ export namespace SimulationRunPlanListResponse {
485
523
  id: string;
486
524
  }
487
525
 
526
+ export interface Metric {
527
+ id: string;
528
+ }
529
+
488
530
  export interface Persona {
489
531
  id: string;
490
532
  }
@@ -558,7 +600,12 @@ export namespace SimulationRunPlanGetByIDResponse {
558
600
  direction: 'INBOUND' | 'OUTBOUND';
559
601
 
560
602
  /**
561
- * Evaluators included in this run plan
603
+ * Phrases that trigger end of call. Empty array means disabled.
604
+ */
605
+ endCallPhrases: Array<string>;
606
+
607
+ /**
608
+ * Deprecated: Use metrics instead. Evaluators included in this run plan.
562
609
  */
563
610
  evaluators: Array<Data.Evaluator>;
564
611
 
@@ -582,6 +629,11 @@ export namespace SimulationRunPlanGetByIDResponse {
582
629
  */
583
630
  maxSimulationDurationSeconds: number;
584
631
 
632
+ /**
633
+ * Metric definitions included in this run plan
634
+ */
635
+ metrics: Array<Data.Metric>;
636
+
585
637
  /**
586
638
  * Name of the run plan
587
639
  */
@@ -627,6 +679,10 @@ export namespace SimulationRunPlanGetByIDResponse {
627
679
  id: string;
628
680
  }
629
681
 
682
+ export interface Metric {
683
+ id: string;
684
+ }
685
+
630
686
  export interface Persona {
631
687
  id: string;
632
688
  }
@@ -649,14 +705,14 @@ export interface SimulationRunPlanCreateParams {
649
705
  direction: 'INBOUND' | 'OUTBOUND';
650
706
 
651
707
  /**
652
- * Evaluators to include in this run plan
708
+ * Maximum duration in seconds for each simulation
653
709
  */
654
- evaluators: Array<SimulationRunPlanCreateParams.Evaluator>;
710
+ maxSimulationDurationSeconds: number;
655
711
 
656
712
  /**
657
- * Maximum duration in seconds for each simulation
713
+ * Metric definitions to include in this run plan
658
714
  */
659
- maxSimulationDurationSeconds: number;
715
+ metrics: Array<SimulationRunPlanCreateParams.Metric>;
660
716
 
661
717
  /**
662
718
  * Name of the run plan
@@ -669,7 +725,8 @@ export interface SimulationRunPlanCreateParams {
669
725
  personas: Array<SimulationRunPlanCreateParams.Persona>;
670
726
 
671
727
  /**
672
- * Scenarios to include in this run plan
728
+ * Scenarios to include in this run plan. The same scenario ID can appear multiple
729
+ * times with different variables.
673
730
  */
674
731
  scenarios: Array<SimulationRunPlanCreateParams.Scenario>;
675
732
 
@@ -683,6 +740,11 @@ export interface SimulationRunPlanCreateParams {
683
740
  */
684
741
  description?: string;
685
742
 
743
+ /**
744
+ * Phrases that trigger end of call. Empty array disables the feature.
745
+ */
746
+ endCallPhrases?: Array<string>;
747
+
686
748
  /**
687
749
  * Execution mode (PARALLEL or SEQUENTIAL)
688
750
  */
@@ -710,7 +772,7 @@ export namespace SimulationRunPlanCreateParams {
710
772
  id: string;
711
773
  }
712
774
 
713
- export interface Evaluator {
775
+ export interface Metric {
714
776
  id: string;
715
777
  }
716
778
 
@@ -719,7 +781,16 @@ export namespace SimulationRunPlanCreateParams {
719
781
  }
720
782
 
721
783
  export interface Scenario {
784
+ /**
785
+ * Scenario ID
786
+ */
722
787
  id: string;
788
+
789
+ /**
790
+ * Template variables for this scenario instance. The same scenario can appear
791
+ * multiple times with different variables.
792
+ */
793
+ variables?: { [key: string]: string };
723
794
  }
724
795
  }
725
796
 
@@ -740,9 +811,9 @@ export interface SimulationRunPlanUpdateParams {
740
811
  direction?: 'INBOUND' | 'OUTBOUND';
741
812
 
742
813
  /**
743
- * Evaluators to include in this run plan
814
+ * Phrases that trigger end of call. Empty array disables the feature.
744
815
  */
745
- evaluators?: Array<SimulationRunPlanUpdateParams.Evaluator>;
816
+ endCallPhrases?: Array<string>;
746
817
 
747
818
  /**
748
819
  * Execution mode (PARALLEL or SEQUENTIAL)
@@ -765,6 +836,11 @@ export interface SimulationRunPlanUpdateParams {
765
836
  */
766
837
  maxSimulationDurationSeconds?: number;
767
838
 
839
+ /**
840
+ * Metric definitions to include in this run plan
841
+ */
842
+ metrics?: Array<SimulationRunPlanUpdateParams.Metric>;
843
+
768
844
  /**
769
845
  * Name of the run plan
770
846
  */
@@ -776,7 +852,8 @@ export interface SimulationRunPlanUpdateParams {
776
852
  personas?: Array<SimulationRunPlanUpdateParams.Persona>;
777
853
 
778
854
  /**
779
- * Scenarios to include in this run plan
855
+ * Scenarios to include in this run plan. The same scenario ID can appear multiple
856
+ * times with different variables.
780
857
  */
781
858
  scenarios?: Array<SimulationRunPlanUpdateParams.Scenario>;
782
859
 
@@ -791,7 +868,7 @@ export namespace SimulationRunPlanUpdateParams {
791
868
  id: string;
792
869
  }
793
870
 
794
- export interface Evaluator {
871
+ export interface Metric {
795
872
  id: string;
796
873
  }
797
874
 
@@ -800,7 +877,16 @@ export namespace SimulationRunPlanUpdateParams {
800
877
  }
801
878
 
802
879
  export interface Scenario {
880
+ /**
881
+ * Scenario ID
882
+ */
803
883
  id: string;
884
+
885
+ /**
886
+ * Template variables for this scenario instance. The same scenario can appear
887
+ * multiple times with different variables.
888
+ */
889
+ variables?: { [key: string]: string };
804
890
  }
805
891
  }
806
892
 
@@ -110,7 +110,14 @@ export namespace SimulationScenarioCreateResponse {
110
110
  | 'CUSTOMER_TURN'
111
111
  | 'CUSTOMER_FIRST_MESSAGE'
112
112
  | 'CUSTOMER_SILENCE'
113
+ | 'CUSTOMER_DTMF'
113
114
  | 'VOICEMAIL';
115
+
116
+ /**
117
+ * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
118
+ * #, w/W for pauses.
119
+ */
120
+ dtmfDigits?: string | null;
114
121
  }
115
122
  }
116
123
  }
@@ -173,7 +180,14 @@ export namespace SimulationScenarioUpdateResponse {
173
180
  | 'CUSTOMER_TURN'
174
181
  | 'CUSTOMER_FIRST_MESSAGE'
175
182
  | 'CUSTOMER_SILENCE'
183
+ | 'CUSTOMER_DTMF'
176
184
  | 'VOICEMAIL';
185
+
186
+ /**
187
+ * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
188
+ * #, w/W for pauses.
189
+ */
190
+ dtmfDigits?: string | null;
177
191
  }
178
192
  }
179
193
  }
@@ -238,7 +252,14 @@ export namespace SimulationScenarioListResponse {
238
252
  | 'CUSTOMER_TURN'
239
253
  | 'CUSTOMER_FIRST_MESSAGE'
240
254
  | 'CUSTOMER_SILENCE'
255
+ | 'CUSTOMER_DTMF'
241
256
  | 'VOICEMAIL';
257
+
258
+ /**
259
+ * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
260
+ * #, w/W for pauses.
261
+ */
262
+ dtmfDigits?: string | null;
242
263
  }
243
264
  }
244
265
 
@@ -331,7 +352,14 @@ export namespace SimulationScenarioGetByIDResponse {
331
352
  | 'CUSTOMER_TURN'
332
353
  | 'CUSTOMER_FIRST_MESSAGE'
333
354
  | 'CUSTOMER_SILENCE'
355
+ | 'CUSTOMER_DTMF'
334
356
  | 'VOICEMAIL';
357
+
358
+ /**
359
+ * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
360
+ * #, w/W for pauses.
361
+ */
362
+ dtmfDigits?: string | null;
335
363
  }
336
364
  }
337
365
  }
@@ -361,7 +389,13 @@ export namespace SimulationScenarioCreateParams {
361
389
  /**
362
390
  * The type of this step
363
391
  */
364
- type: 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
392
+ type:
393
+ | 'AGENT_TURN'
394
+ | 'CUSTOMER_TURN'
395
+ | 'CUSTOMER_FIRST_MESSAGE'
396
+ | 'CUSTOMER_SILENCE'
397
+ | 'CUSTOMER_DTMF'
398
+ | 'VOICEMAIL';
365
399
  }
366
400
  }
367
401
 
@@ -399,7 +433,13 @@ export namespace SimulationScenarioUpdateParams {
399
433
  /**
400
434
  * The type of the new step
401
435
  */
402
- type: 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
436
+ type:
437
+ | 'AGENT_TURN'
438
+ | 'CUSTOMER_TURN'
439
+ | 'CUSTOMER_FIRST_MESSAGE'
440
+ | 'CUSTOMER_SILENCE'
441
+ | 'CUSTOMER_DTMF'
442
+ | 'VOICEMAIL';
403
443
  }
404
444
 
405
445
  /**
@@ -424,7 +464,13 @@ export namespace SimulationScenarioUpdateParams {
424
464
  /**
425
465
  * The new type of the step (optional)
426
466
  */
427
- type?: 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
467
+ type?:
468
+ | 'AGENT_TURN'
469
+ | 'CUSTOMER_TURN'
470
+ | 'CUSTOMER_FIRST_MESSAGE'
471
+ | 'CUSTOMER_SILENCE'
472
+ | 'CUSTOMER_DTMF'
473
+ | 'VOICEMAIL';
428
474
  }
429
475
 
430
476
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.23.1'; // x-release-please-version
1
+ export const VERSION = '2.25.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.23.1";
1
+ export declare const VERSION = "2.25.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.23.1";
1
+ export declare const VERSION = "2.25.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.23.1'; // x-release-please-version
4
+ exports.VERSION = '2.25.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.23.1'; // x-release-please-version
1
+ export const VERSION = '2.25.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map