@roarkanalytics/sdk 9.13.0 → 9.15.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.
@@ -1177,6 +1177,10 @@ export namespace LiveReportGetDocumentResponse {
1177
1177
  title: string;
1178
1178
 
1179
1179
  calls?: Array<KeyFinding.Call>;
1180
+
1181
+ metricDefinitionIds?: Array<string>;
1182
+
1183
+ themeSlugs?: Array<string>;
1180
1184
  }
1181
1185
 
1182
1186
  export namespace KeyFinding {
@@ -1195,6 +1199,10 @@ export namespace LiveReportGetDocumentResponse {
1195
1199
  body: string;
1196
1200
 
1197
1201
  heading: string | null;
1202
+
1203
+ metricDefinitionIds?: Array<string>;
1204
+
1205
+ themeSlugs?: Array<string>;
1198
1206
  }
1199
1207
  }
1200
1208
 
@@ -1367,6 +1375,8 @@ export namespace LiveReportGetDocumentResponse {
1367
1375
 
1368
1376
  totalConversationCount: number;
1369
1377
 
1378
+ checks?: Array<Theme.Check>;
1379
+
1370
1380
  memberCalls?: Array<Theme.MemberCall>;
1371
1381
  }
1372
1382
 
@@ -1417,6 +1427,14 @@ export namespace LiveReportGetDocumentResponse {
1417
1427
  title: string;
1418
1428
  }
1419
1429
 
