@roarkanalytics/sdk 6.2.0 → 7.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 (91) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +9 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/lib/config.d.mts +12 -0
  11. package/lib/config.d.mts.map +1 -1
  12. package/lib/config.d.ts +12 -0
  13. package/lib/config.d.ts.map +1 -1
  14. package/lib/config.js +11 -1
  15. package/lib/config.js.map +1 -1
  16. package/lib/config.mjs +9 -0
  17. package/lib/config.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/calendar-connection.d.mts +897 -0
  20. package/resources/calendar-connection.d.mts.map +1 -0
  21. package/resources/calendar-connection.d.ts +897 -0
  22. package/resources/calendar-connection.d.ts.map +1 -0
  23. package/resources/calendar-connection.js +143 -0
  24. package/resources/calendar-connection.js.map +1 -0
  25. package/resources/calendar-connection.mjs +139 -0
  26. package/resources/calendar-connection.mjs.map +1 -0
  27. package/resources/call.d.mts +2 -0
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +2 -0
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/config.d.mts +508 -27
  32. package/resources/config.d.mts.map +1 -1
  33. package/resources/config.d.ts +508 -27
  34. package/resources/config.d.ts.map +1 -1
  35. package/resources/customer-flow.d.mts +49 -9
  36. package/resources/customer-flow.d.mts.map +1 -1
  37. package/resources/customer-flow.d.ts +49 -9
  38. package/resources/customer-flow.d.ts.map +1 -1
  39. package/resources/http-request-definition.d.mts +4 -4
  40. package/resources/http-request-definition.d.mts.map +1 -1
  41. package/resources/http-request-definition.d.ts +4 -4
  42. package/resources/http-request-definition.d.ts.map +1 -1
  43. package/resources/index.d.mts +3 -0
  44. package/resources/index.d.mts.map +1 -1
  45. package/resources/index.d.ts +3 -0
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +7 -1
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +3 -0
  50. package/resources/index.mjs.map +1 -1
  51. package/resources/metric-variant.d.mts +6 -0
  52. package/resources/metric-variant.d.mts.map +1 -1
  53. package/resources/metric-variant.d.ts +6 -0
  54. package/resources/metric-variant.d.ts.map +1 -1
  55. package/resources/metric.d.mts +93 -0
  56. package/resources/metric.d.mts.map +1 -1
  57. package/resources/metric.d.ts +93 -0
  58. package/resources/metric.d.ts.map +1 -1
  59. package/resources/simulation-audio-clip.d.mts +44 -0
  60. package/resources/simulation-audio-clip.d.mts.map +1 -0
  61. package/resources/simulation-audio-clip.d.ts +44 -0
  62. package/resources/simulation-audio-clip.d.ts.map +1 -0
  63. package/resources/simulation-audio-clip.js +23 -0
  64. package/resources/simulation-audio-clip.js.map +1 -0
  65. package/resources/simulation-audio-clip.mjs +19 -0
  66. package/resources/simulation-audio-clip.mjs.map +1 -0
  67. package/resources/tool.d.mts +671 -0
  68. package/resources/tool.d.mts.map +1 -0
  69. package/resources/tool.d.ts +671 -0
  70. package/resources/tool.d.ts.map +1 -0
  71. package/resources/tool.js +83 -0
  72. package/resources/tool.js.map +1 -0
  73. package/resources/tool.mjs +79 -0
  74. package/resources/tool.mjs.map +1 -0
  75. package/src/client.ts +66 -0
  76. package/src/lib/config.ts +22 -0
  77. package/src/resources/calendar-connection.ts +1103 -0
  78. package/src/resources/call.ts +4 -0
  79. package/src/resources/config.ts +948 -22
  80. package/src/resources/customer-flow.ts +79 -11
  81. package/src/resources/http-request-definition.ts +4 -4
  82. package/src/resources/index.ts +27 -0
  83. package/src/resources/metric-variant.ts +7 -0
  84. package/src/resources/metric.ts +111 -0
  85. package/src/resources/simulation-audio-clip.ts +63 -0
  86. package/src/resources/tool.ts +884 -0
  87. package/src/version.ts +1 -1
  88. package/version.d.mts +1 -1
  89. package/version.d.ts +1 -1
  90. package/version.js +1 -1
  91. package/version.mjs +1 -1
