@roarkanalytics/sdk 3.21.0 → 4.1.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 (71) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +6 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-config.d.mts +394 -0
  12. package/resources/agent-config.d.mts.map +1 -0
  13. package/resources/agent-config.d.ts +394 -0
  14. package/resources/agent-config.d.ts.map +1 -0
  15. package/resources/agent-config.js +98 -0
  16. package/resources/agent-config.js.map +1 -0
  17. package/resources/agent-config.mjs +94 -0
  18. package/resources/agent-config.mjs.map +1 -0
  19. package/resources/{autoimprove-fix.d.mts → autoimprove-job.d.mts} +117 -116
  20. package/resources/autoimprove-job.d.mts.map +1 -0
  21. package/resources/{autoimprove-fix.d.ts → autoimprove-job.d.ts} +117 -116
  22. package/resources/autoimprove-job.d.ts.map +1 -0
  23. package/resources/{autoimprove-fix.js → autoimprove-job.js} +42 -41
  24. package/resources/autoimprove-job.js.map +1 -0
  25. package/resources/{autoimprove-fix.mjs → autoimprove-job.mjs} +40 -39
  26. package/resources/autoimprove-job.mjs.map +1 -0
  27. package/resources/config.d.mts +9 -0
  28. package/resources/config.d.mts.map +1 -1
  29. package/resources/config.d.ts +9 -0
  30. package/resources/config.d.ts.map +1 -1
  31. package/resources/customer-flow.d.mts +104 -19
  32. package/resources/customer-flow.d.mts.map +1 -1
  33. package/resources/customer-flow.d.ts +104 -19
  34. package/resources/customer-flow.d.ts.map +1 -1
  35. package/resources/index.d.mts +2 -1
  36. package/resources/index.d.mts.map +1 -1
  37. package/resources/index.d.ts +2 -1
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +5 -3
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +2 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/simulation-job.d.mts +2 -2
  44. package/resources/simulation-job.d.mts.map +1 -1
  45. package/resources/simulation-job.d.ts +2 -2
  46. package/resources/simulation-job.d.ts.map +1 -1
  47. package/resources/simulation-run-plan-job.d.mts +1 -1
  48. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  49. package/resources/simulation-run-plan-job.d.ts +1 -1
  50. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  51. package/src/client.ts +54 -27
  52. package/src/resources/agent-config.ts +487 -0
  53. package/src/resources/{autoimprove-fix.ts → autoimprove-job.ts} +139 -138
  54. package/src/resources/config.ts +13 -0
  55. package/src/resources/customer-flow.ts +135 -20
  56. package/src/resources/index.ts +25 -13
  57. package/src/resources/simulation-job.ts +2 -2
  58. package/src/resources/simulation-run-plan-job.ts +1 -1
  59. package/src/version.ts +1 -1
  60. package/version.d.mts +1 -1
  61. package/version.d.mts.map +1 -1
  62. package/version.d.ts +1 -1
  63. package/version.d.ts.map +1 -1
  64. package/version.js +1 -1
  65. package/version.js.map +1 -1
  66. package/version.mjs +1 -1
  67. package/version.mjs.map +1 -1
  68. package/resources/autoimprove-fix.d.mts.map +0 -1
  69. package/resources/autoimprove-fix.d.ts.map +0 -1
  70. package/resources/autoimprove-fix.js.map +0 -1
  71. package/resources/autoimprove-fix.mjs.map +0 -1
