@roarkanalytics/sdk 2.4.1 → 2.6.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 +16 -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 +328 -0
  47. package/resources/simulation.d.ts.map +1 -0
  48. package/resources/simulation.js +35 -0
  49. package/resources/simulation.js.map +1 -0
  50. package/resources/simulation.mjs +31 -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 +403 -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.6.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 SimulationGetJobByIDResponse, type SimulationLookupJobResponse, type SimulationLookupJobParams, } 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,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B,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,328 @@
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 directly by its ID
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const response = await client.simulation.getJobById(
10
+ * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
11
+ * );
12
+ * ```
13
+ */
14
+ getJobById(jobId: unknown, options?: Core.RequestOptions): Core.APIPromise<SimulationGetJobByIDResponse>;
15
+ /**
16
+ * Find a simulation job by looking up the active lease for the given phone numbers
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const response = await client.simulation.lookupJob({
21
+ * roarkPhoneNumber: {},
22
+ * });
23
+ * ```
24
+ */
25
+ lookupJob(query: SimulationLookupJobParams, options?: Core.RequestOptions): Core.APIPromise<SimulationLookupJobResponse>;
26
+ }
27
+ export interface SimulationGetJobByIDResponse {
28
+ /**
29
+ * Simulation job with related entities
30
+ */
31
+ data: SimulationGetJobByIDResponse.Data;
32
+ }
33
+ export declare namespace SimulationGetJobByIDResponse {
34
+ /**
35
+ * Simulation job with related entities
36
+ */
37
+ interface Data {
38
+ /**
39
+ * Agent endpoint used in the simulation
40
+ */
41
+ agentEndpoint: Data.AgentEndpoint;
42
+ /**
43
+ * When the job was created
44
+ */
45
+ createdAt: string;
46
+ /**
47
+ * Persona used in the simulation
48
+ */
49
+ persona: Data.Persona;
50
+ /**
51
+ * Processing status
52
+ */
53
+ processingStatus: string;
54
+ /**
55
+ * Scenario used in the simulation
56
+ */
57
+ scenario: Data.Scenario;
58
+ /**
59
+ * Simulation job ID
60
+ */
61
+ simulationJobId: string;
62
+ /**
63
+ * Job status
64
+ */
65
+ status: string;
66
+ /**
67
+ * When the job completed
68
+ */
69
+ completedAt?: string | null;
70
+ /**
71
+ * When the job started
72
+ */
73
+ startedAt?: string | null;
74
+ }
75
+ namespace Data {
76
+ /**
77
+ * Agent endpoint used in the simulation
78
+ */
79
+ interface AgentEndpoint {
80
+ /**
81
+ * Agent endpoint ID
82
+ */
83
+ id: string;
84
+ /**
85
+ * Agent endpoint type
86
+ */
87
+ endpointType: string;
88
+ /**
89
+ * Agent endpoint name
90
+ */
91
+ name: string;
92
+ /**
93
+ * Agent endpoint phone number
94
+ */
95
+ phoneNumber: string | null;
96
+ }
97
+ /**
98
+ * Persona used in the simulation
99
+ */
100
+ interface Persona {
101
+ /**
102
+ * Persona ID
103
+ */
104
+ id: string;
105
+ /**
106
+ * Accent of the persona
107
+ */
108
+ accent: string;
109
+ /**
110
+ * Background noise setting
111
+ */
112
+ backgroundNoise: string;
113
+ /**
114
+ * Base emotion of the persona
115
+ */
116
+ baseEmotion: string;
117
+ /**
118
+ * How the persona confirms information
119
+ */
120
+ confirmationStyle: string;
121
+ /**
122
+ * Whether persona has speech disfluencies
123
+ */
124
+ disfluencies: boolean;
125
+ /**
126
+ * Gender of the persona
127
+ */
128
+ gender: string;
129
+ /**
130
+ * How clearly the persona expresses intent
131
+ */
132
+ intentClarity: string;
133
+ /**
134
+ * Language of the persona
135
+ */
136
+ language: string;
137
+ /**
138
+ * Reliability of persona memory
139
+ */
140
+ memoryReliability: string;
141
+ /**
142
+ * Persona name
143
+ */
144
+ name: string;
145
+ /**
146
+ * Speech clarity
147
+ */
148
+ speechClarity: string;
149
+ /**
150
+ * Speech pace
151
+ */
152
+ speechPace: string;
153
+ }
154
+ /**
155
+ * Scenario used in the simulation
156
+ */
157
+ interface Scenario {
158
+ /**
159
+ * Scenario ID
160
+ */
161
+ id: string;
162
+ /**
163
+ * Scenario description
164
+ */
165
+ description?: string | null;
166
+ }
167
+ }
168
+ }
169
+ export interface SimulationLookupJobResponse {
170
+ /**
171
+ * Simulation job with related entities
172
+ */
173
+ data: SimulationLookupJobResponse.Data;
174
+ }
175
+ export declare namespace SimulationLookupJobResponse {
176
+ /**
177
+ * Simulation job with related entities
178
+ */
179
+ interface Data {
180
+ /**
181
+ * Agent endpoint used in the simulation
182
+ */
183
+ agentEndpoint: Data.AgentEndpoint;
184
+ /**
185
+ * When the job was created
186
+ */
187
+ createdAt: string;
188
+ /**
189
+ * Persona used in the simulation
190
+ */
191
+ persona: Data.Persona;
192
+ /**
193
+ * Processing status
194
+ */
195
+ processingStatus: string;
196
+ /**
197
+ * Scenario used in the simulation
198
+ */
199
+ scenario: Data.Scenario;
200
+ /**
201
+ * Simulation job ID
202
+ */
203
+ simulationJobId: string;
204
+ /**
205
+ * Job status
206
+ */
207
+ status: string;
208
+ /**
209
+ * When the job completed
210
+ */
211
+ completedAt?: string | null;
212
+ /**
213
+ * When the job started
214
+ */
215
+ startedAt?: string | null;
216
+ }
217
+ namespace Data {
218
+ /**
219
+ * Agent endpoint used in the simulation
220
+ */
221
+ interface AgentEndpoint {
222
+ /**
223
+ * Agent endpoint ID
224
+ */
225
+ id: string;
226
+ /**
227
+ * Agent endpoint type
228
+ */
229
+ endpointType: string;
230
+ /**
231
+ * Agent endpoint name
232
+ */
233
+ name: string;
234
+ /**
235
+ * Agent endpoint phone number
236
+ */
237
+ phoneNumber: string | null;
238
+ }
239
+ /**
240
+ * Persona used in the simulation
241
+ */
242
+ interface Persona {
243
+ /**
244
+ * Persona ID
245
+ */
246
+ id: string;
247
+ /**
248
+ * Accent of the persona
249
+ */
250
+ accent: string;
251
+ /**
252
+ * Background noise setting
253
+ */
254
+ backgroundNoise: string;
255
+ /**
256
+ * Base emotion of the persona
257
+ */
258
+ baseEmotion: string;
259
+ /**
260
+ * How the persona confirms information
261
+ */
262
+ confirmationStyle: string;
263
+ /**
264
+ * Whether persona has speech disfluencies
265
+ */
266
+ disfluencies: boolean;
267
+ /**
268
+ * Gender of the persona
269
+ */
270
+ gender: string;
271
+ /**
272
+ * How clearly the persona expresses intent
273
+ */
274
+ intentClarity: string;
275
+ /**
276
+ * Language of the persona
277
+ */
278
+ language: string;
279
+ /**
280
+ * Reliability of persona memory
281
+ */
282
+ memoryReliability: string;
283
+ /**
284
+ * Persona name
285
+ */
286
+ name: string;
287
+ /**
288
+ * Speech clarity
289
+ */
290
+ speechClarity: string;
291
+ /**
292
+ * Speech pace
293
+ */
294
+ speechPace: string;
295
+ }
296
+ /**
297
+ * Scenario used in the simulation
298
+ */
299
+ interface Scenario {
300
+ /**
301
+ * Scenario ID
302
+ */
303
+ id: string;
304
+ /**
305
+ * Scenario description
306
+ */
307
+ description?: string | null;
308
+ }
309
+ }
310
+ }
311
+ export interface SimulationLookupJobParams {
312
+ /**
313
+ * Phone number provisioned by Roark for the simulation job in E.164 format. In the
314
+ * case of an inbound simulation, this is the number that calls your agent; in the
315
+ * case of an outbound simulation, this is the number you call from your agent.
316
+ */
317
+ roarkPhoneNumber: unknown;
318
+ /**
319
+ * ISO 8601 timestamp of when the call was received. Alternatively, any time
320
+ * between the start and end of the call is valid. Defaults to the current time,
321
+ * which fetches any jobs that are currently ongoing.
322
+ */
323
+ callReceivedAt?: unknown;
324
+ }
325
+ export declare namespace Simulation {
326
+ export { type SimulationGetJobByIDResponse as SimulationGetJobByIDResponse, type SimulationLookupJobResponse as SimulationLookupJobResponse, type SimulationLookupJobParams as SimulationLookupJobParams, };
327
+ }
328
+ //# 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;;;;;;;;;OASG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAIxG;;;;;;;;;OASG;IACH,SAAS,CACP,KAAK,EAAE,yBAAyB,EAChC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC;CAGhD;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAC;CACzC;AAED,yBAAiB,4BAA4B,CAAC;IAC5C;;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;Q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eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,aAAa,EAAE,MAAM,CAAC;YAEtB;;eAEG;YACH,QAAQ,EAAE,MAAM,CAAC;YAEjB;;eAEG;YACH,iBAAiB,EAAE,MAAM,CAAC;YAE1B;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YAEb;;eAEG;YACH,aAAa,EAAE,MAAM,CAAC;YAEtB;;eAEG;YACH,UAAU,EAAE,MAAM,CAAC;SACpB;QAED;;WAEG;QACH,UAAiB,QAAQ;YACvB;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC7B;KACF;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -0,0 +1,35 @@
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 directly by its ID
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const response = await client.simulation.getJobById(
13
+ * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
14
+ * );
15
+ * ```
16
+ */
17
+ getJobById(jobId, options) {
18
+ return this._client.get(`/v1/simulation/job/${jobId}`, options);
19
+ }
20
+ /**
21
+ * Find a simulation job by looking up the active lease for the given phone numbers
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const response = await client.simulation.lookupJob({
26
+ * roarkPhoneNumber: {},
27
+ * });
28
+ * ```
29
+ */
30
+ lookupJob(query, options) {
31
+ return this._client.get('/v1/simulation/job/lookup', { query, ...options });
32
+ }
33
+ }
34
+ exports.Simulation = Simulation;
35
+ //# 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;;;;;;;;;OASG;IACH,UAAU,CAAC,KAAc,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CACP,KAAgC,EAChC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA/BD,gCA+BC"}