@roarkanalytics/sdk 2.31.0 → 2.33.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 (245) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +17 -5
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +17 -5
  11. package/client.d.ts.map +1 -1
  12. package/client.js +35 -4
  13. package/client.js.map +1 -1
  14. package/client.mjs +35 -4
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/resource.d.mts.map +1 -1
  21. package/core/resource.d.ts.map +1 -1
  22. package/core/uploads.d.mts.map +1 -1
  23. package/core/uploads.d.ts.map +1 -1
  24. package/core/uploads.mjs.map +1 -1
  25. package/error.d.mts +1 -0
  26. package/error.d.mts.map +1 -1
  27. package/error.d.ts +1 -0
  28. package/error.d.ts.map +1 -1
  29. package/error.mjs +1 -0
  30. package/error.mjs.map +1 -1
  31. package/index.d.mts.map +1 -1
  32. package/index.d.ts.map +1 -1
  33. package/index.mjs.map +1 -1
  34. package/internal/detect-platform.mjs.map +1 -1
  35. package/internal/headers.mjs.map +1 -1
  36. package/internal/parse.d.mts.map +1 -1
  37. package/internal/parse.d.ts.map +1 -1
  38. package/internal/parse.mjs.map +1 -1
  39. package/internal/qs/formats.d.mts.map +1 -1
  40. package/internal/qs/formats.d.ts.map +1 -1
  41. package/internal/qs/index.d.mts +2 -2
  42. package/internal/qs/index.d.mts.map +1 -1
  43. package/internal/qs/index.d.ts +2 -2
  44. package/internal/qs/index.d.ts.map +1 -1
  45. package/internal/qs/index.mjs.map +1 -1
  46. package/internal/qs/stringify.d.mts.map +1 -1
  47. package/internal/qs/stringify.d.ts.map +1 -1
  48. package/internal/qs/stringify.mjs.map +1 -1
  49. package/internal/qs/utils.d.mts.map +1 -1
  50. package/internal/qs/utils.d.ts.map +1 -1
  51. package/internal/qs/utils.mjs.map +1 -1
  52. package/internal/request-options.d.mts.map +1 -1
  53. package/internal/request-options.d.ts.map +1 -1
  54. package/internal/shims.d.mts +6 -0
  55. package/internal/shims.d.mts.map +1 -1
  56. package/internal/shims.d.ts +6 -0
  57. package/internal/shims.d.ts.map +1 -1
  58. package/internal/to-file.d.mts.map +1 -1
  59. package/internal/to-file.d.ts.map +1 -1
  60. package/internal/to-file.mjs.map +1 -1
  61. package/internal/types.d.mts +10 -10
  62. package/internal/types.d.mts.map +1 -1
  63. package/internal/types.d.ts +10 -10
  64. package/internal/types.d.ts.map +1 -1
  65. package/internal/uploads.d.mts.map +1 -1
  66. package/internal/uploads.d.ts.map +1 -1
  67. package/internal/uploads.mjs.map +1 -1
  68. package/internal/utils/base64.mjs.map +1 -1
  69. package/internal/utils/log.d.mts.map +1 -1
  70. package/internal/utils/log.d.ts.map +1 -1
  71. package/internal/utils/log.js +2 -0
  72. package/internal/utils/log.js.map +1 -1
  73. package/internal/utils/log.mjs +2 -0
  74. package/internal/utils/log.mjs.map +1 -1
  75. package/internal/utils/path.mjs.map +1 -1
  76. package/internal/utils/query.mjs.map +1 -1
  77. package/internal/utils/values.mjs.map +1 -1
  78. package/internal/utils.d.mts.map +1 -1
  79. package/internal/utils.d.ts.map +1 -1
  80. package/internal/utils.mjs.map +1 -1
  81. package/package.json +1 -1
  82. package/resource.d.mts +1 -0
  83. package/resource.d.mts.map +1 -1
  84. package/resource.d.ts +1 -0
  85. package/resource.d.ts.map +1 -1
  86. package/resource.mjs +1 -0
  87. package/resource.mjs.map +1 -1
  88. package/resources/agent-endpoint.d.mts +4 -4
  89. package/resources/agent-endpoint.d.mts.map +1 -1
  90. package/resources/agent-endpoint.d.ts +4 -4
  91. package/resources/agent-endpoint.d.ts.map +1 -1
  92. package/resources/agent-endpoint.mjs.map +1 -1
  93. package/resources/agent.d.mts.map +1 -1
  94. package/resources/agent.d.ts.map +1 -1
  95. package/resources/agent.mjs.map +1 -1
  96. package/resources/call.d.mts +303 -155
  97. package/resources/call.d.mts.map +1 -1
  98. package/resources/call.d.ts +303 -155
  99. package/resources/call.d.ts.map +1 -1
  100. package/resources/call.js +6 -7
  101. package/resources/call.js.map +1 -1
  102. package/resources/call.mjs +6 -7
  103. package/resources/call.mjs.map +1 -1
  104. package/resources/config.d.mts +535 -0
  105. package/resources/config.d.mts.map +1 -0
  106. package/resources/config.d.ts +535 -0
  107. package/resources/config.d.ts.map +1 -0
  108. package/resources/config.js +28 -0
  109. package/resources/config.js.map +1 -0
  110. package/resources/config.mjs +24 -0
  111. package/resources/config.mjs.map +1 -0
  112. package/resources/customer-flow-edge-case.d.mts +1742 -0
  113. package/resources/customer-flow-edge-case.d.mts.map +1 -0
  114. package/resources/customer-flow-edge-case.d.ts +1742 -0
  115. package/resources/customer-flow-edge-case.d.ts.map +1 -0
  116. package/resources/customer-flow-edge-case.js +50 -0
  117. package/resources/customer-flow-edge-case.js.map +1 -0
  118. package/resources/customer-flow-edge-case.mjs +46 -0
  119. package/resources/customer-flow-edge-case.mjs.map +1 -0
  120. package/resources/customer-flow.d.mts +7163 -0
  121. package/resources/customer-flow.d.mts.map +1 -0
  122. package/resources/customer-flow.d.ts +7163 -0
  123. package/resources/customer-flow.d.ts.map +1 -0
  124. package/resources/customer-flow.js +87 -0
  125. package/resources/customer-flow.js.map +1 -0
  126. package/resources/customer-flow.mjs +83 -0
  127. package/resources/customer-flow.mjs.map +1 -0
  128. package/resources/health.d.mts.map +1 -1
  129. package/resources/health.d.ts.map +1 -1
  130. package/resources/health.mjs.map +1 -1
  131. package/resources/http-request-definition.d.mts.map +1 -1
  132. package/resources/http-request-definition.d.ts.map +1 -1
  133. package/resources/http-request-definition.mjs.map +1 -1
  134. package/resources/index.d.mts +6 -2
  135. package/resources/index.d.mts.map +1 -1
  136. package/resources/index.d.ts +6 -2
  137. package/resources/index.d.ts.map +1 -1
  138. package/resources/index.js +11 -3
  139. package/resources/index.js.map +1 -1
  140. package/resources/index.mjs +5 -1
  141. package/resources/index.mjs.map +1 -1
  142. package/resources/metric-collection-job.d.mts +5 -3
  143. package/resources/metric-collection-job.d.mts.map +1 -1
  144. package/resources/metric-collection-job.d.ts +5 -3
  145. package/resources/metric-collection-job.d.ts.map +1 -1
  146. package/resources/metric-collection-job.mjs.map +1 -1
  147. package/resources/metric-policy.d.mts.map +1 -1
  148. package/resources/metric-policy.d.ts.map +1 -1
  149. package/resources/metric-policy.mjs.map +1 -1
  150. package/resources/metric.d.mts +804 -109
  151. package/resources/metric.d.mts.map +1 -1
  152. package/resources/metric.d.ts +804 -109
  153. package/resources/metric.d.ts.map +1 -1
  154. package/resources/metric.js +6 -7
  155. package/resources/metric.js.map +1 -1
  156. package/resources/metric.mjs +6 -7
  157. package/resources/metric.mjs.map +1 -1
  158. package/resources/simulation-environment.d.mts +95 -0
  159. package/resources/simulation-environment.d.mts.map +1 -0
  160. package/resources/simulation-environment.d.ts +95 -0
  161. package/resources/simulation-environment.d.ts.map +1 -0
  162. package/resources/simulation-environment.js +24 -0
  163. package/resources/simulation-environment.js.map +1 -0
  164. package/resources/simulation-environment.mjs +20 -0
  165. package/resources/simulation-environment.mjs.map +1 -0
  166. package/resources/simulation-job.d.mts +58 -10
  167. package/resources/simulation-job.d.mts.map +1 -1
  168. package/resources/simulation-job.d.ts +58 -10
  169. package/resources/simulation-job.d.ts.map +1 -1
  170. package/resources/simulation-job.mjs.map +1 -1
  171. package/resources/simulation-persona.d.mts +60 -24
  172. package/resources/simulation-persona.d.mts.map +1 -1
  173. package/resources/simulation-persona.d.ts +60 -24
  174. package/resources/simulation-persona.d.ts.map +1 -1
  175. package/resources/simulation-persona.mjs.map +1 -1
  176. package/resources/simulation-run-plan-job.d.mts +73 -32
  177. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  178. package/resources/simulation-run-plan-job.d.ts +73 -32
  179. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  180. package/resources/simulation-run-plan-job.js +7 -8
  181. package/resources/simulation-run-plan-job.js.map +1 -1
  182. package/resources/simulation-run-plan-job.mjs +7 -8
  183. package/resources/simulation-run-plan-job.mjs.map +1 -1
  184. package/resources/simulation-run-plan.d.mts +408 -39
  185. package/resources/simulation-run-plan.d.mts.map +1 -1
  186. package/resources/simulation-run-plan.d.ts +408 -39
  187. package/resources/simulation-run-plan.d.ts.map +1 -1
  188. package/resources/simulation-run-plan.js +6 -11
  189. package/resources/simulation-run-plan.js.map +1 -1
  190. package/resources/simulation-run-plan.mjs +6 -11
  191. package/resources/simulation-run-plan.mjs.map +1 -1
  192. package/resources/simulation.d.mts +379 -0
  193. package/resources/simulation.d.mts.map +1 -0
  194. package/resources/simulation.d.ts +379 -0
  195. package/resources/simulation.d.ts.map +1 -0
  196. package/resources/simulation.js +33 -0
  197. package/resources/simulation.js.map +1 -0
  198. package/resources/simulation.mjs +29 -0
  199. package/resources/simulation.mjs.map +1 -0
  200. package/resources/webhook.d.mts +4 -4
  201. package/resources/webhook.d.mts.map +1 -1
  202. package/resources/webhook.d.ts +4 -4
  203. package/resources/webhook.d.ts.map +1 -1
  204. package/resources/webhook.mjs.map +1 -1
  205. package/resources.d.mts.map +1 -1
  206. package/resources.d.ts.map +1 -1
  207. package/resources.mjs.map +1 -1
  208. package/src/client.ts +124 -28
  209. package/src/internal/types.ts +6 -8
  210. package/src/internal/utils/log.ts +2 -0
  211. package/src/resources/agent-endpoint.ts +36 -4
  212. package/src/resources/call.ts +326 -169
  213. package/src/resources/config.ts +1162 -0
  214. package/src/resources/customer-flow-edge-case.ts +2884 -0
  215. package/src/resources/customer-flow.ts +11713 -0
  216. package/src/resources/index.ts +42 -12
  217. package/src/resources/metric-collection-job.ts +5 -3
  218. package/src/resources/metric.ts +1057 -115
  219. package/src/resources/simulation-environment.ts +147 -0
  220. package/src/resources/simulation-job.ts +122 -10
  221. package/src/resources/simulation-persona.ts +192 -24
  222. package/src/resources/simulation-run-plan-job.ts +109 -27
  223. package/src/resources/simulation-run-plan.ts +445 -40
  224. package/src/resources/simulation.ts +444 -0
  225. package/src/resources/webhook.ts +8 -0
  226. package/src/version.ts +1 -1
  227. package/uploads.d.mts +1 -0
  228. package/uploads.d.mts.map +1 -1
  229. package/uploads.d.ts +1 -0
  230. package/uploads.d.ts.map +1 -1
  231. package/uploads.mjs +1 -0
  232. package/uploads.mjs.map +1 -1
  233. package/version.d.mts +1 -1
  234. package/version.d.ts +1 -1
  235. package/version.js +1 -1
  236. package/version.mjs +1 -1
  237. package/resources/simulation-scenario.d.mts +0 -424
  238. package/resources/simulation-scenario.d.mts.map +0 -1
  239. package/resources/simulation-scenario.d.ts +0 -424
  240. package/resources/simulation-scenario.d.ts.map +0 -1
  241. package/resources/simulation-scenario.js +0 -40
  242. package/resources/simulation-scenario.js.map +0 -1
  243. package/resources/simulation-scenario.mjs +0 -36
  244. package/resources/simulation-scenario.mjs.map +0 -1
  245. package/src/resources/simulation-scenario.ts +0 -602
