@roarkanalytics/sdk 2.8.0 → 2.9.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.
@@ -1,5 +1,681 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
+ import { isRequestOptions } from '../core';
5
+ import * as Core from '../core';
4
6
 
5
- export class Persona extends APIResource {}
7
+ export class Persona extends APIResource {
8
+ /**
9
+ * Creates a new persona for the authenticated project.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const persona = await client.persona.create({
14
+ * accent: 'US',
15
+ * backgroundNoise: 'NONE',
16
+ * baseEmotion: 'NEUTRAL',
17
+ * confirmationStyle: 'EXPLICIT',
18
+ * gender: 'MALE',
19
+ * hasDisfluencies: false,
20
+ * intentClarity: 'CLEAR',
21
+ * language: 'EN',
22
+ * memoryReliability: 'HIGH',
23
+ * name: 'Alex Morgan',
24
+ * speechClarity: 'CLEAR',
25
+ * speechPace: 'NORMAL',
26
+ * });
27
+ * ```
28
+ */
29
+ create(body: PersonaCreateParams, options?: Core.RequestOptions): Core.APIPromise<PersonaCreateResponse> {
30
+ return this._client.post('/v1/persona', { body, ...options });
31
+ }
32
+
33
+ /**
34
+ * Updates an existing persona by its ID.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const persona = await client.persona.update('personaId', {
39
+ * accent: 'US',
40
+ * backgroundNoise: 'NONE',
41
+ * baseEmotion: 'NEUTRAL',
42
+ * confirmationStyle: 'EXPLICIT',
43
+ * gender: 'MALE',
44
+ * hasDisfluencies: false,
45
+ * intentClarity: 'CLEAR',
46
+ * language: 'EN',
47
+ * memoryReliability: 'HIGH',
48
+ * name: 'Alex Morgan',
49
+ * speechClarity: 'CLEAR',
50
+ * speechPace: 'NORMAL',
51
+ * });
52
+ * ```
53
+ */
54
+ update(
55
+ personaId: string,
56
+ body: PersonaUpdateParams,
57
+ options?: Core.RequestOptions,
58
+ ): Core.APIPromise<PersonaUpdateResponse> {
59
+ return this._client.put(`/v1/persona/${personaId}`, { body, ...options });
60
+ }
61
+
62
+ /**
63
+ * Returns a paginated list of personas for the authenticated project.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const response = await client.persona.findAll();
68
+ * ```
69
+ */
70
+ findAll(
71
+ query?: PersonaFindAllParams,
72
+ options?: Core.RequestOptions,
73
+ ): Core.APIPromise<PersonaFindAllResponse>;
74
+ findAll(options?: Core.RequestOptions): Core.APIPromise<PersonaFindAllResponse>;
75
+ findAll(
76
+ query: PersonaFindAllParams | Core.RequestOptions = {},
77
+ options?: Core.RequestOptions,
78
+ ): Core.APIPromise<PersonaFindAllResponse> {
79
+ if (isRequestOptions(query)) {
80
+ return this.findAll({}, query);
81
+ }
82
+ return this._client.get('/v1/persona', { query, ...options });
83
+ }
84
+
85
+ /**
86
+ * Returns a specific persona by its ID.
87
+ *
88
+ * @example
89
+ * ```ts
90
+ * const response = await client.persona.getById('personaId');
91
+ * ```
92
+ */
93
+ getById(personaId: string, options?: Core.RequestOptions): Core.APIPromise<PersonaGetByIDResponse> {
94
+ return this._client.get(`/v1/persona/${personaId}`, options);
95
+ }
96
+ }
97
+
98
+ export interface PersonaCreateResponse {
99
+ data: PersonaCreateResponse.Data;
100
+ }
101
+
102
+ export namespace PersonaCreateResponse {
103
+ export interface Data {
104
+ /**
105
+ * Unique identifier of the persona
106
+ */
107
+ id: string;
108
+
109
+ /**
110
+ * Accent of the persona
111
+ */
112
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU';
113
+
114
+ /**
115
+ * Background noise setting
116
+ */
117
+ backgroundNoise: 'NONE' | 'OFFICE';
118
+
119
+ /**
120
+ * Base emotional state of the persona
121
+ */
122
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
123
+
124
+ /**
125
+ * How the persona confirms information
126
+ */
127
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
128
+
129
+ /**
130
+ * Creation timestamp
131
+ */
132
+ createdAt: string;
133
+
134
+ /**
135
+ * Gender of the persona
136
+ */
137
+ gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
138
+
139
+ /**
140
+ * Whether the persona uses filler words like "um" and "uh"
141
+ */
142
+ hasDisfluencies: boolean;
143
+
144
+ /**
145
+ * How clearly the persona expresses their intentions
146
+ */
147
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
148
+
149
+ /**
150
+ * Primary language for the persona
151
+ */
152
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL';
153
+
154
+ /**
155
+ * How reliable the persona's memory is
156
+ */
157
+ memoryReliability: 'HIGH' | 'LOW';
158
+
159
+ /**
160
+ * The name the agent will identify as during conversations
161
+ */
162
+ name: string;
163
+
164
+ /**
165
+ * Speech clarity of the persona
166
+ */
167
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
168
+
169
+ /**
170
+ * Speech pace of the persona
171
+ */
172
+ speechPace: 'SLOW' | 'NORMAL' | 'FAST';
173
+
174
+ /**
175
+ * Last update timestamp
176
+ */
177
+ updatedAt: string;
178
+
179
+ /**
180
+ * Background story and behavioral patterns for the persona
181
+ */
182
+ backstoryPrompt?: string | null;
183
+
184
+ /**
185
+ * Additional custom properties about the persona
186
+ */
187
+ properties?: { [key: string]: unknown };
188
+
189
+ /**
190
+ * Secondary language for code-switching (e.g., Hinglish, Spanglish)
191
+ */
192
+ secondaryLanguage?: 'EN' | null;
193
+ }
194
+ }
195
+
196
+ export interface PersonaUpdateResponse {
197
+ data: PersonaUpdateResponse.Data;
198
+ }
199
+
200
+ export namespace PersonaUpdateResponse {
201
+ export interface Data {
202
+ /**
203
+ * Unique identifier of the persona
204
+ */
205
+ id: string;
206
+
207
+ /**
208
+ * Accent of the persona
209
+ */
210
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU';
211
+
212
+ /**
213
+ * Background noise setting
214
+ */
215
+ backgroundNoise: 'NONE' | 'OFFICE';
216
+
217
+ /**
218
+ * Base emotional state of the persona
219
+ */
220
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
221
+
222
+ /**
223
+ * How the persona confirms information
224
+ */
225
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
226
+
227
+ /**
228
+ * Creation timestamp
229
+ */
230
+ createdAt: string;
231
+
232
+ /**
233
+ * Gender of the persona
234
+ */
235
+ gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
236
+
237
+ /**
238
+ * Whether the persona uses filler words like "um" and "uh"
239
+ */
240
+ hasDisfluencies: boolean;
241
+
242
+ /**
243
+ * How clearly the persona expresses their intentions
244
+ */
245
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
246
+
247
+ /**
248
+ * Primary language for the persona
249
+ */
250
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL';
251
+
252
+ /**
253
+ * How reliable the persona's memory is
254
+ */
255
+ memoryReliability: 'HIGH' | 'LOW';
256
+
257
+ /**
258
+ * The name the agent will identify as during conversations
259
+ */
260
+ name: string;
261
+
262
+ /**
263
+ * Speech clarity of the persona
264
+ */
265
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
266
+
267
+ /**
268
+ * Speech pace of the persona
269
+ */
270
+ speechPace: 'SLOW' | 'NORMAL' | 'FAST';
271
+
272
+ /**
273
+ * Last update timestamp
274
+ */
275
+ updatedAt: string;
276
+
277
+ /**
278
+ * Background story and behavioral patterns for the persona
279
+ */
280
+ backstoryPrompt?: string | null;
281
+
282
+ /**
283
+ * Additional custom properties about the persona
284
+ */
285
+ properties?: { [key: string]: unknown };
286
+
287
+ /**
288
+ * Secondary language for code-switching (e.g., Hinglish, Spanglish)
289
+ */
290
+ secondaryLanguage?: 'EN' | null;
291
+ }
292
+ }
293
+
294
+ export interface PersonaFindAllResponse {
295
+ data: Array<PersonaFindAllResponse.Data>;
296
+
297
+ pagination: PersonaFindAllResponse.Pagination;
298
+ }
299
+
300
+ export namespace PersonaFindAllResponse {
301
+ export interface Data {
302
+ /**
303
+ * Unique identifier of the persona
304
+ */
305
+ id: string;
306
+
307
+ /**
308
+ * Accent of the persona
309
+ */
310
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU';
311
+
312
+ /**
313
+ * Background noise setting
314
+ */
315
+ backgroundNoise: 'NONE' | 'OFFICE';
316
+
317
+ /**
318
+ * Base emotional state of the persona
319
+ */
320
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
321
+
322
+ /**
323
+ * How the persona confirms information
324
+ */
325
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
326
+
327
+ /**
328
+ * Creation timestamp
329
+ */
330
+ createdAt: string;
331
+
332
+ /**
333
+ * Gender of the persona
334
+ */
335
+ gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
336
+
337
+ /**
338
+ * Whether the persona uses filler words like "um" and "uh"
339
+ */
340
+ hasDisfluencies: boolean;
341
+
342
+ /**
343
+ * How clearly the persona expresses their intentions
344
+ */
345
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
346
+
347
+ /**
348
+ * Primary language for the persona
349
+ */
350
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL';
351
+
352
+ /**
353
+ * How reliable the persona's memory is
354
+ */
355
+ memoryReliability: 'HIGH' | 'LOW';
356
+
357
+ /**
358
+ * The name the agent will identify as during conversations
359
+ */
360
+ name: string;
361
+
362
+ /**
363
+ * Speech clarity of the persona
364
+ */
365
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
366
+
367
+ /**
368
+ * Speech pace of the persona
369
+ */
370
+ speechPace: 'SLOW' | 'NORMAL' | 'FAST';
371
+
372
+ /**
373
+ * Last update timestamp
374
+ */
375
+ updatedAt: string;
376
+
377
+ /**
378
+ * Background story and behavioral patterns for the persona
379
+ */
380
+ backstoryPrompt?: string | null;
381
+
382
+ /**
383
+ * Additional custom properties about the persona
384
+ */
385
+ properties?: { [key: string]: unknown };
386
+
387
+ /**
388
+ * Secondary language for code-switching (e.g., Hinglish, Spanglish)
389
+ */
390
+ secondaryLanguage?: 'EN' | null;
391
+ }
392
+
393
+ export interface Pagination {
394
+ /**
395
+ * Whether there are more items to fetch
396
+ */
397
+ hasMore: boolean;
398
+
399
+ /**
400
+ * Cursor for the next page of items
401
+ */
402
+ nextCursor: string | null;
403
+
404
+ /**
405
+ * Total number of items
406
+ */
407
+ total: number;
408
+ }
409
+ }
410
+
411
+ export interface PersonaGetByIDResponse {
412
+ data: PersonaGetByIDResponse.Data;
413
+ }
414
+
415
+ export namespace PersonaGetByIDResponse {
416
+ export interface Data {
417
+ /**
418
+ * Unique identifier of the persona
419
+ */
420
+ id: string;
421
+
422
+ /**
423
+ * Accent of the persona
424
+ */
425
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU';
426
+
427
+ /**
428
+ * Background noise setting
429
+ */
430
+ backgroundNoise: 'NONE' | 'OFFICE';
431
+
432
+ /**
433
+ * Base emotional state of the persona
434
+ */
435
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
436
+
437
+ /**
438
+ * How the persona confirms information
439
+ */
440
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
441
+
442
+ /**
443
+ * Creation timestamp
444
+ */
445
+ createdAt: string;
446
+
447
+ /**
448
+ * Gender of the persona
449
+ */
450
+ gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
451
+
452
+ /**
453
+ * Whether the persona uses filler words like "um" and "uh"
454
+ */
455
+ hasDisfluencies: boolean;
456
+
457
+ /**
458
+ * How clearly the persona expresses their intentions
459
+ */
460
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
461
+
462
+ /**
463
+ * Primary language for the persona
464
+ */
465
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL';
466
+
467
+ /**
468
+ * How reliable the persona's memory is
469
+ */
470
+ memoryReliability: 'HIGH' | 'LOW';
471
+
472
+ /**
473
+ * The name the agent will identify as during conversations
474
+ */
475
+ name: string;
476
+
477
+ /**
478
+ * Speech clarity of the persona
479
+ */
480
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
481
+
482
+ /**
483
+ * Speech pace of the persona
484
+ */
485
+ speechPace: 'SLOW' | 'NORMAL' | 'FAST';
486
+
487
+ /**
488
+ * Last update timestamp
489
+ */
490
+ updatedAt: string;
491
+
492
+ /**
493
+ * Background story and behavioral patterns for the persona
494
+ */
495
+ backstoryPrompt?: string | null;
496
+
497
+ /**
498
+ * Additional custom properties about the persona
499
+ */
500
+ properties?: { [key: string]: unknown };
501
+
502
+ /**
503
+ * Secondary language for code-switching (e.g., Hinglish, Spanglish)
504
+ */
505
+ secondaryLanguage?: 'EN' | null;
506
+ }
507
+ }
508
+
509
+ export interface PersonaCreateParams {
510
+ /**
511
+ * Accent of the persona
512
+ */
513
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU';
514
+
515
+ /**
516
+ * Background noise setting
517
+ */
518
+ backgroundNoise: 'NONE' | 'OFFICE';
519
+
520
+ /**
521
+ * Base emotional state of the persona
522
+ */
523
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
524
+
525
+ /**
526
+ * How the persona confirms information
527
+ */
528
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
529
+
530
+ /**
531
+ * Gender of the persona
532
+ */
533
+ gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
534
+
535
+ /**
536
+ * Whether the persona uses filler words like "um" and "uh"
537
+ */
538
+ hasDisfluencies: boolean;
539
+
540
+ /**
541
+ * How clearly the persona expresses their intentions
542
+ */
543
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
544
+
545
+ /**
546
+ * Primary language for the persona
547
+ */
548
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL';
549
+
550
+ /**
551
+ * How reliable the persona's memory is
552
+ */
553
+ memoryReliability: 'HIGH' | 'LOW';
554
+
555
+ /**
556
+ * The name the agent will identify as during conversations
557
+ */
558
+ name: string;
559
+
560
+ /**
561
+ * Speech clarity of the persona
562
+ */
563
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
564
+
565
+ /**
566
+ * Speech pace of the persona
567
+ */
568
+ speechPace: 'SLOW' | 'NORMAL' | 'FAST';
569
+
570
+ /**
571
+ * Background story and behavioral patterns for the persona
572
+ */
573
+ backstoryPrompt?: string | null;
574
+
575
+ /**
576
+ * Additional custom properties about the persona
577
+ */
578
+ properties?: { [key: string]: unknown };
579
+
580
+ /**
581
+ * Secondary language for code-switching (e.g., Hinglish, Spanglish)
582
+ */
583
+ secondaryLanguage?: 'EN' | null;
584
+ }
585
+
586
+ export interface PersonaUpdateParams {
587
+ /**
588
+ * Accent of the persona
589
+ */
590
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU';
591
+
592
+ /**
593
+ * Background noise setting
594
+ */
595
+ backgroundNoise: 'NONE' | 'OFFICE';
596
+
597
+ /**
598
+ * Base emotional state of the persona
599
+ */
600
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED';
601
+
602
+ /**
603
+ * How the persona confirms information
604
+ */
605
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
606
+
607
+ /**
608
+ * Gender of the persona
609
+ */
610
+ gender: 'MALE' | 'FEMALE' | 'NEUTRAL';
611
+
612
+ /**
613
+ * Whether the persona uses filler words like "um" and "uh"
614
+ */
615
+ hasDisfluencies: boolean;
616
+
617
+ /**
618
+ * How clearly the persona expresses their intentions
619
+ */
620
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
621
+
622
+ /**
623
+ * Primary language for the persona
624
+ */
625
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL';
626
+
627
+ /**
628
+ * How reliable the persona's memory is
629
+ */
630
+ memoryReliability: 'HIGH' | 'LOW';
631
+
632
+ /**
633
+ * The name the agent will identify as during conversations
634
+ */
635
+ name: string;
636
+
637
+ /**
638
+ * Speech clarity of the persona
639
+ */
640
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
641
+
642
+ /**
643
+ * Speech pace of the persona
644
+ */
645
+ speechPace: 'SLOW' | 'NORMAL' | 'FAST';
646
+
647
+ /**
648
+ * Background story and behavioral patterns for the persona
649
+ */
650
+ backstoryPrompt?: string | null;
651
+
652
+ /**
653
+ * Additional custom properties about the persona
654
+ */
655
+ properties?: { [key: string]: unknown };
656
+
657
+ /**
658
+ * Secondary language for code-switching (e.g., Hinglish, Spanglish)
659
+ */
660
+ secondaryLanguage?: 'EN' | null;
661
+ }
662
+
663
+ export interface PersonaFindAllParams {
664
+ after?: string;
665
+
666
+ limit?: number;
667
+
668
+ searchText?: string;
669
+ }
670
+
671
+ export declare namespace Persona {
672
+ export {
673
+ type PersonaCreateResponse as PersonaCreateResponse,
674
+ type PersonaUpdateResponse as PersonaUpdateResponse,
675
+ type PersonaFindAllResponse as PersonaFindAllResponse,
676
+ type PersonaGetByIDResponse as PersonaGetByIDResponse,
677
+ type PersonaCreateParams as PersonaCreateParams,
678
+ type PersonaUpdateParams as PersonaUpdateParams,
679
+ type PersonaFindAllParams as PersonaFindAllParams,
680
+ };
681
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.8.0'; // x-release-please-version
1
+ export const VERSION = '2.9.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.8.0";
1
+ export declare const VERSION = "2.9.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.8.0'; // x-release-please-version
4
+ exports.VERSION = '2.9.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.8.0'; // x-release-please-version
1
+ export const VERSION = '2.9.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map