@roarkanalytics/sdk 2.31.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.
- package/CHANGELOG.md +61 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +17 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -5
- package/client.d.ts.map +1 -1
- package/client.js +35 -4
- package/client.js.map +1 -1
- package/client.mjs +35 -4
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/agent-endpoint.d.mts +4 -4
- package/resources/agent-endpoint.d.mts.map +1 -1
- package/resources/agent-endpoint.d.ts +4 -4
- package/resources/agent-endpoint.d.ts.map +1 -1
- package/resources/agent-endpoint.mjs.map +1 -1
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.mts +303 -155
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +303 -155
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +6 -7
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +6 -7
- package/resources/call.mjs.map +1 -1
- package/resources/config.d.mts +535 -0
- package/resources/config.d.mts.map +1 -0
- package/resources/config.d.ts +535 -0
- package/resources/config.d.ts.map +1 -0
- package/resources/config.js +28 -0
- package/resources/config.js.map +1 -0
- package/resources/config.mjs +24 -0
- package/resources/config.mjs.map +1 -0
- package/resources/customer-flow-edge-case.d.mts +1742 -0
- package/resources/customer-flow-edge-case.d.mts.map +1 -0
- package/resources/customer-flow-edge-case.d.ts +1742 -0
- package/resources/customer-flow-edge-case.d.ts.map +1 -0
- package/resources/customer-flow-edge-case.js +50 -0
- package/resources/customer-flow-edge-case.js.map +1 -0
- package/resources/customer-flow-edge-case.mjs +46 -0
- package/resources/customer-flow-edge-case.mjs.map +1 -0
- package/resources/customer-flow.d.mts +7163 -0
- package/resources/customer-flow.d.mts.map +1 -0
- package/resources/customer-flow.d.ts +7163 -0
- package/resources/customer-flow.d.ts.map +1 -0
- package/resources/customer-flow.js +87 -0
- package/resources/customer-flow.js.map +1 -0
- package/resources/customer-flow.mjs +83 -0
- package/resources/customer-flow.mjs.map +1 -0
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/health.mjs.map +1 -1
- package/resources/http-request-definition.d.mts.map +1 -1
- package/resources/http-request-definition.d.ts.map +1 -1
- package/resources/http-request-definition.mjs.map +1 -1
- package/resources/index.d.mts +6 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/metric-collection-job.d.mts +5 -3
- package/resources/metric-collection-job.d.mts.map +1 -1
- package/resources/metric-collection-job.d.ts +5 -3
- package/resources/metric-collection-job.d.ts.map +1 -1
- package/resources/metric-collection-job.mjs.map +1 -1
- package/resources/metric-policy.d.mts.map +1 -1
- package/resources/metric-policy.d.ts.map +1 -1
- package/resources/metric-policy.mjs.map +1 -1
- package/resources/metric.d.mts +804 -109
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +804 -109
- package/resources/metric.d.ts.map +1 -1
- package/resources/metric.js +6 -7
- package/resources/metric.js.map +1 -1
- package/resources/metric.mjs +6 -7
- package/resources/metric.mjs.map +1 -1
- package/resources/simulation-environment.d.mts +95 -0
- package/resources/simulation-environment.d.mts.map +1 -0
- package/resources/simulation-environment.d.ts +95 -0
- package/resources/simulation-environment.d.ts.map +1 -0
- package/resources/simulation-environment.js +24 -0
- package/resources/simulation-environment.js.map +1 -0
- package/resources/simulation-environment.mjs +20 -0
- package/resources/simulation-environment.mjs.map +1 -0
- package/resources/simulation-job.d.mts +58 -10
- package/resources/simulation-job.d.mts.map +1 -1
- package/resources/simulation-job.d.ts +58 -10
- package/resources/simulation-job.d.ts.map +1 -1
- package/resources/simulation-job.mjs.map +1 -1
- package/resources/simulation-persona.d.mts +60 -24
- package/resources/simulation-persona.d.mts.map +1 -1
- package/resources/simulation-persona.d.ts +60 -24
- package/resources/simulation-persona.d.ts.map +1 -1
- package/resources/simulation-persona.mjs.map +1 -1
- package/resources/simulation-run-plan-job.d.mts +73 -32
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +73 -32
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.js +7 -8
- package/resources/simulation-run-plan-job.js.map +1 -1
- package/resources/simulation-run-plan-job.mjs +7 -8
- package/resources/simulation-run-plan-job.mjs.map +1 -1
- package/resources/simulation-run-plan.d.mts +408 -39
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +408 -39
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/simulation-run-plan.js +6 -11
- package/resources/simulation-run-plan.js.map +1 -1
- package/resources/simulation-run-plan.mjs +6 -11
- package/resources/simulation-run-plan.mjs.map +1 -1
- package/resources/simulation.d.mts +379 -0
- package/resources/simulation.d.mts.map +1 -0
- package/resources/simulation.d.ts +379 -0
- package/resources/simulation.d.ts.map +1 -0
- package/resources/simulation.js +33 -0
- package/resources/simulation.js.map +1 -0
- package/resources/simulation.mjs +29 -0
- package/resources/simulation.mjs.map +1 -0
- package/resources/webhook.d.mts +4 -4
- package/resources/webhook.d.mts.map +1 -1
- package/resources/webhook.d.ts +4 -4
- package/resources/webhook.d.ts.map +1 -1
- package/resources/webhook.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +124 -28
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/agent-endpoint.ts +36 -4
- package/src/resources/call.ts +326 -169
- package/src/resources/config.ts +1162 -0
- package/src/resources/customer-flow-edge-case.ts +2884 -0
- package/src/resources/customer-flow.ts +11713 -0
- package/src/resources/index.ts +42 -12
- package/src/resources/metric-collection-job.ts +5 -3
- package/src/resources/metric.ts +1057 -115
- package/src/resources/simulation-environment.ts +147 -0
- package/src/resources/simulation-job.ts +122 -10
- package/src/resources/simulation-persona.ts +192 -24
- package/src/resources/simulation-run-plan-job.ts +109 -27
- package/src/resources/simulation-run-plan.ts +445 -40
- package/src/resources/simulation.ts +444 -0
- package/src/resources/webhook.ts +8 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/simulation-scenario.d.mts +0 -424
- package/resources/simulation-scenario.d.mts.map +0 -1
- package/resources/simulation-scenario.d.ts +0 -424
- package/resources/simulation-scenario.d.ts.map +0 -1
- package/resources/simulation-scenario.js +0 -40
- package/resources/simulation-scenario.js.map +0 -1
- package/resources/simulation-scenario.mjs +0 -36
- package/resources/simulation-scenario.mjs.map +0 -1
- 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
|
+
}
|
package/src/resources/webhook.ts
CHANGED
|
@@ -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.
|
|
1
|
+
export const VERSION = '2.33.0'; // x-release-please-version
|
package/uploads.d.mts
CHANGED
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
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
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "2.33.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.33.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|