@kosdev-code/kos-ui-sdk 3.0.14 → 3.0.15
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/common/constants/index.d.ts +0 -3
- package/common/constants/index.d.ts.map +1 -1
- package/common/types/global.d.ts +0 -1
- package/core/core/transport/base-message-transport.d.ts.map +1 -1
- package/core/core/transport/index.d.ts +1 -0
- package/core/core/transport/index.d.ts.map +1 -1
- package/core/core/transport/mock/future-simulator.d.ts +17 -0
- package/core/core/transport/mock/future-simulator.d.ts.map +1 -0
- package/core/core/transport/mock/index.d.ts +3 -0
- package/core/core/transport/mock/index.d.ts.map +1 -0
- package/core/core/transport/mock/mock-config.d.ts +4 -0
- package/core/core/transport/mock/mock-config.d.ts.map +1 -0
- package/core/core/transport/mock/mock-fixtures.d.ts +26 -0
- package/core/core/transport/mock/mock-fixtures.d.ts.map +1 -0
- package/core/core/transport/mock/mock-frames.d.ts +63 -0
- package/core/core/transport/mock/mock-frames.d.ts.map +1 -0
- package/core/core/transport/mock/mock-interceptor.d.ts +5 -0
- package/core/core/transport/mock/mock-interceptor.d.ts.map +1 -0
- package/core/core/transport/mock/mock-playback.d.ts +4 -0
- package/core/core/transport/mock/mock-playback.d.ts.map +1 -0
- package/core/core/transport/mock/mock-recorder.d.ts +23 -0
- package/core/core/transport/mock/mock-recorder.d.ts.map +1 -0
- package/core/core/transport/mock/mock-registry.d.ts +142 -0
- package/core/core/transport/mock/mock-registry.d.ts.map +1 -0
- package/core/core/transport/mock/mock-setups.d.ts +10 -0
- package/core/core/transport/mock/mock-setups.d.ts.map +1 -0
- package/core/core/transport/mock/mock-types.d.ts +677 -0
- package/core/core/transport/mock/mock-types.d.ts.map +1 -0
- package/core/core/transport/mock/route-matcher.d.ts +25 -0
- package/core/core/transport/mock/route-matcher.d.ts.map +1 -0
- package/core/core/transport/mock/standalone-mock-socket.d.ts +19 -0
- package/core/core/transport/mock/standalone-mock-socket.d.ts.map +1 -0
- package/core/core/transport/transport-factory.d.ts +2 -1
- package/core/core/transport/transport-factory.d.ts.map +1 -1
- package/core/types/global.d.ts +2 -12
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/index.cjs +1896 -40
- package/index.cjs.map +1 -1
- package/index.js +1896 -40
- package/index.js.map +1 -1
- package/models/types/global.d.ts +0 -1
- package/package.json +2 -2
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the KosMock facility: first-class, transport-level mocking
|
|
3
|
+
* for KOS UIs. Mocks are injected statically at startup (code or the
|
|
4
|
+
* `?kosMock=` query param) or dynamically at runtime (`window.KosMock`), with
|
|
5
|
+
* unmatched traffic passing through to the real device (hybrid mode) or a
|
|
6
|
+
* standalone loopback socket (fully offline).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @kosService core.mock
|
|
10
|
+
* @kosApiLevel 24
|
|
11
|
+
*/
|
|
12
|
+
export type KosMockMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "*";
|
|
13
|
+
/**
|
|
14
|
+
* A decoded outbound HTTP-over-WS request, as presented to route handlers.
|
|
15
|
+
*
|
|
16
|
+
* @kosService core.mock
|
|
17
|
+
* @kosApiLevel 24
|
|
18
|
+
*/
|
|
19
|
+
export interface KosMockRequest {
|
|
20
|
+
method: string;
|
|
21
|
+
/** Path + query exactly as sent on the wire. */
|
|
22
|
+
url: string;
|
|
23
|
+
/** Pathname only. */
|
|
24
|
+
path: string;
|
|
25
|
+
/** Captures from `:param` pattern segments. */
|
|
26
|
+
params: Record<string, string>;
|
|
27
|
+
query: Record<string, string>;
|
|
28
|
+
/** Raw frame headers. */
|
|
29
|
+
headers: Record<string, string>;
|
|
30
|
+
requestId: string;
|
|
31
|
+
/** The work tracker header — echo it into simulated future frames. */
|
|
32
|
+
tracker?: string;
|
|
33
|
+
ordered: boolean;
|
|
34
|
+
rawBody?: string;
|
|
35
|
+
/** Lazily parses the JSON body; undefined when absent or malformed. */
|
|
36
|
+
json<T = unknown>(): T | undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @kosService core.mock
|
|
40
|
+
* @kosApiLevel 24
|
|
41
|
+
*/
|
|
42
|
+
export interface KosMockResponse<T = unknown> {
|
|
43
|
+
/**
|
|
44
|
+
* Default 200. Encoded as a string wire header — the transport requires the
|
|
45
|
+
* literal "200" for a response to count as ok.
|
|
46
|
+
*/
|
|
47
|
+
status?: number;
|
|
48
|
+
/** Wrapped in the `{status, data}` envelope service consumers expect. */
|
|
49
|
+
data?: T;
|
|
50
|
+
headers?: Record<string, string>;
|
|
51
|
+
delayMs?: number;
|
|
52
|
+
/** Escape hatch: verbatim body, no envelope. */
|
|
53
|
+
raw?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Shared context passed to route handlers.
|
|
57
|
+
*
|
|
58
|
+
* @kosService core.mock
|
|
59
|
+
* @kosApiLevel 24
|
|
60
|
+
*/
|
|
61
|
+
export interface KosMockContext {
|
|
62
|
+
/** Scenario state shared across handlers — handlers can be stateful. */
|
|
63
|
+
state: Map<string, unknown>;
|
|
64
|
+
futures: IKosMockFutureSimulator;
|
|
65
|
+
publishTopic(topic: string, body: unknown, headers?: Record<string, string>): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Return `undefined` to decline the request: the next matching route is
|
|
69
|
+
* consulted, then the `onUnmatched` policy applies (pass through to the real
|
|
70
|
+
* transport in hybrid mode).
|
|
71
|
+
*
|
|
72
|
+
* @kosService core.mock
|
|
73
|
+
* @kosApiLevel 24
|
|
74
|
+
*/
|
|
75
|
+
export type KosMockRouteHandler = (req: KosMockRequest, ctx: KosMockContext) => KosMockResponse | undefined | Promise<KosMockResponse | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* @kosService core.mock
|
|
78
|
+
* @kosApiLevel 24
|
|
79
|
+
*/
|
|
80
|
+
export interface KosMockRouteOptions {
|
|
81
|
+
id?: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
/** Remove the route after it first serves a response. */
|
|
84
|
+
once?: boolean;
|
|
85
|
+
enabled?: boolean;
|
|
86
|
+
delayMs?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Fixture this route belongs to. Emitted on every response as the
|
|
89
|
+
* `kos-mock-fixture` wire header (all mocked responses additionally carry
|
|
90
|
+
* `kos-mocked: true`).
|
|
91
|
+
*/
|
|
92
|
+
fixture?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Request guard for multiplexed endpoints: the route only claims requests
|
|
95
|
+
* this predicate accepts (e.g. `(req) => req.json()?.op === "start"`).
|
|
96
|
+
* Rejected requests fall through to later routes / the unmatched policy.
|
|
97
|
+
*/
|
|
98
|
+
when?: (req: KosMockRequest) => boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* @kosService core.mock
|
|
102
|
+
* @kosApiLevel 24
|
|
103
|
+
*/
|
|
104
|
+
export interface KosMockHandle {
|
|
105
|
+
readonly id: string;
|
|
106
|
+
remove(): void;
|
|
107
|
+
enable(): void;
|
|
108
|
+
disable(): void;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* @kosService core.mock
|
|
112
|
+
* @kosApiLevel 24
|
|
113
|
+
*/
|
|
114
|
+
export interface KosMockRouteInfo {
|
|
115
|
+
id: string;
|
|
116
|
+
method: KosMockMethod;
|
|
117
|
+
pattern: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
enabled: boolean;
|
|
120
|
+
hitCount: number;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @kosService core.mock
|
|
124
|
+
* @kosApiLevel 24
|
|
125
|
+
*/
|
|
126
|
+
export interface KosMockConfig {
|
|
127
|
+
/**
|
|
128
|
+
* Boot the transport against a standalone loopback socket instead of a real
|
|
129
|
+
* WebSocket. Must be set before KosCore constructs the transport (i.e. at
|
|
130
|
+
* module scope or via `?kosMock=standalone`); it is not togglable on a live
|
|
131
|
+
* connection — dynamic mocking on a live socket is hybrid mode.
|
|
132
|
+
*/
|
|
133
|
+
standalone?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* What happens to requests no route claims. Defaults to "passthrough" in
|
|
136
|
+
* hybrid mode and "respond404" in standalone mode.
|
|
137
|
+
*/
|
|
138
|
+
onUnmatched?: "passthrough" | "respond404" | "warn";
|
|
139
|
+
/**
|
|
140
|
+
* Standalone only: synthesize the auth frame that authorizes the transport
|
|
141
|
+
* after open (default true), so boot completes without build flags.
|
|
142
|
+
*/
|
|
143
|
+
authorize?: boolean;
|
|
144
|
+
defaultDelayMs?: number;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A named, self-contained mock setup. `setup` runs immediately on
|
|
148
|
+
* registration and may return a teardown, invoked when the scenario handle is
|
|
149
|
+
* removed (or on `clear()`).
|
|
150
|
+
*
|
|
151
|
+
* @kosService core.mock
|
|
152
|
+
* @kosApiLevel 24
|
|
153
|
+
*/
|
|
154
|
+
export interface KosMockScenario {
|
|
155
|
+
name: string;
|
|
156
|
+
setup(mock: IKosMockControl): void | (() => void);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Future end states, structurally identical to the models-layer
|
|
160
|
+
* `FutureEndState` values (kept as literals here — core must not import
|
|
161
|
+
* models).
|
|
162
|
+
*
|
|
163
|
+
* @kosService core.mock
|
|
164
|
+
* @kosApiLevel 24
|
|
165
|
+
*/
|
|
166
|
+
export type KosMockFutureEndState = "SUCCESS" | "FAIL" | "ABORT" | "CANCEL";
|
|
167
|
+
/**
|
|
168
|
+
* The wire shape of a simulated future frame; structurally assignable to the
|
|
169
|
+
* models-layer `FutureResponse`.
|
|
170
|
+
*
|
|
171
|
+
* @kosService core.mock
|
|
172
|
+
* @kosApiLevel 24
|
|
173
|
+
*/
|
|
174
|
+
export interface KosMockFutureFrame {
|
|
175
|
+
id: string;
|
|
176
|
+
tracker?: string;
|
|
177
|
+
progress?: number;
|
|
178
|
+
remainingTimeMs?: number;
|
|
179
|
+
endState?: KosMockFutureEndState;
|
|
180
|
+
reason?: string;
|
|
181
|
+
clientData?: Record<string, unknown>;
|
|
182
|
+
note?: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* @kosService core.mock
|
|
186
|
+
* @kosApiLevel 24
|
|
187
|
+
*/
|
|
188
|
+
export interface KosMockFutureOptions {
|
|
189
|
+
/** Defaults to a generated uuid. */
|
|
190
|
+
id?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Echo of the request's tracker header. This is the only linkage between a
|
|
193
|
+
* simulated future and the model that initiated the request — prefer
|
|
194
|
+
* `futures.fromRequest`, which fills it in.
|
|
195
|
+
*/
|
|
196
|
+
tracker?: string;
|
|
197
|
+
/** Total simulated runtime. Default 5000. */
|
|
198
|
+
durationMs?: number;
|
|
199
|
+
/** Progress frame cadence. Default 250. */
|
|
200
|
+
intervalMs?: number;
|
|
201
|
+
/** Terminal state when the duration elapses. Default "SUCCESS". */
|
|
202
|
+
endState?: KosMockFutureEndState;
|
|
203
|
+
reason?: string;
|
|
204
|
+
clientData?: Record<string, unknown>;
|
|
205
|
+
/** Start ticking immediately. Default true. */
|
|
206
|
+
autoStart?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Auto-register cancel routes (`POST /api/kos/future/:id/cancel`,
|
|
209
|
+
* `DELETE /api/kos/future/:id`) that end this future with "CANCEL".
|
|
210
|
+
* Default true.
|
|
211
|
+
*/
|
|
212
|
+
registerCancelRoute?: boolean;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* @kosService core.mock
|
|
216
|
+
* @kosApiLevel 24
|
|
217
|
+
*/
|
|
218
|
+
export interface IKosMockFutureHandle {
|
|
219
|
+
readonly id: string;
|
|
220
|
+
readonly tracker?: string;
|
|
221
|
+
readonly progress: number;
|
|
222
|
+
readonly done: boolean;
|
|
223
|
+
/** Current frame — embed as a route response's `data`. */
|
|
224
|
+
snapshot(): KosMockFutureFrame;
|
|
225
|
+
start(): void;
|
|
226
|
+
emitProgress(progress: number, remainingTimeMs?: number): void;
|
|
227
|
+
complete(endState?: KosMockFutureEndState, reason?: string): void;
|
|
228
|
+
cancel(): void;
|
|
229
|
+
/** Stops timers and forgets the future without emitting a terminal frame. */
|
|
230
|
+
dispose(): void;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Generic future lifecycle simulator: emits `kos.future` frames through the
|
|
234
|
+
* inbound transport path so the real future plumbing runs.
|
|
235
|
+
*
|
|
236
|
+
* @kosService core.mock
|
|
237
|
+
* @kosApiLevel 24
|
|
238
|
+
*/
|
|
239
|
+
export interface IKosMockFutureSimulator {
|
|
240
|
+
create(options?: KosMockFutureOptions): IKosMockFutureHandle;
|
|
241
|
+
/** `create` with the tracker pulled from the request frame. */
|
|
242
|
+
fromRequest(req: KosMockRequest, options?: KosMockFutureOptions): IKosMockFutureHandle;
|
|
243
|
+
get(idOrTracker: string): IKosMockFutureHandle | undefined;
|
|
244
|
+
readonly active: IKosMockFutureHandle[];
|
|
245
|
+
clear(): void;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* One captured HTTP-over-WS exchange in a fixture.
|
|
249
|
+
*
|
|
250
|
+
* @kosService core.mock
|
|
251
|
+
* @kosApiLevel 24
|
|
252
|
+
*/
|
|
253
|
+
export interface KosMockFixtureExchange {
|
|
254
|
+
/** Milliseconds from recording start when the request was sent. */
|
|
255
|
+
tMs: number;
|
|
256
|
+
method: string;
|
|
257
|
+
/** Path + query as sent on the wire. */
|
|
258
|
+
url: string;
|
|
259
|
+
tracker?: string;
|
|
260
|
+
/** Raw request body string, when present. */
|
|
261
|
+
requestBody?: string;
|
|
262
|
+
status: number;
|
|
263
|
+
/** Raw response body string, exactly as captured. */
|
|
264
|
+
responseBody: string;
|
|
265
|
+
/**
|
|
266
|
+
* Milliseconds the device took to answer. Playback delays the replayed
|
|
267
|
+
* response by this (scaled by `speed`) so request/response gaps match
|
|
268
|
+
* reality.
|
|
269
|
+
*/
|
|
270
|
+
latencyMs?: number;
|
|
271
|
+
/** True when the captured response itself came from the mock layer. */
|
|
272
|
+
mocked?: boolean;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* One captured server push (topic frame or future frame).
|
|
276
|
+
*
|
|
277
|
+
* @kosService core.mock
|
|
278
|
+
* @kosApiLevel 24
|
|
279
|
+
*/
|
|
280
|
+
export interface KosMockFixturePush {
|
|
281
|
+
tMs: number;
|
|
282
|
+
kind: "topic" | "future";
|
|
283
|
+
/** Topic for `kind: "topic"` pushes. */
|
|
284
|
+
topic?: string;
|
|
285
|
+
/** Tracker parsed from the body for `kind: "future"` pushes. */
|
|
286
|
+
tracker?: string;
|
|
287
|
+
/** Raw body string, exactly as captured. */
|
|
288
|
+
body: string;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* A recorded traffic capture: JSON-serializable, suitable for committing as
|
|
292
|
+
* an offline-test fixture and loading back via `KosMock.loadFixture`.
|
|
293
|
+
*
|
|
294
|
+
* @kosService core.mock
|
|
295
|
+
* @kosApiLevel 24
|
|
296
|
+
*/
|
|
297
|
+
export interface KosMockFixture {
|
|
298
|
+
version: 1;
|
|
299
|
+
name?: string;
|
|
300
|
+
capturedAt?: string;
|
|
301
|
+
exchanges: KosMockFixtureExchange[];
|
|
302
|
+
pushes: KosMockFixturePush[];
|
|
303
|
+
/**
|
|
304
|
+
* Body discriminators for multiplexed endpoints (many operations over one
|
|
305
|
+
* path, e.g. `POST /api/vms/ops`). Keyed `"METHOD /path"`; the value is a
|
|
306
|
+
* dotted path into the JSON request body (e.g. `"op"` or
|
|
307
|
+
* `"operation.name"`). During playback, captured exchanges for that
|
|
308
|
+
* endpoint are bucketed by the discriminator value and each incoming
|
|
309
|
+
* request is served from its matching bucket (captured order within the
|
|
310
|
+
* bucket), so calls can replay in any order. Requests whose value matches
|
|
311
|
+
* no bucket decline — passing through to the real backend in hybrid mode,
|
|
312
|
+
* or hitting the unmatched policy in standalone.
|
|
313
|
+
*/
|
|
314
|
+
discriminators?: Record<string, string>;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Records live transport traffic into a {@link KosMockFixture}. Works against
|
|
318
|
+
* a real device (hybrid or fully live) and captures mocked responses too,
|
|
319
|
+
* marking them.
|
|
320
|
+
*
|
|
321
|
+
* @kosService core.mock
|
|
322
|
+
* @kosApiLevel 24
|
|
323
|
+
*/
|
|
324
|
+
export interface IKosMockRecorder {
|
|
325
|
+
readonly isRecording: boolean;
|
|
326
|
+
start(options?: {
|
|
327
|
+
name?: string;
|
|
328
|
+
}): void;
|
|
329
|
+
/** Stops recording and returns the finished fixture. */
|
|
330
|
+
stop(): KosMockFixture;
|
|
331
|
+
/** Snapshot of the capture so far without stopping. */
|
|
332
|
+
toFixture(): KosMockFixture;
|
|
333
|
+
/** Browser: triggers a JSON download of the current fixture. */
|
|
334
|
+
download(filename?: string): void;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* A decoded outbound request, as seen by observers.
|
|
338
|
+
*
|
|
339
|
+
* @kosService core.mock
|
|
340
|
+
* @kosApiLevel 24
|
|
341
|
+
*/
|
|
342
|
+
export interface KosMockRequestObservation {
|
|
343
|
+
method: string;
|
|
344
|
+
url: string;
|
|
345
|
+
path: string;
|
|
346
|
+
query: Record<string, string>;
|
|
347
|
+
requestId: string;
|
|
348
|
+
tracker?: string;
|
|
349
|
+
rawBody?: string;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* A decoded inbound response, as seen by observers.
|
|
353
|
+
*
|
|
354
|
+
* @kosService core.mock
|
|
355
|
+
* @kosApiLevel 24
|
|
356
|
+
*/
|
|
357
|
+
export interface KosMockResponseObservation {
|
|
358
|
+
requestId: string;
|
|
359
|
+
status: number;
|
|
360
|
+
/** True when the response was generated by the mock layer. */
|
|
361
|
+
mocked: boolean;
|
|
362
|
+
/** Fixture name, when the mocked response came from one. */
|
|
363
|
+
fixture?: string;
|
|
364
|
+
body: string;
|
|
365
|
+
headers: Record<string, string>;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* An inbound topic push, as seen by observers.
|
|
369
|
+
*
|
|
370
|
+
* @kosService core.mock
|
|
371
|
+
* @kosApiLevel 24
|
|
372
|
+
*/
|
|
373
|
+
export interface KosMockTopicObservation {
|
|
374
|
+
topic: string;
|
|
375
|
+
body: string;
|
|
376
|
+
headers: Record<string, string>;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Passive observation of transport traffic — every outbound request and
|
|
380
|
+
* every inbound response/topic/future frame, whether real, mocked, or
|
|
381
|
+
* injected. Observation does not require mocking to be enabled, so hooks
|
|
382
|
+
* work against a live device. This is the trigger surface for orchestrating
|
|
383
|
+
* side effects that are caused by activity but not part of a request/response
|
|
384
|
+
* or future (e.g. fire a topic when a pour future crosses 50% progress).
|
|
385
|
+
*
|
|
386
|
+
* @kosService core.mock
|
|
387
|
+
* @kosApiLevel 24
|
|
388
|
+
*/
|
|
389
|
+
export interface KosMockObserver {
|
|
390
|
+
onRequest?: (request: KosMockRequestObservation) => void;
|
|
391
|
+
onResponse?: (response: KosMockResponseObservation) => void;
|
|
392
|
+
onTopic?: (topic: KosMockTopicObservation) => void;
|
|
393
|
+
onFuture?: (future: KosMockFutureFrame) => void;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Context handed to a response transformer.
|
|
397
|
+
*
|
|
398
|
+
* @kosService core.mock
|
|
399
|
+
* @kosApiLevel 24
|
|
400
|
+
*/
|
|
401
|
+
export interface KosMockTransformInfo {
|
|
402
|
+
request: KosMockRequestObservation;
|
|
403
|
+
/** Response wire headers (read-only view). */
|
|
404
|
+
headers: Record<string, string>;
|
|
405
|
+
status: number;
|
|
406
|
+
/** True when the response being transformed came from the mock layer. */
|
|
407
|
+
mocked: boolean;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Patches a real (or mocked) response body in flight. Receives the parsed
|
|
411
|
+
* JSON body (usually the `{status, data}` envelope); return the modified
|
|
412
|
+
* value, or `undefined` to leave the response unchanged. Transformed
|
|
413
|
+
* responses are stamped with the `kos-mock-transformed: true` wire header.
|
|
414
|
+
*
|
|
415
|
+
* @kosService core.mock
|
|
416
|
+
* @kosApiLevel 24
|
|
417
|
+
*/
|
|
418
|
+
export type KosMockResponseTransformer = (body: unknown, info: KosMockTransformInfo) => unknown | undefined;
|
|
419
|
+
/**
|
|
420
|
+
* @kosService core.mock
|
|
421
|
+
* @kosApiLevel 24
|
|
422
|
+
*/
|
|
423
|
+
export interface KosMockTransformerInfo {
|
|
424
|
+
id: string;
|
|
425
|
+
method: KosMockMethod;
|
|
426
|
+
pattern: string;
|
|
427
|
+
description?: string;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Config-property helpers: simulate config changes and inject not-yet-real
|
|
431
|
+
* properties over the standard config-bean wire surface
|
|
432
|
+
* (`GET /api/kos/config/details/{id}/{depth}`, `POST /api/kos/config/{id}`,
|
|
433
|
+
* WS topic `/kos/config/{id}`).
|
|
434
|
+
*
|
|
435
|
+
* @kosService core.mock
|
|
436
|
+
* @kosApiLevel 24
|
|
437
|
+
*/
|
|
438
|
+
export interface KosMockConfigFacade {
|
|
439
|
+
/**
|
|
440
|
+
* Simulates a config change: publishes the `/kos/config/{beanId}` update
|
|
441
|
+
* topic with a `changes` envelope for the given properties. Purely an
|
|
442
|
+
* injection — nothing is sent to the backend.
|
|
443
|
+
*/
|
|
444
|
+
update(beanId: string, props: Record<string, unknown>, options?: {
|
|
445
|
+
previousValues?: Record<string, unknown>;
|
|
446
|
+
}): void;
|
|
447
|
+
/**
|
|
448
|
+
* Injects properties (and optionally their schema nodes) into a config
|
|
449
|
+
* bean before the backend implements them. Reads of the bean's details are
|
|
450
|
+
* transformed to include the injected props; writes touching only injected
|
|
451
|
+
* props are absorbed locally (200 + change topic); other writes pass
|
|
452
|
+
* through untouched.
|
|
453
|
+
*/
|
|
454
|
+
inject(beanId: string, injection: {
|
|
455
|
+
props: Record<string, unknown>;
|
|
456
|
+
/** Schema nodes keyed by prop name, merged into `schema.schema` + `paths`. */
|
|
457
|
+
schema?: Record<string, object>;
|
|
458
|
+
}): KosMockConfigInjectionHandle;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* @kosService core.mock
|
|
462
|
+
* @kosApiLevel 24
|
|
463
|
+
*/
|
|
464
|
+
export interface KosMockConfigInjectionHandle extends KosMockHandle {
|
|
465
|
+
/** Updates injected values and fires the corresponding change topic. */
|
|
466
|
+
set(props: Record<string, unknown>): void;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* @kosService core.mock
|
|
470
|
+
* @kosApiLevel 24
|
|
471
|
+
*/
|
|
472
|
+
export interface KosMockFixtureSummary {
|
|
473
|
+
name: string;
|
|
474
|
+
/** Where the fixture lives: this browser's IndexedDB or the fixture server. */
|
|
475
|
+
source: "browser" | "server";
|
|
476
|
+
capturedAt?: string;
|
|
477
|
+
exchanges: number;
|
|
478
|
+
pushes: number;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Out-of-band fixture library. Fixtures live in the browser's IndexedDB
|
|
482
|
+
* and/or a `kosui fixtures serve` directory — never bundled into the app.
|
|
483
|
+
* When a server is configured (`useServer` or `?kosFixtureServer=`), it is
|
|
484
|
+
* preferred for saves and lookups, with the browser store as fallback.
|
|
485
|
+
*
|
|
486
|
+
* @kosService core.mock
|
|
487
|
+
* @kosApiLevel 24
|
|
488
|
+
*/
|
|
489
|
+
export interface IKosMockFixtureStore {
|
|
490
|
+
/** Fixture server base URL, when configured. */
|
|
491
|
+
readonly serverUrl: string | undefined;
|
|
492
|
+
/** Configures the fixture server (undefined disconnects; true = default URL). */
|
|
493
|
+
useServer(url?: string | true): void;
|
|
494
|
+
/** Saves a fixture under `name` (or its own name). Returns the name. */
|
|
495
|
+
save(fixture: KosMockFixture, options?: {
|
|
496
|
+
name?: string;
|
|
497
|
+
to?: "browser" | "server";
|
|
498
|
+
}): Promise<string>;
|
|
499
|
+
/** Saves the recorder's current capture — console one-liner. */
|
|
500
|
+
saveRecording(name?: string): Promise<string>;
|
|
501
|
+
load(name: string): Promise<KosMockFixture | undefined>;
|
|
502
|
+
list(): Promise<KosMockFixtureSummary[]>;
|
|
503
|
+
delete(name: string): Promise<boolean>;
|
|
504
|
+
/** Browser: file-picker import of a fixture JSON into the store. */
|
|
505
|
+
import(): Promise<string | undefined>;
|
|
506
|
+
/** Loads a fixture by name and starts playback. */
|
|
507
|
+
play(name: string, options?: KosMockPlaybackOptions): Promise<KosMockPlaybackHandle>;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* The contract for an out-of-band setup module: the default export receives
|
|
511
|
+
* the KosMock instance, registers whatever it needs (routes, transformers,
|
|
512
|
+
* observers, config injections, ...), and may return a teardown. Written
|
|
513
|
+
* against the passed instance / `window.KosMock` — no imports required, so
|
|
514
|
+
* modules load from any origin without a bundler.
|
|
515
|
+
*
|
|
516
|
+
* @kosService core.mock
|
|
517
|
+
* @kosApiLevel 24
|
|
518
|
+
*/
|
|
519
|
+
export type KosMockSetupModule = (kosMock: IKosMockControl) => void | (() => void) | Promise<void | (() => void)>;
|
|
520
|
+
/**
|
|
521
|
+
* @kosService core.mock
|
|
522
|
+
* @kosApiLevel 24
|
|
523
|
+
*/
|
|
524
|
+
export interface KosMockSetupHandle {
|
|
525
|
+
name: string;
|
|
526
|
+
url: string;
|
|
527
|
+
/** Runs the module's teardown and forgets the setup. */
|
|
528
|
+
unload(): void;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Loads imperative mock setups (transformers, handlers, scenarios) from out
|
|
532
|
+
* of band — the fixture server's `setups/` directory or any URL — with an
|
|
533
|
+
* install/teardown lifecycle, so imperative mock code needn't be bundled
|
|
534
|
+
* into the app any more than fixtures are.
|
|
535
|
+
*
|
|
536
|
+
* @kosService core.mock
|
|
537
|
+
* @kosApiLevel 24
|
|
538
|
+
*/
|
|
539
|
+
export interface IKosMockSetupStore {
|
|
540
|
+
/**
|
|
541
|
+
* Imports a setup module and runs its default export. Bare names resolve
|
|
542
|
+
* to `{fixtureServer}/setups/{name}.mjs`; full URLs load as-is. Loading a
|
|
543
|
+
* name that is already active replaces it (old teardown runs first).
|
|
544
|
+
*/
|
|
545
|
+
load(nameOrUrl: string): Promise<KosMockSetupHandle>;
|
|
546
|
+
/** Server-side setup listing (requires a configured/reachable server). */
|
|
547
|
+
list(): Promise<Array<{
|
|
548
|
+
name: string;
|
|
549
|
+
}>>;
|
|
550
|
+
active(): KosMockSetupHandle[];
|
|
551
|
+
/** Unloads by name; true when something was unloaded. */
|
|
552
|
+
unload(name: string): boolean;
|
|
553
|
+
/** Unloads everything. */
|
|
554
|
+
clear(): void;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* @kosService core.mock
|
|
558
|
+
* @kosApiLevel 24
|
|
559
|
+
*/
|
|
560
|
+
export interface KosMockPlaybackOptions {
|
|
561
|
+
/** Overrides the fixture's name for the `kos-mock-fixture` header. */
|
|
562
|
+
name?: string;
|
|
563
|
+
/**
|
|
564
|
+
* Applies to UNANCHORED pushes (topics, and futures whose tracker matches
|
|
565
|
+
* no captured exchange): "scheduled" (default) replays them on their
|
|
566
|
+
* captured timeline from load; "manual" waits for `startPushes()`.
|
|
567
|
+
* Future pushes whose tracker matches a captured exchange are ANCHORED:
|
|
568
|
+
* they always fire relative to the moment their replayed request is served,
|
|
569
|
+
* at the captured request→frame deltas — like the real device.
|
|
570
|
+
*/
|
|
571
|
+
pushes?: "scheduled" | "manual";
|
|
572
|
+
/**
|
|
573
|
+
* Speed multiplier applied to every replayed timing (response latency,
|
|
574
|
+
* anchored deltas, unanchored timeline). 2 = twice as fast. Default 1.
|
|
575
|
+
*/
|
|
576
|
+
speed?: number;
|
|
577
|
+
/** Skip replaying captured response latency (serve instantly). */
|
|
578
|
+
ignoreLatency?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Merged over the fixture's own discriminators; values may also be
|
|
581
|
+
* functions extracting the discriminator from the parsed request body.
|
|
582
|
+
*/
|
|
583
|
+
discriminators?: Record<string, string | ((body: unknown) => unknown)>;
|
|
584
|
+
/**
|
|
585
|
+
* What happens as captured exchanges are served. "once" retires each
|
|
586
|
+
* exchange after it serves — when an endpoint (or discriminator bucket)
|
|
587
|
+
* runs dry, further calls decline, passing through to the real backend in
|
|
588
|
+
* hybrid mode. "repeat-last" keeps re-serving the final captured response.
|
|
589
|
+
* Default: "once" in hybrid, "repeat-last" in standalone.
|
|
590
|
+
*/
|
|
591
|
+
consume?: "once" | "repeat-last";
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* @kosService core.mock
|
|
595
|
+
* @kosApiLevel 24
|
|
596
|
+
*/
|
|
597
|
+
export interface KosMockPlaybackHandle {
|
|
598
|
+
readonly name?: string;
|
|
599
|
+
/** Begins the push timeline (no-op when pushes are "scheduled"). */
|
|
600
|
+
startPushes(): void;
|
|
601
|
+
/** Unregisters the fixture's routes and cancels pending pushes. */
|
|
602
|
+
stop(): void;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* The KosMock control surface — everything a fixture module, a test, a future
|
|
606
|
+
* Studio tool, or an in-page agent drives. Reachable as `window.KosMock`.
|
|
607
|
+
*
|
|
608
|
+
* @kosService core.mock
|
|
609
|
+
* @kosApiLevel 24
|
|
610
|
+
*/
|
|
611
|
+
export interface IKosMockControl {
|
|
612
|
+
/** Master switch. Registering a route enables the facility automatically. */
|
|
613
|
+
readonly enabled: boolean;
|
|
614
|
+
enable(): void;
|
|
615
|
+
disable(): void;
|
|
616
|
+
readonly standalone: boolean;
|
|
617
|
+
configure(config: KosMockConfig): void;
|
|
618
|
+
route(method: KosMockMethod, pattern: string, handler: KosMockRouteHandler | KosMockResponse, options?: KosMockRouteOptions): KosMockHandle;
|
|
619
|
+
get(pattern: string, handler: KosMockRouteHandler | KosMockResponse, options?: KosMockRouteOptions): KosMockHandle;
|
|
620
|
+
post(pattern: string, handler: KosMockRouteHandler | KosMockResponse, options?: KosMockRouteOptions): KosMockHandle;
|
|
621
|
+
put(pattern: string, handler: KosMockRouteHandler | KosMockResponse, options?: KosMockRouteOptions): KosMockHandle;
|
|
622
|
+
del(pattern: string, handler: KosMockRouteHandler | KosMockResponse, options?: KosMockRouteOptions): KosMockHandle;
|
|
623
|
+
/**
|
|
624
|
+
* Registers a response transformer for requests matching method + path
|
|
625
|
+
* pattern. Applies to passthrough (real device) and mocked responses
|
|
626
|
+
* alike; transformers run in registration order, each seeing the previous
|
|
627
|
+
* one's output.
|
|
628
|
+
*/
|
|
629
|
+
transformResponse(method: KosMockMethod, pattern: string, transform: KosMockResponseTransformer, options?: {
|
|
630
|
+
id?: string;
|
|
631
|
+
description?: string;
|
|
632
|
+
}): KosMockHandle;
|
|
633
|
+
/** Config-property simulation helpers. */
|
|
634
|
+
readonly config: KosMockConfigFacade;
|
|
635
|
+
/** Pushes an inbound topic frame through the real receive path. */
|
|
636
|
+
publishTopic(topic: string, body: unknown, headers?: Record<string, string>): void;
|
|
637
|
+
/** Low-level escape hatch: inject a verbatim inbound frame. */
|
|
638
|
+
publishFrame(rawFrame: string): void;
|
|
639
|
+
topicEmitter(topic: string, options: {
|
|
640
|
+
intervalMs: number;
|
|
641
|
+
body: (tick: number) => unknown;
|
|
642
|
+
}): KosMockHandle;
|
|
643
|
+
readonly futures: IKosMockFutureSimulator;
|
|
644
|
+
/** Live-traffic capture for building offline fixtures. */
|
|
645
|
+
readonly recorder: IKosMockRecorder;
|
|
646
|
+
/** Out-of-band fixture library (browser store + `kosui fixtures serve`). */
|
|
647
|
+
readonly fixtures: IKosMockFixtureStore;
|
|
648
|
+
/** Out-of-band imperative setup modules with install/teardown lifecycle. */
|
|
649
|
+
readonly setups: IKosMockSetupStore;
|
|
650
|
+
/**
|
|
651
|
+
* Registers a passive traffic observer; returns an unregister function.
|
|
652
|
+
* Works regardless of the enabled flag (live devices included).
|
|
653
|
+
*/
|
|
654
|
+
observe(observer: KosMockObserver): () => void;
|
|
655
|
+
/** Loads a recorded fixture as replay routes + a push timeline. */
|
|
656
|
+
loadFixture(fixture: KosMockFixture, options?: KosMockPlaybackOptions): KosMockPlaybackHandle;
|
|
657
|
+
readonly state: Map<string, unknown>;
|
|
658
|
+
scenario(scenario: KosMockScenario): KosMockHandle;
|
|
659
|
+
list(): KosMockRouteInfo[];
|
|
660
|
+
describe(): {
|
|
661
|
+
enabled: boolean;
|
|
662
|
+
standalone: boolean;
|
|
663
|
+
routes: KosMockRouteInfo[];
|
|
664
|
+
transformers: KosMockTransformerInfo[];
|
|
665
|
+
setups: Array<{
|
|
666
|
+
name: string;
|
|
667
|
+
url: string;
|
|
668
|
+
}>;
|
|
669
|
+
activeFutures: string[];
|
|
670
|
+
subscribedTopics: string[];
|
|
671
|
+
};
|
|
672
|
+
/** Topics observed in outbound `kos.broker.subscribe` frames. */
|
|
673
|
+
readonly subscribedTopics: string[];
|
|
674
|
+
/** Removes every route, scenario, emitter, and future; clears state. */
|
|
675
|
+
clear(): void;
|
|
676
|
+
}
|
|
677
|
+
//# sourceMappingURL=mock-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/core/core/transport/mock/mock-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,GAAG,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,M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