@roarkanalytics/sdk 4.22.0 → 5.0.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 (60) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/call.d.mts +3 -3
  11. package/resources/call.d.mts.map +1 -1
  12. package/resources/call.d.ts +3 -3
  13. package/resources/call.d.ts.map +1 -1
  14. package/resources/index.d.mts +1 -1
  15. package/resources/index.d.mts.map +1 -1
  16. package/resources/index.d.ts +1 -1
  17. package/resources/index.d.ts.map +1 -1
  18. package/resources/index.js.map +1 -1
  19. package/resources/index.mjs +1 -1
  20. package/resources/index.mjs.map +1 -1
  21. package/resources/me.d.mts +208 -1
  22. package/resources/me.d.mts.map +1 -1
  23. package/resources/me.d.ts +208 -1
  24. package/resources/me.d.ts.map +1 -1
  25. package/resources/me.js +46 -0
  26. package/resources/me.js.map +1 -1
  27. package/resources/me.mjs +46 -0
  28. package/resources/me.mjs.map +1 -1
  29. package/resources/simulation-run-plan-job.d.mts +23 -1
  30. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  31. package/resources/simulation-run-plan-job.d.ts +23 -1
  32. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  33. package/resources/simulation-run-plan.d.mts +701 -308
  34. package/resources/simulation-run-plan.d.mts.map +1 -1
  35. package/resources/simulation-run-plan.d.ts +701 -308
  36. package/resources/simulation-run-plan.d.ts.map +1 -1
  37. package/resources/simulation-run-plan.js +7 -0
  38. package/resources/simulation-run-plan.js.map +1 -1
  39. package/resources/simulation-run-plan.mjs +7 -0
  40. package/resources/simulation-run-plan.mjs.map +1 -1
  41. package/resources/simulation.d.mts +128 -18
  42. package/resources/simulation.d.mts.map +1 -1
  43. package/resources/simulation.d.ts +128 -18
  44. package/resources/simulation.d.ts.map +1 -1
  45. package/src/client.ts +18 -2
  46. package/src/resources/call.ts +3 -0
  47. package/src/resources/index.ts +9 -1
  48. package/src/resources/me.ts +261 -1
  49. package/src/resources/simulation-run-plan-job.ts +26 -1
  50. package/src/resources/simulation-run-plan.ts +767 -309
  51. package/src/resources/simulation.ts +138 -18
  52. package/src/version.ts +1 -1
  53. package/version.d.mts +1 -1
  54. package/version.d.mts.map +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.d.ts.map +1 -1
  57. package/version.js +1 -1
  58. package/version.js.map +1 -1
  59. package/version.mjs +1 -1
  60. package/version.mjs.map +1 -1
@@ -276,9 +276,10 @@ export declare namespace SimulationRunParams {
276
276
  * `sweepAttribution`).
277
277
  *
278
278
  * Stored rather than assumed, so the report can say "compared against US accent"
279
- * instead of implying Roark decided which value is normal. Most properties have an
280
- * obvious baseline and the dashboard prefills it; `GENDER` has none, so choose the
281
- * one you are testing against.
279
+ * instead of implying Roark decided which value is normal. Omit it and the
280
+ * property's own norm is used, as the dashboard prefills it, or none when your
281
+ * `comparisonValues` leave the norm out. `GENDER` has no norm, so choose the one
282
+ * you are testing against.
282
283
  */
283
284
  comparisonBaseline?: string | null;
284
285
 
