@roarkanalytics/sdk 4.19.0 → 4.20.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 (55) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +1 -1
  3. package/resources/call.d.mts +128 -0
  4. package/resources/call.d.mts.map +1 -1
  5. package/resources/call.d.ts +128 -0
  6. package/resources/call.d.ts.map +1 -1
  7. package/resources/customer-flow-edge-case.d.mts +60 -0
  8. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  9. package/resources/customer-flow-edge-case.d.ts +60 -0
  10. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  11. package/resources/customer-flow.d.mts +240 -0
  12. package/resources/customer-flow.d.mts.map +1 -1
  13. package/resources/customer-flow.d.ts +240 -0
  14. package/resources/customer-flow.d.ts.map +1 -1
  15. package/resources/simulation-job.d.mts +10 -0
  16. package/resources/simulation-job.d.mts.map +1 -1
  17. package/resources/simulation-job.d.ts +10 -0
  18. package/resources/simulation-job.d.ts.map +1 -1
  19. package/resources/simulation-persona.d.mts +20 -0
  20. package/resources/simulation-persona.d.mts.map +1 -1
  21. package/resources/simulation-persona.d.ts +20 -0
  22. package/resources/simulation-persona.d.ts.map +1 -1
  23. package/resources/simulation-run-plan-job.d.mts +33 -2
  24. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  25. package/resources/simulation-run-plan-job.d.ts +33 -2
  26. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  27. package/resources/simulation-run-plan.d.mts +46 -42
  28. package/resources/simulation-run-plan.d.mts.map +1 -1
  29. package/resources/simulation-run-plan.d.ts +46 -42
  30. package/resources/simulation-run-plan.d.ts.map +1 -1
  31. package/resources/simulation-run-plan.js +0 -1
  32. package/resources/simulation-run-plan.js.map +1 -1
  33. package/resources/simulation-run-plan.mjs +0 -1
  34. package/resources/simulation-run-plan.mjs.map +1 -1
  35. package/resources/simulation.d.mts +46 -42
  36. package/resources/simulation.d.mts.map +1 -1
  37. package/resources/simulation.d.ts +46 -42
  38. package/resources/simulation.d.ts.map +1 -1
  39. package/resources/simulation.js +0 -1
  40. package/resources/simulation.js.map +1 -1
  41. package/resources/simulation.mjs +0 -1
  42. package/resources/simulation.mjs.map +1 -1
  43. package/src/resources/call.ts +152 -0
  44. package/src/resources/customer-flow-edge-case.ts +72 -0
  45. package/src/resources/customer-flow.ts +288 -0
  46. package/src/resources/simulation-job.ts +12 -0
  47. package/src/resources/simulation-persona.ts +24 -0
  48. package/src/resources/simulation-run-plan-job.ts +43 -2
  49. package/src/resources/simulation-run-plan.ts +52 -48
  50. package/src/resources/simulation.ts +52 -48
  51. package/src/version.ts +1 -1
  52. package/version.d.mts +1 -1
  53. package/version.d.ts +1 -1
  54. package/version.js +1 -1
  55. package/version.mjs +1 -1
