@roarkanalytics/sdk 2.22.0 → 2.23.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 (137) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.d.mts +31 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +31 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +34 -6
  7. package/client.js.map +1 -1
  8. package/client.mjs +34 -6
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-endpoint.d.mts +309 -0
  12. package/resources/agent-endpoint.d.mts.map +1 -0
  13. package/resources/agent-endpoint.d.ts +309 -0
  14. package/resources/agent-endpoint.d.ts.map +1 -0
  15. package/resources/agent-endpoint.js +35 -0
  16. package/resources/agent-endpoint.js.map +1 -0
  17. package/resources/agent-endpoint.mjs +31 -0
  18. package/resources/agent-endpoint.mjs.map +1 -0
  19. package/resources/agent.d.mts +193 -0
  20. package/resources/agent.d.mts.map +1 -0
  21. package/resources/agent.d.ts +193 -0
  22. package/resources/agent.d.ts.map +1 -0
  23. package/resources/agent.js +34 -0
  24. package/resources/agent.js.map +1 -0
  25. package/resources/agent.mjs +30 -0
  26. package/resources/agent.mjs.map +1 -0
  27. package/resources/call.d.mts +120 -1
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +120 -1
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/call.js +7 -0
  32. package/resources/call.js.map +1 -1
  33. package/resources/call.mjs +7 -0
  34. package/resources/call.mjs.map +1 -1
  35. package/resources/evaluation.d.mts +2097 -617
  36. package/resources/evaluation.d.mts.map +1 -1
  37. package/resources/evaluation.d.ts +2097 -617
  38. package/resources/evaluation.d.ts.map +1 -1
  39. package/resources/evaluation.js +14 -0
  40. package/resources/evaluation.js.map +1 -1
  41. package/resources/evaluation.mjs +14 -0
  42. package/resources/evaluation.mjs.map +1 -1
  43. package/resources/http-request-definition.d.mts +339 -0
  44. package/resources/http-request-definition.d.mts.map +1 -0
  45. package/resources/http-request-definition.d.ts +339 -0
  46. package/resources/http-request-definition.d.ts.map +1 -0
  47. package/resources/http-request-definition.js +36 -0
  48. package/resources/http-request-definition.js.map +1 -0
  49. package/resources/http-request-definition.mjs +32 -0
  50. package/resources/http-request-definition.mjs.map +1 -0
  51. package/resources/index.d.mts +11 -4
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +11 -4
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +19 -5
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +9 -2
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/simulation-job.d.mts +393 -0
  60. package/resources/simulation-job.d.mts.map +1 -0
  61. package/resources/simulation-job.d.ts +393 -0
  62. package/resources/simulation-job.d.ts.map +1 -0
  63. package/resources/simulation-job.js +38 -0
  64. package/resources/simulation-job.js.map +1 -0
  65. package/resources/simulation-job.mjs +34 -0
  66. package/resources/simulation-job.mjs.map +1 -0
  67. package/resources/{persona.d.mts → simulation-persona.d.mts} +62 -33
  68. package/resources/simulation-persona.d.mts.map +1 -0
  69. package/resources/{persona.d.ts → simulation-persona.d.ts} +62 -33
  70. package/resources/simulation-persona.d.ts.map +1 -0
  71. package/resources/{persona.js → simulation-persona.js} +18 -13
  72. package/resources/simulation-persona.js.map +1 -0
  73. package/resources/{persona.mjs → simulation-persona.mjs} +16 -11
  74. package/resources/simulation-persona.mjs.map +1 -0
  75. package/resources/simulation-run-plan-job.d.mts +359 -0
  76. package/resources/simulation-run-plan-job.d.mts.map +1 -0
  77. package/resources/simulation-run-plan-job.d.ts +359 -0
  78. package/resources/simulation-run-plan-job.d.ts.map +1 -0
  79. package/resources/simulation-run-plan-job.js +50 -0
  80. package/resources/simulation-run-plan-job.js.map +1 -0
  81. package/resources/simulation-run-plan-job.mjs +46 -0
  82. package/resources/simulation-run-plan-job.mjs.map +1 -0
  83. package/resources/simulation-run-plan.d.mts +660 -0
  84. package/resources/simulation-run-plan.d.mts.map +1 -0
  85. package/resources/simulation-run-plan.d.ts +660 -0
  86. package/resources/simulation-run-plan.d.ts.map +1 -0
  87. package/resources/simulation-run-plan.js +93 -0
  88. package/resources/simulation-run-plan.js.map +1 -0
  89. package/resources/simulation-run-plan.mjs +89 -0
  90. package/resources/simulation-run-plan.mjs.map +1 -0
  91. package/resources/simulation-scenario.d.mts +335 -0
  92. package/resources/simulation-scenario.d.mts.map +1 -0
  93. package/resources/simulation-scenario.d.ts +335 -0
  94. package/resources/simulation-scenario.d.ts.map +1 -0
  95. package/resources/simulation-scenario.js +40 -0
  96. package/resources/simulation-scenario.js.map +1 -0
  97. package/resources/simulation-scenario.mjs +36 -0
  98. package/resources/simulation-scenario.mjs.map +1 -0
  99. package/resources/webhook.d.mts +212 -0
  100. package/resources/webhook.d.mts.map +1 -0
  101. package/resources/webhook.d.ts +212 -0
  102. package/resources/webhook.d.ts.map +1 -0
  103. package/resources/webhook.js +35 -0
  104. package/resources/webhook.js.map +1 -0
  105. package/resources/webhook.mjs +31 -0
  106. package/resources/webhook.mjs.map +1 -0
  107. package/src/client.ts +208 -43
  108. package/src/resources/agent-endpoint.ts +400 -0
  109. package/src/resources/agent.ts +263 -0
  110. package/src/resources/call.ts +149 -0
  111. package/src/resources/evaluation.ts +3044 -1154
  112. package/src/resources/http-request-definition.ts +410 -0
  113. package/src/resources/index.ts +89 -21
  114. package/src/resources/simulation-job.ts +527 -0
  115. package/src/resources/{persona.ts → simulation-persona.ts} +78 -40
  116. package/src/resources/simulation-run-plan-job.ts +521 -0
  117. package/src/resources/simulation-run-plan.ts +840 -0
  118. package/src/resources/simulation-scenario.ts +463 -0
  119. package/src/resources/webhook.ts +318 -0
  120. package/src/version.ts +1 -1
  121. package/version.d.mts +1 -1
  122. package/version.d.ts +1 -1
  123. package/version.js +1 -1
  124. package/version.mjs +1 -1
  125. package/resources/persona.d.mts.map +0 -1
  126. package/resources/persona.d.ts.map +0 -1
  127. package/resources/persona.js.map +0 -1
  128. package/resources/persona.mjs.map +0 -1
  129. package/resources/simulation.d.mts +0 -802
  130. package/resources/simulation.d.mts.map +0 -1
  131. package/resources/simulation.d.ts +0 -802
  132. package/resources/simulation.d.ts.map +0 -1
  133. package/resources/simulation.js +0 -90
  134. package/resources/simulation.js.map +0 -1
  135. package/resources/simulation.mjs +0 -86
  136. package/resources/simulation.mjs.map +0 -1
  137. package/src/resources/simulation.ts +0 -1069
