@rudderhq/shared 0.1.0-canary.8 → 0.1.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/api.d.ts +1 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -0
- package/dist/api.js.map +1 -1
- package/dist/constants.d.ts +18 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +28 -10
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/messenger-preview.d.ts +5 -0
- package/dist/messenger-preview.d.ts.map +1 -0
- package/dist/messenger-preview.js +44 -0
- package/dist/messenger-preview.js.map +1 -0
- package/dist/messenger-preview.test.d.ts +2 -0
- package/dist/messenger-preview.test.d.ts.map +1 -0
- package/dist/messenger-preview.test.js +14 -0
- package/dist/messenger-preview.test.js.map +1 -0
- package/dist/project-mentions.d.ts.map +1 -1
- package/dist/project-mentions.js +18 -3
- package/dist/project-mentions.js.map +1 -1
- package/dist/project-mentions.test.js +9 -0
- package/dist/project-mentions.test.js.map +1 -1
- package/dist/types/calendar.d.ts +95 -0
- package/dist/types/calendar.d.ts.map +1 -0
- package/dist/types/calendar.js +2 -0
- package/dist/types/calendar.js.map +1 -0
- package/dist/types/goal.d.ts +26 -0
- package/dist/types/goal.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/instance.d.ts +0 -4
- package/dist/types/instance.d.ts.map +1 -1
- package/dist/types/issue.d.ts +3 -0
- package/dist/types/issue.d.ts.map +1 -1
- package/dist/types/messenger.d.ts +2 -0
- package/dist/types/messenger.d.ts.map +1 -1
- package/dist/types/organization-portability.d.ts +23 -0
- package/dist/types/organization-portability.d.ts.map +1 -1
- package/dist/types/organization.d.ts +2 -1
- package/dist/types/organization.d.ts.map +1 -1
- package/dist/types/workspace-backup.d.ts +44 -0
- package/dist/types/workspace-backup.d.ts.map +1 -0
- package/dist/types/workspace-backup.js +3 -0
- package/dist/types/workspace-backup.js.map +1 -0
- package/dist/validators/adapter-skills.d.ts +6 -6
- package/dist/validators/agent.d.ts +7 -7
- package/dist/validators/agent.d.ts.map +1 -1
- package/dist/validators/agent.js +11 -9
- package/dist/validators/agent.js.map +1 -1
- package/dist/validators/calendar.d.ts +407 -0
- package/dist/validators/calendar.d.ts.map +1 -0
- package/dist/validators/calendar.js +68 -0
- package/dist/validators/calendar.js.map +1 -0
- package/dist/validators/cost.d.ts +4 -4
- package/dist/validators/finance.d.ts +12 -12
- package/dist/validators/goal.d.ts +3 -3
- package/dist/validators/index.d.ts +4 -2
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +4 -2
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/instance.d.ts +0 -16
- package/dist/validators/instance.d.ts.map +1 -1
- package/dist/validators/instance.js +0 -4
- package/dist/validators/instance.js.map +1 -1
- package/dist/validators/issue.d.ts +35 -0
- package/dist/validators/issue.d.ts.map +1 -1
- package/dist/validators/issue.js +12 -0
- package/dist/validators/issue.js.map +1 -1
- package/dist/validators/model-fallbacks.d.ts +3 -0
- package/dist/validators/model-fallbacks.d.ts.map +1 -0
- package/dist/validators/model-fallbacks.js +79 -0
- package/dist/validators/model-fallbacks.js.map +1 -0
- package/dist/validators/organization-portability.d.ts +6 -6
- package/dist/validators/organization-skill.d.ts +48 -48
- package/dist/validators/organization.d.ts +2 -2
- package/dist/validators/organization.d.ts.map +1 -1
- package/dist/validators/organization.js +6 -2
- package/dist/validators/organization.js.map +1 -1
- package/dist/validators/plugin.d.ts +76 -76
- package/dist/validators/project.d.ts +6 -6
- package/dist/validators/project.d.ts.map +1 -1
- package/dist/validators/project.js +5 -2
- package/dist/validators/project.js.map +1 -1
- package/dist/validators/project.test.d.ts +2 -0
- package/dist/validators/project.test.d.ts.map +1 -0
- package/dist/validators/project.test.js +18 -0
- package/dist/validators/project.test.js.map +1 -0
- package/dist/validators/workspace-backup.d.ts +19 -0
- package/dist/validators/workspace-backup.d.ts.map +1 -0
- package/dist/validators/workspace-backup.js +9 -0
- package/dist/validators/workspace-backup.js.map +1 -0
- package/package.json +1 -1
|
@@ -152,17 +152,17 @@ export declare const pluginLauncherRenderDeclarationSchema: z.ZodEffects<z.ZodOb
|
|
|
152
152
|
environment: z.ZodEnum<["hostInline", "hostOverlay", "hostRoute", "external", "iframe"]>;
|
|
153
153
|
bounds: z.ZodOptional<z.ZodEnum<["inline", "compact", "default", "wide", "full"]>>;
|
|
154
154
|
}, "strip", z.ZodTypeAny, {
|
|
155
|
-
environment: "
|
|
156
|
-
bounds?: "
|
|
155
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
156
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
157
157
|
}, {
|
|
158
|
-
environment: "
|
|
159
|
-
bounds?: "
|
|
158
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
159
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
160
160
|
}>, {
|
|
161
|
-
environment: "
|
|
162
|
-
bounds?: "
|
|
161
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
162
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
163
163
|
}, {
|
|
164
|
-
environment: "
|
|
165
|
-
bounds?: "
|
|
164
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
165
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
166
166
|
}>;
|
|
167
167
|
export type PluginLauncherRenderDeclarationInput = z.infer<typeof pluginLauncherRenderDeclarationSchema>;
|
|
168
168
|
/**
|
|
@@ -201,17 +201,17 @@ export declare const pluginLauncherDeclarationSchema: z.ZodEffects<z.ZodObject<{
|
|
|
201
201
|
environment: z.ZodEnum<["hostInline", "hostOverlay", "hostRoute", "external", "iframe"]>;
|
|
202
202
|
bounds: z.ZodOptional<z.ZodEnum<["inline", "compact", "default", "wide", "full"]>>;
|
|
203
203
|
}, "strip", z.ZodTypeAny, {
|
|
204
|
-
environment: "
|
|
205
|
-
bounds?: "
|
|
204
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
205
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
206
206
|
}, {
|
|
207
|
-
environment: "
|
|
208
|
-
bounds?: "
|
|
207
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
208
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
209
209
|
}>, {
|
|
210
|
-
environment: "
|
|
211
|
-
bounds?: "
|
|
210
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
211
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
212
212
|
}, {
|
|
213
|
-
environment: "
|
|
214
|
-
bounds?: "
|
|
213
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
214
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
215
215
|
}>>;
|
|
216
216
|
}, "strip", z.ZodTypeAny, {
|
|
217
217
|
id: string;
|
|
@@ -227,8 +227,8 @@ export declare const pluginLauncherDeclarationSchema: z.ZodEffects<z.ZodObject<{
|
|
|
227
227
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
228
228
|
order?: number | undefined;
|
|
229
229
|
render?: {
|
|
230
|
-
environment: "
|
|
231
|
-
bounds?: "
|
|
230
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
231
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
232
232
|
} | undefined;
|
|
233
233
|
}, {
|
|
234
234
|
id: string;
|
|
@@ -244,8 +244,8 @@ export declare const pluginLauncherDeclarationSchema: z.ZodEffects<z.ZodObject<{
|
|
|
244
244
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
245
245
|
order?: number | undefined;
|
|
246
246
|
render?: {
|
|
247
|
-
environment: "
|
|
248
|
-
bounds?: "
|
|
247
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
248
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
249
249
|
} | undefined;
|
|
250
250
|
}>, {
|
|
251
251
|
id: string;
|
|
@@ -261,8 +261,8 @@ export declare const pluginLauncherDeclarationSchema: z.ZodEffects<z.ZodObject<{
|
|
|
261
261
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
262
262
|
order?: number | undefined;
|
|
263
263
|
render?: {
|
|
264
|
-
environment: "
|
|
265
|
-
bounds?: "
|
|
264
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
265
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
266
266
|
} | undefined;
|
|
267
267
|
}, {
|
|
268
268
|
id: string;
|
|
@@ -278,8 +278,8 @@ export declare const pluginLauncherDeclarationSchema: z.ZodEffects<z.ZodObject<{
|
|
|
278
278
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
279
279
|
order?: number | undefined;
|
|
280
280
|
render?: {
|
|
281
|
-
environment: "
|
|
282
|
-
bounds?: "
|
|
281
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
282
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
283
283
|
} | undefined;
|
|
284
284
|
}>;
|
|
285
285
|
export type PluginLauncherDeclarationInput = z.infer<typeof pluginLauncherDeclarationSchema>;
|
|
@@ -417,17 +417,17 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
417
417
|
environment: z.ZodEnum<["hostInline", "hostOverlay", "hostRoute", "external", "iframe"]>;
|
|
418
418
|
bounds: z.ZodOptional<z.ZodEnum<["inline", "compact", "default", "wide", "full"]>>;
|
|
419
419
|
}, "strip", z.ZodTypeAny, {
|
|
420
|
-
environment: "
|
|
421
|
-
bounds?: "
|
|
420
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
421
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
422
422
|
}, {
|
|
423
|
-
environment: "
|
|
424
|
-
bounds?: "
|
|
423
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
424
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
425
425
|
}>, {
|
|
426
|
-
environment: "
|
|
427
|
-
bounds?: "
|
|
426
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
427
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
428
428
|
}, {
|
|
429
|
-
environment: "
|
|
430
|
-
bounds?: "
|
|
429
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
430
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
431
431
|
}>>;
|
|
432
432
|
}, "strip", z.ZodTypeAny, {
|
|
433
433
|
id: string;
|
|
@@ -443,8 +443,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
443
443
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
444
444
|
order?: number | undefined;
|
|
445
445
|
render?: {
|
|
446
|
-
environment: "
|
|
447
|
-
bounds?: "
|
|
446
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
447
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
448
448
|
} | undefined;
|
|
449
449
|
}, {
|
|
450
450
|
id: string;
|
|
@@ -460,8 +460,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
460
460
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
461
461
|
order?: number | undefined;
|
|
462
462
|
render?: {
|
|
463
|
-
environment: "
|
|
464
|
-
bounds?: "
|
|
463
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
464
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
465
465
|
} | undefined;
|
|
466
466
|
}>, {
|
|
467
467
|
id: string;
|
|
@@ -477,8 +477,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
477
477
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
478
478
|
order?: number | undefined;
|
|
479
479
|
render?: {
|
|
480
|
-
environment: "
|
|
481
|
-
bounds?: "
|
|
480
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
481
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
482
482
|
} | undefined;
|
|
483
483
|
}, {
|
|
484
484
|
id: string;
|
|
@@ -494,8 +494,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
494
494
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
495
495
|
order?: number | undefined;
|
|
496
496
|
render?: {
|
|
497
|
-
environment: "
|
|
498
|
-
bounds?: "
|
|
497
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
498
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
499
499
|
} | undefined;
|
|
500
500
|
}>, "many">>;
|
|
501
501
|
ui: z.ZodOptional<z.ZodObject<{
|
|
@@ -573,17 +573,17 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
573
573
|
environment: z.ZodEnum<["hostInline", "hostOverlay", "hostRoute", "external", "iframe"]>;
|
|
574
574
|
bounds: z.ZodOptional<z.ZodEnum<["inline", "compact", "default", "wide", "full"]>>;
|
|
575
575
|
}, "strip", z.ZodTypeAny, {
|
|
576
|
-
environment: "
|
|
577
|
-
bounds?: "
|
|
576
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
577
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
578
578
|
}, {
|
|
579
|
-
environment: "
|
|
580
|
-
bounds?: "
|
|
579
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
580
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
581
581
|
}>, {
|
|
582
|
-
environment: "
|
|
583
|
-
bounds?: "
|
|
582
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
583
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
584
584
|
}, {
|
|
585
|
-
environment: "
|
|
586
|
-
bounds?: "
|
|
585
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
586
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
587
587
|
}>>;
|
|
588
588
|
}, "strip", z.ZodTypeAny, {
|
|
589
589
|
id: string;
|
|
@@ -599,8 +599,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
599
599
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
600
600
|
order?: number | undefined;
|
|
601
601
|
render?: {
|
|
602
|
-
environment: "
|
|
603
|
-
bounds?: "
|
|
602
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
603
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
604
604
|
} | undefined;
|
|
605
605
|
}, {
|
|
606
606
|
id: string;
|
|
@@ -616,8 +616,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
616
616
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
617
617
|
order?: number | undefined;
|
|
618
618
|
render?: {
|
|
619
|
-
environment: "
|
|
620
|
-
bounds?: "
|
|
619
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
620
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
621
621
|
} | undefined;
|
|
622
622
|
}>, {
|
|
623
623
|
id: string;
|
|
@@ -633,8 +633,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
633
633
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
634
634
|
order?: number | undefined;
|
|
635
635
|
render?: {
|
|
636
|
-
environment: "
|
|
637
|
-
bounds?: "
|
|
636
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
637
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
638
638
|
} | undefined;
|
|
639
639
|
}, {
|
|
640
640
|
id: string;
|
|
@@ -650,8 +650,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
650
650
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
651
651
|
order?: number | undefined;
|
|
652
652
|
render?: {
|
|
653
|
-
environment: "
|
|
654
|
-
bounds?: "
|
|
653
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
654
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
655
655
|
} | undefined;
|
|
656
656
|
}>, "many">>;
|
|
657
657
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -669,8 +669,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
669
669
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
670
670
|
order?: number | undefined;
|
|
671
671
|
render?: {
|
|
672
|
-
environment: "
|
|
673
|
-
bounds?: "
|
|
672
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
673
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
674
674
|
} | undefined;
|
|
675
675
|
}[] | undefined;
|
|
676
676
|
slots?: {
|
|
@@ -697,8 +697,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
697
697
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
698
698
|
order?: number | undefined;
|
|
699
699
|
render?: {
|
|
700
|
-
environment: "
|
|
701
|
-
bounds?: "
|
|
700
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
701
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
702
702
|
} | undefined;
|
|
703
703
|
}[] | undefined;
|
|
704
704
|
slots?: {
|
|
@@ -739,8 +739,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
739
739
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
740
740
|
order?: number | undefined;
|
|
741
741
|
render?: {
|
|
742
|
-
environment: "
|
|
743
|
-
bounds?: "
|
|
742
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
743
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
744
744
|
} | undefined;
|
|
745
745
|
}[] | undefined;
|
|
746
746
|
slots?: {
|
|
@@ -787,8 +787,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
787
787
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
788
788
|
order?: number | undefined;
|
|
789
789
|
render?: {
|
|
790
|
-
environment: "
|
|
791
|
-
bounds?: "
|
|
790
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
791
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
792
792
|
} | undefined;
|
|
793
793
|
}[] | undefined;
|
|
794
794
|
}, {
|
|
@@ -819,8 +819,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
819
819
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
820
820
|
order?: number | undefined;
|
|
821
821
|
render?: {
|
|
822
|
-
environment: "
|
|
823
|
-
bounds?: "
|
|
822
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
823
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
824
824
|
} | undefined;
|
|
825
825
|
}[] | undefined;
|
|
826
826
|
slots?: {
|
|
@@ -867,8 +867,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
867
867
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
868
868
|
order?: number | undefined;
|
|
869
869
|
render?: {
|
|
870
|
-
environment: "
|
|
871
|
-
bounds?: "
|
|
870
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
871
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
872
872
|
} | undefined;
|
|
873
873
|
}[] | undefined;
|
|
874
874
|
}>, {
|
|
@@ -899,8 +899,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
899
899
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
900
900
|
order?: number | undefined;
|
|
901
901
|
render?: {
|
|
902
|
-
environment: "
|
|
903
|
-
bounds?: "
|
|
902
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
903
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
904
904
|
} | undefined;
|
|
905
905
|
}[] | undefined;
|
|
906
906
|
slots?: {
|
|
@@ -947,8 +947,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
947
947
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
948
948
|
order?: number | undefined;
|
|
949
949
|
render?: {
|
|
950
|
-
environment: "
|
|
951
|
-
bounds?: "
|
|
950
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
951
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
952
952
|
} | undefined;
|
|
953
953
|
}[] | undefined;
|
|
954
954
|
}, {
|
|
@@ -979,8 +979,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
979
979
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
980
980
|
order?: number | undefined;
|
|
981
981
|
render?: {
|
|
982
|
-
environment: "
|
|
983
|
-
bounds?: "
|
|
982
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
983
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
984
984
|
} | undefined;
|
|
985
985
|
}[] | undefined;
|
|
986
986
|
slots?: {
|
|
@@ -1027,8 +1027,8 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1027
1027
|
entityTypes?: ("agent" | "issue" | "project" | "goal" | "run" | "comment")[] | undefined;
|
|
1028
1028
|
order?: number | undefined;
|
|
1029
1029
|
render?: {
|
|
1030
|
-
environment: "
|
|
1031
|
-
bounds?: "
|
|
1030
|
+
environment: "external" | "hostInline" | "hostOverlay" | "hostRoute" | "iframe";
|
|
1031
|
+
bounds?: "full" | "inline" | "compact" | "default" | "wide" | undefined;
|
|
1032
1032
|
} | undefined;
|
|
1033
1033
|
}[] | undefined;
|
|
1034
1034
|
}>;
|
|
@@ -201,7 +201,7 @@ export declare const createProjectSchema: z.ZodObject<{
|
|
|
201
201
|
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<["backlog", "planned", "in_progress", "completed", "cancelled"]>>>;
|
|
202
202
|
leadAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
203
203
|
targetDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
204
|
-
color: z.ZodNullable<z.ZodOptional<z.ZodString
|
|
204
|
+
color: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
205
205
|
executionWorkspacePolicy: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
206
206
|
enabled: z.ZodBoolean;
|
|
207
207
|
defaultMode: z.ZodOptional<z.ZodEnum<["shared_workspace", "isolated_workspace", "operator_branch", "adapter_default"]>>;
|
|
@@ -318,7 +318,7 @@ export declare const createProjectSchema: z.ZodObject<{
|
|
|
318
318
|
}>, "many">>;
|
|
319
319
|
archivedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
320
320
|
}, "strip", z.ZodTypeAny, {
|
|
321
|
-
status: "backlog" | "in_progress" | "cancelled" | "
|
|
321
|
+
status: "backlog" | "in_progress" | "cancelled" | "planned" | "completed";
|
|
322
322
|
name: string;
|
|
323
323
|
goalId?: string | null | undefined;
|
|
324
324
|
description?: string | null | undefined;
|
|
@@ -364,7 +364,7 @@ export declare const createProjectSchema: z.ZodObject<{
|
|
|
364
364
|
archivedAt?: string | null | undefined;
|
|
365
365
|
}, {
|
|
366
366
|
name: string;
|
|
367
|
-
status?: "backlog" | "in_progress" | "cancelled" | "
|
|
367
|
+
status?: "backlog" | "in_progress" | "cancelled" | "planned" | "completed" | undefined;
|
|
368
368
|
goalId?: string | null | undefined;
|
|
369
369
|
description?: string | null | undefined;
|
|
370
370
|
targetDate?: string | null | undefined;
|
|
@@ -417,7 +417,7 @@ export declare const updateProjectSchema: z.ZodObject<{
|
|
|
417
417
|
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<["backlog", "planned", "in_progress", "completed", "cancelled"]>>>>;
|
|
418
418
|
leadAgentId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
419
419
|
targetDate: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
420
|
-
color: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString
|
|
420
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>>;
|
|
421
421
|
executionWorkspacePolicy: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
422
422
|
enabled: z.ZodBoolean;
|
|
423
423
|
defaultMode: z.ZodOptional<z.ZodEnum<["shared_workspace", "isolated_workspace", "operator_branch", "adapter_default"]>>;
|
|
@@ -534,7 +534,7 @@ export declare const updateProjectSchema: z.ZodObject<{
|
|
|
534
534
|
}>, "many">>>;
|
|
535
535
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
536
536
|
}, "strip", z.ZodTypeAny, {
|
|
537
|
-
status?: "backlog" | "in_progress" | "cancelled" | "
|
|
537
|
+
status?: "backlog" | "in_progress" | "cancelled" | "planned" | "completed" | undefined;
|
|
538
538
|
goalId?: string | null | undefined;
|
|
539
539
|
description?: string | null | undefined;
|
|
540
540
|
name?: string | undefined;
|
|
@@ -579,7 +579,7 @@ export declare const updateProjectSchema: z.ZodObject<{
|
|
|
579
579
|
}[] | undefined;
|
|
580
580
|
archivedAt?: string | null | undefined;
|
|
581
581
|
}, {
|
|
582
|
-
status?: "backlog" | "in_progress" | "cancelled" | "
|
|
582
|
+
status?: "backlog" | "in_progress" | "cancelled" | "planned" | "completed" | undefined;
|
|
583
583
|
goalId?: string | null | undefined;
|
|
584
584
|
description?: string | null | undefined;
|
|
585
585
|
name?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/validators/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavC,CAAC;
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/validators/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavC,CAAC;AAsDZ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGD,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AAEb,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAkBlF,eAAO,MAAM,mBAAmB;IAf9B,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBtC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { PROJECT_STATUSES } from "../constants.js";
|
|
2
|
+
import { PROJECT_COLORS, PROJECT_STATUSES } from "../constants.js";
|
|
3
3
|
import { createProjectInlineResourceSchema, projectResourceAttachmentInputSchema, } from "./resource.js";
|
|
4
4
|
const executionWorkspaceStrategySchema = z
|
|
5
5
|
.object({
|
|
@@ -42,6 +42,9 @@ const projectWorkspaceFields = {
|
|
|
42
42
|
sharedWorkspaceKey: z.string().optional().nullable(),
|
|
43
43
|
metadata: z.record(z.unknown()).optional().nullable(),
|
|
44
44
|
};
|
|
45
|
+
const projectColorValues = new Set(PROJECT_COLORS);
|
|
46
|
+
const legacyProjectColorSchema = z.string().regex(/^#[0-9a-fA-F]{6}$/);
|
|
47
|
+
const projectColorSchema = z.string().refine((value) => legacyProjectColorSchema.safeParse(value).success || projectColorValues.has(value), "Color must be a 6-digit hex value or a supported project gradient");
|
|
45
48
|
function validateProjectWorkspace(value, ctx) {
|
|
46
49
|
const sourceType = value.sourceType ?? "local_path";
|
|
47
50
|
const hasCwd = typeof value.cwd === "string" && value.cwd.trim().length > 0;
|
|
@@ -82,7 +85,7 @@ const projectFields = {
|
|
|
82
85
|
status: z.enum(PROJECT_STATUSES).optional().default("backlog"),
|
|
83
86
|
leadAgentId: z.string().uuid().optional().nullable(),
|
|
84
87
|
targetDate: z.string().optional().nullable(),
|
|
85
|
-
color:
|
|
88
|
+
color: projectColorSchema.optional().nullable(),
|
|
86
89
|
executionWorkspacePolicy: projectExecutionWorkspacePolicySchema.optional().nullable(),
|
|
87
90
|
resourceAttachments: z.array(projectResourceAttachmentInputSchema).optional(),
|
|
88
91
|
newResources: z.array(createProjectInlineResourceSchema).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/validators/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/validators/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,eAAe,CAAC;AAEvB,MAAM,gCAAgC,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChG,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,cAAc,EAAE,CAAC,CA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E,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;IAC9D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACpD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,kBAAkB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC/C,wBAAwB,EAAE,qCAAqC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACrF,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,QAAQ,EAAE;IAC7E,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;IACnE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACxD,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,GAAG,aAAa;CACjB,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.test.d.ts","sourceRoot":"","sources":["../../src/validators/project.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { PROJECT_COLORS } from "../constants.js";
|
|
3
|
+
import { createProjectSchema, updateProjectSchema } from "./project.js";
|
|
4
|
+
describe("project validators", () => {
|
|
5
|
+
it("accepts supported gradient project colors", () => {
|
|
6
|
+
expect(createProjectSchema.parse({
|
|
7
|
+
name: "Gradient project",
|
|
8
|
+
color: PROJECT_COLORS[0],
|
|
9
|
+
}).color).toBe(PROJECT_COLORS[0]);
|
|
10
|
+
});
|
|
11
|
+
it("keeps legacy hex project colors valid", () => {
|
|
12
|
+
expect(updateProjectSchema.parse({ color: "#336699" }).color).toBe("#336699");
|
|
13
|
+
});
|
|
14
|
+
it("rejects arbitrary CSS color payloads", () => {
|
|
15
|
+
expect(() => updateProjectSchema.parse({ color: "url(https://example.com/color.png)" })).toThrow();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=project.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.test.js","sourceRoot":"","sources":["../../src/validators/project.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC;YAC/B,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;SACzB,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC9C,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,oCAAoC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACrG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const workspaceBackupTriggerSourceSchema: z.ZodEnum<["manual", "scheduled", "pre_restore"]>;
|
|
3
|
+
export declare const createWorkspaceBackupSchema: z.ZodObject<{
|
|
4
|
+
triggerSource: z.ZodDefault<z.ZodOptional<z.ZodEnum<["manual", "scheduled", "pre_restore"]>>>;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
triggerSource: "manual" | "scheduled" | "pre_restore";
|
|
7
|
+
}, {
|
|
8
|
+
triggerSource?: "manual" | "scheduled" | "pre_restore" | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const restoreWorkspaceBackupSchema: z.ZodObject<{
|
|
11
|
+
confirm: z.ZodLiteral<true>;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
confirm: true;
|
|
14
|
+
}, {
|
|
15
|
+
confirm: true;
|
|
16
|
+
}>;
|
|
17
|
+
export type CreateWorkspaceBackup = z.infer<typeof createWorkspaceBackupSchema>;
|
|
18
|
+
export type RestoreWorkspaceBackup = z.infer<typeof restoreWorkspaceBackupSchema>;
|
|
19
|
+
//# sourceMappingURL=workspace-backup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-backup.d.ts","sourceRoot":"","sources":["../../src/validators/workspace-backup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kCAAkC,mDAAiD,CAAC;AAEjG,eAAO,MAAM,2BAA2B;;;;;;EAE7B,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;EAE9B,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const workspaceBackupTriggerSourceSchema = z.enum(["manual", "scheduled", "pre_restore"]);
|
|
3
|
+
export const createWorkspaceBackupSchema = z.object({
|
|
4
|
+
triggerSource: workspaceBackupTriggerSourceSchema.optional().default("manual"),
|
|
5
|
+
}).strict();
|
|
6
|
+
export const restoreWorkspaceBackupSchema = z.object({
|
|
7
|
+
confirm: z.literal(true),
|
|
8
|
+
}).strict();
|
|
9
|
+
//# sourceMappingURL=workspace-backup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-backup.js","sourceRoot":"","sources":["../../src/validators/workspace-backup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;AAEjG,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,aAAa,EAAE,kCAAkC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;CAC/E,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CACzB,CAAC,CAAC,MAAM,EAAE,CAAC"}
|