@critical-path/core 0.25.0 → 0.27.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 +52 -0
- package/README.md +25 -0
- package/dist/domain/authorization.d.ts +23 -0
- package/dist/domain/authorization.d.ts.map +1 -0
- package/dist/domain/authorization.js +62 -0
- package/dist/domain/authorization.js.map +1 -0
- package/dist/domain/entities.d.ts +2 -2
- package/dist/domain/entities.d.ts.map +1 -1
- package/dist/domain/entities.js.map +1 -1
- package/dist/domain/errors.d.ts +6 -0
- package/dist/domain/errors.d.ts.map +1 -1
- package/dist/domain/errors.js +9 -0
- package/dist/domain/errors.js.map +1 -1
- package/dist/domain/events.d.ts +5 -0
- package/dist/domain/events.d.ts.map +1 -1
- package/dist/domain/events.js +34 -0
- package/dist/domain/events.js.map +1 -1
- package/dist/domain/index.d.ts +1 -0
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +1 -0
- package/dist/domain/index.js.map +1 -1
- package/dist/engine/authorization.test.d.ts +2 -0
- package/dist/engine/authorization.test.d.ts.map +1 -0
- package/dist/engine/authorization.test.js +150 -0
- package/dist/engine/authorization.test.js.map +1 -0
- package/dist/engine/index.d.ts +65 -3
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +404 -104
- package/dist/engine/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +131 -54
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +18 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/schemas.test.js +1 -0
- package/dist/schemas/schemas.test.js.map +1 -1
- package/dist/store/firebase.d.ts +3 -0
- package/dist/store/firebase.d.ts.map +1 -1
- package/dist/store/firebase.js +21 -0
- package/dist/store/firebase.js.map +1 -1
- package/dist/store/firebase.test.js +17 -0
- package/dist/store/firebase.test.js.map +1 -1
- package/dist/store/index.d.ts +6 -0
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +14 -0
- package/dist/store/index.js.map +1 -1
- package/dist/store/sqlite.d.ts +4 -0
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +62 -17
- package/dist/store/sqlite.js.map +1 -1
- package/dist/types/index.d.ts +61 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/webhooks/dispatcher.d.ts +80 -0
- package/dist/webhooks/dispatcher.d.ts.map +1 -0
- package/dist/webhooks/dispatcher.js +133 -0
- package/dist/webhooks/dispatcher.js.map +1 -0
- package/dist/webhooks/index.d.ts +3 -0
- package/dist/webhooks/index.d.ts.map +1 -0
- package/dist/webhooks/index.js +3 -0
- package/dist/webhooks/index.js.map +1 -0
- package/dist/webhooks/signature.d.ts +28 -0
- package/dist/webhooks/signature.d.ts.map +1 -0
- package/dist/webhooks/signature.js +42 -0
- package/dist/webhooks/signature.js.map +1 -0
- package/dist/webhooks/webhooks.test.d.ts +2 -0
- package/dist/webhooks/webhooks.test.d.ts.map +1 -0
- package/dist/webhooks/webhooks.test.js +153 -0
- package/dist/webhooks/webhooks.test.js.map +1 -0
- package/package.json +1 -1
- package/src/domain/authorization.ts +82 -0
- package/src/domain/entities.ts +2 -1
- package/src/domain/errors.ts +10 -0
- package/src/domain/events.ts +42 -3
- package/src/domain/index.ts +1 -0
- package/src/engine/authorization.test.ts +191 -0
- package/src/engine/index.ts +419 -108
- package/src/index.ts +1 -0
- package/src/schemas/index.ts +22 -1
- package/src/schemas/schemas.test.ts +9 -5
- package/src/store/firebase.test.ts +20 -0
- package/src/store/firebase.ts +22 -0
- package/src/store/index.ts +19 -0
- package/src/store/sqlite.ts +74 -13
- package/src/types/index.ts +81 -29
- package/src/webhooks/dispatcher.ts +190 -0
- package/src/webhooks/index.ts +2 -0
- package/src/webhooks/signature.ts +57 -0
- package/src/webhooks/webhooks.test.ts +200 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/schemas/index.d.ts
CHANGED
|
@@ -84,8 +84,8 @@ export declare const WorkScheduleSchema: z.ZodObject<{
|
|
|
84
84
|
end: string;
|
|
85
85
|
}[] | undefined;
|
|
86
86
|
}[];
|
|
87
|
-
id?: string | undefined;
|
|
88
87
|
name?: string | undefined;
|
|
88
|
+
id?: string | undefined;
|
|
89
89
|
defaultHoursPerDay?: number | undefined;
|
|
90
90
|
timezone?: string | undefined;
|
|
91
91
|
holidays?: {
|
|
@@ -102,8 +102,8 @@ export declare const WorkScheduleSchema: z.ZodObject<{
|
|
|
102
102
|
end: string;
|
|
103
103
|
}[] | undefined;
|
|
104
104
|
}[];
|
|
105
|
-
id?: string | undefined;
|
|
106
105
|
name?: string | undefined;
|
|
106
|
+
id?: string | undefined;
|
|
107
107
|
defaultHoursPerDay?: number | undefined;
|
|
108
108
|
timezone?: string | undefined;
|
|
109
109
|
holidays?: {
|
|
@@ -183,13 +183,13 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
183
183
|
}, "strict", z.ZodTypeAny, {
|
|
184
184
|
fromStatusKey: string;
|
|
185
185
|
toStatusKey: string;
|
|
186
|
-
id?: string | undefined;
|
|
187
186
|
name?: string | undefined;
|
|
187
|
+
id?: string | undefined;
|
|
188
188
|
}, {
|
|
189
189
|
fromStatusKey: string;
|
|
190
190
|
toStatusKey: string;
|
|
191
|
-
id?: string | undefined;
|
|
192
191
|
name?: string | undefined;
|
|
192
|
+
id?: string | undefined;
|
|
193
193
|
}>, "many">>;
|
|
194
194
|
taskTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
195
195
|
key: z.ZodString;
|
|
@@ -220,8 +220,8 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
220
220
|
transitions: {
|
|
221
221
|
fromStatusKey: string;
|
|
222
222
|
toStatusKey: string;
|
|
223
|
-
id?: string | undefined;
|
|
224
223
|
name?: string | undefined;
|
|
224
|
+
id?: string | undefined;
|
|
225
225
|
}[];
|
|
226
226
|
statuses: {
|
|
227
227
|
key: string;
|
|
@@ -258,8 +258,8 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
258
258
|
transitions?: {
|
|
259
259
|
fromStatusKey: string;
|
|
260
260
|
toStatusKey: string;
|
|
261
|
-
id?: string | undefined;
|
|
262
261
|
name?: string | undefined;
|
|
262
|
+
id?: string | undefined;
|
|
263
263
|
}[] | undefined;
|
|
264
264
|
defaultStatusKey?: string | undefined;
|
|
265
265
|
isDefault?: boolean | undefined;
|
|
@@ -288,13 +288,13 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
288
288
|
}, "strict", z.ZodTypeAny, {
|
|
289
289
|
fromStatusKey: string;
|
|
290
290
|
toStatusKey: string;
|
|
291
|
-
id?: string | undefined;
|
|
292
291
|
name?: string | undefined;
|
|
292
|
+
id?: string | undefined;
|
|
293
293
|
}, {
|
|
294
294
|
fromStatusKey: string;
|
|
295
295
|
toStatusKey: string;
|
|
296
|
-
id?: string | undefined;
|
|
297
296
|
name?: string | undefined;
|
|
297
|
+
id?: string | undefined;
|
|
298
298
|
}>, "many">>>;
|
|
299
299
|
taskTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
300
300
|
key: z.ZodString;
|
|
@@ -321,8 +321,8 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
321
321
|
defaultStatusKey: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
322
322
|
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
323
323
|
}, "strict", z.ZodTypeAny, {
|
|
324
|
-
description?: string | undefined;
|
|
325
324
|
name?: string | undefined;
|
|
325
|
+
description?: string | undefined;
|
|
326
326
|
taskTypes?: {
|
|
327
327
|
key: string;
|
|
328
328
|
label: string;
|
|
@@ -334,8 +334,8 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
334
334
|
transitions?: {
|
|
335
335
|
fromStatusKey: string;
|
|
336
336
|
toStatusKey: string;
|
|
337
|
-
id?: string | undefined;
|
|
338
337
|
name?: string | undefined;
|
|
338
|
+
id?: string | undefined;
|
|
339
339
|
}[] | undefined;
|
|
340
340
|
statuses?: {
|
|
341
341
|
key: string;
|
|
@@ -345,8 +345,8 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
345
345
|
defaultStatusKey?: string | undefined;
|
|
346
346
|
isDefault?: boolean | undefined;
|
|
347
347
|
}, {
|
|
348
|
-
description?: string | undefined;
|
|
349
348
|
name?: string | undefined;
|
|
349
|
+
description?: string | undefined;
|
|
350
350
|
taskTypes?: {
|
|
351
351
|
key: string;
|
|
352
352
|
label: string;
|
|
@@ -358,8 +358,8 @@ export declare const UpdateWorkflowSchema: z.ZodObject<{
|
|
|
358
358
|
transitions?: {
|
|
359
359
|
fromStatusKey: string;
|
|
360
360
|
toStatusKey: string;
|
|
361
|
-
id?: string | undefined;
|
|
362
361
|
name?: string | undefined;
|
|
362
|
+
id?: string | undefined;
|
|
363
363
|
}[] | undefined;
|
|
364
364
|
statuses?: {
|
|
365
365
|
key: string;
|
|
@@ -374,7 +374,16 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
374
374
|
name: z.ZodString;
|
|
375
375
|
description: z.ZodOptional<z.ZodString>;
|
|
376
376
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
377
|
-
members: z.ZodOptional<z.ZodArray<z.
|
|
377
|
+
members: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
378
|
+
userId: z.ZodString;
|
|
379
|
+
role: z.ZodEnum<["admin", "project_manager", "contributor", "viewer"]>;
|
|
380
|
+
}, "strict", z.ZodTypeAny, {
|
|
381
|
+
userId: string;
|
|
382
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
383
|
+
}, {
|
|
384
|
+
userId: string;
|
|
385
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
386
|
+
}>, "many">>;
|
|
378
387
|
teamIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
379
388
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
380
389
|
taskTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -505,8 +514,8 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
505
514
|
end: string;
|
|
506
515
|
}[] | undefined;
|
|
507
516
|
}[];
|
|
508
|
-
id?: string | undefined;
|
|
509
517
|
name?: string | undefined;
|
|
518
|
+
id?: string | undefined;
|
|
510
519
|
defaultHoursPerDay?: number | undefined;
|
|
511
520
|
timezone?: string | undefined;
|
|
512
521
|
holidays?: {
|
|
@@ -523,8 +532,8 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
523
532
|
end: string;
|
|
524
533
|
}[] | undefined;
|
|
525
534
|
}[];
|
|
526
|
-
id?: string | undefined;
|
|
527
535
|
name?: string | undefined;
|
|
536
|
+
id?: string | undefined;
|
|
528
537
|
defaultHoursPerDay?: number | undefined;
|
|
529
538
|
timezone?: string | undefined;
|
|
530
539
|
holidays?: {
|
|
@@ -540,7 +549,10 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
540
549
|
key?: string | undefined;
|
|
541
550
|
description?: string | undefined;
|
|
542
551
|
ownerId?: string | undefined;
|
|
543
|
-
members?:
|
|
552
|
+
members?: {
|
|
553
|
+
userId: string;
|
|
554
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
555
|
+
}[] | undefined;
|
|
544
556
|
teamIds?: string[] | undefined;
|
|
545
557
|
workflowId?: string | undefined;
|
|
546
558
|
taskTypes?: {
|
|
@@ -579,8 +591,8 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
579
591
|
end: string;
|
|
580
592
|
}[] | undefined;
|
|
581
593
|
}[];
|
|
582
|
-
id?: string | undefined;
|
|
583
594
|
name?: string | undefined;
|
|
595
|
+
id?: string | undefined;
|
|
584
596
|
defaultHoursPerDay?: number | undefined;
|
|
585
597
|
timezone?: string | undefined;
|
|
586
598
|
holidays?: {
|
|
@@ -596,7 +608,10 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
596
608
|
key?: string | undefined;
|
|
597
609
|
description?: string | undefined;
|
|
598
610
|
ownerId?: string | undefined;
|
|
599
|
-
members?:
|
|
611
|
+
members?: {
|
|
612
|
+
userId: string;
|
|
613
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
614
|
+
}[] | undefined;
|
|
600
615
|
teamIds?: string[] | undefined;
|
|
601
616
|
workflowId?: string | undefined;
|
|
602
617
|
taskTypes?: {
|
|
@@ -635,8 +650,8 @@ export declare const CreateProjectSchema: z.ZodObject<{
|
|
|
635
650
|
end: string;
|
|
636
651
|
}[] | undefined;
|
|
637
652
|
}[];
|
|
638
|
-
id?: string | undefined;
|
|
639
653
|
name?: string | undefined;
|
|
654
|
+
id?: string | undefined;
|
|
640
655
|
defaultHoursPerDay?: number | undefined;
|
|
641
656
|
timezone?: string | undefined;
|
|
642
657
|
holidays?: {
|
|
@@ -653,7 +668,16 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
653
668
|
name: z.ZodOptional<z.ZodString>;
|
|
654
669
|
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
655
670
|
ownerId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
656
|
-
members: z.ZodOptional<z.ZodOptional<z.ZodArray<z.
|
|
671
|
+
members: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
672
|
+
userId: z.ZodString;
|
|
673
|
+
role: z.ZodEnum<["admin", "project_manager", "contributor", "viewer"]>;
|
|
674
|
+
}, "strict", z.ZodTypeAny, {
|
|
675
|
+
userId: string;
|
|
676
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
677
|
+
}, {
|
|
678
|
+
userId: string;
|
|
679
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
680
|
+
}>, "many">>>;
|
|
657
681
|
teamIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
658
682
|
workflowId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
659
683
|
taskTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -784,8 +808,8 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
784
808
|
end: string;
|
|
785
809
|
}[] | undefined;
|
|
786
810
|
}[];
|
|
787
|
-
id?: string | undefined;
|
|
788
811
|
name?: string | undefined;
|
|
812
|
+
id?: string | undefined;
|
|
789
813
|
defaultHoursPerDay?: number | undefined;
|
|
790
814
|
timezone?: string | undefined;
|
|
791
815
|
holidays?: {
|
|
@@ -802,8 +826,8 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
802
826
|
end: string;
|
|
803
827
|
}[] | undefined;
|
|
804
828
|
}[];
|
|
805
|
-
id?: string | undefined;
|
|
806
829
|
name?: string | undefined;
|
|
830
|
+
id?: string | undefined;
|
|
807
831
|
defaultHoursPerDay?: number | undefined;
|
|
808
832
|
timezone?: string | undefined;
|
|
809
833
|
holidays?: {
|
|
@@ -815,11 +839,14 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
815
839
|
startDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
816
840
|
targetEndDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
817
841
|
}, "strict", z.ZodTypeAny, {
|
|
842
|
+
name?: string | undefined;
|
|
818
843
|
key?: string | undefined;
|
|
819
844
|
description?: string | undefined;
|
|
820
|
-
name?: string | undefined;
|
|
821
845
|
ownerId?: string | undefined;
|
|
822
|
-
members?:
|
|
846
|
+
members?: {
|
|
847
|
+
userId: string;
|
|
848
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
849
|
+
}[] | undefined;
|
|
823
850
|
teamIds?: string[] | undefined;
|
|
824
851
|
workflowId?: string | undefined;
|
|
825
852
|
taskTypes?: {
|
|
@@ -858,8 +885,8 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
858
885
|
end: string;
|
|
859
886
|
}[] | undefined;
|
|
860
887
|
}[];
|
|
861
|
-
id?: string | undefined;
|
|
862
888
|
name?: string | undefined;
|
|
889
|
+
id?: string | undefined;
|
|
863
890
|
defaultHoursPerDay?: number | undefined;
|
|
864
891
|
timezone?: string | undefined;
|
|
865
892
|
holidays?: {
|
|
@@ -871,11 +898,14 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
871
898
|
startDate?: string | undefined;
|
|
872
899
|
targetEndDate?: string | undefined;
|
|
873
900
|
}, {
|
|
901
|
+
name?: string | undefined;
|
|
874
902
|
key?: string | undefined;
|
|
875
903
|
description?: string | undefined;
|
|
876
|
-
name?: string | undefined;
|
|
877
904
|
ownerId?: string | undefined;
|
|
878
|
-
members?:
|
|
905
|
+
members?: {
|
|
906
|
+
userId: string;
|
|
907
|
+
role: "admin" | "project_manager" | "contributor" | "viewer";
|
|
908
|
+
}[] | undefined;
|
|
879
909
|
teamIds?: string[] | undefined;
|
|
880
910
|
workflowId?: string | undefined;
|
|
881
911
|
taskTypes?: {
|
|
@@ -914,8 +944,8 @@ export declare const UpdateProjectSchema: z.ZodObject<{
|
|
|
914
944
|
end: string;
|
|
915
945
|
}[] | undefined;
|
|
916
946
|
}[];
|
|
917
|
-
id?: string | undefined;
|
|
918
947
|
name?: string | undefined;
|
|
948
|
+
id?: string | undefined;
|
|
919
949
|
defaultHoursPerDay?: number | undefined;
|
|
920
950
|
timezone?: string | undefined;
|
|
921
951
|
holidays?: {
|
|
@@ -987,14 +1017,14 @@ export declare const CreateTaskSchema: z.ZodObject<{
|
|
|
987
1017
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
988
1018
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
989
1019
|
}, "strict", z.ZodTypeAny, {
|
|
990
|
-
completed: boolean;
|
|
991
1020
|
id: string;
|
|
1021
|
+
completed: boolean;
|
|
992
1022
|
title: string;
|
|
993
1023
|
createdAt?: string | undefined;
|
|
994
1024
|
completedAt?: string | undefined;
|
|
995
1025
|
}, {
|
|
996
|
-
completed: boolean;
|
|
997
1026
|
id: string;
|
|
1027
|
+
completed: boolean;
|
|
998
1028
|
title: string;
|
|
999
1029
|
createdAt?: string | undefined;
|
|
1000
1030
|
completedAt?: string | undefined;
|
|
@@ -1045,8 +1075,8 @@ export declare const CreateTaskSchema: z.ZodObject<{
|
|
|
1045
1075
|
blockedReason?: string | null | undefined;
|
|
1046
1076
|
tags?: string[] | undefined;
|
|
1047
1077
|
todos?: {
|
|
1048
|
-
completed: boolean;
|
|
1049
1078
|
id: string;
|
|
1079
|
+
completed: boolean;
|
|
1050
1080
|
title: string;
|
|
1051
1081
|
createdAt?: string | undefined;
|
|
1052
1082
|
completedAt?: string | undefined;
|
|
@@ -1096,8 +1126,8 @@ export declare const CreateTaskSchema: z.ZodObject<{
|
|
|
1096
1126
|
blockedReason?: string | null | undefined;
|
|
1097
1127
|
tags?: string[] | undefined;
|
|
1098
1128
|
todos?: {
|
|
1099
|
-
completed: boolean;
|
|
1100
1129
|
id: string;
|
|
1130
|
+
completed: boolean;
|
|
1101
1131
|
title: string;
|
|
1102
1132
|
createdAt?: string | undefined;
|
|
1103
1133
|
completedAt?: string | undefined;
|
|
@@ -1165,14 +1195,14 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1165
1195
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
1166
1196
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
1167
1197
|
}, "strict", z.ZodTypeAny, {
|
|
1168
|
-
completed: boolean;
|
|
1169
1198
|
id: string;
|
|
1199
|
+
completed: boolean;
|
|
1170
1200
|
title: string;
|
|
1171
1201
|
createdAt?: string | undefined;
|
|
1172
1202
|
completedAt?: string | undefined;
|
|
1173
1203
|
}, {
|
|
1174
|
-
completed: boolean;
|
|
1175
1204
|
id: string;
|
|
1205
|
+
completed: boolean;
|
|
1176
1206
|
title: string;
|
|
1177
1207
|
createdAt?: string | undefined;
|
|
1178
1208
|
completedAt?: string | undefined;
|
|
@@ -1221,8 +1251,8 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1221
1251
|
blockedReason?: string | null | undefined;
|
|
1222
1252
|
tags?: string[] | undefined;
|
|
1223
1253
|
todos?: {
|
|
1224
|
-
completed: boolean;
|
|
1225
1254
|
id: string;
|
|
1255
|
+
completed: boolean;
|
|
1226
1256
|
title: string;
|
|
1227
1257
|
createdAt?: string | undefined;
|
|
1228
1258
|
completedAt?: string | undefined;
|
|
@@ -1271,8 +1301,8 @@ export declare const UpdateTaskSchema: z.ZodObject<{
|
|
|
1271
1301
|
blockedReason?: string | null | undefined;
|
|
1272
1302
|
tags?: string[] | undefined;
|
|
1273
1303
|
todos?: {
|
|
1274
|
-
completed: boolean;
|
|
1275
1304
|
id: string;
|
|
1305
|
+
completed: boolean;
|
|
1276
1306
|
title: string;
|
|
1277
1307
|
createdAt?: string | undefined;
|
|
1278
1308
|
completedAt?: string | undefined;
|
|
@@ -1428,8 +1458,8 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1428
1458
|
end: string;
|
|
1429
1459
|
}[] | undefined;
|
|
1430
1460
|
}[];
|
|
1431
|
-
id?: string | undefined;
|
|
1432
1461
|
name?: string | undefined;
|
|
1462
|
+
id?: string | undefined;
|
|
1433
1463
|
defaultHoursPerDay?: number | undefined;
|
|
1434
1464
|
timezone?: string | undefined;
|
|
1435
1465
|
holidays?: {
|
|
@@ -1446,8 +1476,8 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1446
1476
|
end: string;
|
|
1447
1477
|
}[] | undefined;
|
|
1448
1478
|
}[];
|
|
1449
|
-
id?: string | undefined;
|
|
1450
1479
|
name?: string | undefined;
|
|
1480
|
+
id?: string | undefined;
|
|
1451
1481
|
defaultHoursPerDay?: number | undefined;
|
|
1452
1482
|
timezone?: string | undefined;
|
|
1453
1483
|
holidays?: {
|
|
@@ -1469,8 +1499,8 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1469
1499
|
end: string;
|
|
1470
1500
|
}[] | undefined;
|
|
1471
1501
|
}[];
|
|
1472
|
-
id?: string | undefined;
|
|
1473
1502
|
name?: string | undefined;
|
|
1503
|
+
id?: string | undefined;
|
|
1474
1504
|
defaultHoursPerDay?: number | undefined;
|
|
1475
1505
|
timezone?: string | undefined;
|
|
1476
1506
|
holidays?: {
|
|
@@ -1493,8 +1523,8 @@ export declare const CreateTeamSchema: z.ZodObject<{
|
|
|
1493
1523
|
end: string;
|
|
1494
1524
|
}[] | undefined;
|
|
1495
1525
|
}[];
|
|
1496
|
-
id?: string | undefined;
|
|
1497
1526
|
name?: string | undefined;
|
|
1527
|
+
id?: string | undefined;
|
|
1498
1528
|
defaultHoursPerDay?: number | undefined;
|
|
1499
1529
|
timezone?: string | undefined;
|
|
1500
1530
|
holidays?: {
|
|
@@ -1568,8 +1598,8 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1568
1598
|
end: string;
|
|
1569
1599
|
}[] | undefined;
|
|
1570
1600
|
}[];
|
|
1571
|
-
id?: string | undefined;
|
|
1572
1601
|
name?: string | undefined;
|
|
1602
|
+
id?: string | undefined;
|
|
1573
1603
|
defaultHoursPerDay?: number | undefined;
|
|
1574
1604
|
timezone?: string | undefined;
|
|
1575
1605
|
holidays?: {
|
|
@@ -1586,8 +1616,8 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1586
1616
|
end: string;
|
|
1587
1617
|
}[] | undefined;
|
|
1588
1618
|
}[];
|
|
1589
|
-
id?: string | undefined;
|
|
1590
1619
|
name?: string | undefined;
|
|
1620
|
+
id?: string | undefined;
|
|
1591
1621
|
defaultHoursPerDay?: number | undefined;
|
|
1592
1622
|
timezone?: string | undefined;
|
|
1593
1623
|
holidays?: {
|
|
@@ -1597,8 +1627,8 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1597
1627
|
}[] | undefined;
|
|
1598
1628
|
}>>>;
|
|
1599
1629
|
}, "strict", z.ZodTypeAny, {
|
|
1600
|
-
description?: string | undefined;
|
|
1601
1630
|
name?: string | undefined;
|
|
1631
|
+
description?: string | undefined;
|
|
1602
1632
|
schedule?: {
|
|
1603
1633
|
days: {
|
|
1604
1634
|
isWorkingDay: boolean;
|
|
@@ -1608,8 +1638,8 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1608
1638
|
end: string;
|
|
1609
1639
|
}[] | undefined;
|
|
1610
1640
|
}[];
|
|
1611
|
-
id?: string | undefined;
|
|
1612
1641
|
name?: string | undefined;
|
|
1642
|
+
id?: string | undefined;
|
|
1613
1643
|
defaultHoursPerDay?: number | undefined;
|
|
1614
1644
|
timezone?: string | undefined;
|
|
1615
1645
|
holidays?: {
|
|
@@ -1622,8 +1652,8 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1622
1652
|
memberIds?: string[] | undefined;
|
|
1623
1653
|
weeklyCapacityHours?: number | undefined;
|
|
1624
1654
|
}, {
|
|
1625
|
-
description?: string | undefined;
|
|
1626
1655
|
name?: string | undefined;
|
|
1656
|
+
description?: string | undefined;
|
|
1627
1657
|
schedule?: {
|
|
1628
1658
|
days: {
|
|
1629
1659
|
isWorkingDay: boolean;
|
|
@@ -1633,8 +1663,8 @@ export declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
1633
1663
|
end: string;
|
|
1634
1664
|
}[] | undefined;
|
|
1635
1665
|
}[];
|
|
1636
|
-
id?: string | undefined;
|
|
1637
1666
|
name?: string | undefined;
|
|
1667
|
+
id?: string | undefined;
|
|
1638
1668
|
defaultHoursPerDay?: number | undefined;
|
|
1639
1669
|
timezone?: string | undefined;
|
|
1640
1670
|
holidays?: {
|
|
@@ -1655,15 +1685,15 @@ export declare const CreateContainerSchema: z.ZodObject<{
|
|
|
1655
1685
|
color: z.ZodOptional<z.ZodString>;
|
|
1656
1686
|
projectId: z.ZodString;
|
|
1657
1687
|
}, "strict", z.ZodTypeAny, {
|
|
1658
|
-
projectId: string;
|
|
1659
1688
|
name: string;
|
|
1689
|
+
projectId: string;
|
|
1660
1690
|
description?: string | undefined;
|
|
1661
1691
|
parentId?: string | undefined;
|
|
1662
1692
|
type?: string | undefined;
|
|
1663
1693
|
color?: string | undefined;
|
|
1664
1694
|
}, {
|
|
1665
|
-
projectId: string;
|
|
1666
1695
|
name: string;
|
|
1696
|
+
projectId: string;
|
|
1667
1697
|
description?: string | undefined;
|
|
1668
1698
|
parentId?: string | undefined;
|
|
1669
1699
|
type?: string | undefined;
|
|
@@ -1676,15 +1706,15 @@ export declare const UpdateContainerSchema: z.ZodObject<{
|
|
|
1676
1706
|
type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1677
1707
|
color: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1678
1708
|
}, "strict", z.ZodTypeAny, {
|
|
1709
|
+
name?: string | undefined;
|
|
1679
1710
|
description?: string | undefined;
|
|
1680
1711
|
parentId?: string | undefined;
|
|
1681
|
-
name?: string | undefined;
|
|
1682
1712
|
type?: string | undefined;
|
|
1683
1713
|
color?: string | undefined;
|
|
1684
1714
|
}, {
|
|
1715
|
+
name?: string | undefined;
|
|
1685
1716
|
description?: string | undefined;
|
|
1686
1717
|
parentId?: string | undefined;
|
|
1687
|
-
name?: string | undefined;
|
|
1688
1718
|
type?: string | undefined;
|
|
1689
1719
|
color?: string | undefined;
|
|
1690
1720
|
}>;
|
|
@@ -1697,16 +1727,16 @@ export declare const CreateIterationSchema: z.ZodObject<{
|
|
|
1697
1727
|
status: z.ZodDefault<z.ZodEnum<["planning", "active", "completed"]>>;
|
|
1698
1728
|
projectId: z.ZodString;
|
|
1699
1729
|
}, "strict", z.ZodTypeAny, {
|
|
1730
|
+
name: string;
|
|
1700
1731
|
status: "completed" | "planning" | "active";
|
|
1701
1732
|
projectId: string;
|
|
1702
|
-
name: string;
|
|
1703
1733
|
startDate?: string | undefined;
|
|
1704
1734
|
type?: string | undefined;
|
|
1705
1735
|
goal?: string | undefined;
|
|
1706
1736
|
endDate?: string | undefined;
|
|
1707
1737
|
}, {
|
|
1708
|
-
projectId: string;
|
|
1709
1738
|
name: string;
|
|
1739
|
+
projectId: string;
|
|
1710
1740
|
status?: "completed" | "planning" | "active" | undefined;
|
|
1711
1741
|
startDate?: string | undefined;
|
|
1712
1742
|
type?: string | undefined;
|
|
@@ -1721,15 +1751,15 @@ export declare const UpdateIterationSchema: z.ZodObject<{
|
|
|
1721
1751
|
startDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1722
1752
|
endDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1723
1753
|
}, "strip", z.ZodTypeAny, {
|
|
1724
|
-
status?: "completed" | "planning" | "active" | undefined;
|
|
1725
1754
|
name?: string | undefined;
|
|
1755
|
+
status?: "completed" | "planning" | "active" | undefined;
|
|
1726
1756
|
startDate?: string | undefined;
|
|
1727
1757
|
type?: string | undefined;
|
|
1728
1758
|
goal?: string | undefined;
|
|
1729
1759
|
endDate?: string | undefined;
|
|
1730
1760
|
}, {
|
|
1731
|
-
status?: "completed" | "planning" | "active" | undefined;
|
|
1732
1761
|
name?: string | undefined;
|
|
1762
|
+
status?: "completed" | "planning" | "active" | undefined;
|
|
1733
1763
|
startDate?: string | undefined;
|
|
1734
1764
|
type?: string | undefined;
|
|
1735
1765
|
goal?: string | undefined;
|
|
@@ -1843,14 +1873,18 @@ export declare const UploadAttachmentSchema: z.ZodObject<{
|
|
|
1843
1873
|
encoding?: "base64" | "utf-8" | "binary" | undefined;
|
|
1844
1874
|
}>;
|
|
1845
1875
|
export declare const PresignAttachmentSchema: z.ZodObject<{
|
|
1876
|
+
/** Project the upload belongs to; scoped callers may only write under `projects/<projectId>/`. */
|
|
1877
|
+
projectId: z.ZodString;
|
|
1846
1878
|
storageKey: z.ZodString;
|
|
1847
1879
|
expiresInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1848
1880
|
contentType: z.ZodOptional<z.ZodString>;
|
|
1849
1881
|
}, "strict", z.ZodTypeAny, {
|
|
1882
|
+
projectId: string;
|
|
1850
1883
|
storageKey: string;
|
|
1851
1884
|
contentType?: string | undefined;
|
|
1852
1885
|
expiresInSeconds?: number | undefined;
|
|
1853
1886
|
}, {
|
|
1887
|
+
projectId: string;
|
|
1854
1888
|
storageKey: string;
|
|
1855
1889
|
contentType?: string | undefined;
|
|
1856
1890
|
expiresInSeconds?: number | undefined;
|
|
@@ -1874,6 +1908,47 @@ export declare const LogTimeSchema: z.ZodObject<{
|
|
|
1874
1908
|
loggedAt?: string | undefined;
|
|
1875
1909
|
isBillable?: boolean | undefined;
|
|
1876
1910
|
}>;
|
|
1911
|
+
export declare const CreateWebhookSchema: z.ZodObject<{
|
|
1912
|
+
name: z.ZodString;
|
|
1913
|
+
/** http(s) URL; private and local addresses are rejected unless the engine allows them. */
|
|
1914
|
+
url: z.ZodString;
|
|
1915
|
+
/** Domain event names (e.g. `task.created`) or `'*'` for all events. */
|
|
1916
|
+
events: z.ZodArray<z.ZodEnum<["*", "attachment.created", "attachment.deleted", "comment.created", "comment.deleted", "comment.reaction.added", "comment.reaction.removed", "comment.updated", "container.created", "deliverable.created", "deliverable.deleted", "deliverable.status_changed", "deliverable.updated", "dependency.added", "iteration.completed", "iteration.started", "project.created", "project.deleted", "project.updated", "task.blocked", "task.created", "task.deleted", "task.status_changed", "task.unblocked", "task.updated", "team.created", "time.logged", "workflow.created", "workflow.deleted", "workflow.updated"]>, "many">;
|
|
1917
|
+
/** Signing secret (at least 16 characters). Generated when omitted and returned once. */
|
|
1918
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
1919
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
1920
|
+
}, "strict", z.ZodTypeAny, {
|
|
1921
|
+
name: string;
|
|
1922
|
+
events: ("task.created" | "task.updated" | "task.status_changed" | "task.blocked" | "task.unblocked" | "task.deleted" | "time.logged" | "comment.created" | "comment.updated" | "comment.deleted" | "comment.reaction.added" | "comment.reaction.removed" | "attachment.created" | "attachment.deleted" | "dependency.added" | "project.created" | "project.updated" | "project.deleted" | "workflow.created" | "workflow.updated" | "workflow.deleted" | "iteration.started" | "iteration.completed" | "team.created" | "container.created" | "deliverable.created" | "deliverable.updated" | "deliverable.status_changed" | "deliverable.deleted" | "*")[];
|
|
1923
|
+
url: string;
|
|
1924
|
+
active?: boolean | undefined;
|
|
1925
|
+
secret?: string | undefined;
|
|
1926
|
+
}, {
|
|
1927
|
+
name: string;
|
|
1928
|
+
events: ("task.created" | "task.updated" | "task.status_changed" | "task.blocked" | "task.unblocked" | "task.deleted" | "time.logged" | "comment.created" | "comment.updated" | "comment.deleted" | "comment.reaction.added" | "comment.reaction.removed" | "attachment.created" | "attachment.deleted" | "dependency.added" | "project.created" | "project.updated" | "project.deleted" | "workflow.created" | "workflow.updated" | "workflow.deleted" | "iteration.started" | "iteration.completed" | "team.created" | "container.created" | "deliverable.created" | "deliverable.updated" | "deliverable.status_changed" | "deliverable.deleted" | "*")[];
|
|
1929
|
+
url: string;
|
|
1930
|
+
active?: boolean | undefined;
|
|
1931
|
+
secret?: string | undefined;
|
|
1932
|
+
}>;
|
|
1933
|
+
export declare const UpdateWebhookSchema: z.ZodObject<{
|
|
1934
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1935
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1936
|
+
events: z.ZodOptional<z.ZodArray<z.ZodEnum<["*", "attachment.created", "attachment.deleted", "comment.created", "comment.deleted", "comment.reaction.added", "comment.reaction.removed", "comment.updated", "container.created", "deliverable.created", "deliverable.deleted", "deliverable.status_changed", "deliverable.updated", "dependency.added", "iteration.completed", "iteration.started", "project.created", "project.deleted", "project.updated", "task.blocked", "task.created", "task.deleted", "task.status_changed", "task.unblocked", "task.updated", "team.created", "time.logged", "workflow.created", "workflow.deleted", "workflow.updated"]>, "many">>;
|
|
1937
|
+
secret: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1938
|
+
active: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1939
|
+
}, "strict", z.ZodTypeAny, {
|
|
1940
|
+
name?: string | undefined;
|
|
1941
|
+
events?: ("task.created" | "task.updated" | "task.status_changed" | "task.blocked" | "task.unblocked" | "task.deleted" | "time.logged" | "comment.created" | "comment.updated" | "comment.deleted" | "comment.reaction.added" | "comment.reaction.removed" | "attachment.created" | "attachment.deleted" | "dependency.added" | "project.created" | "project.updated" | "project.deleted" | "workflow.created" | "workflow.updated" | "workflow.deleted" | "iteration.started" | "iteration.completed" | "team.created" | "container.created" | "deliverable.created" | "deliverable.updated" | "deliverable.status_changed" | "deliverable.deleted" | "*")[] | undefined;
|
|
1942
|
+
active?: boolean | undefined;
|
|
1943
|
+
url?: string | undefined;
|
|
1944
|
+
secret?: string | undefined;
|
|
1945
|
+
}, {
|
|
1946
|
+
name?: string | undefined;
|
|
1947
|
+
events?: ("task.created" | "task.updated" | "task.status_changed" | "task.blocked" | "task.unblocked" | "task.deleted" | "time.logged" | "comment.created" | "comment.updated" | "comment.deleted" | "comment.reaction.added" | "comment.reaction.removed" | "attachment.created" | "attachment.deleted" | "dependency.added" | "project.created" | "project.updated" | "project.deleted" | "workflow.created" | "workflow.updated" | "workflow.deleted" | "iteration.started" | "iteration.completed" | "team.created" | "container.created" | "deliverable.created" | "deliverable.updated" | "deliverable.status_changed" | "deliverable.deleted" | "*")[] | undefined;
|
|
1948
|
+
active?: boolean | undefined;
|
|
1949
|
+
url?: string | undefined;
|
|
1950
|
+
secret?: string | undefined;
|
|
1951
|
+
}>;
|
|
1877
1952
|
export type CreateTaskPayload = z.infer<typeof CreateTaskSchema>;
|
|
1878
1953
|
export type UpdateTaskPayload = z.infer<typeof UpdateTaskSchema>;
|
|
1879
1954
|
export type CreateProjectPayload = z.infer<typeof CreateProjectSchema>;
|
|
@@ -1901,4 +1976,6 @@ export type CreateAttachmentBody = z.input<typeof CreateAttachmentSchema>;
|
|
|
1901
1976
|
export type UploadAttachmentBody = z.input<typeof UploadAttachmentSchema>;
|
|
1902
1977
|
export type PresignAttachmentBody = z.input<typeof PresignAttachmentSchema>;
|
|
1903
1978
|
export type LogTimeBody = z.input<typeof LogTimeSchema>;
|
|
1979
|
+
export type CreateWebhookBody = z.input<typeof CreateWebhookSchema>;
|
|
1980
|
+
export type UpdateWebhookBody = z.input<typeof UpdateWebhookSchema>;
|
|
1904
1981
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAS1F;AAUD,eAAO,MAAM,oBAAoB,oEAAkE,CAAC;AACpG,eAAO,MAAM,gBAAgB,wCAAsC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe7B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAQtC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAOH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC5E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACxD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import { ValidationError } from '../domain/errors.js';
|
|
13
|
+
import { DOMAIN_EVENT_NAMES } from '../domain/events.js';
|
|
13
14
|
/**
|
|
14
15
|
* Parses `data` with `schema`, returning the cleaned value (unknown keys stripped, defaults
|
|
15
16
|
* applied) or throwing a `ValidationError` whose `issues` list every problem.
|
|
@@ -95,7 +96,9 @@ export const CreateProjectSchema = strictObject({
|
|
|
95
96
|
name: nonEmpty,
|
|
96
97
|
description: z.string().optional(),
|
|
97
98
|
ownerId: z.string().optional(),
|
|
98
|
-
members: z
|
|
99
|
+
members: z
|
|
100
|
+
.array(strictObject({ userId: nonEmpty, role: z.enum(['admin', 'project_manager', 'contributor', 'viewer']) }))
|
|
101
|
+
.optional(),
|
|
99
102
|
teamIds: z.array(z.string()).optional(),
|
|
100
103
|
workflowId: z.string().optional(),
|
|
101
104
|
taskTypes: z.array(TaskTypeDefinitionSchema).optional(),
|
|
@@ -261,6 +264,8 @@ export const UploadAttachmentSchema = strictObject({
|
|
|
261
264
|
encoding: z.enum(['base64', 'utf-8', 'binary']).optional()
|
|
262
265
|
});
|
|
263
266
|
export const PresignAttachmentSchema = strictObject({
|
|
267
|
+
/** Project the upload belongs to; scoped callers may only write under `projects/<projectId>/`. */
|
|
268
|
+
projectId: nonEmpty,
|
|
264
269
|
storageKey: nonEmpty,
|
|
265
270
|
expiresInSeconds: z.number().int().positive().optional(),
|
|
266
271
|
contentType: z.string().optional()
|
|
@@ -273,4 +278,16 @@ export const LogTimeSchema = strictObject({
|
|
|
273
278
|
description: z.string().optional(),
|
|
274
279
|
loggedAt: isoString.optional()
|
|
275
280
|
});
|
|
281
|
+
// --- Webhooks ---
|
|
282
|
+
export const CreateWebhookSchema = strictObject({
|
|
283
|
+
name: nonEmpty,
|
|
284
|
+
/** http(s) URL; private and local addresses are rejected unless the engine allows them. */
|
|
285
|
+
url: nonEmpty,
|
|
286
|
+
/** Domain event names (e.g. `task.created`) or `'*'` for all events. */
|
|
287
|
+
events: z.array(z.enum(['*', ...DOMAIN_EVENT_NAMES])).min(1),
|
|
288
|
+
/** Signing secret (at least 16 characters). Generated when omitted and returned once. */
|
|
289
|
+
secret: z.string().min(16).optional(),
|
|
290
|
+
active: z.boolean().optional()
|
|
291
|
+
});
|
|
292
|
+
export const UpdateWebhookSchema = CreateWebhookSchema.partial();
|
|
276
293
|
//# sourceMappingURL=index.js.map
|