@critical-path/core 0.24.0 → 0.25.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 +29 -0
- package/README.md +3 -3
- package/dist/engine/actor.test.js +1 -0
- package/dist/engine/actor.test.js.map +1 -1
- package/dist/engine/index.d.ts +12 -17
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +18 -38
- package/dist/engine/index.js.map +1 -1
- package/dist/index.test.js +1 -5
- package/dist/index.test.js.map +1 -1
- package/dist/schemas/index.d.ts +87 -124
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +36 -49
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/schemas.test.js +10 -11
- package/dist/schemas/schemas.test.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/actor.test.ts +2 -1
- package/src/engine/index.ts +24 -52
- package/src/index.test.ts +1 -5
- package/src/schemas/index.ts +62 -50
- package/src/schemas/schemas.test.ts +16 -15
package/dist/schemas/index.d.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Exposed from `@critical-path/core/schemas` (not the package root) so browser bundles of core do
|
|
5
5
|
* not pull in zod. Create schemas omit server-assigned fields (`id`, `createdAt`, `updatedAt`, task
|
|
6
6
|
* `key`); update schemas additionally make every field optional and omit the owning `projectId`.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Schemas are strict: unknown or server-assigned keys are rejected with a 400 rather than ignored.
|
|
8
|
+
* Identity (authors, reactors, uploaders, time-entry users) is never taken from payloads; it comes
|
|
9
|
+
* from the caller resolved by the server (see `CriticalPathEngine.withActor`).
|
|
9
10
|
*/
|
|
10
11
|
import { z } from 'zod';
|
|
11
12
|
/**
|
|
@@ -19,7 +20,7 @@ export declare const StatusDefinitionSchema: z.ZodObject<{
|
|
|
19
20
|
key: z.ZodString;
|
|
20
21
|
label: z.ZodString;
|
|
21
22
|
category: z.ZodEnum<["not_started", "in_progress", "completed", "canceled"]>;
|
|
22
|
-
}, "
|
|
23
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
24
|
key: string;
|
|
24
25
|
category: "in_progress" | "canceled" | "not_started" | "completed";
|
|
25
26
|
label: string;
|
|
@@ -39,14 +40,14 @@ export declare const WorkScheduleSchema: z.ZodObject<{
|
|
|
39
40
|
hours: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
40
41
|
start: z.ZodString;
|
|
41
42
|
end: z.ZodString;
|
|
42
|
-
}, "
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
44
|
start: string;
|
|
44
45
|
end: string;
|
|
45
46
|
}, {
|
|
46
47
|
start: string;
|
|
47
48
|
end: string;
|
|
48
49
|
}>, "many">>;
|
|
49
|
-
}, "
|
|
50
|
+
}, "strict", z.ZodTypeAny, {
|
|
50
51
|
isWorkingDay: boolean;
|
|
51
52
|
dayOfWeek: number;
|
|
52
53
|
hours?: {
|
|
@@ -65,7 +66,7 @@ export declare const WorkScheduleSchema: z.ZodObject<{
|
|
|
65
66
|
date: z.ZodString;
|
|
66
67
|
name: z.ZodOptional<z.ZodString>;
|
|
67
68
|
halfDay: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
-
}, "
|
|
69
|
+
}, "strict", z.ZodTypeAny, {
|
|
69
70
|
date: string;
|
|
70
71
|
name?: string | undefined;
|
|
71
72
|
halfDay?: boolean | undefined;
|
|
@@ -74,7 +75,7 @@ export declare const WorkScheduleSchema: z.ZodObject<{
|
|
|
74
75
|
name?: string | undefined;
|
|
75
76
|
halfDay?: boolean | undefined;
|
|
76
77
|
}>, "many">>;
|
|
77
|
-
}, "
|
|
78
|
+
}, "strict", z.ZodTypeAny, {
|
|
78
79
|
days: {
|
|
79
80
|
isWorkingDay: boolean;
|
|
80
81
|
dayOfWeek: number;
|
|
@@ -119,7 +120,7 @@ export declare const CustomFieldDefinitionSchema: z.ZodObject<{
|
|
|
119
120
|
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
120
121
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
121
122
|
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
122
|
-
}, "
|
|
123
|
+
}, "strict", z.ZodTypeAny, {
|
|
123
124
|
id: string;
|
|
124
125
|
key: string;
|
|
125
126
|
type: "number" | "boolean" | "text" | "date" | "single_select" | "multi_select" | "user";
|
|
@@ -143,7 +144,7 @@ export declare const TaskTypeDefinitionSchema: z.ZodObject<{
|
|
|
143
144
|
icon: z.ZodOptional<z.ZodString>;
|
|
144
145
|
defaultStatusKey: z.ZodOptional<z.ZodString>;
|
|
145
146
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, "
|
|
147
|
+
}, "strict", z.ZodTypeAny, {
|
|
147
148
|
key: string;
|
|
148
149
|
label: string;
|
|
149
150
|
description?: string | undefined;
|
|
@@ -165,7 +166,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
165
166
|
key: z.ZodString;
|
|
166
167
|
label: z.ZodString;
|
|
167
168
|
category: z.ZodEnum<["not_started", "in_progress", "completed", "canceled"]>;
|
|
168
|
-
}, "
|
|
169
|
+
}, "strict", z.ZodTypeAny, {
|
|
169
170
|
key: string;
|
|
170
171
|
category: "in_progress" | "canceled" | "not_started" | "completed";
|
|
171
172
|
label: string;
|
|
@@ -179,7 +180,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
179
180
|
name: z.ZodOptional<z.ZodString>;
|
|
180
181
|
fromStatusKey: z.ZodString;
|
|
181
182
|
toStatusKey: z.ZodString;
|
|
182
|
-
}, "
|
|
183
|
+
}, "strict", z.ZodTypeAny, {
|
|
183
184
|
fromStatusKey: string;
|
|
184
185
|
toStatusKey: string;
|
|
185
186
|
id?: string | undefined;
|
|
@@ -197,7 +198,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
197
198
|
icon: z.ZodOptional<z.ZodString>;
|
|
198
199
|
defaultStatusKey: z.ZodOptional<z.ZodString>;
|
|
199
200
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
200
|
-
}, "
|
|
201
|
+
}, "strict", z.ZodTypeAny, {
|
|
201
202
|
key: string;
|
|
202
203
|
label: string;
|
|
203
204
|
description?: string | undefined;
|
|
@@ -214,7 +215,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
214
215
|
}>, "many">>;
|
|
215
216
|
defaultStatusKey: z.ZodOptional<z.ZodString>;
|
|
216
217
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
-
}, "
|
|
218
|
+
}, "strict", z.ZodTypeAny, {
|
|
218
219
|
name: string;
|
|
219
220
|
transitions: {
|
|
220
221
|
fromStatusKey: string;
|
|
@@ -270,7 +271,7 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
270
271
|
key: z.ZodString;
|
|
271
272
|
label: z.ZodString;
|
|
272
273
|
category: z.ZodEnum<["not_started", "in_progress", "completed", "canceled"]>;
|
|
273
|
-
}, "
|
|
274
|
+
}, "strict", z.ZodTypeAny, {
|
|
274
275
|
key: string;
|
|
275
276
|
category: "in_progress" | "canceled" | "not_started" | "completed";
|
|
276
277
|
label: string;
|
|
@@ -284,7 +285,7 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
284
285
|
name: z.ZodOptional<z.ZodString>;
|
|
285
286
|
fromStatusKey: z.ZodString;
|
|
286
287
|
toStatusKey: z.ZodString;
|
|
287
|
-
}, "
|
|
288
|
+
}, "strict", z.ZodTypeAny, {
|
|
288
289
|
fromStatusKey: string;
|
|
289
290
|
toStatusKey: string;
|
|
290
291
|
id?: string | undefined;
|
|
@@ -302,7 +303,7 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
302
303
|
icon: z.ZodOptional<z.ZodString>;
|
|
303
304
|
defaultStatusKey: z.ZodOptional<z.ZodString>;
|
|
304
305
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
305
|
-
}, "
|
|
306
|
+
}, "strict", z.ZodTypeAny, {
|
|
306
307
|
key: string;
|
|
307
308
|
label: string;
|
|
308
309
|
description?: string | undefined;
|
|
@@ -319,7 +320,7 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
319
320
|
}>, "many">>>;
|
|
320
321
|
defaultStatusKey: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
321
322
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
322
|
-
}, "
|
|
323
|
+
}, "strict", z.ZodTypeAny, {
|
|
323
324
|
description?: string | undefined;
|
|
324
325
|
name?: string | undefined;
|
|
325
326
|
taskTypes?: {
|
|
@@ -383,7 +384,7 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
383
384
|
icon: z.ZodOptional<z.ZodString>;
|
|
384
385
|
defaultStatusKey: z.ZodOptional<z.ZodString>;
|
|
385
386
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
386
|
-
}, "
|
|
387
|
+
}, "strict", z.ZodTypeAny, {
|
|
387
388
|
key: string;
|
|
388
389
|
label: string;
|
|
389
390
|
description?: string | undefined;
|
|
@@ -402,7 +403,7 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
402
403
|
key: z.ZodString;
|
|
403
404
|
label: z.ZodString;
|
|
404
405
|
category: z.ZodEnum<["not_started", "in_progress", "completed", "canceled"]>;
|
|
405
|
-
}, "
|
|
406
|
+
}, "strict", z.ZodTypeAny, {
|
|
406
407
|
key: string;
|
|
407
408
|
category: "in_progress" | "canceled" | "not_started" | "completed";
|
|
408
409
|
label: string;
|
|
@@ -415,7 +416,7 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
415
416
|
key: z.ZodString;
|
|
416
417
|
label: z.ZodString;
|
|
417
418
|
level: z.ZodOptional<z.ZodNumber>;
|
|
418
|
-
}, "
|
|
419
|
+
}, "strict", z.ZodTypeAny, {
|
|
419
420
|
key: string;
|
|
420
421
|
label: string;
|
|
421
422
|
level?: number | undefined;
|
|
@@ -432,7 +433,7 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
432
433
|
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
433
434
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
434
435
|
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
435
|
-
}, "
|
|
436
|
+
}, "strict", z.ZodTypeAny, {
|
|
436
437
|
id: string;
|
|
437
438
|
key: string;
|
|
438
439
|
type: "number" | "boolean" | "text" | "date" | "single_select" | "multi_select" | "user";
|
|
@@ -460,14 +461,14 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
460
461
|
hours: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
461
462
|
start: z.ZodString;
|
|
462
463
|
end: z.ZodString;
|
|
463
|
-
}, "
|
|
464
|
+
}, "strict", z.ZodTypeAny, {
|
|
464
465
|
start: string;
|
|
465
466
|
end: string;
|
|
466
467
|
}, {
|
|
467
468
|
start: string;
|
|
468
469
|
end: string;
|
|
469
470
|
}>, "many">>;
|
|
470
|
-
}, "
|
|
471
|
+
}, "strict", z.ZodTypeAny, {
|
|
471
472
|
isWorkingDay: boolean;
|
|
472
473
|
dayOfWeek: number;
|
|
473
474
|
hours?: {
|
|
@@ -486,7 +487,7 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
486
487
|
date: z.ZodString;
|
|
487
488
|
name: z.ZodOptional<z.ZodString>;
|
|
488
489
|
halfDay: z.ZodOptional<z.ZodBoolean>;
|
|
489
|
-
}, "
|
|
490
|
+
}, "strict", z.ZodTypeAny, {
|
|
490
491
|
date: string;
|
|
491
492
|
name?: string | undefined;
|
|
492
493
|
halfDay?: boolean | undefined;
|
|
@@ -495,7 +496,7 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
495
496
|
name?: string | undefined;
|
|
496
497
|
halfDay?: boolean | undefined;
|
|
497
498
|
}>, "many">>;
|
|
498
|
-
}, "
|
|
499
|
+
}, "strict", z.ZodTypeAny, {
|
|
499
500
|
days: {
|
|
500
501
|
isWorkingDay: boolean;
|
|
501
502
|
dayOfWeek: number;
|
|
@@ -534,7 +535,7 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
534
535
|
}>>;
|
|
535
536
|
startDate: z.ZodOptional<z.ZodString>;
|
|
536
537
|
targetEndDate: z.ZodOptional<z.ZodString>;
|
|
537
|
-
}, "
|
|
538
|
+
}, "strict", z.ZodTypeAny, {
|
|
538
539
|
name: string;
|
|
539
540
|
key?: string | undefined;
|
|
540
541
|
description?: string | undefined;
|
|
@@ -662,7 +663,7 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
662
663
|
icon: z.ZodOptional<z.ZodString>;
|
|
663
664
|
defaultStatusKey: z.ZodOptional<z.ZodString>;
|
|
664
665
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
665
|
-
}, "
|
|
666
|
+
}, "strict", z.ZodTypeAny, {
|
|
666
667
|
key: string;
|
|
667
668
|
label: string;
|
|
668
669
|
description?: string | undefined;
|
|
@@ -681,7 +682,7 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
681
682
|
key: z.ZodString;
|
|
682
683
|
label: z.ZodString;
|
|
683
684
|
category: z.ZodEnum<["not_started", "in_progress", "completed", "canceled"]>;
|
|
684
|
-
}, "
|
|
685
|
+
}, "strict", z.ZodTypeAny, {
|
|
685
686
|
key: string;
|
|
686
687
|
category: "in_progress" | "canceled" | "not_started" | "completed";
|
|
687
688
|
label: string;
|
|
@@ -694,7 +695,7 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
694
695
|
key: z.ZodString;
|
|
695
696
|
label: z.ZodString;
|
|
696
697
|
level: z.ZodOptional<z.ZodNumber>;
|
|
697
|
-
}, "
|
|
698
|
+
}, "strict", z.ZodTypeAny, {
|
|
698
699
|
key: string;
|
|
699
700
|
label: string;
|
|
700
701
|
level?: number | undefined;
|
|
@@ -711,7 +712,7 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
711
712
|
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
712
713
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
713
714
|
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
714
|
-
}, "
|
|
715
|
+
}, "strict", z.ZodTypeAny, {
|
|
715
716
|
id: string;
|
|
716
717
|
key: string;
|
|
717
718
|
type: "number" | "boolean" | "text" | "date" | "single_select" | "multi_select" | "user";
|
|
@@ -739,14 +740,14 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
739
740
|
hours: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
740
741
|
start: z.ZodString;
|
|
741
742
|
end: z.ZodString;
|
|
742
|
-
}, "
|
|
743
|
+
}, "strict", z.ZodTypeAny, {
|
|
743
744
|
start: string;
|
|
744
745
|
end: string;
|
|
745
746
|
}, {
|
|
746
747
|
start: string;
|
|
747
748
|
end: string;
|
|
748
749
|
}>, "many">>;
|
|
749
|
-
}, "
|
|
750
|
+
}, "strict", z.ZodTypeAny, {
|
|
750
751
|
isWorkingDay: boolean;
|
|
751
752
|
dayOfWeek: number;
|
|
752
753
|
hours?: {
|
|
@@ -765,7 +766,7 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
765
766
|
date: z.ZodString;
|
|
766
767
|
name: z.ZodOptional<z.ZodString>;
|
|
767
768
|
halfDay: z.ZodOptional<z.ZodBoolean>;
|
|
768
|
-
}, "
|
|
769
|
+
}, "strict", z.ZodTypeAny, {
|
|
769
770
|
date: string;
|
|
770
771
|
name?: string | undefined;
|
|
771
772
|
halfDay?: boolean | undefined;
|
|
@@ -774,7 +775,7 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
774
775
|
name?: string | undefined;
|
|
775
776
|
halfDay?: boolean | undefined;
|
|
776
777
|
}>, "many">>;
|
|
777
|
-
}, "
|
|
778
|
+
}, "strict", z.ZodTypeAny, {
|
|
778
779
|
days: {
|
|
779
780
|
isWorkingDay: boolean;
|
|
780
781
|
dayOfWeek: number;
|
|
@@ -813,7 +814,7 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
813
814
|
}>>>;
|
|
814
815
|
startDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
815
816
|
targetEndDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
816
|
-
}, "
|
|
817
|
+
}, "strict", z.ZodTypeAny, {
|
|
817
818
|
key?: string | undefined;
|
|
818
819
|
description?: string | undefined;
|
|
819
820
|
name?: string | undefined;
|
|
@@ -940,7 +941,7 @@ export declare const CreateTaskSchema: z.ZodObject<{
|
|
|
940
941
|
role: z.ZodOptional<z.ZodString>;
|
|
941
942
|
type: z.ZodOptional<z.ZodEnum<["user", "agent", "team"]>>;
|
|
942
943
|
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
943
|
-
}, "
|
|
944
|
+
}, "strict", z.ZodTypeAny, {
|
|
944
945
|
id: string;
|
|
945
946
|
name?: string | undefined;
|
|
946
947
|
type?: "user" | "agent" | "team" | undefined;
|
|
@@ -985,7 +986,7 @@ export declare const CreateTaskSchema: z.ZodObject<{
|
|
|
985
986
|
completed: z.ZodBoolean;
|
|
986
987
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
987
988
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
988
|
-
}, "
|
|
989
|
+
}, "strict", z.ZodTypeAny, {
|
|
989
990
|
completed: boolean;
|
|
990
991
|
id: string;
|
|
991
992
|
title: string;
|
|
@@ -1001,7 +1002,7 @@ export declare const CreateTaskSchema: z.ZodObject<{
|
|
|
1001
1002
|
customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1002
1003
|
parentId: z.ZodOptional<z.ZodString>;
|
|
1003
1004
|
projectId: z.ZodString;
|
|
1004
|
-
}, "
|
|
1005
|
+
}, "strict", z.ZodTypeAny, {
|
|
1005
1006
|
projectId: string;
|
|
1006
1007
|
title: string;
|
|
1007
1008
|
status?: string | undefined;
|
|
@@ -1118,7 +1119,7 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1118
1119
|
role: z.ZodOptional<z.ZodString>;
|
|
1119
1120
|
type: z.ZodOptional<z.ZodEnum<["user", "agent", "team"]>>;
|
|
1120
1121
|
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
1121
|
-
}, "
|
|
1122
|
+
}, "strict", z.ZodTypeAny, {
|
|
1122
1123
|
id: string;
|
|
1123
1124
|
name?: string | undefined;
|
|
1124
1125
|
type?: "user" | "agent" | "team" | undefined;
|
|
@@ -1163,7 +1164,7 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1163
1164
|
completed: z.ZodBoolean;
|
|
1164
1165
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
1165
1166
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
1166
|
-
}, "
|
|
1167
|
+
}, "strict", z.ZodTypeAny, {
|
|
1167
1168
|
completed: boolean;
|
|
1168
1169
|
id: string;
|
|
1169
1170
|
title: string;
|
|
@@ -1178,24 +1179,7 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1178
1179
|
}>, "many">>>;
|
|
1179
1180
|
customFields: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1180
1181
|
parentId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1181
|
-
}
|
|
1182
|
-
actorId: z.ZodOptional<z.ZodString>;
|
|
1183
|
-
actorName: z.ZodOptional<z.ZodString>;
|
|
1184
|
-
actorType: z.ZodOptional<z.ZodString>;
|
|
1185
|
-
actor: z.ZodOptional<z.ZodObject<{
|
|
1186
|
-
userId: z.ZodString;
|
|
1187
|
-
username: z.ZodOptional<z.ZodString>;
|
|
1188
|
-
actorType: z.ZodOptional<z.ZodString>;
|
|
1189
|
-
}, "strip", z.ZodTypeAny, {
|
|
1190
|
-
userId: string;
|
|
1191
|
-
username?: string | undefined;
|
|
1192
|
-
actorType?: string | undefined;
|
|
1193
|
-
}, {
|
|
1194
|
-
userId: string;
|
|
1195
|
-
username?: string | undefined;
|
|
1196
|
-
actorType?: string | undefined;
|
|
1197
|
-
}>>;
|
|
1198
|
-
}, "strip", z.ZodTypeAny, {
|
|
1182
|
+
}, "strict", z.ZodTypeAny, {
|
|
1199
1183
|
status?: string | undefined;
|
|
1200
1184
|
priority?: string | undefined;
|
|
1201
1185
|
title?: string | undefined;
|
|
@@ -1245,14 +1229,6 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1245
1229
|
}[] | undefined;
|
|
1246
1230
|
customFields?: Record<string, unknown> | undefined;
|
|
1247
1231
|
parentId?: string | undefined;
|
|
1248
|
-
actorId?: string | undefined;
|
|
1249
|
-
actorName?: string | undefined;
|
|
1250
|
-
actor?: {
|
|
1251
|
-
userId: string;
|
|
1252
|
-
username?: string | undefined;
|
|
1253
|
-
actorType?: string | undefined;
|
|
1254
|
-
} | undefined;
|
|
1255
|
-
actorType?: string | undefined;
|
|
1256
1232
|
}, {
|
|
1257
1233
|
status?: string | undefined;
|
|
1258
1234
|
priority?: string | undefined;
|
|
@@ -1303,19 +1279,11 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1303
1279
|
}[] | undefined;
|
|
1304
1280
|
customFields?: Record<string, unknown> | undefined;
|
|
1305
1281
|
parentId?: string | undefined;
|
|
1306
|
-
actorId?: string | undefined;
|
|
1307
|
-
actorName?: string | undefined;
|
|
1308
|
-
actor?: {
|
|
1309
|
-
userId: string;
|
|
1310
|
-
username?: string | undefined;
|
|
1311
|
-
actorType?: string | undefined;
|
|
1312
|
-
} | undefined;
|
|
1313
|
-
actorType?: string | undefined;
|
|
1314
1282
|
}>;
|
|
1315
1283
|
export declare const CreateDependencySchema: z.ZodObject<{
|
|
1316
1284
|
dependsOnTaskId: z.ZodString;
|
|
1317
1285
|
type: z.ZodDefault<z.ZodEnum<["blocking", "blocked_by", "relates_to"]>>;
|
|
1318
|
-
}, "
|
|
1286
|
+
}, "strict", z.ZodTypeAny, {
|
|
1319
1287
|
type: "blocking" | "blocked_by" | "relates_to";
|
|
1320
1288
|
dependsOnTaskId: string;
|
|
1321
1289
|
}, {
|
|
@@ -1335,7 +1303,7 @@ export declare const CreateDeliverableSchema: z.ZodObject<{
|
|
|
1335
1303
|
outputUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1336
1304
|
customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1337
1305
|
projectId: z.ZodString;
|
|
1338
|
-
}, "
|
|
1306
|
+
}, "strict", z.ZodTypeAny, {
|
|
1339
1307
|
projectId: string;
|
|
1340
1308
|
title: string;
|
|
1341
1309
|
status?: string | undefined;
|
|
@@ -1374,7 +1342,7 @@ export declare const UpdateDeliverableSchema: z.ZodObject<{
|
|
|
1374
1342
|
deliveredAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1375
1343
|
outputUrls: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1376
1344
|
customFields: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1377
|
-
}, "
|
|
1345
|
+
}, "strict", z.ZodTypeAny, {
|
|
1378
1346
|
status?: string | undefined;
|
|
1379
1347
|
title?: string | undefined;
|
|
1380
1348
|
description?: string | undefined;
|
|
@@ -1416,14 +1384,14 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1416
1384
|
hours: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1417
1385
|
start: z.ZodString;
|
|
1418
1386
|
end: z.ZodString;
|
|
1419
|
-
}, "
|
|
1387
|
+
}, "strict", z.ZodTypeAny, {
|
|
1420
1388
|
start: string;
|
|
1421
1389
|
end: string;
|
|
1422
1390
|
}, {
|
|
1423
1391
|
start: string;
|
|
1424
1392
|
end: string;
|
|
1425
1393
|
}>, "many">>;
|
|
1426
|
-
}, "
|
|
1394
|
+
}, "strict", z.ZodTypeAny, {
|
|
1427
1395
|
isWorkingDay: boolean;
|
|
1428
1396
|
dayOfWeek: number;
|
|
1429
1397
|
hours?: {
|
|
@@ -1442,7 +1410,7 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1442
1410
|
date: z.ZodString;
|
|
1443
1411
|
name: z.ZodOptional<z.ZodString>;
|
|
1444
1412
|
halfDay: z.ZodOptional<z.ZodBoolean>;
|
|
1445
|
-
}, "
|
|
1413
|
+
}, "strict", z.ZodTypeAny, {
|
|
1446
1414
|
date: string;
|
|
1447
1415
|
name?: string | undefined;
|
|
1448
1416
|
halfDay?: boolean | undefined;
|
|
@@ -1451,7 +1419,7 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1451
1419
|
name?: string | undefined;
|
|
1452
1420
|
halfDay?: boolean | undefined;
|
|
1453
1421
|
}>, "many">>;
|
|
1454
|
-
}, "
|
|
1422
|
+
}, "strict", z.ZodTypeAny, {
|
|
1455
1423
|
days: {
|
|
1456
1424
|
isWorkingDay: boolean;
|
|
1457
1425
|
dayOfWeek: number;
|
|
@@ -1488,7 +1456,7 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1488
1456
|
halfDay?: boolean | undefined;
|
|
1489
1457
|
}[] | undefined;
|
|
1490
1458
|
}>>;
|
|
1491
|
-
}, "
|
|
1459
|
+
}, "strict", z.ZodTypeAny, {
|
|
1492
1460
|
name: string;
|
|
1493
1461
|
memberIds: string[];
|
|
1494
1462
|
description?: string | undefined;
|
|
@@ -1556,14 +1524,14 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1556
1524
|
hours: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1557
1525
|
start: z.ZodString;
|
|
1558
1526
|
end: z.ZodString;
|
|
1559
|
-
}, "
|
|
1527
|
+
}, "strict", z.ZodTypeAny, {
|
|
1560
1528
|
start: string;
|
|
1561
1529
|
end: string;
|
|
1562
1530
|
}, {
|
|
1563
1531
|
start: string;
|
|
1564
1532
|
end: string;
|
|
1565
1533
|
}>, "many">>;
|
|
1566
|
-
}, "
|
|
1534
|
+
}, "strict", z.ZodTypeAny, {
|
|
1567
1535
|
isWorkingDay: boolean;
|
|
1568
1536
|
dayOfWeek: number;
|
|
1569
1537
|
hours?: {
|
|
@@ -1582,7 +1550,7 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1582
1550
|
date: z.ZodString;
|
|
1583
1551
|
name: z.ZodOptional<z.ZodString>;
|
|
1584
1552
|
halfDay: z.ZodOptional<z.ZodBoolean>;
|
|
1585
|
-
}, "
|
|
1553
|
+
}, "strict", z.ZodTypeAny, {
|
|
1586
1554
|
date: string;
|
|
1587
1555
|
name?: string | undefined;
|
|
1588
1556
|
halfDay?: boolean | undefined;
|
|
@@ -1591,7 +1559,7 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1591
1559
|
name?: string | undefined;
|
|
1592
1560
|
halfDay?: boolean | undefined;
|
|
1593
1561
|
}>, "many">>;
|
|
1594
|
-
}, "
|
|
1562
|
+
}, "strict", z.ZodTypeAny, {
|
|
1595
1563
|
days: {
|
|
1596
1564
|
isWorkingDay: boolean;
|
|
1597
1565
|
dayOfWeek: number;
|
|
@@ -1628,7 +1596,7 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1628
1596
|
halfDay?: boolean | undefined;
|
|
1629
1597
|
}[] | undefined;
|
|
1630
1598
|
}>>>;
|
|
1631
|
-
}, "
|
|
1599
|
+
}, "strict", z.ZodTypeAny, {
|
|
1632
1600
|
description?: string | undefined;
|
|
1633
1601
|
name?: string | undefined;
|
|
1634
1602
|
schedule?: {
|
|
@@ -1686,7 +1654,7 @@ export declare const CreateContainerSchema: z.ZodObject<{
|
|
|
1686
1654
|
type: z.ZodOptional<z.ZodString>;
|
|
1687
1655
|
color: z.ZodOptional<z.ZodString>;
|
|
1688
1656
|
projectId: z.ZodString;
|
|
1689
|
-
}, "
|
|
1657
|
+
}, "strict", z.ZodTypeAny, {
|
|
1690
1658
|
projectId: string;
|
|
1691
1659
|
name: string;
|
|
1692
1660
|
description?: string | undefined;
|
|
@@ -1707,7 +1675,7 @@ export declare const UpdateContainerSchema: z.ZodObject<{
|
|
|
1707
1675
|
parentId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1708
1676
|
type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1709
1677
|
color: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1710
|
-
}, "
|
|
1678
|
+
}, "strict", z.ZodTypeAny, {
|
|
1711
1679
|
description?: string | undefined;
|
|
1712
1680
|
parentId?: string | undefined;
|
|
1713
1681
|
name?: string | undefined;
|
|
@@ -1728,7 +1696,7 @@ export declare const CreateIterationSchema: z.ZodObject<{
|
|
|
1728
1696
|
endDate: z.ZodOptional<z.ZodString>;
|
|
1729
1697
|
status: z.ZodDefault<z.ZodEnum<["planning", "active", "completed"]>>;
|
|
1730
1698
|
projectId: z.ZodString;
|
|
1731
|
-
}, "
|
|
1699
|
+
}, "strict", z.ZodTypeAny, {
|
|
1732
1700
|
status: "completed" | "planning" | "active";
|
|
1733
1701
|
projectId: string;
|
|
1734
1702
|
name: string;
|
|
@@ -1769,28 +1737,21 @@ export declare const UpdateIterationSchema: z.ZodObject<{
|
|
|
1769
1737
|
}>;
|
|
1770
1738
|
export declare const CreateCommentSchema: z.ZodObject<{
|
|
1771
1739
|
taskId: z.ZodString;
|
|
1772
|
-
/** Required unless the server resolves the caller, in which case it is replaced. */
|
|
1773
|
-
authorId: z.ZodOptional<z.ZodString>;
|
|
1774
|
-
authorType: z.ZodOptional<z.ZodEnum<["user", "agent", "system"]>>;
|
|
1775
1740
|
parentId: z.ZodOptional<z.ZodString>;
|
|
1776
1741
|
content: z.ZodString;
|
|
1777
1742
|
mentions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1778
1743
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1779
|
-
}, "
|
|
1744
|
+
}, "strict", z.ZodTypeAny, {
|
|
1780
1745
|
taskId: string;
|
|
1781
1746
|
content: string;
|
|
1782
1747
|
parentId?: string | undefined;
|
|
1783
1748
|
metadata?: Record<string, unknown> | undefined;
|
|
1784
|
-
authorId?: string | undefined;
|
|
1785
|
-
authorType?: "user" | "agent" | "system" | undefined;
|
|
1786
1749
|
mentions?: string[] | undefined;
|
|
1787
1750
|
}, {
|
|
1788
1751
|
taskId: string;
|
|
1789
1752
|
content: string;
|
|
1790
1753
|
parentId?: string | undefined;
|
|
1791
1754
|
metadata?: Record<string, unknown> | undefined;
|
|
1792
|
-
authorId?: string | undefined;
|
|
1793
|
-
authorType?: "user" | "agent" | "system" | undefined;
|
|
1794
1755
|
mentions?: string[] | undefined;
|
|
1795
1756
|
}>;
|
|
1796
1757
|
export declare const UpdateCommentSchema: z.ZodObject<{
|
|
@@ -1808,14 +1769,10 @@ export declare const UpdateCommentSchema: z.ZodObject<{
|
|
|
1808
1769
|
}>;
|
|
1809
1770
|
export declare const CommentReactionSchema: z.ZodObject<{
|
|
1810
1771
|
emoji: z.ZodString;
|
|
1811
|
-
|
|
1812
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
1813
|
-
}, "strip", z.ZodTypeAny, {
|
|
1772
|
+
}, "strict", z.ZodTypeAny, {
|
|
1814
1773
|
emoji: string;
|
|
1815
|
-
userId?: string | undefined;
|
|
1816
1774
|
}, {
|
|
1817
1775
|
emoji: string;
|
|
1818
|
-
userId?: string | undefined;
|
|
1819
1776
|
}>;
|
|
1820
1777
|
export declare const CreateAttachmentSchema: z.ZodObject<{
|
|
1821
1778
|
filename: z.ZodString;
|
|
@@ -1826,12 +1783,9 @@ export declare const CreateAttachmentSchema: z.ZodObject<{
|
|
|
1826
1783
|
taskId: z.ZodOptional<z.ZodString>;
|
|
1827
1784
|
projectId: z.ZodOptional<z.ZodString>;
|
|
1828
1785
|
commentId: z.ZodOptional<z.ZodString>;
|
|
1829
|
-
/** Required unless the server resolves the caller, in which case it is replaced. */
|
|
1830
|
-
uploaderId: z.ZodOptional<z.ZodString>;
|
|
1831
|
-
uploaderType: z.ZodOptional<z.ZodEnum<["user", "agent", "system"]>>;
|
|
1832
1786
|
artifactType: z.ZodOptional<z.ZodEnum<["plan", "spec", "deliverable", "review", "general"]>>;
|
|
1833
1787
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1834
|
-
}, "
|
|
1788
|
+
}, "strict", z.ZodTypeAny, {
|
|
1835
1789
|
filename: string;
|
|
1836
1790
|
mimeType: string;
|
|
1837
1791
|
sizeBytes: number;
|
|
@@ -1839,8 +1793,6 @@ export declare const CreateAttachmentSchema: z.ZodObject<{
|
|
|
1839
1793
|
projectId?: string | undefined;
|
|
1840
1794
|
taskId?: string | undefined;
|
|
1841
1795
|
commentId?: string | undefined;
|
|
1842
|
-
uploaderId?: string | undefined;
|
|
1843
|
-
uploaderType?: "user" | "agent" | "system" | undefined;
|
|
1844
1796
|
storageKey?: string | undefined;
|
|
1845
1797
|
artifactType?: "plan" | "spec" | "deliverable" | "review" | "general" | undefined;
|
|
1846
1798
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -1850,8 +1802,6 @@ export declare const CreateAttachmentSchema: z.ZodObject<{
|
|
|
1850
1802
|
projectId?: string | undefined;
|
|
1851
1803
|
taskId?: string | undefined;
|
|
1852
1804
|
commentId?: string | undefined;
|
|
1853
|
-
uploaderId?: string | undefined;
|
|
1854
|
-
uploaderType?: "user" | "agent" | "system" | undefined;
|
|
1855
1805
|
mimeType?: string | undefined;
|
|
1856
1806
|
sizeBytes?: number | undefined;
|
|
1857
1807
|
storageKey?: string | undefined;
|
|
@@ -1867,19 +1817,14 @@ export declare const UploadAttachmentSchema: z.ZodObject<{
|
|
|
1867
1817
|
taskId: z.ZodOptional<z.ZodString>;
|
|
1868
1818
|
projectId: z.ZodOptional<z.ZodString>;
|
|
1869
1819
|
commentId: z.ZodOptional<z.ZodString>;
|
|
1870
|
-
/** Required unless the server resolves the caller, in which case it is replaced. */
|
|
1871
|
-
uploaderId: z.ZodOptional<z.ZodString>;
|
|
1872
|
-
uploaderType: z.ZodOptional<z.ZodEnum<["user", "agent", "system"]>>;
|
|
1873
1820
|
artifactType: z.ZodOptional<z.ZodEnum<["plan", "spec", "deliverable", "review", "general"]>>;
|
|
1874
1821
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1875
|
-
}, "
|
|
1822
|
+
}, "strict", z.ZodTypeAny, {
|
|
1876
1823
|
filename: string;
|
|
1877
1824
|
data: string;
|
|
1878
1825
|
projectId?: string | undefined;
|
|
1879
1826
|
taskId?: string | undefined;
|
|
1880
1827
|
commentId?: string | undefined;
|
|
1881
|
-
uploaderId?: string | undefined;
|
|
1882
|
-
uploaderType?: "user" | "agent" | "system" | undefined;
|
|
1883
1828
|
mimeType?: string | undefined;
|
|
1884
1829
|
artifactType?: "plan" | "spec" | "deliverable" | "review" | "general" | undefined;
|
|
1885
1830
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -1891,8 +1836,6 @@ export declare const UploadAttachmentSchema: z.ZodObject<{
|
|
|
1891
1836
|
projectId?: string | undefined;
|
|
1892
1837
|
taskId?: string | undefined;
|
|
1893
1838
|
commentId?: string | undefined;
|
|
1894
|
-
uploaderId?: string | undefined;
|
|
1895
|
-
uploaderType?: "user" | "agent" | "system" | undefined;
|
|
1896
1839
|
mimeType?: string | undefined;
|
|
1897
1840
|
artifactType?: "plan" | "spec" | "deliverable" | "review" | "general" | undefined;
|
|
1898
1841
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -1903,7 +1846,7 @@ export declare const PresignAttachmentSchema: z.ZodObject<{
|
|
|
1903
1846
|
storageKey: z.ZodString;
|
|
1904
1847
|
expiresInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1905
1848
|
contentType: z.ZodOptional<z.ZodString>;
|
|
1906
|
-
}, "
|
|
1849
|
+
}, "strict", z.ZodTypeAny, {
|
|
1907
1850
|
storageKey: string;
|
|
1908
1851
|
contentType?: string | undefined;
|
|
1909
1852
|
expiresInSeconds?: number | undefined;
|
|
@@ -1917,25 +1860,45 @@ export declare const LogTimeSchema: z.ZodObject<{
|
|
|
1917
1860
|
hours: z.ZodNumber;
|
|
1918
1861
|
isBillable: z.ZodOptional<z.ZodBoolean>;
|
|
1919
1862
|
description: z.ZodOptional<z.ZodString>;
|
|
1920
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
1921
1863
|
loggedAt: z.ZodOptional<z.ZodString>;
|
|
1922
|
-
}, "
|
|
1864
|
+
}, "strict", z.ZodTypeAny, {
|
|
1923
1865
|
taskId: string;
|
|
1924
1866
|
hours: number;
|
|
1925
1867
|
description?: string | undefined;
|
|
1926
1868
|
loggedAt?: string | undefined;
|
|
1927
|
-
userId?: string | undefined;
|
|
1928
1869
|
isBillable?: boolean | undefined;
|
|
1929
1870
|
}, {
|
|
1930
1871
|
taskId: string;
|
|
1931
1872
|
hours: number;
|
|
1932
1873
|
description?: string | undefined;
|
|
1933
1874
|
loggedAt?: string | undefined;
|
|
1934
|
-
userId?: string | undefined;
|
|
1935
1875
|
isBillable?: boolean | undefined;
|
|
1936
1876
|
}>;
|
|
1937
1877
|
export type CreateTaskPayload = z.infer<typeof CreateTaskSchema>;
|
|
1938
1878
|
export type UpdateTaskPayload = z.infer<typeof UpdateTaskSchema>;
|
|
1939
1879
|
export type CreateProjectPayload = z.infer<typeof CreateProjectSchema>;
|
|
1940
1880
|
export type UpdateProjectPayload = z.infer<typeof UpdateProjectSchema>;
|
|
1881
|
+
/** Request body types (before defaults are applied), for typed API clients. */
|
|
1882
|
+
export type CreateWorkflowBody = z.input<typeof CreateWorkflowSchema>;
|
|
1883
|
+
export type UpdateWorkflowBody = z.input<typeof UpdateWorkflowSchema>;
|
|
1884
|
+
export type CreateProjectBody = z.input<typeof CreateProjectSchema>;
|
|
1885
|
+
export type UpdateProjectBody = z.input<typeof UpdateProjectSchema>;
|
|
1886
|
+
export type CreateTaskBody = z.input<typeof CreateTaskSchema>;
|
|
1887
|
+
export type UpdateTaskBody = z.input<typeof UpdateTaskSchema>;
|
|
1888
|
+
export type CreateDependencyBody = z.input<typeof CreateDependencySchema>;
|
|
1889
|
+
export type CreateDeliverableBody = z.input<typeof CreateDeliverableSchema>;
|
|
1890
|
+
export type UpdateDeliverableBody = z.input<typeof UpdateDeliverableSchema>;
|
|
1891
|
+
export type CreateTeamBody = z.input<typeof CreateTeamSchema>;
|
|
1892
|
+
export type UpdateTeamBody = z.input<typeof UpdateTeamSchema>;
|
|
1893
|
+
export type CreateContainerBody = z.input<typeof CreateContainerSchema>;
|
|
1894
|
+
export type UpdateContainerBody = z.input<typeof UpdateContainerSchema>;
|
|
1895
|
+
export type CreateIterationBody = z.input<typeof CreateIterationSchema>;
|
|
1896
|
+
export type UpdateIterationBody = z.input<typeof UpdateIterationSchema>;
|
|
1897
|
+
export type CreateCommentBody = z.input<typeof CreateCommentSchema>;
|
|
1898
|
+
export type UpdateCommentBody = z.input<typeof UpdateCommentSchema>;
|
|
1899
|
+
export type CommentReactionBody = z.input<typeof CommentReactionSchema>;
|
|
1900
|
+
export type CreateAttachmentBody = z.input<typeof CreateAttachmentSchema>;
|
|
1901
|
+
export type UploadAttachmentBody = z.input<typeof UploadAttachmentSchema>;
|
|
1902
|
+
export type PresignAttachmentBody = z.input<typeof PresignAttachmentSchema>;
|
|
1903
|
+
export type LogTimeBody = z.input<typeof LogTimeSchema>;
|
|
1941
1904
|
//# sourceMappingURL=index.d.ts.map
|