1430
+ export interface Check {
1431
+ checkName: string;
1432
+
1433
+ conversationIds: Array<string>;
1434
+
1435
+ metricDefinitionId: string;
1436
+ }
1437
+
1420
1438
  export interface MemberCall {
1421
1439
  callId: string | null;
1422
1440
 
@@ -1795,6 +1813,10 @@ export namespace LiveReportListDocumentsResponse {
1795
1813
  title: string;
1796
1814
 
1797
1815
  calls?: Array<KeyFinding.Call>;
1816
+
1817
+ metricDefinitionIds?: Array<string>;
1818
+
1819
+ themeSlugs?: Array<string>;
1798
1820
  }
1799
1821
 
1800
1822
  export namespace KeyFinding {
@@ -1813,6 +1835,10 @@ export namespace LiveReportListDocumentsResponse {
1813
1835
  body: string;
1814
1836
 
1815
1837
  heading: string | null;
1838
+
1839
+ metricDefinitionIds?: Array<string>;
1840
+
1841
+ themeSlugs?: Array<string>;
1816
1842
  }
1817
1843
  }
1818
1844
 
@@ -1985,6 +2011,8 @@ export namespace LiveReportListDocumentsResponse {
1985
2011
 
1986
2012
  totalConversationCount: number;
1987
2013
 
2014
+ checks?: Array<Theme.Check>;
2015
+
1988
2016
  memberCalls?: Array<Theme.MemberCall>;
1989
2017
  }
1990
2018
 
@@ -2035,6 +2063,14 @@ export namespace LiveReportListDocumentsResponse {
2035
2063
  title: string;
2036
2064
  }
2037
2065
 
2066
+ export interface Check {
2067
+ checkName: string;
2068
+
2069
+ conversationIds: Array<string>;
2070
+
2071
+ metricDefinitionId: string;
2072
+ }
2073
+
2038
2074
  export interface MemberCall {
2039
2075
  callId: string | null;
2040
2076
 
@@ -2412,6 +2448,10 @@ export namespace LiveReportRunResponse {
2412
2448
  title: string;
2413
2449
 
2414
2450
  calls?: Array<KeyFinding.Call>;
2451
+
2452
+ metricDefinitionIds?: Array<string>;
2453
+
2454
+ themeSlugs?: Array<string>;
2415
2455
  }
2416
2456
 
2417
2457
  export namespace KeyFinding {
@@ -2430,6 +2470,10 @@ export namespace LiveReportRunResponse {
2430
2470
  body: string;
2431
2471
 
2432
2472
  heading: string | null;
2473
+
2474
+ metricDefinitionIds?: Array<string>;
2475
+
2476
+ themeSlugs?: Array<string>;
2433
2477
  }
2434
2478
  }
2435
2479
 
@@ -2602,6 +2646,8 @@ export namespace LiveReportRunResponse {
2602
2646
 
2603
2647
  totalConversationCount: number;
2604
2648
 
2649
+ checks?: Array<Theme.Check>;
2650
+
2605
2651
  memberCalls?: Array<Theme.MemberCall>;
2606
2652
  }
2607
2653
 
@@ -2652,6 +2698,14 @@ export namespace LiveReportRunResponse {
2652
2698
  title: string;
2653
2699
  }
2654
2700
 
2701
+ export interface Check {
2702
+ checkName: string;
2703
+
2704
+ conversationIds: Array<string>;
2705
+
2706
+ metricDefinitionId: string;
2707
+ }
2708
+
2655
2709
  export interface MemberCall {
2656
2710
  callId: string | null;
2657
2711
 
@@ -118,6 +118,22 @@ export class SimulationRunPlanJob extends APIResource {
118
118
  return this._client.get(path`/v1/simulation/plan/job/${jobID}/cost`, options);
119
119
  }
120
120
 
121
+ /**
122
+ * The run's most recent re-score, with its status and how many conversations have
123
+ * been graded.
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * const response =
128
+ * await client.simulationRunPlanJob.getRescore(
129
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
130
+ * );
131
+ * ```
132
+ */
133
+ getRescore(jobID: string, options?: RequestOptions): APIPromise<SimulationRunPlanJobGetRescoreResponse> {
134
+ return this._client.get(path`/v1/simulation/plan/job/${jobID}/rescore`, options);
135
+ }
136
+
121
137
  /**
122
138
  * Everything the run report shows, in one request: the summary and score, the
123
139
  * pass/fail verdict, per-metric aggregates, every simulation with its check
@@ -145,6 +161,32 @@ export class SimulationRunPlanJob extends APIResource {
145
161
  return this._client.get(path`/v1/simulation/plan/job/${jobID}/results`, { query, ...options });
146
162
  }
147
163
 
164
+ /**
165
+ * Grade a finished run's calls again, without placing new calls: the same calls
166
+ * and metrics, with each metric's current version and the flows' current agent
167
+ * expectations. Use it after editing a metric or a flow's expectations, to see how
168
+ * the run you already have scores against them.
169
+ *
170
+ * The new values replace the run's current ones; earlier values stay in each
171
+ * metric value's history. The grading is billed like any metric collection. A run
172
+ * is re-scored one at a time: while one re-score runs, another is refused
173
+ * with 409.
174
+ *
175
+ * Returns immediately. Poll GET /v1/simulation/plan/job/{jobId}/rescore until
176
+ * `status` is COMPLETED or FAILED, then read the new values from GET
177
+ * /v1/simulation/plan/job/{jobId}/results.
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * const response = await client.simulationRunPlanJob.rescore(
182
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
183
+ * );
184
+ * ```
185
+ */
186
+ rescore(jobID: string, options?: RequestOptions): APIPromise<SimulationRunPlanJobRescoreResponse> {
187
+ return this._client.post(path`/v1/simulation/plan/job/${jobID}/rescore`, options);
188
+ }
189
+
148
190
  /**
149
191
  * Deprecated: use POST /v1/simulation/run, which does the same thing and can also
150
192
  * take the plan configuration inline, so a one-off run does not have to create a
@@ -390,6 +432,19 @@ export namespace SimulationRunPlanJobCreateDebriefResponse {
390
432
  body: string;
391
433
 
392
434
  heading: string | null;
435
+
436
+ /**
437
+ * Ids of the checks this text names. Empty when it names none, and on reports
438
+ * generated before references were recorded.
439
+ */
440
+ metricDefinitionIds: Array<string>;
441
+
442
+ /**
443
+ * Slugs of the failure themes this text is about. Each matches a `slug` in
444
+ * `themes`, which lists the calls. Empty when it is about none, and on reports
445
+ * generated before references were recorded.
446
+ */
447
+ themeSlugs: Array<string>;
393
448
  }
394
449
  }
395
450
 
@@ -401,6 +456,19 @@ export namespace SimulationRunPlanJobCreateDebriefResponse {
401
456
  */
402
457
  callIds: Array<string>;
403
458
 
459
+ /**
460
+ * Ids of the checks this text names. Empty when it names none, and on reports
461
+ * generated before references were recorded.
462
+ */
463
+ metricDefinitionIds: Array<string>;
464
+
465
+ /**
466
+ * Slugs of the failure themes this text is about. Each matches a `slug` in
467
+ * `themes`, which lists the calls. Empty when it is about none, and on reports
468
+ * generated before references were recorded.
469
+ */
470
+ themeSlugs: Array<string>;
471
+
404
472
  title: string;
405
473
  }
406
474
 
@@ -501,6 +569,19 @@ export namespace SimulationRunPlanJobCreateDebriefResponse {
501
569
  */
502
570
  callIds: Array<string>;
503
571
 
572
+ /**
573
+ * Ids of the checks this text names. Empty when it names none, and on reports
574
+ * generated before references were recorded.
575
+ */
576
+ metricDefinitionIds: Array<string>;
577
+
578
+ /**
579
+ * Slugs of the failure themes this text is about. Each matches a `slug` in
580
+ * `themes`, which lists the calls. Empty when it is about none, and on reports
581
+ * generated before references were recorded.
582
+ */
583
+ themeSlugs: Array<string>;
584
+
504
585
  title: string;
505
586
  }
506
587
  }
