@roarkanalytics/sdk 2.22.0 → 2.23.1

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 +27 -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
@@ -5,21 +5,25 @@ import { APIPromise } from '../core/api-promise';
5
5
  import { RequestOptions } from '../internal/request-options';
6
6
  import { path } from '../internal/utils/path';
7
7
 
8
- export class Persona extends APIResource {
8
+ export class SimulationPersona extends APIResource {
9
9
  /**
10
10
  * Creates a new persona for the authenticated project.
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
- * const persona = await client.persona.create({
15
- * accent: 'US',
16
- * gender: 'MALE',
17
- * language: 'EN',
18
- * name: 'name',
19
- * });
14
+ * const simulationPersona =
15
+ * await client.simulationPersona.create({
16
+ * accent: 'US',
17
+ * gender: 'MALE',
18
+ * language: 'EN',
19
+ * name: 'name',
20
+ * });
20
21
  * ```
21
22
  */
22
- create(body: PersonaCreateParams, options?: RequestOptions): APIPromise<PersonaCreateResponse> {
23
+ create(
24
+ body: SimulationPersonaCreateParams,
25
+ options?: RequestOptions,
26
+ ): APIPromise<SimulationPersonaCreateResponse> {
23
27
  return this._client.post('/v1/persona', { body, ...options });
24
28
  }
25
29
 
@@ -28,14 +32,15 @@ export class Persona extends APIResource {
28
32
  *
29
33
  * @example
30
34
  * ```ts
31
- * const persona = await client.persona.update('personaId');
35
+ * const simulationPersona =
36
+ * await client.simulationPersona.update('personaId');
32
37
  * ```
33
38
  */
34
39
  update(
35
40
  personaID: string,
36
- body: PersonaUpdateParams | null | undefined = {},
41
+ body: SimulationPersonaUpdateParams | null | undefined = {},
37
42
  options?: RequestOptions,
38
- ): APIPromise<PersonaUpdateResponse> {
43
+ ): APIPromise<SimulationPersonaUpdateResponse> {
39
44
  return this._client.put(path`/v1/persona/${personaID}`, { body, ...options });
40
45
  }
41
46
 
@@ -44,13 +49,14 @@ export class Persona extends APIResource {
44
49
  *
45
50
  * @example
46
51
  * ```ts
47
- * const personas = await client.persona.list();
52
+ * const simulationPersonas =
53
+ * await client.simulationPersona.list();
48
54
  * ```
49
55
  */
50
56
  list(
51
- query: PersonaListParams | null | undefined = {},
57
+ query: SimulationPersonaListParams | null | undefined = {},
52
58
  options?: RequestOptions,
53
- ): APIPromise<PersonaListResponse> {
59
+ ): APIPromise<SimulationPersonaListResponse> {
54
60
  return this._client.get('/v1/persona', { query, ...options });
55
61
  }
56
62
 
@@ -59,19 +65,21 @@ export class Persona extends APIResource {
59
65
  *
60
66
  * @example
61
67
  * ```ts
62
- * const response = await client.persona.getByID('personaId');
68
+ * const response = await client.simulationPersona.getByID(
69
+ * 'personaId',
70
+ * );
63
71
  * ```
64
72
  */
65
- getByID(personaID: string, options?: RequestOptions): APIPromise<PersonaGetByIDResponse> {
73
+ getByID(personaID: string, options?: RequestOptions): APIPromise<SimulationPersonaGetByIDResponse> {
66
74
  return this._client.get(path`/v1/persona/${personaID}`, options);
67
75
  }
68
76
  }
69
77
 
70
- export interface PersonaCreateResponse {
71
- data: PersonaCreateResponse.Data;
78
+ export interface SimulationPersonaCreateResponse {
79
+ data: SimulationPersonaCreateResponse.Data;
72
80
  }
73
81
 
74
- export namespace PersonaCreateResponse {
82
+ export namespace SimulationPersonaCreateResponse {
75
83
  export interface Data {
76
84
  /**
77
85
  * Unique identifier of the persona
@@ -182,6 +190,11 @@ export namespace PersonaCreateResponse {
182
190
  */
183
191
  backstoryPrompt?: string | null;
184
192
 
193
+ /**
194
+ * Human-readable description of the persona
195
+ */
196
+ description?: string | null;
197
+
185
198
  /**
186
199
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
187
200
  */
@@ -189,11 +202,11 @@ export namespace PersonaCreateResponse {
189
202
  }
190
203
  }
191
204
 
192
- export interface PersonaUpdateResponse {
193
- data: PersonaUpdateResponse.Data;
205
+ export interface SimulationPersonaUpdateResponse {
206
+ data: SimulationPersonaUpdateResponse.Data;
194
207
  }
195
208
 
196
- export namespace PersonaUpdateResponse {
209
+ export namespace SimulationPersonaUpdateResponse {
197
210
  export interface Data {
198
211
  /**
199
212
  * Unique identifier of the persona
@@ -304,6 +317,11 @@ export namespace PersonaUpdateResponse {
304
317
  */
305
318
  backstoryPrompt?: string | null;
306
319
 
320
+ /**
321
+ * Human-readable description of the persona
322
+ */
323
+ description?: string | null;
324
+
307
325
  /**
308
326
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
309
327
  */
@@ -311,13 +329,13 @@ export namespace PersonaUpdateResponse {
311
329
  }
312
330
  }
313
331
 
314
- export interface PersonaListResponse {
315
- data: Array<PersonaListResponse.Data>;
332
+ export interface SimulationPersonaListResponse {
333
+ data: Array<SimulationPersonaListResponse.Data>;
316
334
 
317
- pagination: PersonaListResponse.Pagination;
335
+ pagination: SimulationPersonaListResponse.Pagination;
318
336
  }
319
337
 
320
- export namespace PersonaListResponse {
338
+ export namespace SimulationPersonaListResponse {
321
339
  export interface Data {
322
340
  /**
323
341
  * Unique identifier of the persona
@@ -428,6 +446,11 @@ export namespace PersonaListResponse {
428
446
  */
429
447
  backstoryPrompt?: string | null;
430
448
 
449
+ /**
450
+ * Human-readable description of the persona
451
+ */
452
+ description?: string | null;
453
+
431
454
  /**
432
455
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
433
456
  */
@@ -452,11 +475,11 @@ export namespace PersonaListResponse {
452
475
  }
453
476
  }
454
477
 
455
- export interface PersonaGetByIDResponse {
456
- data: PersonaGetByIDResponse.Data;
478
+ export interface SimulationPersonaGetByIDResponse {
479
+ data: SimulationPersonaGetByIDResponse.Data;
457
480
  }
458
481
 
459
- export namespace PersonaGetByIDResponse {
482
+ export namespace SimulationPersonaGetByIDResponse {
460
483
  export interface Data {
461
484
  /**
462
485
  * Unique identifier of the persona
@@ -567,6 +590,11 @@ export namespace PersonaGetByIDResponse {
567
590
  */
568
591
  backstoryPrompt?: string | null;
569
592
 
593
+ /**
594
+ * Human-readable description of the persona
595
+ */
596
+ description?: string | null;
597
+
570
598
  /**
571
599
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
572
600
  */
@@ -574,7 +602,7 @@ export namespace PersonaGetByIDResponse {
574
602
  }
575
603
  }
576
604
 
577
- export interface PersonaCreateParams {
605
+ export interface SimulationPersonaCreateParams {
578
606
  /**
579
607
  * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
580
608
  * optional variants
@@ -639,6 +667,11 @@ export interface PersonaCreateParams {
639
667
  */
640
668
  confirmationStyle?: 'EXPLICIT' | 'VAGUE';
641
669
 
670
+ /**
671
+ * Human-readable description of the persona
672
+ */
673
+ description?: string | null;
674
+
642
675
  /**
643
676
  * Whether the persona uses filler words like "um" and "uh"
644
677
  */
@@ -675,7 +708,7 @@ export interface PersonaCreateParams {
675
708
  speechPace?: 'SLOW' | 'NORMAL' | 'FAST';
676
709
  }
677
710
 
678
- export interface PersonaUpdateParams {
711
+ export interface SimulationPersonaUpdateParams {
679
712
  /**
680
713
  * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
681
714
  * optional variants
@@ -725,6 +758,11 @@ export interface PersonaUpdateParams {
725
758
  */
726
759
  confirmationStyle?: 'EXPLICIT' | 'VAGUE';
727
760
 
761
+ /**
762
+ * Human-readable description of the persona
763
+ */
764
+ description?: string | null;
765
+
728
766
  /**
729
767
  * Gender of the persona
730
768
  */
@@ -776,7 +814,7 @@ export interface PersonaUpdateParams {
776
814
  speechPace?: 'SLOW' | 'NORMAL' | 'FAST';
777
815
  }
778
816
 
779
- export interface PersonaListParams {
817
+ export interface SimulationPersonaListParams {
780
818
  after?: string;
781
819
 
782
820
  limit?: number;
@@ -784,14 +822,14 @@ export interface PersonaListParams {
784
822
  searchText?: string;
785
823
  }
786
824
 
787
- export declare namespace Persona {
825
+ export declare namespace SimulationPersona {
788
826
  export {
789
- type PersonaCreateResponse as PersonaCreateResponse,
790
- type PersonaUpdateResponse as PersonaUpdateResponse,
791
- type PersonaListResponse as PersonaListResponse,
792
- type PersonaGetByIDResponse as PersonaGetByIDResponse,
793
- type PersonaCreateParams as PersonaCreateParams,
794
- type PersonaUpdateParams as PersonaUpdateParams,
795
- type PersonaListParams as PersonaListParams,
827
+ type SimulationPersonaCreateResponse as SimulationPersonaCreateResponse,
828
+ type SimulationPersonaUpdateResponse as SimulationPersonaUpdateResponse,
829
+ type SimulationPersonaListResponse as SimulationPersonaListResponse,
830
+ type SimulationPersonaGetByIDResponse as SimulationPersonaGetByIDResponse,
831
+ type SimulationPersonaCreateParams as SimulationPersonaCreateParams,
832
+ type SimulationPersonaUpdateParams as SimulationPersonaUpdateParams,
833
+ type SimulationPersonaListParams as SimulationPersonaListParams,
796
834
  };
797
835
  }