@roarkanalytics/sdk 5.10.0 → 5.11.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 (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/analytics.d.mts +29 -20
  10. package/resources/analytics.d.mts.map +1 -1
  11. package/resources/analytics.d.ts +29 -20
  12. package/resources/analytics.d.ts.map +1 -1
  13. package/resources/call.d.mts +98 -1
  14. package/resources/call.d.mts.map +1 -1
  15. package/resources/call.d.ts +98 -1
  16. package/resources/call.d.ts.map +1 -1
  17. package/resources/call.js +35 -0
  18. package/resources/call.js.map +1 -1
  19. package/resources/call.mjs +35 -0
  20. package/resources/call.mjs.map +1 -1
  21. package/resources/config.d.mts +48 -48
  22. package/resources/config.d.mts.map +1 -1
  23. package/resources/config.d.ts +48 -48
  24. package/resources/config.d.ts.map +1 -1
  25. package/resources/dashboard.d.mts +297 -201
  26. package/resources/dashboard.d.mts.map +1 -1
  27. package/resources/dashboard.d.ts +297 -201
  28. package/resources/dashboard.d.ts.map +1 -1
  29. package/resources/index.d.mts +1 -1
  30. package/resources/index.d.mts.map +1 -1
  31. package/resources/index.d.ts +1 -1
  32. package/resources/index.d.ts.map +1 -1
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs.map +1 -1
  35. package/src/client.ts +6 -0
  36. package/src/resources/analytics.ts +41 -22
  37. package/src/resources/call.ts +113 -0
  38. package/src/resources/config.ts +120 -72
  39. package/src/resources/dashboard.ts +411 -233
  40. package/src/resources/index.ts +3 -0
  41. package/src/version.ts +1 -1
  42. package/version.d.mts +1 -1
  43. package/version.d.ts +1 -1
  44. package/version.js +1 -1
  45. package/version.mjs +1 -1
@@ -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.
@@ -557,6 +612,25 @@ export namespace CallAppendToolInvocationsResponse {
557
612
  }
558
613
  }
559
614
 
615
+ export interface CallBatchDeleteResponse {
616
+ data: CallBatchDeleteResponse.Data;
617
+ }
618
+
619
+ export namespace CallBatchDeleteResponse {
620
+ export interface Data {
621
+ /**
622
+ * Calls this request deleted
623
+ */
624
+ deletedCallIds: Array<string>;
625
+
626
+ /**
627
+ * Requested calls that were not deleted because they do not exist in this project
628
+ * or were already deleted
629
+ */
630
+ notFoundCallIds: Array<string>;
631
+ }
632
+ }
633
+
560
634
  export interface CallGetByIDResponse {
561
635
  /**
562
636
  * Response containing call information
@@ -2234,6 +2308,17 @@ export interface CallListParams {
2234
2308
  */
2235
2309
  limit?: number;
2236
2310
 
2311
+ /**
2312
+ * Filter on custom properties, one entry per property name:
2313
+ * properties[<name>][exists]=true keeps calls that have the property set (whatever
2314
+ * the value), properties[<name>][exists]=false keeps calls missing it (never sent,
2315
+ * sent as null, or removed). A property the project has never seen is missing on
2316
+ * every call. Names match the way properties are stored, so planTier and plan_tier
2317
+ * are one property. At most 20 properties; a name taken by a built-in call filter,
2318
+ * such as status, is rejected with 400.
2319
+ */
2320
+ properties?: { [key: string]: CallListParams.Property };
2321
+
2237
2322
  /**
2238
2323
  * Search text to filter calls by title, summary, or transcript
2239
2324
  */
@@ -2272,6 +2357,24 @@ export interface CallListParams {
2272
2357
  status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';
2273
2358
  }
2274
2359
 
2360
+ export namespace CallListParams {
2361
+ /**
2362
+ * Filter on custom properties, one entry per property name:
2363
+ * properties[<name>][exists]=true keeps calls that have the property set (whatever
2364
+ * the value), properties[<name>][exists]=false keeps calls missing it (never sent,
2365
+ * sent as null, or removed). A property the project has never seen is missing on
2366
+ * every call. Names match the way properties are stored, so planTier and plan_tier
2367
+ * are one property. At most 20 properties; a name taken by a built-in call filter,
2368
+ * such as status, is rejected with 400.
2369
+ */
2370
+ export interface Property {
2371
+ /**
2372
+ * true: the property is set. false: the property is missing.
2373
+ */
2374
+ exists?: boolean;
2375
+ }
2376
+ }
2377
+
2275
2378
  export interface CallAppendToolInvocationsParams {
2276
2379
  /**
2277
2380
  * Tool invocations that fired during the call, to attach to it. Max 500 per
@@ -2360,6 +2463,13 @@ export namespace CallAppendToolInvocationsParams {
2360
2463
  }
2361
2464
  }
2362
2465
 
2466
+ export interface CallBatchDeleteParams {
2467
+ /**
2468
+ * IDs of the calls to delete, at most 100. Repeated IDs are counted once.
2469
+ */
2470
+ callIds: Array<string>;
2471
+ }
2472
+
2363
2473
  export interface CallGetTranscriptParams {
2364
2474
  /**
2365
2475
  * Transcription source to fetch. When omitted, uses the preferred source based on
@@ -2416,7 +2526,9 @@ export declare namespace Call {
2416
2526
  export {
2417
2527
  type CallCreateResponse as CallCreateResponse,
2418
2528
  type CallListResponse as CallListResponse,
2529
+ type CallDeleteResponse as CallDeleteResponse,
2419
2530
  type CallAppendToolInvocationsResponse as CallAppendToolInvocationsResponse,
2531
+ type CallBatchDeleteResponse as CallBatchDeleteResponse,
2420
2532
  type CallGetByIDResponse as CallGetByIDResponse,
2421
2533
  type CallGetCostResponse as CallGetCostResponse,
2422
2534
  type CallGetTranscriptResponse as CallGetTranscriptResponse,
@@ -2426,6 +2538,7 @@ export declare namespace Call {
2426
2538
  type CallCreateParams as CallCreateParams,
2427
2539
  type CallListParams as CallListParams,
2428
2540
  type CallAppendToolInvocationsParams as CallAppendToolInvocationsParams,
2541
+ type CallBatchDeleteParams as CallBatchDeleteParams,
2429
2542
  type CallGetTranscriptParams as CallGetTranscriptParams,
2430
2543
  type CallListMetricsParams as CallListMetricsParams,
2431
2544
  type CallUpdatePropertiesParams as CallUpdatePropertiesParams,