@roarkanalytics/sdk 5.10.0 → 5.12.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 +24 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/analytics.d.mts +29 -20
- package/resources/analytics.d.mts.map +1 -1
- package/resources/analytics.d.ts +29 -20
- package/resources/analytics.d.ts.map +1 -1
- package/resources/call.d.mts +110 -7
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +110 -7
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +35 -0
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +35 -0
- package/resources/call.mjs.map +1 -1
- package/resources/config.d.mts +48 -48
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +48 -48
- package/resources/config.d.ts.map +1 -1
- package/resources/dashboard.d.mts +297 -201
- package/resources/dashboard.d.mts.map +1 -1
- package/resources/dashboard.d.ts +297 -201
- package/resources/dashboard.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/metric-collection-job.d.mts +102 -10
- package/resources/metric-collection-job.d.mts.map +1 -1
- package/resources/metric-collection-job.d.ts +102 -10
- package/resources/metric-collection-job.d.ts.map +1 -1
- package/resources/metric-collection-job.js +21 -0
- package/resources/metric-collection-job.js.map +1 -1
- package/resources/metric-collection-job.mjs +21 -0
- package/resources/metric-collection-job.mjs.map +1 -1
- package/src/client.ts +8 -0
- package/src/resources/analytics.ts +41 -22
- package/src/resources/call.ts +125 -6
- package/src/resources/config.ts +120 -72
- package/src/resources/dashboard.ts +411 -233
- package/src/resources/index.ts +4 -0
- package/src/resources/metric-collection-job.ts +118 -9
- 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/src/resources/call.ts
CHANGED
|
@@ -38,6 +38,22 @@ export class Call extends APIResource {
|
|
|
38
38
|
return this._client.get('/v1/call', { query, ...options });
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Deletes a call by its ID. The call, its metrics and its analysis are hidden from
|
|
43
|
+
* every read, and any analysis still running on it is cancelled. Returns 404 when
|
|
44
|
+
* the call does not exist in this project or was already deleted.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const call = await client.call.delete(
|
|
49
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
delete(callID: string, options?: RequestOptions): APIPromise<CallDeleteResponse> {
|
|
54
|
+
return this._client.delete(path`/v1/call/${callID}`, options);
|
|
55
|
+
}
|
|
56
|
+
|
|
41
57
|
/**
|
|
42
58
|
* Attach tool invocations that fired during a call to an already-existing call,
|
|
43
59
|
* asynchronously after the call was created. Use this when the tool-call data
|
|
@@ -73,6 +89,27 @@ export class Call extends APIResource {
|
|
|
73
89
|
return this._client.post(path`/v1/call/${callID}/tool-invocations`, { body, ...options });
|
|
74
90
|
}
|
|
75
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Deletes up to 100 calls by ID in one request. Each deleted call, its metrics and
|
|
94
|
+
* its analysis are hidden from every read, and any analysis still running on it is
|
|
95
|
+
* cancelled. IDs that do not exist in this project, or were already deleted, are
|
|
96
|
+
* returned in notFoundCallIds and left untouched. The request succeeds even when
|
|
97
|
+
* none of the calls are found. IDs are returned lowercase, each once.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const response = await client.call.batchDelete({
|
|
102
|
+
* callIds: [
|
|
103
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
104
|
+
* '660e8400-e29b-41d4-a716-446655440001',
|
|
105
|
+
* ],
|
|
106
|
+
* });
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
batchDelete(body: CallBatchDeleteParams, options?: RequestOptions): APIPromise<CallBatchDeleteResponse> {
|
|
110
|
+
return this._client.post('/v1/call/batch-delete', { body, ...options });
|
|
111
|
+
}
|
|
112
|
+
|
|
76
113
|
/**
|
|
77
114
|
* Retrieve an existing call by its unique identifier
|
|
78
115
|
*
|
|
@@ -446,6 +483,24 @@ export namespace CallListResponse {
|
|
|
446
483
|
}
|
|
447
484
|
}
|
|
448
485
|
|
|
486
|
+
export interface CallDeleteResponse {
|
|
487
|
+
data: CallDeleteResponse.Data;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export namespace CallDeleteResponse {
|
|
491
|
+
export interface Data {
|
|
492
|
+
/**
|
|
493
|
+
* ID of the deleted call
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Always true when the call was deleted
|
|
499
|
+
*/
|
|
500
|
+
deleted: true;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
449
504
|
export interface CallAppendToolInvocationsResponse {
|
|
450
505
|
/**
|
|
451
506
|
* Result of appending tool invocations to a call.
|
|
@@ -505,7 +560,8 @@ export namespace CallAppendToolInvocationsResponse {
|
|
|
505
560
|
completedAt: string | null;
|
|
506
561
|
|
|
507
562
|
/**
|
|
508
|
-
* Number of
|
|
563
|
+
* Number of items that finished without failing: a value was written, or the
|
|
564
|
+
* metric did not apply to the conversation
|
|
509
565
|
*/
|
|
510
566
|
completedItems: number;
|
|
511
567
|
|
|
@@ -515,12 +571,14 @@ export namespace CallAppendToolInvocationsResponse {
|
|
|
515
571
|
createdAt: string;
|
|
516
572
|
|
|
517
573
|
/**
|
|
518
|
-
*
|
|
574
|
+
* Why the job failed or, on a COMPLETED job with failedItems above 0, why those
|
|
575
|
+
* items failed
|
|
519
576
|
*/
|
|
520
577
|
errorMessage: string | null;
|
|
521
578
|
|
|
522
579
|
/**
|
|
523
|
-
* Number of
|
|
580
|
+
* Number of items that could not be computed, for example because an artifact the
|
|
581
|
+
* metric reads (such as diarization) failed to generate
|
|
524
582
|
*/
|
|
525
583
|
failedItems: number;
|
|
526
584
|
|
|
@@ -557,6 +615,25 @@ export namespace CallAppendToolInvocationsResponse {
|
|
|
557
615
|
}
|
|
558
616
|
}
|
|
559
617
|
|
|
618
|
+
export interface CallBatchDeleteResponse {
|
|
619
|
+
data: CallBatchDeleteResponse.Data;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export namespace CallBatchDeleteResponse {
|
|
623
|
+
export interface Data {
|
|
624
|
+
/**
|
|
625
|
+
* Calls this request deleted
|
|
626
|
+
*/
|
|
627
|
+
deletedCallIds: Array<string>;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Requested calls that were not deleted because they do not exist in this project
|
|
631
|
+
* or were already deleted
|
|
632
|
+
*/
|
|
633
|
+
notFoundCallIds: Array<string>;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
560
637
|
export interface CallGetByIDResponse {
|
|
561
638
|
/**
|
|
562
639
|
* Response containing call information
|
|
@@ -1690,7 +1767,8 @@ export namespace CallUpdatePropertiesResponse {
|
|
|
1690
1767
|
completedAt: string | null;
|
|
1691
1768
|
|
|
1692
1769
|
/**
|
|
1693
|
-
* Number of
|
|
1770
|
+
* Number of items that finished without failing: a value was written, or the
|
|
1771
|
+
* metric did not apply to the conversation
|
|
1694
1772
|
*/
|
|
1695
1773
|
completedItems: number;
|
|
1696
1774
|
|
|
@@ -1700,12 +1778,14 @@ export namespace CallUpdatePropertiesResponse {
|
|
|
1700
1778
|
createdAt: string;
|
|
1701
1779
|
|
|
1702
1780
|
/**
|
|
1703
|
-
*
|
|
1781
|
+
* Why the job failed or, on a COMPLETED job with failedItems above 0, why those
|
|
1782
|
+
* items failed
|
|
1704
1783
|
*/
|
|
1705
1784
|
errorMessage: string | null;
|
|
1706
1785
|
|
|
1707
1786
|
/**
|
|
1708
|
-
* Number of
|
|
1787
|
+
* Number of items that could not be computed, for example because an artifact the
|
|
1788
|
+
* metric reads (such as diarization) failed to generate
|
|
1709
1789
|
*/
|
|
1710
1790
|
failedItems: number;
|
|
1711
1791
|
|
|
@@ -2234,6 +2314,17 @@ export interface CallListParams {
|
|
|
2234
2314
|
*/
|
|
2235
2315
|
limit?: number;
|
|
2236
2316
|
|
|
2317
|
+
/**
|
|
2318
|
+
* Filter on custom properties, one entry per property name:
|
|
2319
|
+
* properties[<name>][exists]=true keeps calls that have the property set (whatever
|
|
2320
|
+
* the value), properties[<name>][exists]=false keeps calls missing it (never sent,
|
|
2321
|
+
* sent as null, or removed). A property the project has never seen is missing on
|
|
2322
|
+
* every call. Names match the way properties are stored, so planTier and plan_tier
|
|
2323
|
+
* are one property. At most 20 properties; a name taken by a built-in call filter,
|
|
2324
|
+
* such as status, is rejected with 400.
|
|
2325
|
+
*/
|
|
2326
|
+
properties?: { [key: string]: CallListParams.Property };
|
|
2327
|
+
|
|
2237
2328
|
/**
|
|
2238
2329
|
* Search text to filter calls by title, summary, or transcript
|
|
2239
2330
|
*/
|
|
@@ -2272,6 +2363,24 @@ export interface CallListParams {
|
|
|
2272
2363
|
status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';
|
|
2273
2364
|
}
|
|
2274
2365
|
|
|
2366
|
+
export namespace CallListParams {
|
|
2367
|
+
/**
|
|
2368
|
+
* Filter on custom properties, one entry per property name:
|
|
2369
|
+
* properties[<name>][exists]=true keeps calls that have the property set (whatever
|
|
2370
|
+
* the value), properties[<name>][exists]=false keeps calls missing it (never sent,
|
|
2371
|
+
* sent as null, or removed). A property the project has never seen is missing on
|
|
2372
|
+
* every call. Names match the way properties are stored, so planTier and plan_tier
|
|
2373
|
+
* are one property. At most 20 properties; a name taken by a built-in call filter,
|
|
2374
|
+
* such as status, is rejected with 400.
|
|
2375
|
+
*/
|
|
2376
|
+
export interface Property {
|
|
2377
|
+
/**
|
|
2378
|
+
* true: the property is set. false: the property is missing.
|
|
2379
|
+
*/
|
|
2380
|
+
exists?: boolean;
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2275
2384
|
export interface CallAppendToolInvocationsParams {
|
|
2276
2385
|
/**
|
|
2277
2386
|
* Tool invocations that fired during the call, to attach to it. Max 500 per
|
|
@@ -2360,6 +2469,13 @@ export namespace CallAppendToolInvocationsParams {
|
|
|
2360
2469
|
}
|
|
2361
2470
|
}
|
|
2362
2471
|
|
|
2472
|
+
export interface CallBatchDeleteParams {
|
|
2473
|
+
/**
|
|
2474
|
+
* IDs of the calls to delete, at most 100. Repeated IDs are counted once.
|
|
2475
|
+
*/
|
|
2476
|
+
callIds: Array<string>;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2363
2479
|
export interface CallGetTranscriptParams {
|
|
2364
2480
|
/**
|
|
2365
2481
|
* Transcription source to fetch. When omitted, uses the preferred source based on
|
|
@@ -2416,7 +2532,9 @@ export declare namespace Call {
|
|
|
2416
2532
|
export {
|
|
2417
2533
|
type CallCreateResponse as CallCreateResponse,
|
|
2418
2534
|
type CallListResponse as CallListResponse,
|
|
2535
|
+
type CallDeleteResponse as CallDeleteResponse,
|
|
2419
2536
|
type CallAppendToolInvocationsResponse as CallAppendToolInvocationsResponse,
|
|
2537
|
+
type CallBatchDeleteResponse as CallBatchDeleteResponse,
|
|
2420
2538
|
type CallGetByIDResponse as CallGetByIDResponse,
|
|
2421
2539
|
type CallGetCostResponse as CallGetCostResponse,
|
|
2422
2540
|
type CallGetTranscriptResponse as CallGetTranscriptResponse,
|
|
@@ -2426,6 +2544,7 @@ export declare namespace Call {
|
|
|
2426
2544
|
type CallCreateParams as CallCreateParams,
|
|
2427
2545
|
type CallListParams as CallListParams,
|
|
2428
2546
|
type CallAppendToolInvocationsParams as CallAppendToolInvocationsParams,
|
|
2547
|
+
type CallBatchDeleteParams as CallBatchDeleteParams,
|
|
2429
2548
|
type CallGetTranscriptParams as CallGetTranscriptParams,
|
|
2430
2549
|
type CallListMetricsParams as CallListMetricsParams,
|
|
2431
2550
|
type CallUpdatePropertiesParams as CallUpdatePropertiesParams,
|