@roarkanalytics/sdk 4.3.0 → 4.4.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 +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/simulation-job-tool-mock.d.mts +56 -0
- package/resources/simulation-job-tool-mock.d.mts.map +1 -0
- package/resources/simulation-job-tool-mock.d.ts +56 -0
- package/resources/simulation-job-tool-mock.d.ts.map +1 -0
- package/resources/simulation-job-tool-mock.js +28 -0
- package/resources/simulation-job-tool-mock.js.map +1 -0
- package/resources/simulation-job-tool-mock.mjs +24 -0
- package/resources/simulation-job-tool-mock.mjs.map +1 -0
- package/resources/simulation-run-plan-job.d.mts +1 -1
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +1 -1
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-tool-fixture.d.mts +217 -0
- package/resources/simulation-tool-fixture.d.mts.map +1 -0
- package/resources/simulation-tool-fixture.d.ts +217 -0
- package/resources/simulation-tool-fixture.d.ts.map +1 -0
- package/resources/simulation-tool-fixture.js +69 -0
- package/resources/simulation-tool-fixture.js.map +1 -0
- package/resources/simulation-tool-fixture.mjs +65 -0
- package/resources/simulation-tool-fixture.mjs.map +1 -0
- package/resources/simulation.d.mts +5 -0
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +5 -0
- package/resources/simulation.d.ts.map +1 -1
- package/src/client.ts +34 -0
- package/src/resources/index.ts +11 -0
- package/src/resources/simulation-job-tool-mock.ts +70 -0
- package/src/resources/simulation-run-plan-job.ts +1 -0
- package/src/resources/simulation-tool-fixture.ts +288 -0
- package/src/resources/simulation.ts +6 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,288 @@
|
|
|
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
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class SimulationToolFixture extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create-or-replace by scope: one fixture per tool project-wide, plus one per
|
|
11
|
+
* (tool, flow variant). Setting the same scope twice replaces the response, so CI
|
|
12
|
+
* can apply fixtures idempotently. During Roark test calls the tool guard answers
|
|
13
|
+
* with the fixture verbatim instead of generating a response; real callers are
|
|
14
|
+
* never affected.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const simulationToolFixture =
|
|
19
|
+
* await client.simulationToolFixture.create({
|
|
20
|
+
* toolName: 'lookup_availability',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(
|
|
25
|
+
body: SimulationToolFixtureCreateParams,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): APIPromise<SimulationToolFixtureCreateResponse> {
|
|
28
|
+
return this._client.post('/v1/simulation/tool-fixture', { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Change the response, description, or enabled state of an existing fixture.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const simulationToolFixture =
|
|
37
|
+
* await client.simulationToolFixture.update(
|
|
38
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
update(
|
|
43
|
+
fixtureID: string,
|
|
44
|
+
body: SimulationToolFixtureUpdateParams | null | undefined = {},
|
|
45
|
+
options?: RequestOptions,
|
|
46
|
+
): APIPromise<SimulationToolFixtureUpdateResponse> {
|
|
47
|
+
return this._client.put(path`/v1/simulation/tool-fixture/${fixtureID}`, { body, ...options });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* All deterministic tool responses configured for this project, optionally
|
|
52
|
+
* filtered by tool.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const simulationToolFixtures =
|
|
57
|
+
* await client.simulationToolFixture.list();
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
list(
|
|
61
|
+
query: SimulationToolFixtureListParams | null | undefined = {},
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): APIPromise<SimulationToolFixtureListResponse> {
|
|
64
|
+
return this._client.get('/v1/simulation/tool-fixture', { query, ...options });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The tool goes back to scenario-aware generated responses in test calls.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const simulationToolFixture =
|
|
73
|
+
* await client.simulationToolFixture.delete(
|
|
74
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
delete(fixtureID: string, options?: RequestOptions): APIPromise<SimulationToolFixtureDeleteResponse> {
|
|
79
|
+
return this._client.delete(path`/v1/simulation/tool-fixture/${fixtureID}`, options);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface SimulationToolFixtureCreateResponse {
|
|
84
|
+
/**
|
|
85
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
86
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
87
|
+
* can force the branch under test. Never applies to real callers.
|
|
88
|
+
*/
|
|
89
|
+
data: SimulationToolFixtureCreateResponse.Data;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export namespace SimulationToolFixtureCreateResponse {
|
|
93
|
+
/**
|
|
94
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
95
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
96
|
+
* can force the branch under test. Never applies to real callers.
|
|
97
|
+
*/
|
|
98
|
+
export interface Data {
|
|
99
|
+
id: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* ISO 8601.
|
|
103
|
+
*/
|
|
104
|
+
createdAt: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The flow variant this fixture is pinned to. Null = project-wide.
|
|
108
|
+
*/
|
|
109
|
+
customerFlowVariantId: string | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Why this fixture exists.
|
|
113
|
+
*/
|
|
114
|
+
description: string | null;
|
|
115
|
+
|
|
116
|
+
enabled: boolean;
|
|
117
|
+
|
|
118
|
+
toolName: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* ISO 8601.
|
|
122
|
+
*/
|
|
123
|
+
updatedAt: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The exact JSON the tool returns during Roark test calls.
|
|
127
|
+
*/
|
|
128
|
+
response?: unknown;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface SimulationToolFixtureUpdateResponse {
|
|
133
|
+
/**
|
|
134
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
135
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
136
|
+
* can force the branch under test. Never applies to real callers.
|
|
137
|
+
*/
|
|
138
|
+
data: SimulationToolFixtureUpdateResponse.Data;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export namespace SimulationToolFixtureUpdateResponse {
|
|
142
|
+
/**
|
|
143
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
144
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
145
|
+
* can force the branch under test. Never applies to real callers.
|
|
146
|
+
*/
|
|
147
|
+
export interface Data {
|
|
148
|
+
id: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* ISO 8601.
|
|
152
|
+
*/
|
|
153
|
+
createdAt: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The flow variant this fixture is pinned to. Null = project-wide.
|
|
157
|
+
*/
|
|
158
|
+
customerFlowVariantId: string | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Why this fixture exists.
|
|
162
|
+
*/
|
|
163
|
+
description: string | null;
|
|
164
|
+
|
|
165
|
+
enabled: boolean;
|
|
166
|
+
|
|
167
|
+
toolName: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* ISO 8601.
|
|
171
|
+
*/
|
|
172
|
+
updatedAt: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The exact JSON the tool returns during Roark test calls.
|
|
176
|
+
*/
|
|
177
|
+
response?: unknown;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface SimulationToolFixtureListResponse {
|
|
182
|
+
data: Array<SimulationToolFixtureListResponse.Data>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export namespace SimulationToolFixtureListResponse {
|
|
186
|
+
/**
|
|
187
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
188
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
189
|
+
* can force the branch under test. Never applies to real callers.
|
|
190
|
+
*/
|
|
191
|
+
export interface Data {
|
|
192
|
+
id: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* ISO 8601.
|
|
196
|
+
*/
|
|
197
|
+
createdAt: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The flow variant this fixture is pinned to. Null = project-wide.
|
|
201
|
+
*/
|
|
202
|
+
customerFlowVariantId: string | null;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Why this fixture exists.
|
|
206
|
+
*/
|
|
207
|
+
description: string | null;
|
|
208
|
+
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
|
|
211
|
+
toolName: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* ISO 8601.
|
|
215
|
+
*/
|
|
216
|
+
updatedAt: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The exact JSON the tool returns during Roark test calls.
|
|
220
|
+
*/
|
|
221
|
+
response?: unknown;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface SimulationToolFixtureDeleteResponse {
|
|
226
|
+
data: SimulationToolFixtureDeleteResponse.Data;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export namespace SimulationToolFixtureDeleteResponse {
|
|
230
|
+
export interface Data {
|
|
231
|
+
deleted: boolean;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface SimulationToolFixtureCreateParams {
|
|
236
|
+
/**
|
|
237
|
+
* The tool this fixture answers for.
|
|
238
|
+
*/
|
|
239
|
+
toolName: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Pin the fixture to one flow variant (scenario). Omit for a project-wide fixture.
|
|
243
|
+
* A variant-pinned fixture beats the project-wide one.
|
|
244
|
+
*/
|
|
245
|
+
customerFlowVariantId?: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Why this fixture exists.
|
|
249
|
+
*/
|
|
250
|
+
description?: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Defaults to true.
|
|
254
|
+
*/
|
|
255
|
+
enabled?: boolean;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* The exact JSON to return.
|
|
259
|
+
*/
|
|
260
|
+
response?: unknown;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface SimulationToolFixtureUpdateParams {
|
|
264
|
+
description?: string | null;
|
|
265
|
+
|
|
266
|
+
enabled?: boolean;
|
|
267
|
+
|
|
268
|
+
response?: unknown;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface SimulationToolFixtureListParams {
|
|
272
|
+
/**
|
|
273
|
+
* Only fixtures for this tool.
|
|
274
|
+
*/
|
|
275
|
+
toolName?: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export declare namespace SimulationToolFixture {
|
|
279
|
+
export {
|
|
280
|
+
type SimulationToolFixtureCreateResponse as SimulationToolFixtureCreateResponse,
|
|
281
|
+
type SimulationToolFixtureUpdateResponse as SimulationToolFixtureUpdateResponse,
|
|
282
|
+
type SimulationToolFixtureListResponse as SimulationToolFixtureListResponse,
|
|
283
|
+
type SimulationToolFixtureDeleteResponse as SimulationToolFixtureDeleteResponse,
|
|
284
|
+
type SimulationToolFixtureCreateParams as SimulationToolFixtureCreateParams,
|
|
285
|
+
type SimulationToolFixtureUpdateParams as SimulationToolFixtureUpdateParams,
|
|
286
|
+
type SimulationToolFixtureListParams as SimulationToolFixtureListParams,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
@@ -90,6 +90,12 @@ export namespace SimulationMockToolResponse {
|
|
|
90
90
|
|
|
91
91
|
simulationJobId: string;
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* GENERATED = the scenario-aware model answered; FIXTURE = a pinned deterministic
|
|
95
|
+
* response you configured answered.
|
|
96
|
+
*/
|
|
97
|
+
source: 'GENERATED' | 'FIXTURE';
|
|
98
|
+
|
|
93
99
|
toolName: string;
|
|
94
100
|
|
|
95
101
|
/**
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.4.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.4.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|