@@ -164,15 +164,32 @@ export declare class CustomerFlow extends APIResource {
164
164
  * flow's policy. Use it where one missed step makes the rest of the call
165
165
  * meaningless: an authentication menu, say, with `then: HANG_UP_INVALIDATE`.
166
166
  *
167
- * Any step may set `requiredForValidRun`, which marks a step the flow requires a
168
- * run to reach for its result to count. A run that ends without ever reaching it
169
- * is invalidated: it stays in the report, labelled with the step it never reached
170
- * and where it stopped, and is left out of the run score and the success-criteria
171
- * verdict. Put it on the step where the test itself begins, typically the first
172
- * one after an IVR or a login, so an agent that never gets past the menu does not
173
- * fail every check in a scenario it never started. A path may have one; a
174
- * branching flow may mark one step per branch, and reaching any of them makes the
175
- * call valid. A path that marks none behaves exactly as before.
167
+ * Any step may set `stage`, the named phase of the flow it belongs to: the IVR,
168
+ * the login, the scenario itself. Steps in one stage are drawn as a group in the
169
+ * editor, and the name is yours: the reports say it back to you. The stage does
170
+ * not have to exist first, it is created the first time a step names it, and a
171
+ * name already in the project is matched ignoring case.
172
+ *
173
+ * A stage with `required: true` is a gate. A run that ends without getting PAST it
174
+ * never reached what was being measured, so it stays in the report, labelled with
175
+ * the stage it never completed and the one it stopped in, and is left out of the
176
+ * run score and the success-criteria verdict: an agent that never clears the IVR
177
+ * does not fail every check in a scenario it never started. `required` belongs to
178
+ * the stage rather than to the step, so a read returns it on every step in that
179
+ * stage, and a write that sets it on any one of them marks the whole stage. A flow
180
+ * that requires no stage is scored exactly as before.
181
+ *
182
+ * A stage with `analyze: false` is not measured. Its turns are kept out of the
183
+ * core call metrics (talk time, speech pace, turn and response timings), which is
184
+ * what an IVR usually wants alongside `required: true`: the run has to get through
185
+ * the menu, but how the agent sounded reading it is not what is being tested.
186
+ * Coverage is being extended package by package, so the judged metrics (quality,
187
+ * compliance, repetition, escalation, tone) still read the whole call for now.
188
+ * Nothing is cut and nothing is re-timed, so a turn at 4:10 is still at 4:10 with
189
+ * an earlier stage excluded, and rate metrics divide by the part of the call that
190
+ * was measured rather than by the whole of it. Defaults to true, belongs to the
191
+ * stage the same way `required` does, and turning it off on any one step turns it
192
+ * off for the stage.
176
193
  */
177
194
  export type FlowStep = FlowStep.UnionMember0 | FlowStep.UnionMember1 | FlowStep.UnionMember2 | FlowStep.UnionMember3 | FlowStep.UnionMember4 | FlowStep.UnionMember5 | FlowStep.UnionMember6 | FlowStep.UnionMember7 | FlowStep.UnionMember8 | FlowStep.UnionMember9;
178
195
  export declare namespace FlowStep {
@@ -183,7 +200,7 @@ export declare namespace FlowStep {
183
200
  nodeId?: string;
184
201
  offScriptPolicy?: UnionMember0.OffScriptPolicy | null;
185
202
  ref?: string;
186
- requiredForValidRun?: boolean;
203
+ stage?: UnionMember0.Stage | null;
187
204
  steps?: Array<CustomerFlowAPI.FlowStep>;
188
205
  }
189
206
  namespace UnionMember0 {
@@ -194,6 +211,11 @@ export declare namespace FlowStep {
194
211
  sayLine?: string | null;
195
212
  waitSeconds?: number | null;
196
213
  }
214
+ interface Stage {
215
+ name: string;
216
+ analyze?: boolean;
217
+ required?: boolean;
218
+ }
197
219
  }
198
220
  interface UnionMember1 {
199
221
  type: 'CUSTOMER_TURN';
@@ -201,71 +223,127 @@ export declare namespace FlowStep {
201
223
  mergeIntoNodeIds?: Array<string>;
202
224
  nodeId?: string;
203
225
  ref?: string;
204
- requiredForValidRun?: boolean;
226
+ stage?: UnionMember1.Stage | null;
205
227
  steps?: Array<CustomerFlowAPI.FlowStep>;
206
228
  }
229
+ namespace UnionMember1 {
230
+ interface Stage {
231
+ name: string;
232
+ analyze?: boolean;
233
+ required?: boolean;
234
+ }
235
+ }
207
236
  interface UnionMember2 {
208
237
  type: 'CUSTOMER_FIRST_MESSAGE';
209
238
  content?: string | null;
210
239
  mergeIntoNodeIds?: Array<string>;
211
240
  nodeId?: string;
212
241
  ref?: string;
213
- requiredForValidRun?: boolean;
242
+ stage?: UnionMember2.Stage | null;
214
243
  steps?: Array<CustomerFlowAPI.FlowStep>;
215
244
  }
245
+ namespace UnionMember2 {
246
+ interface Stage {
247
+ name: string;
248
+ analyze?: boolean;
249
+ required?: boolean;
250
+ }
251
+ }
216
252
  interface UnionMember3 {
217
253
  type: 'CUSTOMER_VERBATIM_TURN';
218
254
  content?: string | null;
219
255
  mergeIntoNodeIds?: Array<string>;
220
256
  nodeId?: string;
221
257
  ref?: string;
222
- requiredForValidRun?: boolean;
258
+ stage?: UnionMember3.Stage | null;
223
259
  steps?: Array<CustomerFlowAPI.FlowStep>;
224
260
  }
261
+ namespace UnionMember3 {
262
+ interface Stage {
263
+ name: string;
264
+ analyze?: boolean;
265
+ required?: boolean;
266
+ }
267
+ }
225
268
  interface UnionMember4 {
226
269
  type: 'CUSTOMER_SILENCE';
227
270
  mergeIntoNodeIds?: Array<string>;
228
271
  nodeId?: string;
229
272
  ref?: string;
230
- requiredForValidRun?: boolean;
231
273
  silenceDurationSeconds?: number | null;
274
+ stage?: UnionMember4.Stage | null;
232
275
  steps?: Array<CustomerFlowAPI.FlowStep>;
233
276
  }
277
+ namespace UnionMember4 {
278
+ interface Stage {
279
+ name: string;
280
+ analyze?: boolean;
281
+ required?: boolean;
282
+ }
283
+ }
234
284
  interface UnionMember5 {
235
285
  type: 'CUSTOMER_DTMF';
236
286
  dtmfDigits?: string | null;
237
287
  mergeIntoNodeIds?: Array<string>;
238
288
  nodeId?: string;
239
289
  ref?: string;
240
- requiredForValidRun?: boolean;
290
+ stage?: UnionMember5.Stage | null;
241
291
  steps?: Array<CustomerFlowAPI.FlowStep>;
242
292
  }
293
+ namespace UnionMember5 {
294
+ interface Stage {
295
+ name: string;
296
+ analyze?: boolean;
297
+ required?: boolean;
298
+ }
299
+ }
243
300
  interface UnionMember6 {
244
301
  type: 'AGENT_DTMF';
245
302
  dtmfDigits?: string | null;
246
303
  mergeIntoNodeIds?: Array<string>;
247
304
  nodeId?: string;
248
305
  ref?: string;
249
- requiredForValidRun?: boolean;
306
+ stage?: UnionMember6.Stage | null;
250
307
  steps?: Array<CustomerFlowAPI.FlowStep>;
251
308
  }
309
+ namespace UnionMember6 {
310
+ interface Stage {
311
+ name: string;
312
+ analyze?: boolean;
313
+ required?: boolean;
314
+ }
315
+ }
252
316
  interface UnionMember7 {
253
317
  type: 'VOICEMAIL';
254
318
  mergeIntoNodeIds?: Array<string>;
255
319
  nodeId?: string;
256
320
  ref?: string;
257
- requiredForValidRun?: boolean;
321
+ stage?: UnionMember7.Stage | null;
258
322
  steps?: Array<CustomerFlowAPI.FlowStep>;
259
323
  }
324
+ namespace UnionMember7 {
325
+ interface Stage {
326
+ name: string;
327
+ analyze?: boolean;
328
+ required?: boolean;
329
+ }
330
+ }
260
331
  interface UnionMember8 {
261
332
  type: 'CUSTOMER_HANDOFF';
262
333
  handoffPersonaId?: string | null;
263
334
  mergeIntoNodeIds?: Array<string>;
264
335
  nodeId?: string;
265
336
  ref?: string;
266
- requiredForValidRun?: boolean;
337
+ stage?: UnionMember8.Stage | null;
267
338
  steps?: Array<CustomerFlowAPI.FlowStep>;
268
339
  }
340
+ namespace UnionMember8 {
341
+ interface Stage {
342
+ name: string;
343
+ analyze?: boolean;
344
+ required?: boolean;
345
+ }
346
+ }
269
347
  interface UnionMember9 {
270
348
  type: 'SCENARIO_LINK';
271
349
  linkedCustomerFlowId?: string | null;
@@ -273,9 +351,16 @@ export declare namespace FlowStep {
273
351
  mergeIntoNodeIds?: Array<string>;
274
352
  nodeId?: string;
275
353
  ref?: string;
276
- requiredForValidRun?: boolean;
354
+ stage?: UnionMember9.Stage | null;
277
355
  steps?: Array<CustomerFlowAPI.FlowStep>;
278
356
  }
357
+ namespace UnionMember9 {
358
+ interface Stage {
359
+ name: string;
360
+ analyze?: boolean;
361
+ required?: boolean;
362
+ }
363
+ }
279
364
  }
280
365
  export interface CustomerFlowCreateResponse {
281
366
  /**