@roarkanalytics/sdk 2.22.0 → 2.23.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 +19 -0
- package/client.d.mts +31 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +31 -10
- package/client.d.ts.map +1 -1
- package/client.js +34 -6
- package/client.js.map +1 -1
- package/client.mjs +34 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-endpoint.d.mts +309 -0
- package/resources/agent-endpoint.d.mts.map +1 -0
- package/resources/agent-endpoint.d.ts +309 -0
- package/resources/agent-endpoint.d.ts.map +1 -0
- package/resources/agent-endpoint.js +35 -0
- package/resources/agent-endpoint.js.map +1 -0
- package/resources/agent-endpoint.mjs +31 -0
- package/resources/agent-endpoint.mjs.map +1 -0
- package/resources/agent.d.mts +193 -0
- package/resources/agent.d.mts.map +1 -0
- package/resources/agent.d.ts +193 -0
- package/resources/agent.d.ts.map +1 -0
- package/resources/agent.js +34 -0
- package/resources/agent.js.map +1 -0
- package/resources/agent.mjs +30 -0
- package/resources/agent.mjs.map +1 -0
- package/resources/call.d.mts +120 -1
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +120 -1
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +7 -0
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +7 -0
- package/resources/call.mjs.map +1 -1
- package/resources/evaluation.d.mts +2097 -617
- package/resources/evaluation.d.mts.map +1 -1
- package/resources/evaluation.d.ts +2097 -617
- package/resources/evaluation.d.ts.map +1 -1
- package/resources/evaluation.js +14 -0
- package/resources/evaluation.js.map +1 -1
- package/resources/evaluation.mjs +14 -0
- package/resources/evaluation.mjs.map +1 -1
- package/resources/http-request-definition.d.mts +339 -0
- package/resources/http-request-definition.d.mts.map +1 -0
- package/resources/http-request-definition.d.ts +339 -0
- package/resources/http-request-definition.d.ts.map +1 -0
- package/resources/http-request-definition.js +36 -0
- package/resources/http-request-definition.js.map +1 -0
- package/resources/http-request-definition.mjs +32 -0
- package/resources/http-request-definition.mjs.map +1 -0
- package/resources/index.d.mts +11 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +19 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +9 -2
- package/resources/index.mjs.map +1 -1
- package/resources/simulation-job.d.mts +393 -0
- package/resources/simulation-job.d.mts.map +1 -0
- package/resources/simulation-job.d.ts +393 -0
- package/resources/simulation-job.d.ts.map +1 -0
- package/resources/simulation-job.js +38 -0
- package/resources/simulation-job.js.map +1 -0
- package/resources/simulation-job.mjs +34 -0
- package/resources/simulation-job.mjs.map +1 -0
- package/resources/{persona.d.mts → simulation-persona.d.mts} +62 -33
- package/resources/simulation-persona.d.mts.map +1 -0
- package/resources/{persona.d.ts → simulation-persona.d.ts} +62 -33
- package/resources/simulation-persona.d.ts.map +1 -0
- package/resources/{persona.js → simulation-persona.js} +18 -13
- package/resources/simulation-persona.js.map +1 -0
- package/resources/{persona.mjs → simulation-persona.mjs} +16 -11
- package/resources/simulation-persona.mjs.map +1 -0
- package/resources/simulation-run-plan-job.d.mts +359 -0
- package/resources/simulation-run-plan-job.d.mts.map +1 -0
- package/resources/simulation-run-plan-job.d.ts +359 -0
- package/resources/simulation-run-plan-job.d.ts.map +1 -0
- package/resources/simulation-run-plan-job.js +50 -0
- package/resources/simulation-run-plan-job.js.map +1 -0
- package/resources/simulation-run-plan-job.mjs +46 -0
- package/resources/simulation-run-plan-job.mjs.map +1 -0
- package/resources/simulation-run-plan.d.mts +660 -0
- package/resources/simulation-run-plan.d.mts.map +1 -0
- package/resources/simulation-run-plan.d.ts +660 -0
- package/resources/simulation-run-plan.d.ts.map +1 -0
- package/resources/simulation-run-plan.js +93 -0
- package/resources/simulation-run-plan.js.map +1 -0
- package/resources/simulation-run-plan.mjs +89 -0
- package/resources/simulation-run-plan.mjs.map +1 -0
- package/resources/simulation-scenario.d.mts +335 -0
- package/resources/simulation-scenario.d.mts.map +1 -0
- package/resources/simulation-scenario.d.ts +335 -0
- package/resources/simulation-scenario.d.ts.map +1 -0
- package/resources/simulation-scenario.js +40 -0
- package/resources/simulation-scenario.js.map +1 -0
- package/resources/simulation-scenario.mjs +36 -0
- package/resources/simulation-scenario.mjs.map +1 -0
- package/resources/webhook.d.mts +212 -0
- package/resources/webhook.d.mts.map +1 -0
- package/resources/webhook.d.ts +212 -0
- package/resources/webhook.d.ts.map +1 -0
- package/resources/webhook.js +35 -0
- package/resources/webhook.js.map +1 -0
- package/resources/webhook.mjs +31 -0
- package/resources/webhook.mjs.map +1 -0
- package/src/client.ts +208 -43
- package/src/resources/agent-endpoint.ts +400 -0
- package/src/resources/agent.ts +263 -0
- package/src/resources/call.ts +149 -0
- package/src/resources/evaluation.ts +3044 -1154
- package/src/resources/http-request-definition.ts +410 -0
- package/src/resources/index.ts +89 -21
- package/src/resources/simulation-job.ts +527 -0
- package/src/resources/{persona.ts → simulation-persona.ts} +78 -40
- package/src/resources/simulation-run-plan-job.ts +521 -0
- package/src/resources/simulation-run-plan.ts +840 -0
- package/src/resources/simulation-scenario.ts +463 -0
- package/src/resources/webhook.ts +318 -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
- package/resources/persona.d.mts.map +0 -1
- package/resources/persona.d.ts.map +0 -1
- package/resources/persona.js.map +0 -1
- package/resources/persona.mjs.map +0 -1
- package/resources/simulation.d.mts +0 -802
- package/resources/simulation.d.mts.map +0 -1
- package/resources/simulation.d.ts +0 -802
- package/resources/simulation.d.ts.map +0 -1
- package/resources/simulation.js +0 -90
- package/resources/simulation.js.map +0 -1
- package/resources/simulation.mjs +0 -86
- package/resources/simulation.mjs.map +0 -1
- package/src/resources/simulation.ts +0 -1069
package/src/resources/call.ts
CHANGED
|
@@ -30,6 +30,18 @@ export class Call extends APIResource {
|
|
|
30
30
|
return this._client.get(path`/v1/call/${callID}`, options);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Fetch the full transcript for a specific call. Optionally specify a
|
|
35
|
+
* transcription source; otherwise the best available source is used automatically.
|
|
36
|
+
*/
|
|
37
|
+
getTranscript(
|
|
38
|
+
callID: string,
|
|
39
|
+
query: CallGetTranscriptParams | null | undefined = {},
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<CallGetTranscriptResponse> {
|
|
42
|
+
return this._client.get(path`/v1/call/${callID}/transcript`, { query, ...options });
|
|
43
|
+
}
|
|
44
|
+
|
|
33
45
|
/**
|
|
34
46
|
* Fetch all evaluation run results for a specific call.
|
|
35
47
|
*/
|
|
@@ -436,6 +448,132 @@ export namespace CallGetByIDResponse {
|
|
|
436
448
|
}
|
|
437
449
|
}
|
|
438
450
|
|
|
451
|
+
export interface CallGetTranscriptResponse {
|
|
452
|
+
/**
|
|
453
|
+
* Call transcript response
|
|
454
|
+
*/
|
|
455
|
+
data: CallGetTranscriptResponse.Data;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export namespace CallGetTranscriptResponse {
|
|
459
|
+
/**
|
|
460
|
+
* Call transcript response
|
|
461
|
+
*/
|
|
462
|
+
export interface Data {
|
|
463
|
+
/**
|
|
464
|
+
* Ordered list of transcript entries from the call
|
|
465
|
+
*/
|
|
466
|
+
entries: Array<Data.Entry>;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* All participants in this transcript, referenced by participantId on each entry
|
|
470
|
+
*/
|
|
471
|
+
participants: Array<Data.UnionMember0 | Data.UnionMember1 | Data.UnionMember2 | Data.UnionMember3>;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* The transcription source used for this transcript. Null if no transcript is
|
|
475
|
+
* available.
|
|
476
|
+
*/
|
|
477
|
+
transcriptionSource: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME' | null;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export namespace Data {
|
|
481
|
+
/**
|
|
482
|
+
* A single transcript entry
|
|
483
|
+
*/
|
|
484
|
+
export interface Entry {
|
|
485
|
+
/**
|
|
486
|
+
* End time offset in milliseconds from the start of the call
|
|
487
|
+
*/
|
|
488
|
+
endOffsetMs: number;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* ID of the conversation participant who spoke this entry. References
|
|
492
|
+
* participants[].id.
|
|
493
|
+
*/
|
|
494
|
+
participantId: string | null;
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Convenience role derived from participant type
|
|
498
|
+
*/
|
|
499
|
+
role: 'AGENT' | 'CUSTOMER' | null;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Start time offset in milliseconds from the start of the call
|
|
503
|
+
*/
|
|
504
|
+
startOffsetMs: number;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Transcript text for this entry
|
|
508
|
+
*/
|
|
509
|
+
text: string;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* An agent participant
|
|
514
|
+
*/
|
|
515
|
+
export interface UnionMember0 {
|
|
516
|
+
/**
|
|
517
|
+
* Conversation participant ID
|
|
518
|
+
*/
|
|
519
|
+
id: string;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* ID of the agent entity
|
|
523
|
+
*/
|
|
524
|
+
agentId: string | null;
|
|
525
|
+
|
|
526
|
+
type: 'AGENT';
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* A customer participant
|
|
531
|
+
*/
|
|
532
|
+
export interface UnionMember1 {
|
|
533
|
+
/**
|
|
534
|
+
* Conversation participant ID
|
|
535
|
+
*/
|
|
536
|
+
id: string;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* ID of the conversation customer record
|
|
540
|
+
*/
|
|
541
|
+
customerId: string | null;
|
|
542
|
+
|
|
543
|
+
type: 'CUSTOMER';
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* A simulated customer participant
|
|
548
|
+
*/
|
|
549
|
+
export interface UnionMember2 {
|
|
550
|
+
/**
|
|
551
|
+
* Conversation participant ID
|
|
552
|
+
*/
|
|
553
|
+
id: string;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* ID of the conversation customer record
|
|
557
|
+
*/
|
|
558
|
+
customerId: string | null;
|
|
559
|
+
|
|
560
|
+
type: 'SIMULATED_CUSTOMER';
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* A background speaker participant
|
|
565
|
+
*/
|
|
566
|
+
export interface UnionMember3 {
|
|
567
|
+
/**
|
|
568
|
+
* Conversation participant ID
|
|
569
|
+
*/
|
|
570
|
+
id: string;
|
|
571
|
+
|
|
572
|
+
type: 'BACKGROUND_SPEAKER';
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
439
577
|
export interface CallListEvaluationRunsResponse {
|
|
440
578
|
/**
|
|
441
579
|
* Evaluation run response payload
|
|
@@ -1536,6 +1674,15 @@ export interface CallListParams {
|
|
|
1536
1674
|
status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';
|
|
1537
1675
|
}
|
|
1538
1676
|
|
|
1677
|
+
export interface CallGetTranscriptParams {
|
|
1678
|
+
/**
|
|
1679
|
+
* Transcription source to fetch. When omitted, uses the preferred source based on
|
|
1680
|
+
* availability: CUSTOMER_AGENT_REALTIME > SIMULATION_AGENT_REALTIME >
|
|
1681
|
+
* ROARK_POST_CALL
|
|
1682
|
+
*/
|
|
1683
|
+
source?: 'ROARK_POST_CALL' | 'SIMULATION_AGENT_REALTIME' | 'CUSTOMER_AGENT_REALTIME';
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1539
1686
|
export interface CallListMetricsParams {
|
|
1540
1687
|
/**
|
|
1541
1688
|
* Whether to return a flat list instead of grouped by metric definition (default:
|
|
@@ -1549,11 +1696,13 @@ export declare namespace Call {
|
|
|
1549
1696
|
type CallCreateResponse as CallCreateResponse,
|
|
1550
1697
|
type CallListResponse as CallListResponse,
|
|
1551
1698
|
type CallGetByIDResponse as CallGetByIDResponse,
|
|
1699
|
+
type CallGetTranscriptResponse as CallGetTranscriptResponse,
|
|
1552
1700
|
type CallListEvaluationRunsResponse as CallListEvaluationRunsResponse,
|
|
1553
1701
|
type CallListMetricsResponse as CallListMetricsResponse,
|
|
1554
1702
|
type CallListSentimentRunsResponse as CallListSentimentRunsResponse,
|
|
1555
1703
|
type CallCreateParams as CallCreateParams,
|
|
1556
1704
|
type CallListParams as CallListParams,
|
|
1705
|
+
type CallGetTranscriptParams as CallGetTranscriptParams,
|
|
1557
1706
|
type CallListMetricsParams as CallListMetricsParams,
|
|
1558
1707
|
};
|
|
1559
1708
|
}
|