@@ -712,6 +712,12 @@ export namespace SimulationRunPlanJobGetByIDResponse {
712
712
  */
713
713
  displayName?: string | null;
714
714
 
715
+ /**
716
+ * The E.164 number every call with this persona uses, when Roark has pinned one
717
+ * for your project. Present only when set; read-only.
718
+ */
719
+ phoneNumber?: string;
720
+
715
721
  /**
716
722
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
717
723
  */
@@ -941,7 +947,11 @@ export namespace SimulationRunPlanJobGetByIDResponse {
941
947
  * Every criterion the run missed. Empty when it passed.
942
948
  */
943
949
  failures: Array<
944
- Verdict.UnionMember0 | Verdict.UnionMember1 | Verdict.UnionMember2 | Verdict.UnionMember3
950
+ | Verdict.UnionMember0
951
+ | Verdict.UnionMember1
952
+ | Verdict.UnionMember2
953
+ | Verdict.UnionMember3
954
+ | Verdict.UnionMember4
945
955
  >;
946
956
 
947
957
  /**
@@ -1040,7 +1050,38 @@ export namespace SimulationRunPlanJobGetByIDResponse {
1040
1050
  type: 'INCOMPLETE_COVERAGE';
1041
1051
  }
1042
1052
 
1053
+ /**
1054
+ * Your agent never spoke on more than `maxShare` percent of the run. Those
1055
+ * simulations are left out of every check, so the run fails on them whatever the
1056
+ * checks say.
1057
+ */
1043
1058
  export interface UnionMember2 {
1059
+ /**
1060
+ * The largest share of simulations, 0-100, your agent may never speak on while the
1061
+ * run can pass.
1062
+ */
1063
+ maxShare: number;
1064
+
1065
+ /**
1066
+ * Simulations your agent answered and never spoke on.
1067
+ */
1068
+ neverSpokeCalls: number;
1069
+
1070
+ /**
1071
+ * Every simulation of the run that reached your agent.
1072
+ */
1073
+ totalCalls: number;
1074
+
1075
+ type: 'AGENT_NEVER_SPOKE';
1076
+
1077
+ /**
1078
+ * The agent as the run tested it. Null when the simulations tested more than one
1079
+ * agent.
1080
+ */
1081
+ agentName?: string | null;
1082
+ }
1083
+
1084
+ export interface UnionMember3 {
1044
1085
  metricDefinitionId: string;
1045
1086
 
1046
1087
  type: 'METRIC_NOT_EVALUATED';
@@ -1051,7 +1092,7 @@ export namespace SimulationRunPlanJobGetByIDResponse {
1051
1092
  metricName?: string | null;
1052
1093
  }
1053
1094
 
1054
- export interface UnionMember3 {
1095
+ export interface UnionMember4 {
1055
1096
  /**
1056
1097
  * Whether the missed minimum was the 80% default (`true`) or this metric's own.
1057
1098
  */
@@ -22,7 +22,6 @@ export class SimulationRunPlan extends APIResource {
22
22
  * ],
23
23
  * direction: 'INBOUND',
24
24
  * maxSimulationDurationSeconds: 300,
25
- * metrics: [{}],
26
25
  * name: 'My Run Plan',
27
26
  * });
28
27
  * ```
@@ -1466,12 +1465,6 @@ export interface SimulationRunPlanCreateParams {
1466
1465
  */
1467
1466
  maxSimulationDurationSeconds: number;
1468
1467
 
1469
- /**
1470
- * Metric definitions to include in this run plan. Reference each by `id` (UUID) or
1471
- * `slug`.
1472
- */
1473
- metrics: Array<SimulationRunPlanCreateParams.Metric>;
1474
-
1475
1468
  /**
1476
1469
  * Name of the run plan
1477
1470
  */
@@ -1626,6 +1619,17 @@ export interface SimulationRunPlanCreateParams {
1626
1619
  */
1627
1620
  maxConcurrentJobs?: number;
1628
1621
 
1622
+ /**
1623
+ * Metric definitions to include in this run plan. Reference each by `id` (UUID) or
1624
+ * `slug`.
1625
+ *
1626
+ * Optional when the attached `flows` carry the grading: metrics a flow declares
1627
+ * itself (with `includeFlowMetrics`), or the Agent Expectations and Keypad Entry
1628
+ * metrics a run adds for flows with expectations or expected keypad entries (with
1629
+ * `includeAutomaticMetrics`). A plan with nothing to grade is rejected with a 400.
1630
+ */
1631
+ metrics?: Array<SimulationRunPlanCreateParams.Metric>;
1632
+
1629
1633
  /**
1630
1634
  * Personas to include in this run plan. Required with `scenarios`; ignored with
1631
1635
  * `flows`, where each variant carries its own persona.
@@ -1649,47 +1653,6 @@ export namespace SimulationRunPlanCreateParams {
1649
1653
  id: string;
1650
1654
  }
1651
1655
 
1652
- export interface Metric {
1653
- /**
1654
- * Metric definition UUID. Provide either this or `slug`, not both.
1655
- */
1656
- id?: string;
1657
-
1658
- /**
1659
- * Which side of an enriched run this metric is scored on. Only meaningful with
1660
- * `enrichWithLiveConversation: true`, where a run has both a simulated
1661
- * conversation and the customer's own live recording of it.
1662
- *
1663
- * Defaults to `SIMULATED`. Use `LIVE` for a metric that must be measured against
1664
- * the real recording (audio quality, provider latency) rather than the simulated
1665
- * leg. `null` means the same as omitting it, so a plan read back from GET can be
1666
- * sent straight to PUT.
1667
- */
1668
- conversationSource?: 'SIMULATED' | 'LIVE' | null;
1669
-
1670
- /**
1671
- * Alias of `slug` accepted for backwards compatibility. Use `slug` for new
1672
- * integrations.
1673
- */
1674
- metricId?: string;
1675
-
1676
- /**
1677
- * THE BAR, and the only thing that decides pass/fail. The share of the run's
1678
- * simulations that must pass this check, 0-100.
1679
- *
1680
- * Applied to this check alone and never pooled: silence duration at 40 and word
1681
- * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
1682
- * word count. Omit or `null` for the 80% default.
1683
- */
1684
- minPassRate?: number | null;
1685
-
1686
- /**
1687
- * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
1688
- * not both.
1689
- */
1690
- slug?: string;
1691
- }
1692
-
1693
1656
  /**
1694
1657
  * One customer flow attached to a run plan, and which of its ways of running you
1695
1658
  * cover.
@@ -1795,6 +1758,47 @@ export namespace SimulationRunPlanCreateParams {
1795
1758
  }
1796
1759
  }
1797
1760
 
1761
+ export interface Metric {
1762
+ /**
1763
+ * Metric definition UUID. Provide either this or `slug`, not both.
1764
+ */
1765
+ id?: string;
1766
+
1767
+ /**
1768
+ * Which side of an enriched run this metric is scored on. Only meaningful with
1769
+ * `enrichWithLiveConversation: true`, where a run has both a simulated
1770
+ * conversation and the customer's own live recording of it.
1771
+ *
1772
+ * Defaults to `SIMULATED`. Use `LIVE` for a metric that must be measured against
1773
+ * the real recording (audio quality, provider latency) rather than the simulated
1774
+ * leg. `null` means the same as omitting it, so a plan read back from GET can be
1775
+ * sent straight to PUT.
1776
+ */
1777
+ conversationSource?: 'SIMULATED' | 'LIVE' | null;
1778
+
1779
+ /**
1780
+ * Alias of `slug` accepted for backwards compatibility. Use `slug` for new
1781
+ * integrations.
1782
+ */
1783
+ metricId?: string;
1784
+
1785
+ /**
1786
+ * THE BAR, and the only thing that decides pass/fail. The share of the run's
1787
+ * simulations that must pass this check, 0-100.
1788
+ *
1789
+ * Applied to this check alone and never pooled: silence duration at 40 and word
1790
+ * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
1791
+ * word count. Omit or `null` for the 80% default.
1792
+ */
1793
+ minPassRate?: number | null;
1794
+
1795
+ /**
1796
+ * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
1797
+ * not both.
1798
+ */
1799
+ slug?: string;
1800
+ }
1801
+
1798
1802
  export interface Persona {
1799
1803
  id: string;
1800
1804
  }
@@ -58,7 +58,6 @@ export class Simulation extends APIResource {
58
58
  * ],
59
59
  * direction: 'INBOUND',
60
60
  * maxSimulationDurationSeconds: 300,
61
- * metrics: [{}],
62
61
  * },
63
62
  * });
64
63
  * ```
@@ -269,12 +268,6 @@ export declare namespace SimulationRunParams {
269
268
  */
270
269
  maxSimulationDurationSeconds: number;
271
270
 
272
- /**
273
- * Metric definitions to include in this run plan. Reference each by `id` (UUID) or
274
- * `slug`.
275
- */
276
- metrics: Array<Plan.Metric>;
277
-
278
271
  /**
279
272
  * The reference value of `comparisonProperty`, for example `NONE` for
280
273
  * `BACKGROUND_NOISE` or `NORMAL` for `SPEECH_PACE`: shown first in the results.
@@ -417,6 +410,17 @@ export declare namespace SimulationRunParams {
417
410
  */
418
411
  maxConcurrentJobs?: number;
419
412
 
413
+ /**
414
+ * Metric definitions to include in this run plan. Reference each by `id` (UUID) or
415
+ * `slug`.
416
+ *
417
+ * Optional when the attached `flows` carry the grading: metrics a flow declares
418
+ * itself (with `includeFlowMetrics`), or the Agent Expectations and Keypad Entry
419
+ * metrics a run adds for flows with expectations or expected keypad entries (with
420
+ * `includeAutomaticMetrics`). A plan with nothing to grade is rejected with a 400.
421
+ */
422
+ metrics?: Array<Plan.Metric>;
423
+
420
424
  /**
421
425
  * What to call this. Generated from the date when omitted, and required with
422
426
  * `saveAsPlan`.
@@ -446,47 +450,6 @@ export declare namespace SimulationRunParams {
446
450
  id: string;
447
451
  }
448
452
 
449
- export interface Metric {
450
- /**
451
- * Metric definition UUID. Provide either this or `slug`, not both.
452
- */
453
- id?: string;
454
-
455
- /**
456
- * Which side of an enriched run this metric is scored on. Only meaningful with
457
- * `enrichWithLiveConversation: true`, where a run has both a simulated
458
- * conversation and the customer's own live recording of it.
459
- *
460
- * Defaults to `SIMULATED`. Use `LIVE` for a metric that must be measured against
461
- * the real recording (audio quality, provider latency) rather than the simulated
462
- * leg. `null` means the same as omitting it, so a plan read back from GET can be
463
- * sent straight to PUT.
464
- */
465
- conversationSource?: 'SIMULATED' | 'LIVE' | null;
466
-
467
- /**
468
- * Alias of `slug` accepted for backwards compatibility. Use `slug` for new
469
- * integrations.
470
- */
471
- metricId?: string;
472
-
473
- /**
474
- * THE BAR, and the only thing that decides pass/fail. The share of the run's
475
- * simulations that must pass this check, 0-100.
476
- *
477
- * Applied to this check alone and never pooled: silence duration at 40 and word
478
- * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
479
- * word count. Omit or `null` for the 80% default.
480
- */
481
- minPassRate?: number | null;
482
-
483
- /**
484
- * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
485
- * not both.
486
- */
487
- slug?: string;
488
- }
489
-
490
453
  /**
491
454
  * One customer flow attached to a run plan, and which of its ways of running you
492
455
  * cover.
@@ -592,6 +555,47 @@ export declare namespace SimulationRunParams {
592
555
  }
593
556
  }
594
557
 
558
+ export interface Metric {
559
+ /**
560
+ * Metric definition UUID. Provide either this or `slug`, not both.
561
+ */
562
+ id?: string;
563
+
564
+ /**
565
+ * Which side of an enriched run this metric is scored on. Only meaningful with
566
+ * `enrichWithLiveConversation: true`, where a run has both a simulated
567
+ * conversation and the customer's own live recording of it.
568
+ *
569
+ * Defaults to `SIMULATED`. Use `LIVE` for a metric that must be measured against
570
+ * the real recording (audio quality, provider latency) rather than the simulated
571
+ * leg. `null` means the same as omitting it, so a plan read back from GET can be
572
+ * sent straight to PUT.
573
+ */
574
+ conversationSource?: 'SIMULATED' | 'LIVE' | null;
575
+
576
+ /**
577
+ * Alias of `slug` accepted for backwards compatibility. Use `slug` for new
578
+ * integrations.
579
+ */
580
+ metricId?: string;
581
+
582
+ /**
583
+ * THE BAR, and the only thing that decides pass/fail. The share of the run's
584
+ * simulations that must pass this check, 0-100.
585
+ *
586
+ * Applied to this check alone and never pooled: silence duration at 40 and word
587
+ * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
588
+ * word count. Omit or `null` for the 80% default.
589
+ */
590
+ minPassRate?: number | null;
591
+
592
+ /**
593
+ * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
594
+ * not both.
595
+ */
596
+ slug?: string;
597
+ }
598
+
595
599
  export interface Persona {
596
600
  id: string;
597
601
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.19.0'; // x-release-please-version
1
+ export const VERSION = '4.20.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.19.0";
1
+ export declare const VERSION = "4.20.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.19.0";
1
+ export declare const VERSION = "4.20.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 = '4.19.0'; // x-release-please-version
4
+ exports.VERSION = '4.20.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.19.0'; // x-release-please-version
1
+ export const VERSION = '4.20.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map