@roarkanalytics/sdk 2.4.1 → 2.5.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 (65) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.d.mts +4 -0
  3. package/index.d.ts +4 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +7 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +7 -0
  8. package/index.mjs.map +1 -1
  9. package/internal/qs/formats.d.ts +6 -0
  10. package/internal/qs/formats.d.ts.map +1 -0
  11. package/internal/qs/formats.js +11 -0
  12. package/internal/qs/formats.js.map +1 -0
  13. package/internal/qs/formats.mjs +8 -0
  14. package/internal/qs/formats.mjs.map +1 -0
  15. package/internal/qs/index.d.ts +10 -0
  16. package/internal/qs/index.d.ts.map +1 -0
  17. package/internal/qs/index.js +14 -0
  18. package/internal/qs/index.js.map +1 -0
  19. package/internal/qs/index.mjs +10 -0
  20. package/internal/qs/index.mjs.map +1 -0
  21. package/internal/qs/stringify.d.ts +3 -0
  22. package/internal/qs/stringify.d.ts.map +1 -0
  23. package/internal/qs/stringify.js +280 -0
  24. package/internal/qs/stringify.js.map +1 -0
  25. package/internal/qs/stringify.mjs +276 -0
  26. package/internal/qs/stringify.mjs.map +1 -0
  27. package/internal/qs/types.d.ts +57 -0
  28. package/internal/qs/types.d.ts.map +1 -0
  29. package/internal/qs/types.js +3 -0
  30. package/internal/qs/types.js.map +1 -0
  31. package/internal/qs/types.mjs +2 -0
  32. package/internal/qs/types.mjs.map +1 -0
  33. package/internal/qs/utils.d.ts +14 -0
  34. package/internal/qs/utils.d.ts.map +1 -0
  35. package/internal/qs/utils.js +229 -0
  36. package/internal/qs/utils.js.map +1 -0
  37. package/internal/qs/utils.mjs +217 -0
  38. package/internal/qs/utils.mjs.map +1 -0
  39. package/package.json +1 -1
  40. package/resources/index.d.ts +1 -0
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js +3 -1
  43. package/resources/index.js.map +1 -1
  44. package/resources/index.mjs +1 -0
  45. package/resources/index.mjs.map +1 -1
  46. package/resources/simulation.d.ts +314 -0
  47. package/resources/simulation.d.ts.map +1 -0
  48. package/resources/simulation.js +21 -0
  49. package/resources/simulation.js.map +1 -0
  50. package/resources/simulation.mjs +17 -0
  51. package/resources/simulation.mjs.map +1 -0
  52. package/src/index.ts +20 -0
  53. package/src/internal/qs/LICENSE.md +13 -0
  54. package/src/internal/qs/README.md +3 -0
  55. package/src/internal/qs/formats.ts +9 -0
  56. package/src/internal/qs/index.ts +13 -0
  57. package/src/internal/qs/stringify.ts +388 -0
  58. package/src/internal/qs/types.ts +71 -0
  59. package/src/internal/qs/utils.ts +265 -0
  60. package/src/resources/index.ts +6 -0
  61. package/src/resources/simulation.ts +390 -0
  62. package/src/version.ts +1 -1
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/version.mjs +1 -1
@@ -0,0 +1,217 @@
1
+ import { RFC1738 } from "./formats.mjs";
2
+ const has = Object.prototype.hasOwnProperty;
3
+ const is_array = Array.isArray;
4
+ const hex_table = (() => {
5
+ const array = [];
6
+ for (let i = 0; i < 256; ++i) {
7
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
8
+ }
9
+ return array;
10
+ })();
11
+ function compact_queue(queue) {
12
+ while (queue.length > 1) {
13
+ const item = queue.pop();
14
+ if (!item)
15
+ continue;
16
+ const obj = item.obj[item.prop];
17
+ if (is_array(obj)) {
18
+ const compacted = [];
19
+ for (let j = 0; j < obj.length; ++j) {
20
+ if (typeof obj[j] !== 'undefined') {
21
+ compacted.push(obj[j]);
22
+ }
23
+ }
24
+ // @ts-ignore
25
+ item.obj[item.prop] = compacted;
26
+ }
27
+ }
28
+ }
29
+ function array_to_object(source, options) {
30
+ const obj = options && options.plainObjects ? Object.create(null) : {};
31
+ for (let i = 0; i < source.length; ++i) {
32
+ if (typeof source[i] !== 'undefined') {
33
+ obj[i] = source[i];
34
+ }
35
+ }
36
+ return obj;
37
+ }
38
+ export function merge(target, source, options = {}) {
39
+ if (!source) {
40
+ return target;
41
+ }
42
+ if (typeof source !== 'object') {
43
+ if (is_array(target)) {
44
+ target.push(source);
45
+ }
46
+ else if (target && typeof target === 'object') {
47
+ if ((options && (options.plainObjects || options.allowPrototypes)) ||
48
+ !has.call(Object.prototype, source)) {
49
+ target[source] = true;
50
+ }
51
+ }
52
+ else {
53
+ return [target, source];
54
+ }
55
+ return target;
56
+ }
57
+ if (!target || typeof target !== 'object') {
58
+ return [target].concat(source);
59
+ }
60
+ let mergeTarget = target;
61
+ if (is_array(target) && !is_array(source)) {
62
+ // @ts-ignore
63
+ mergeTarget = array_to_object(target, options);
64
+ }
65
+ if (is_array(target) && is_array(source)) {
66
+ source.forEach(function (item, i) {
67
+ if (has.call(target, i)) {
68
+ const targetItem = target[i];
69
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
70
+ target[i] = merge(targetItem, item, options);
71
+ }
72
+ else {
73
+ target.push(item);
74
+ }
75
+ }
76
+ else {
77
+ target[i] = item;
78
+ }
79
+ });
80
+ return target;
81
+ }
82
+ return Object.keys(source).reduce(function (acc, key) {
83
+ const value = source[key];
84
+ if (has.call(acc, key)) {
85
+ acc[key] = merge(acc[key], value, options);
86
+ }
87
+ else {
88
+ acc[key] = value;
89
+ }
90
+ return acc;
91
+ }, mergeTarget);
92
+ }
93
+ export function assign_single_source(target, source) {
94
+ return Object.keys(source).reduce(function (acc, key) {
95
+ acc[key] = source[key];
96
+ return acc;
97
+ }, target);
98
+ }
99
+ export function decode(str, _, charset) {
100
+ const strWithoutPlus = str.replace(/\+/g, ' ');
101
+ if (charset === 'iso-8859-1') {
102
+ // unescape never throws, no try...catch needed:
103
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
104
+ }
105
+ // utf-8
106
+ try {
107
+ return decodeURIComponent(strWithoutPlus);
108
+ }
109
+ catch (e) {
110
+ return strWithoutPlus;
111
+ }
112
+ }
113
+ const limit = 1024;
114
+ export const encode = (str, _defaultEncoder, charset, _kind, format) => {
115
+ // This code was originally written by Brian White for the io.js core querystring library.
116
+ // It has been adapted here for stricter adherence to RFC 3986
117
+ if (str.length === 0) {
118
+ return str;
119
+ }
120
+ let string = str;
121
+ if (typeof str === 'symbol') {
122
+ string = Symbol.prototype.toString.call(str);
123
+ }
124
+ else if (typeof str !== 'string') {
125
+ string = String(str);
126
+ }
127
+ if (charset === 'iso-8859-1') {
128
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
129
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
130
+ });
131
+ }
132
+ let out = '';
133
+ for (let j = 0; j < string.length; j += limit) {
134
+ const segment = string.length >= limit ? string.slice(j, j + limit) : string;
135
+ const arr = [];
136
+ for (let i = 0; i < segment.length; ++i) {
137
+ let c = segment.charCodeAt(i);
138
+ if (c === 0x2d || // -
139
+ c === 0x2e || // .
140
+ c === 0x5f || // _
141
+ c === 0x7e || // ~
142
+ (c >= 0x30 && c <= 0x39) || // 0-9
143
+ (c >= 0x41 && c <= 0x5a) || // a-z
144
+ (c >= 0x61 && c <= 0x7a) || // A-Z
145
+ (format === RFC1738 && (c === 0x28 || c === 0x29)) // ( )
146
+ ) {
147
+ arr[arr.length] = segment.charAt(i);
148
+ continue;
149
+ }
150
+ if (c < 0x80) {
151
+ arr[arr.length] = hex_table[c];
152
+ continue;
153
+ }
154
+ if (c < 0x800) {
155
+ arr[arr.length] = hex_table[0xc0 | (c >> 6)] + hex_table[0x80 | (c & 0x3f)];
156
+ continue;
157
+ }
158
+ if (c < 0xd800 || c >= 0xe000) {
159
+ arr[arr.length] =
160
+ hex_table[0xe0 | (c >> 12)] + hex_table[0x80 | ((c >> 6) & 0x3f)] + hex_table[0x80 | (c & 0x3f)];
161
+ continue;
162
+ }
163
+ i += 1;
164
+ c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));
165
+ arr[arr.length] =
166
+ hex_table[0xf0 | (c >> 18)] +
167
+ hex_table[0x80 | ((c >> 12) & 0x3f)] +
168
+ hex_table[0x80 | ((c >> 6) & 0x3f)] +
169
+ hex_table[0x80 | (c & 0x3f)];
170
+ }
171
+ out += arr.join('');
172
+ }
173
+ return out;
174
+ };
175
+ export function compact(value) {
176
+ const queue = [{ obj: { o: value }, prop: 'o' }];
177
+ const refs = [];
178
+ for (let i = 0; i < queue.length; ++i) {
179
+ const item = queue[i];
180
+ // @ts-ignore
181
+ const obj = item.obj[item.prop];
182
+ const keys = Object.keys(obj);
183
+ for (let j = 0; j < keys.length; ++j) {
184
+ const key = keys[j];
185
+ const val = obj[key];
186
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
187
+ queue.push({ obj: obj, prop: key });
188
+ refs.push(val);
189
+ }
190
+ }
191
+ }
192
+ compact_queue(queue);
193
+ return value;
194
+ }
195
+ export function is_regexp(obj) {
196
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
197
+ }
198
+ export function is_buffer(obj) {
199
+ if (!obj || typeof obj !== 'object') {
200
+ return false;
201
+ }
202
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
203
+ }
204
+ export function combine(a, b) {
205
+ return [].concat(a, b);
206
+ }
207
+ export function maybe_map(val, fn) {
208
+ if (is_array(val)) {
209
+ const mapped = [];
210
+ for (let i = 0; i < val.length; i += 1) {
211
+ mapped.push(fn(val[i]));
212
+ }
213
+ return mapped;
214
+ }
215
+ return fn(val);
216
+ }
217
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../../src/internal/qs/utils.ts"],"names":[],"mappings":"OAAO,EAAE,OAAO,EAAE;AAGlB,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;AAE/B,MAAM,SAAS,GAAG,CAAC,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AAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,iBAAiB,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAQ;IAChC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QACnC,OAAO,KAAK,CAAC;KACd;IAED,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,QAAQ,IAAI,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,SAAS,CAAI,GAAQ,EAAE,EAAe;IACpD,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;QACjB,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YACtC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC;SAC1B;QACD,OAAO,MAAM,CAAC;KACf;IACD,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roarkanalytics/sdk",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "The official TypeScript library for the Roark API",
5
5
  "author": "Roark <james@roark.ai>",
