@roarkanalytics/sdk 3.9.0 → 3.10.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 +12 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/customer-flow-edge-case.d.mts +9 -0
- package/resources/customer-flow-edge-case.d.mts.map +1 -1
- package/resources/customer-flow-edge-case.d.ts +9 -0
- package/resources/customer-flow-edge-case.d.ts.map +1 -1
- package/resources/customer-flow.d.mts +30 -0
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +30 -0
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/simulation-run-plan.d.mts +38 -0
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +38 -0
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/simulation-template.d.mts +162 -0
- package/resources/simulation-template.d.mts.map +1 -0
- package/resources/simulation-template.d.ts +162 -0
- package/resources/simulation-template.d.ts.map +1 -0
- package/resources/simulation-template.js +31 -0
- package/resources/simulation-template.js.map +1 -0
- package/resources/simulation-template.mjs +27 -0
- package/resources/simulation-template.mjs.map +1 -0
- package/resources/simulation.d.mts +13 -0
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +13 -0
- package/resources/simulation.d.ts.map +1 -1
- package/src/client.ts +8 -0
- package/src/resources/customer-flow-edge-case.ts +18 -0
- package/src/resources/customer-flow.ts +60 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/simulation-run-plan.ts +44 -0
- package/src/resources/simulation-template.ts +190 -0
- package/src/resources/simulation.ts +14 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -0,0 +1,190 @@
|
|
|
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 SimulationTemplate extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the built-in simulation templates, each resolved against this project:
|
|
10
|
+
* the metric and check definitions it collects, and the flows it runs with the
|
|
11
|
+
* variants it covers.
|
|
12
|
+
*
|
|
13
|
+
* A template is a preset rather than a stored object, so building a run from one
|
|
14
|
+
* produces an ordinary run plan you own and can edit afterwards. Pass a `slug` as
|
|
15
|
+
* `template` to POST /v1/simulation/run.
|
|
16
|
+
*
|
|
17
|
+
* Every entry is complete, so there is no per-template endpoint to follow up with,
|
|
18
|
+
* and the list is a fixed catalogue rather than a paginated one. Only templates a
|
|
19
|
+
* request can actually run are listed.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const simulationTemplates =
|
|
24
|
+
* await client.simulationTemplate.list();
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(options?: RequestOptions): APIPromise<SimulationTemplateListResponse> {
|
|
28
|
+
return this._client.get('/v1/simulation/template', options);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The built-in simulation templates.
|
|
34
|
+
*/
|
|
35
|
+
export interface SimulationTemplateListResponse {
|
|
36
|
+
data: Array<SimulationTemplateListResponse.Data>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export namespace SimulationTemplateListResponse {
|
|
40
|
+
/**
|
|
41
|
+
* A built-in simulation template, resolved against this project: what it measures
|
|
42
|
+
* and what it runs.
|
|
43
|
+
*/
|
|
44
|
+
export interface Data {
|
|
45
|
+
/**
|
|
46
|
+
* Grouping used in the dashboard library
|
|
47
|
+
*/
|
|
48
|
+
category: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The per-simulation cap a run from this template uses unless the request sets its
|
|
52
|
+
* own.
|
|
53
|
+
*/
|
|
54
|
+
defaultMaxSimulationDurationSeconds: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* What this template tests
|
|
58
|
+
*/
|
|
59
|
+
description: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The flows this template runs, and which of their ways of running it covers.
|
|
63
|
+
*
|
|
64
|
+
* Empty means the template presets only what to measure, and a run has to say what
|
|
65
|
+
* to measure it on: pass `flows` to POST /v1/simulation/run. When it is not empty
|
|
66
|
+
* you can still pass `flows` to narrow it, naming a subset of the ids listed here.
|
|
67
|
+
*/
|
|
68
|
+
flows: Array<Data.Flow>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Whether runs from this template also collect each attached flow's own metrics,
|
|
72
|
+
* on top of the template's set.
|
|
73
|
+
*/
|
|
74
|
+
includeFlowMetrics: boolean;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The metrics this template collects, resolved to this project's definitions.
|
|
78
|
+
*/
|
|
79
|
+
metrics: Array<Data.Metric>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Stable identifier. Name this in a run request.
|
|
83
|
+
*/
|
|
84
|
+
slug: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The Pass/Fail checks this template attaches alongside its metrics.
|
|
88
|
+
*/
|
|
89
|
+
thresholds: Array<Data.Threshold>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Display name
|
|
93
|
+
*/
|
|
94
|
+
title: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export namespace Data {
|
|
98
|
+
export interface Flow {
|
|
99
|
+
/**
|
|
100
|
+
* Customer flow ID
|
|
101
|
+
*/
|
|
102
|
+
id: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The other ways of running this flow that this template covers.
|
|
106
|
+
*/
|
|
107
|
+
edgeCases: Array<Flow.EdgeCase>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The flow's default way of running, when this template covers it. Null when it
|
|
111
|
+
* does not, or the flow has none.
|
|
112
|
+
*/
|
|
113
|
+
happyPath: Flow.HappyPath | null;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The stable slug of a Roark-curated flow, null for one of your own.
|
|
117
|
+
*
|
|
118
|
+
* Prefer this over `id` when you are storing a run in version control: a curated
|
|
119
|
+
* flow is a global row, so its id is the same for every project but differs
|
|
120
|
+
* between deployments, while the slug is stable wherever the flow exists. Both are
|
|
121
|
+
* accepted by a run request.
|
|
122
|
+
*/
|
|
123
|
+
slug: string | null;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Flow title
|
|
127
|
+
*/
|
|
128
|
+
title: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export namespace Flow {
|
|
132
|
+
export interface EdgeCase {
|
|
133
|
+
/**
|
|
134
|
+
* Customer flow variant ID
|
|
135
|
+
*/
|
|
136
|
+
id: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The stable slug of a Roark-curated edge case, null for one of your own.
|
|
140
|
+
*
|
|
141
|
+
* Prefer this over `id` in a run you keep in version control. A curated edge case
|
|
142
|
+
* is a global row, so its id differs between deployments, and renaming one
|
|
143
|
+
* replaces the row and its id outright. The slug survives both.
|
|
144
|
+
*/
|
|
145
|
+
slug: string | null;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* What this way of running the flow is called
|
|
149
|
+
*/
|
|
150
|
+
title: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The flow's default way of running, when this template covers it. Null when it
|
|
155
|
+
* does not, or the flow has none.
|
|
156
|
+
*/
|
|
157
|
+
export interface HappyPath {
|
|
158
|
+
title: string;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface Metric {
|
|
163
|
+
/**
|
|
164
|
+
* Metric definition ID
|
|
165
|
+
*/
|
|
166
|
+
id: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Stable metric slug, e.g. "response_time"
|
|
170
|
+
*/
|
|
171
|
+
slug: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface Threshold {
|
|
175
|
+
/**
|
|
176
|
+
* Metric definition ID
|
|
177
|
+
*/
|
|
178
|
+
id: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Stable metric slug, e.g. "response_time"
|
|
182
|
+
*/
|
|
183
|
+
slug: string;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export declare namespace SimulationTemplate {
|
|
189
|
+
export { type SimulationTemplateListResponse as SimulationTemplateListResponse };
|
|
190
|
+
}
|
|
@@ -211,6 +211,20 @@ export declare namespace SimulationRunParams {
|
|
|
211
211
|
*/
|
|
212
212
|
flows?: Array<Plan.Flow>;
|
|
213
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Also collect each attached flow's own metrics, on top of the `metrics` named
|
|
216
|
+
* here.
|
|
217
|
+
*
|
|
218
|
+
* Default true, which is what you want when you brought your own flows and their
|
|
219
|
+
* graders. Set false for a run whose metric list is meant to be exhaustive: a
|
|
220
|
+
* template like Load Testing or Voicemail deliberately grades a narrow set, and
|
|
221
|
+
* inheriting every flow metric on top multiplies analysis cost across the volume
|
|
222
|
+
* without adding signal.
|
|
223
|
+
*
|
|
224
|
+
* GET /v1/simulation/template returns the value each template expects.
|
|
225
|
+
*/
|
|
226
|
+
includeFlowMetrics?: boolean;
|
|
227
|
+
|
|
214
228
|
/**
|
|
215
229
|
* Number of iterations to run for each test case (1-10000)
|
|
216
230
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.10.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.10.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|