@@ -159,11 +159,26 @@ export declare class CustomerFlow extends APIResource {
159
159
  * whoever holds the phone. It sits between turns like a silence, so it may follow
160
160
  * either side.
161
161
  *
162
+ * A `CUSTOMER_AUDIO` plays audio from the library (`audioClip`, see GET
163
+ * /v1/simulation/audio-clip) on the line for `silenceDurationSeconds` (up to 600,
164
+ * 30 when unset), looping it or cutting it to fit, the way an IVR plays hold
165
+ * music. It plays in a STRICT voice flow only: anywhere else it is a pause of the
166
+ * same length. It sits between turns like a silence.
167
+ *
162
168
  * In a STRICT flow an `AGENT_TURN` may carry its own `offScriptPolicy`, which
163
169
  * replaces the flow-level one at that step. Omit it (or send null) to follow the
164
170
  * flow's policy. Use it where one missed step makes the rest of the call
165
171
  * meaningless: an authentication menu, say, with `then: HANG_UP_INVALIDATE`.
166
172
  *
173
+ * In a STRICT flow an `AGENT_DTMF` may carry an `offScriptPolicy` too, read
174
+ * differently: `waitSeconds` is how long to wait for the keys (at least 5, and
175
+ * just under the run's silence timeout by default and at most) and `then` what
176
+ * follows (`MOVE_ON`, `HANG_UP` or `HANG_UP_INVALIDATE`). Without one the call
177
+ * hangs up in silence after that wait, whatever the flow-level policy says. Speech
178
+ * does not end the wait. `reaction` is `STAY_SILENT` or `REPEAT`: with `REPEAT`
179
+ * the caller says the line before the step again each time the wait runs out, up
180
+ * to `maxAttempts` waits (at most 5), and `then` follows the last one.
181
+ *
167
182
  * Any step may set `stage`, the named phase of the flow it belongs to: the IVR,
168
183
  * the login, the scenario itself. Steps in one stage are drawn as a group in the
169
184
  * editor, and the name is yours: the reports say it back to you. The stage does
@@ -191,7 +206,7 @@ export declare class CustomerFlow extends APIResource {
191
206
  * stage the same way `required` does, and turning it off on any one step turns it
192
207
  * off for the stage.
193
208
  */
194
- export type FlowStep = FlowStep.UnionMember0 | FlowStep.UnionMember1 | FlowStep.UnionMember2 | FlowStep.UnionMember3 | FlowStep.UnionMember4 | FlowStep.UnionMember5 | FlowStep.UnionMember6 | FlowStep.UnionMember7 | FlowStep.UnionMember8 | FlowStep.UnionMember9;
209
+ export type FlowStep = FlowStep.UnionMember0 | FlowStep.UnionMember1 | FlowStep.UnionMember2 | FlowStep.UnionMember3 | FlowStep.UnionMember4 | FlowStep.UnionMember5 | FlowStep.UnionMember6 | FlowStep.UnionMember7 | FlowStep.UnionMember8 | FlowStep.UnionMember9 | FlowStep.UnionMember10;
195
210
  export declare namespace FlowStep {
196
211
  interface UnionMember0 {
197
212
  type: 'AGENT_TURN';
@@ -282,11 +297,12 @@ export declare namespace FlowStep {
282
297
  }
283
298
  }
284
299
  interface UnionMember5 {
285
- type: 'CUSTOMER_DTMF';
286
- dtmfDigits?: string | null;
300
+ type: 'CUSTOMER_AUDIO';
301
+ audioClip?: 'HOLD_MUSIC_CLASSICAL_PIANO' | 'HOLD_MUSIC_CLASSICAL_ORCHESTRA' | 'HOLD_MUSIC_STRING_QUARTET' | 'HOLD_MUSIC_AMBIENT' | 'HOLD_MUSIC_SMOOTH_JAZZ' | 'HOLD_MUSIC_SOFT_SYNTH' | 'HOLD_BEEP' | 'RINGBACK_US' | 'RINGBACK_UK' | null;
287
302
  mergeIntoNodeIds?: Array<string>;
288
303
  nodeId?: string;
289
304
  ref?: string;
305
+ silenceDurationSeconds?: number | null;
290
306
  stage?: UnionMember5.Stage | null;
291
307
  steps?: Array<CustomerFlowAPI.FlowStep>;
292
308
  }
@@ -298,7 +314,7 @@ export declare namespace FlowStep {
298
314
  }
299
315
  }
300
316
  interface UnionMember6 {
301
- type: 'AGENT_DTMF';
317
+ type: 'CUSTOMER_DTMF';
302
318
  dtmfDigits?: string | null;
303
319
  mergeIntoNodeIds?: Array<string>;
304
320
  nodeId?: string;
@@ -314,14 +330,23 @@ export declare namespace FlowStep {
314
330
  }
315
331
  }
316
332
  interface UnionMember7 {
317
- type: 'VOICEMAIL';
333
+ type: 'AGENT_DTMF';
334
+ dtmfDigits?: string | null;
318
335
  mergeIntoNodeIds?: Array<string>;
319
336
  nodeId?: string;
337
+ offScriptPolicy?: UnionMember7.OffScriptPolicy | null;
320
338
  ref?: string;
321
339
  stage?: UnionMember7.Stage | null;
322
340
  steps?: Array<CustomerFlowAPI.FlowStep>;
323
341
  }
324
342
  namespace UnionMember7 {
343
+ interface OffScriptPolicy {
344
+ maxAttempts: number;
345
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
346
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
347
+ sayLine?: string | null;
348
+ waitSeconds?: number | null;
349
+ }
325
350
  interface Stage {
326
351
  name: string;
327
352
  analyze?: boolean;
@@ -329,8 +354,7 @@ export declare namespace FlowStep {
329
354
  }
330
355
  }
331
356
  interface UnionMember8 {
332
- type: 'CUSTOMER_HANDOFF';
333
- handoffPersonaId?: string | null;
357
+ type: 'VOICEMAIL';
334
358
  mergeIntoNodeIds?: Array<string>;
335
359
  nodeId?: string;
336
360
  ref?: string;
@@ -345,16 +369,32 @@ export declare namespace FlowStep {
345
369
  }
346
370
  }
347
371
  interface UnionMember9 {
372
+ type: 'CUSTOMER_HANDOFF';
373
+ handoffPersonaId?: string | null;
374
+ mergeIntoNodeIds?: Array<string>;
375
+ nodeId?: string;
376
+ ref?: string;
377
+ stage?: UnionMember9.Stage | null;
378
+ steps?: Array<CustomerFlowAPI.FlowStep>;
379
+ }
380
+ namespace UnionMember9 {
381
+ interface Stage {
382
+ name: string;
383
+ analyze?: boolean;
384
+ required?: boolean;
385
+ }
386
+ }
387
+ interface UnionMember10 {
348
388
  type: 'SCENARIO_LINK';
349
389
  linkedCustomerFlowId?: string | null;
350
390
  linkedCustomerFlowVariantId?: string | null;
351
391
  mergeIntoNodeIds?: Array<string>;
352
392
  nodeId?: string;
353
393
  ref?: string;
354
- stage?: UnionMember9.Stage | null;
394
+ stage?: UnionMember10.Stage | null;
355
395
  steps?: Array<CustomerFlowAPI.FlowStep>;
356
396
  }
357
- namespace UnionMember9 {
397
+ namespace UnionMember10 {
358
398
  interface Stage {
359
399
  name: string;
360
400
  analyze?: boolean;