@roarkanalytics/sdk 7.0.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.
- package/CHANGELOG.md +12 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/config.d.mts +2 -1
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +2 -1
- package/resources/config.d.ts.map +1 -1
- package/resources/customer-flow.d.mts +49 -9
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +49 -9
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/metric-variant.d.mts +2 -1
- package/resources/metric-variant.d.mts.map +1 -1
- package/resources/metric-variant.d.ts +2 -1
- package/resources/metric-variant.d.ts.map +1 -1
- package/resources/metric.d.mts +24 -21
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +24 -21
- package/resources/metric.d.ts.map +1 -1
- package/resources/simulation-audio-clip.d.mts +44 -0
- package/resources/simulation-audio-clip.d.mts.map +1 -0
- package/resources/simulation-audio-clip.d.ts +44 -0
- package/resources/simulation-audio-clip.d.ts.map +1 -0
- package/resources/simulation-audio-clip.js +23 -0
- package/resources/simulation-audio-clip.js.map +1 -0
- package/resources/simulation-audio-clip.mjs +19 -0
- package/resources/simulation-audio-clip.mjs.map +1 -0
- package/src/client.ts +8 -0
- package/src/resources/config.ts +12 -0
- package/src/resources/customer-flow.ts +79 -11
- package/src/resources/index.ts +1 -0
- package/src/resources/metric-variant.ts +2 -1
- package/src/resources/metric.ts +24 -21
- package/src/resources/simulation-audio-clip.ts +63 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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: '
|
|
286
|
-
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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?:
|
|
394
|
+
stage?: UnionMember10.Stage | null;
|
|
355
395
|
steps?: Array<CustomerFlowAPI.FlowStep>;
|
|
356
396
|
}
|
|
357
|
-
namespace
|
|
397
|
+
namespace UnionMember10 {
|
|
358
398
|
interface Stage {
|
|
359
399
|
name: string;
|
|
360
400
|
analyze?: boolean;
|