@roarkanalytics/sdk 2.34.0 → 3.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 (165) hide show
  1. package/CHANGELOG.md +40 -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/agent-endpoint.d.mts +26 -0
  10. package/resources/agent-endpoint.d.mts.map +1 -1
  11. package/resources/agent-endpoint.d.ts +26 -0
  12. package/resources/agent-endpoint.d.ts.map +1 -1
  13. package/resources/agent-endpoint.js +26 -0
  14. package/resources/agent-endpoint.js.map +1 -1
  15. package/resources/agent-endpoint.mjs +26 -0
  16. package/resources/agent-endpoint.mjs.map +1 -1
  17. package/resources/agent.d.mts +20 -0
  18. package/resources/agent.d.mts.map +1 -1
  19. package/resources/agent.d.ts +20 -0
  20. package/resources/agent.d.ts.map +1 -1
  21. package/resources/agent.js +20 -0
  22. package/resources/agent.js.map +1 -1
  23. package/resources/agent.mjs +20 -0
  24. package/resources/agent.mjs.map +1 -1
  25. package/resources/call.d.mts +39 -170
  26. package/resources/call.d.mts.map +1 -1
  27. package/resources/call.d.ts +39 -170
  28. package/resources/call.d.ts.map +1 -1
  29. package/resources/call.js +39 -0
  30. package/resources/call.js.map +1 -1
  31. package/resources/call.mjs +39 -0
  32. package/resources/call.mjs.map +1 -1
  33. package/resources/config.d.mts +90 -99
  34. package/resources/config.d.mts.map +1 -1
  35. package/resources/config.d.ts +90 -99
  36. package/resources/config.d.ts.map +1 -1
  37. package/resources/config.js +18 -5
  38. package/resources/config.js.map +1 -1
  39. package/resources/config.mjs +18 -5
  40. package/resources/config.mjs.map +1 -1
  41. package/resources/customer-flow-edge-case.d.mts +79 -0
  42. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  43. package/resources/customer-flow-edge-case.d.ts +79 -0
  44. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  45. package/resources/customer-flow-edge-case.js +34 -0
  46. package/resources/customer-flow-edge-case.js.map +1 -1
  47. package/resources/customer-flow-edge-case.mjs +34 -0
  48. package/resources/customer-flow-edge-case.mjs.map +1 -1
  49. package/resources/customer-flow.d.mts +271 -615
  50. package/resources/customer-flow.d.mts.map +1 -1
  51. package/resources/customer-flow.d.ts +271 -615
  52. package/resources/customer-flow.d.ts.map +1 -1
  53. package/resources/customer-flow.js +42 -1
  54. package/resources/customer-flow.js.map +1 -1
  55. package/resources/customer-flow.mjs +42 -1
  56. package/resources/customer-flow.mjs.map +1 -1
  57. package/resources/health.d.mts +5 -0
  58. package/resources/health.d.mts.map +1 -1
  59. package/resources/health.d.ts +5 -0
  60. package/resources/health.d.ts.map +1 -1
  61. package/resources/health.js +5 -0
  62. package/resources/health.js.map +1 -1
  63. package/resources/health.mjs +5 -0
  64. package/resources/health.mjs.map +1 -1
  65. package/resources/http-request-definition.d.mts +29 -0
  66. package/resources/http-request-definition.d.mts.map +1 -1
  67. package/resources/http-request-definition.d.ts +29 -0
  68. package/resources/http-request-definition.d.ts.map +1 -1
  69. package/resources/http-request-definition.js +29 -0
  70. package/resources/http-request-definition.js.map +1 -1
  71. package/resources/http-request-definition.mjs +29 -0
  72. package/resources/http-request-definition.mjs.map +1 -1
  73. package/resources/index.d.mts +1 -1
  74. package/resources/index.d.mts.map +1 -1
  75. package/resources/index.d.ts +1 -1
  76. package/resources/index.d.ts.map +1 -1
  77. package/resources/index.js.map +1 -1
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/metric-collection-job.d.mts +23 -0
  80. package/resources/metric-collection-job.d.mts.map +1 -1
  81. package/resources/metric-collection-job.d.ts +23 -0
  82. package/resources/metric-collection-job.d.ts.map +1 -1
  83. package/resources/metric-collection-job.js +23 -0
  84. package/resources/metric-collection-job.js.map +1 -1
  85. package/resources/metric-collection-job.mjs +23 -0
  86. package/resources/metric-collection-job.mjs.map +1 -1
  87. package/resources/metric.d.mts +5 -7
  88. package/resources/metric.d.mts.map +1 -1
  89. package/resources/metric.d.ts +5 -7
  90. package/resources/metric.d.ts.map +1 -1
  91. package/resources/metric.js +5 -0
  92. package/resources/metric.js.map +1 -1
  93. package/resources/metric.mjs +5 -0
  94. package/resources/metric.mjs.map +1 -1
  95. package/resources/simulation-environment.d.mts +13 -0
  96. package/resources/simulation-environment.d.mts.map +1 -1
  97. package/resources/simulation-environment.d.ts +13 -0
  98. package/resources/simulation-environment.d.ts.map +1 -1
  99. package/resources/simulation-environment.js +13 -0
  100. package/resources/simulation-environment.js.map +1 -1
  101. package/resources/simulation-environment.mjs +13 -0
  102. package/resources/simulation-environment.mjs.map +1 -1
  103. package/resources/simulation-job.d.mts +14 -4
  104. package/resources/simulation-job.d.mts.map +1 -1
  105. package/resources/simulation-job.d.ts +14 -4
  106. package/resources/simulation-job.d.ts.map +1 -1
  107. package/resources/simulation-job.js +1 -1
  108. package/resources/simulation-job.js.map +1 -1
  109. package/resources/simulation-job.mjs +1 -1
  110. package/resources/simulation-job.mjs.map +1 -1
  111. package/resources/simulation-persona.d.mts +32 -3
  112. package/resources/simulation-persona.d.mts.map +1 -1
  113. package/resources/simulation-persona.d.ts +32 -3
  114. package/resources/simulation-persona.d.ts.map +1 -1
  115. package/resources/simulation-persona.js +2 -3
  116. package/resources/simulation-persona.js.map +1 -1
  117. package/resources/simulation-persona.mjs +2 -3
  118. package/resources/simulation-persona.mjs.map +1 -1
  119. package/resources/simulation-run-plan-job.d.mts +14 -2
  120. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  121. package/resources/simulation-run-plan-job.d.ts +14 -2
  122. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  123. package/resources/simulation-run-plan-job.js +7 -0
  124. package/resources/simulation-run-plan-job.js.map +1 -1
  125. package/resources/simulation-run-plan-job.mjs +7 -0
  126. package/resources/simulation-run-plan-job.mjs.map +1 -1
  127. package/resources/simulation.d.mts +2 -2
  128. package/resources/simulation.d.ts +2 -2
  129. package/resources/simulation.js +2 -2
  130. package/resources/simulation.mjs +2 -2
  131. package/resources/webhook.d.mts +23 -0
  132. package/resources/webhook.d.mts.map +1 -1
  133. package/resources/webhook.d.ts +23 -0
  134. package/resources/webhook.d.ts.map +1 -1
  135. package/resources/webhook.js +23 -0
  136. package/resources/webhook.js.map +1 -1
  137. package/resources/webhook.mjs +23 -0
  138. package/resources/webhook.mjs.map +1 -1
  139. package/src/client.ts +2 -0
  140. package/src/resources/agent-endpoint.ts +26 -0
  141. package/src/resources/agent.ts +20 -0
  142. package/src/resources/call.ts +39 -202
  143. package/src/resources/config.ts +123 -158
  144. package/src/resources/customer-flow-edge-case.ts +88 -0
  145. package/src/resources/customer-flow.ts +318 -1009
  146. package/src/resources/health.ts +5 -0
  147. package/src/resources/http-request-definition.ts +29 -0
  148. package/src/resources/index.ts +1 -0
  149. package/src/resources/metric-collection-job.ts +23 -0
  150. package/src/resources/metric.ts +5 -18
  151. package/src/resources/simulation-environment.ts +13 -0
  152. package/src/resources/simulation-job.ts +16 -4
  153. package/src/resources/simulation-persona.ts +38 -3
  154. package/src/resources/simulation-run-plan-job.ts +15 -2
  155. package/src/resources/simulation.ts +2 -2
  156. package/src/resources/webhook.ts +23 -0
  157. package/src/version.ts +1 -1
  158. package/version.d.mts +1 -1
  159. package/version.d.mts.map +1 -1
  160. package/version.d.ts +1 -1
  161. package/version.d.ts.map +1 -1
  162. package/version.js +1 -1
  163. package/version.js.map +1 -1
  164. package/version.mjs +1 -1
  165. package/version.mjs.map +1 -1
