@roarkanalytics/sdk 4.2.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 +24 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- 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 +3 -1
- 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 +88 -1
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +88 -1
- package/resources/simulation.d.ts.map +1 -1
- package/resources/simulation.js +29 -0
- package/resources/simulation.js.map +1 -1
- package/resources/simulation.mjs +29 -0
- package/resources/simulation.mjs.map +1 -1
- package/src/client.ts +43 -1
- package/src/resources/index.ts +18 -1
- 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 +101 -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,217 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class SimulationToolFixture extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create-or-replace by scope: one fixture per tool project-wide, plus one per
|
|
7
|
+
* (tool, flow variant). Setting the same scope twice replaces the response, so CI
|
|
8
|
+
* can apply fixtures idempotently. During Roark test calls the tool guard answers
|
|
9
|
+
* with the fixture verbatim instead of generating a response; real callers are
|
|
10
|
+
* never affected.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const simulationToolFixture =
|
|
15
|
+
* await client.simulationToolFixture.create({
|
|
16
|
+
* toolName: 'lookup_availability',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: SimulationToolFixtureCreateParams, options?: RequestOptions): APIPromise<SimulationToolFixtureCreateResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Change the response, description, or enabled state of an existing fixture.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const simulationToolFixture =
|
|
27
|
+
* await client.simulationToolFixture.update(
|
|
28
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
update(fixtureID: string, body?: SimulationToolFixtureUpdateParams | null | undefined, options?: RequestOptions): APIPromise<SimulationToolFixtureUpdateResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* All deterministic tool responses configured for this project, optionally
|
|
35
|
+
* filtered by tool.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const simulationToolFixtures =
|
|
40
|
+
* await client.simulationToolFixture.list();
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
list(query?: SimulationToolFixtureListParams | null | undefined, options?: RequestOptions): APIPromise<SimulationToolFixtureListResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* The tool goes back to scenario-aware generated responses in test calls.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const simulationToolFixture =
|
|
50
|
+
* await client.simulationToolFixture.delete(
|
|
51
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
delete(fixtureID: string, options?: RequestOptions): APIPromise<SimulationToolFixtureDeleteResponse>;
|
|
56
|
+
}
|
|
57
|
+
export interface SimulationToolFixtureCreateResponse {
|
|
58
|
+
/**
|
|
59
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
60
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
61
|
+
* can force the branch under test. Never applies to real callers.
|
|
62
|
+
*/
|
|
63
|
+
data: SimulationToolFixtureCreateResponse.Data;
|
|
64
|
+
}
|
|
65
|
+
export declare namespace SimulationToolFixtureCreateResponse {
|
|
66
|
+
/**
|
|
67
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
68
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
69
|
+
* can force the branch under test. Never applies to real callers.
|
|
70
|
+
*/
|
|
71
|
+
interface Data {
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* ISO 8601.
|
|
75
|
+
*/
|
|
76
|
+
createdAt: string;
|
|
77
|
+
/**
|
|
78
|
+
* The flow variant this fixture is pinned to. Null = project-wide.
|
|
79
|
+
*/
|
|
80
|
+
customerFlowVariantId: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Why this fixture exists.
|
|
83
|
+
*/
|
|
84
|
+
description: string | null;
|
|
85
|
+
enabled: boolean;
|
|
86
|
+
toolName: string;
|
|
87
|
+
/**
|
|
88
|
+
* ISO 8601.
|
|
89
|
+
*/
|
|
90
|
+
updatedAt: string;
|
|
91
|
+
/**
|
|
92
|
+
* The exact JSON the tool returns during Roark test calls.
|
|
93
|
+
*/
|
|
94
|
+
response?: unknown;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export interface SimulationToolFixtureUpdateResponse {
|
|
98
|
+
/**
|
|
99
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
100
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
101
|
+
* can force the branch under test. Never applies to real callers.
|
|
102
|
+
*/
|
|
103
|
+
data: SimulationToolFixtureUpdateResponse.Data;
|
|
104
|
+
}
|
|
105
|
+
export declare namespace SimulationToolFixtureUpdateResponse {
|
|
106
|
+
/**
|
|
107
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
108
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
109
|
+
* can force the branch under test. Never applies to real callers.
|
|
110
|
+
*/
|
|
111
|
+
interface Data {
|
|
112
|
+
id: string;
|
|
113
|
+
/**
|
|
114
|
+
* ISO 8601.
|
|
115
|
+
*/
|
|
116
|
+
createdAt: string;
|
|
117
|
+
/**
|
|
118
|
+
* The flow variant this fixture is pinned to. Null = project-wide.
|
|
119
|
+
*/
|
|
120
|
+
customerFlowVariantId: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Why this fixture exists.
|
|
123
|
+
*/
|
|
124
|
+
description: string | null;
|
|
125
|
+
enabled: boolean;
|
|
126
|
+
toolName: string;
|
|
127
|
+
/**
|
|
128
|
+
* ISO 8601.
|
|
129
|
+
*/
|
|
130
|
+
updatedAt: string;
|
|
131
|
+
/**
|
|
132
|
+
* The exact JSON the tool returns during Roark test calls.
|
|
133
|
+
*/
|
|
134
|
+
response?: unknown;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export interface SimulationToolFixtureListResponse {
|
|
138
|
+
data: Array<SimulationToolFixtureListResponse.Data>;
|
|
139
|
+
}
|
|
140
|
+
export declare namespace SimulationToolFixtureListResponse {
|
|
141
|
+
/**
|
|
142
|
+
* A deterministic tool response for Roark test calls: where the scenario-aware
|
|
143
|
+
* model makes mocked tools plausible, a fixture makes one exact, so a simulation
|
|
144
|
+
* can force the branch under test. Never applies to real callers.
|
|
145
|
+
*/
|
|
146
|
+
interface Data {
|
|
147
|
+
id: string;
|
|
148
|
+
/**
|
|
149
|
+
* ISO 8601.
|
|
150
|
+
*/
|
|
151
|
+
createdAt: string;
|
|
152
|
+
/**
|
|
153
|
+
* The flow variant this fixture is pinned to. Null = project-wide.
|
|
154
|
+
*/
|
|
155
|
+
customerFlowVariantId: string | null;
|
|
156
|
+
/**
|
|
157
|
+
* Why this fixture exists.
|
|
158
|
+
*/
|
|
159
|
+
description: string | null;
|
|
160
|
+
enabled: boolean;
|
|
161
|
+
toolName: string;
|
|
162
|
+
/**
|
|
163
|
+
* ISO 8601.
|
|
164
|
+
*/
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
/**
|
|
167
|
+
* The exact JSON the tool returns during Roark test calls.
|
|
168
|
+
*/
|
|
169
|
+
response?: unknown;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
export interface SimulationToolFixtureDeleteResponse {
|
|
173
|
+
data: SimulationToolFixtureDeleteResponse.Data;
|
|
174
|
+
}
|
|
175
|
+
export declare namespace SimulationToolFixtureDeleteResponse {
|
|
176
|
+
interface Data {
|
|
177
|
+
deleted: boolean;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
export interface SimulationToolFixtureCreateParams {
|
|
181
|
+
/**
|
|
182
|
+
* The tool this fixture answers for.
|
|
183
|
+
*/
|
|
184
|
+
toolName: string;
|
|
185
|
+
/**
|
|
186
|
+
* Pin the fixture to one flow variant (scenario). Omit for a project-wide fixture.
|
|
187
|
+
* A variant-pinned fixture beats the project-wide one.
|
|
188
|
+
*/
|
|
189
|
+
customerFlowVariantId?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Why this fixture exists.
|
|
192
|
+
*/
|
|
193
|
+
description?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Defaults to true.
|
|
196
|
+
*/
|
|
197
|
+
enabled?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* The exact JSON to return.
|
|
200
|
+
*/
|
|
201
|
+
response?: unknown;
|
|
202
|
+
}
|
|
203
|
+
export interface SimulationToolFixtureUpdateParams {
|
|
204
|
+
description?: string | null;
|
|
205
|
+
enabled?: boolean;
|
|
206
|
+
response?: unknown;
|
|
207
|
+
}
|
|
208
|
+
export interface SimulationToolFixtureListParams {
|
|
209
|
+
/**
|
|
210
|
+
* Only fixtures for this tool.
|
|
211
|
+
*/
|
|
212
|
+
toolName?: string;
|
|
213
|
+
}
|
|
214
|
+
export declare namespace SimulationToolFixture {
|
|
215
|
+
export { type SimulationToolFixtureCreateResponse as SimulationToolFixtureCreateResponse, type SimulationToolFixtureUpdateResponse as SimulationToolFixtureUpdateResponse, type SimulationToolFixtureListResponse as SimulationToolFixtureListResponse, type SimulationToolFixtureDeleteResponse as SimulationToolFixtureDeleteResponse, type SimulationToolFixtureCreateParams as SimulationToolFixtureCreateParams, type SimulationToolFixtureUpdateParams as SimulationToolFixtureUpdateParams, type SimulationToolFixtureListParams as SimulationToolFixtureListParams, };
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=simulation-tool-fixture.d.ts.map
|
|
@@ -0,0 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I;QACnB,OAAO,EAAE,OAAO,CAAC;KAClB;CACF;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IAChD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,OAAO,EACL,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.SimulationToolFixture = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
class SimulationToolFixture extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create-or-replace by scope: one fixture per tool project-wide, plus one per
|
|
10
|
+
* (tool, flow variant). Setting the same scope twice replaces the response, so CI
|
|
11
|
+
* can apply fixtures idempotently. During Roark test calls the tool guard answers
|
|
12
|
+
* with the fixture verbatim instead of generating a response; real callers are
|
|
13
|
+
* never affected.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const simulationToolFixture =
|
|
18
|
+
* await client.simulationToolFixture.create({
|
|
19
|
+
* toolName: 'lookup_availability',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body, options) {
|
|
24
|
+
return this._client.post('/v1/simulation/tool-fixture', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Change the response, description, or enabled state of an existing fixture.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const simulationToolFixture =
|
|
32
|
+
* await client.simulationToolFixture.update(
|
|
33
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
update(fixtureID, body = {}, options) {
|
|
38
|
+
return this._client.put((0, path_1.path) `/v1/simulation/tool-fixture/${fixtureID}`, { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* All deterministic tool responses configured for this project, optionally
|
|
42
|
+
* filtered by tool.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const simulationToolFixtures =
|
|
47
|
+
* await client.simulationToolFixture.list();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
list(query = {}, options) {
|
|
51
|
+
return this._client.get('/v1/simulation/tool-fixture', { query, ...options });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The tool goes back to scenario-aware generated responses in test calls.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const simulationToolFixture =
|
|
59
|
+
* await client.simulationToolFixture.delete(
|
|
60
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
delete(fixtureID, options) {
|
|
65
|
+
return this._client.delete((0, path_1.path) `/v1/simulation/tool-fixture/${fixtureID}`, options);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.SimulationToolFixture = SimulationToolFixture;
|
|
69
|
+
//# sourceMappingURL=simulation-tool-fixture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation-tool-fixture.js","sourceRoot":"","sources":["../src/resources/simulation-tool-fixture.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,qBAAsB,SAAQ,sBAAW;IACpD;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,IAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,SAAiB,EACjB,OAA6D,EAAE,EAC/D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,+BAA+B,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,+BAA+B,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF;AAzED,sDAyEC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
export class SimulationToolFixture extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create-or-replace by scope: one fixture per tool project-wide, plus one per
|
|
7
|
+
* (tool, flow variant). Setting the same scope twice replaces the response, so CI
|
|
8
|
+
* can apply fixtures idempotently. During Roark test calls the tool guard answers
|
|
9
|
+
* with the fixture verbatim instead of generating a response; real callers are
|
|
10
|
+
* never affected.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const simulationToolFixture =
|
|
15
|
+
* await client.simulationToolFixture.create({
|
|
16
|
+
* toolName: 'lookup_availability',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body, options) {
|
|
21
|
+
return this._client.post('/v1/simulation/tool-fixture', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Change the response, description, or enabled state of an existing fixture.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const simulationToolFixture =
|
|
29
|
+
* await client.simulationToolFixture.update(
|
|
30
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
update(fixtureID, body = {}, options) {
|
|
35
|
+
return this._client.put(path `/v1/simulation/tool-fixture/${fixtureID}`, { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* All deterministic tool responses configured for this project, optionally
|
|
39
|
+
* filtered by tool.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const simulationToolFixtures =
|
|
44
|
+
* await client.simulationToolFixture.list();
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
list(query = {}, options) {
|
|
48
|
+
return this._client.get('/v1/simulation/tool-fixture', { query, ...options });
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The tool goes back to scenario-aware generated responses in test calls.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const simulationToolFixture =
|
|
56
|
+
* await client.simulationToolFixture.delete(
|
|
57
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
delete(fixtureID, options) {
|
|
62
|
+
return this._client.delete(path `/v1/simulation/tool-fixture/${fixtureID}`, options);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=simulation-tool-fixture.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation-tool-fixture.mjs","sourceRoot":"","sources":["../src/resources/simulation-tool-fixture.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,IAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,SAAiB,EACjB,OAA6D,EAAE,EAC/D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAA4D,EAAE,EAC9D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,+BAA+B,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF"}
|
|
@@ -2,6 +2,33 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
4
|
export declare class Simulation extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* The server half of the tool guard for code-first agents. When a guarded tool
|
|
7
|
+
* fires during a Roark test call, send the invocation here instead of executing
|
|
8
|
+
* it: Roark answers with a simulated backend response that is valid JSON, shaped
|
|
9
|
+
* by the tool contract you pass, consistent with the test scenario, and consistent
|
|
10
|
+
* with earlier mocked responses in the same call. Real callers are never affected:
|
|
11
|
+
* the guard only diverts when the agent-config resolve response identified the
|
|
12
|
+
* session as a Roark simulation, and this endpoint independently re-validates the
|
|
13
|
+
* simulation before answering.
|
|
14
|
+
*
|
|
15
|
+
* Failure contract for your wrapper: `404` means the simulation id is unknown to
|
|
16
|
+
* this project (treat the session as real). `409` means the simulation has already
|
|
17
|
+
* ended (stale session state: do NOT execute the real tool; return your static
|
|
18
|
+
* fallback). `5xx` means generation failed (return your static fallback).
|
|
19
|
+
*
|
|
20
|
+
* Identical retries (same tool, same arguments) within a few minutes return the
|
|
21
|
+
* stored response, so double-fired handlers stay consistent.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.simulation.mockTool({
|
|
26
|
+
* simulationJobId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
27
|
+
* toolName: 'book_appointment',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
mockTool(body: SimulationMockToolParams, options?: RequestOptions): APIPromise<SimulationMockToolResponse>;
|
|
5
32
|
/**
|
|
6
33
|
* Starts a simulation and returns the run.
|
|
7
34
|
*
|
|
@@ -32,6 +59,39 @@ export declare class Simulation extends APIResource {
|
|
|
32
59
|
*/
|
|
33
60
|
run(body: SimulationRunParams, options?: RequestOptions): APIPromise<SimulationRunResponse>;
|
|
34
61
|
}
|
|
62
|
+
export interface SimulationMockToolResponse {
|
|
63
|
+
/**
|
|
64
|
+
* A simulated backend response for a guarded tool during a Roark test call. The
|
|
65
|
+
* real tool was not, and must not be, executed.
|
|
66
|
+
*/
|
|
67
|
+
data: SimulationMockToolResponse.Data;
|
|
68
|
+
}
|
|
69
|
+
export declare namespace SimulationMockToolResponse {
|
|
70
|
+
/**
|
|
71
|
+
* A simulated backend response for a guarded tool during a Roark test call. The
|
|
72
|
+
* real tool was not, and must not be, executed.
|
|
73
|
+
*/
|
|
74
|
+
interface Data {
|
|
75
|
+
/**
|
|
76
|
+
* True when this exact invocation (same tool, same arguments) was answered moments
|
|
77
|
+
* ago and the stored response was returned, e.g. on a retry.
|
|
78
|
+
*/
|
|
79
|
+
reused: boolean;
|
|
80
|
+
simulationJobId: string;
|
|
81
|
+
/**
|
|
82
|
+
* GENERATED = the scenario-aware model answered; FIXTURE = a pinned deterministic
|
|
83
|
+
* response you configured answered.
|
|
84
|
+
*/
|
|
85
|
+
source: 'GENERATED' | 'FIXTURE';
|
|
86
|
+
toolName: string;
|
|
87
|
+
/**
|
|
88
|
+
* The simulated tool response: valid JSON, shaped by the tool contract, consistent
|
|
89
|
+
* with the test scenario and with earlier mocked responses in the same call.
|
|
90
|
+
* Return this from your tool instead of executing it.
|
|
91
|
+
*/
|
|
92
|
+
result?: unknown;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
35
95
|
export interface SimulationRunResponse {
|
|
36
96
|
/**
|
|
37
97
|
* A started simulation run.
|
|
@@ -72,6 +132,33 @@ export declare namespace SimulationRunResponse {
|
|
|
72
132
|
status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
|
|
73
133
|
}
|
|
74
134
|
}
|
|
135
|
+
export interface SimulationMockToolParams {
|
|
136
|
+
/**
|
|
137
|
+
* The simulation this session belongs to, from the agent-config resolve response
|
|
138
|
+
* (`simulationJobId`). Roark re-validates it against the live simulation before
|
|
139
|
+
* answering.
|
|
140
|
+
*/
|
|
141
|
+
simulationJobId: string;
|
|
142
|
+
/**
|
|
143
|
+
* The tool the agent invoked.
|
|
144
|
+
*/
|
|
145
|
+
toolName: string;
|
|
146
|
+
/**
|
|
147
|
+
* The arguments the agent called the tool with, verbatim.
|
|
148
|
+
*/
|
|
149
|
+
arguments?: {
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Your session or room identifier, echoed back in logs for correlation.
|
|
154
|
+
*/
|
|
155
|
+
sessionId?: string;
|
|
156
|
+
/**
|
|
157
|
+
* The tool's contract: its description and, ideally, its parameter and return
|
|
158
|
+
* shape. The more contract you pass, the more faithful the simulated response.
|
|
159
|
+
*/
|
|
160
|
+
toolDescription?: string;
|
|
161
|
+
}
|
|
75
162
|
export type SimulationRunParams = SimulationRunParams.RunSimulationFromConfig | SimulationRunParams.RunSimulationFromPlanID | SimulationRunParams.RunSimulationFromTemplate;
|
|
76
163
|
export declare namespace SimulationRunParams {
|
|
77
164
|
interface RunSimulationFromConfig {
|
|
@@ -734,6 +821,6 @@ export declare namespace SimulationRunParams {
|
|
|
734
821
|
}
|
|
735
822
|
}
|
|
736
823
|
export declare namespace Simulation {
|
|
737
|
-
export { type SimulationRunResponse as SimulationRunResponse, type SimulationRunParams as SimulationRunParams, };
|
|
824
|
+
export { type SimulationMockToolResponse as SimulationMockToolResponse, type SimulationRunResponse as SimulationRunResponse, type SimulationMockToolParams as SimulationMockToolParams, type SimulationRunParams as SimulationRunParams, };
|
|
738
825
|
}
|
|
739
826
|
//# sourceMappingURL=simulation.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulation.d.mts","sourceRoot":"","sources":["../src/resources/simulation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,GAAG,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG5F;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;CAClC;AAED,yBAAiB,qBAAqB,CAAC;IACrC;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,WAAW,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAE3B;;;WAGG;QACH,mBAAmB,EAAE,MAAM,CAAC;QAE5B;;WAEG;QACH,sBAAsB,EAAE,MAAM,CAAC;QAE/B;;;WAGG;QACH,MAAM,EACF,SAAS,GACT,QAAQ,GACR,oBAAoB,GACpB,s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AAM,CAAC;aACf;SACF;QAED,UAAiB,YAAY;YAC3B;;eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,SAAS,EAAE;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;aAAE,CAAC;YAErC;;eAEG;YACH,UAAU,CAAC,EAAE,MAAM,CAAC;YAEpB;;eAEG;YACH,SAAS,CAAC,EAAE,IAAI,CAAC;SAClB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -2,6 +2,33 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
export declare class Simulation extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* The server half of the tool guard for code-first agents. When a guarded tool
|
|
7
|
+
* fires during a Roark test call, send the invocation here instead of executing
|
|
8
|
+
* it: Roark answers with a simulated backend response that is valid JSON, shaped
|
|
9
|
+
* by the tool contract you pass, consistent with the test scenario, and consistent
|
|
10
|
+
* with earlier mocked responses in the same call. Real callers are never affected:
|
|
11
|
+
* the guard only diverts when the agent-config resolve response identified the
|
|
12
|
+
* session as a Roark simulation, and this endpoint independently re-validates the
|
|
13
|
+
* simulation before answering.
|
|
14
|
+
*
|
|
15
|
+
* Failure contract for your wrapper: `404` means the simulation id is unknown to
|
|
16
|
+
* this project (treat the session as real). `409` means the simulation has already
|
|
17
|
+
* ended (stale session state: do NOT execute the real tool; return your static
|
|
18
|
+
* fallback). `5xx` means generation failed (return your static fallback).
|
|
19
|
+
*
|
|
20
|
+
* Identical retries (same tool, same arguments) within a few minutes return the
|
|
21
|
+
* stored response, so double-fired handlers stay consistent.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.simulation.mockTool({
|
|
26
|
+
* simulationJobId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
27
|
+
* toolName: 'book_appointment',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
mockTool(body: SimulationMockToolParams, options?: RequestOptions): APIPromise<SimulationMockToolResponse>;
|
|
5
32
|
/**
|
|
6
33
|
* Starts a simulation and returns the run.
|
|
7
34
|
*
|
|
@@ -32,6 +59,39 @@ export declare class Simulation extends APIResource {
|
|
|
32
59
|
*/
|
|
33
60
|
run(body: SimulationRunParams, options?: RequestOptions): APIPromise<SimulationRunResponse>;
|
|
34
61
|
}
|
|
62
|
+
export interface SimulationMockToolResponse {
|
|
63
|
+
/**
|
|
64
|
+
* A simulated backend response for a guarded tool during a Roark test call. The
|
|
65
|
+
* real tool was not, and must not be, executed.
|
|
66
|
+
*/
|
|
67
|
+
data: SimulationMockToolResponse.Data;
|
|
68
|
+
}
|
|
69
|
+
export declare namespace SimulationMockToolResponse {
|
|
70
|
+
/**
|
|
71
|
+
* A simulated backend response for a guarded tool during a Roark test call. The
|
|
72
|
+
* real tool was not, and must not be, executed.
|
|
73
|
+
*/
|
|
74
|
+
interface Data {
|
|
75
|
+
/**
|
|
76
|
+
* True when this exact invocation (same tool, same arguments) was answered moments
|
|
77
|
+
* ago and the stored response was returned, e.g. on a retry.
|
|
78
|
+
*/
|
|
79
|
+
reused: boolean;
|
|
80
|
+
simulationJobId: string;
|
|
81
|
+
/**
|
|
82
|
+
* GENERATED = the scenario-aware model answered; FIXTURE = a pinned deterministic
|
|
83
|
+
* response you configured answered.
|
|
84
|
+
*/
|
|
85
|
+
source: 'GENERATED' | 'FIXTURE';
|
|
86
|
+
toolName: string;
|
|
87
|
+
/**
|
|
88
|
+
* The simulated tool response: valid JSON, shaped by the tool contract, consistent
|
|
89
|
+
* with the test scenario and with earlier mocked responses in the same call.
|
|
90
|
+
* Return this from your tool instead of executing it.
|
|
91
|
+
*/
|
|
92
|
+
result?: unknown;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
35
95
|
export interface SimulationRunResponse {
|
|
36
96
|
/**
|
|
37
97
|
* A started simulation run.
|
|
@@ -72,6 +132,33 @@ export declare namespace SimulationRunResponse {
|
|
|
72
132
|
status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
|
|
73
133
|
}
|
|
74
134
|
}
|
|
135
|
+
export interface SimulationMockToolParams {
|
|
136
|
+
/**
|
|
137
|
+
* The simulation this session belongs to, from the agent-config resolve response
|
|
138
|
+
* (`simulationJobId`). Roark re-validates it against the live simulation before
|
|
139
|
+
* answering.
|
|
140
|
+
*/
|
|
141
|
+
simulationJobId: string;
|
|
142
|
+
/**
|
|
143
|
+
* The tool the agent invoked.
|
|
144
|
+
*/
|
|
145
|
+
toolName: string;
|
|
146
|
+
/**
|
|
147
|
+
* The arguments the agent called the tool with, verbatim.
|
|
148
|
+
*/
|
|
149
|
+
arguments?: {
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Your session or room identifier, echoed back in logs for correlation.
|
|
154
|
+
*/
|
|
155
|
+
sessionId?: string;
|
|
156
|
+
/**
|
|
157
|
+
* The tool's contract: its description and, ideally, its parameter and return
|
|
158
|
+
* shape. The more contract you pass, the more faithful the simulated response.
|
|
159
|
+
*/
|
|
160
|
+
toolDescription?: string;
|
|
161
|
+
}
|
|
75
162
|
export type SimulationRunParams = SimulationRunParams.RunSimulationFromConfig | SimulationRunParams.RunSimulationFromPlanID | SimulationRunParams.RunSimulationFromTemplate;
|
|
76
163
|
export declare namespace SimulationRunParams {
|
|
77
164
|
interface RunSimulationFromConfig {
|
|
@@ -734,6 +821,6 @@ export declare namespace SimulationRunParams {
|
|
|
734
821
|
}
|
|
735
822
|
}
|
|
736
823
|
export declare namespace Simulation {
|
|
737
|
-
export { type SimulationRunResponse as SimulationRunResponse, type SimulationRunParams as SimulationRunParams, };
|
|
824
|
+
export { type SimulationMockToolResponse as SimulationMockToolResponse, type SimulationRunResponse as SimulationRunResponse, type SimulationMockToolParams as SimulationMockToolParams, type SimulationRunParams as SimulationRunParams, };
|
|
738
825
|
}
|
|
739
826
|
//# sourceMappingURL=simulation.d.ts.map
|