@@ -1814,6 +1895,61 @@ export namespace SimulationRunPlanJobGetCostResponse {
1814
1895
  }
1815
1896
  }
1816
1897
 
1898
+ export interface SimulationRunPlanJobGetRescoreResponse {
1899
+ data: SimulationRunPlanJobGetRescoreResponse.Data;
1900
+ }
1901
+
1902
+ export namespace SimulationRunPlanJobGetRescoreResponse {
1903
+ export interface Data {
1904
+ /**
1905
+ * When the grading finished. Null while it runs.
1906
+ */
1907
+ completedAt: string | null;
1908
+
1909
+ /**
1910
+ * When the re-score was requested
1911
+ */
1912
+ createdAt: string;
1913
+
1914
+ /**
1915
+ * When the run's debrief was queued for a rewrite after this re-score. Null until
1916
+ * then, and for a run without a debrief.
1917
+ */
1918
+ debriefRequestedAt: string | null;
1919
+
1920
+ /**
1921
+ * Why the re-score failed to start, when it did
1922
+ */
1923
+ errorMessage: string | null;
1924
+
1925
+ /**
1926
+ * The simulation run plan job that was re-scored
1927
+ */
1928
+ jobId: string;
1929
+
1930
+ /**
1931
+ * Re-score ID
1932
+ */
1933
+ rescoreId: string;
1934
+
1935
+ /**
1936
+ * Conversations whose grading has finished
1937
+ */
1938
+ scoredConversations: number;
1939
+
1940
+ /**
1941
+ * RUNNING while the calls are graded again, then COMPLETED. FAILED when the
1942
+ * re-score could not start or its grading failed.
1943
+ */
1944
+ status: 'RUNNING' | 'COMPLETED' | 'FAILED';
1945
+
1946
+ /**
1947
+ * Conversations this re-score grades
1948
+ */
1949
+ totalConversations: number;
1950
+ }
1951
+ }
1952
+
1817
1953
  export interface SimulationRunPlanJobGetResultsResponse {
1818
1954
  /**
1819
1955
  * Everything the run report shows, in one response.
@@ -2193,6 +2329,19 @@ export namespace SimulationRunPlanJobGetResultsResponse {
2193
2329
  body: string;
2194
2330
 
2195
2331
  heading: string | null;
2332
+
2333
+ /**
2334
+ * Ids of the checks this text names. Empty when it names none, and on reports
2335
+ * generated before references were recorded.
2336
+ */
2337
+ metricDefinitionIds: Array<string>;
2338
+
2339
+ /**
2340
+ * Slugs of the failure themes this text is about. Each matches a `slug` in
2341
+ * `themes`, which lists the calls. Empty when it is about none, and on reports
2342
+ * generated before references were recorded.
2343
+ */
2344
+ themeSlugs: Array<string>;
2196
2345
  }
2197
2346
  }
2198
2347
 
@@ -2204,6 +2353,19 @@ export namespace SimulationRunPlanJobGetResultsResponse {
2204
2353
  */
2205
2354
  callIds: Array<string>;
2206
2355
 
2356
+ /**
2357
+ * Ids of the checks this text names. Empty when it names none, and on reports
2358
+ * generated before references were recorded.
2359
+ */
2360
+ metricDefinitionIds: Array<string>;
2361
+
2362
+ /**
2363
+ * Slugs of the failure themes this text is about. Each matches a `slug` in
2364
+ * `themes`, which lists the calls. Empty when it is about none, and on reports
2365
+ * generated before references were recorded.
2366
+ */
2367
+ themeSlugs: Array<string>;
2368
+
2207
2369
  title: string;
2208
2370
  }