@@ -7,6 +7,11 @@ import { RequestOptions } from '../internal/request-options';
7
7
  export class Health extends APIResource {
8
8
  /**
9
9
  * Returns the health status of the API and its dependencies
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const health = await client.health.get();
14
+ * ```
10
15
  */
11
16
  get(options?: RequestOptions): APIPromise<HealthGetResponse> {
12
17
  return this._client.get('/health', options);
@@ -9,6 +9,15 @@ export class HTTPRequestDefinition extends APIResource {
9
9
  /**
10
10
  * Creates a new HTTP request definition. The signing secret is only returned in
11
11
  * this response and cannot be retrieved later.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const httpRequestDefinition =
16
+ * await client.httpRequestDefinition.create({
17
+ * scope: 'AGENT_OUTBOUND_DIAL',
18
+ * url: 'https://example.com',
19
+ * });
20
+ * ```
12
21
  */
13
22
  create(
14
23
  body: HTTPRequestDefinitionCreateParams,
@@ -19,6 +28,12 @@ export class HTTPRequestDefinition extends APIResource {
19
28
 
20
29
  /**
21
30
  * Updates an existing HTTP request definition.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const httpRequestDefinition =
35
+ * await client.httpRequestDefinition.update('definitionId');
36
+ * ```
22
37
  */
23
38
  update(
24
39
  definitionID: string,
@@ -31,6 +46,12 @@ export class HTTPRequestDefinition extends APIResource {
31
46
  /**
32
47
  * Returns a paginated list of HTTP request definitions for the authenticated
33
48
  * project.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const httpRequestDefinitions =
53
+ * await client.httpRequestDefinition.list();
54
+ * ```
34
55
  */
35
56
  list(
36
57
  query: HTTPRequestDefinitionListParams | null | undefined = {},
@@ -41,6 +62,14 @@ export class HTTPRequestDefinition extends APIResource {
41
62
 
42
63
  /**
43
64
  * Returns a specific HTTP request definition by its ID.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const response =
69
+ * await client.httpRequestDefinition.getByID(
70
+ * 'definitionId',
71
+ * );
72
+ * ```
44
73
  */
45
74
  getByID(definitionID: string, options?: RequestOptions): APIPromise<HTTPRequestDefinitionGetByIDResponse> {
46
75
  return this._client.get(path`/v1/http-request-definition/${definitionID}`, options);
@@ -36,6 +36,7 @@ export {
36
36
  export {
37
37
  Config,
38
38
  type Bundle,
39
+ type ConfigFlowStep,
39
40
  type ConfigApplyResponse,
40
41
  type ConfigDiffResponse,
41
42
  type ConfigApplyParams,
@@ -9,6 +9,16 @@ export class MetricCollectionJob extends APIResource {
9
9
  /**
10
10
  * Creates a metric collection job for the specified calls or chats and metrics,
11
11
  * then triggers processing. Provide exactly one of callIds or chatIds.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const metricCollectionJob =
16
+ * await client.metricCollectionJob.create({
17
+ * metrics: [
18
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
19
+ * ],
20
+ * });
21
+ * ```
12
22
  */
13
23
  create(
14
24
  body: MetricCollectionJobCreateParams,
@@ -19,6 +29,12 @@ export class MetricCollectionJob extends APIResource {
19
29
 
20
30
  /**
21
31
  * Returns a paginated list of metric collection jobs for the project.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const metricCollectionJobs =
36
+ * await client.metricCollectionJob.list();
37
+ * ```
22
38
  */
23
39
  list(
24
40
  query: MetricCollectionJobListParams | null | undefined = {},
@@ -29,6 +45,13 @@ export class MetricCollectionJob extends APIResource {
29
45
 
30
46
  /**
31
47
  * Returns a specific metric collection job with progress information.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const response = await client.metricCollectionJob.getByID(
52
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
53
+ * );
54
+ * ```
32
55
  */
33
56
  getByID(jobID: string, options?: RequestOptions): APIPromise<MetricCollectionJobGetByIDResponse> {
34
57
  return this._client.get(path`/v1/metric/collection-jobs/${jobID}`, options);
@@ -32,6 +32,11 @@ export class Metric extends APIResource {
32
32
  /**
33
33
  * Fetch all metric definitions available in the project, including both
34
34
  * system-generated and custom metrics.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const response = await client.metric.listDefinitions();
39
+ * ```
35
40
  */
36
41
  listDefinitions(options?: RequestOptions): APIPromise<MetricListDefinitionsResponse> {
37
42
  return this._client.get('/v1/metric/definitions', options);
@@ -1233,24 +1238,6 @@ export declare namespace MetricCreateDefinitionParams {
1233
1238
 
1234
1239
  sourceVariantId?: string;
1235
1240
  }
1236
-
1237
- export interface Trigger {
1238
- operator:
1239
- | 'GREATER_THAN'
1240
- | 'GREATER_THAN_OR_EQUALS'
1241
- | 'LESS_THAN'
1242
- | 'LESS_THAN_OR_EQUALS'
1243
- | 'EQUALS'
1244
- | 'NOT_EQUALS';
1245
-
1246
- sourceMetricDefinitionId: string;
1247
-
1248
- thresholdValue: string;
1249
-
1250
- sourceParticipantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
1251
-
1252
- sourceVariantId?: string;
1253
- }
1254
1241
  }
1255
1242
  }
1256
1243
 
@@ -10,6 +10,12 @@ export class SimulationEnvironment extends APIResource {
10
10
  * Returns a paginated list of environments: the project's own plus the
11
11
  * environments Roark curates and shares across every project. Reference one by id
12
12
  * when setting a customer flow variant's environment.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const simulationEnvironments =
17
+ * await client.simulationEnvironment.list();
18
+ * ```
13
19
  */
14
20
  list(
15
21
  query: SimulationEnvironmentListParams | null | undefined = {},
@@ -20,6 +26,13 @@ export class SimulationEnvironment extends APIResource {
20
26
 
21
27
  /**
22
28
  * Returns a single environment by its ID.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const response = await client.simulationEnvironment.getByID(
33
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
34
+ * );
35
+ * ```
23
36
  */
24
37
  getByID(environmentID: string, options?: RequestOptions): APIPromise<SimulationEnvironmentGetByIDResponse> {
25
38
  return this._client.get(path`/v1/simulation/environment/${environmentID}`, options);
@@ -17,7 +17,7 @@ export class SimulationJob extends APIResource {
17
17
  * );
18
18
  * ```
19
19
  */
20
- getByID(jobID: unknown, options?: RequestOptions): APIPromise<SimulationJobGetByIDResponse> {
20
+ getByID(jobID: string, options?: RequestOptions): APIPromise<SimulationJobGetByIDResponse> {
21
21
  return this._client.get(path`/v1/simulation/job/${jobID}`, options);
22
22
  }
23
23
 
@@ -28,7 +28,7 @@ export class SimulationJob extends APIResource {
28
28
  * @example
29
29
  * ```ts
30
30
  * const response = await client.simulationJob.lookup({
31
- * roarkPhoneNumber: {},
31
+ * roarkPhoneNumber: 'roarkPhoneNumber',
32
32
  * });
33
33
  * ```
34
34
  */
@@ -178,6 +178,12 @@ export namespace SimulationJobGetByIDResponse {
178
178
  | 'PT'
179
179
  | 'IL';
180
180
 
181
+ /**
182
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
183
+ * voice for are accepted; defaults to ADULT, which every accent supports.
184
+ */
185
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
186
+
181
187
  /**
182
188
  * Background noise setting
183
189
  */
@@ -515,6 +521,12 @@ export namespace SimulationJobLookupResponse {
515
521
  | 'PT'
516
522
  | 'IL';
517
523
 
524
+ /**
525
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
526
+ * voice for are accepted; defaults to ADULT, which every accent supports.
527
+ */
528
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
529
+
518
530
  /**
519
531
  * Background noise setting
520
532
  */
@@ -720,14 +732,14 @@ export interface SimulationJobLookupParams {
720
732
  * case of an inbound simulation, this is the number that calls your agent; in the
721
733
  * case of an outbound simulation, this is the number you call from your agent.
722
734
  */
723
- roarkPhoneNumber: unknown;
735
+ roarkPhoneNumber: string;
724
736
 
725
737
  /**
726
738
  * ISO 8601 timestamp of when the call was received. Alternatively, any time
727
739
  * between the start and end of the call is valid. Defaults to the current time,
728
740
  * which fetches any jobs that are currently ongoing.
729
741
  */
730
- callReceivedAt?: unknown;
742
+ callReceivedAt?: string;
731
743
  }
732
744
 
733
745
  export declare namespace SimulationJob {
@@ -65,9 +65,8 @@ export class SimulationPersona extends APIResource {
65
65
  *
66
66
  * @example
67
67
  * ```ts
68
- * const response = await client.simulationPersona.getByID(
69
- * 'personaId',
70
- * );
68
+ * const response =
69
+ * await client.simulationPersona.getByID('personaId');
71
70
  * ```
72
71
  */
73
72
  getByID(personaID: string, options?: RequestOptions): APIPromise<SimulationPersonaGetByIDResponse> {
@@ -115,6 +114,12 @@ export namespace SimulationPersonaCreateResponse {
115
114
  | 'PT'
116
115
  | 'IL';
117
116
 
117
+ /**
118
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
119
+ * voice for are accepted; defaults to ADULT, which every accent supports.
120
+ */
121
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
122
+
118
123
  /**
119
124
  * Background noise setting
120
125
  */
@@ -320,6 +325,12 @@ export namespace SimulationPersonaUpdateResponse {
320
325
  | 'PT'
321
326
  | 'IL';
322
327
 
328
+ /**
329
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
330
+ * voice for are accepted; defaults to ADULT, which every accent supports.
331
+ */
332
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
333
+
323
334
  /**
324
335
  * Background noise setting
325
336
  */
@@ -527,6 +538,12 @@ export namespace SimulationPersonaListResponse {
527
538
  | 'PT'
528
539
  | 'IL';
529
540
 
541
+ /**
542
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
543
+ * voice for are accepted; defaults to ADULT, which every accent supports.
544
+ */
545
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
546
+
530
547
  /**
531
548
  * Background noise setting
532
549
  */
@@ -749,6 +766,12 @@ export namespace SimulationPersonaGetByIDResponse {
749
766
  | 'PT'
750
767
  | 'IL';
751
768
 
769
+ /**
770
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
771
+ * voice for are accepted; defaults to ADULT, which every accent supports.
772
+ */
773
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
774
+
752
775
  /**
753
776
  * Background noise setting
754
777
  */
@@ -977,6 +1000,12 @@ export interface SimulationPersonaCreateParams {
977
1000
  */
978
1001
  name: string;
979
1002
 
1003
+ /**
1004
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
1005
+ * voice for are accepted; defaults to ADULT, which every accent supports.
1006
+ */
1007
+ age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1008
+
980
1009
  /**
981
1010
  * Background noise setting
982
1011
  */
@@ -1128,6 +1157,12 @@ export interface SimulationPersonaUpdateParams {
1128
1157
  | 'PT'
1129
1158
  | 'IL';
1130
1159
 
1160
+ /**
1161
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
1162
+ * voice for are accepted; defaults to ADULT, which every accent supports.
1163
+ */
1164
+ age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1165
+
1131
1166
  /**
1132
1167
  * Background noise setting
1133
1168
  */
@@ -34,7 +34,7 @@ export class SimulationRunPlanJob extends APIResource {
34
34
  * );
35
35
  * ```
36
36
  */
37
- getByID(jobID: unknown, options?: RequestOptions): APIPromise<SimulationRunPlanJobGetByIDResponse> {
37
+ getByID(jobID: string, options?: RequestOptions): APIPromise<SimulationRunPlanJobGetByIDResponse> {
38
38
  return this._client.get(path`/v1/simulation/plan/job/${jobID}`, options);
39
39
  }
40
40
 
@@ -47,9 +47,16 @@ export class SimulationRunPlanJob extends APIResource {
47
47
  * provide runtime variables to override plan-defined variables.
48
48
  *
49
49
  * @deprecated
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * const response = await client.simulationRunPlanJob.start(
54
+ * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
55
+ * );
56
+ * ```
50
57
  */
51
58
  start(
52
- planID: unknown,
59
+ planID: string,
53
60
  body: SimulationRunPlanJobStartParams | null | undefined = {},
54
61
  options?: RequestOptions,
55
62
  ): APIPromise<SimulationRunPlanJobStartResponse> {
@@ -341,6 +348,12 @@ export namespace SimulationRunPlanJobGetByIDResponse {
341
348
  | 'PT'
342
349
  | 'IL';
343
350
 
351
+ /**
352
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
353
+ * voice for are accepted; defaults to ADULT, which every accent supports.
354
+ */
355
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
356
+
344
357
  /**
345
358
  * Background noise setting
346
359
  */
@@ -17,9 +17,9 @@ export class Simulation extends APIResource {
17
17
  * const response = await client.simulation.run({
18
18
  * plan: {
19
19
  * agentEndpoints: [
20
- * { id: '7c9e6679-7425-40de-944b-e07fc1f90ae7' },
20
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
21
21
  * ],
22
- * direction: 'OUTBOUND',
22
+ * direction: 'INBOUND',
23
23
  * maxSimulationDurationSeconds: 300,
24
24
  * metrics: [{}],
25
25
  * },
@@ -9,6 +9,14 @@ export class Webhook extends APIResource {
9
9
  /**
10
10
  * Creates a new webhook with event subscriptions. The signing secret is only
11
11
  * returned in this response.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const webhook = await client.webhook.create({
16
+ * events: ['CALL_ANALYSIS_COMPLETED'],
17
+ * url: 'https://example.com',
18
+ * });
19
+ * ```
12
20
  */
13
21
  create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse> {
14
22
  return this._client.post('/v1/webhook', { body, ...options });
@@ -16,6 +24,11 @@ export class Webhook extends APIResource {
16
24
 
17
25
  /**
18
26
  * Returns a paginated list of webhooks with their event subscriptions.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const webhooks = await client.webhook.list();
31
+ * ```
19
32
  */
20
33
  list(
21
34
  query: WebhookListParams | null | undefined = {},
@@ -26,6 +39,11 @@ export class Webhook extends APIResource {
26
39
 
27
40
  /**
28
41
  * Deletes a webhook and all its event subscriptions.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const webhook = await client.webhook.delete('webhookId');
46
+ * ```
29
47
  */
30
48
  delete(webhookID: string, options?: RequestOptions): APIPromise<WebhookDeleteResponse> {
31
49
  return this._client.delete(path`/v1/webhook/${webhookID}`, options);
@@ -33,6 +51,11 @@ export class Webhook extends APIResource {
33
51
 
34
52
  /**
35
53
  * Returns a specific webhook with its event subscriptions.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const response = await client.webhook.getByID('webhookId');
58
+ * ```
36
59
  */
37
60
  getByID(webhookID: string, options?: RequestOptions): APIPromise<WebhookGetByIDResponse> {
38
61
  return this._client.get(path`/v1/webhook/${webhookID}`, options);
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.34.0'; // x-release-please-version
1
+ export const VERSION = '3.1.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.34.0";
1
+ export declare const VERSION = "3.1.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.34.0";
1
+ export declare const VERSION = "3.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.34.0'; // x-release-please-version
4
+ exports.VERSION = '3.1.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.34.0'; // x-release-please-version
1
+ export const VERSION = '3.1.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}