@@ -1,1069 +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 Simulation extends APIResource {
9
- /**
10
- * Retrieve details of a simulation plan job including all associated simulation
11
- * jobs (calls)
12
- *
13
- * @example
14
- * ```ts
15
- * const response = await client.simulation.getRunPlanJob(
16
- * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
17
- * );
18
- * ```
19
- */
20
- getRunPlanJob(jobID: unknown, options?: RequestOptions): APIPromise<SimulationGetRunPlanJobResponse> {
21
- return this._client.get(path`/v1/simulation/plan/job/${jobID}`, options);
22
- }
23
-
24
- /**
25
- * Get a individual simulation run directly by its ID. This is generally part of a
26
- * larger simulation run plan job.
27
- *
28
- * @example
29
- * ```ts
30
- * const response =
31
- * await client.simulation.getSimulationJobByID(
32
- * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
33
- * );
34
- * ```
35
- */
36
- getSimulationJobByID(
37
- jobID: unknown,
38
- options?: RequestOptions,
39
- ): APIPromise<SimulationGetSimulationJobByIDResponse> {
40
- return this._client.get(path`/v1/simulation/job/${jobID}`, options);
41
- }
42
-
43
- /**
44
- * Returns a paginated list of simulation run plan jobs. Filter by status, plan ID,
45
- * or label to find specific simulation batches.
46
- *
47
- * @example
48
- * ```ts
49
- * const response = await client.simulation.listRunPlanJobs();
50
- * ```
51
- */
52
- listRunPlanJobs(
53
- query: SimulationListRunPlanJobsParams | null | undefined = {},
54
- options?: RequestOptions,
55
- ): APIPromise<SimulationListRunPlanJobsResponse> {
56
- return this._client.get('/v1/simulation/plan/jobs', { query, ...options });
57
- }
58
-
59
- /**
60
- * Returns a paginated list of simulation scenarios for the authenticated project.
61
- *
62
- * @example
63
- * ```ts
64
- * const response = await client.simulation.listScenarios();
65
- * ```
66
- */
67
- listScenarios(
68
- query: SimulationListScenariosParams | null | undefined = {},
69
- options?: RequestOptions,
70
- ): APIPromise<SimulationListScenariosResponse> {
71
- return this._client.get('/v1/simulation/scenario', { query, ...options });
72
- }
73
-
74
- /**
75
- * Find the matching simulation using the number used by the Roark simulation
76
- * agent.
77
- *
78
- * @example
79
- * ```ts
80
- * const response =
81
- * await client.simulation.lookupSimulationJob({
82
- * roarkPhoneNumber: {},
83
- * });
84
- * ```
85
- */
86
- lookupSimulationJob(
87
- query: SimulationLookupSimulationJobParams,
88
- options?: RequestOptions,
89
- ): APIPromise<SimulationLookupSimulationJobResponse> {
90
- return this._client.get('/v1/simulation/job/lookup', { query, ...options });
91
- }
92
-
93
- /**
94
- * Create and execute a job for an existing simulation run plan
95
- *
96
- * @example
97
- * ```ts
98
- * const response = await client.simulation.startRunPlanJob(
99
- * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
100
- * );
101
- * ```
102
- */
103
- startRunPlanJob(planID: unknown, options?: RequestOptions): APIPromise<SimulationStartRunPlanJobResponse> {
104
- return this._client.post(path`/v1/simulation/plan/${planID}/job`, options);
105
- }
106
- }
107
-
108
- export interface SimulationGetRunPlanJobResponse {
109
- /**
110
- * Simulation run plan job with all associated simulation jobs
111
- */
112
- data: SimulationGetRunPlanJobResponse.Data;
113
- }
114
-
115
- export namespace SimulationGetRunPlanJobResponse {
116
- /**
117
- * Simulation run plan job with all associated simulation jobs
118
- */
119
- export interface Data {
120
- /**
121
- * When the job was created
122
- */
123
- createdAt: string;
124
-
125
- /**
126
- * List of simulation jobs (calls) in this run plan job
127
- */
128
- simulationJobs: Array<Data.SimulationJob>;
129
-
130
- /**
131
- * ID of the simulation run plan
132
- */
133
- simulationRunPlanId: string;
134
-
135
- /**
136
- * ID of the simulation run plan job
137
- */
138
- simulationRunPlanJobId: string;
139
-
140
- /**
141
- * Job status
142
- */
143
- status: string;
144
-
145
- /**
146
- * When the job ended
147
- */
148
- endedAt?: string | null;
149
-
150
- /**
151
- * When the job started
152
- */
153
- startedAt?: string | null;
154
- }
155
-
156
- export namespace Data {
157
- export interface SimulationJob {
158
- /**
159
- * Agent endpoint used in a simulation
160
- */
161
- agentEndpoint: SimulationJob.AgentEndpoint;
162
-
163
- /**
164
- * When the simulation job was created
165
- */
166
- createdAt: string;
167
-
168
- persona: SimulationJob.Persona;
169
-
170
- /**
171
- * Processing status
172
- */
173
- processingStatus: string;
174
-
175
- /**
176
- * Scenario used in a simulation
177
- */
178
- scenario: SimulationJob.Scenario;
179
-
180
- /**
181
- * Simulation job ID
182
- */
183
- simulationJobId: string;
184
-
185
- /**
186
- * Job status
187
- */
188
- status: string;
189
-
190
- /**
191
- * ID of the call created for this simulation job. Null if the call has not been
192
- * created yet.
193
- */
194
- callId?: string | null;
195
-
196
- /**
197
- * When the simulation job completed
198
- */
199
- completedAt?: string | null;
200
-
201
- /**
202
- * Phone number provisioned by Roark for this simulation job in E.164 format. Null
203
- * if the simulation job is queued and has not been assigned a phone number yet.
204
- */
205
- roarkPhoneNumber?: string | null;
206
-
207
- /**
208
- * When the simulation job started
209
- */
210
- startedAt?: string | null;
211
- }
212
-
213
- export namespace SimulationJob {
214
- /**
215
- * Agent endpoint used in a simulation
216
- */
217
- export interface AgentEndpoint {
218
- /**
219
- * Agent endpoint ID
220
- */
221
- id: string;
222
-
223
- /**
224
- * Agent endpoint name
225
- */
226
- name: string;
227
-
228
- /**
229
- * Agent endpoint phone number
230
- */
231
- phoneNumber: string | null;
232
-
233
- /**
234
- * Agent endpoint type
235
- */
236
- type: string;
237
- }
238
-
239
- export interface Persona {
240
- /**
241
- * Unique identifier of the persona
242
- */
243
- id: string;
244
-
245
- /**
246
- * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
247
- * optional variants
248
- */
249
- accent:
250
- | 'US'
251
- | 'US_X_SOUTH'
252
- | 'GB'
253
- | 'ES'
254
- | 'DE'
255
- | 'IN'
256
- | 'FR'
257
- | 'NL'
258
- | 'SA'
259
- | 'GR'
260
- | 'AU'
261
- | 'IT'
262
- | 'ID'
263
- | 'TH'
264
- | 'JP';
265
-
266
- /**
267
- * Background noise setting
268
- */
269
- backgroundNoise:
270
- | 'NONE'
271
- | 'AIRPORT'
272
- | 'CHILDREN_PLAYING'
273
- | 'CITY'
274
- | 'COFFEE_SHOP'
275
- | 'DRIVING'
276
- | 'OFFICE'
277
- | 'THUNDERSTORM';
278
-
279
- /**
280
- * Base emotional state of the persona
281
- */
282
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
283
-
284
- /**
285
- * How the persona confirms information
286
- */
287
- confirmationStyle: 'EXPLICIT' | 'VAGUE';
288
-
289
- /**
290
- * Creation timestamp
291
- */
292
- createdAt: string;
293
-
294
- /**
295
- * Gender of the persona
296
- */
297
- gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
298
-
299
- /**
300
- * Whether the persona uses filler words like "um" and "uh"
301
- */
302
- hasDisfluencies: boolean;
303
-
304
- /**
305
- * How clearly the persona expresses their intentions
306
- */
307
- intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
308
-
309
- /**
310
- * Primary language ISO 639-1 code for the persona
311
- */
312
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
313
-
314
- /**
315
- * How reliable the persona's memory is
316
- */
317
- memoryReliability: 'HIGH' | 'LOW';
318
-
319
- /**
320
- * The name the agent will identify as during conversations
321
- */
322
- name: string;
323
-
324
- /**
325
- * Additional custom properties about the persona
326
- */
327
- properties: { [key: string]: unknown };
328
-
329
- /**
330
- * Speech clarity of the persona
331
- */
332
- speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
333
-
334
- /**
335
- * Speech pace of the persona
336
- */
337
- speechPace: 'SLOW' | 'NORMAL' | 'FAST';
338
-
339
- /**
340
- * Last update timestamp
341
- */
342
- updatedAt: string;
343
-
344
- /**
345
- * Background story and behavioral patterns for the persona
346
- */
347
- backstoryPrompt?: string | null;
348
-
349
- /**
350
- * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
351
- */
352
- secondaryLanguage?: 'EN' | null;
353
- }
354
-
355
- /**
356
- * Scenario used in a simulation
357
- */
358
- export interface Scenario {
359
- /**
360
- * Scenario ID
361
- */
362
- id: string;
363
-
364
- /**
365
- * Scenario description
366
- */
367
- description?: string | null;
368
- }
369
- }
370
- }
371
- }
372
-
373
- export interface SimulationGetSimulationJobByIDResponse {
374
- /**
375
- * Simulation job with related entities
376
- */
377
- data: SimulationGetSimulationJobByIDResponse.Data;
378
- }
379
-
380
- export namespace SimulationGetSimulationJobByIDResponse {
381
- /**
382
- * Simulation job with related entities
383
- */
384
- export interface Data {
385
- /**
386
- * Agent endpoint used in a simulation
387
- */
388
- agentEndpoint: Data.AgentEndpoint;
389
-
390
- /**
391
- * When the job was created
392
- */
393
- createdAt: string;
394
-
395
- persona: Data.Persona;
396
-
397
- /**
398
- * Processing status
399
- */
400
- processingStatus: string;
401
-
402
- /**
403
- * Scenario used in a simulation
404
- */
405
- scenario: Data.Scenario;
406
-
407
- /**
408
- * Simulation job ID
409
- */
410
- simulationJobId: string;
411
-
412
- /**
413
- * Job status
414
- */
415
- status: string;
416
-
417
- /**
418
- * ID of the call created for this simulation job. Null if the call has not been
419
- * created yet.
420
- */
421
- callId?: string | null;
422
-
423
- /**
424
- * When the job completed
425
- */
426
- completedAt?: string | null;
427
-
428
- /**
429
- * Phone number provisioned by Roark for this simulation job in E.164 format. Null
430
- * if the simulation job is queued and has not been assigned a phone number yet.
431
- */
432
- roarkPhoneNumber?: string | null;
433
-
434
- /**
435
- * When the job started
436
- */
437
- startedAt?: string | null;
438
- }
439
-
440
- export namespace Data {
441
- /**
442
- * Agent endpoint used in a simulation
443
- */
444
- export interface AgentEndpoint {
445
- /**
446
- * Agent endpoint ID
447
- */
448
- id: string;
449
-
450
- /**
451
- * Agent endpoint name
452
- */
453
- name: string;
454
-
455
- /**
456
- * Agent endpoint phone number
457
- */
458
- phoneNumber: string | null;
459
-
460
- /**
461
- * Agent endpoint type
462
- */
463
- type: string;
464
- }
465
-
466
- export interface Persona {
467
- /**
468
- * Unique identifier of the persona
469
- */
470
- id: string;
471
-
472
- /**
473
- * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
474
- * optional variants
475
- */
476
- accent:
477
- | 'US'
478
- | 'US_X_SOUTH'
479
- | 'GB'
480
- | 'ES'
481
- | 'DE'
482
- | 'IN'
483
- | 'FR'
484
- | 'NL'
485
- | 'SA'
486
- | 'GR'
487
- | 'AU'
488
- | 'IT'
489
- | 'ID'
490
- | 'TH'
491
- | 'JP';
492
-
493
- /**
494
- * Background noise setting
495
- */
496
- backgroundNoise:
497
- | 'NONE'
498
- | 'AIRPORT'
499
- | 'CHILDREN_PLAYING'
500
- | 'CITY'
501
- | 'COFFEE_SHOP'
502
- | 'DRIVING'
503
- | 'OFFICE'
504
- | 'THUNDERSTORM';
505
-
506
- /**
507
- * Base emotional state of the persona
508
- */
509
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
510
-
511
- /**
512
- * How the persona confirms information
513
- */
514
- confirmationStyle: 'EXPLICIT' | 'VAGUE';
515
-
516
- /**
517
- * Creation timestamp
518
- */
519
- createdAt: string;
520
-
521
- /**
522
- * Gender of the persona
523
- */
524
- gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
525
-
526
- /**
527
- * Whether the persona uses filler words like "um" and "uh"
528
- */
529
- hasDisfluencies: boolean;
530
-
531
- /**
532
- * How clearly the persona expresses their intentions
533
- */
534
- intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
535
-
536
- /**
537
- * Primary language ISO 639-1 code for the persona
538
- */
539
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
540
-
541
- /**
542
- * How reliable the persona's memory is
543
- */
544
- memoryReliability: 'HIGH' | 'LOW';
545
-
546
- /**
547
- * The name the agent will identify as during conversations
548
- */
549
- name: string;
550
-
551
- /**
552
- * Additional custom properties about the persona
553
- */
554
- properties: { [key: string]: unknown };
555
-
556
- /**
557
- * Speech clarity of the persona
558
- */
559
- speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
560
-
561
- /**
562
- * Speech pace of the persona
563
- */
564
- speechPace: 'SLOW' | 'NORMAL' | 'FAST';
565
-
566
- /**
567
- * Last update timestamp
568
- */
569
- updatedAt: string;
570
-
571
- /**
572
- * Background story and behavioral patterns for the persona
573
- */
574
- backstoryPrompt?: string | null;
575
-
576
- /**
577
- * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
578
- */
579
- secondaryLanguage?: 'EN' | null;
580
- }
581
-
582
- /**
583
- * Scenario used in a simulation
584
- */
585
- export interface Scenario {
586
- /**
587
- * Scenario ID
588
- */
589
- id: string;
590
-
591
- /**
592
- * Scenario description
593
- */
594
- description?: string | null;
595
- }
596
- }
597
- }
598
-
599
- /**
600
- * Paginated list of simulation run plan jobs
601
- */
602
- export interface SimulationListRunPlanJobsResponse {
603
- data: Array<SimulationListRunPlanJobsResponse.Data>;
604
-
605
- pagination: SimulationListRunPlanJobsResponse.Pagination;
606
- }
607
-
608
- export namespace SimulationListRunPlanJobsResponse {
609
- export interface Data {
610
- /**
611
- * When the job was created
612
- */
613
- createdAt: string;
614
-
615
- /**
616
- * ID of the simulation run plan
617
- */
618
- simulationRunPlanId: string;
619
-
620
- /**
621
- * ID of the simulation run plan job
622
- */
623
- simulationRunPlanJobId: string;
624
-
625
- /**
626
- * Job status
627
- */
628
- status: string;
629
-
630
- /**
631
- * How the job was triggered (SCHEDULED or USER_TRIGGERED_FROM_UI)
632
- */
633
- triggeredBy: string;
634
-
635
- /**
636
- * When the job ended
637
- */
638
- endedAt?: string | null;
639
-
640
- /**
641
- * When the job started
642
- */
643
- startedAt?: string | null;
644
- }
645
-
646
- export interface Pagination {
647
- /**
648
- * Whether there are more results available
649
- */
650
- hasMore: boolean;
651
-
652
- /**
653
- * Total number of matching plan jobs
654
- */
655
- total: number;
656
-
657
- /**
658
- * Cursor to use for fetching the next page
659
- */
660
- nextCursor?: string | null;
661
- }
662
- }
663
-
664
- export interface SimulationListScenariosResponse {
665
- data: Array<SimulationListScenariosResponse.Data>;
666
-
667
- pagination: SimulationListScenariosResponse.Pagination;
668
- }
669
-
670
- export namespace SimulationListScenariosResponse {
671
- export interface Data {
672
- /**
673
- * Unique identifier of the scenario
674
- */
675
- id: string;
676
-
677
- /**
678
- * Creation timestamp in ISO 8601 format
679
- */
680
- createdAt: string;
681
-
682
- /**
683
- * Description of the scenario
684
- */
685
- description: string | null;
686
-
687
- /**
688
- * Name of the scenario (from the start node content)
689
- */
690
- name: string | null;
691
-
692
- /**
693
- * Ordered list of steps in the scenario (excludes the START node)
694
- */
695
- steps: Array<Data.Step>;
696
-
697
- /**
698
- * Last update timestamp in ISO 8601 format
699
- */
700
- updatedAt: string;
701
- }
702
-
703
- export namespace Data {
704
- export interface Step {
705
- /**
706
- * Content/text of the step
707
- */
708
- content: string | null;
709
-
710
- /**
711
- * Type of step in the scenario
712
- */
713
- type:
714
- | 'START'
715
- | 'AGENT_TURN'
716
- | 'CUSTOMER_TURN'
717
- | 'CUSTOMER_FIRST_MESSAGE'
718
- | 'CUSTOMER_SILENCE'
719
- | 'VOICEMAIL';
720
- }
721
- }
722
-
723
- export interface Pagination {
724
- /**
725
- * Whether there are more items to fetch
726
- */
727
- hasMore: boolean;
728
-
729
- /**
730
- * Cursor for the next page of items
731
- */
732
- nextCursor: string | null;
733
-
734
- /**
735
- * Total number of items
736
- */
737
- total: number;
738
- }
739
- }
740
-
741
- export interface SimulationLookupSimulationJobResponse {
742
- /**
743
- * Simulation job with related entities
744
- */
745
- data: SimulationLookupSimulationJobResponse.Data;
746
- }
747
-
748
- export namespace SimulationLookupSimulationJobResponse {
749
- /**
750
- * Simulation job with related entities
751
- */
752
- export interface Data {
753
- /**
754
- * Agent endpoint used in a simulation
755
- */
756
- agentEndpoint: Data.AgentEndpoint;
757
-
758
- /**
759
- * When the job was created
760
- */
761
- createdAt: string;
762
-
763
- persona: Data.Persona;
764
-
765
- /**
766
- * Processing status
767
- */
768
- processingStatus: string;
769
-
770
- /**
771
- * Scenario used in a simulation
772
- */
773
- scenario: Data.Scenario;
774
-
775
- /**
776
- * Simulation job ID
777
- */
778
- simulationJobId: string;
779
-
780
- /**
781
- * Job status
782
- */
783
- status: string;
784
-
785
- /**
786
- * ID of the call created for this simulation job. Null if the call has not been
787
- * created yet.
788
- */
789
- callId?: string | null;
790
-
791
- /**
792
- * When the job completed
793
- */
794
- completedAt?: string | null;
795
-
796
- /**
797
- * Phone number provisioned by Roark for this simulation job in E.164 format. Null
798
- * if the simulation job is queued and has not been assigned a phone number yet.
799
- */
800
- roarkPhoneNumber?: string | null;
801
-
802
- /**
803
- * When the job started
804
- */
805
- startedAt?: string | null;
806
- }
807
-
808
- export namespace Data {
809
- /**
810
- * Agent endpoint used in a simulation
811
- */
812
- export interface AgentEndpoint {
813
- /**
814
- * Agent endpoint ID
815
- */
816
- id: string;
817
-
818
- /**
819
- * Agent endpoint name
820
- */
821
- name: string;
822
-
823
- /**
824
- * Agent endpoint phone number
825
- */
826
- phoneNumber: string | null;
827
-
828
- /**
829
- * Agent endpoint type
830
- */
831
- type: string;
832
- }
833
-
834
- export interface Persona {
835
- /**
836
- * Unique identifier of the persona
837
- */
838
- id: string;
839
-
840
- /**
841
- * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
842
- * optional variants
843
- */
844
- accent:
845
- | 'US'
846
- | 'US_X_SOUTH'
847
- | 'GB'
848
- | 'ES'
849
- | 'DE'
850
- | 'IN'
851
- | 'FR'
852
- | 'NL'
853
- | 'SA'
854
- | 'GR'
855
- | 'AU'
856
- | 'IT'
857
- | 'ID'
858
- | 'TH'
859
- | 'JP';
860
-
861
- /**
862
- * Background noise setting
863
- */
864
- backgroundNoise:
865
- | 'NONE'
866
- | 'AIRPORT'
867
- | 'CHILDREN_PLAYING'
868
- | 'CITY'
869
- | 'COFFEE_SHOP'
870
- | 'DRIVING'
871
- | 'OFFICE'
872
- | 'THUNDERSTORM';
873
-
874
- /**
875
- * Base emotional state of the persona
876
- */
877
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
878
-
879
- /**
880
- * How the persona confirms information
881
- */
882
- confirmationStyle: 'EXPLICIT' | 'VAGUE';
883
-
884
- /**
885
- * Creation timestamp
886
- */
887
- createdAt: string;
888
-
889
- /**
890
- * Gender of the persona
891
- */
892
- gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
893
-
894
- /**
895
- * Whether the persona uses filler words like "um" and "uh"
896
- */
897
- hasDisfluencies: boolean;
898
-
899
- /**
900
- * How clearly the persona expresses their intentions
901
- */
902
- intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
903
-
904
- /**
905
- * Primary language ISO 639-1 code for the persona
906
- */
907
- language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA';
908
-
909
- /**
910
- * How reliable the persona's memory is
911
- */
912
- memoryReliability: 'HIGH' | 'LOW';
913
-
914
- /**
915
- * The name the agent will identify as during conversations
916
- */
917
- name: string;
918
-
919
- /**
920
- * Additional custom properties about the persona
921
- */
922
- properties: { [key: string]: unknown };
923
-
924
- /**
925
- * Speech clarity of the persona
926
- */
927
- speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
928
-
929
- /**
930
- * Speech pace of the persona
931
- */
932
- speechPace: 'SLOW' | 'NORMAL' | 'FAST';
933
-
934
- /**
935
- * Last update timestamp
936
- */
937
- updatedAt: string;
938
-
939
- /**
940
- * Background story and behavioral patterns for the persona
941
- */
942
- backstoryPrompt?: string | null;
943
-
944
- /**
945
- * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
946
- */
947
- secondaryLanguage?: 'EN' | null;
948
- }
949
-
950
- /**
951
- * Scenario used in a simulation
952
- */
953
- export interface Scenario {
954
- /**
955
- * Scenario ID
956
- */
957
- id: string;
958
-
959
- /**
960
- * Scenario description
961
- */
962
- description?: string | null;
963
- }
964
- }
965
- }
966
-
967
- export interface SimulationStartRunPlanJobResponse {
968
- /**
969
- * Response when triggering a simulation run plan
970
- */
971
- data: SimulationStartRunPlanJobResponse.Data;
972
- }
973
-
974
- export namespace SimulationStartRunPlanJobResponse {
975
- /**
976
- * Response when triggering a simulation run plan
977
- */
978
- export interface Data {
979
- /**
980
- * When the job was created
981
- */
982
- createdAt: string;
983
-
984
- /**
985
- * ID of the simulation run plan that was executed
986
- */
987
- simulationRunPlanId: string;
988
-
989
- /**
990
- * ID of the simulation run plan job that was created
991
- */
992
- simulationRunPlanJobId: string;
993
-
994
- /**
995
- * Initial status of the job
996
- */
997
- status: string;
998
- }
999
- }
1000
-
1001
- export interface SimulationListRunPlanJobsParams {
1002
- /**
1003
- * Cursor for pagination - use the nextCursor value from a previous response
1004
- */
1005
- after?: string;
1006
-
1007
- /**
1008
- * Filter by label ID attached to the plan job. Use this if you know the label ID.
1009
- */
1010
- labelId?: string;
1011
-
1012
- /**
1013
- * Filter by label name attached to the plan job. More user-friendly alternative to
1014
- * labelId. Case-insensitive.
1015
- */
1016
- labelName?: string;
1017
-
1018
- /**
1019
- * Maximum number of plan jobs to return (default: 20, max: 50)
1020
- */
1021
- limit?: number;
1022
-
1023
- /**
1024
- * Filter by simulation run plan ID
1025
- */
1026
- simulationRunPlanId?: string;
1027
-
1028
- /**
1029
- * Filter by plan job status (PENDING, CREATING_SNAPSHOTS, CREATING_SIMULATIONS,
1030
- * RUNNING_SIMULATIONS, COMPLETED, FAILED, TIMED_OUT, CANCELLED, CANCELLING)
1031
- */
1032
- status?: string;
1033
- }
1034
-
1035
- export interface SimulationListScenariosParams {
1036
- after?: string;
1037
-
1038
- limit?: number;
1039
- }
1040
-
1041
- export interface SimulationLookupSimulationJobParams {
1042
- /**
1043
- * Phone number provisioned by Roark for the simulation job in E.164 format. In the
1044
- * case of an inbound simulation, this is the number that calls your agent; in the
1045
- * case of an outbound simulation, this is the number you call from your agent.
1046
- */
1047
- roarkPhoneNumber: unknown;
1048
-
1049
- /**
1050
- * ISO 8601 timestamp of when the call was received. Alternatively, any time
1051
- * between the start and end of the call is valid. Defaults to the current time,
1052
- * which fetches any jobs that are currently ongoing.
1053
- */
1054
- callReceivedAt?: unknown;
1055
- }
1056
-
1057
- export declare namespace Simulation {
1058
- export {
1059
- type SimulationGetRunPlanJobResponse as SimulationGetRunPlanJobResponse,
1060
- type SimulationGetSimulationJobByIDResponse as SimulationGetSimulationJobByIDResponse,
1061
- type SimulationListRunPlanJobsResponse as SimulationListRunPlanJobsResponse,
1062
- type SimulationListScenariosResponse as SimulationListScenariosResponse,
1063
- type SimulationLookupSimulationJobResponse as SimulationLookupSimulationJobResponse,
1064
- type SimulationStartRunPlanJobResponse as SimulationStartRunPlanJobResponse,
1065
- type SimulationListRunPlanJobsParams as SimulationListRunPlanJobsParams,
1066
- type SimulationListScenariosParams as SimulationListScenariosParams,
1067
- type SimulationLookupSimulationJobParams as SimulationLookupSimulationJobParams,
1068
- };
1069
- }