evo360-types 1.3.38 → 1.3.40
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/apps/evo-activity/zod-schemas.d.ts +6 -6
- package/dist/apps/evo-activity/zod-schemas.js +8 -10
- package/dist/apps/evo-activity/zod-schemas.ts +1 -2
- package/dist/apps/evo-med/procedure/zod-schemas.d.ts +2 -2
- package/dist/apps/evo-survey/zod-schemas.d.ts +21 -21
- package/dist/apps/shared/zod-schemas.d.ts +1 -1
- package/dist/apps/shared/zod-schemas.js +2 -2
- package/dist/apps/shared/zod-schemas.ts +2 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.ts +0 -2
- package/dist/types/evo-activity/index.d.ts +1 -2
- package/dist/types/evo-activity/index.ts +1 -3
- package/dist/types/shared/index.d.ts +4 -5
- package/dist/types/shared/index.js +2 -3
- package/dist/types/shared/index.ts +6 -7
- package/package.json +1 -1
- package/dist/apps/evo-cake/zod-schemas.d.ts +0 -783
- package/dist/apps/evo-cake/zod-schemas.js +0 -110
- package/dist/apps/evo-cake/zod-schemas.ts +0 -121
- package/dist/apps/evo-calendar/zod-schemas.d.ts +0 -71
- package/dist/apps/evo-calendar/zod-schemas.js +0 -32
- package/dist/apps/evo-calendar/zod-schemas.ts +0 -33
- package/dist/apps/evo-meeting/zod-schemas.d.ts +0 -429
- package/dist/apps/evo-meeting/zod-schemas.js +0 -56
- package/dist/apps/evo-meeting/zod-schemas.ts +0 -62
- package/dist/types/evo-cake/fb_collections.d.ts +0 -4
- package/dist/types/evo-cake/fb_collections.js +0 -9
- package/dist/types/evo-cake/fb_collections.ts +0 -7
- package/dist/types/evo-cake/index.d.ts +0 -111
- package/dist/types/evo-cake/index.js +0 -79
- package/dist/types/evo-cake/index.ts +0 -186
- package/dist/types/evo-calendar/fb_collections.d.ts +0 -2
- package/dist/types/evo-calendar/fb_collections.js +0 -7
- package/dist/types/evo-calendar/fb_collections.ts +0 -5
- package/dist/types/evo-calendar/index.d.ts +0 -54
- package/dist/types/evo-calendar/index.js +0 -37
- package/dist/types/evo-calendar/index.ts +0 -67
- package/dist/types/evo-meeting/fb_collections.d.ts +0 -2
- package/dist/types/evo-meeting/fb_collections.js +0 -7
- package/dist/types/evo-meeting/fb_collections.ts +0 -5
- package/dist/types/evo-meeting/index.d.ts +0 -58
- package/dist/types/evo-meeting/index.js +0 -32
- package/dist/types/evo-meeting/index.ts +0 -80
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zStructuredDataAssetSchema = exports.zNoteAssetSchema = exports.zMeetingAssetSchema = exports.zCalendarEventAssetSchema = exports.zFileAssetSchema = exports.zBaseAssetSchema = exports.zCakeDocSchema = exports.zCakeSchema = exports.zAssetProcessingStatusSchema = exports.zAssetTypeSchema = exports.zCakeStatusSchema = exports.zCakePermissionSchema = exports.zCakeAssetActionSchema = exports.zCakeActionSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
|
-
exports.zCakeActionSchema = zod_1.z.enum([
|
|
7
|
-
"CREATE_SURVEY",
|
|
8
|
-
"DELETE_SURVEY",
|
|
9
|
-
"UPDATE_SURVEY",
|
|
10
|
-
"SHARE_SURVEY",
|
|
11
|
-
]);
|
|
12
|
-
exports.zCakeAssetActionSchema = zod_1.z.enum([
|
|
13
|
-
"CREATE_CAKE_ASSET",
|
|
14
|
-
"DELETE_CAKE_ASSET",
|
|
15
|
-
"UPDATE_CAKE_ASSET",
|
|
16
|
-
"PROCESS_CAKE_ASSET",
|
|
17
|
-
"CLASSIFY_CAKE_ASSET",
|
|
18
|
-
"EXTRACT_TEXT_CAKE_ASSET",
|
|
19
|
-
"OCR_CAKE_ASSET",
|
|
20
|
-
"METADATA_EXTRACTION_CAKE_ASSET",
|
|
21
|
-
"UPDATE_RELEVANCE_SCORE_CAKE_ASSET",
|
|
22
|
-
"UPDATE_ASSET_STATUS_CAKE_ASSET",
|
|
23
|
-
"UPDATE_ASSET_TAGS_CAKE_ASSET",
|
|
24
|
-
"PROCESS_CAKE_ASSET_FAILED",
|
|
25
|
-
"CLASSIFY_CAKE_ASSET_FAILED",
|
|
26
|
-
"EXTRACT_TEXT_CAKE_ASSET_FAILED",
|
|
27
|
-
"STORE_CAKE_ASSET",
|
|
28
|
-
"RETRIEVE_CAKE_ASSET",
|
|
29
|
-
]);
|
|
30
|
-
exports.zCakePermissionSchema = zod_1.z.enum(["private", "tenant", "public"]);
|
|
31
|
-
exports.zCakeStatusSchema = zod_1.z.enum(["active", "archived"]);
|
|
32
|
-
exports.zAssetTypeSchema = zod_1.z.enum([
|
|
33
|
-
"file",
|
|
34
|
-
"event",
|
|
35
|
-
"meeting",
|
|
36
|
-
"note",
|
|
37
|
-
"data",
|
|
38
|
-
]);
|
|
39
|
-
exports.zAssetProcessingStatusSchema = zod_1.z.enum([
|
|
40
|
-
"waiting",
|
|
41
|
-
"started",
|
|
42
|
-
"done",
|
|
43
|
-
"failed",
|
|
44
|
-
]);
|
|
45
|
-
exports.zCakeSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
46
|
-
.extend({
|
|
47
|
-
name: zod_1.z.string().min(1).max(255),
|
|
48
|
-
description: zod_1.z.string().max(2048).optional(),
|
|
49
|
-
status: exports.zCakeStatusSchema.optional(),
|
|
50
|
-
permission: exports.zCakePermissionSchema.optional(),
|
|
51
|
-
//assets: z.array(zCakeAssetSchema).nullable().optional(),
|
|
52
|
-
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
53
|
-
})
|
|
54
|
-
.passthrough();
|
|
55
|
-
// Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus -
|
|
56
|
-
exports.zCakeDocSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
57
|
-
.extend({
|
|
58
|
-
name: zod_1.z.string(),
|
|
59
|
-
description: zod_1.z.string().max(2048).optional(),
|
|
60
|
-
content: zod_1.z.string().nullable().optional(),
|
|
61
|
-
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
62
|
-
})
|
|
63
|
-
.passthrough();
|
|
64
|
-
// Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset -----
|
|
65
|
-
// Base schema for all assets
|
|
66
|
-
exports.zBaseAssetSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
67
|
-
.extend({
|
|
68
|
-
cakeId: zod_1.z.string(),
|
|
69
|
-
type: exports.zAssetTypeSchema,
|
|
70
|
-
relevance_score: zod_1.z.number().min(0).max(1), // Relevance score between 0 and 1
|
|
71
|
-
structured_data: (0, zod_1.any)().optional(),
|
|
72
|
-
embeddings: zod_1.z.array(zod_1.z.number()).optional(), // Array of numbers for embeddings
|
|
73
|
-
metadata: zod_1.z.record(zod_1.z.any()).optional(), // Additional metadata
|
|
74
|
-
processing_status: exports.zAssetProcessingStatusSchema.optional(), // Optional processing status
|
|
75
|
-
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
76
|
-
})
|
|
77
|
-
.passthrough();
|
|
78
|
-
// Schema for file assets
|
|
79
|
-
exports.zFileAssetSchema = exports.zBaseAssetSchema.extend({
|
|
80
|
-
file_name: zod_1.z.string(),
|
|
81
|
-
file_type: zod_1.z.string(),
|
|
82
|
-
storage_location: zod_1.z.string(),
|
|
83
|
-
download_url: zod_1.z.string(),
|
|
84
|
-
extracted_text: zod_1.z.string().optional(),
|
|
85
|
-
});
|
|
86
|
-
// Schema for calendar event assets
|
|
87
|
-
exports.zCalendarEventAssetSchema = exports.zBaseAssetSchema.extend({
|
|
88
|
-
title: zod_1.z.string(),
|
|
89
|
-
date: zod_1.z.date(),
|
|
90
|
-
start_time: zod_1.z.date().optional(),
|
|
91
|
-
end_time: zod_1.z.date().optional(),
|
|
92
|
-
location: zod_1.z.string().optional(),
|
|
93
|
-
participants: zod_1.z.array(zod_1.z.string()).optional(),
|
|
94
|
-
description: zod_1.z.string().optional(),
|
|
95
|
-
});
|
|
96
|
-
// Schema for meeting assets
|
|
97
|
-
exports.zMeetingAssetSchema = exports.zCalendarEventAssetSchema.extend({
|
|
98
|
-
agenda: zod_1.z.string().optional(),
|
|
99
|
-
notes: zod_1.z.string().optional(),
|
|
100
|
-
});
|
|
101
|
-
// Schema for note assets
|
|
102
|
-
exports.zNoteAssetSchema = exports.zBaseAssetSchema.extend({
|
|
103
|
-
title: zod_1.z.string().optional(),
|
|
104
|
-
content: zod_1.z.string(),
|
|
105
|
-
});
|
|
106
|
-
// Schema for structured data assets
|
|
107
|
-
exports.zStructuredDataAssetSchema = exports.zBaseAssetSchema.extend({
|
|
108
|
-
data: (0, zod_1.any)().optional(),
|
|
109
|
-
schema: zod_1.z.string().optional(),
|
|
110
|
-
});
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { any, z } from "zod";
|
|
2
|
-
import { zFireDocSchema, zTagSchema } from "../shared/zod-schemas";
|
|
3
|
-
|
|
4
|
-
export const zCakeActionSchema = z.enum([
|
|
5
|
-
"CREATE_SURVEY",
|
|
6
|
-
"DELETE_SURVEY",
|
|
7
|
-
"UPDATE_SURVEY",
|
|
8
|
-
"SHARE_SURVEY",
|
|
9
|
-
]);
|
|
10
|
-
|
|
11
|
-
export const zCakeAssetActionSchema = z.enum([
|
|
12
|
-
"CREATE_CAKE_ASSET",
|
|
13
|
-
"DELETE_CAKE_ASSET",
|
|
14
|
-
"UPDATE_CAKE_ASSET",
|
|
15
|
-
"PROCESS_CAKE_ASSET",
|
|
16
|
-
"CLASSIFY_CAKE_ASSET",
|
|
17
|
-
"EXTRACT_TEXT_CAKE_ASSET",
|
|
18
|
-
"OCR_CAKE_ASSET",
|
|
19
|
-
"METADATA_EXTRACTION_CAKE_ASSET",
|
|
20
|
-
"UPDATE_RELEVANCE_SCORE_CAKE_ASSET",
|
|
21
|
-
"UPDATE_ASSET_STATUS_CAKE_ASSET",
|
|
22
|
-
"UPDATE_ASSET_TAGS_CAKE_ASSET",
|
|
23
|
-
"PROCESS_CAKE_ASSET_FAILED",
|
|
24
|
-
"CLASSIFY_CAKE_ASSET_FAILED",
|
|
25
|
-
"EXTRACT_TEXT_CAKE_ASSET_FAILED",
|
|
26
|
-
"STORE_CAKE_ASSET",
|
|
27
|
-
"RETRIEVE_CAKE_ASSET",
|
|
28
|
-
]);
|
|
29
|
-
|
|
30
|
-
export const zCakePermissionSchema = z.enum(["private", "tenant", "public"]);
|
|
31
|
-
|
|
32
|
-
export const zCakeStatusSchema = z.enum(["active", "archived"]);
|
|
33
|
-
|
|
34
|
-
export const zAssetTypeSchema = z.enum([
|
|
35
|
-
"file",
|
|
36
|
-
"event",
|
|
37
|
-
"meeting",
|
|
38
|
-
"note",
|
|
39
|
-
"data",
|
|
40
|
-
]);
|
|
41
|
-
|
|
42
|
-
export const zAssetProcessingStatusSchema = z.enum([
|
|
43
|
-
"waiting",
|
|
44
|
-
"started",
|
|
45
|
-
"done",
|
|
46
|
-
"failed",
|
|
47
|
-
]);
|
|
48
|
-
|
|
49
|
-
export const zCakeSchema = zFireDocSchema // Extend from FireDocSchema
|
|
50
|
-
.extend({
|
|
51
|
-
name: z.string().min(1).max(255),
|
|
52
|
-
description: z.string().max(2048).optional(),
|
|
53
|
-
status: zCakeStatusSchema.optional(),
|
|
54
|
-
permission: zCakePermissionSchema.optional(),
|
|
55
|
-
//assets: z.array(zCakeAssetSchema).nullable().optional(),
|
|
56
|
-
tags: z.array(zTagSchema).nullable().optional(),
|
|
57
|
-
})
|
|
58
|
-
.passthrough();
|
|
59
|
-
|
|
60
|
-
// Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus - Consensus -
|
|
61
|
-
export const zCakeDocSchema = zFireDocSchema // Extend from FireDocSchema
|
|
62
|
-
.extend({
|
|
63
|
-
name: z.string(),
|
|
64
|
-
description: z.string().max(2048).optional(),
|
|
65
|
-
content: z.string().nullable().optional(),
|
|
66
|
-
tags: z.array(zTagSchema).nullable().optional(),
|
|
67
|
-
})
|
|
68
|
-
.passthrough();
|
|
69
|
-
|
|
70
|
-
// Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset ----- Asset -----
|
|
71
|
-
// Base schema for all assets
|
|
72
|
-
export const zBaseAssetSchema = zFireDocSchema // Extend from FireDocSchema
|
|
73
|
-
.extend({
|
|
74
|
-
cakeId: z.string(),
|
|
75
|
-
type: zAssetTypeSchema,
|
|
76
|
-
relevance_score: z.number().min(0).max(1), // Relevance score between 0 and 1
|
|
77
|
-
structured_data: any().optional(),
|
|
78
|
-
embeddings: z.array(z.number()).optional(), // Array of numbers for embeddings
|
|
79
|
-
metadata: z.record(z.any()).optional(), // Additional metadata
|
|
80
|
-
processing_status: zAssetProcessingStatusSchema.optional(), // Optional processing status
|
|
81
|
-
tags: z.array(zTagSchema).nullable().optional(),
|
|
82
|
-
})
|
|
83
|
-
.passthrough();
|
|
84
|
-
|
|
85
|
-
// Schema for file assets
|
|
86
|
-
export const zFileAssetSchema = zBaseAssetSchema.extend({
|
|
87
|
-
file_name: z.string(),
|
|
88
|
-
file_type: z.string(),
|
|
89
|
-
storage_location: z.string(),
|
|
90
|
-
download_url: z.string(),
|
|
91
|
-
extracted_text: z.string().optional(),
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// Schema for calendar event assets
|
|
95
|
-
export const zCalendarEventAssetSchema = zBaseAssetSchema.extend({
|
|
96
|
-
title: z.string(),
|
|
97
|
-
date: z.date(),
|
|
98
|
-
start_time: z.date().optional(),
|
|
99
|
-
end_time: z.date().optional(),
|
|
100
|
-
location: z.string().optional(),
|
|
101
|
-
participants: z.array(z.string()).optional(),
|
|
102
|
-
description: z.string().optional(),
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// Schema for meeting assets
|
|
106
|
-
export const zMeetingAssetSchema = zCalendarEventAssetSchema.extend({
|
|
107
|
-
agenda: z.string().optional(),
|
|
108
|
-
notes: z.string().optional(),
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
// Schema for note assets
|
|
112
|
-
export const zNoteAssetSchema = zBaseAssetSchema.extend({
|
|
113
|
-
title: z.string().optional(),
|
|
114
|
-
content: z.string(),
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// Schema for structured data assets
|
|
118
|
-
export const zStructuredDataAssetSchema = zBaseAssetSchema.extend({
|
|
119
|
-
data: any().optional(),
|
|
120
|
-
schema: z.string().optional(),
|
|
121
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const zCalendarActionSchema: z.ZodEnum<["CREATE_EVENT", "DELETE_EVENT", "UPDATE_EVENT"]>;
|
|
3
|
-
export declare const zCalendarEventStatusSchema: z.ZodEnum<["scheduled", "completed", "cancelled"]>;
|
|
4
|
-
export declare const zCalendarEventTypeSchema: z.ZodEnum<["event", "meeting", "workshop", "other"]>;
|
|
5
|
-
export declare const zEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
6
|
-
id: z.ZodString;
|
|
7
|
-
ref: z.ZodAny;
|
|
8
|
-
tenant: z.ZodString;
|
|
9
|
-
model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
11
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
12
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
13
|
-
}, {
|
|
14
|
-
title: z.ZodString;
|
|
15
|
-
description: z.ZodOptional<z.ZodString>;
|
|
16
|
-
creatorName: z.ZodString;
|
|
17
|
-
creatorRef: z.ZodAny;
|
|
18
|
-
eventType: z.ZodEnum<["event", "meeting", "workshop", "other"]>;
|
|
19
|
-
eventStatus: z.ZodEnum<["scheduled", "completed", "cancelled"]>;
|
|
20
|
-
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
21
|
-
name: z.ZodString;
|
|
22
|
-
color: z.ZodOptional<z.ZodString>;
|
|
23
|
-
hidden: z.ZodBoolean;
|
|
24
|
-
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
name: string;
|
|
26
|
-
hidden: boolean;
|
|
27
|
-
color?: string | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
name: string;
|
|
30
|
-
hidden: boolean;
|
|
31
|
-
color?: string | undefined;
|
|
32
|
-
}>, "many">>>;
|
|
33
|
-
}>, "strip", z.ZodTypeAny, {
|
|
34
|
-
id: string;
|
|
35
|
-
tenant: string;
|
|
36
|
-
model_ver: number;
|
|
37
|
-
title: string;
|
|
38
|
-
creatorName: string;
|
|
39
|
-
eventType: "event" | "meeting" | "workshop" | "other";
|
|
40
|
-
eventStatus: "scheduled" | "completed" | "cancelled";
|
|
41
|
-
ref?: any;
|
|
42
|
-
created_at?: Date | null | undefined;
|
|
43
|
-
updated_at?: Date | null | undefined;
|
|
44
|
-
deleted_at?: Date | null | undefined;
|
|
45
|
-
description?: string | undefined;
|
|
46
|
-
creatorRef?: any;
|
|
47
|
-
tags?: {
|
|
48
|
-
name: string;
|
|
49
|
-
hidden: boolean;
|
|
50
|
-
color?: string | undefined;
|
|
51
|
-
}[] | null | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
id: string;
|
|
54
|
-
tenant: string;
|
|
55
|
-
title: string;
|
|
56
|
-
creatorName: string;
|
|
57
|
-
eventType: "event" | "meeting" | "workshop" | "other";
|
|
58
|
-
eventStatus: "scheduled" | "completed" | "cancelled";
|
|
59
|
-
ref?: any;
|
|
60
|
-
model_ver?: number | undefined;
|
|
61
|
-
created_at?: Date | null | undefined;
|
|
62
|
-
updated_at?: Date | null | undefined;
|
|
63
|
-
deleted_at?: Date | null | undefined;
|
|
64
|
-
description?: string | undefined;
|
|
65
|
-
creatorRef?: any;
|
|
66
|
-
tags?: {
|
|
67
|
-
name: string;
|
|
68
|
-
hidden: boolean;
|
|
69
|
-
color?: string | undefined;
|
|
70
|
-
}[] | null | undefined;
|
|
71
|
-
}>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zEventSchema = exports.zCalendarEventTypeSchema = exports.zCalendarEventStatusSchema = exports.zCalendarActionSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
|
-
exports.zCalendarActionSchema = zod_1.z.enum([
|
|
7
|
-
"CREATE_EVENT",
|
|
8
|
-
"DELETE_EVENT",
|
|
9
|
-
"UPDATE_EVENT",
|
|
10
|
-
]);
|
|
11
|
-
// Enum for Event Instance Status
|
|
12
|
-
exports.zCalendarEventStatusSchema = zod_1.z.enum([
|
|
13
|
-
"scheduled",
|
|
14
|
-
"completed",
|
|
15
|
-
"cancelled",
|
|
16
|
-
]);
|
|
17
|
-
exports.zCalendarEventTypeSchema = zod_1.z.enum([
|
|
18
|
-
"event",
|
|
19
|
-
"meeting",
|
|
20
|
-
"workshop",
|
|
21
|
-
"other",
|
|
22
|
-
]);
|
|
23
|
-
exports.zEventSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
24
|
-
.extend({
|
|
25
|
-
title: zod_1.z.string(),
|
|
26
|
-
description: zod_1.z.string().optional(),
|
|
27
|
-
creatorName: zod_1.z.string(),
|
|
28
|
-
creatorRef: zod_1.z.any(),
|
|
29
|
-
eventType: exports.zCalendarEventTypeSchema,
|
|
30
|
-
eventStatus: exports.zCalendarEventStatusSchema,
|
|
31
|
-
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
32
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { zFireDocSchema, zTagSchema } from "../shared/zod-schemas";
|
|
3
|
-
|
|
4
|
-
export const zCalendarActionSchema = z.enum([
|
|
5
|
-
"CREATE_EVENT",
|
|
6
|
-
"DELETE_EVENT",
|
|
7
|
-
"UPDATE_EVENT",
|
|
8
|
-
]);
|
|
9
|
-
|
|
10
|
-
// Enum for Event Instance Status
|
|
11
|
-
export const zCalendarEventStatusSchema = z.enum([
|
|
12
|
-
"scheduled",
|
|
13
|
-
"completed",
|
|
14
|
-
"cancelled",
|
|
15
|
-
]);
|
|
16
|
-
|
|
17
|
-
export const zCalendarEventTypeSchema = z.enum([
|
|
18
|
-
"event",
|
|
19
|
-
"meeting",
|
|
20
|
-
"workshop",
|
|
21
|
-
"other",
|
|
22
|
-
]);
|
|
23
|
-
|
|
24
|
-
export const zEventSchema = zFireDocSchema // Extend from FireDocSchema
|
|
25
|
-
.extend({
|
|
26
|
-
title: z.string(),
|
|
27
|
-
description: z.string().optional(),
|
|
28
|
-
creatorName: z.string(),
|
|
29
|
-
creatorRef: z.any(),
|
|
30
|
-
eventType: zCalendarEventTypeSchema,
|
|
31
|
-
eventStatus: zCalendarEventStatusSchema,
|
|
32
|
-
tags: z.array(zTagSchema).nullable().optional(),
|
|
33
|
-
});
|