@getuserfeedback/protocol 3.1.4 → 3.1.5
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/dist/command-kinds.d.ts +4 -0
- package/dist/command-kinds.d.ts.map +1 -1
- package/dist/command-kinds.js +2 -0
- package/dist/core-command-envelope.d.ts +29 -0
- package/dist/core-command-envelope.d.ts.map +1 -1
- package/dist/core-commands.d.ts +29 -0
- package/dist/core-commands.d.ts.map +1 -1
- package/dist/core-commands.js +11 -0
- package/dist/host/host-event-schemas.d.ts +4 -0
- package/dist/host/host-event-schemas.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/command-kinds.ts +2 -0
- package/src/core-commands.ts +16 -0
- package/src/host/host-event-schemas.test.ts +30 -0
package/dist/command-kinds.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare const coreCommandKindSchema: z.ZodMiniEnum<{
|
|
|
14
14
|
init: "init";
|
|
15
15
|
close: "close";
|
|
16
16
|
reset: "reset";
|
|
17
|
+
"instanceFeedback.capture": "instanceFeedback.capture";
|
|
18
|
+
"instanceFeedback.listMine": "instanceFeedback.listMine";
|
|
17
19
|
}>;
|
|
18
20
|
export declare const publicCommandKindSchema: z.ZodMiniEnum<{
|
|
19
21
|
open: "open";
|
|
@@ -45,6 +47,8 @@ export declare const allCommandKindSchema: z.ZodMiniEnum<{
|
|
|
45
47
|
init: "init";
|
|
46
48
|
close: "close";
|
|
47
49
|
reset: "reset";
|
|
50
|
+
"instanceFeedback.capture": "instanceFeedback.capture";
|
|
51
|
+
"instanceFeedback.listMine": "instanceFeedback.listMine";
|
|
48
52
|
updateHostContext: "updateHostContext";
|
|
49
53
|
emitHostSignal: "emitHostSignal";
|
|
50
54
|
setContainer: "setContainer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-kinds.d.ts","sourceRoot":"","sources":["../src/command-kinds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"command-kinds.d.ts","sourceRoot":"","sources":["../src/command-kinds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAqC9B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;EAA2B,CAAC;AAC9D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;EAA6B,CAAC;AAKlE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EAA0B,CAAC"}
|
package/dist/command-kinds.js
CHANGED
|
@@ -329,6 +329,35 @@ export declare const coreCommandEnvelopeSchema: z.ZodMiniObject<{
|
|
|
329
329
|
}>>;
|
|
330
330
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
331
331
|
kind: z.ZodMiniLiteral<"reset">;
|
|
332
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
333
|
+
kind: z.ZodMiniLiteral<"instanceFeedback.capture">;
|
|
334
|
+
payload: z.ZodMiniObject<{
|
|
335
|
+
targetBindingToken: z.ZodMiniString<string>;
|
|
336
|
+
capturedAt: z.ZodMiniString<string>;
|
|
337
|
+
comment: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
338
|
+
dataType: z.ZodMiniEnum<{
|
|
339
|
+
boolean: "boolean";
|
|
340
|
+
categorical: "categorical";
|
|
341
|
+
numeric: "numeric";
|
|
342
|
+
}>;
|
|
343
|
+
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
344
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
345
|
+
reasonCategories: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
346
|
+
scoreValue: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
|
|
347
|
+
valence: z.ZodMiniEnum<{
|
|
348
|
+
positive: "positive";
|
|
349
|
+
negative: "negative";
|
|
350
|
+
neutral: "neutral";
|
|
351
|
+
}>;
|
|
352
|
+
}, z.core.$strip>;
|
|
353
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
354
|
+
kind: z.ZodMiniLiteral<"instanceFeedback.listMine">;
|
|
355
|
+
payload: z.ZodMiniObject<{
|
|
356
|
+
targets: z.ZodMiniArray<z.ZodMiniObject<{
|
|
357
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
358
|
+
targetBindingToken: z.ZodMiniString<string>;
|
|
359
|
+
}, z.core.$strip>>;
|
|
360
|
+
}, z.core.$strip>;
|
|
332
361
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
333
362
|
kind: z.ZodMiniLiteral<"error">;
|
|
334
363
|
event: z.ZodMiniObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-command-envelope.d.ts","sourceRoot":"","sources":["../src/core-command-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAOrE,sEAAsE;AACtE,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"core-command-envelope.d.ts","sourceRoot":"","sources":["../src/core-command-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAOrE,sEAAsE;AACtE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE7E,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,CAAC;CACxB,CAAC"}
|
package/dist/core-commands.d.ts
CHANGED
|
@@ -286,6 +286,35 @@ export declare const coreCommandPayloadSchema: z.ZodMiniUnion<readonly [z.ZodMin
|
|
|
286
286
|
}>>;
|
|
287
287
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
288
288
|
kind: z.ZodMiniLiteral<"reset">;
|
|
289
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
290
|
+
kind: z.ZodMiniLiteral<"instanceFeedback.capture">;
|
|
291
|
+
payload: z.ZodMiniObject<{
|
|
292
|
+
targetBindingToken: z.ZodMiniString<string>;
|
|
293
|
+
capturedAt: z.ZodMiniString<string>;
|
|
294
|
+
comment: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
295
|
+
dataType: z.ZodMiniEnum<{
|
|
296
|
+
boolean: "boolean";
|
|
297
|
+
categorical: "categorical";
|
|
298
|
+
numeric: "numeric";
|
|
299
|
+
}>;
|
|
300
|
+
label: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
301
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
302
|
+
reasonCategories: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
303
|
+
scoreValue: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniNumber<number>>>;
|
|
304
|
+
valence: z.ZodMiniEnum<{
|
|
305
|
+
positive: "positive";
|
|
306
|
+
negative: "negative";
|
|
307
|
+
neutral: "neutral";
|
|
308
|
+
}>;
|
|
309
|
+
}, z.core.$strip>;
|
|
310
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
311
|
+
kind: z.ZodMiniLiteral<"instanceFeedback.listMine">;
|
|
312
|
+
payload: z.ZodMiniObject<{
|
|
313
|
+
targets: z.ZodMiniArray<z.ZodMiniObject<{
|
|
314
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
315
|
+
targetBindingToken: z.ZodMiniString<string>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
}, z.core.$strip>;
|
|
289
318
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
290
319
|
kind: z.ZodMiniLiteral<"error">;
|
|
291
320
|
event: z.ZodMiniObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-commands.d.ts","sourceRoot":"","sources":["../src/core-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"core-commands.d.ts","sourceRoot":"","sources":["../src/core-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AA8N9B,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAInC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/core-commands.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/mini";
|
|
2
2
|
import { appEventCustomerTrackSchema, appEventExternalIdSchema, appEventSystemTrackSchema, } from "./app-event.js";
|
|
3
3
|
import { ErrorEventSchema } from "./errors.js";
|
|
4
|
+
import { captureInstanceFeedbackRequestSchema, listInstanceFeedbackMineRequestSchema, } from "./instance-feedback.js";
|
|
4
5
|
import { responseMetadataInputSchema } from "./response-metadata.js";
|
|
5
6
|
import { configureOptionsSchema, initOptionsSchema } from "./widget-config.js";
|
|
6
7
|
const flowHandleIdSchema = z.string().check(z.trim(), z.minLength(1));
|
|
@@ -145,6 +146,14 @@ const initCorePayloadSchema = z.strictObject({
|
|
|
145
146
|
const resetPayloadSchema = z.object({
|
|
146
147
|
kind: z.literal("reset"),
|
|
147
148
|
});
|
|
149
|
+
const instanceFeedbackCapturePayloadSchema = z.object({
|
|
150
|
+
kind: z.literal("instanceFeedback.capture"),
|
|
151
|
+
payload: captureInstanceFeedbackRequestSchema,
|
|
152
|
+
});
|
|
153
|
+
const instanceFeedbackListMinePayloadSchema = z.object({
|
|
154
|
+
kind: z.literal("instanceFeedback.listMine"),
|
|
155
|
+
payload: listInstanceFeedbackMineRequestSchema,
|
|
156
|
+
});
|
|
148
157
|
const coreCommandPayloadWithoutIdentifySchema = z.union([
|
|
149
158
|
z.union([openPersistedCorePayloadSchema, openInlineCorePayloadSchema]),
|
|
150
159
|
z.union([prefetchPayloadSchema, prefetchInlinePayloadSchema]),
|
|
@@ -160,6 +169,8 @@ const coreCommandPayloadWithoutIdentifySchema = z.union([
|
|
|
160
169
|
initCorePayloadSchema,
|
|
161
170
|
closeCorePayloadSchema,
|
|
162
171
|
resetPayloadSchema,
|
|
172
|
+
instanceFeedbackCapturePayloadSchema,
|
|
173
|
+
instanceFeedbackListMinePayloadSchema,
|
|
163
174
|
errorPayloadSchema,
|
|
164
175
|
]);
|
|
165
176
|
export const coreCommandPayloadSchema = z.union([
|
|
@@ -32,6 +32,8 @@ export declare const commandSettledDetailSchema: z.ZodMiniDiscriminatedUnion<[z.
|
|
|
32
32
|
init: "init";
|
|
33
33
|
close: "close";
|
|
34
34
|
reset: "reset";
|
|
35
|
+
"instanceFeedback.capture": "instanceFeedback.capture";
|
|
36
|
+
"instanceFeedback.listMine": "instanceFeedback.listMine";
|
|
35
37
|
updateHostContext: "updateHostContext";
|
|
36
38
|
emitHostSignal: "emitHostSignal";
|
|
37
39
|
setContainer: "setContainer";
|
|
@@ -60,6 +62,8 @@ export declare const commandSettledDetailSchema: z.ZodMiniDiscriminatedUnion<[z.
|
|
|
60
62
|
init: "init";
|
|
61
63
|
close: "close";
|
|
62
64
|
reset: "reset";
|
|
65
|
+
"instanceFeedback.capture": "instanceFeedback.capture";
|
|
66
|
+
"instanceFeedback.listMine": "instanceFeedback.listMine";
|
|
63
67
|
updateHostContext: "updateHostContext";
|
|
64
68
|
emitHostSignal: "emitHostSignal";
|
|
65
69
|
setContainer: "setContainer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-event-schemas.d.ts","sourceRoot":"","sources":["../../src/host/host-event-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAoB9B;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;;kBAG3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,gCAAgC,CACvC,CAAC;AAcF,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"host-event-schemas.d.ts","sourceRoot":"","sources":["../../src/host/host-event-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAoB9B;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;;kBAG3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,gCAAgC,CACvC,CAAC;AAcF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAGrC,CAAC;AAEH,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAUrE,eAAO,MAAM,4BAA4B;;;;;;;kBAGvC,CAAC;AAEH,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,eAAO,MAAM,oCAAoC;;;;;;;kBAG/C,CAAC;AAEH,YAAY,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE/E,eAAO,MAAM,yBAAyB;;;;;;;;;kBAMpC,CAAC;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;kBASxC,CAAC;AAEH,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAExE;;GAEG;AACH,wBAAgB,+BAA+B,CAC9C,MAAM,EAAE,OAAO,GACb,0BAA0B,GAAG,IAAI,CAGnC;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACzD,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,0BAA0B,GAAG,IAAI,CAUpC;AAED,YAAY,EAAE,kCAAkC,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,qCAAqC,EAAE,MAAM,0BAA0B,CAAC"}
|
package/package.json
CHANGED
package/src/command-kinds.ts
CHANGED
package/src/core-commands.ts
CHANGED
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
appEventSystemTrackSchema,
|
|
6
6
|
} from "./app-event.js";
|
|
7
7
|
import { ErrorEventSchema } from "./errors.js";
|
|
8
|
+
import {
|
|
9
|
+
captureInstanceFeedbackRequestSchema,
|
|
10
|
+
listInstanceFeedbackMineRequestSchema,
|
|
11
|
+
} from "./instance-feedback.js";
|
|
8
12
|
import { responseMetadataInputSchema } from "./response-metadata.js";
|
|
9
13
|
import { configureOptionsSchema, initOptionsSchema } from "./widget-config.js";
|
|
10
14
|
|
|
@@ -186,6 +190,16 @@ const resetPayloadSchema = z.object({
|
|
|
186
190
|
kind: z.literal("reset"),
|
|
187
191
|
});
|
|
188
192
|
|
|
193
|
+
const instanceFeedbackCapturePayloadSchema = z.object({
|
|
194
|
+
kind: z.literal("instanceFeedback.capture"),
|
|
195
|
+
payload: captureInstanceFeedbackRequestSchema,
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
const instanceFeedbackListMinePayloadSchema = z.object({
|
|
199
|
+
kind: z.literal("instanceFeedback.listMine"),
|
|
200
|
+
payload: listInstanceFeedbackMineRequestSchema,
|
|
201
|
+
});
|
|
202
|
+
|
|
189
203
|
const coreCommandPayloadWithoutIdentifySchema = z.union([
|
|
190
204
|
z.union([openPersistedCorePayloadSchema, openInlineCorePayloadSchema]),
|
|
191
205
|
z.union([prefetchPayloadSchema, prefetchInlinePayloadSchema]),
|
|
@@ -201,6 +215,8 @@ const coreCommandPayloadWithoutIdentifySchema = z.union([
|
|
|
201
215
|
initCorePayloadSchema,
|
|
202
216
|
closeCorePayloadSchema,
|
|
203
217
|
resetPayloadSchema,
|
|
218
|
+
instanceFeedbackCapturePayloadSchema,
|
|
219
|
+
instanceFeedbackListMinePayloadSchema,
|
|
204
220
|
errorPayloadSchema,
|
|
205
221
|
]);
|
|
206
222
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import { commandSettledDetailSchema } from "./host-event-schemas";
|
|
3
|
+
|
|
4
|
+
describe("commandSettledDetailSchema", () => {
|
|
5
|
+
it("accepts instance feedback command settlements", () => {
|
|
6
|
+
for (const kind of [
|
|
7
|
+
"instanceFeedback.capture",
|
|
8
|
+
"instanceFeedback.listMine",
|
|
9
|
+
] as const) {
|
|
10
|
+
expect(
|
|
11
|
+
commandSettledDetailSchema.safeParse({
|
|
12
|
+
instanceId: "instance_123",
|
|
13
|
+
kind,
|
|
14
|
+
ok: true,
|
|
15
|
+
requestId: "req_123",
|
|
16
|
+
result: { status: "accepted" },
|
|
17
|
+
}).success,
|
|
18
|
+
).toBe(true);
|
|
19
|
+
expect(
|
|
20
|
+
commandSettledDetailSchema.safeParse({
|
|
21
|
+
error: { code: "INSTANCE_FEEDBACK_FAILED", message: "failed" },
|
|
22
|
+
instanceId: "instance_123",
|
|
23
|
+
kind,
|
|
24
|
+
ok: false,
|
|
25
|
+
requestId: "req_123",
|
|
26
|
+
}).success,
|
|
27
|
+
).toBe(true);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|