@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.
- package/CHANGELOG.md +27 -0
- package/client.d.mts +31 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +31 -10
- package/client.d.ts.map +1 -1
- package/client.js +34 -6
- package/client.js.map +1 -1
- package/client.mjs +34 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-endpoint.d.mts +309 -0
- package/resources/agent-endpoint.d.mts.map +1 -0
- package/resources/agent-endpoint.d.ts +309 -0
- package/resources/agent-endpoint.d.ts.map +1 -0
- package/resources/agent-endpoint.js +35 -0
- package/resources/agent-endpoint.js.map +1 -0
- package/resources/agent-endpoint.mjs +31 -0
- package/resources/agent-endpoint.mjs.map +1 -0
- package/resources/agent.d.mts +193 -0
- package/resources/agent.d.mts.map +1 -0
- package/resources/agent.d.ts +193 -0
- package/resources/agent.d.ts.map +1 -0
- package/resources/agent.js +34 -0
- package/resources/agent.js.map +1 -0
- package/resources/agent.mjs +30 -0
- package/resources/agent.mjs.map +1 -0
- package/resources/call.d.mts +120 -1
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +120 -1
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +7 -0
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +7 -0
- package/resources/call.mjs.map +1 -1
- package/resources/evaluation.d.mts +2097 -617
- package/resources/evaluation.d.mts.map +1 -1
- package/resources/evaluation.d.ts +2097 -617
- package/resources/evaluation.d.ts.map +1 -1
- package/resources/evaluation.js +14 -0
- package/resources/evaluation.js.map +1 -1
- package/resources/evaluation.mjs +14 -0
- package/resources/evaluation.mjs.map +1 -1
- package/resources/http-request-definition.d.mts +339 -0
- package/resources/http-request-definition.d.mts.map +1 -0
- package/resources/http-request-definition.d.ts +339 -0
- package/resources/http-request-definition.d.ts.map +1 -0
- package/resources/http-request-definition.js +36 -0
- package/resources/http-request-definition.js.map +1 -0
- package/resources/http-request-definition.mjs +32 -0
- package/resources/http-request-definition.mjs.map +1 -0
- package/resources/index.d.mts +11 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +19 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +9 -2
- package/resources/index.mjs.map +1 -1
- package/resources/simulation-job.d.mts +393 -0
- package/resources/simulation-job.d.mts.map +1 -0
- package/resources/simulation-job.d.ts +393 -0
- package/resources/simulation-job.d.ts.map +1 -0
- package/resources/simulation-job.js +38 -0
- package/resources/simulation-job.js.map +1 -0
- package/resources/simulation-job.mjs +34 -0
- package/resources/simulation-job.mjs.map +1 -0
- package/resources/{persona.d.mts → simulation-persona.d.mts} +62 -33
- package/resources/simulation-persona.d.mts.map +1 -0
- package/resources/{persona.d.ts → simulation-persona.d.ts} +62 -33
- package/resources/simulation-persona.d.ts.map +1 -0
- package/resources/{persona.js → simulation-persona.js} +18 -13
- package/resources/simulation-persona.js.map +1 -0
- package/resources/{persona.mjs → simulation-persona.mjs} +16 -11
- package/resources/simulation-persona.mjs.map +1 -0
- package/resources/simulation-run-plan-job.d.mts +359 -0
- package/resources/simulation-run-plan-job.d.mts.map +1 -0
- package/resources/simulation-run-plan-job.d.ts +359 -0
- package/resources/simulation-run-plan-job.d.ts.map +1 -0
- package/resources/simulation-run-plan-job.js +50 -0
- package/resources/simulation-run-plan-job.js.map +1 -0
- package/resources/simulation-run-plan-job.mjs +46 -0
- package/resources/simulation-run-plan-job.mjs.map +1 -0
- package/resources/simulation-run-plan.d.mts +660 -0
- package/resources/simulation-run-plan.d.mts.map +1 -0
- package/resources/simulation-run-plan.d.ts +660 -0
- package/resources/simulation-run-plan.d.ts.map +1 -0
- package/resources/simulation-run-plan.js +93 -0
- package/resources/simulation-run-plan.js.map +1 -0
- package/resources/simulation-run-plan.mjs +89 -0
- package/resources/simulation-run-plan.mjs.map +1 -0
- package/resources/simulation-scenario.d.mts +335 -0
- package/resources/simulation-scenario.d.mts.map +1 -0
- package/resources/simulation-scenario.d.ts +335 -0
- package/resources/simulation-scenario.d.ts.map +1 -0
- package/resources/simulation-scenario.js +40 -0
- package/resources/simulation-scenario.js.map +1 -0
- package/resources/simulation-scenario.mjs +36 -0
- package/resources/simulation-scenario.mjs.map +1 -0
- package/resources/webhook.d.mts +212 -0
- package/resources/webhook.d.mts.map +1 -0
- package/resources/webhook.d.ts +212 -0
- package/resources/webhook.d.ts.map +1 -0
- package/resources/webhook.js +35 -0
- package/resources/webhook.js.map +1 -0
- package/resources/webhook.mjs +31 -0
- package/resources/webhook.mjs.map +1 -0
- package/src/client.ts +208 -43
- package/src/resources/agent-endpoint.ts +400 -0
- package/src/resources/agent.ts +263 -0
- package/src/resources/call.ts +149 -0
- package/src/resources/evaluation.ts +3044 -1154
- package/src/resources/http-request-definition.ts +410 -0
- package/src/resources/index.ts +89 -21
- package/src/resources/simulation-job.ts +527 -0
- package/src/resources/{persona.ts → simulation-persona.ts} +78 -40
- package/src/resources/simulation-run-plan-job.ts +521 -0
- package/src/resources/simulation-run-plan.ts +840 -0
- package/src/resources/simulation-scenario.ts +463 -0
- package/src/resources/webhook.ts +318 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/persona.d.mts.map +0 -1
- package/resources/persona.d.ts.map +0 -1
- package/resources/persona.js.map +0 -1
- package/resources/persona.mjs.map +0 -1
- package/resources/simulation.d.mts +0 -802
- package/resources/simulation.d.mts.map +0 -1
- package/resources/simulation.d.ts +0 -802
- package/resources/simulation.d.ts.map +0 -1
- package/resources/simulation.js +0 -90
- package/resources/simulation.js.map +0 -1
- package/resources/simulation.mjs +0 -86
- package/resources/simulation.mjs.map +0 -1
- 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
|
|
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
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
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(
|
|
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
|
|
35
|
+
* const simulationPersona =
|
|
36
|
+
* await client.simulationPersona.update('personaId');
|
|
32
37
|
* ```
|
|
33
38
|
*/
|
|
34
39
|
update(
|
|
35
40
|
personaID: string,
|
|
36
|
-
body:
|
|
41
|
+
body: SimulationPersonaUpdateParams | null | undefined = {},
|
|
37
42
|
options?: RequestOptions,
|
|
38
|
-
): APIPromise<
|
|
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
|
|
52
|
+
* const simulationPersonas =
|
|
53
|
+
* await client.simulationPersona.list();
|
|
48
54
|
* ```
|
|
49
55
|
*/
|
|
50
56
|
list(
|
|
51
|
-
query:
|
|
57
|
+
query: SimulationPersonaListParams | null | undefined = {},
|
|
52
58
|
options?: RequestOptions,
|
|
53
|
-
): APIPromise<
|
|
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.
|
|
68
|
+
* const response = await client.simulationPersona.getByID(
|
|
69
|
+
* 'personaId',
|
|
70
|
+
* );
|
|
63
71
|
* ```
|
|
64
72
|
*/
|
|
65
|
-
getByID(personaID: string, options?: RequestOptions): APIPromise<
|
|
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
|
|
71
|
-
data:
|
|
78
|
+
export interface SimulationPersonaCreateResponse {
|
|
79
|
+
data: SimulationPersonaCreateResponse.Data;
|
|
72
80
|
}
|
|
73
81
|
|
|
74
|
-
export namespace
|
|
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
|
|
193
|
-
data:
|
|
205
|
+
export interface SimulationPersonaUpdateResponse {
|
|
206
|
+
data: SimulationPersonaUpdateResponse.Data;
|
|
194
207
|
}
|
|
195
208
|
|
|
196
|
-
export namespace
|
|
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
|
|
315
|
-
data: Array<
|
|
332
|
+
export interface SimulationPersonaListResponse {
|
|
333
|
+
data: Array<SimulationPersonaListResponse.Data>;
|
|
316
334
|
|
|
317
|
-
pagination:
|
|
335
|
+
pagination: SimulationPersonaListResponse.Pagination;
|
|
318
336
|
}
|
|
319
337
|
|
|
320
|
-
export namespace
|
|
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
|
|
456
|
-
data:
|
|
478
|
+
export interface SimulationPersonaGetByIDResponse {
|
|
479
|
+
data: SimulationPersonaGetByIDResponse.Data;
|
|
457
480
|
}
|
|
458
481
|
|
|
459
|
-
export namespace
|
|
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
|
|
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
|
|
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
|
|
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
|
|
825
|
+
export declare namespace SimulationPersona {
|
|
788
826
|
export {
|
|
789
|
-
type
|
|
790
|
-
type
|
|
791
|
-
type
|
|
792
|
-
type
|
|
793
|
-
type
|
|
794
|
-
type
|
|
795
|
-
type
|
|
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
|
}
|