@roarkanalytics/sdk 2.7.1 → 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.
@@ -0,0 +1,71 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ import { isRequestOptions } from "../core.mjs";
4
+ export class Persona extends APIResource {
5
+ /**
6
+ * Creates a new persona for the authenticated project.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const persona = await client.persona.create({
11
+ * accent: 'US',
12
+ * backgroundNoise: 'NONE',
13
+ * baseEmotion: 'NEUTRAL',
14
+ * confirmationStyle: 'EXPLICIT',
15
+ * gender: 'MALE',
16
+ * hasDisfluencies: false,
17
+ * intentClarity: 'CLEAR',
18
+ * language: 'EN',
19
+ * memoryReliability: 'HIGH',
20
+ * name: 'Alex Morgan',
21
+ * speechClarity: 'CLEAR',
22
+ * speechPace: 'NORMAL',
23
+ * });
24
+ * ```
25
+ */
26
+ create(body, options) {
27
+ return this._client.post('/v1/persona', { body, ...options });
28
+ }
29
+ /**
30
+ * Updates an existing persona by its ID.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const persona = await client.persona.update('personaId', {
35
+ * accent: 'US',
36
+ * backgroundNoise: 'NONE',
37
+ * baseEmotion: 'NEUTRAL',
38
+ * confirmationStyle: 'EXPLICIT',
39
+ * gender: 'MALE',
40
+ * hasDisfluencies: false,
41
+ * intentClarity: 'CLEAR',
42
+ * language: 'EN',
43
+ * memoryReliability: 'HIGH',
44
+ * name: 'Alex Morgan',
45
+ * speechClarity: 'CLEAR',
46
+ * speechPace: 'NORMAL',
47
+ * });
48
+ * ```
49
+ */
50
+ update(personaId, body, options) {
51
+ return this._client.put(`/v1/persona/${personaId}`, { body, ...options });
52
+ }
53
+ findAll(query = {}, options) {
54
+ if (isRequestOptions(query)) {
55
+ return this.findAll({}, query);
56
+ }
57
+ return this._client.get('/v1/persona', { query, ...options });
58
+ }
59
+ /**
60
+ * Returns a specific persona by its ID.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const response = await client.persona.getById('personaId');
65
+ * ```
66
+ */
67
+ getById(personaId, options) {
68
+ return this._client.get(`/v1/persona/${personaId}`, options);
69
+ }
70
+ }
71
+ //# sourceMappingURL=persona.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persona.mjs","sourceRoot":"","sources":["../src/resources/persona.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CACJ,SAAiB,EACjB,IAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAeD,OAAO,CACL,QAAoD,EAAE,EACtD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAChC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,SAAiB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF"}
package/src/index.ts CHANGED
@@ -26,6 +26,16 @@ import {
26
26
  IntegrationCreateVapiCallResponse,
27
27
  Integrations,
28
28
  } from './resources/integrations';
29
+ import {
30
+ Persona,
31
+ PersonaCreateParams,
32
+ PersonaCreateResponse,
33
+ PersonaFindAllParams,
34
+ PersonaFindAllResponse,
35
+ PersonaGetByIDResponse,
36
+ PersonaUpdateParams,
37
+ PersonaUpdateResponse,
38
+ } from './resources/persona';
29
39
  import {
30
40
  Simulation,
31
41
  SimulationGetJobByIDResponse,
@@ -154,6 +164,7 @@ export class Roark extends Core.APIClient {
154
164
  call: API.Call = new API.Call(this);
155
165
  integrations: API.Integrations = new API.Integrations(this);
156
166
  simulation: API.Simulation = new API.Simulation(this);
167
+ persona: API.Persona = new API.Persona(this);
157
168
 
158
169
  /**
159
170
  * Check whether the base URL is set to its default.
@@ -207,6 +218,7 @@ Roark.Evaluation = Evaluation;
207
218
  Roark.Call = Call;
208
219
  Roark.Integrations = Integrations;
209
220
  Roark.Simulation = Simulation;
221
+ Roark.Persona = Persona;
210
222
 
211
223
  export declare namespace Roark {
212
224
  export type RequestOptions = Core.RequestOptions;
@@ -245,6 +257,17 @@ export declare namespace Roark {
245
257
  type SimulationLookupJobResponse as SimulationLookupJobResponse,
246
258
  type SimulationLookupJobParams as SimulationLookupJobParams,
247
259
  };
260
+
261
+ export {
262
+ Persona as Persona,
263
+ type PersonaCreateResponse as PersonaCreateResponse,
264
+ type PersonaUpdateResponse as PersonaUpdateResponse,
265
+ type PersonaFindAllResponse as PersonaFindAllResponse,
266
+ type PersonaGetByIDResponse as PersonaGetByIDResponse,
267
+ type PersonaCreateParams as PersonaCreateParams,
268
+ type PersonaUpdateParams as PersonaUpdateParams,
269
+ type PersonaFindAllParams as PersonaFindAllParams,
270
+ };
248
271
  }
249
272
 
250
273
  export { toFile, fileFromPath } from './uploads';
@@ -20,6 +20,16 @@ export {
20
20
  type IntegrationCreateRetellCallParams,
21
21
  type IntegrationCreateVapiCallParams,
22
22
  } from './integrations';
23
+ export {
24
+ Persona,
25
+ type PersonaCreateResponse,
26
+ type PersonaUpdateResponse,
27
+ type PersonaFindAllResponse,
28
+ type PersonaGetByIDResponse,
29
+ type PersonaCreateParams,
30
+ type PersonaUpdateParams,
31
+ type PersonaFindAllParams,
32
+ } from './persona';
23
33
  export {
24
34
  Simulation,
25
35
  type SimulationGetJobByIDResponse,