@roarkanalytics/cli 0.45.0 → 0.50.1

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.
package/commands.js CHANGED
@@ -14,6 +14,8 @@ exports.GROUPS = {
14
14
  'agent prompt version': 'Read agent prompt versions',
15
15
  'agent-config': 'Manage agent configs',
16
16
  'agent-config staging': 'Manage agent config staging',
17
+ analytics: 'Read analyticses',
18
+ 'analytics schema': 'Read analytics schema',
17
19
  autoimprove: 'Manage autoimproves',
18
20
  'autoimprove job': 'Manage autoimprove jobs',
19
21
  'autoimprove job guidance': 'Read autoimprove job guidance',
@@ -25,6 +27,8 @@ exports.GROUPS = {
25
27
  'benchmark target history': 'Read benchmark target histories',
26
28
  'benchmark target score-sample': 'Read benchmark target score samples',
27
29
  call: 'Manage calls',
30
+ 'call batch': 'Manage call batch',
31
+ 'call cost': 'Read call cost',
28
32
  'call metric': 'Read call metrics',
29
33
  'call property': 'Manage call property',
30
34
  'call sentiment-run': 'Read call sentiment runs',
@@ -36,6 +40,10 @@ exports.GROUPS = {
36
40
  'customer-flow edge-case': 'Manage customer flow edge cases',
37
41
  'customer-flow graph': 'Manage customer flow graph',
38
42
  'customer-flow happy-path': 'Manage customer flow happy path',
43
+ dashboard: 'Manage dashboards',
44
+ 'dashboard data': 'Read dashboard data',
45
+ 'dashboard widget': 'Manage dashboard widgets',
46
+ 'dashboard widget-data': 'Read dashboard widget data',
39
47
  'http-request-definition': 'Manage HTTP request definitions',
40
48
  metric: 'Manage metrics',
41
49
  'metric collection-job': 'Manage metric collection jobs',
@@ -51,6 +59,7 @@ exports.GROUPS = {
51
59
  'simulation persona': 'Manage simulation personas',
52
60
  'simulation plan': 'Manage simulation plans',
53
61
  'simulation plan job': 'Manage simulation plan jobs',
62
+ 'simulation plan job cost': 'Read simulation plan job cost',
54
63
  'simulation plan job debrief': 'Manage simulation plan job debrief',
55
64
  'simulation plan job result': 'Read simulation plan job result',
56
65
  'simulation run-group': 'Manage simulation run groups',
@@ -58,6 +67,7 @@ exports.GROUPS = {
58
67
  'simulation template': 'Read simulation templates',
59
68
  'simulation tool': 'Read simulation tool',
60
69
  'simulation tool-fixture': 'Manage simulation tool fixtures',
70
+ usage: 'Read usage',
61
71
  webhook: 'Manage webhooks',
62
72
  };
63
73
  exports.COMMANDS = [
@@ -751,6 +761,115 @@ exports.COMMANDS = [
751
761
  acceptsBody: true,
752
762
  requiresAuth: true,
753
763
  },
764
+ {
765
+ commandPath: ['analytics', 'query'],
766
+ clientProperty: 'analytics',
767
+ methodName: 'query',
768
+ httpMethod: 'post',
769
+ httpPath: '/v1/analytics/query',
770
+ summary: 'Run an analytics query',
771
+ description: "Aggregates metric values and conversation counts over a time window and returns one series per measure, with a total for the window and per-interval buckets. The same query a dashboard widget runs, without saving anything. - `measures`: what to aggregate. A METRIC measure names its metric by slug; CONVERSATION counts conversations; UPTIME reads health checks. The aggregation defaults by the metric's output type. - `timeRange`: LAST n DAYS/WEEKS/MONTHS, a CALENDAR_ALIGNED period (TODAY, THIS_MONTH, ...), FIXED from/to, or SINCE. Defaults to the last 30 days; at most 731 days. Calendar periods and buckets align to `timezone` (IANA, default UTC). - `filters` apply to every measure; a measure's own `filters` add to them. - `breakdown` on a measure returns one series per value (largest 50 kept). - `comparisonGroups` (2 to 5) run every measure once per named filter set; `comparisonMode: PREVIOUS_PERIOD` adds the preceding window's values. Values are in the metric's display units. A PASS_RATE is a 0 to 1 share; `sampleSize` 0 means no data. A query the analytics store cannot answer returns 400 naming the unsupported part.",
772
+ positionals: [],
773
+ flags: [
774
+ {
775
+ name: 'measures',
776
+ path: ['measures'],
777
+ location: 'body',
778
+ required: true,
779
+ description: 'What to aggregate: 1 to 10 measures.',
780
+ valueKind: 'array',
781
+ repeatable: false,
782
+ },
783
+ {
784
+ name: 'filters',
785
+ path: ['filters'],
786
+ location: 'body',
787
+ required: false,
788
+ description: "Applied to every measure, on top of each measure's own filters.",
789
+ valueKind: 'array',
790
+ repeatable: false,
791
+ },
792
+ {
793
+ name: 'interval',
794
+ path: ['interval'],
795
+ location: 'body',
796
+ required: false,
797
+ description: "Bucket size. Defaults from the window's length and steps coarser when the window would exceed 500 buckets.",
798
+ valueKind: 'string',
799
+ enumValues: ['HOUR', 'DAY', 'WEEK', 'MONTH'],
800
+ repeatable: false,
801
+ },
802
+ {
803
+ name: 'comparison-mode',
804
+ path: ['comparisonMode'],
805
+ location: 'body',
806
+ required: false,
807
+ description: 'PREVIOUS_PERIOD adds the preceding window of the same length to every series.',
808
+ valueKind: 'string',
809
+ enumValues: ['NONE', 'PREVIOUS_PERIOD'],
810
+ repeatable: false,
811
+ },
812
+ {
813
+ name: 'comparison-groups',
814
+ path: ['comparisonGroups'],
815
+ location: 'body',
816
+ required: false,
817
+ description: 'Run every measure once per named filter set, e.g. one group per agent.',
818
+ valueKind: 'array',
819
+ repeatable: false,
820
+ },
821
+ {
822
+ name: 'time-range',
823
+ path: ['timeRange'],
824
+ location: 'body',
825
+ required: false,
826
+ description: 'Defaults to the last 30 days.',
827
+ valueKind: 'string',
828
+ repeatable: false,
829
+ },
830
+ {
831
+ name: 'timezone',
832
+ path: ['timezone'],
833
+ location: 'body',
834
+ required: false,
835
+ description: 'IANA zone that buckets and calendar periods align to, e.g. America/New_York. Defaults to UTC.',
836
+ valueKind: 'string',
837
+ repeatable: false,
838
+ },
839
+ {
840
+ name: 'include-buckets',
841
+ path: ['includeBuckets'],
842
+ location: 'body',
843
+ required: false,
844
+ description: 'Set false to return only the window totals.',
845
+ valueKind: 'boolean',
846
+ repeatable: false,
847
+ },
848
+ ],
849
+ hasParams: true,
850
+ paramsAllOptional: false,
851
+ bodyOpaque: false,
852
+ bodyVariants: [],
853
+ acceptsBody: true,
854
+ requiresAuth: true,
855
+ },
856
+ {
857
+ commandPath: ['analytics', 'schema', 'get'],
858
+ clientProperty: 'analytics',
859
+ methodName: 'getSchema',
860
+ httpMethod: 'get',
861
+ httpPath: '/v1/analytics/schema',
862
+ summary: 'Get the analytics schema',
863
+ description: 'Lists what can go into an analytics query for this project: every metric by slug with its output type, default aggregation and the aggregations it supports; the measure types; the filter and breakdown types with the properties each accepts; and the custom call properties seen in the project. Read this first when building a query.',
864
+ positionals: [],
865
+ flags: [],
866
+ hasParams: false,
867
+ paramsAllOptional: true,
868
+ bodyOpaque: false,
869
+ bodyVariants: [],
870
+ acceptsBody: false,
871
+ requiresAuth: true,
872
+ },
754
873
  {
755
874
  commandPath: ['autoimprove', 'job', 'answer'],
756
875
  clientProperty: 'autoimproveJob',
@@ -1333,6 +1452,55 @@ exports.COMMANDS = [
1333
1452
  acceptsBody: false,
1334
1453
  requiresAuth: true,
1335
1454
  },
1455
+ {
1456
+ commandPath: ['call', 'batch', 'delete'],
1457
+ clientProperty: 'call',
1458
+ methodName: 'batchDelete',
1459
+ httpMethod: 'post',
1460
+ httpPath: '/v1/call/batch-delete',
1461
+ summary: 'Delete calls in batch',
1462
+ description: 'Deletes up to 100 calls by ID in one request. Each deleted call, its metrics and its analysis are hidden from every read, and any analysis still running on it is cancelled. IDs that do not exist in this project, or were already deleted, are returned in notFoundCallIds and left untouched. The request succeeds even when none of the calls are found. IDs are returned lowercase, each once.',
1463
+ positionals: [],
1464
+ flags: [
1465
+ {
1466
+ name: 'call-ids',
1467
+ path: ['callIds'],
1468
+ location: 'body',
1469
+ required: true,
1470
+ description: 'IDs of the calls to delete, at most 100. Repeated IDs are counted once.',
1471
+ valueKind: 'array',
1472
+ repeatable: true,
1473
+ },
1474
+ ],
1475
+ hasParams: true,
1476
+ paramsAllOptional: false,
1477
+ bodyOpaque: false,
1478
+ bodyVariants: [],
1479
+ acceptsBody: true,
1480
+ requiresAuth: true,
1481
+ },
1482
+ {
1483
+ commandPath: ['call', 'cost', 'get'],
1484
+ clientProperty: 'call',
1485
+ methodName: 'getCost',
1486
+ httpMethod: 'get',
1487
+ httpPath: '/v1/call/{callId}/cost',
1488
+ summary: 'Get call cost',
1489
+ description: 'The billable spend attributed to one call, split by cost type, with every cost line behind it. Simulated calls include the costs their simulation incurred before the call connected. Amounts are billable spend only, in exact micro-dollars (`*UsdMicros`) and dollars (`*Usd`, for display). Requires an API key with the `billing:read` permission.',
1490
+ positionals: [
1491
+ {
1492
+ name: 'call-id',
1493
+ paramKey: 'callId',
1494
+ },
1495
+ ],
1496
+ flags: [],
1497
+ hasParams: false,
1498
+ paramsAllOptional: true,
1499
+ bodyOpaque: false,
1500
+ bodyVariants: [],
1501
+ acceptsBody: false,
1502
+ requiresAuth: true,
1503
+ },
1336
1504
  {
1337
1505
  commandPath: ['call', 'create'],
1338
1506
  clientProperty: 'call',
@@ -1553,6 +1721,28 @@ exports.COMMANDS = [
1553
1721
  acceptsBody: true,
1554
1722
  requiresAuth: true,
1555
1723
  },
1724
+ {
1725
+ commandPath: ['call', 'delete'],
1726
+ clientProperty: 'call',
1727
+ methodName: 'delete',
1728
+ httpMethod: 'delete',
1729
+ httpPath: '/v1/call/{callId}',
1730
+ summary: 'Delete a call',
1731
+ description: 'Deletes a call by its ID. The call, its metrics and its analysis are hidden from every read, and any analysis still running on it is cancelled. Returns 404 when the call does not exist in this project or was already deleted.',
1732
+ positionals: [
1733
+ {
1734
+ name: 'call-id',
1735
+ paramKey: 'callId',
1736
+ },
1737
+ ],
1738
+ flags: [],
1739
+ hasParams: false,
1740
+ paramsAllOptional: true,
1741
+ bodyOpaque: false,
1742
+ bodyVariants: [],
1743
+ acceptsBody: false,
1744
+ requiresAuth: true,
1745
+ },
1556
1746
  {
1557
1747
  commandPath: ['call', 'get'],
1558
1748
  clientProperty: 'call',
@@ -1689,6 +1879,15 @@ exports.COMMANDS = [
1689
1879
  enumValues: ['true', 'false'],
1690
1880
  repeatable: false,
1691
1881
  },
1882
+ {
1883
+ name: 'properties',
1884
+ path: ['properties'],
1885
+ location: 'query',
1886
+ required: false,
1887
+ description: 'Filter on custom properties, one entry per property name: properties[<name>][exists]=true keeps calls that have the property set (whatever the value), properties[<name>][exists]=false keeps calls missing it (never sent, sent as null, or removed). A property the project has never seen is missing on every call. Names match the way properties are stored, so planTier and plan_tier are one property. At most 20 properties; a name taken by a built-in call filter, such as status, is rejected with 400.',
1888
+ valueKind: 'object',
1889
+ repeatable: false,
1890
+ },
1692
1891
  ],
1693
1892
  hasParams: true,
1694
1893
  paramsAllOptional: true,
@@ -2440,287 +2639,843 @@ exports.COMMANDS = [
2440
2639
  },
2441
2640
  ],
2442
2641
  hasParams: true,
2443
- paramsAllOptional: false,
2642
+ paramsAllOptional: false,
2643
+ bodyOpaque: false,
2644
+ bodyVariants: [],
2645
+ acceptsBody: true,
2646
+ requiresAuth: true,
2647
+ },
2648
+ {
2649
+ commandPath: ['customer-flow', 'happy-path', 'update'],
2650
+ clientProperty: 'customerFlow',
2651
+ methodName: 'updateHappyPath',
2652
+ httpMethod: 'put',
2653
+ httpPath: '/v1/customer-flow/{flowId}/happy-path',
2654
+ summary: "Update a flow's happy path",
2655
+ description: "Updates the happy path's title, persona, environment, brief or expectations. Omitted fields are left alone; `additionalExpectations` replaces the set wholesale rather than appending. Its persona and environment are what the edge cases inherit, so changing them here changes every edge case that does not name its own.",
2656
+ positionals: [
2657
+ {
2658
+ name: 'flow-id',
2659
+ paramKey: 'flowId',
2660
+ },
2661
+ ],
2662
+ flags: [
2663
+ {
2664
+ name: 'title',
2665
+ path: ['title'],
2666
+ location: 'body',
2667
+ required: false,
2668
+ valueKind: 'string',
2669
+ repeatable: false,
2670
+ },
2671
+ {
2672
+ name: 'environment-id',
2673
+ path: ['environmentId'],
2674
+ location: 'body',
2675
+ required: false,
2676
+ valueKind: 'string',
2677
+ repeatable: false,
2678
+ },
2679
+ {
2680
+ name: 'prompt',
2681
+ path: ['prompt'],
2682
+ location: 'body',
2683
+ required: false,
2684
+ valueKind: 'string',
2685
+ repeatable: false,
2686
+ },
2687
+ {
2688
+ name: 'preceded-by-customer-flow-id',
2689
+ path: ['precededByCustomerFlowId'],
2690
+ location: 'body',
2691
+ required: false,
2692
+ valueKind: 'string',
2693
+ repeatable: false,
2694
+ },
2695
+ {
2696
+ name: 'preceded-by-customer-flow-variant-id',
2697
+ path: ['precededByCustomerFlowVariantId'],
2698
+ location: 'body',
2699
+ required: false,
2700
+ valueKind: 'string',
2701
+ repeatable: false,
2702
+ },
2703
+ {
2704
+ name: 'include-flow-expectations',
2705
+ path: ['includeFlowExpectations'],
2706
+ location: 'body',
2707
+ required: false,
2708
+ description: "Whether this edge case is graded on the flow's agentExpectations as well as its own additionalExpectations. Defaults to true; false grades it on its additionalExpectations only.",
2709
+ valueKind: 'boolean',
2710
+ repeatable: false,
2711
+ },
2712
+ {
2713
+ name: 'persona-override-id',
2714
+ path: ['personaOverrideId'],
2715
+ location: 'body',
2716
+ required: false,
2717
+ description: "The persona this runs as. Null on an edge case inherits the happy path's.",
2718
+ valueKind: 'string',
2719
+ repeatable: false,
2720
+ },
2721
+ {
2722
+ name: 'additional-expectations',
2723
+ path: ['additionalExpectations'],
2724
+ location: 'body',
2725
+ required: false,
2726
+ description: "The expectations graded on this variant only, on top of the flow's own. Sent as the complete set: it replaces whatever the variant had, so omit it to leave the set alone and send [] to clear it. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on every graph edit.",
2727
+ valueKind: 'array',
2728
+ repeatable: false,
2729
+ },
2730
+ ],
2731
+ hasParams: true,
2732
+ paramsAllOptional: true,
2733
+ bodyOpaque: false,
2734
+ bodyVariants: [],
2735
+ acceptsBody: true,
2736
+ requiresAuth: true,
2737
+ },
2738
+ {
2739
+ commandPath: ['customer-flow', 'list'],
2740
+ clientProperty: 'customerFlow',
2741
+ methodName: 'list',
2742
+ httpMethod: 'get',
2743
+ httpPath: '/v1/customer-flow',
2744
+ summary: 'List customer flows',
2745
+ description: "Returns a paginated list of customer flows with their agents, expectations, happy path and edge cases. The step graph is the one field omitted: reading it walks the project's whole step graph, so it comes back from the single-flow endpoint instead. Customer flows are how a project describes what to test; they replace the older simulation scenarios.",
2746
+ positionals: [],
2747
+ flags: [
2748
+ {
2749
+ name: 'limit',
2750
+ path: ['limit'],
2751
+ location: 'query',
2752
+ required: false,
2753
+ valueKind: 'integer',
2754
+ repeatable: false,
2755
+ },
2756
+ {
2757
+ name: 'after',
2758
+ path: ['after'],
2759
+ location: 'query',
2760
+ required: false,
2761
+ valueKind: 'string',
2762
+ repeatable: false,
2763
+ },
2764
+ {
2765
+ name: 'search-text',
2766
+ path: ['searchText'],
2767
+ location: 'query',
2768
+ required: false,
2769
+ valueKind: 'string',
2770
+ repeatable: false,
2771
+ },
2772
+ {
2773
+ name: 'type',
2774
+ path: ['type'],
2775
+ location: 'query',
2776
+ required: false,
2777
+ valueKind: 'string',
2778
+ enumValues: ['SCRIPTED', 'IMPROV', 'VOICEMAIL'],
2779
+ repeatable: false,
2780
+ },
2781
+ {
2782
+ name: 'include-system',
2783
+ path: ['includeSystem'],
2784
+ location: 'query',
2785
+ required: false,
2786
+ valueKind: 'string',
2787
+ enumValues: ['true', 'false'],
2788
+ repeatable: false,
2789
+ },
2790
+ ],
2791
+ hasParams: true,
2792
+ paramsAllOptional: true,
2793
+ bodyOpaque: false,
2794
+ bodyVariants: [],
2795
+ acceptsBody: false,
2796
+ requiresAuth: true,
2797
+ },
2798
+ {
2799
+ commandPath: ['customer-flow', 'update'],
2800
+ clientProperty: 'customerFlow',
2801
+ methodName: 'update',
2802
+ httpMethod: 'put',
2803
+ httpPath: '/v1/customer-flow/{flowId}',
2804
+ summary: 'Update a customer flow',
2805
+ description: "Updates a flow's title, description, branching mode, linked agents or flow-level expectations. The step graph is replaced through PUT /graph.",
2806
+ positionals: [
2807
+ {
2808
+ name: 'flow-id',
2809
+ paramKey: 'flowId',
2810
+ },
2811
+ ],
2812
+ flags: [
2813
+ {
2814
+ name: 'title',
2815
+ path: ['title'],
2816
+ location: 'body',
2817
+ required: false,
2818
+ valueKind: 'string',
2819
+ repeatable: false,
2820
+ },
2821
+ {
2822
+ name: 'description',
2823
+ path: ['description'],
2824
+ location: 'body',
2825
+ required: false,
2826
+ valueKind: 'string',
2827
+ repeatable: false,
2828
+ },
2829
+ {
2830
+ name: 'script-adherence',
2831
+ path: ['scriptAdherence'],
2832
+ location: 'body',
2833
+ required: false,
2834
+ description: 'Scripted flows only. How closely a run follows the script. LOOSE (default) hands the whole script to the simulated customer as one prompt; it keeps the call moving whatever your agent says. STRICT runs the script as a state machine on the agent service: at every agent step the simulated customer waits, silent, until your agent has said the expected line, and only then moves on. Scripted flows only; STRICT needs the agent-service transport and is not available on realtime models.',
2835
+ valueKind: 'string',
2836
+ enumValues: ['LOOSE', 'STRICT'],
2837
+ repeatable: false,
2838
+ },
2839
+ {
2840
+ name: 'off-script-policy',
2841
+ path: ['offScriptPolicy'],
2842
+ location: 'body',
2843
+ required: false,
2844
+ description: 'STRICT only. What the simulated customer does when your agent does not say the expected line. Each unmatched agent utterance is an attempt: `reaction` runs per attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character without moving on, or SAY `sayLine`), and `then` runs when attempts reach `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON advances anyway, ADAPT hands the rest of the call to loose behaviour). Null: stay silent, 3 attempts, hang up. The default for every agent step; an AGENT_TURN step can carry its own.',
2845
+ valueKind: 'object',
2846
+ },
2847
+ {
2848
+ name: 'off-script-policy.reaction',
2849
+ path: ['offScriptPolicy', 'reaction'],
2850
+ location: 'body',
2851
+ required: true,
2852
+ valueKind: 'string',
2853
+ enumValues: ['STAY_SILENT', 'REPEAT', 'RESPOND', 'SAY'],
2854
+ repeatable: false,
2855
+ },
2856
+ {
2857
+ name: 'off-script-policy.say-line',
2858
+ path: ['offScriptPolicy', 'sayLine'],
2859
+ location: 'body',
2860
+ required: false,
2861
+ valueKind: 'string',
2862
+ repeatable: false,
2863
+ },
2864
+ {
2865
+ name: 'off-script-policy.max-attempts',
2866
+ path: ['offScriptPolicy', 'maxAttempts'],
2867
+ location: 'body',
2868
+ required: true,
2869
+ valueKind: 'integer',
2870
+ repeatable: false,
2871
+ },
2872
+ {
2873
+ name: 'off-script-policy.then',
2874
+ path: ['offScriptPolicy', 'then'],
2875
+ location: 'body',
2876
+ required: true,
2877
+ valueKind: 'string',
2878
+ enumValues: ['HANG_UP', 'MOVE_ON', 'ADAPT', 'HANG_UP_INVALIDATE'],
2879
+ repeatable: false,
2880
+ },
2881
+ {
2882
+ name: 'off-script-policy.wait-seconds',
2883
+ path: ['offScriptPolicy', 'waitSeconds'],
2884
+ location: 'body',
2885
+ required: false,
2886
+ valueKind: 'integer',
2887
+ repeatable: false,
2888
+ },
2889
+ {
2890
+ name: 'branching-mode',
2891
+ path: ['branchingMode'],
2892
+ location: 'body',
2893
+ required: false,
2894
+ description: 'Scripted flows only. How a run walks the graph. DETERMINISTIC ("Simulate every path" in the app) places one call per variant, each following its path exactly whatever the agent says. ADAPTIVE ("Adapt to your agent") collapses the paths into one call PER PERSONA, on which the simulated customer picks a branch from what the agent actually said. Both modes speak the exact authored lines, and neither changes how metrics or expectations grade.',
2895
+ valueKind: 'string',
2896
+ enumValues: ['DETERMINISTIC', 'ADAPTIVE'],
2897
+ repeatable: false,
2898
+ },
2899
+ {
2900
+ name: 'agent-ids',
2901
+ path: ['agentIds'],
2902
+ location: 'body',
2903
+ required: false,
2904
+ description: 'Replaces the linked agents. Omit to leave them unchanged. An improv flow must keep at least one; a scripted flow can be left with none.',
2905
+ valueKind: 'array',
2906
+ repeatable: true,
2907
+ },
2908
+ {
2909
+ name: 'agent-expectations',
2910
+ path: ['agentExpectations'],
2911
+ location: 'body',
2912
+ required: false,
2913
+ description: 'Replaces the flow-level expectations. Omit to leave them unchanged.',
2914
+ valueKind: 'array',
2915
+ repeatable: false,
2916
+ },
2917
+ ],
2918
+ hasParams: true,
2919
+ paramsAllOptional: true,
2920
+ bodyOpaque: false,
2921
+ bodyVariants: [],
2922
+ acceptsBody: true,
2923
+ requiresAuth: true,
2924
+ },
2925
+ {
2926
+ commandPath: ['dashboard', 'create'],
2927
+ clientProperty: 'dashboard',
2928
+ methodName: 'create',
2929
+ httpMethod: 'post',
2930
+ httpPath: '/v1/dashboard',
2931
+ summary: 'Create a dashboard',
2932
+ description: "Creates a dashboard with its widgets. Each widget is an analytics query (see POST /v1/analytics/query) with a name unique on the dashboard, a `display` (LINE, NUMBER, RADAR, STACKED_BAR, TABLE) and a `size` (SMALL, MEDIUM, LARGE, EXTRA_LARGE). Widgets render top to bottom in the order given. Dashboard `filters` apply over every widget and must be conversation-level: AGENT_PROPERTY, CALL_PROPERTY, MODALITY, DATASET or METRIC_VALUE. On a field a widget already filters, the dashboard's wins.",
2933
+ positionals: [],
2934
+ flags: [
2935
+ {
2936
+ name: 'name',
2937
+ path: ['name'],
2938
+ location: 'body',
2939
+ required: true,
2940
+ valueKind: 'string',
2941
+ repeatable: false,
2942
+ },
2943
+ {
2944
+ name: 'description',
2945
+ path: ['description'],
2946
+ location: 'body',
2947
+ required: false,
2948
+ valueKind: 'string',
2949
+ repeatable: false,
2950
+ },
2951
+ {
2952
+ name: 'time-range',
2953
+ path: ['timeRange'],
2954
+ location: 'body',
2955
+ required: false,
2956
+ description: 'The window: LAST n DAYS/WEEKS/MONTHS up to now, a CALENDAR_ALIGNED period (TODAY, YESTERDAY, THIS_WEEK, LAST_WEEK, THIS_MONTH, LAST_MONTH, THIS_YEAR, LAST_YEAR), FIXED from/to, or SINCE a date. At most 731 days (two years).',
2957
+ valueKind: 'string',
2958
+ repeatable: false,
2959
+ },
2960
+ {
2961
+ name: 'filters',
2962
+ path: ['filters'],
2963
+ location: 'body',
2964
+ required: false,
2965
+ valueKind: 'array',
2966
+ repeatable: false,
2967
+ },
2968
+ {
2969
+ name: 'is-default',
2970
+ path: ['isDefault'],
2971
+ location: 'body',
2972
+ required: false,
2973
+ valueKind: 'boolean',
2974
+ repeatable: false,
2975
+ },
2976
+ {
2977
+ name: 'widgets',
2978
+ path: ['widgets'],
2979
+ location: 'body',
2980
+ required: false,
2981
+ valueKind: 'array',
2982
+ repeatable: false,
2983
+ },
2984
+ ],
2985
+ hasParams: true,
2986
+ paramsAllOptional: false,
2987
+ bodyOpaque: false,
2988
+ bodyVariants: [],
2989
+ acceptsBody: true,
2990
+ requiresAuth: true,
2991
+ },
2992
+ {
2993
+ commandPath: ['dashboard', 'data', 'get'],
2994
+ clientProperty: 'dashboard',
2995
+ methodName: 'getData',
2996
+ httpMethod: 'get',
2997
+ httpPath: '/v1/dashboard/{dashboardId}/data',
2998
+ summary: 'Get dashboard data',
2999
+ description: "Runs every widget on the dashboard and returns each one's series, exactly as the dashboard shows them: over the dashboard's saved window and with its filters applied. Pass `from` (and optionally `to`) to read a different window, and `timezone` to align buckets to a zone.",
3000
+ positionals: [
3001
+ {
3002
+ name: 'dashboard-id',
3003
+ paramKey: 'dashboardId',
3004
+ },
3005
+ ],
3006
+ flags: [
3007
+ {
3008
+ name: 'from',
3009
+ path: ['from'],
3010
+ location: 'query',
3011
+ required: false,
3012
+ description: 'ISO 8601 start. Overrides the saved window; without `to`, runs until now.',
3013
+ valueKind: 'string',
3014
+ repeatable: false,
3015
+ },
3016
+ {
3017
+ name: 'to',
3018
+ path: ['to'],
3019
+ location: 'query',
3020
+ required: false,
3021
+ description: 'ISO 8601 end. Requires `from`.',
3022
+ valueKind: 'string',
3023
+ repeatable: false,
3024
+ },
3025
+ {
3026
+ name: 'timezone',
3027
+ path: ['timezone'],
3028
+ location: 'query',
3029
+ required: false,
3030
+ description: 'IANA zone buckets and calendar periods align to. Default UTC.',
3031
+ valueKind: 'string',
3032
+ repeatable: false,
3033
+ },
3034
+ ],
3035
+ hasParams: true,
3036
+ paramsAllOptional: true,
3037
+ bodyOpaque: false,
3038
+ bodyVariants: [],
3039
+ acceptsBody: false,
3040
+ requiresAuth: true,
3041
+ },
3042
+ {
3043
+ commandPath: ['dashboard', 'delete'],
3044
+ clientProperty: 'dashboard',
3045
+ methodName: 'delete',
3046
+ httpMethod: 'delete',
3047
+ httpPath: '/v1/dashboard/{dashboardId}',
3048
+ summary: 'Delete a dashboard',
3049
+ description: 'Deletes a dashboard and its widgets. If it was the default, another dashboard becomes the default. A dashboard managed by config as code returns 409.',
3050
+ positionals: [
3051
+ {
3052
+ name: 'dashboard-id',
3053
+ paramKey: 'dashboardId',
3054
+ description: 'The dashboard ID',
3055
+ },
3056
+ ],
3057
+ flags: [],
3058
+ hasParams: false,
3059
+ paramsAllOptional: true,
3060
+ bodyOpaque: false,
3061
+ bodyVariants: [],
3062
+ acceptsBody: false,
3063
+ requiresAuth: true,
3064
+ },
3065
+ {
3066
+ commandPath: ['dashboard', 'get'],
3067
+ clientProperty: 'dashboard',
3068
+ methodName: 'getByID',
3069
+ httpMethod: 'get',
3070
+ httpPath: '/v1/dashboard/{dashboardId}',
3071
+ summary: 'Get a dashboard',
3072
+ description: 'Returns a dashboard with its widgets top to bottom, each in the shape POST /v1/dashboard accepts, so a dashboard can be read, edited and written back.',
3073
+ positionals: [
3074
+ {
3075
+ name: 'dashboard-id',
3076
+ paramKey: 'dashboardId',
3077
+ description: 'The dashboard ID',
3078
+ },
3079
+ ],
3080
+ flags: [],
3081
+ hasParams: false,
3082
+ paramsAllOptional: true,
3083
+ bodyOpaque: false,
3084
+ bodyVariants: [],
3085
+ acceptsBody: false,
3086
+ requiresAuth: true,
3087
+ },
3088
+ {
3089
+ commandPath: ['dashboard', 'list'],
3090
+ clientProperty: 'dashboard',
3091
+ methodName: 'list',
3092
+ httpMethod: 'get',
3093
+ httpPath: '/v1/dashboard',
3094
+ summary: 'List dashboards',
3095
+ description: "Lists the project's dashboards, the default first. GET /v1/dashboard/{dashboardId} returns the widgets.",
3096
+ positionals: [],
3097
+ flags: [],
3098
+ hasParams: false,
3099
+ paramsAllOptional: true,
3100
+ bodyOpaque: false,
3101
+ bodyVariants: [],
3102
+ acceptsBody: false,
3103
+ requiresAuth: true,
3104
+ },
3105
+ {
3106
+ commandPath: ['dashboard', 'update'],
3107
+ clientProperty: 'dashboard',
3108
+ methodName: 'update',
3109
+ httpMethod: 'put',
3110
+ httpPath: '/v1/dashboard/{dashboardId}',
3111
+ summary: 'Update a dashboard',
3112
+ description: 'Edits a dashboard. Omitted fields keep their current value. `widgets`, when sent, replaces the list: widgets are matched by name, so a widget that keeps its name keeps its id; a new name adds a widget and a name no longer listed removes it. To change one widget, PUT /v1/dashboard/{dashboardId}/widget/{widgetId}.',
3113
+ positionals: [
3114
+ {
3115
+ name: 'dashboard-id',
3116
+ paramKey: 'dashboardId',
3117
+ description: 'The dashboard ID',
3118
+ },
3119
+ ],
3120
+ flags: [
3121
+ {
3122
+ name: 'name',
3123
+ path: ['name'],
3124
+ location: 'body',
3125
+ required: false,
3126
+ valueKind: 'string',
3127
+ repeatable: false,
3128
+ },
3129
+ {
3130
+ name: 'description',
3131
+ path: ['description'],
3132
+ location: 'body',
3133
+ required: false,
3134
+ valueKind: 'string',
3135
+ repeatable: false,
3136
+ },
3137
+ {
3138
+ name: 'time-range',
3139
+ path: ['timeRange'],
3140
+ location: 'body',
3141
+ required: false,
3142
+ description: 'The window: LAST n DAYS/WEEKS/MONTHS up to now, a CALENDAR_ALIGNED period (TODAY, YESTERDAY, THIS_WEEK, LAST_WEEK, THIS_MONTH, LAST_MONTH, THIS_YEAR, LAST_YEAR), FIXED from/to, or SINCE a date. At most 731 days (two years).',
3143
+ valueKind: 'string',
3144
+ repeatable: false,
3145
+ },
3146
+ {
3147
+ name: 'filters',
3148
+ path: ['filters'],
3149
+ location: 'body',
3150
+ required: false,
3151
+ valueKind: 'array',
3152
+ repeatable: false,
3153
+ },
3154
+ {
3155
+ name: 'is-default',
3156
+ path: ['isDefault'],
3157
+ location: 'body',
3158
+ required: false,
3159
+ valueKind: 'boolean',
3160
+ repeatable: false,
3161
+ },
3162
+ {
3163
+ name: 'widgets',
3164
+ path: ['widgets'],
3165
+ location: 'body',
3166
+ required: false,
3167
+ valueKind: 'array',
3168
+ repeatable: false,
3169
+ },
3170
+ ],
3171
+ hasParams: true,
3172
+ paramsAllOptional: true,
2444
3173
  bodyOpaque: false,
2445
3174
  bodyVariants: [],
2446
3175
  acceptsBody: true,
2447
3176
  requiresAuth: true,
2448
3177
  },
2449
3178
  {
2450
- commandPath: ['customer-flow', 'happy-path', 'update'],
2451
- clientProperty: 'customerFlow',
2452
- methodName: 'updateHappyPath',
2453
- httpMethod: 'put',
2454
- httpPath: '/v1/customer-flow/{flowId}/happy-path',
2455
- summary: "Update a flow's happy path",
2456
- description: "Updates the happy path's title, persona, environment, brief or expectations. Omitted fields are left alone; `additionalExpectations` replaces the set wholesale rather than appending. Its persona and environment are what the edge cases inherit, so changing them here changes every edge case that does not name its own.",
3179
+ commandPath: ['dashboard', 'widget', 'create'],
3180
+ clientProperty: 'dashboard',
3181
+ methodName: 'createWidget',
3182
+ httpMethod: 'post',
3183
+ httpPath: '/v1/dashboard/{dashboardId}/widget',
3184
+ summary: 'Add a widget',
3185
+ description: 'Adds a widget to the top of a dashboard. Its name must be unique on the dashboard.',
2457
3186
  positionals: [
2458
3187
  {
2459
- name: 'flow-id',
2460
- paramKey: 'flowId',
3188
+ name: 'dashboard-id',
3189
+ paramKey: 'dashboardId',
3190
+ description: 'The dashboard ID',
2461
3191
  },
2462
3192
  ],
2463
3193
  flags: [
2464
3194
  {
2465
- name: 'title',
2466
- path: ['title'],
3195
+ name: 'measures',
3196
+ path: ['measures'],
2467
3197
  location: 'body',
2468
- required: false,
2469
- valueKind: 'string',
3198
+ required: true,
3199
+ description: 'What to aggregate: 1 to 10 measures.',
3200
+ valueKind: 'array',
2470
3201
  repeatable: false,
2471
3202
  },
2472
3203
  {
2473
- name: 'environment-id',
2474
- path: ['environmentId'],
3204
+ name: 'filters',
3205
+ path: ['filters'],
2475
3206
  location: 'body',
2476
3207
  required: false,
2477
- valueKind: 'string',
3208
+ description: "Applied to every measure, on top of each measure's own filters.",
3209
+ valueKind: 'array',
2478
3210
  repeatable: false,
2479
3211
  },
2480
3212
  {
2481
- name: 'prompt',
2482
- path: ['prompt'],
3213
+ name: 'interval',
3214
+ path: ['interval'],
2483
3215
  location: 'body',
2484
3216
  required: false,
3217
+ description: "Bucket size. Defaults from the window's length and steps coarser when the window would exceed 500 buckets.",
2485
3218
  valueKind: 'string',
3219
+ enumValues: ['HOUR', 'DAY', 'WEEK', 'MONTH'],
2486
3220
  repeatable: false,
2487
3221
  },
2488
3222
  {
2489
- name: 'preceded-by-customer-flow-id',
2490
- path: ['precededByCustomerFlowId'],
3223
+ name: 'comparison-mode',
3224
+ path: ['comparisonMode'],
2491
3225
  location: 'body',
2492
3226
  required: false,
3227
+ description: 'PREVIOUS_PERIOD adds the preceding window of the same length to every series.',
2493
3228
  valueKind: 'string',
3229
+ enumValues: ['NONE', 'PREVIOUS_PERIOD'],
2494
3230
  repeatable: false,
2495
3231
  },
2496
3232
  {
2497
- name: 'preceded-by-customer-flow-variant-id',
2498
- path: ['precededByCustomerFlowVariantId'],
3233
+ name: 'comparison-groups',
3234
+ path: ['comparisonGroups'],
2499
3235
  location: 'body',
2500
3236
  required: false,
3237
+ description: 'Run every measure once per named filter set, e.g. one group per agent.',
3238
+ valueKind: 'array',
3239
+ repeatable: false,
3240
+ },
3241
+ {
3242
+ name: 'name',
3243
+ path: ['name'],
3244
+ location: 'body',
3245
+ required: true,
3246
+ description: 'Unique on the dashboard: how the widget is matched on update.',
2501
3247
  valueKind: 'string',
2502
3248
  repeatable: false,
2503
3249
  },
2504
3250
  {
2505
- name: 'include-flow-expectations',
2506
- path: ['includeFlowExpectations'],
3251
+ name: 'description',
3252
+ path: ['description'],
2507
3253
  location: 'body',
2508
3254
  required: false,
2509
- description: "Whether this edge case is graded on the flow's agentExpectations as well as its own additionalExpectations. Defaults to true; false grades it on its additionalExpectations only.",
2510
- valueKind: 'boolean',
3255
+ valueKind: 'string',
2511
3256
  repeatable: false,
2512
3257
  },
2513
3258
  {
2514
- name: 'persona-override-id',
2515
- path: ['personaOverrideId'],
3259
+ name: 'display',
3260
+ path: ['display'],
2516
3261
  location: 'body',
2517
3262
  required: false,
2518
- description: "The persona this runs as. Null on an edge case inherits the happy path's.",
3263
+ description: 'Chart type. Defaults to LINE.',
2519
3264
  valueKind: 'string',
3265
+ enumValues: ['LINE', 'NUMBER', 'RADAR', 'STACKED_BAR', 'TABLE'],
2520
3266
  repeatable: false,
2521
3267
  },
2522
3268
  {
2523
- name: 'additional-expectations',
2524
- path: ['additionalExpectations'],
3269
+ name: 'size',
3270
+ path: ['size'],
2525
3271
  location: 'body',
2526
3272
  required: false,
2527
- description: "The expectations graded on this variant only, on top of the flow's own. Sent as the complete set: it replaces whatever the variant had, so omit it to leave the set alone and send [] to clear it. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on every graph edit.",
2528
- valueKind: 'array',
3273
+ description: 'Grid width. Defaults to MEDIUM.',
3274
+ valueKind: 'string',
3275
+ enumValues: ['SMALL', 'MEDIUM', 'LARGE', 'EXTRA_LARGE'],
2529
3276
  repeatable: false,
2530
3277
  },
2531
3278
  ],
2532
3279
  hasParams: true,
2533
- paramsAllOptional: true,
3280
+ paramsAllOptional: false,
2534
3281
  bodyOpaque: false,
2535
3282
  bodyVariants: [],
2536
3283
  acceptsBody: true,
2537
3284
  requiresAuth: true,
2538
3285
  },
2539
3286
  {
2540
- commandPath: ['customer-flow', 'list'],
2541
- clientProperty: 'customerFlow',
2542
- methodName: 'list',
2543
- httpMethod: 'get',
2544
- httpPath: '/v1/customer-flow',
2545
- summary: 'List customer flows',
2546
- description: "Returns a paginated list of customer flows with their agents, expectations, happy path and edge cases. The step graph is the one field omitted: reading it walks the project's whole step graph, so it comes back from the single-flow endpoint instead. Customer flows are how a project describes what to test; they replace the older simulation scenarios.",
2547
- positionals: [],
2548
- flags: [
2549
- {
2550
- name: 'limit',
2551
- path: ['limit'],
2552
- location: 'query',
2553
- required: false,
2554
- valueKind: 'integer',
2555
- repeatable: false,
2556
- },
2557
- {
2558
- name: 'after',
2559
- path: ['after'],
2560
- location: 'query',
2561
- required: false,
2562
- valueKind: 'string',
2563
- repeatable: false,
2564
- },
2565
- {
2566
- name: 'search-text',
2567
- path: ['searchText'],
2568
- location: 'query',
2569
- required: false,
2570
- valueKind: 'string',
2571
- repeatable: false,
2572
- },
3287
+ commandPath: ['dashboard', 'widget', 'delete'],
3288
+ clientProperty: 'dashboard',
3289
+ methodName: 'deleteWidget',
3290
+ httpMethod: 'delete',
3291
+ httpPath: '/v1/dashboard/{dashboardId}/widget/{widgetId}',
3292
+ summary: 'Remove a widget',
3293
+ description: 'Removes a widget from a dashboard.',
3294
+ positionals: [
2573
3295
  {
2574
- name: 'type',
2575
- path: ['type'],
2576
- location: 'query',
2577
- required: false,
2578
- valueKind: 'string',
2579
- enumValues: ['SCRIPTED', 'IMPROV', 'VOICEMAIL'],
2580
- repeatable: false,
3296
+ name: 'dashboard-id',
3297
+ paramKey: 'dashboardId',
3298
+ description: 'The dashboard ID',
2581
3299
  },
2582
3300
  {
2583
- name: 'include-system',
2584
- path: ['includeSystem'],
2585
- location: 'query',
2586
- required: false,
2587
- valueKind: 'string',
2588
- enumValues: ['true', 'false'],
2589
- repeatable: false,
3301
+ name: 'widget-id',
3302
+ paramKey: 'widgetId',
3303
+ description: 'The widget ID',
2590
3304
  },
2591
3305
  ],
3306
+ flags: [],
2592
3307
  hasParams: true,
2593
- paramsAllOptional: true,
3308
+ paramsAllOptional: false,
2594
3309
  bodyOpaque: false,
2595
3310
  bodyVariants: [],
2596
3311
  acceptsBody: false,
2597
3312
  requiresAuth: true,
2598
3313
  },
2599
3314
  {
2600
- commandPath: ['customer-flow', 'update'],
2601
- clientProperty: 'customerFlow',
2602
- methodName: 'update',
3315
+ commandPath: ['dashboard', 'widget', 'update'],
3316
+ clientProperty: 'dashboard',
3317
+ methodName: 'updateWidget',
2603
3318
  httpMethod: 'put',
2604
- httpPath: '/v1/customer-flow/{flowId}',
2605
- summary: 'Update a customer flow',
2606
- description: "Updates a flow's title, description, branching mode, linked agents or flow-level expectations. The step graph is replaced through PUT /graph.",
3319
+ httpPath: '/v1/dashboard/{dashboardId}/widget/{widgetId}',
3320
+ summary: 'Replace a widget',
3321
+ description: "Replaces a widget's definition. It keeps its id and its place on the dashboard.",
2607
3322
  positionals: [
2608
3323
  {
2609
- name: 'flow-id',
2610
- paramKey: 'flowId',
3324
+ name: 'dashboard-id',
3325
+ paramKey: 'dashboardId',
3326
+ description: 'The dashboard ID',
3327
+ },
3328
+ {
3329
+ name: 'widget-id',
3330
+ paramKey: 'widgetId',
3331
+ description: 'The widget ID',
2611
3332
  },
2612
3333
  ],
2613
3334
  flags: [
2614
3335
  {
2615
- name: 'title',
2616
- path: ['title'],
3336
+ name: 'measures',
3337
+ path: ['measures'],
3338
+ location: 'body',
3339
+ required: true,
3340
+ description: 'What to aggregate: 1 to 10 measures.',
3341
+ valueKind: 'array',
3342
+ repeatable: false,
3343
+ },
3344
+ {
3345
+ name: 'filters',
3346
+ path: ['filters'],
2617
3347
  location: 'body',
2618
3348
  required: false,
2619
- valueKind: 'string',
3349
+ description: "Applied to every measure, on top of each measure's own filters.",
3350
+ valueKind: 'array',
2620
3351
  repeatable: false,
2621
3352
  },
2622
3353
  {
2623
- name: 'description',
2624
- path: ['description'],
3354
+ name: 'interval',
3355
+ path: ['interval'],
2625
3356
  location: 'body',
2626
3357
  required: false,
3358
+ description: "Bucket size. Defaults from the window's length and steps coarser when the window would exceed 500 buckets.",
2627
3359
  valueKind: 'string',
3360
+ enumValues: ['HOUR', 'DAY', 'WEEK', 'MONTH'],
2628
3361
  repeatable: false,
2629
3362
  },
2630
3363
  {
2631
- name: 'script-adherence',
2632
- path: ['scriptAdherence'],
3364
+ name: 'comparison-mode',
3365
+ path: ['comparisonMode'],
2633
3366
  location: 'body',
2634
3367
  required: false,
2635
- description: 'Scripted flows only. How closely a run follows the script. LOOSE (default) hands the whole script to the simulated customer as one prompt; it keeps the call moving whatever your agent says. STRICT runs the script as a state machine on the agent service: at every agent step the simulated customer waits, silent, until your agent has said the expected line, and only then moves on. Scripted flows only; STRICT needs the agent-service transport and is not available on realtime models.',
3368
+ description: 'PREVIOUS_PERIOD adds the preceding window of the same length to every series.',
2636
3369
  valueKind: 'string',
2637
- enumValues: ['LOOSE', 'STRICT'],
3370
+ enumValues: ['NONE', 'PREVIOUS_PERIOD'],
2638
3371
  repeatable: false,
2639
3372
  },
2640
3373
  {
2641
- name: 'off-script-policy',
2642
- path: ['offScriptPolicy'],
3374
+ name: 'comparison-groups',
3375
+ path: ['comparisonGroups'],
2643
3376
  location: 'body',
2644
3377
  required: false,
2645
- description: 'STRICT only. What the simulated customer does when your agent does not say the expected line. Each unmatched agent utterance is an attempt: `reaction` runs per attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character without moving on, or SAY `sayLine`), and `then` runs when attempts reach `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON advances anyway, ADAPT hands the rest of the call to loose behaviour). Null: stay silent, 3 attempts, hang up. The default for every agent step; an AGENT_TURN step can carry its own.',
2646
- valueKind: 'object',
3378
+ description: 'Run every measure once per named filter set, e.g. one group per agent.',
3379
+ valueKind: 'array',
3380
+ repeatable: false,
2647
3381
  },
2648
3382
  {
2649
- name: 'off-script-policy.reaction',
2650
- path: ['offScriptPolicy', 'reaction'],
3383
+ name: 'name',
3384
+ path: ['name'],
2651
3385
  location: 'body',
2652
3386
  required: true,
3387
+ description: 'Unique on the dashboard: how the widget is matched on update.',
2653
3388
  valueKind: 'string',
2654
- enumValues: ['STAY_SILENT', 'REPEAT', 'RESPOND', 'SAY'],
2655
3389
  repeatable: false,
2656
3390
  },
2657
3391
  {
2658
- name: 'off-script-policy.say-line',
2659
- path: ['offScriptPolicy', 'sayLine'],
3392
+ name: 'description',
3393
+ path: ['description'],
2660
3394
  location: 'body',
2661
3395
  required: false,
2662
3396
  valueKind: 'string',
2663
3397
  repeatable: false,
2664
3398
  },
2665
3399
  {
2666
- name: 'off-script-policy.max-attempts',
2667
- path: ['offScriptPolicy', 'maxAttempts'],
3400
+ name: 'display',
3401
+ path: ['display'],
2668
3402
  location: 'body',
2669
- required: true,
2670
- valueKind: 'integer',
3403
+ required: false,
3404
+ description: 'Chart type. Defaults to LINE.',
3405
+ valueKind: 'string',
3406
+ enumValues: ['LINE', 'NUMBER', 'RADAR', 'STACKED_BAR', 'TABLE'],
2671
3407
  repeatable: false,
2672
3408
  },
2673
3409
  {
2674
- name: 'off-script-policy.then',
2675
- path: ['offScriptPolicy', 'then'],
3410
+ name: 'size',
3411
+ path: ['size'],
2676
3412
  location: 'body',
2677
- required: true,
3413
+ required: false,
3414
+ description: 'Grid width. Defaults to MEDIUM.',
2678
3415
  valueKind: 'string',
2679
- enumValues: ['HANG_UP', 'MOVE_ON', 'ADAPT', 'HANG_UP_INVALIDATE'],
3416
+ enumValues: ['SMALL', 'MEDIUM', 'LARGE', 'EXTRA_LARGE'],
2680
3417
  repeatable: false,
2681
3418
  },
3419
+ ],
3420
+ hasParams: true,
3421
+ paramsAllOptional: false,
3422
+ bodyOpaque: false,
3423
+ bodyVariants: [],
3424
+ acceptsBody: true,
3425
+ requiresAuth: true,
3426
+ },
3427
+ {
3428
+ commandPath: ['dashboard', 'widget-data', 'get'],
3429
+ clientProperty: 'dashboard',
3430
+ methodName: 'getWidgetData',
3431
+ httpMethod: 'get',
3432
+ httpPath: '/v1/dashboard/{dashboardId}/widget/{widgetId}/data',
3433
+ summary: 'Get widget data',
3434
+ description: "Runs one widget and returns its series, as it reads on its dashboard (the dashboard's window and filters). Accepts the same `from` / `to` / `timezone` overrides as GET /v1/dashboard/{dashboardId}/data.",
3435
+ positionals: [
3436
+ {
3437
+ name: 'dashboard-id',
3438
+ paramKey: 'dashboardId',
3439
+ },
2682
3440
  {
2683
- name: 'off-script-policy.wait-seconds',
2684
- path: ['offScriptPolicy', 'waitSeconds'],
2685
- location: 'body',
2686
- required: false,
2687
- valueKind: 'integer',
2688
- repeatable: false,
3441
+ name: 'widget-id',
3442
+ paramKey: 'widgetId',
2689
3443
  },
3444
+ ],
3445
+ flags: [
2690
3446
  {
2691
- name: 'branching-mode',
2692
- path: ['branchingMode'],
2693
- location: 'body',
3447
+ name: 'from',
3448
+ path: ['from'],
3449
+ location: 'query',
2694
3450
  required: false,
2695
- description: 'Scripted flows only. How a run walks the graph. DETERMINISTIC ("Simulate every path" in the app) places one call per variant, each following its path exactly whatever the agent says. ADAPTIVE ("Adapt to your agent") collapses the paths into one call PER PERSONA, on which the simulated customer picks a branch from what the agent actually said. Both modes speak the exact authored lines, and neither changes how metrics or expectations grade.',
3451
+ description: 'ISO 8601 start. Overrides the saved window; without `to`, runs until now.',
2696
3452
  valueKind: 'string',
2697
- enumValues: ['DETERMINISTIC', 'ADAPTIVE'],
2698
3453
  repeatable: false,
2699
3454
  },
2700
3455
  {
2701
- name: 'agent-ids',
2702
- path: ['agentIds'],
2703
- location: 'body',
3456
+ name: 'to',
3457
+ path: ['to'],
3458
+ location: 'query',
2704
3459
  required: false,
2705
- description: 'Replaces the linked agents. Omit to leave them unchanged. An improv flow must keep at least one; a scripted flow can be left with none.',
2706
- valueKind: 'array',
2707
- repeatable: true,
3460
+ description: 'ISO 8601 end. Requires `from`.',
3461
+ valueKind: 'string',
3462
+ repeatable: false,
2708
3463
  },
2709
3464
  {
2710
- name: 'agent-expectations',
2711
- path: ['agentExpectations'],
2712
- location: 'body',
3465
+ name: 'timezone',
3466
+ path: ['timezone'],
3467
+ location: 'query',
2713
3468
  required: false,
2714
- description: 'Replaces the flow-level expectations. Omit to leave them unchanged.',
2715
- valueKind: 'array',
3469
+ description: 'IANA zone buckets and calendar periods align to. Default UTC.',
3470
+ valueKind: 'string',
2716
3471
  repeatable: false,
2717
3472
  },
2718
3473
  ],
2719
3474
  hasParams: true,
2720
- paramsAllOptional: true,
3475
+ paramsAllOptional: false,
2721
3476
  bodyOpaque: false,
2722
3477
  bodyVariants: [],
2723
- acceptsBody: true,
3478
+ acceptsBody: false,
2724
3479
  requiresAuth: true,
2725
3480
  },
2726
3481
  {
@@ -3422,7 +4177,7 @@ exports.COMMANDS = [
3422
4177
  path: ['metrics'],
3423
4178
  location: 'body',
3424
4179
  required: true,
3425
- description: 'Metric definitions to collect when this policy matches',
4180
+ description: 'Metric definitions to collect when this policy matches, each with an optional setting',
3426
4181
  valueKind: 'array',
3427
4182
  repeatable: false,
3428
4183
  },
@@ -3575,7 +4330,7 @@ exports.COMMANDS = [
3575
4330
  path: ['metrics'],
3576
4331
  location: 'body',
3577
4332
  required: false,
3578
- description: 'Metric definitions to collect when this policy matches',
4333
+ description: "Metric definitions to collect when this policy matches. Replaces the policy's whole metric list: a metric sent without settings goes back to its default, so resend a metric's settings to keep them. Omit to keep the current metrics.",
3579
4334
  valueKind: 'array',
3580
4335
  repeatable: false,
3581
4336
  },
@@ -5222,6 +5977,28 @@ exports.COMMANDS = [
5222
5977
  acceptsBody: false,
5223
5978
  requiresAuth: true,
5224
5979
  },
5980
+ {
5981
+ commandPath: ['simulation', 'plan', 'job', 'cost', 'get'],
5982
+ clientProperty: 'simulationRunPlanJob',
5983
+ methodName: 'getCost',
5984
+ httpMethod: 'get',
5985
+ httpPath: '/v1/simulation/plan/job/{jobId}/cost',
5986
+ summary: 'Get simulation run cost',
5987
+ description: 'The billable spend for one simulation run (run plan job), split by cost type, with the spend of each simulated call in it. Safe to call while the run is in progress: totals reflect the costs recorded so far. Amounts are billable spend only, in exact micro-dollars (`*UsdMicros`) and dollars (`*Usd`, for display). Requires an API key with the `billing:read` permission.',
5988
+ positionals: [
5989
+ {
5990
+ name: 'job-id',
5991
+ paramKey: 'jobId',
5992
+ },
5993
+ ],
5994
+ flags: [],
5995
+ hasParams: false,
5996
+ paramsAllOptional: true,
5997
+ bodyOpaque: false,
5998
+ bodyVariants: [],
5999
+ acceptsBody: false,
6000
+ requiresAuth: true,
6001
+ },
5225
6002
  {
5226
6003
  commandPath: ['simulation', 'plan', 'job', 'debrief', 'create'],
5227
6004
  clientProperty: 'simulationRunPlanJob',
@@ -6159,6 +6936,51 @@ exports.COMMANDS = [
6159
6936
  acceptsBody: true,
6160
6937
  requiresAuth: true,
6161
6938
  },
6939
+ {
6940
+ commandPath: ['usage', 'get'],
6941
+ clientProperty: 'usage',
6942
+ methodName: 'get',
6943
+ httpMethod: 'get',
6944
+ httpPath: '/v1/usage',
6945
+ summary: 'Get usage & cost',
6946
+ description: "Report billable usage and cost for the organization over a time window, broken down by project (highest spend first). Pass `from`/`to` as ISO 8601 timestamps; optionally pass `projectId` to scope the report to one project. Amounts are billable spend only (what we absorb is never included). Authenticated by either an organization API key with the `usage:read` permission (any project in the organization), or a project API key with the `billing:read` permission (that key's own project only; any other `projectId` is a 403).",
6947
+ positionals: [],
6948
+ flags: [
6949
+ {
6950
+ name: 'from',
6951
+ path: ['from'],
6952
+ location: 'query',
6953
+ required: true,
6954
+ description: 'Start of the window (inclusive), ISO 8601.',
6955
+ valueKind: 'string',
6956
+ repeatable: false,
6957
+ },
6958
+ {
6959
+ name: 'to',
6960
+ path: ['to'],
6961
+ location: 'query',
6962
+ required: true,
6963
+ description: 'End of the window (exclusive), ISO 8601. Must be after `from`, and the window may not exceed 366 days.',
6964
+ valueKind: 'string',
6965
+ repeatable: false,
6966
+ },
6967
+ {
6968
+ name: 'project-id',
6969
+ path: ['projectId'],
6970
+ location: 'query',
6971
+ required: false,
6972
+ description: 'Limit the report to a single project. Omit for the whole organization.',
6973
+ valueKind: 'string',
6974
+ repeatable: false,
6975
+ },
6976
+ ],
6977
+ hasParams: true,
6978
+ paramsAllOptional: false,
6979
+ bodyOpaque: false,
6980
+ bodyVariants: [],
6981
+ acceptsBody: false,
6982
+ requiresAuth: true,
6983
+ },
6162
6984
  {
6163
6985
  commandPath: ['webhook', 'create'],
6164
6986
  clientProperty: 'webhook',