@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
@@ -0,0 +1,1162 @@
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
+
7
+ export class Config extends APIResource {
8
+ /**
9
+ * Reconcile a config-as-code bundle into the project. Submit the full desired set
10
+ * of resources; resources already managed by config are updated, new ones created,
11
+ * and (unless prune is false) config-managed resources absent from the bundle are
12
+ * deleted. Identity is by name — no ids in the bundle.
13
+ */
14
+ apply(body: ConfigApplyParams, options?: RequestOptions): APIPromise<ConfigApplyResponse> {
15
+ return this._client.post('/v1/config/apply', { body, ...options });
16
+ }
17
+
18
+ /**
19
+ * Dry run: returns the changes reconcile a config-as-code bundle into the project.
20
+ * Submit the full desired set of resources; resources already managed by config
21
+ * are updated, new ones created, and (unless prune is false) config-managed
22
+ * resources absent from the bundle are deleted. Identity is by name — no ids in
23
+ * the bundle. No writes are performed.
24
+ */
25
+ diff(body: ConfigDiffParams, options?: RequestOptions): APIPromise<ConfigDiffResponse> {
26
+ return this._client.post('/v1/config/diff', { body, ...options });
27
+ }
28
+ }
29
+
30
+ export interface Bundle {
31
+ resources: Array<
32
+ | Bundle.UnionMember0
33
+ | Bundle.UnionMember1
34
+ | Bundle.UnionMember2
35
+ | Bundle.UnionMember3
36
+ | Bundle.UnionMember4
37
+ | Bundle.UnionMember5
38
+ >;
39
+
40
+ prune?: boolean;
41
+ }
42
+
43
+ export namespace Bundle {
44
+ export interface UnionMember0 {
45
+ kind: 'agent';
46
+
47
+ name: string;
48
+
49
+ customId?: string | null;
50
+
51
+ description?: string | null;
52
+
53
+ endpoints?: Array<UnionMember0.Endpoint>;
54
+ }
55
+
56
+ export namespace UnionMember0 {
57
+ export interface Endpoint {
58
+ direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
59
+
60
+ name: string;
61
+
62
+ value: string;
63
+
64
+ environment?: string;
65
+ }
66
+ }
67
+
68
+ export interface UnionMember1 {
69
+ accent:
70
+ | 'US'
71
+ | 'US_X_SOUTH'
72
+ | 'GB'
73
+ | 'ES'
74
+ | 'DE'
75
+ | 'IN'
76
+ | 'FR'
77
+ | 'NL'
78
+ | 'SA'
79
+ | 'GR'
80
+ | 'AU'
81
+ | 'IT'
82
+ | 'ID'
83
+ | 'TH'
84
+ | 'JP'
85
+ | 'NZ'
86
+ | 'PH'
87
+ | 'SG'
88
+ | 'MY'
89
+ | 'HK'
90
+ | 'TR'
91
+ | 'PT'
92
+ | 'IL';
93
+
94
+ gender: 'MALE' | 'FEMALE';
95
+
96
+ kind: 'persona';
97
+
98
+ language:
99
+ | 'EN'
100
+ | 'ES'
101
+ | 'DE'
102
+ | 'HI'
103
+ | 'FR'
104
+ | 'NL'
105
+ | 'AR'
106
+ | 'EL'
107
+ | 'IT'
108
+ | 'ID'
109
+ | 'TH'
110
+ | 'JA'
111
+ | 'TL'
112
+ | 'MS'
113
+ | 'ZH'
114
+ | 'TR'
115
+ | 'PT'
116
+ | 'HE';
117
+
118
+ name: string;
119
+
120
+ backgroundNoise?:
121
+ | 'NONE'
122
+ | 'AIRPORT'
123
+ | 'CHILDREN_PLAYING'
124
+ | 'CITY'
125
+ | 'COFFEE_SHOP'
126
+ | 'DRIVING'
127
+ | 'OFFICE'
128
+ | 'THUNDERSTORM';
129
+
130
+ backstoryPrompt?: string | null;
131
+
132
+ baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
133
+
134
+ confirmationStyle?: 'EXPLICIT' | 'VAGUE';
135
+
136
+ description?: string | null;
137
+
138
+ displayName?: string;
139
+
140
+ hasDisfluencies?: boolean;
141
+
142
+ idleMessageMaxSpokenCount?: number;
143
+
144
+ idleMessageResetCountOnUserSpeechEnabled?: boolean;
145
+
146
+ idleMessages?: Array<string> | null;
147
+
148
+ idleTimeoutSeconds?: number;
149
+
150
+ intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
151
+
152
+ memoryReliability?: 'HIGH' | 'LOW';
153
+
154
+ properties?: { [key: string]: unknown };
155
+
156
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';
157
+
158
+ secondaryLanguage?: 'EN' | null;
159
+
160
+ speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
161
+
162
+ speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
163
+
164
+ understoodLanguages?: Array<
165
+ | 'EN'
166
+ | 'ES'
167
+ | 'DE'
168
+ | 'HI'
169
+ | 'FR'
170
+ | 'NL'
171
+ | 'AR'
172
+ | 'EL'
173
+ | 'IT'
174
+ | 'ID'
175
+ | 'TH'
176
+ | 'JA'
177
+ | 'TL'
178
+ | 'MS'
179
+ | 'ZH'
180
+ | 'TR'
181
+ | 'PT'
182
+ | 'HE'
183
+ >;
184
+ }
185
+
186
+ export interface UnionMember2 {
187
+ agents: Array<string>;
188
+
189
+ happyPath: UnionMember2.HappyPath;
190
+
191
+ kind: 'flow';
192
+
193
+ name: string;
194
+
195
+ type: 'improv';
196
+
197
+ description?: string | null;
198
+
199
+ edgeCases?: Array<UnionMember2.EdgeCase>;
200
+
201
+ expectations?: Array<string>;
202
+
203
+ title?: string;
204
+ }
205
+
206
+ export namespace UnionMember2 {
207
+ export interface HappyPath {
208
+ environment: string;
209
+
210
+ persona: string;
211
+
212
+ expectations?: Array<string>;
213
+
214
+ prompt?: string;
215
+
216
+ title?: string;
217
+ }
218
+
219
+ export interface EdgeCase {
220
+ name: string;
221
+
222
+ environment?: string;
223
+
224
+ expectations?: Array<string>;
225
+
226
+ persona?: string;
227
+
228
+ prompt?: string;
229
+
230
+ title?: string;
231
+ }
232
+ }
233
+
234
+ export interface UnionMember3 {
235
+ graph: Array<UnionMember3.Graph>;
236
+
237
+ kind: 'flow';
238
+
239
+ name: string;
240
+
241
+ type: 'scripted';
242
+
243
+ agents?: Array<string>;
244
+
245
+ branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
246
+
247
+ description?: string | null;
248
+
249
+ expectations?: Array<string>;
250
+
251
+ title?: string;
252
+ }
253
+
254
+ export namespace UnionMember3 {
255
+ export interface Graph {
256
+ type:
257
+ | 'AGENT_TURN'
258
+ | 'CUSTOMER_TURN'
259
+ | 'CUSTOMER_FIRST_MESSAGE'
260
+ | 'CUSTOMER_SILENCE'
261
+ | 'CUSTOMER_DTMF'
262
+ | 'VOICEMAIL'
263
+ | 'SCENARIO_LINK';
264
+
265
+ content?: string;
266
+
267
+ dtmfDigits?: string;
268
+
269
+ flow?: string;
270
+
271
+ mergeInto?: Array<string>;
272
+
273
+ ref?: string;
274
+
275
+ silenceDurationSeconds?: number;
276
+
277
+ steps?: Array<unknown>;
278
+ }
279
+ }
280
+
281
+ export interface UnionMember4 {
282
+ kind: 'collector';
283
+
284
+ metrics: Array<string>;
285
+
286
+ modality: 'call' | 'chat';
287
+
288
+ name: string;
289
+
290
+ filters?: Array<UnionMember4.Filter>;
291
+
292
+ status?: 'ACTIVE' | 'INACTIVE';
293
+ }
294
+
295
+ export namespace UnionMember4 {
296
+ export interface Filter {
297
+ conditions: Array<Filter.Condition>;
298
+ }
299
+
300
+ export namespace Filter {
301
+ export interface Condition {
302
+ key: string;
303
+
304
+ type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
305
+
306
+ operator?:
307
+ | 'EQUALS'
308
+ | 'NOT_EQUALS'
309
+ | 'CONTAINS'
310
+ | 'STARTS_WITH'
311
+ | 'GREATER_THAN'
312
+ | 'LESS_THAN'
313
+ | 'GREATER_THAN_OR_EQUALS'
314
+ | 'LESS_THAN_OR_EQUALS';
315
+
316
+ value?: string;
317
+ }
318
+ }
319
+ }
320
+
321
+ export interface UnionMember5 {
322
+ kind: 'metric';
323
+
324
+ name: string;
325
+
326
+ prompt: string;
327
+
328
+ type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
329
+
330
+ contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
331
+
332
+ displayName?: string;
333
+
334
+ falseLabel?: string;
335
+
336
+ maxSelections?: number;
337
+
338
+ options?: Array<UnionMember5.Option>;
339
+
340
+ participantRole?: 'AGENT' | 'CUSTOMER';
341
+
342
+ scaleLabels?: Array<UnionMember5.ScaleLabel>;
343
+
344
+ scaleMax?: number;
345
+
346
+ scaleMin?: number;
347
+
348
+ scope?: 'GLOBAL' | 'PER_PARTICIPANT';
349
+
350
+ trueLabel?: string;
351
+ }
352
+
353
+ export namespace UnionMember5 {
354
+ export interface Option {
355
+ displayOrder: number;
356
+
357
+ label: string;
358
+
359
+ description?: string;
360
+ }
361
+
362
+ export interface ScaleLabel {
363
+ displayOrder: number;
364
+
365
+ label: string;
366
+
367
+ rangeMax: number;
368
+
369
+ rangeMin: number;
370
+
371
+ colorHex?: string;
372
+
373
+ description?: string;
374
+ }
375
+ }
376
+ }
377
+
378
+ export interface ConfigApplyResponse {
379
+ data: ConfigApplyResponse.Data;
380
+ }
381
+
382
+ export namespace ConfigApplyResponse {
383
+ export interface Data {
384
+ changes: Array<Data.Change>;
385
+
386
+ summary: Data.Summary;
387
+ }
388
+
389
+ export namespace Data {
390
+ export interface Change {
391
+ configKey: string;
392
+
393
+ kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric';
394
+
395
+ name: string;
396
+
397
+ op: 'create' | 'update' | 'delete' | 'noop';
398
+
399
+ status: 'applied' | 'skipped' | 'failed';
400
+
401
+ id?: string;
402
+
403
+ detail?: string;
404
+
405
+ error?: string;
406
+ }
407
+
408
+ export interface Summary {
409
+ create: number;
410
+
411
+ delete: number;
412
+
413
+ failed: number;
414
+
415
+ noop: number;
416
+
417
+ update: number;
418
+ }
419
+ }
420
+ }
421
+
422
+ export interface ConfigDiffResponse {
423
+ data: ConfigDiffResponse.Data;
424
+ }
425
+
426
+ export namespace ConfigDiffResponse {
427
+ export interface Data {
428
+ changes: Array<Data.Change>;
429
+
430
+ summary: Data.Summary;
431
+ }
432
+
433
+ export namespace Data {
434
+ export interface Change {
435
+ configKey: string;
436
+
437
+ kind: 'agent' | 'persona' | 'flow' | 'collector' | 'metric';
438
+
439
+ name: string;
440
+
441
+ op: 'create' | 'update' | 'delete' | 'noop';
442
+
443
+ detail?: string;
444
+ }
445
+
446
+ export interface Summary {
447
+ create: number;
448
+
449
+ delete: number;
450
+
451
+ noop: number;
452
+
453
+ update: number;
454
+ }
455
+ }
456
+ }
457
+
458
+ export interface ConfigApplyParams {
459
+ resources: Array<
460
+ | ConfigApplyParams.UnionMember0
461
+ | ConfigApplyParams.UnionMember1
462
+ | ConfigApplyParams.UnionMember2
463
+ | ConfigApplyParams.UnionMember3
464
+ | ConfigApplyParams.UnionMember4
465
+ | ConfigApplyParams.UnionMember5
466
+ >;
467
+
468
+ prune?: boolean;
469
+ }
470
+
471
+ export namespace ConfigApplyParams {
472
+ export interface UnionMember0 {
473
+ kind: 'agent';
474
+
475
+ name: string;
476
+
477
+ customId?: string | null;
478
+
479
+ description?: string | null;
480
+
481
+ endpoints?: Array<UnionMember0.Endpoint>;
482
+ }
483
+
484
+ export namespace UnionMember0 {
485
+ export interface Endpoint {
486
+ direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
487
+
488
+ name: string;
489
+
490
+ value: string;
491
+
492
+ environment?: string;
493
+ }
494
+ }
495
+
496
+ export interface UnionMember1 {
497
+ accent:
498
+ | 'US'
499
+ | 'US_X_SOUTH'
500
+ | 'GB'
501
+ | 'ES'
502
+ | 'DE'
503
+ | 'IN'
504
+ | 'FR'
505
+ | 'NL'
506
+ | 'SA'
507
+ | 'GR'
508
+ | 'AU'
509
+ | 'IT'
510
+ | 'ID'
511
+ | 'TH'
512
+ | 'JP'
513
+ | 'NZ'
514
+ | 'PH'
515
+ | 'SG'
516
+ | 'MY'
517
+ | 'HK'
518
+ | 'TR'
519
+ | 'PT'
520
+ | 'IL';
521
+
522
+ gender: 'MALE' | 'FEMALE';
523
+
524
+ kind: 'persona';
525
+
526
+ language:
527
+ | 'EN'
528
+ | 'ES'
529
+ | 'DE'
530
+ | 'HI'
531
+ | 'FR'
532
+ | 'NL'
533
+ | 'AR'
534
+ | 'EL'
535
+ | 'IT'
536
+ | 'ID'
537
+ | 'TH'
538
+ | 'JA'
539
+ | 'TL'
540
+ | 'MS'
541
+ | 'ZH'
542
+ | 'TR'
543
+ | 'PT'
544
+ | 'HE';
545
+
546
+ name: string;
547
+
548
+ backgroundNoise?:
549
+ | 'NONE'
550
+ | 'AIRPORT'
551
+ | 'CHILDREN_PLAYING'
552
+ | 'CITY'
553
+ | 'COFFEE_SHOP'
554
+ | 'DRIVING'
555
+ | 'OFFICE'
556
+ | 'THUNDERSTORM';
557
+
558
+ backstoryPrompt?: string | null;
559
+
560
+ baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
561
+
562
+ confirmationStyle?: 'EXPLICIT' | 'VAGUE';
563
+
564
+ description?: string | null;
565
+
566
+ displayName?: string;
567
+
568
+ hasDisfluencies?: boolean;
569
+
570
+ idleMessageMaxSpokenCount?: number;
571
+
572
+ idleMessageResetCountOnUserSpeechEnabled?: boolean;
573
+
574
+ idleMessages?: Array<string> | null;
575
+
576
+ idleTimeoutSeconds?: number;
577
+
578
+ intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
579
+
580
+ memoryReliability?: 'HIGH' | 'LOW';
581
+
582
+ properties?: { [key: string]: unknown };
583
+
584
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';
585
+
586
+ secondaryLanguage?: 'EN' | null;
587
+
588
+ speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
589
+
590
+ speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
591
+
592
+ understoodLanguages?: Array<
593
+ | 'EN'
594
+ | 'ES'
595
+ | 'DE'
596
+ | 'HI'
597
+ | 'FR'
598
+ | 'NL'
599
+ | 'AR'
600
+ | 'EL'
601
+ | 'IT'
602
+ | 'ID'
603
+ | 'TH'
604
+ | 'JA'
605
+ | 'TL'
606
+ | 'MS'
607
+ | 'ZH'
608
+ | 'TR'
609
+ | 'PT'
610
+ | 'HE'
611
+ >;
612
+ }
613
+
614
+ export interface UnionMember2 {
615
+ agents: Array<string>;
616
+
617
+ happyPath: UnionMember2.HappyPath;
618
+
619
+ kind: 'flow';
620
+
621
+ name: string;
622
+
623
+ type: 'improv';
624
+
625
+ description?: string | null;
626
+
627
+ edgeCases?: Array<UnionMember2.EdgeCase>;
628
+
629
+ expectations?: Array<string>;
630
+
631
+ title?: string;
632
+ }
633
+
634
+ export namespace UnionMember2 {
635
+ export interface HappyPath {
636
+ environment: string;
637
+
638
+ persona: string;
639
+
640
+ expectations?: Array<string>;
641
+
642
+ prompt?: string;
643
+
644
+ title?: string;
645
+ }
646
+
647
+ export interface EdgeCase {
648
+ name: string;
649
+
650
+ environment?: string;
651
+
652
+ expectations?: Array<string>;
653
+
654
+ persona?: string;
655
+
656
+ prompt?: string;
657
+
658
+ title?: string;
659
+ }
660
+ }
661
+
662
+ export interface UnionMember3 {
663
+ graph: Array<UnionMember3.Graph>;
664
+
665
+ kind: 'flow';
666
+
667
+ name: string;
668
+
669
+ type: 'scripted';
670
+
671
+ agents?: Array<string>;
672
+
673
+ branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
674
+
675
+ description?: string | null;
676
+
677
+ expectations?: Array<string>;
678
+
679
+ title?: string;
680
+ }
681
+
682
+ export namespace UnionMember3 {
683
+ export interface Graph {
684
+ type:
685
+ | 'AGENT_TURN'
686
+ | 'CUSTOMER_TURN'
687
+ | 'CUSTOMER_FIRST_MESSAGE'
688
+ | 'CUSTOMER_SILENCE'
689
+ | 'CUSTOMER_DTMF'
690
+ | 'VOICEMAIL'
691
+ | 'SCENARIO_LINK';
692
+
693
+ content?: string;
694
+
695
+ dtmfDigits?: string;
696
+
697
+ flow?: string;
698
+
699
+ mergeInto?: Array<string>;
700
+
701
+ ref?: string;
702
+
703
+ silenceDurationSeconds?: number;
704
+
705
+ steps?: Array<unknown>;
706
+ }
707
+ }
708
+
709
+ export interface UnionMember4 {
710
+ kind: 'collector';
711
+
712
+ metrics: Array<string>;
713
+
714
+ modality: 'call' | 'chat';
715
+
716
+ name: string;
717
+
718
+ filters?: Array<UnionMember4.Filter>;
719
+
720
+ status?: 'ACTIVE' | 'INACTIVE';
721
+ }
722
+
723
+ export namespace UnionMember4 {
724
+ export interface Filter {
725
+ conditions: Array<Filter.Condition>;
726
+ }
727
+
728
+ export namespace Filter {
729
+ export interface Condition {
730
+ key: string;
731
+
732
+ type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
733
+
734
+ operator?:
735
+ | 'EQUALS'
736
+ | 'NOT_EQUALS'
737
+ | 'CONTAINS'
738
+ | 'STARTS_WITH'
739
+ | 'GREATER_THAN'
740
+ | 'LESS_THAN'
741
+ | 'GREATER_THAN_OR_EQUALS'
742
+ | 'LESS_THAN_OR_EQUALS';
743
+
744
+ value?: string;
745
+ }
746
+ }
747
+ }
748
+
749
+ export interface UnionMember5 {
750
+ kind: 'metric';
751
+
752
+ name: string;
753
+
754
+ prompt: string;
755
+
756
+ type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
757
+
758
+ contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
759
+
760
+ displayName?: string;
761
+
762
+ falseLabel?: string;
763
+
764
+ maxSelections?: number;
765
+
766
+ options?: Array<UnionMember5.Option>;
767
+
768
+ participantRole?: 'AGENT' | 'CUSTOMER';
769
+
770
+ scaleLabels?: Array<UnionMember5.ScaleLabel>;
771
+
772
+ scaleMax?: number;
773
+
774
+ scaleMin?: number;
775
+
776
+ scope?: 'GLOBAL' | 'PER_PARTICIPANT';
777
+
778
+ trueLabel?: string;
779
+ }
780
+
781
+ export namespace UnionMember5 {
782
+ export interface Option {
783
+ displayOrder: number;
784
+
785
+ label: string;
786
+
787
+ description?: string;
788
+ }
789
+
790
+ export interface ScaleLabel {
791
+ displayOrder: number;
792
+
793
+ label: string;
794
+
795
+ rangeMax: number;
796
+
797
+ rangeMin: number;
798
+
799
+ colorHex?: string;
800
+
801
+ description?: string;
802
+ }
803
+ }
804
+ }
805
+
806
+ export interface ConfigDiffParams {
807
+ resources: Array<
808
+ | ConfigDiffParams.UnionMember0
809
+ | ConfigDiffParams.UnionMember1
810
+ | ConfigDiffParams.UnionMember2
811
+ | ConfigDiffParams.UnionMember3
812
+ | ConfigDiffParams.UnionMember4
813
+ | ConfigDiffParams.UnionMember5
814
+ >;
815
+
816
+ prune?: boolean;
817
+ }
818
+
819
+ export namespace ConfigDiffParams {
820
+ export interface UnionMember0 {
821
+ kind: 'agent';
822
+
823
+ name: string;
824
+
825
+ customId?: string | null;
826
+
827
+ description?: string | null;
828
+
829
+ endpoints?: Array<UnionMember0.Endpoint>;
830
+ }
831
+
832
+ export namespace UnionMember0 {
833
+ export interface Endpoint {
834
+ direction: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
835
+
836
+ name: string;
837
+
838
+ value: string;
839
+
840
+ environment?: string;
841
+ }
842
+ }
843
+
844
+ export interface UnionMember1 {
845
+ accent:
846
+ | 'US'
847
+ | 'US_X_SOUTH'
848
+ | 'GB'
849
+ | 'ES'
850
+ | 'DE'
851
+ | 'IN'
852
+ | 'FR'
853
+ | 'NL'
854
+ | 'SA'
855
+ | 'GR'
856
+ | 'AU'
857
+ | 'IT'
858
+ | 'ID'
859
+ | 'TH'
860
+ | 'JP'
861
+ | 'NZ'
862
+ | 'PH'
863
+ | 'SG'
864
+ | 'MY'
865
+ | 'HK'
866
+ | 'TR'
867
+ | 'PT'
868
+ | 'IL';
869
+
870
+ gender: 'MALE' | 'FEMALE';
871
+
872
+ kind: 'persona';
873
+
874
+ language:
875
+ | 'EN'
876
+ | 'ES'
877
+ | 'DE'
878
+ | 'HI'
879
+ | 'FR'
880
+ | 'NL'
881
+ | 'AR'
882
+ | 'EL'
883
+ | 'IT'
884
+ | 'ID'
885
+ | 'TH'
886
+ | 'JA'
887
+ | 'TL'
888
+ | 'MS'
889
+ | 'ZH'
890
+ | 'TR'
891
+ | 'PT'
892
+ | 'HE';
893
+
894
+ name: string;
895
+
896
+ backgroundNoise?:
897
+ | 'NONE'
898
+ | 'AIRPORT'
899
+ | 'CHILDREN_PLAYING'
900
+ | 'CITY'
901
+ | 'COFFEE_SHOP'
902
+ | 'DRIVING'
903
+ | 'OFFICE'
904
+ | 'THUNDERSTORM';
905
+
906
+ backstoryPrompt?: string | null;
907
+
908
+ baseEmotion?: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
909
+
910
+ confirmationStyle?: 'EXPLICIT' | 'VAGUE';
911
+
912
+ description?: string | null;
913
+
914
+ displayName?: string;
915
+
916
+ hasDisfluencies?: boolean;
917
+
918
+ idleMessageMaxSpokenCount?: number;
919
+
920
+ idleMessageResetCountOnUserSpeechEnabled?: boolean;
921
+
922
+ idleMessages?: Array<string> | null;
923
+
924
+ idleTimeoutSeconds?: number;
925
+
926
+ intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
927
+
928
+ memoryReliability?: 'HIGH' | 'LOW';
929
+
930
+ properties?: { [key: string]: unknown };
931
+
932
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';
933
+
934
+ secondaryLanguage?: 'EN' | null;
935
+
936
+ speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
937
+
938
+ speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
939
+
940
+ understoodLanguages?: Array<
941
+ | 'EN'
942
+ | 'ES'
943
+ | 'DE'
944
+ | 'HI'
945
+ | 'FR'
946
+ | 'NL'
947
+ | 'AR'
948
+ | 'EL'
949
+ | 'IT'
950
+ | 'ID'
951
+ | 'TH'
952
+ | 'JA'
953
+ | 'TL'
954
+ | 'MS'
955
+ | 'ZH'
956
+ | 'TR'
957
+ | 'PT'
958
+ | 'HE'
959
+ >;
960
+ }
961
+
962
+ export interface UnionMember2 {
963
+ agents: Array<string>;
964
+
965
+ happyPath: UnionMember2.HappyPath;
966
+
967
+ kind: 'flow';
968
+
969
+ name: string;
970
+
971
+ type: 'improv';
972
+
973
+ description?: string | null;
974
+
975
+ edgeCases?: Array<UnionMember2.EdgeCase>;
976
+
977
+ expectations?: Array<string>;
978
+
979
+ title?: string;
980
+ }
981
+
982
+ export namespace UnionMember2 {
983
+ export interface HappyPath {
984
+ environment: string;
985
+
986
+ persona: string;
987
+
988
+ expectations?: Array<string>;
989
+
990
+ prompt?: string;
991
+
992
+ title?: string;
993
+ }
994
+
995
+ export interface EdgeCase {
996
+ name: string;
997
+
998
+ environment?: string;
999
+
1000
+ expectations?: Array<string>;
1001
+
1002
+ persona?: string;
1003
+
1004
+ prompt?: string;
1005
+
1006
+ title?: string;
1007
+ }
1008
+ }
1009
+
1010
+ export interface UnionMember3 {
1011
+ graph: Array<UnionMember3.Graph>;
1012
+
1013
+ kind: 'flow';
1014
+
1015
+ name: string;
1016
+
1017
+ type: 'scripted';
1018
+
1019
+ agents?: Array<string>;
1020
+
1021
+ branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
1022
+
1023
+ description?: string | null;
1024
+
1025
+ expectations?: Array<string>;
1026
+
1027
+ title?: string;
1028
+ }
1029
+
1030
+ export namespace UnionMember3 {
1031
+ export interface Graph {
1032
+ type:
1033
+ | 'AGENT_TURN'
1034
+ | 'CUSTOMER_TURN'
1035
+ | 'CUSTOMER_FIRST_MESSAGE'
1036
+ | 'CUSTOMER_SILENCE'
1037
+ | 'CUSTOMER_DTMF'
1038
+ | 'VOICEMAIL'
1039
+ | 'SCENARIO_LINK';
1040
+
1041
+ content?: string;
1042
+
1043
+ dtmfDigits?: string;
1044
+
1045
+ flow?: string;
1046
+
1047
+ mergeInto?: Array<string>;
1048
+
1049
+ ref?: string;
1050
+
1051
+ silenceDurationSeconds?: number;
1052
+
1053
+ steps?: Array<unknown>;
1054
+ }
1055
+ }
1056
+
1057
+ export interface UnionMember4 {
1058
+ kind: 'collector';
1059
+
1060
+ metrics: Array<string>;
1061
+
1062
+ modality: 'call' | 'chat';
1063
+
1064
+ name: string;
1065
+
1066
+ filters?: Array<UnionMember4.Filter>;
1067
+
1068
+ status?: 'ACTIVE' | 'INACTIVE';
1069
+ }
1070
+
1071
+ export namespace UnionMember4 {
1072
+ export interface Filter {
1073
+ conditions: Array<Filter.Condition>;
1074
+ }
1075
+
1076
+ export namespace Filter {
1077
+ export interface Condition {
1078
+ key: string;
1079
+
1080
+ type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
1081
+
1082
+ operator?:
1083
+ | 'EQUALS'
1084
+ | 'NOT_EQUALS'
1085
+ | 'CONTAINS'
1086
+ | 'STARTS_WITH'
1087
+ | 'GREATER_THAN'
1088
+ | 'LESS_THAN'
1089
+ | 'GREATER_THAN_OR_EQUALS'
1090
+ | 'LESS_THAN_OR_EQUALS';
1091
+
1092
+ value?: string;
1093
+ }
1094
+ }
1095
+ }
1096
+
1097
+ export interface UnionMember5 {
1098
+ kind: 'metric';
1099
+
1100
+ name: string;
1101
+
1102
+ prompt: string;
1103
+
1104
+ type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
1105
+
1106
+ contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
1107
+
1108
+ displayName?: string;
1109
+
1110
+ falseLabel?: string;
1111
+
1112
+ maxSelections?: number;
1113
+
1114
+ options?: Array<UnionMember5.Option>;
1115
+
1116
+ participantRole?: 'AGENT' | 'CUSTOMER';
1117
+
1118
+ scaleLabels?: Array<UnionMember5.ScaleLabel>;
1119
+
1120
+ scaleMax?: number;
1121
+
1122
+ scaleMin?: number;
1123
+
1124
+ scope?: 'GLOBAL' | 'PER_PARTICIPANT';
1125
+
1126
+ trueLabel?: string;
1127
+ }
1128
+
1129
+ export namespace UnionMember5 {
1130
+ export interface Option {
1131
+ displayOrder: number;
1132
+
1133
+ label: string;
1134
+
1135
+ description?: string;
1136
+ }
1137
+
1138
+ export interface ScaleLabel {
1139
+ displayOrder: number;
1140
+
1141
+ label: string;
1142
+
1143
+ rangeMax: number;
1144
+
1145
+ rangeMin: number;
1146
+
1147
+ colorHex?: string;
1148
+
1149
+ description?: string;
1150
+ }
1151
+ }
1152
+ }
1153
+
1154
+ export declare namespace Config {
1155
+ export {
1156
+ type Bundle as Bundle,
1157
+ type ConfigApplyResponse as ConfigApplyResponse,
1158
+ type ConfigDiffResponse as ConfigDiffResponse,
1159
+ type ConfigApplyParams as ConfigApplyParams,
1160
+ type ConfigDiffParams as ConfigDiffParams,
1161
+ };
1162
+ }