@heynixie/contract 0.64.0 → 0.66.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/dist/build-query-utils.d.ts +8 -75
- package/dist/contract.d.ts +12 -73
- package/dist/index.js +3 -35
- package/dist/task-schema.d.ts +1 -0
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
32
32
|
size: number;
|
|
33
33
|
window: number;
|
|
34
34
|
} | undefined;
|
|
35
|
+
isSilentTurn?: true | undefined;
|
|
35
36
|
kind: string;
|
|
36
37
|
message?: {
|
|
37
38
|
clientMessageId?: string | undefined;
|
|
@@ -68,11 +69,6 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
68
69
|
}[];
|
|
69
70
|
} | undefined;
|
|
70
71
|
recordedAt: Date;
|
|
71
|
-
route?: {
|
|
72
|
-
isMove: boolean;
|
|
73
|
-
messages: number[];
|
|
74
|
-
taskID: string;
|
|
75
|
-
} | undefined;
|
|
76
72
|
sequence: number;
|
|
77
73
|
stop?: {
|
|
78
74
|
cancelledActions: {
|
|
@@ -92,6 +88,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
92
88
|
errorLimit?: number | undefined;
|
|
93
89
|
errors?: number | undefined;
|
|
94
90
|
isWaitingForRetry?: boolean | undefined;
|
|
91
|
+
readCursor?: number | undefined;
|
|
95
92
|
reason?: string | undefined;
|
|
96
93
|
retryAt?: Date | undefined;
|
|
97
94
|
stepKey?: string | undefined;
|
|
@@ -140,6 +137,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
140
137
|
size: number;
|
|
141
138
|
window: number;
|
|
142
139
|
} | undefined;
|
|
140
|
+
isSilentTurn?: true | undefined;
|
|
143
141
|
kind: string;
|
|
144
142
|
message?: {
|
|
145
143
|
clientMessageId?: string | undefined;
|
|
@@ -176,11 +174,6 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
176
174
|
}[];
|
|
177
175
|
} | undefined;
|
|
178
176
|
recordedAt: Date;
|
|
179
|
-
route?: {
|
|
180
|
-
isMove: boolean;
|
|
181
|
-
messages: number[];
|
|
182
|
-
taskID: string;
|
|
183
|
-
} | undefined;
|
|
184
177
|
sequence: number;
|
|
185
178
|
stop?: {
|
|
186
179
|
cancelledActions: {
|
|
@@ -200,6 +193,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
200
193
|
errorLimit?: number | undefined;
|
|
201
194
|
errors?: number | undefined;
|
|
202
195
|
isWaitingForRetry?: boolean | undefined;
|
|
196
|
+
readCursor?: number | undefined;
|
|
203
197
|
reason?: string | undefined;
|
|
204
198
|
retryAt?: Date | undefined;
|
|
205
199
|
stepKey?: string | undefined;
|
|
@@ -361,61 +355,6 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
361
355
|
sequence: number;
|
|
362
356
|
thread: string;
|
|
363
357
|
}>;
|
|
364
|
-
move: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
365
|
-
clientActionID: string;
|
|
366
|
-
sequence: number;
|
|
367
|
-
thread: string;
|
|
368
|
-
to: {
|
|
369
|
-
kind: "new";
|
|
370
|
-
name: string;
|
|
371
|
-
brief: string;
|
|
372
|
-
} | {
|
|
373
|
-
kind: "task";
|
|
374
|
-
taskID: string;
|
|
375
|
-
};
|
|
376
|
-
}, {
|
|
377
|
-
movedAt: Date;
|
|
378
|
-
taskID: string;
|
|
379
|
-
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
380
|
-
UNAUTHORIZED: {
|
|
381
|
-
message: string;
|
|
382
|
-
status: number;
|
|
383
|
-
};
|
|
384
|
-
}>, {
|
|
385
|
-
CLIENT_ACTION_ID_REUSED: {
|
|
386
|
-
message: string;
|
|
387
|
-
status: number;
|
|
388
|
-
};
|
|
389
|
-
}>, {
|
|
390
|
-
RECORD_NOT_FOUND: {
|
|
391
|
-
message: string;
|
|
392
|
-
status: number;
|
|
393
|
-
};
|
|
394
|
-
TASK_NOT_FOUND: {
|
|
395
|
-
message: string;
|
|
396
|
-
status: number;
|
|
397
|
-
};
|
|
398
|
-
TASK_TAKES_NO_MESSAGES: {
|
|
399
|
-
message: string;
|
|
400
|
-
status: number;
|
|
401
|
-
};
|
|
402
|
-
ALREADY_THERE: {
|
|
403
|
-
message: string;
|
|
404
|
-
status: number;
|
|
405
|
-
};
|
|
406
|
-
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
407
|
-
clientActionID: string;
|
|
408
|
-
sequence: number;
|
|
409
|
-
thread: string;
|
|
410
|
-
to: {
|
|
411
|
-
kind: "new";
|
|
412
|
-
name: string;
|
|
413
|
-
brief: string;
|
|
414
|
-
} | {
|
|
415
|
-
kind: "task";
|
|
416
|
-
taskID: string;
|
|
417
|
-
};
|
|
418
|
-
}>;
|
|
419
358
|
} & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
420
359
|
tasks: {
|
|
421
360
|
list: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, unknown, {
|
|
@@ -2108,6 +2047,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2108
2047
|
size: number;
|
|
2109
2048
|
window: number;
|
|
2110
2049
|
} | undefined;
|
|
2050
|
+
isSilentTurn?: true | undefined;
|
|
2111
2051
|
kind: string;
|
|
2112
2052
|
message?: {
|
|
2113
2053
|
clientMessageId?: string | undefined;
|
|
@@ -2144,11 +2084,6 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2144
2084
|
}[];
|
|
2145
2085
|
} | undefined;
|
|
2146
2086
|
recordedAt: Date;
|
|
2147
|
-
route?: {
|
|
2148
|
-
isMove: boolean;
|
|
2149
|
-
messages: number[];
|
|
2150
|
-
taskID: string;
|
|
2151
|
-
} | undefined;
|
|
2152
2087
|
sequence: number;
|
|
2153
2088
|
stop?: {
|
|
2154
2089
|
cancelledActions: {
|
|
@@ -2168,6 +2103,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2168
2103
|
errorLimit?: number | undefined;
|
|
2169
2104
|
errors?: number | undefined;
|
|
2170
2105
|
isWaitingForRetry?: boolean | undefined;
|
|
2106
|
+
readCursor?: number | undefined;
|
|
2171
2107
|
reason?: string | undefined;
|
|
2172
2108
|
retryAt?: Date | undefined;
|
|
2173
2109
|
stepKey?: string | undefined;
|
|
@@ -2231,6 +2167,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2231
2167
|
size: number;
|
|
2232
2168
|
window: number;
|
|
2233
2169
|
} | undefined;
|
|
2170
|
+
isSilentTurn?: true | undefined;
|
|
2234
2171
|
kind: string;
|
|
2235
2172
|
message?: {
|
|
2236
2173
|
clientMessageId?: string | undefined;
|
|
@@ -2267,11 +2204,6 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2267
2204
|
}[];
|
|
2268
2205
|
} | undefined;
|
|
2269
2206
|
recordedAt: Date;
|
|
2270
|
-
route?: {
|
|
2271
|
-
isMove: boolean;
|
|
2272
|
-
messages: number[];
|
|
2273
|
-
taskID: string;
|
|
2274
|
-
} | undefined;
|
|
2275
2207
|
sequence: number;
|
|
2276
2208
|
stop?: {
|
|
2277
2209
|
cancelledActions: {
|
|
@@ -2291,6 +2223,7 @@ export declare function buildQueryUtils(client: ContractClient): {
|
|
|
2291
2223
|
errorLimit?: number | undefined;
|
|
2292
2224
|
errors?: number | undefined;
|
|
2293
2225
|
isWaitingForRetry?: boolean | undefined;
|
|
2226
|
+
readCursor?: number | undefined;
|
|
2294
2227
|
reason?: string | undefined;
|
|
2295
2228
|
retryAt?: Date | undefined;
|
|
2296
2229
|
stepKey?: string | undefined;
|
package/dist/contract.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare const contract: {
|
|
|
35
35
|
size: z.ZodInt;
|
|
36
36
|
window: z.ZodInt;
|
|
37
37
|
}, z.core.$strip>>;
|
|
38
|
+
isSilentTurn: z.ZodOptional<z.ZodLiteral<true>>;
|
|
38
39
|
kind: z.ZodString;
|
|
39
40
|
message: z.ZodOptional<z.ZodObject<{
|
|
40
41
|
clientMessageId: z.ZodOptional<z.ZodUUID>;
|
|
@@ -85,11 +86,6 @@ export declare const contract: {
|
|
|
85
86
|
}, z.core.$strip>>;
|
|
86
87
|
}, z.core.$strip>>;
|
|
87
88
|
recordedAt: z.ZodDate;
|
|
88
|
-
route: z.ZodOptional<z.ZodObject<{
|
|
89
|
-
isMove: z.ZodBoolean;
|
|
90
|
-
messages: z.ZodArray<z.ZodInt>;
|
|
91
|
-
taskID: z.ZodString;
|
|
92
|
-
}, z.core.$strip>>;
|
|
93
89
|
sequence: z.ZodInt;
|
|
94
90
|
stop: z.ZodOptional<z.ZodObject<{
|
|
95
91
|
cancelledActions: z.ZodArray<z.ZodObject<{
|
|
@@ -112,6 +108,7 @@ export declare const contract: {
|
|
|
112
108
|
errorLimit: z.ZodOptional<z.ZodInt>;
|
|
113
109
|
errors: z.ZodOptional<z.ZodInt>;
|
|
114
110
|
isWaitingForRetry: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
readCursor: z.ZodOptional<z.ZodInt>;
|
|
115
112
|
reason: z.ZodOptional<z.ZodString>;
|
|
116
113
|
retryAt: z.ZodOptional<z.ZodDate>;
|
|
117
114
|
stepKey: z.ZodOptional<z.ZodString>;
|
|
@@ -163,6 +160,7 @@ export declare const contract: {
|
|
|
163
160
|
size: z.ZodInt;
|
|
164
161
|
window: z.ZodInt;
|
|
165
162
|
}, z.core.$strip>>;
|
|
163
|
+
isSilentTurn: z.ZodOptional<z.ZodLiteral<true>>;
|
|
166
164
|
kind: z.ZodString;
|
|
167
165
|
message: z.ZodOptional<z.ZodObject<{
|
|
168
166
|
clientMessageId: z.ZodOptional<z.ZodUUID>;
|
|
@@ -213,11 +211,6 @@ export declare const contract: {
|
|
|
213
211
|
}, z.core.$strip>>;
|
|
214
212
|
}, z.core.$strip>>;
|
|
215
213
|
recordedAt: z.ZodDate;
|
|
216
|
-
route: z.ZodOptional<z.ZodObject<{
|
|
217
|
-
isMove: z.ZodBoolean;
|
|
218
|
-
messages: z.ZodArray<z.ZodInt>;
|
|
219
|
-
taskID: z.ZodString;
|
|
220
|
-
}, z.core.$strip>>;
|
|
221
214
|
sequence: z.ZodInt;
|
|
222
215
|
stop: z.ZodOptional<z.ZodObject<{
|
|
223
216
|
cancelledActions: z.ZodArray<z.ZodObject<{
|
|
@@ -240,6 +233,7 @@ export declare const contract: {
|
|
|
240
233
|
errorLimit: z.ZodOptional<z.ZodInt>;
|
|
241
234
|
errors: z.ZodOptional<z.ZodInt>;
|
|
242
235
|
isWaitingForRetry: z.ZodOptional<z.ZodBoolean>;
|
|
236
|
+
readCursor: z.ZodOptional<z.ZodInt>;
|
|
243
237
|
reason: z.ZodOptional<z.ZodString>;
|
|
244
238
|
retryAt: z.ZodOptional<z.ZodDate>;
|
|
245
239
|
stepKey: z.ZodOptional<z.ZodString>;
|
|
@@ -380,49 +374,6 @@ export declare const contract: {
|
|
|
380
374
|
status: number;
|
|
381
375
|
};
|
|
382
376
|
}>, Record<never, never>>;
|
|
383
|
-
move: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
384
|
-
clientActionID: z.ZodUUID;
|
|
385
|
-
sequence: z.ZodInt;
|
|
386
|
-
thread: z.ZodString;
|
|
387
|
-
to: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
388
|
-
kind: z.ZodLiteral<"task">;
|
|
389
|
-
taskID: z.ZodString;
|
|
390
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
391
|
-
kind: z.ZodLiteral<"new">;
|
|
392
|
-
name: z.ZodString;
|
|
393
|
-
brief: z.ZodString;
|
|
394
|
-
}, z.core.$strip>], "kind">;
|
|
395
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
396
|
-
movedAt: z.ZodDate;
|
|
397
|
-
taskID: z.ZodString;
|
|
398
|
-
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
399
|
-
UNAUTHORIZED: {
|
|
400
|
-
message: string;
|
|
401
|
-
status: number;
|
|
402
|
-
};
|
|
403
|
-
}>, {
|
|
404
|
-
CLIENT_ACTION_ID_REUSED: {
|
|
405
|
-
message: string;
|
|
406
|
-
status: number;
|
|
407
|
-
};
|
|
408
|
-
}>, {
|
|
409
|
-
RECORD_NOT_FOUND: {
|
|
410
|
-
message: string;
|
|
411
|
-
status: number;
|
|
412
|
-
};
|
|
413
|
-
TASK_NOT_FOUND: {
|
|
414
|
-
message: string;
|
|
415
|
-
status: number;
|
|
416
|
-
};
|
|
417
|
-
TASK_TAKES_NO_MESSAGES: {
|
|
418
|
-
message: string;
|
|
419
|
-
status: number;
|
|
420
|
-
};
|
|
421
|
-
ALREADY_THERE: {
|
|
422
|
-
message: string;
|
|
423
|
-
status: number;
|
|
424
|
-
};
|
|
425
|
-
}>, Record<never, never>>;
|
|
426
377
|
};
|
|
427
378
|
tasks: {
|
|
428
379
|
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
@@ -2430,6 +2381,7 @@ export declare const contract: {
|
|
|
2430
2381
|
size: number;
|
|
2431
2382
|
window: number;
|
|
2432
2383
|
} | undefined;
|
|
2384
|
+
isSilentTurn?: true | undefined;
|
|
2433
2385
|
kind: string;
|
|
2434
2386
|
message?: {
|
|
2435
2387
|
clientMessageId?: string | undefined;
|
|
@@ -2466,11 +2418,6 @@ export declare const contract: {
|
|
|
2466
2418
|
}[];
|
|
2467
2419
|
} | undefined;
|
|
2468
2420
|
recordedAt: Date;
|
|
2469
|
-
route?: {
|
|
2470
|
-
isMove: boolean;
|
|
2471
|
-
messages: number[];
|
|
2472
|
-
taskID: string;
|
|
2473
|
-
} | undefined;
|
|
2474
2421
|
sequence: number;
|
|
2475
2422
|
stop?: {
|
|
2476
2423
|
cancelledActions: {
|
|
@@ -2490,6 +2437,7 @@ export declare const contract: {
|
|
|
2490
2437
|
errorLimit?: number | undefined;
|
|
2491
2438
|
errors?: number | undefined;
|
|
2492
2439
|
isWaitingForRetry?: boolean | undefined;
|
|
2440
|
+
readCursor?: number | undefined;
|
|
2493
2441
|
reason?: string | undefined;
|
|
2494
2442
|
retryAt?: Date | undefined;
|
|
2495
2443
|
stepKey?: string | undefined;
|
|
@@ -2539,6 +2487,7 @@ export declare const contract: {
|
|
|
2539
2487
|
size: number;
|
|
2540
2488
|
window: number;
|
|
2541
2489
|
} | undefined;
|
|
2490
|
+
isSilentTurn?: true | undefined;
|
|
2542
2491
|
kind: string;
|
|
2543
2492
|
message?: {
|
|
2544
2493
|
clientMessageId?: string | undefined;
|
|
@@ -2575,11 +2524,6 @@ export declare const contract: {
|
|
|
2575
2524
|
}[];
|
|
2576
2525
|
} | undefined;
|
|
2577
2526
|
recordedAt: Date;
|
|
2578
|
-
route?: {
|
|
2579
|
-
isMove: boolean;
|
|
2580
|
-
messages: number[];
|
|
2581
|
-
taskID: string;
|
|
2582
|
-
} | undefined;
|
|
2583
2527
|
sequence: number;
|
|
2584
2528
|
stop?: {
|
|
2585
2529
|
cancelledActions: {
|
|
@@ -2599,6 +2543,7 @@ export declare const contract: {
|
|
|
2599
2543
|
errorLimit?: number | undefined;
|
|
2600
2544
|
errors?: number | undefined;
|
|
2601
2545
|
isWaitingForRetry?: boolean | undefined;
|
|
2546
|
+
readCursor?: number | undefined;
|
|
2602
2547
|
reason?: string | undefined;
|
|
2603
2548
|
retryAt?: Date | undefined;
|
|
2604
2549
|
stepKey?: string | undefined;
|
|
@@ -2659,6 +2604,7 @@ export declare const contract: {
|
|
|
2659
2604
|
size: number;
|
|
2660
2605
|
window: number;
|
|
2661
2606
|
} | undefined;
|
|
2607
|
+
isSilentTurn?: true | undefined;
|
|
2662
2608
|
kind: string;
|
|
2663
2609
|
message?: {
|
|
2664
2610
|
clientMessageId?: string | undefined;
|
|
@@ -2695,11 +2641,6 @@ export declare const contract: {
|
|
|
2695
2641
|
}[];
|
|
2696
2642
|
} | undefined;
|
|
2697
2643
|
recordedAt: Date;
|
|
2698
|
-
route?: {
|
|
2699
|
-
isMove: boolean;
|
|
2700
|
-
messages: number[];
|
|
2701
|
-
taskID: string;
|
|
2702
|
-
} | undefined;
|
|
2703
2644
|
sequence: number;
|
|
2704
2645
|
stop?: {
|
|
2705
2646
|
cancelledActions: {
|
|
@@ -2719,6 +2660,7 @@ export declare const contract: {
|
|
|
2719
2660
|
errorLimit?: number | undefined;
|
|
2720
2661
|
errors?: number | undefined;
|
|
2721
2662
|
isWaitingForRetry?: boolean | undefined;
|
|
2663
|
+
readCursor?: number | undefined;
|
|
2722
2664
|
reason?: string | undefined;
|
|
2723
2665
|
retryAt?: Date | undefined;
|
|
2724
2666
|
stepKey?: string | undefined;
|
|
@@ -2768,6 +2710,7 @@ export declare const contract: {
|
|
|
2768
2710
|
size: number;
|
|
2769
2711
|
window: number;
|
|
2770
2712
|
} | undefined;
|
|
2713
|
+
isSilentTurn?: true | undefined;
|
|
2771
2714
|
kind: string;
|
|
2772
2715
|
message?: {
|
|
2773
2716
|
clientMessageId?: string | undefined;
|
|
@@ -2804,11 +2747,6 @@ export declare const contract: {
|
|
|
2804
2747
|
}[];
|
|
2805
2748
|
} | undefined;
|
|
2806
2749
|
recordedAt: Date;
|
|
2807
|
-
route?: {
|
|
2808
|
-
isMove: boolean;
|
|
2809
|
-
messages: number[];
|
|
2810
|
-
taskID: string;
|
|
2811
|
-
} | undefined;
|
|
2812
2750
|
sequence: number;
|
|
2813
2751
|
stop?: {
|
|
2814
2752
|
cancelledActions: {
|
|
@@ -2828,6 +2766,7 @@ export declare const contract: {
|
|
|
2828
2766
|
errorLimit?: number | undefined;
|
|
2829
2767
|
errors?: number | undefined;
|
|
2830
2768
|
isWaitingForRetry?: boolean | undefined;
|
|
2769
|
+
readCursor?: number | undefined;
|
|
2831
2770
|
reason?: string | undefined;
|
|
2832
2771
|
retryAt?: Date | undefined;
|
|
2833
2772
|
stepKey?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -605,6 +605,7 @@ var taskSchema = z7.object({
|
|
|
605
605
|
errorLimit: z7.int().positive().optional(),
|
|
606
606
|
errors: z7.int().positive().optional(),
|
|
607
607
|
isWaitingForRetry: z7.boolean().optional(),
|
|
608
|
+
readCursor: z7.int().nonnegative().optional(),
|
|
608
609
|
reason: z7.string().optional(),
|
|
609
610
|
retryAt: z7.date().optional(),
|
|
610
611
|
stepKey: z7.string().optional(),
|
|
@@ -674,11 +675,6 @@ var versionTextSchema = versionRefSchema.extend({
|
|
|
674
675
|
status: z9.enum(["readable", "shredded", "unreadable", "missing"]),
|
|
675
676
|
text: z9.string().optional()
|
|
676
677
|
});
|
|
677
|
-
var routeSchema = z9.object({
|
|
678
|
-
isMove: z9.boolean(),
|
|
679
|
-
messages: z9.array(sequenceSchema),
|
|
680
|
-
taskID: threadSchema
|
|
681
|
-
});
|
|
682
678
|
var listedActionSchema = z9.object({ actionID: z9.string(), tool: z9.string() });
|
|
683
679
|
var taskMessageSchema = z9.object({
|
|
684
680
|
from: threadSchema,
|
|
@@ -701,6 +697,7 @@ var recordSchema = z9.object({
|
|
|
701
697
|
compactionFailure: compactionFailureSchema.optional(),
|
|
702
698
|
forget: z9.object({ sequence: sequenceSchema }).optional(),
|
|
703
699
|
context: contextSchema.optional(),
|
|
700
|
+
isSilentTurn: z9.literal(true).optional(),
|
|
704
701
|
kind: z9.string(),
|
|
705
702
|
message: z9.object({
|
|
706
703
|
clientMessageId: z9.uuid().optional(),
|
|
@@ -712,7 +709,6 @@ var recordSchema = z9.object({
|
|
|
712
709
|
rating: ratingSchema.optional(),
|
|
713
710
|
recall: recallSchema.optional(),
|
|
714
711
|
recordedAt: z9.date(),
|
|
715
|
-
route: routeSchema.optional(),
|
|
716
712
|
sequence: sequenceSchema,
|
|
717
713
|
stop: z9.object({ cancelledActions: z9.array(listedActionSchema) }).optional(),
|
|
718
714
|
summary: summarySchema.optional(),
|
|
@@ -730,17 +726,6 @@ var sessionSchema = z9.object({
|
|
|
730
726
|
sessionID: z9.uuid()
|
|
731
727
|
});
|
|
732
728
|
var checkedAction = signedIn.errors(reusedIDErrors);
|
|
733
|
-
var taskNameSchema = z9.string().trim().min(1).max(80);
|
|
734
|
-
var taskBriefSchema = z9.string().trim().min(1).max(8000);
|
|
735
|
-
var newTaskTargetSchema = z9.object({
|
|
736
|
-
kind: z9.literal("new"),
|
|
737
|
-
name: taskNameSchema,
|
|
738
|
-
brief: taskBriefSchema
|
|
739
|
-
});
|
|
740
|
-
var moveTargetSchema = z9.discriminatedUnion("kind", [
|
|
741
|
-
z9.object({ kind: z9.literal("task"), taskID: threadSchema }),
|
|
742
|
-
newTaskTargetSchema
|
|
743
|
-
]);
|
|
744
729
|
var taskStateSchema = z9.enum([
|
|
745
730
|
"ready",
|
|
746
731
|
"running",
|
|
@@ -824,24 +809,7 @@ var contract = {
|
|
|
824
809
|
clientActionID: clientActionIDSchema,
|
|
825
810
|
sequence: sequenceSchema,
|
|
826
811
|
thread: threadSchema
|
|
827
|
-
})).output(z9.object({ forgottenAt: z9.date() }))
|
|
828
|
-
move: checkedAction.errors({
|
|
829
|
-
RECORD_NOT_FOUND: {
|
|
830
|
-
message: "No message of yours on this thread has this sequence",
|
|
831
|
-
status: 404
|
|
832
|
-
},
|
|
833
|
-
TASK_NOT_FOUND: { message: "No open task has this ID", status: 404 },
|
|
834
|
-
TASK_TAKES_NO_MESSAGES: {
|
|
835
|
-
message: "This task runs on its own schedule and takes no message of yours",
|
|
836
|
-
status: 409
|
|
837
|
-
},
|
|
838
|
-
ALREADY_THERE: { message: "The message already went to this task", status: 409 }
|
|
839
|
-
}).input(z9.object({
|
|
840
|
-
clientActionID: clientActionIDSchema,
|
|
841
|
-
sequence: sequenceSchema,
|
|
842
|
-
thread: threadSchema,
|
|
843
|
-
to: moveTargetSchema
|
|
844
|
-
})).output(z9.object({ movedAt: z9.date(), taskID: threadSchema }))
|
|
812
|
+
})).output(z9.object({ forgottenAt: z9.date() }))
|
|
845
813
|
},
|
|
846
814
|
tasks: {
|
|
847
815
|
list: signedIn.output(z9.object({ readAtSequence: sequenceSchema, tasks: z9.array(listedTaskSchema) })),
|
package/dist/task-schema.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
4
4
|
errorLimit: z.ZodOptional<z.ZodInt>;
|
|
5
5
|
errors: z.ZodOptional<z.ZodInt>;
|
|
6
6
|
isWaitingForRetry: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
readCursor: z.ZodOptional<z.ZodInt>;
|
|
7
8
|
reason: z.ZodOptional<z.ZodString>;
|
|
8
9
|
retryAt: z.ZodOptional<z.ZodDate>;
|
|
9
10
|
stepKey: z.ZodOptional<z.ZodString>;
|