@roarkanalytics/sdk 2.30.0 → 2.33.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 (245) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +17 -5
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +17 -5
  11. package/client.d.ts.map +1 -1
  12. package/client.js +35 -4
  13. package/client.js.map +1 -1
  14. package/client.mjs +35 -4
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/resource.d.mts.map +1 -1
  21. package/core/resource.d.ts.map +1 -1
  22. package/core/uploads.d.mts.map +1 -1
  23. package/core/uploads.d.ts.map +1 -1
  24. package/core/uploads.mjs.map +1 -1
  25. package/error.d.mts +1 -0
  26. package/error.d.mts.map +1 -1
  27. package/error.d.ts +1 -0
  28. package/error.d.ts.map +1 -1
  29. package/error.mjs +1 -0
  30. package/error.mjs.map +1 -1
  31. package/index.d.mts.map +1 -1
  32. package/index.d.ts.map +1 -1
  33. package/index.mjs.map +1 -1
  34. package/internal/detect-platform.mjs.map +1 -1
  35. package/internal/headers.mjs.map +1 -1
  36. package/internal/parse.d.mts.map +1 -1
  37. package/internal/parse.d.ts.map +1 -1
  38. package/internal/parse.mjs.map +1 -1
  39. package/internal/qs/formats.d.mts.map +1 -1
  40. package/internal/qs/formats.d.ts.map +1 -1
  41. package/internal/qs/index.d.mts +2 -2
  42. package/internal/qs/index.d.mts.map +1 -1
  43. package/internal/qs/index.d.ts +2 -2
  44. package/internal/qs/index.d.ts.map +1 -1
  45. package/internal/qs/index.mjs.map +1 -1
  46. package/internal/qs/stringify.d.mts.map +1 -1
  47. package/internal/qs/stringify.d.ts.map +1 -1
  48. package/internal/qs/stringify.mjs.map +1 -1
  49. package/internal/qs/utils.d.mts.map +1 -1
  50. package/internal/qs/utils.d.ts.map +1 -1
  51. package/internal/qs/utils.mjs.map +1 -1
  52. package/internal/request-options.d.mts.map +1 -1
  53. package/internal/request-options.d.ts.map +1 -1
  54. package/internal/shims.d.mts +6 -0
  55. package/internal/shims.d.mts.map +1 -1
  56. package/internal/shims.d.ts +6 -0
  57. package/internal/shims.d.ts.map +1 -1
  58. package/internal/to-file.d.mts.map +1 -1
  59. package/internal/to-file.d.ts.map +1 -1
  60. package/internal/to-file.mjs.map +1 -1
  61. package/internal/types.d.mts +10 -10
  62. package/internal/types.d.mts.map +1 -1
  63. package/internal/types.d.ts +10 -10
  64. package/internal/types.d.ts.map +1 -1
  65. package/internal/uploads.d.mts.map +1 -1
  66. package/internal/uploads.d.ts.map +1 -1
  67. package/internal/uploads.mjs.map +1 -1
  68. package/internal/utils/base64.mjs.map +1 -1
  69. package/internal/utils/log.d.mts.map +1 -1
  70. package/internal/utils/log.d.ts.map +1 -1
  71. package/internal/utils/log.js +2 -0
  72. package/internal/utils/log.js.map +1 -1
  73. package/internal/utils/log.mjs +2 -0
  74. package/internal/utils/log.mjs.map +1 -1
  75. package/internal/utils/path.mjs.map +1 -1
  76. package/internal/utils/query.mjs.map +1 -1
  77. package/internal/utils/values.mjs.map +1 -1
  78. package/internal/utils.d.mts.map +1 -1
  79. package/internal/utils.d.ts.map +1 -1
  80. package/internal/utils.mjs.map +1 -1
  81. package/package.json +1 -1
  82. package/resource.d.mts +1 -0
  83. package/resource.d.mts.map +1 -1
  84. package/resource.d.ts +1 -0
  85. package/resource.d.ts.map +1 -1
  86. package/resource.mjs +1 -0
  87. package/resource.mjs.map +1 -1
  88. package/resources/agent-endpoint.d.mts +4 -4
  89. package/resources/agent-endpoint.d.mts.map +1 -1
  90. package/resources/agent-endpoint.d.ts +4 -4
  91. package/resources/agent-endpoint.d.ts.map +1 -1
  92. package/resources/agent-endpoint.mjs.map +1 -1
  93. package/resources/agent.d.mts.map +1 -1
  94. package/resources/agent.d.ts.map +1 -1
  95. package/resources/agent.mjs.map +1 -1
  96. package/resources/call.d.mts +310 -162
  97. package/resources/call.d.mts.map +1 -1
  98. package/resources/call.d.ts +310 -162
  99. package/resources/call.d.ts.map +1 -1
  100. package/resources/call.js +6 -7
  101. package/resources/call.js.map +1 -1
  102. package/resources/call.mjs +6 -7
  103. package/resources/call.mjs.map +1 -1
  104. package/resources/config.d.mts +535 -0
  105. package/resources/config.d.mts.map +1 -0
  106. package/resources/config.d.ts +535 -0
  107. package/resources/config.d.ts.map +1 -0
  108. package/resources/config.js +28 -0
  109. package/resources/config.js.map +1 -0
  110. package/resources/config.mjs +24 -0
  111. package/resources/config.mjs.map +1 -0
  112. package/resources/customer-flow-edge-case.d.mts +1742 -0
  113. package/resources/customer-flow-edge-case.d.mts.map +1 -0
  114. package/resources/customer-flow-edge-case.d.ts +1742 -0
  115. package/resources/customer-flow-edge-case.d.ts.map +1 -0
  116. package/resources/customer-flow-edge-case.js +50 -0
  117. package/resources/customer-flow-edge-case.js.map +1 -0
  118. package/resources/customer-flow-edge-case.mjs +46 -0
  119. package/resources/customer-flow-edge-case.mjs.map +1 -0
  120. package/resources/customer-flow.d.mts +7163 -0
  121. package/resources/customer-flow.d.mts.map +1 -0
  122. package/resources/customer-flow.d.ts +7163 -0
  123. package/resources/customer-flow.d.ts.map +1 -0
  124. package/resources/customer-flow.js +87 -0
  125. package/resources/customer-flow.js.map +1 -0
  126. package/resources/customer-flow.mjs +83 -0
  127. package/resources/customer-flow.mjs.map +1 -0
  128. package/resources/health.d.mts.map +1 -1
  129. package/resources/health.d.ts.map +1 -1
  130. package/resources/health.mjs.map +1 -1
  131. package/resources/http-request-definition.d.mts.map +1 -1
  132. package/resources/http-request-definition.d.ts.map +1 -1
  133. package/resources/http-request-definition.mjs.map +1 -1
  134. package/resources/index.d.mts +6 -2
  135. package/resources/index.d.mts.map +1 -1
  136. package/resources/index.d.ts +6 -2
  137. package/resources/index.d.ts.map +1 -1
  138. package/resources/index.js +11 -3
  139. package/resources/index.js.map +1 -1
  140. package/resources/index.mjs +5 -1
  141. package/resources/index.mjs.map +1 -1
  142. package/resources/metric-collection-job.d.mts +5 -3
  143. package/resources/metric-collection-job.d.mts.map +1 -1
  144. package/resources/metric-collection-job.d.ts +5 -3
  145. package/resources/metric-collection-job.d.ts.map +1 -1
  146. package/resources/metric-collection-job.mjs.map +1 -1
  147. package/resources/metric-policy.d.mts.map +1 -1
  148. package/resources/metric-policy.d.ts.map +1 -1
  149. package/resources/metric-policy.mjs.map +1 -1
  150. package/resources/metric.d.mts +804 -109
  151. package/resources/metric.d.mts.map +1 -1
  152. package/resources/metric.d.ts +804 -109
  153. package/resources/metric.d.ts.map +1 -1
  154. package/resources/metric.js +6 -7
  155. package/resources/metric.js.map +1 -1
  156. package/resources/metric.mjs +6 -7
  157. package/resources/metric.mjs.map +1 -1
  158. package/resources/simulation-environment.d.mts +95 -0
  159. package/resources/simulation-environment.d.mts.map +1 -0
  160. package/resources/simulation-environment.d.ts +95 -0
  161. package/resources/simulation-environment.d.ts.map +1 -0
  162. package/resources/simulation-environment.js +24 -0
  163. package/resources/simulation-environment.js.map +1 -0
  164. package/resources/simulation-environment.mjs +20 -0
  165. package/resources/simulation-environment.mjs.map +1 -0
  166. package/resources/simulation-job.d.mts +58 -10
  167. package/resources/simulation-job.d.mts.map +1 -1
  168. package/resources/simulation-job.d.ts +58 -10
  169. package/resources/simulation-job.d.ts.map +1 -1
  170. package/resources/simulation-job.mjs.map +1 -1
  171. package/resources/simulation-persona.d.mts +60 -24
  172. package/resources/simulation-persona.d.mts.map +1 -1
  173. package/resources/simulation-persona.d.ts +60 -24
  174. package/resources/simulation-persona.d.ts.map +1 -1
  175. package/resources/simulation-persona.mjs.map +1 -1
  176. package/resources/simulation-run-plan-job.d.mts +73 -32
  177. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  178. package/resources/simulation-run-plan-job.d.ts +73 -32
  179. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  180. package/resources/simulation-run-plan-job.js +7 -8
  181. package/resources/simulation-run-plan-job.js.map +1 -1
  182. package/resources/simulation-run-plan-job.mjs +7 -8
  183. package/resources/simulation-run-plan-job.mjs.map +1 -1
  184. package/resources/simulation-run-plan.d.mts +408 -39
  185. package/resources/simulation-run-plan.d.mts.map +1 -1
  186. package/resources/simulation-run-plan.d.ts +408 -39
  187. package/resources/simulation-run-plan.d.ts.map +1 -1
  188. package/resources/simulation-run-plan.js +6 -11
  189. package/resources/simulation-run-plan.js.map +1 -1
  190. package/resources/simulation-run-plan.mjs +6 -11
  191. package/resources/simulation-run-plan.mjs.map +1 -1
  192. package/resources/simulation.d.mts +379 -0
  193. package/resources/simulation.d.mts.map +1 -0
  194. package/resources/simulation.d.ts +379 -0
  195. package/resources/simulation.d.ts.map +1 -0
  196. package/resources/simulation.js +33 -0
  197. package/resources/simulation.js.map +1 -0
  198. package/resources/simulation.mjs +29 -0
  199. package/resources/simulation.mjs.map +1 -0
  200. package/resources/webhook.d.mts +4 -4
  201. package/resources/webhook.d.mts.map +1 -1
  202. package/resources/webhook.d.ts +4 -4
  203. package/resources/webhook.d.ts.map +1 -1
  204. package/resources/webhook.mjs.map +1 -1
  205. package/resources.d.mts.map +1 -1
  206. package/resources.d.ts.map +1 -1
  207. package/resources.mjs.map +1 -1
  208. package/src/client.ts +124 -28
  209. package/src/internal/types.ts +6 -8
  210. package/src/internal/utils/log.ts +2 -0
  211. package/src/resources/agent-endpoint.ts +36 -4
  212. package/src/resources/call.ts +333 -176
  213. package/src/resources/config.ts +1162 -0
  214. package/src/resources/customer-flow-edge-case.ts +2884 -0
  215. package/src/resources/customer-flow.ts +11713 -0
  216. package/src/resources/index.ts +42 -12
  217. package/src/resources/metric-collection-job.ts +5 -3
  218. package/src/resources/metric.ts +1057 -115
  219. package/src/resources/simulation-environment.ts +147 -0
  220. package/src/resources/simulation-job.ts +122 -10
  221. package/src/resources/simulation-persona.ts +192 -24
  222. package/src/resources/simulation-run-plan-job.ts +109 -27
  223. package/src/resources/simulation-run-plan.ts +445 -40
  224. package/src/resources/simulation.ts +444 -0
  225. package/src/resources/webhook.ts +8 -0
  226. package/src/version.ts +1 -1
  227. package/uploads.d.mts +1 -0
  228. package/uploads.d.mts.map +1 -1
  229. package/uploads.d.ts +1 -0
  230. package/uploads.d.ts.map +1 -1
  231. package/uploads.mjs +1 -0
  232. package/uploads.mjs.map +1 -1
  233. package/version.d.mts +1 -1
  234. package/version.d.ts +1 -1
  235. package/version.js +1 -1
  236. package/version.mjs +1 -1
  237. package/resources/simulation-scenario.d.mts +0 -424
  238. package/resources/simulation-scenario.d.mts.map +0 -1
  239. package/resources/simulation-scenario.d.ts +0 -424
  240. package/resources/simulation-scenario.d.ts.map +0 -1
  241. package/resources/simulation-scenario.js +0 -40
  242. package/resources/simulation-scenario.js.map +0 -1
  243. package/resources/simulation-scenario.mjs +0 -36
  244. package/resources/simulation-scenario.mjs.map +0 -1
  245. package/src/resources/simulation-scenario.ts +0 -602