@@ -312,18 +313,37 @@ export declare namespace SimulationRunParams {
312
313
  | null;
313
314
 
314
315
  /**
315
- * Which values of `comparisonProperty` to run. This is what the plan costs: the
316
- * flow is attached once per value, so ten values is ten times the calls of one.
316
+ * The arms to run, for a plan that sweeps `comparisonProperty`. This is what the
317
+ * plan costs: the flow is attached once per arm, so ten arms is ten times the
318
+ * calls of one.
317
319
  *
318
- * Omit it to run every value the property has, which for `ACCENT` is more than
319
- * twenty. Send a subset to narrow the sweep, for example three accents you
320
- * actually serve. A `comparisonBaseline` outside this set is rejected, because it
321
- * would anchor every difference to an arm the run never made.
320
+ * Attach each flow once, as you would without a comparison: the plan builds the
321
+ * arms, running the happy path or edge cases you selected under every arm. Built
322
+ * arms need at least 5 calls per arm (`iterationCount` times the test cases per
323
+ * arm), or the plan is refused with `400`. Flows that all carry `overrides` on
324
+ * `comparisonProperty` already are the arms and are kept as you wrote them; a mix
325
+ * of flows with and without one is refused.
326
+ *
327
+ * Each entry is one arm. A bare value runs it plain: `"CITY"`. An object runs the
328
+ * value with something pinned on that arm only, such as a noise level per bed:
329
+ * `{ "value": "OFFICE", "backgroundNoiseVolume": 0.6 }` plays OFFICE at 60% while
330
+ * the other beds keep the default. List a value more than once with different pins
331
+ * to run it as several arms: DRIVING at 0.7 and DRIVING at 1 are two arms,
332
+ * reported as `Driving (70% noise)` and `Driving (100% noise)`, and `"DRIVING"`
333
+ * beside them keeps the plain arm too. The sweep still varies one property; what
334
+ * an arm pins is part of "everything else" for that arm only, so the report still
335
+ * compares the arms on `comparisonProperty`.
336
+ *
337
+ * Omit it to run every value the property has, plain, which for `ACCENT` is more
338
+ * than twenty. A `comparisonBaseline` outside the values listed is rejected,
339
+ * because it would anchor every difference to an arm the run never made. A value
340
+ * the property cannot take, a pin the sweep cannot account for, or the same arm
341
+ * listed twice is rejected with `400`.
322
342
  *
323
343
  * Not stored as a field: the arms are the values. Reading the plan back returns
324
- * them as its flow attachments.
344
+ * them as its flow attachments, each with its pins as `overrides`.
325
345
  */
326
- comparisonValues?: Array<string>;
346
+ comparisonValues?: Array<string | Plan.ComparisonArm>;
327
347
 
328
348
  /**
329
349
  * Description of the run plan
@@ -469,6 +489,28 @@ export declare namespace SimulationRunParams {
469
489
  id: string;
470
490
  }
471
491
 
492
+ /**
493
+ * One arm of a sweep: the swept value it runs, and what it pins besides that
494
+ * value. The OFFICE arm of a BACKGROUND_NOISE sweep playing at 60% while the other
495
+ * beds keep their level is `{ "value": "OFFICE", "backgroundNoiseVolume": 0.6 }`.
496
+ * The report compares the arms on the swept property only, so each sweep may pin
497
+ * just what its experiment calls for: a BACKGROUND_NOISE sweep may pin
498
+ * `backgroundNoiseVolume`, and no other sweep pins anything yet. A pin the sweep
499
+ * cannot account for is rejected with `400`.
500
+ */
501
+ export interface ComparisonArm {
502
+ /**
503
+ * The swept value this arm runs, a value of `comparisonProperty`.
504
+ */
505
+ value: string;
506
+
507
+ /**
508
+ * The noise level this arm plays at, 0 to 1. The environment default is 0.1. Only
509
+ * a `BACKGROUND_NOISE` sweep may pin it.
510
+ */
511
+ backgroundNoiseVolume?: number;
512
+ }
513
+
472
514
  /**
473
515
  * One customer flow attached to a run plan, and which of its ways of running you
474
516
  * cover.
@@ -758,6 +800,13 @@ export declare namespace SimulationRunParams {
758
800
  */
759
801
  template: string;
760
802
 
803
+ /**
804
+ * Metrics to collect on top of the template's own, referenced by `id` or `slug`
805
+ * like a plan's `metrics`. The template's metrics and checks always run; naming
806
+ * one of them here again keeps it once, with the success criteria you set on it.
807
+ */
808
+ additionalMetrics?: Array<RunSimulationFromTemplate.AdditionalMetric>;
809
+
761
810
  /**
762
811
  * The sweep's reference value, shown first in the results. Defaults to the
763
812
  * template's own baseline, as returned by GET /v1/simulation/template. Whether a
@@ -773,16 +822,19 @@ export declare namespace SimulationRunParams {
773
822
  comparisonBaseline?: string | null;
774
823
 
775
824
  /**
776
- * Which values of the sweep to run, for a template that sweeps one (GET
825
+ * The arms of the sweep to run, for a template that sweeps one (GET
777
826
  * /v1/simulation/template returns `sweep.property` for those that do). This is
778
- * what the run costs: the flow is called once per value, so ten values is ten
779
- * times the calls of one.
827
+ * what the run costs: the flow is called once per arm, so ten arms is ten times
828
+ * the calls of one.
780
829
  *
781
- * Omit it to run every value the property has, which for `accent-handling` is more
782
- * than twenty. Send a subset to narrow it, for example the three accents you
783
- * actually serve.
830
+ * Omit it to run every value the property has, plain, which for `accent-handling`
831
+ * is more than twenty. Send a subset to narrow it, for example the three accents
832
+ * you actually serve. An object entry pins something on that arm only, such as a
833
+ * noise level per bed on `background-noise-robustness`:
834
+ * `{ "value": "OFFICE", "backgroundNoiseVolume": 0.6 }` plays OFFICE at 60% while
835
+ * the other beds keep the default. See `POST /v1/simulation/plan`.
784
836
  */
785
- comparisonValues?: Array<string>;
837
+ comparisonValues?: Array<string | RunSimulationFromTemplate.ComparisonArm>;
786
838
 
787
839
  /**
788
840
  * Phrases that trigger end of call. Empty array disables the feature.
@@ -830,6 +882,11 @@ export declare namespace SimulationRunParams {
830
882
  * REPLACE the ones it would have run, so you can narrow a suite to the cases you
831
883
  * care about. Either way, GET /v1/simulation/template lists the flows and variant
832
884
  * ids each template covers.
885
+ *
886
+ * On a template that sweeps a property, every value runs exactly what you select
887
+ * here: the happy path, the edge cases you name, or `edgeCases: "ALL"`. Each
888
+ * selected case is a call per value per iteration, so naming three edge cases
889
+ * triples the run.
833
890
  */
834
891
  flows?: Array<RunSimulationFromTemplate.Flow>;
835
892
 
@@ -914,6 +971,69 @@ export declare namespace SimulationRunParams {
914
971
  id: string;
915
972
  }
916
973
 
974
+ export interface AdditionalMetric {
975
+ /**
976
+ * Metric definition UUID. Provide either this or `slug`, not both.
977
+ */
978
+ id?: string;
979
+
980
+ /**
981
+ * Which side of an enriched run this metric is scored on. Only meaningful with
982
+ * `enrichWithLiveConversation: true`, where a run has both a simulated
983
+ * conversation and the customer's own live recording of it.
984
+ *
985
+ * Defaults to `SIMULATED`. Use `LIVE` for a metric that must be measured against
986
+ * the real recording (audio quality, provider latency) rather than the simulated
987
+ * leg. `null` means the same as omitting it, so a plan read back from GET can be
988
+ * sent straight to PUT.
989
+ */
990
+ conversationSource?: 'SIMULATED' | 'LIVE' | null;
991
+
992
+ /**
993
+ * Alias of `slug` accepted for backwards compatibility. Use `slug` for new
994
+ * integrations.
995
+ */
996
+ metricId?: string;
997
+
998
+ /**
999
+ * THE BAR, and the only thing that decides pass/fail. The share of the run's
1000
+ * simulations that must pass this check, 0-100.
1001
+ *
1002
+ * Applied to this check alone and never pooled: silence duration at 40 and word
1003
+ * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
1004
+ * word count. Omit or `null` for the 80% default.
1005
+ */
1006
+ minPassRate?: number | null;
1007
+
1008
+ /**
1009
+ * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
1010
+ * not both.
1011
+ */
1012
+ slug?: string;
1013
+ }
1014
+
1015
+ /**
1016
+ * One arm of a sweep: the swept value it runs, and what it pins besides that
1017
+ * value. The OFFICE arm of a BACKGROUND_NOISE sweep playing at 60% while the other
1018
+ * beds keep their level is `{ "value": "OFFICE", "backgroundNoiseVolume": 0.6 }`.
1019
+ * The report compares the arms on the swept property only, so each sweep may pin
1020
+ * just what its experiment calls for: a BACKGROUND_NOISE sweep may pin
1021
+ * `backgroundNoiseVolume`, and no other sweep pins anything yet. A pin the sweep
1022
+ * cannot account for is rejected with `400`.
1023
+ */
1024
+ export interface ComparisonArm {
1025
+ /**
1026
+ * The swept value this arm runs, a value of `comparisonProperty`.
1027
+ */
1028
+ value: string;
1029
+
1030
+ /**
1031
+ * The noise level this arm plays at, 0 to 1. The environment default is 0.1. Only
1032
+ * a `BACKGROUND_NOISE` sweep may pin it.
1033
+ */
1034
+ backgroundNoiseVolume?: number;
1035
+ }
1036
+
917
1037
  /**
918
1038
  * One customer flow attached to a run plan, and which of its ways of running you
919
1039
  * cover.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.22.0'; // x-release-please-version
1
+ export const VERSION = '5.0.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.22.0";
1
+ export declare const VERSION = "5.0.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.22.0";
1
+ export declare const VERSION = "5.0.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
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.22.0'; // x-release-please-version
4
+ exports.VERSION = '5.0.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.22.0'; // x-release-please-version
1
+ export const VERSION = '5.0.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}