2209
2371
 
@@ -2304,6 +2466,19 @@ export namespace SimulationRunPlanJobGetResultsResponse {
2304
2466
  */
2305
2467
  callIds: Array<string>;
2306
2468
 
2469
+ /**
2470
+ * Ids of the checks this text names. Empty when it names none, and on reports
2471
+ * generated before references were recorded.
2472
+ */
2473
+ metricDefinitionIds: Array<string>;
2474
+
2475
+ /**
2476
+ * Slugs of the failure themes this text is about. Each matches a `slug` in
2477
+ * `themes`, which lists the calls. Empty when it is about none, and on reports
2478
+ * generated before references were recorded.
2479
+ */
2480
+ themeSlugs: Array<string>;
2481
+
2307
2482
  title: string;
2308
2483
  }
2309
2484
  }
@@ -3025,6 +3200,61 @@ export namespace SimulationRunPlanJobGetResultsResponse {
3025
3200
  }
3026
3201
  }
3027
3202
 
3203
+ export interface SimulationRunPlanJobRescoreResponse {
3204
+ data: SimulationRunPlanJobRescoreResponse.Data;
3205
+ }
3206
+
3207
+ export namespace SimulationRunPlanJobRescoreResponse {
3208
+ export interface Data {
3209
+ /**
3210
+ * When the grading finished. Null while it runs.
3211
+ */
3212
+ completedAt: string | null;
3213
+
3214
+ /**
3215
+ * When the re-score was requested
3216
+ */
3217
+ createdAt: string;
3218
+
3219
+ /**
3220
+ * When the run's debrief was queued for a rewrite after this re-score. Null until
3221
+ * then, and for a run without a debrief.
3222
+ */
3223
+ debriefRequestedAt: string | null;
3224
+
3225
+ /**
3226
+ * Why the re-score failed to start, when it did
3227
+ */
3228
+ errorMessage: string | null;
3229
+
3230
+ /**
3231
+ * The simulation run plan job that was re-scored
3232
+ */
3233
+ jobId: string;
3234
+
3235
+ /**
3236
+ * Re-score ID
3237
+ */
3238
+ rescoreId: string;
3239
+
3240
+ /**
3241
+ * Conversations whose grading has finished
3242
+ */
3243
+ scoredConversations: number;
3244
+
3245
+ /**
3246
+ * RUNNING while the calls are graded again, then COMPLETED. FAILED when the
3247
+ * re-score could not start or its grading failed.
3248
+ */
3249
+ status: 'RUNNING' | 'COMPLETED' | 'FAILED';
3250
+
3251
+ /**
3252
+ * Conversations this re-score grades
3253
+ */
3254
+ totalConversations: number;
3255
+ }
3256
+ }
3257
+
3028
3258
  export interface SimulationRunPlanJobStartResponse {
3029
3259
  /**
3030
3260
  * Response when triggering a simulation run plan
@@ -3212,7 +3442,9 @@ export declare namespace SimulationRunPlanJob {
3212
3442
  type SimulationRunPlanJobCreateDebriefResponse as SimulationRunPlanJobCreateDebriefResponse,
3213
3443
  type SimulationRunPlanJobGetByIDResponse as SimulationRunPlanJobGetByIDResponse,
3214
3444
  type SimulationRunPlanJobGetCostResponse as SimulationRunPlanJobGetCostResponse,
3445
+ type SimulationRunPlanJobGetRescoreResponse as SimulationRunPlanJobGetRescoreResponse,
3215
3446
  type SimulationRunPlanJobGetResultsResponse as SimulationRunPlanJobGetResultsResponse,
3447
+ type SimulationRunPlanJobRescoreResponse as SimulationRunPlanJobRescoreResponse,
3216
3448
  type SimulationRunPlanJobStartResponse as SimulationRunPlanJobStartResponse,
3217
3449
  type SimulationRunPlanJobListParams as SimulationRunPlanJobListParams,
3218
3450
  type SimulationRunPlanJobCreateDebriefParams as SimulationRunPlanJobCreateDebriefParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '9.13.0'; // x-release-please-version
1
+ export const VERSION = '9.15.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "9.13.0";
1
+ export declare const VERSION = "9.15.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "9.13.0";
1
+ export declare const VERSION = "9.15.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 = '9.13.0'; // x-release-please-version
4
+ exports.VERSION = '9.15.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '9.13.0'; // x-release-please-version
1
+ export const VERSION = '9.15.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map