@@ -0,0 +1,444 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Simulation extends APIResource {
8
+ /**
9
+ * Starts a simulation and returns the run.
10
+ *
11
+ * Send `plan` to describe a simulation and run it once. Add `saveAsPlan` to keep
12
+ * that configuration as a reusable run plan. Send `planId` instead to run a plan
13
+ * you already have.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const response = await client.simulation.run({
18
+ * plan: {
19
+ * agentEndpoints: [
20
+ * { id: '7c9e6679-7425-40de-944b-e07fc1f90ae7' },
21
+ * ],
22
+ * direction: 'OUTBOUND',
23
+ * maxSimulationDurationSeconds: 300,
24
+ * metrics: [{}],
25
+ * },
26
+ * });
27
+ * ```
28
+ */
29
+ run(body: SimulationRunParams, options?: RequestOptions): APIPromise<SimulationRunResponse> {
30
+ return this._client.post('/v1/simulation/run', { body, ...options });
31
+ }
32
+ }
33
+
34
+ export interface SimulationRunResponse {
35
+ /**
36
+ * A started simulation run.
37
+ */
38
+ data: SimulationRunResponse.Data;
39
+ }
40
+
41
+ export namespace SimulationRunResponse {
42
+ /**
43
+ * A started simulation run.
44
+ */
45
+ export interface Data {
46
+ /**
47
+ * When the run was created, ISO 8601.
48
+ */
49
+ createdAt: string;
50
+
51
+ /**
52
+ * Whether that plan is listed by GET /v1/simulation/plan. False for an unsaved
53
+ * run, whose plan is hidden.
54
+ */
55
+ savedAsPlan: boolean;
56
+
57
+ /**
58
+ * How many simulated calls this run places.
59
+ */
60
+ simulationJobCount: number;
61
+
62
+ /**
63
+ * The run plan behind this run, present whether or not it was saved. Pass it back
64
+ * as `planId` to run the same configuration again.
65
+ */
66
+ simulationRunPlanId: string;
67
+
68
+ /**
69
+ * The run. Poll it with GET /v1/simulation/plan/job/{jobId}.
70
+ */
71
+ simulationRunPlanJobId: string;
72
+
73
+ /**
74
+ * Initial status. PENDING normally, or QUEUED when the plan runs sequentially and
75
+ * another job of its is still active.
76
+ */
77
+ status:
78
+ | 'PENDING'
79
+ | 'QUEUED'
80
+ | 'CREATING_SNAPSHOTS'
81
+ | 'CREATING_SIMULATIONS'
82
+ | 'PREPARING_CAPACITY'
83
+ | 'RUNNING_SIMULATIONS'
84
+ | 'COMPLETED'
85
+ | 'FAILED'
86
+ | 'TIMED_OUT'
87
+ | 'CANCELLED'
88
+ | 'CANCELLING'
89
+ | 'ENDING_SIMULATIONS';
90
+ }
91
+ }
92
+
93
+ export type SimulationRunParams =
94
+ | SimulationRunParams.RunSimulationFromConfig
95
+ | SimulationRunParams.RunSimulationFromPlanID;
96
+
97
+ export declare namespace SimulationRunParams {
98
+ export interface RunSimulationFromConfig {
99
+ /**
100
+ * The simulation to run: what to call, who calls it, and what to measure.
101
+ */
102
+ plan: RunSimulationFromConfig.Plan;
103
+
104
+ /**
105
+ * Keeps this configuration as a run plan, listed by GET /v1/simulation/plan and
106
+ * re-runnable with `planId`. Requires `plan.name`, since a plan you meant to keep
107
+ * should not be filed under a generated one.
108
+ *
109
+ * Omitted or false gives a one-off. The run still needs a plan to execute, so one
110
+ * is created either way, but it is hidden: it carries this run and nothing else.
111
+ */
112
+ saveAsPlan?: boolean;
113
+
114
+ /**
115
+ * Values for the {{variables}} the run resolves, overriding whatever the plan has
116
+ * pinned.
117
+ *
118
+ * An object applies them to the whole run:
119
+ *
120
+ * { "orderNumber": "12345", "tier": "gold" }
121
+ *
122
+ * An array applies them per flow, or to just its happy path or one of its edge
123
+ * cases, when a single set will not do. Each entry carries what it applies to:
124
+ *
125
+ * [ { "flowId": "550e8400-...", "variables": { "orderNumber": "12345" } }, {
126
+ * "flowId": "550e8400-...", "happyPath": true, "variables": { "orderNumber":
127
+ * "55555" } }, { "flowId": "550e8400-...", "edgeCaseId": "7a3d2e1f-...",
128
+ * "variables": { "orderNumber": "67890" } } ]
129
+ *
130
+ * An entry that narrows to neither covers everything that flow resolves. A flow
131
+ * this plan does not attach, or an edge case that does not belong to the flow, is
132
+ * rejected rather than ignored.
133
+ *
134
+ * A plan built on scenarios rather than customer flows targets them the same way,
135
+ * with `scenarioId` in place of `flowId`. That form is deprecated alongside
136
+ * scenarios themselves, and still accepted so runs against those plans keep
137
+ * working.
138
+ */
139
+ variables?:
140
+ | { [key: string]: string }
141
+ | Array<RunSimulationFromConfig.UnionMember1>
142
+ | Array<RunSimulationFromConfig.UnionMember2>;
143
+ }
144
+
145
+ export namespace RunSimulationFromConfig {
146
+ /**
147
+ * The simulation to run: what to call, who calls it, and what to measure.
148
+ */
149
+ export interface Plan {
150
+ /**
151
+ * Agent endpoints to include in this run plan
152
+ */
153
+ agentEndpoints: Array<Plan.AgentEndpoint>;
154
+
155
+ /**
156
+ * Direction of the simulation (INBOUND or OUTBOUND)
157
+ */
158
+ direction: 'INBOUND' | 'OUTBOUND';
159
+
160
+ /**
161
+ * Maximum duration in seconds for each simulation
162
+ */
163
+ maxSimulationDurationSeconds: number;
164
+
165
+ /**
166
+ * Metric definitions to include in this run plan. Reference each by `id` (UUID) or
167
+ * `slug`.
168
+ */
169
+ metrics: Array<Plan.Metric>;
170
+
171
+ /**
172
+ * Description of the run plan
173
+ */
174
+ description?: string;
175
+
176
+ /**
177
+ * Phrases that trigger end of call. Empty array disables the feature.
178
+ */
179
+ endCallPhrases?: Array<string>;
180
+
181
+ /**
182
+ * Semantic conditions that trigger end of call. The LLM evaluates the conversation
183
+ * against these conditions. Empty array disables the feature.
184
+ */
185
+ endCallReasons?: Array<string>;
186
+
187
+ /**
188
+ * Execution mode (PARALLEL or SEQUENTIAL)
189
+ */
190
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
191
+
192
+ /**
193
+ * Customer flows to include in this run plan. The same flow can appear more than
194
+ * once with a different persona override or different variables.
195
+ */
196
+ flows?: Array<Plan.Flow>;
197
+
198
+ /**
199
+ * Number of iterations to run for each test case (1-10000)
200
+ */
201
+ iterationCount?: number;
202
+
203
+ /**
204
+ * Maximum number of concurrent simulation jobs
205
+ */
206
+ maxConcurrentJobs?: number;
207
+
208
+ /**
209
+ * What to call this. Generated from the date when omitted, and required with
210
+ * `saveAsPlan`.
211
+ */
212
+ name?: string;
213
+
214
+ /**
215
+ * Personas to include in this run plan. Required with `scenarios`; ignored with
216
+ * `flows`, where each variant carries its own persona.
217
+ */
218
+ personas?: Array<Plan.Persona>;
219
+
220
+ /**
221
+ * @deprecated Deprecated: use `flows` instead. Scenarios to include in this run
222
+ * plan. The same scenario ID can appear multiple times with different variables.
223
+ */
224
+ scenarios?: Array<Plan.Scenario>;
225
+
226
+ /**
227
+ * Timeout in seconds for silence detection
228
+ */
229
+ silenceTimeoutSeconds?: number;
230
+ }
231
+
232
+ export namespace Plan {
233
+ export interface AgentEndpoint {
234
+ id: string;
235
+ }
236
+
237
+ export interface Metric {
238
+ /**
239
+ * Metric definition UUID. Provide either this or `slug`, not both.
240
+ */
241
+ id?: string;
242
+
243
+ /**
244
+ * Alias of `slug` accepted for backwards compatibility. Use `slug` for new
245
+ * integrations.
246
+ */
247
+ metricId?: string;
248
+
249
+ /**
250
+ * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
251
+ * not both.
252
+ */
253
+ slug?: string;
254
+ }
255
+
256
+ /**
257
+ * One customer flow attached to a run plan, and which of its ways of running you
258
+ * cover.
259
+ *
260
+ * Attaching the same flow more than once with different overrides is how you fan
261
+ * it out across personas or values.
262
+ */
263
+ export interface Flow {
264
+ /**
265
+ * The customer flow to run.
266
+ */
267
+ id: string;
268
+
269
+ /**
270
+ * `"ALL"` runs every edge case the flow has when the run starts, so one added
271
+ * later is covered. An array runs only the ones you name, each able to carry its
272
+ * own persona override and values.
273
+ */
274
+ edgeCases?: 'ALL' | Array<Flow.UnionMember1>;
275
+
276
+ /**
277
+ * Run the flow's happy path. Resolved when the run starts, so it follows the flow.
278
+ */
279
+ happyPath?: boolean;
280
+
281
+ /**
282
+ * Runs everything this attachment resolves as that persona instead of its own.
283
+ */
284
+ personaOverrideId?: string | null;
285
+
286
+ /**
287
+ * Values for everything it resolves.
288
+ */
289
+ variables?: { [key: string]: string };
290
+ }
291
+
292
+ export namespace Flow {
293
+ export interface UnionMember1 {
294
+ /**
295
+ * The edge case to run.
296
+ */
297
+ id: string;
298
+
299
+ /**
300
+ * Run this one as that persona instead of its own.
301
+ */
302
+ personaOverrideId?: string | null;
303
+
304
+ /**
305
+ * Values for this one only.
306
+ */
307
+ variables?: { [key: string]: string };
308
+ }
309
+ }
310
+
311
+ export interface Persona {
312
+ id: string;
313
+ }
314
+
315
+ export interface Scenario {
316
+ /**
317
+ * Scenario ID
318
+ */
319
+ id: string;
320
+
321
+ /**
322
+ * Template variables for this scenario instance. The same scenario can appear
323
+ * multiple times with different variables.
324
+ */
325
+ variables?: { [key: string]: string };
326
+ }
327
+ }
328
+
329
+ export interface UnionMember1 {
330
+ /**
331
+ * A customer flow this plan runs.
332
+ */
333
+ flowId: string;
334
+
335
+ /**
336
+ * The values to apply.
337
+ */
338
+ variables: { [key: string]: string };
339
+
340
+ /**
341
+ * Narrow to one edge case of that flow.
342
+ */
343
+ edgeCaseId?: string;
344
+
345
+ /**
346
+ * Narrow to the flow's happy path.
347
+ */
348
+ happyPath?: true;
349
+ }
350
+
351
+ export interface UnionMember2 {
352
+ /**
353
+ * ID of the scenario to apply variables to
354
+ */
355
+ scenarioId: string;
356
+
357
+ /**
358
+ * Key-value pairs for this scenario
359
+ */
360
+ variables: { [key: string]: string };
361
+ }
362
+ }
363
+
364
+ export interface RunSimulationFromPlanID {
365
+ /**
366
+ * The run plan to run, saved or hidden. Rename or unhide it with PUT
367
+ * /v1/simulation/plan/{planId}.
368
+ */
369
+ planId: string;
370
+
371
+ /**
372
+ * Values for the {{variables}} the run resolves, overriding whatever the plan has
373
+ * pinned.
374
+ *
375
+ * An object applies them to the whole run:
376
+ *
377
+ * { "orderNumber": "12345", "tier": "gold" }
378
+ *
379
+ * An array applies them per flow, or to just its happy path or one of its edge
380
+ * cases, when a single set will not do. Each entry carries what it applies to:
381
+ *
382
+ * [ { "flowId": "550e8400-...", "variables": { "orderNumber": "12345" } }, {
383
+ * "flowId": "550e8400-...", "happyPath": true, "variables": { "orderNumber":
384
+ * "55555" } }, { "flowId": "550e8400-...", "edgeCaseId": "7a3d2e1f-...",
385
+ * "variables": { "orderNumber": "67890" } } ]
386
+ *
387
+ * An entry that narrows to neither covers everything that flow resolves. A flow
388
+ * this plan does not attach, or an edge case that does not belong to the flow, is
389
+ * rejected rather than ignored.
390
+ *
391
+ * A plan built on scenarios rather than customer flows targets them the same way,
392
+ * with `scenarioId` in place of `flowId`. That form is deprecated alongside
393
+ * scenarios themselves, and still accepted so runs against those plans keep
394
+ * working.
395
+ */
396
+ variables?:
397
+ | { [key: string]: string }
398
+ | Array<RunSimulationFromPlanID.UnionMember1>
399
+ | Array<RunSimulationFromPlanID.UnionMember2>;
400
+ }
401
+
402
+ export namespace RunSimulationFromPlanID {
403
+ export interface UnionMember1 {
404
+ /**
405
+ * A customer flow this plan runs.
406
+ */
407
+ flowId: string;
408
+
409
+ /**
410
+ * The values to apply.
411
+ */
412
+ variables: { [key: string]: string };
413
+
414
+ /**
415
+ * Narrow to one edge case of that flow.
416
+ */
417
+ edgeCaseId?: string;
418
+
419
+ /**
420
+ * Narrow to the flow's happy path.
421
+ */
422
+ happyPath?: true;
423
+ }
424
+
425
+ export interface UnionMember2 {
426
+ /**
427
+ * ID of the scenario to apply variables to
428
+ */
429
+ scenarioId: string;
430
+
431
+ /**
432
+ * Key-value pairs for this scenario
433
+ */
434
+ variables: { [key: string]: string };
435
+ }
436
+ }
437
+ }
438
+
439
+ export declare namespace Simulation {
440
+ export {
441
+ type SimulationRunResponse as SimulationRunResponse,
442
+ type SimulationRunParams as SimulationRunParams,
443
+ };
444
+ }
@@ -87,6 +87,8 @@ export namespace WebhookCreateResponse {
87
87
  | 'METRIC_COLLECTION_JOB_FAILED'
88
88
  | 'CHAT_ANALYSIS_COMPLETED'
89
89
  | 'CHAT_ANALYSIS_FAILED'
90
+ | 'ISSUE_OPENED'
91
+ | 'ISSUE_RESOLVED'
90
92
  >;
91
93
 
92
94
  /**
@@ -158,6 +160,8 @@ export namespace WebhookListResponse {
158
160
  | 'METRIC_COLLECTION_JOB_FAILED'
159
161
  | 'CHAT_ANALYSIS_COMPLETED'
160
162
  | 'CHAT_ANALYSIS_FAILED'
163
+ | 'ISSUE_OPENED'
164
+ | 'ISSUE_RESOLVED'
161
165
  >;
162
166
 
163
167
  /**
@@ -255,6 +259,8 @@ export namespace WebhookGetByIDResponse {
255
259
  | 'METRIC_COLLECTION_JOB_FAILED'
256
260
  | 'CHAT_ANALYSIS_COMPLETED'
257
261
  | 'CHAT_ANALYSIS_FAILED'
262
+ | 'ISSUE_OPENED'
263
+ | 'ISSUE_RESOLVED'
258
264
  >;
259
265
 
260
266
  /**
@@ -296,6 +302,8 @@ export interface WebhookCreateParams {
296
302
  | 'METRIC_COLLECTION_JOB_FAILED'
297
303
  | 'CHAT_ANALYSIS_COMPLETED'
298
304
  | 'CHAT_ANALYSIS_FAILED'
305
+ | 'ISSUE_OPENED'
306
+ | 'ISSUE_RESOLVED'
299
307
  >;
300
308
 
301
309
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.30.0'; // x-release-please-version
1
+ export const VERSION = '2.33.0'; // x-release-please-version
package/uploads.d.mts CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.d.mts.map
package/uploads.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/uploads.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.js";
2
3
  //# sourceMappingURL=uploads.d.ts.map
package/uploads.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,kCAA+B"}
package/uploads.mjs CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.mjs.map
package/uploads.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.30.0";
1
+ export declare const VERSION = "2.33.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.30.0";
1
+ export declare const VERSION = "2.33.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.30.0'; // x-release-please-version
4
+ exports.VERSION = '2.33.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.30.0'; // x-release-please-version
1
+ export const VERSION = '2.33.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map