6
6
  "types": "./index.d.ts",
@@ -2,4 +2,5 @@ export { Call, type CallGetEvaluationRunsResponse, type CallGetSentimentRunsResp
2
2
  export { Evaluation, type EvaluationCreateJobResponse, type EvaluationGetEvaluatorByIDResponse, type EvaluationGetEvaluatorsResponse, type EvaluationGetJobResponse, type EvaluationGetJobRunsResponse, type EvaluationCreateJobParams, type EvaluationGetEvaluatorsParams, type EvaluationGetJobRunsParams, } from "./evaluation.js";
3
3
  export { Health, type HealthGetResponse } from "./health.js";
4
4
  export { Integrations, type IntegrationCreateRetellCallResponse, type IntegrationCreateVapiCallResponse, type IntegrationCreateRetellCallParams, type IntegrationCreateVapiCallParams, } from "./integrations.js";
5
+ export { Simulation, type SimulationGetJobResponse, type SimulationGetJobByIDResponse, type SimulationGetJobParams, } from "./simulation.js";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,6BAA6B,EAAE,KAAK,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AACrG,OAAO,EACL,UAAU,EACV,KAAK,2BAA2B,EAChC,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,GACrC,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,6BAA6B,EAAE,KAAK,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AACrG,OAAO,EACL,UAAU,EACV,KAAK,2BAA2B,EAChC,KAAK,kCAAkC,EACvC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,GACrC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EACV,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,GAC5B,MAAM,cAAc,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Integrations = exports.Health = exports.Evaluation = exports.Call = void 0;
4
+ exports.Simulation = exports.Integrations = exports.Health = exports.Evaluation = exports.Call = void 0;
5
5
  var call_1 = require("./call.js");
6
6
  Object.defineProperty(exports, "Call", { enumerable: true, get: function () { return call_1.Call; } });
7
7
  var evaluation_1 = require("./evaluation.js");
@@ -10,4 +10,6 @@ var health_1 = require("./health.js");
10
10
  Object.defineProperty(exports, "Health", { enumerable: true, get: function () { return health_1.Health; } });
11
11
  var integrations_1 = require("./integrations.js");
12
12
  Object.defineProperty(exports, "Integrations", { enumerable: true, get: function () { return integrations_1.Integrations; } });
13
+ var simulation_1 = require("./simulation.js");
14
+ Object.defineProperty(exports, "Simulation", { enumerable: true, get: function () { return simulation_1.Simulation; } });
13
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAAqG;AAA5F,4FAAA,IAAI,OAAA;AACb,8CAUsB;AATpB,wGAAA,UAAU,OAAA;AAUZ,sCAA0D;AAAjD,gGAAA,MAAM,OAAA;AACf,kDAMwB;AALtB,4GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAAqG;AAA5F,4FAAA,IAAI,OAAA;AACb,8CAUsB;AATpB,wGAAA,UAAU,OAAA;AAUZ,sCAA0D;AAAjD,gGAAA,MAAM,OAAA;AACf,kDAMwB;AALtB,4GAAA,YAAY,OAAA;AAMd,8CAKsB;AAJpB,wGAAA,UAAU,OAAA"}
@@ -3,4 +3,5 @@ export { Call } from "./call.mjs";
3
3
  export { Evaluation, } from "./evaluation.mjs";
4
4
  export { Health } from "./health.mjs";
5
5
  export { Integrations, } from "./integrations.mjs";
6
+ export { Simulation, } from "./simulation.mjs";
6
7
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,IAAI,EAAyE;OAC/E,EACL,UAAU,GASX;OACM,EAAE,MAAM,EAA0B;OAClC,EACL,YAAY,GAKb"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,IAAI,EAAyE;OAC/E,EACL,UAAU,GASX;OACM,EAAE,MAAM,EAA0B;OAClC,EACL,YAAY,GAKb;OACM,EACL,UAAU,GAIX"}
@@ -0,0 +1,314 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Simulation extends APIResource {
4
+ /**
5
+ * Find a simulation job by looking up the active lease for the given phone numbers
6
+ */
7
+ getJob(query: SimulationGetJobParams, options?: Core.RequestOptions): Core.APIPromise<SimulationGetJobResponse>;
8
+ /**
9
+ * Find a simulation job directly by its ID
10
+ */
11
+ getJobById(jobId: unknown, options?: Core.RequestOptions): Core.APIPromise<SimulationGetJobByIDResponse>;
12
+ }
13
+ export interface SimulationGetJobResponse {
14
+ /**
15
+ * Simulation job with related entities
16
+ */
17
+ data: SimulationGetJobResponse.Data;
18
+ }
19
+ export declare namespace SimulationGetJobResponse {
20
+ /**
21
+ * Simulation job with related entities
22
+ */
23
+ interface Data {
24
+ /**
25
+ * Agent endpoint used in the simulation
26
+ */
27
+ agentEndpoint: Data.AgentEndpoint;
28
+ /**
29
+ * When the job was created
30
+ */
31
+ createdAt: string;
32
+ /**
33
+ * Persona used in the simulation
34
+ */
35
+ persona: Data.Persona;
36
+ /**
37
+ * Processing status
38
+ */
39
+ processingStatus: string;
40
+ /**
41
+ * Scenario used in the simulation
42
+ */
43
+ scenario: Data.Scenario;
44
+ /**
45
+ * Simulation job ID
46
+ */
47
+ simulationJobId: string;
48
+ /**
49
+ * Job status
50
+ */
51
+ status: string;
52
+ /**
53
+ * When the job completed
54
+ */
55
+ completedAt?: string | null;
56
+ /**
57
+ * When the job started
58
+ */
59
+ startedAt?: string | null;
60
+ }
61
+ namespace Data {
62
+ /**
63
+ * Agent endpoint used in the simulation
64
+ */
65
+ interface AgentEndpoint {
66
+ /**
67
+ * Agent endpoint ID
68
+ */
69
+ id: string;
70
+ /**
71
+ * Agent endpoint type
72
+ */
73
+ endpointType: string;
74
+ /**
75
+ * Agent endpoint name
76
+ */
77
+ name: string;
78
+ /**
79
+ * Agent endpoint phone number
80
+ */
81
+ phoneNumber: string | null;
82
+ }
83
+ /**
84
+ * Persona used in the simulation
85
+ */
86
+ interface Persona {
87
+ /**
88
+ * Persona ID
89
+ */
90
+ id: string;
91
+ /**
92
+ * Accent of the persona
93
+ */
94
+ accent: string;
95
+ /**
96
+ * Background noise setting
97
+ */
98
+ backgroundNoise: string;
99
+ /**
100
+ * Base emotion of the persona
101
+ */
102
+ baseEmotion: string;
103
+ /**
104
+ * How the persona confirms information
105
+ */
106
+ confirmationStyle: string;
107
+ /**
108
+ * Whether persona has speech disfluencies
109
+ */
110
+ disfluencies: boolean;
111
+ /**
112
+ * Gender of the persona
113
+ */
114
+ gender: string;
115
+ /**
116
+ * How clearly the persona expresses intent
117
+ */
118
+ intentClarity: string;
119
+ /**
120
+ * Language of the persona
121
+ */
122
+ language: string;
123
+ /**
124
+ * Reliability of persona memory
125
+ */
126
+ memoryReliability: string;
127
+ /**
128
+ * Persona name
129
+ */
130
+ name: string;
131
+ /**
132
+ * Speech clarity
133
+ */
134
+ speechClarity: string;
135
+ /**
136
+ * Speech pace
137
+ */
138
+ speechPace: string;
139
+ }
140
+ /**
141
+ * Scenario used in the simulation
142
+ */
143
+ interface Scenario {
144
+ /**
145
+ * Scenario ID
146
+ */
147
+ id: string;
148
+ /**
149
+ * Scenario description
150
+ */
151
+ description?: string | null;
152
+ }
153
+ }
154
+ }
155
+ export interface SimulationGetJobByIDResponse {
156
+ /**
157
+ * Simulation job with related entities
158
+ */
159
+ data: SimulationGetJobByIDResponse.Data;
160
+ }
161
+ export declare namespace SimulationGetJobByIDResponse {
162
+ /**
163
+ * Simulation job with related entities
164
+ */
165
+ interface Data {
166
+ /**
167
+ * Agent endpoint used in the simulation
168
+ */
169
+ agentEndpoint: Data.AgentEndpoint;
170
+ /**
171
+ * When the job was created
172
+ */
173
+ createdAt: string;
174
+ /**
175
+ * Persona used in the simulation
176
+ */
177
+ persona: Data.Persona;
178
+ /**
179
+ * Processing status
180
+ */
181
+ processingStatus: string;
182
+ /**
183
+ * Scenario used in the simulation
184
+ */
185
+ scenario: Data.Scenario;
186
+ /**
187
+ * Simulation job ID
188
+ */
189
+ simulationJobId: string;
190
+ /**
191
+ * Job status
192
+ */
193
+ status: string;
194
+ /**
195
+ * When the job completed
196
+ */
197
+ completedAt?: string | null;
198
+ /**
199
+ * When the job started
200
+ */
201
+ startedAt?: string | null;
202
+ }
203
+ namespace Data {
204
+ /**
205
+ * Agent endpoint used in the simulation
206
+ */
207
+ interface AgentEndpoint {
208
+ /**
209
+ * Agent endpoint ID
210
+ */
211
+ id: string;
212
+ /**
213
+ * Agent endpoint type
214
+ */
215
+ endpointType: string;
216
+ /**
217
+ * Agent endpoint name
218
+ */
219
+ name: string;
220
+ /**
221
+ * Agent endpoint phone number
222
+ */
223
+ phoneNumber: string | null;
224
+ }
225
+ /**
226
+ * Persona used in the simulation
227
+ */
228
+ interface Persona {
229
+ /**
230
+ * Persona ID
231
+ */
232
+ id: string;
233
+ /**
234
+ * Accent of the persona
235
+ */
236
+ accent: string;
237
+ /**
238
+ * Background noise setting
239
+ */
240
+ backgroundNoise: string;
241
+ /**
242
+ * Base emotion of the persona
243
+ */
244
+ baseEmotion: string;
245
+ /**
246
+ * How the persona confirms information
247
+ */
248
+ confirmationStyle: string;
249
+ /**
250
+ * Whether persona has speech disfluencies
251
+ */
252
+ disfluencies: boolean;
253
+ /**
254
+ * Gender of the persona
255
+ */
256
+ gender: string;
257
+ /**
258
+ * How clearly the persona expresses intent
259
+ */
260
+ intentClarity: string;
261
+ /**
262
+ * Language of the persona
263
+ */
264
+ language: string;
265
+ /**
266
+ * Reliability of persona memory
267
+ */
268
+ memoryReliability: string;
269
+ /**
270
+ * Persona name
271
+ */
272
+ name: string;
273
+ /**
274
+ * Speech clarity
275
+ */
276
+ speechClarity: string;
277
+ /**
278
+ * Speech pace
279
+ */
280
+ speechPace: string;
281
+ }
282
+ /**
283
+ * Scenario used in the simulation
284
+ */
285
+ interface Scenario {
286
+ /**
287
+ * Scenario ID
288
+ */
289
+ id: string;
290
+ /**
291
+ * Scenario description
292
+ */
293
+ description?: string | null;
294
+ }
295
+ }
296
+ }
297
+ export interface SimulationGetJobParams {
298
+ /**
299
+ * Customer phone number in E.164 format
300
+ */
301
+ phoneNumber: unknown;
302
+ /**
303
+ * Roark-assigned phone number in E.164 format
304
+ */
305
+ roarkPhoneNumber: unknown;
306
+ /**
307
+ * ISO 8601 timestamp to check for active lease (defaults to current time)
308
+ */
309
+ timestamp?: unknown;
310
+ }
311
+ export declare namespace Simulation {
312
+ export { type SimulationGetJobResponse as SimulationGetJobResponse, type SimulationGetJobByIDResponse as SimulationGetJobByIDResponse, type SimulationGetJobParams as SimulationGetJobParams, };
313
+ }
314
+ //# sourceMappingURL=simulation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation.d.ts","sourceRoot":"","sources":["../src/resources/simulation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CACJ,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAI5C;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAAC;CAGzG;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC;CACrC;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC;QAElC;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;QAEtB;;WAEG;QACH,gBAAgB,EAAE,MAAM,CAAC;QAEzB;;WAEG;QACH,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;QAExB;;WAEG;QACH,eAAe,EAAE,MAAM,CAAC;QAExB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B;IAED,UAAiB,IAAI,CAAC;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;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC7B;KACF;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Simulation = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ class Simulation extends resource_1.APIResource {
7
+ /**
8
+ * Find a simulation job by looking up the active lease for the given phone numbers
9
+ */
10
+ getJob(query, options) {
11
+ return this._client.get('/v1/simulation/job', { query, ...options });
12
+ }
13
+ /**
14
+ * Find a simulation job directly by its ID
15
+ */
16
+ getJobById(jobId, options) {
17
+ return this._client.get(`/v1/simulation/jobs/${jobId}`, options);
18
+ }
19
+ }
20
+ exports.Simulation = Simulation;
21
+ //# sourceMappingURL=simulation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation.js","sourceRoot":"","sources":["../src/resources/simulation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,MAAM,CACJ,KAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,KAAc,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;CACF;AAjBD,gCAiBC"}
@@ -0,0 +1,17 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ export class Simulation extends APIResource {
4
+ /**
5
+ * Find a simulation job by looking up the active lease for the given phone numbers
6
+ */
7
+ getJob(query, options) {
8
+ return this._client.get('/v1/simulation/job', { query, ...options });
9
+ }
10
+ /**
11
+ * Find a simulation job directly by its ID
12
+ */
13
+ getJobById(jobId, options) {
14
+ return this._client.get(`/v1/simulation/jobs/${jobId}`, options);
15
+ }
16
+ }
17
+ //# sourceMappingURL=simulation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation.mjs","sourceRoot":"","sources":["../src/resources/simulation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CACJ,KAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,KAAc,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;CACF"}