@@ -1,602 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { RequestOptions } from '../internal/request-options';
6
- import { path } from '../internal/utils/path';
7
-
8
- export class SimulationScenario extends APIResource {
9
- /**
10
- * Creates a new simulation scenario for the authenticated project.
11
- */
12
- create(
13
- body: SimulationScenarioCreateParams,
14
- options?: RequestOptions,
15
- ): APIPromise<SimulationScenarioCreateResponse> {
16
- return this._client.post('/v1/simulation/scenario', { body, ...options });
17
- }
18
-
19
- /**
20
- * Updates an existing simulation scenario by its ID.
21
- */
22
- update(
23
- scenarioID: string,
24
- body: SimulationScenarioUpdateParams,
25
- options?: RequestOptions,
26
- ): APIPromise<SimulationScenarioUpdateResponse> {
27
- return this._client.put(path`/v1/simulation/scenario/${scenarioID}`, { body, ...options });
28
- }
29
-
30
- /**
31
- * Returns a paginated list of simulation scenarios for the authenticated project.
32
- */
33
- list(
34
- query: SimulationScenarioListParams | null | undefined = {},
35
- options?: RequestOptions,
36
- ): APIPromise<SimulationScenarioListResponse> {
37
- return this._client.get('/v1/simulation/scenario', { query, ...options });
38
- }
39
-
40
- /**
41
- * Deletes a simulation scenario by its ID.
42
- */
43
- delete(scenarioID: string, options?: RequestOptions): APIPromise<SimulationScenarioDeleteResponse> {
44
- return this._client.delete(path`/v1/simulation/scenario/${scenarioID}`, options);
45
- }
46
-
47
- /**
48
- * Returns a specific simulation scenario by its ID.
49
- */
50
- getByID(scenarioID: string, options?: RequestOptions): APIPromise<SimulationScenarioGetByIDResponse> {
51
- return this._client.get(path`/v1/simulation/scenario/${scenarioID}`, options);
52
- }
53
- }
54
-
55
- export interface SimulationScenarioCreateResponse {
56
- data: SimulationScenarioCreateResponse.Data;
57
- }
58
-
59
- export namespace SimulationScenarioCreateResponse {
60
- export interface Data {
61
- /**
62
- * Unique identifier of the scenario
63
- */
64
- id: string;
65
-
66
- /**
67
- * Creation timestamp in ISO 8601 format
68
- */
69
- createdAt: string;
70
-
71
- /**
72
- * Description of the scenario
73
- */
74
- description: string | null;
75
-
76
- /**
77
- * Name of the scenario (from the start node content)
78
- */
79
- name: string | null;
80
-
81
- /**
82
- * Ordered list of steps in the scenario (excludes the START node)
83
- */
84
- steps: Array<Data.Step>;
85
-
86
- /**
87
- * Last update timestamp in ISO 8601 format
88
- */
89
- updatedAt: string;
90
- }
91
-
92
- export namespace Data {
93
- export interface Step {
94
- /**
95
- * Content/text of the step
96
- */
97
- content: string | null;
98
-
99
- /**
100
- * Unique identifier of the step node (use this for update/delete operations)
101
- */
102
- nodeId: string;
103
-
104
- /**
105
- * Type of step in the scenario
106
- */
107
- type:
108
- | 'START'
109
- | 'AGENT_TURN'
110
- | 'CUSTOMER_TURN'
111
- | 'CUSTOMER_FIRST_MESSAGE'
112
- | 'CUSTOMER_SILENCE'
113
- | 'CUSTOMER_DTMF'
114
- | 'VOICEMAIL'
115
- | 'SCENARIO_LINK';
116
-
117
- /**
118
- * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
119
- * #, w/W for pauses.
120
- */
121
- dtmfDigits?: string | null;
122
-
123
- /**
124
- * ID of the linked scenario (only for SCENARIO_LINK type steps)
125
- */
126
- linkedScenarioId?: string | null;
127
-
128
- /**
129
- * Duration of silence in seconds (only for CUSTOMER_SILENCE type steps)
130
- */
131
- silenceDurationSeconds?: number | null;
132
- }
133
- }
134
- }
135
-
136
- export interface SimulationScenarioUpdateResponse {
137
- data: SimulationScenarioUpdateResponse.Data;
138
- }
139
-
140
- export namespace SimulationScenarioUpdateResponse {
141
- export interface Data {
142
- /**
143
- * Unique identifier of the scenario
144
- */
145
- id: string;
146
-
147
- /**
148
- * Creation timestamp in ISO 8601 format
149
- */
150
- createdAt: string;
151
-
152
- /**
153
- * Description of the scenario
154
- */
155
- description: string | null;
156
-
157
- /**
158
- * Name of the scenario (from the start node content)
159
- */
160
- name: string | null;
161
-
162
- /**
163
- * Ordered list of steps in the scenario (excludes the START node)
164
- */
165
- steps: Array<Data.Step>;
166
-
167
- /**
168
- * Last update timestamp in ISO 8601 format
169
- */
170
- updatedAt: string;
171
- }
172
-
173
- export namespace Data {
174
- export interface Step {
175
- /**
176
- * Content/text of the step
177
- */
178
- content: string | null;
179
-
180
- /**
181
- * Unique identifier of the step node (use this for update/delete operations)
182
- */
183
- nodeId: string;
184
-
185
- /**
186
- * Type of step in the scenario
187
- */
188
- type:
189
- | 'START'
190
- | 'AGENT_TURN'
191
- | 'CUSTOMER_TURN'
192
- | 'CUSTOMER_FIRST_MESSAGE'
193
- | 'CUSTOMER_SILENCE'
194
- | 'CUSTOMER_DTMF'
195
- | 'VOICEMAIL'
196
- | 'SCENARIO_LINK';
197
-
198
- /**
199
- * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
200
- * #, w/W for pauses.
201
- */
202
- dtmfDigits?: string | null;
203
-
204
- /**
205
- * ID of the linked scenario (only for SCENARIO_LINK type steps)
206
- */
207
- linkedScenarioId?: string | null;
208
-
209
- /**
210
- * Duration of silence in seconds (only for CUSTOMER_SILENCE type steps)
211
- */
212
- silenceDurationSeconds?: number | null;
213
- }
214
- }
215
- }
216
-
217
- export interface SimulationScenarioListResponse {
218
- data: Array<SimulationScenarioListResponse.Data>;
219
-
220
- pagination: SimulationScenarioListResponse.Pagination;
221
- }
222
-
223
- export namespace SimulationScenarioListResponse {
224
- export interface Data {
225
- /**
226
- * Unique identifier of the scenario
227
- */
228
- id: string;
229
-
230
- /**
231
- * Creation timestamp in ISO 8601 format
232
- */
233
- createdAt: string;
234
-
235
- /**
236
- * Description of the scenario
237
- */
238
- description: string | null;
239
-
240
- /**
241
- * Name of the scenario (from the start node content)
242
- */
243
- name: string | null;
244
-
245
- /**
246
- * Ordered list of steps in the scenario (excludes the START node)
247
- */
248
- steps: Array<Data.Step>;
249
-
250
- /**
251
- * Last update timestamp in ISO 8601 format
252
- */
253
- updatedAt: string;
254
- }
255
-
256
- export namespace Data {
257
- export interface Step {
258
- /**
259
- * Content/text of the step
260
- */
261
- content: string | null;
262
-
263
- /**
264
- * Unique identifier of the step node (use this for update/delete operations)
265
- */
266
- nodeId: string;
267
-
268
- /**
269
- * Type of step in the scenario
270
- */
271
- type:
272
- | 'START'
273
- | 'AGENT_TURN'
274
- | 'CUSTOMER_TURN'
275
- | 'CUSTOMER_FIRST_MESSAGE'
276
- | 'CUSTOMER_SILENCE'
277
- | 'CUSTOMER_DTMF'
278
- | 'VOICEMAIL'
279
- | 'SCENARIO_LINK';
280
-
281
- /**
282
- * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
283
- * #, w/W for pauses.
284
- */
285
- dtmfDigits?: string | null;
286
-
287
- /**
288
- * ID of the linked scenario (only for SCENARIO_LINK type steps)
289
- */
290
- linkedScenarioId?: string | null;
291
-
292
- /**
293
- * Duration of silence in seconds (only for CUSTOMER_SILENCE type steps)
294
- */
295
- silenceDurationSeconds?: number | null;
296
- }
297
- }
298
-
299
- export interface Pagination {
300
- /**
301
- * Whether there are more items to fetch
302
- */
303
- hasMore: boolean;
304
-
305
- /**
306
- * Cursor for the next page of items
307
- */
308
- nextCursor: string | null;
309
-
310
- /**
311
- * Total number of items
312
- */
313
- total: number;
314
- }
315
- }
316
-
317
- export interface SimulationScenarioDeleteResponse {
318
- data: SimulationScenarioDeleteResponse.Data;
319
- }
320
-
321
- export namespace SimulationScenarioDeleteResponse {
322
- export interface Data {
323
- /**
324
- * Whether the scenario was deleted
325
- */
326
- deleted: boolean;
327
- }
328
- }
329
-
330
- export interface SimulationScenarioGetByIDResponse {
331
- data: SimulationScenarioGetByIDResponse.Data;
332
- }
333
-
334
- export namespace SimulationScenarioGetByIDResponse {
335
- export interface Data {
336
- /**
337
- * Unique identifier of the scenario
338
- */
339
- id: string;
340
-
341
- /**
342
- * Creation timestamp in ISO 8601 format
343
- */
344
- createdAt: string;
345
-
346
- /**
347
- * Description of the scenario
348
- */
349
- description: string | null;
350
-
351
- /**
352
- * Name of the scenario (from the start node content)
353
- */
354
- name: string | null;
355
-
356
- /**
357
- * Ordered list of steps in the scenario (excludes the START node)
358
- */
359
- steps: Array<Data.Step>;
360
-
361
- /**
362
- * Last update timestamp in ISO 8601 format
363
- */
364
- updatedAt: string;
365
- }
366
-
367
- export namespace Data {
368
- export interface Step {
369
- /**
370
- * Content/text of the step
371
- */
372
- content: string | null;
373
-
374
- /**
375
- * Unique identifier of the step node (use this for update/delete operations)
376
- */
377
- nodeId: string;
378
-
379
- /**
380
- * Type of step in the scenario
381
- */
382
- type:
383
- | 'START'
384
- | 'AGENT_TURN'
385
- | 'CUSTOMER_TURN'
386
- | 'CUSTOMER_FIRST_MESSAGE'
387
- | 'CUSTOMER_SILENCE'
388
- | 'CUSTOMER_DTMF'
389
- | 'VOICEMAIL'
390
- | 'SCENARIO_LINK';
391
-
392
- /**
393
- * DTMF digits to send during this step (e.g. 1w2w3#). Valid characters: 0-9, \*,
394
- * #, w/W for pauses.
395
- */
396
- dtmfDigits?: string | null;
397
-
398
- /**
399
- * ID of the linked scenario (only for SCENARIO_LINK type steps)
400
- */
401
- linkedScenarioId?: string | null;
402
-
403
- /**
404
- * Duration of silence in seconds (only for CUSTOMER_SILENCE type steps)
405
- */
406
- silenceDurationSeconds?: number | null;
407
- }
408
- }
409
- }
410
-
411
- export interface SimulationScenarioCreateParams {
412
- /**
413
- * Name of the scenario (used as the START node content)
414
- */
415
- name: string;
416
-
417
- /**
418
- * Ordered list of steps for the scenario (at least one step is required)
419
- */
420
- steps: Array<SimulationScenarioCreateParams.Step>;
421
- }
422
-
423
- export namespace SimulationScenarioCreateParams {
424
- /**
425
- * A step to include when creating a scenario
426
- */
427
- export interface Step {
428
- /**
429
- * The content/text of the step
430
- */
431
- content: string;
432
-
433
- /**
434
- * The type of this step
435
- */
436
- type:
437
- | 'AGENT_TURN'
438
- | 'CUSTOMER_TURN'
439
- | 'CUSTOMER_FIRST_MESSAGE'
440
- | 'CUSTOMER_SILENCE'
441
- | 'CUSTOMER_DTMF'
442
- | 'VOICEMAIL'
443
- | 'SCENARIO_LINK';
444
-
445
- /**
446
- * DTMF digits to send (for CUSTOMER_DTMF type steps, e.g. 1w2w3#). Valid
447
- * characters: 0-9, \*, #, w/W for pauses.
448
- */
449
- dtmfDigits?: string;
450
-
451
- /**
452
- * ID of the scenario to link to (required for SCENARIO_LINK type steps)
453
- */
454
- linkedScenarioId?: string;
455
-
456
- /**
457
- * Duration of silence in seconds (for CUSTOMER_SILENCE type steps)
458
- */
459
- silenceDurationSeconds?: number;
460
- }
461
- }
462
-
463
- export interface SimulationScenarioUpdateParams {
464
- /**
465
- * List of step changes to apply to the scenario
466
- */
467
- stepChanges: Array<
468
- | SimulationScenarioUpdateParams.CreateStepChange
469
- | SimulationScenarioUpdateParams.UpdateStepChange
470
- | SimulationScenarioUpdateParams.DeleteStepChange
471
- >;
472
-
473
- /**
474
- * New name for the scenario (updates the START node content)
475
- */
476
- name?: string;
477
- }
478
-
479
- export namespace SimulationScenarioUpdateParams {
480
- /**
481
- * Create a new step in the scenario
482
- */
483
- export interface CreateStepChange {
484
- /**
485
- * Create a new step
486
- */
487
- action: 'create';
488
-
489
- /**
490
- * The content/text of the new step
491
- */
492
- content: string;
493
-
494
- /**
495
- * The type of the new step
496
- */
497
- type:
498
- | 'AGENT_TURN'
499
- | 'CUSTOMER_TURN'
500
- | 'CUSTOMER_FIRST_MESSAGE'
501
- | 'CUSTOMER_SILENCE'
502
- | 'CUSTOMER_DTMF'
503
- | 'VOICEMAIL'
504
- | 'SCENARIO_LINK';
505
-
506
- /**
507
- * DTMF digits to send (for CUSTOMER_DTMF type steps)
508
- */
509
- dtmfDigits?: string;
510
-
511
- /**
512
- * ID of the scenario to link to (for SCENARIO_LINK type steps)
513
- */
514
- linkedScenarioId?: string;
515
-
516
- /**
517
- * Duration of silence in seconds (for CUSTOMER_SILENCE type steps)
518
- */
519
- silenceDurationSeconds?: number;
520
- }
521
-
522
- /**
523
- * Update an existing step in the scenario
524
- */
525
- export interface UpdateStepChange {
526
- /**
527
- * Update an existing step
528
- */
529
- action: 'update';
530
-
531
- /**
532
- * The ID of the step node to update
533
- */
534
- nodeId: string;
535
-
536
- /**
537
- * The new content/text of the step (optional)
538
- */
539
- content?: string;
540
-
541
- /**
542
- * DTMF digits to send (for CUSTOMER_DTMF type steps)
543
- */
544
- dtmfDigits?: string;
545
-
546
- /**
547
- * ID of the scenario to link to (for SCENARIO_LINK type steps)
548
- */
549
- linkedScenarioId?: string;
550
-
551
- /**
552
- * Duration of silence in seconds (for CUSTOMER_SILENCE type steps)
553
- */
554
- silenceDurationSeconds?: number;
555
-
556
- /**
557
- * The new type of the step (optional)
558
- */
559
- type?:
560
- | 'AGENT_TURN'
561
- | 'CUSTOMER_TURN'
562
- | 'CUSTOMER_FIRST_MESSAGE'
563
- | 'CUSTOMER_SILENCE'
564
- | 'CUSTOMER_DTMF'
565
- | 'VOICEMAIL'
566
- | 'SCENARIO_LINK';
567
- }
568
-
569
- /**
570
- * Delete a step from the scenario
571
- */
572
- export interface DeleteStepChange {
573
- /**
574
- * Delete an existing step
575
- */
576
- action: 'delete';
577
-
578
- /**
579
- * The ID of the step node to delete
580
- */
581
- nodeId: string;
582
- }
583
- }
584
-
585
- export interface SimulationScenarioListParams {
586
- after?: string;
587
-
588
- limit?: number;
589
- }
590
-
591
- export declare namespace SimulationScenario {
592
- export {
593
- type SimulationScenarioCreateResponse as SimulationScenarioCreateResponse,
594
- type SimulationScenarioUpdateResponse as SimulationScenarioUpdateResponse,
595
- type SimulationScenarioListResponse as SimulationScenarioListResponse,
596
- type SimulationScenarioDeleteResponse as SimulationScenarioDeleteResponse,
597
- type SimulationScenarioGetByIDResponse as SimulationScenarioGetByIDResponse,
598
- type SimulationScenarioCreateParams as SimulationScenarioCreateParams,
599
- type SimulationScenarioUpdateParams as SimulationScenarioUpdateParams,
600
- type SimulationScenarioListParams as SimulationScenarioListParams,
601
- };
602
- }