@headless-lms/server 0.4.0 → 0.6.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/README.md +14 -0
- package/dist/app/community-mail.d.ts +5 -3
- package/dist/app/community-mail.js +60 -12
- package/dist/app/community-mail.js.map +1 -1
- package/dist/app/container.d.ts +24 -3
- package/dist/app/container.js +102 -38
- package/dist/app/container.js.map +1 -1
- package/dist/app/notification-channels.js +1 -0
- package/dist/app/notification-channels.js.map +1 -1
- package/dist/app/notification-reads.d.ts +3 -3
- package/dist/app/notification-reads.js +7 -28
- package/dist/app/notification-reads.js.map +1 -1
- package/dist/app/platform.d.ts +14 -0
- package/dist/app/platform.js +14 -0
- package/dist/app/platform.js.map +1 -0
- package/dist/http/config.d.ts +4 -0
- package/dist/http/errors.js +9 -4
- package/dist/http/errors.js.map +1 -1
- package/dist/http/fastify.d.ts +8 -0
- package/dist/http/mcp/catalogue.d.ts +11 -9
- package/dist/http/mcp/catalogue.js +15 -21
- package/dist/http/mcp/catalogue.js.map +1 -1
- package/dist/http/mcp/challenge.js +3 -3
- package/dist/http/mcp/challenge.js.map +1 -1
- package/dist/http/mcp/route.js +7 -7
- package/dist/http/mcp/route.js.map +1 -1
- package/dist/http/mcp/test-support.d.ts +6 -5
- package/dist/http/mcp/test-support.js +32 -11
- package/dist/http/mcp/test-support.js.map +1 -1
- package/dist/http/mcp/tool.d.ts +3 -9
- package/dist/http/mcp/tool.js +14 -6
- package/dist/http/mcp/tool.js.map +1 -1
- package/dist/http/mcp/tools/automations.js +10 -20
- package/dist/http/mcp/tools/automations.js.map +1 -1
- package/dist/http/mcp/tools/catalog.js +25 -42
- package/dist/http/mcp/tools/catalog.js.map +1 -1
- package/dist/http/mcp/tools/comments.js +9 -19
- package/dist/http/mcp/tools/comments.js.map +1 -1
- package/dist/http/mcp/tools/communities.js +17 -32
- package/dist/http/mcp/tools/communities.js.map +1 -1
- package/dist/http/mcp/tools/community-members.js +9 -16
- package/dist/http/mcp/tools/community-members.js.map +1 -1
- package/dist/http/mcp/tools/community-moderation.js +13 -25
- package/dist/http/mcp/tools/community-moderation.js.map +1 -1
- package/dist/http/mcp/tools/courses.js +11 -21
- package/dist/http/mcp/tools/courses.js.map +1 -1
- package/dist/http/mcp/tools/events.d.ts +6 -0
- package/dist/http/mcp/tools/events.js +170 -0
- package/dist/http/mcp/tools/events.js.map +1 -0
- package/dist/http/mcp/tools/index.d.ts +5 -1
- package/dist/http/mcp/tools/index.js +45 -10
- package/dist/http/mcp/tools/index.js.map +1 -1
- package/dist/http/mcp/tools/organization.d.ts +6 -0
- package/dist/http/mcp/tools/organization.js +214 -0
- package/dist/http/mcp/tools/organization.js.map +1 -0
- package/dist/http/mcp/tools/people.js +30 -49
- package/dist/http/mcp/tools/people.js.map +1 -1
- package/dist/http/plugins/auth.js +37 -8
- package/dist/http/plugins/auth.js.map +1 -1
- package/dist/http/plugins/error-handler.d.ts +5 -1
- package/dist/http/plugins/error-handler.js +10 -2
- package/dist/http/plugins/error-handler.js.map +1 -1
- package/dist/http/plugins/openapi.js +18 -2
- package/dist/http/plugins/openapi.js.map +1 -1
- package/dist/http/plugins/platform.d.ts +7 -0
- package/dist/http/plugins/platform.js +13 -0
- package/dist/http/plugins/platform.js.map +1 -0
- package/dist/http/routes/access.js +54 -36
- package/dist/http/routes/access.js.map +1 -1
- package/dist/http/routes/activities.js +45 -45
- package/dist/http/routes/activities.js.map +1 -1
- package/dist/http/routes/assets.js +30 -65
- package/dist/http/routes/assets.js.map +1 -1
- package/dist/http/routes/automations.js +37 -42
- package/dist/http/routes/automations.js.map +1 -1
- package/dist/http/routes/bundles.js +33 -36
- package/dist/http/routes/bundles.js.map +1 -1
- package/dist/http/routes/communities.js +93 -145
- package/dist/http/routes/communities.js.map +1 -1
- package/dist/http/routes/community-moderation.js +83 -137
- package/dist/http/routes/community-moderation.js.map +1 -1
- package/dist/http/routes/course-analytics.js +32 -15
- package/dist/http/routes/course-analytics.js.map +1 -1
- package/dist/http/routes/courses.js +25 -32
- package/dist/http/routes/courses.js.map +1 -1
- package/dist/http/routes/dashboard.js +9 -9
- package/dist/http/routes/dashboard.js.map +1 -1
- package/dist/http/routes/discussion.js +21 -39
- package/dist/http/routes/discussion.js.map +1 -1
- package/dist/http/routes/downloads.js +41 -47
- package/dist/http/routes/downloads.js.map +1 -1
- package/dist/http/routes/entitlements.js +19 -23
- package/dist/http/routes/entitlements.js.map +1 -1
- package/dist/http/routes/events.d.ts +7 -0
- package/dist/http/routes/events.js +333 -0
- package/dist/http/routes/events.js.map +1 -0
- package/dist/http/routes/integrations.js +40 -73
- package/dist/http/routes/integrations.js.map +1 -1
- package/dist/http/routes/member/assets.js +10 -13
- package/dist/http/routes/member/assets.js.map +1 -1
- package/dist/http/routes/member/chats.js +170 -47
- package/dist/http/routes/member/chats.js.map +1 -1
- package/dist/http/routes/member/comments.js +65 -26
- package/dist/http/routes/member/comments.js.map +1 -1
- package/dist/http/routes/member/community.js +45 -52
- package/dist/http/routes/member/community.js.map +1 -1
- package/dist/http/routes/member/courses.js +12 -19
- package/dist/http/routes/member/courses.js.map +1 -1
- package/dist/http/routes/member/devices.js +9 -10
- package/dist/http/routes/member/devices.js.map +1 -1
- package/dist/http/routes/member/downloads.js +6 -9
- package/dist/http/routes/member/downloads.js.map +1 -1
- package/dist/http/routes/member/events.d.ts +7 -0
- package/dist/http/routes/member/events.js +386 -0
- package/dist/http/routes/member/events.js.map +1 -0
- package/dist/http/routes/member/files.js +88 -46
- package/dist/http/routes/member/files.js.map +1 -1
- package/dist/http/routes/member/index.js +2 -0
- package/dist/http/routes/member/index.js.map +1 -1
- package/dist/http/routes/member/notification-settings.js +15 -23
- package/dist/http/routes/member/notification-settings.js.map +1 -1
- package/dist/http/routes/member/notifications.js +16 -16
- package/dist/http/routes/member/notifications.js.map +1 -1
- package/dist/http/routes/member/org.js +5 -15
- package/dist/http/routes/member/org.js.map +1 -1
- package/dist/http/routes/member/posts.js +67 -68
- package/dist/http/routes/member/posts.js.map +1 -1
- package/dist/http/routes/member/profile.js +15 -6
- package/dist/http/routes/member/profile.js.map +1 -1
- package/dist/http/routes/member/progress.js +7 -11
- package/dist/http/routes/member/progress.js.map +1 -1
- package/dist/http/routes/organizations.js +319 -135
- package/dist/http/routes/organizations.js.map +1 -1
- package/dist/http/routes/platform.d.ts +7 -0
- package/dist/http/routes/platform.js +61 -0
- package/dist/http/routes/platform.js.map +1 -0
- package/dist/http/routes/students.js +12 -75
- package/dist/http/routes/students.js.map +1 -1
- package/dist/http/routes/webhooks.js +30 -39
- package/dist/http/routes/webhooks.js.map +1 -1
- package/dist/http/routes.js +9 -0
- package/dist/http/routes.js.map +1 -1
- package/dist/http/schemas/access.d.ts +346 -64
- package/dist/http/schemas/access.js +39 -12
- package/dist/http/schemas/access.js.map +1 -1
- package/dist/http/schemas/assets.d.ts +8 -3
- package/dist/http/schemas/assets.js +6 -5
- package/dist/http/schemas/assets.js.map +1 -1
- package/dist/http/schemas/automations.d.ts +4 -4
- package/dist/http/schemas/chats.d.ts +216 -37
- package/dist/http/schemas/chats.js +13 -4
- package/dist/http/schemas/chats.js.map +1 -1
- package/dist/http/schemas/community.d.ts +105 -31
- package/dist/http/schemas/community.js +25 -9
- package/dist/http/schemas/community.js.map +1 -1
- package/dist/http/schemas/course-analytics.d.ts +51 -1
- package/dist/http/schemas/course-analytics.js +19 -1
- package/dist/http/schemas/course-analytics.js.map +1 -1
- package/dist/http/schemas/dashboard.d.ts +1 -0
- package/dist/http/schemas/dashboard.js +2 -1
- package/dist/http/schemas/dashboard.js.map +1 -1
- package/dist/http/schemas/discussion.d.ts +22 -72
- package/dist/http/schemas/discussion.js +2 -2
- package/dist/http/schemas/discussion.js.map +1 -1
- package/dist/http/schemas/entitlements.d.ts +9 -12
- package/dist/http/schemas/entitlements.js +11 -5
- package/dist/http/schemas/entitlements.js.map +1 -1
- package/dist/http/schemas/events.d.ts +527 -0
- package/dist/http/schemas/events.js +64 -0
- package/dist/http/schemas/events.js.map +1 -0
- package/dist/http/schemas/files.d.ts +24 -5
- package/dist/http/schemas/files.js +15 -2
- package/dist/http/schemas/files.js.map +1 -1
- package/dist/http/schemas/index.d.ts +11 -9
- package/dist/http/schemas/index.js +11 -9
- package/dist/http/schemas/invites.d.ts +3 -47
- package/dist/http/schemas/invites.js +4 -25
- package/dist/http/schemas/invites.js.map +1 -1
- package/dist/http/schemas/member.d.ts +94 -7
- package/dist/http/schemas/member.js +7 -3
- package/dist/http/schemas/member.js.map +1 -1
- package/dist/http/schemas/members.d.ts +329 -65
- package/dist/http/schemas/members.js +67 -25
- package/dist/http/schemas/members.js.map +1 -1
- package/dist/http/schemas/notifications.d.ts +58 -54
- package/dist/http/schemas/platform.d.ts +38 -0
- package/dist/http/schemas/platform.js +19 -0
- package/dist/http/schemas/platform.js.map +1 -0
- package/dist/http/schemas/posts.d.ts +55 -35
- package/dist/http/schemas/posts.js +4 -4
- package/dist/http/schemas/posts.js.map +1 -1
- package/dist/http/schemas/profile.d.ts +1 -1
- package/dist/http/schemas/shared.d.ts +1 -11
- package/dist/http/schemas/shared.js +1 -10
- package/dist/http/schemas/shared.js.map +1 -1
- package/dist/http/schemas/students.d.ts +22 -0
- package/dist/http/schemas/students.js +3 -1
- package/dist/http/schemas/students.js.map +1 -1
- package/dist/http/scope.d.ts +9 -13
- package/dist/http/scope.js +29 -40
- package/dist/http/scope.js.map +1 -1
- package/dist/http/server.js +9 -0
- package/dist/http/server.js.map +1 -1
- package/dist/http/shutdown.d.ts +11 -0
- package/dist/http/shutdown.js +40 -0
- package/dist/http/shutdown.js.map +1 -0
- package/dist/http/sse.d.ts +19 -0
- package/dist/http/sse.js +104 -0
- package/dist/http/sse.js.map +1 -0
- package/dist/http/test-caller.d.ts +13 -0
- package/dist/http/test-caller.js +14 -0
- package/dist/http/test-caller.js.map +1 -0
- package/dist/http/well-known.js +2 -2
- package/dist/http/well-known.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/packages/server/package.js +1 -1
- package/package.json +7 -6
- package/dist/http/routes/member/actor.d.ts +0 -14
- package/dist/http/routes/member/actor.js +0 -11
- package/dist/http/routes/member/actor.js.map +0 -1
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/http/schemas/events.d.ts
|
|
3
|
+
declare const EventStatus: z.ZodEnum<{
|
|
4
|
+
draft: "draft";
|
|
5
|
+
published: "published";
|
|
6
|
+
canceled: "canceled";
|
|
7
|
+
}>;
|
|
8
|
+
type EventStatus = z.infer<typeof EventStatus>;
|
|
9
|
+
declare const Event: z.ZodObject<{
|
|
10
|
+
orgId: z.ZodString;
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
type: z.ZodLiteral<"event">;
|
|
13
|
+
title: z.ZodString;
|
|
14
|
+
description: z.ZodString;
|
|
15
|
+
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
16
|
+
status: z.ZodEnum<{
|
|
17
|
+
draft: "draft";
|
|
18
|
+
published: "published";
|
|
19
|
+
canceled: "canceled";
|
|
20
|
+
}>;
|
|
21
|
+
startsAt: z.ZodCoercedDate<unknown>;
|
|
22
|
+
endsAt: z.ZodCoercedDate<unknown>;
|
|
23
|
+
timeZone: z.ZodString;
|
|
24
|
+
location: z.ZodObject<{
|
|
25
|
+
venue: z.ZodNullable<z.ZodObject<{
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
28
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
29
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
30
|
+
city: z.ZodNullable<z.ZodString>;
|
|
31
|
+
region: z.ZodNullable<z.ZodString>;
|
|
32
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
33
|
+
country: z.ZodNullable<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>>;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
online: z.ZodNullable<z.ZodObject<{
|
|
37
|
+
url: z.ZodURL;
|
|
38
|
+
details: z.ZodNullable<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
recording: z.ZodNullable<z.ZodObject<{
|
|
42
|
+
url: z.ZodURL;
|
|
43
|
+
details: z.ZodNullable<z.ZodString>;
|
|
44
|
+
}, z.core.$strict>>;
|
|
45
|
+
settings: z.ZodObject<{
|
|
46
|
+
type: z.ZodEnum<{
|
|
47
|
+
public: "public";
|
|
48
|
+
private: "private";
|
|
49
|
+
}>;
|
|
50
|
+
capacity: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
notifications: z.ZodBoolean;
|
|
52
|
+
replay: z.ZodBoolean;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
55
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
56
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
type Event = z.infer<typeof Event>;
|
|
59
|
+
declare const EventFile: z.ZodObject<{
|
|
60
|
+
orgId: z.ZodString;
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
eventId: z.ZodString;
|
|
63
|
+
assetId: z.ZodString;
|
|
64
|
+
seq: z.ZodNumber;
|
|
65
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
66
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
67
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
68
|
+
filename: z.ZodString;
|
|
69
|
+
contentType: z.ZodString;
|
|
70
|
+
size: z.ZodNumber;
|
|
71
|
+
url: z.ZodString;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
type EventFile = z.infer<typeof EventFile>;
|
|
74
|
+
declare const CreateEvent: z.ZodObject<{
|
|
75
|
+
title: z.ZodString;
|
|
76
|
+
description: z.ZodDefault<z.ZodString>;
|
|
77
|
+
startsAt: z.ZodPipe<z.ZodISODateTime, z.ZodCoercedDate<string>>;
|
|
78
|
+
endsAt: z.ZodPipe<z.ZodISODateTime, z.ZodCoercedDate<string>>;
|
|
79
|
+
timeZone: z.ZodString;
|
|
80
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
venue: z.ZodNullable<z.ZodObject<{
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
84
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
85
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
86
|
+
city: z.ZodNullable<z.ZodString>;
|
|
87
|
+
region: z.ZodNullable<z.ZodString>;
|
|
88
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
89
|
+
country: z.ZodNullable<z.ZodString>;
|
|
90
|
+
}, z.core.$strict>>;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
online: z.ZodNullable<z.ZodObject<{
|
|
93
|
+
url: z.ZodURL;
|
|
94
|
+
details: z.ZodNullable<z.ZodString>;
|
|
95
|
+
}, z.core.$strict>>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
99
|
+
public: "public";
|
|
100
|
+
private: "private";
|
|
101
|
+
}>>;
|
|
102
|
+
capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
103
|
+
notifications: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
replay: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
}, z.core.$strict>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
type CreateEvent = z.infer<typeof CreateEvent>;
|
|
108
|
+
declare const UpdateEvent: z.ZodObject<{
|
|
109
|
+
title: z.ZodOptional<z.ZodString>;
|
|
110
|
+
description: z.ZodOptional<z.ZodString>;
|
|
111
|
+
startsAt: z.ZodOptional<z.ZodPipe<z.ZodISODateTime, z.ZodCoercedDate<string>>>;
|
|
112
|
+
endsAt: z.ZodOptional<z.ZodPipe<z.ZodISODateTime, z.ZodCoercedDate<string>>>;
|
|
113
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
114
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
venue: z.ZodNullable<z.ZodObject<{
|
|
116
|
+
name: z.ZodString;
|
|
117
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
118
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
119
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
120
|
+
city: z.ZodNullable<z.ZodString>;
|
|
121
|
+
region: z.ZodNullable<z.ZodString>;
|
|
122
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
123
|
+
country: z.ZodNullable<z.ZodString>;
|
|
124
|
+
}, z.core.$strict>>;
|
|
125
|
+
}, z.core.$strict>>;
|
|
126
|
+
online: z.ZodNullable<z.ZodObject<{
|
|
127
|
+
url: z.ZodURL;
|
|
128
|
+
details: z.ZodNullable<z.ZodString>;
|
|
129
|
+
}, z.core.$strict>>;
|
|
130
|
+
}, z.core.$strict>>;
|
|
131
|
+
thumbnailAssetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
+
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
133
|
+
url: z.ZodURL;
|
|
134
|
+
details: z.ZodNullable<z.ZodString>;
|
|
135
|
+
}, z.core.$strict>>>;
|
|
136
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
draft: "draft";
|
|
138
|
+
published: "published";
|
|
139
|
+
}>>;
|
|
140
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
public: "public";
|
|
143
|
+
private: "private";
|
|
144
|
+
}>>;
|
|
145
|
+
capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
146
|
+
notifications: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
replay: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
}, z.core.$strict>>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
type UpdateEvent = z.infer<typeof UpdateEvent>;
|
|
151
|
+
declare const EventsQuery: z.ZodObject<{
|
|
152
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
153
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
154
|
+
search: z.ZodOptional<z.ZodString>;
|
|
155
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
156
|
+
draft: "draft";
|
|
157
|
+
published: "published";
|
|
158
|
+
canceled: "canceled";
|
|
159
|
+
}>>;
|
|
160
|
+
from: z.ZodOptional<z.ZodPipe<z.ZodISODateTime, z.ZodCoercedDate<string>>>;
|
|
161
|
+
to: z.ZodOptional<z.ZodPipe<z.ZodISODateTime, z.ZodCoercedDate<string>>>;
|
|
162
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
163
|
+
title: "title";
|
|
164
|
+
startsAt: "startsAt";
|
|
165
|
+
"-startsAt": "-startsAt";
|
|
166
|
+
"-title": "-title";
|
|
167
|
+
}>>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
type EventsQuery = z.infer<typeof EventsQuery>;
|
|
170
|
+
declare const EventsPage: z.ZodObject<{
|
|
171
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
172
|
+
orgId: z.ZodString;
|
|
173
|
+
id: z.ZodString;
|
|
174
|
+
type: z.ZodLiteral<"event">;
|
|
175
|
+
title: z.ZodString;
|
|
176
|
+
description: z.ZodString;
|
|
177
|
+
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
178
|
+
status: z.ZodEnum<{
|
|
179
|
+
draft: "draft";
|
|
180
|
+
published: "published";
|
|
181
|
+
canceled: "canceled";
|
|
182
|
+
}>;
|
|
183
|
+
startsAt: z.ZodCoercedDate<unknown>;
|
|
184
|
+
endsAt: z.ZodCoercedDate<unknown>;
|
|
185
|
+
timeZone: z.ZodString;
|
|
186
|
+
location: z.ZodObject<{
|
|
187
|
+
venue: z.ZodNullable<z.ZodObject<{
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
190
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
191
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
192
|
+
city: z.ZodNullable<z.ZodString>;
|
|
193
|
+
region: z.ZodNullable<z.ZodString>;
|
|
194
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
195
|
+
country: z.ZodNullable<z.ZodString>;
|
|
196
|
+
}, z.core.$strict>>;
|
|
197
|
+
}, z.core.$strict>>;
|
|
198
|
+
online: z.ZodNullable<z.ZodObject<{
|
|
199
|
+
url: z.ZodURL;
|
|
200
|
+
details: z.ZodNullable<z.ZodString>;
|
|
201
|
+
}, z.core.$strict>>;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
recording: z.ZodNullable<z.ZodObject<{
|
|
204
|
+
url: z.ZodURL;
|
|
205
|
+
details: z.ZodNullable<z.ZodString>;
|
|
206
|
+
}, z.core.$strict>>;
|
|
207
|
+
settings: z.ZodObject<{
|
|
208
|
+
type: z.ZodEnum<{
|
|
209
|
+
public: "public";
|
|
210
|
+
private: "private";
|
|
211
|
+
}>;
|
|
212
|
+
capacity: z.ZodNullable<z.ZodNumber>;
|
|
213
|
+
notifications: z.ZodBoolean;
|
|
214
|
+
replay: z.ZodBoolean;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
217
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
218
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
219
|
+
}, z.core.$strict>>;
|
|
220
|
+
total: z.ZodNumber;
|
|
221
|
+
page: z.ZodNumber;
|
|
222
|
+
pageSize: z.ZodNumber;
|
|
223
|
+
}, z.core.$strip>;
|
|
224
|
+
type EventsPage = z.infer<typeof EventsPage>;
|
|
225
|
+
declare const AddEventAsset: z.ZodObject<{
|
|
226
|
+
assetId: z.ZodString;
|
|
227
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.core.$strict>;
|
|
229
|
+
type AddEventAsset = z.infer<typeof AddEventAsset>;
|
|
230
|
+
declare const RenameEventAsset: z.ZodObject<{
|
|
231
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
type RenameEventAsset = z.infer<typeof RenameEventAsset>;
|
|
234
|
+
declare const ReorderEventAssets: z.ZodObject<{
|
|
235
|
+
assetIds: z.ZodArray<z.ZodString>;
|
|
236
|
+
}, z.core.$strict>;
|
|
237
|
+
type ReorderEventAssets = z.infer<typeof ReorderEventAssets>;
|
|
238
|
+
declare const EventIdParam: z.ZodObject<{
|
|
239
|
+
eventId: z.ZodString;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
type EventIdParam = z.infer<typeof EventIdParam>;
|
|
242
|
+
declare const EventAssetParams: z.ZodObject<{
|
|
243
|
+
eventId: z.ZodString;
|
|
244
|
+
assetId: z.ZodString;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
type EventAssetParams = z.infer<typeof EventAssetParams>;
|
|
247
|
+
declare const AddEventAttendee: z.ZodObject<{
|
|
248
|
+
orgUserId: z.ZodString;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
type AddEventAttendee = z.infer<typeof AddEventAttendee>;
|
|
251
|
+
declare const EventAttendeeParams: z.ZodObject<{
|
|
252
|
+
eventId: z.ZodString;
|
|
253
|
+
orgUserId: z.ZodString;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
type EventAttendeeParams = z.infer<typeof EventAttendeeParams>;
|
|
256
|
+
declare const MemberEvent: z.ZodObject<{
|
|
257
|
+
description: z.ZodString;
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
type: z.ZodLiteral<"event">;
|
|
260
|
+
status: z.ZodEnum<{
|
|
261
|
+
draft: "draft";
|
|
262
|
+
published: "published";
|
|
263
|
+
canceled: "canceled";
|
|
264
|
+
}>;
|
|
265
|
+
title: z.ZodString;
|
|
266
|
+
orgId: z.ZodString;
|
|
267
|
+
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
268
|
+
timeZone: z.ZodString;
|
|
269
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
270
|
+
startsAt: z.ZodCoercedDate<unknown>;
|
|
271
|
+
endsAt: z.ZodCoercedDate<unknown>;
|
|
272
|
+
recording: z.ZodNullable<z.ZodObject<{
|
|
273
|
+
url: z.ZodURL;
|
|
274
|
+
details: z.ZodNullable<z.ZodString>;
|
|
275
|
+
}, z.core.$strict>>;
|
|
276
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
277
|
+
venue: z.ZodNullable<z.ZodObject<{
|
|
278
|
+
name: z.ZodString;
|
|
279
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
280
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
281
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
282
|
+
city: z.ZodNullable<z.ZodString>;
|
|
283
|
+
region: z.ZodNullable<z.ZodString>;
|
|
284
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
285
|
+
country: z.ZodNullable<z.ZodString>;
|
|
286
|
+
}, z.core.$strict>>;
|
|
287
|
+
}, z.core.$strict>>;
|
|
288
|
+
online: z.ZodNullable<z.ZodObject<{
|
|
289
|
+
url: z.ZodURL;
|
|
290
|
+
details: z.ZodNullable<z.ZodString>;
|
|
291
|
+
}, z.core.$strict>>;
|
|
292
|
+
}, z.core.$strict>>;
|
|
293
|
+
settings: z.ZodObject<{
|
|
294
|
+
type: z.ZodEnum<{
|
|
295
|
+
public: "public";
|
|
296
|
+
private: "private";
|
|
297
|
+
}>;
|
|
298
|
+
capacity: z.ZodNullable<z.ZodNumber>;
|
|
299
|
+
replay: z.ZodBoolean;
|
|
300
|
+
}, z.core.$strict>;
|
|
301
|
+
files: z.ZodArray<z.ZodObject<{
|
|
302
|
+
orgId: z.ZodString;
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
eventId: z.ZodString;
|
|
305
|
+
assetId: z.ZodString;
|
|
306
|
+
seq: z.ZodNumber;
|
|
307
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
308
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
309
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
310
|
+
filename: z.ZodString;
|
|
311
|
+
contentType: z.ZodString;
|
|
312
|
+
size: z.ZodNumber;
|
|
313
|
+
url: z.ZodString;
|
|
314
|
+
}, z.core.$strict>>;
|
|
315
|
+
attendeeCount: z.ZodNumber;
|
|
316
|
+
attendees: z.ZodArray<z.ZodObject<{
|
|
317
|
+
name: z.ZodString;
|
|
318
|
+
orgUserId: z.ZodString;
|
|
319
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
320
|
+
}, z.core.$strict>>;
|
|
321
|
+
placesLeft: z.ZodNullable<z.ZodNumber>;
|
|
322
|
+
viewer: z.ZodObject<{
|
|
323
|
+
attending: z.ZodBoolean;
|
|
324
|
+
canRegister: z.ZodBoolean;
|
|
325
|
+
canOpen: z.ZodBoolean;
|
|
326
|
+
canLeave: z.ZodBoolean;
|
|
327
|
+
canManageAttendees: z.ZodBoolean;
|
|
328
|
+
canAddAttendees: z.ZodBoolean;
|
|
329
|
+
canEdit: z.ZodBoolean;
|
|
330
|
+
canCancel: z.ZodBoolean;
|
|
331
|
+
canDelete: z.ZodBoolean;
|
|
332
|
+
}, z.core.$strict>;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
type MemberEvent = z.infer<typeof MemberEvent>;
|
|
335
|
+
declare const MemberEventsQuery: z.ZodObject<{
|
|
336
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
337
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
338
|
+
when: z.ZodOptional<z.ZodEnum<{
|
|
339
|
+
upcoming: "upcoming";
|
|
340
|
+
past: "past";
|
|
341
|
+
}>>;
|
|
342
|
+
attending: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
343
|
+
}, z.core.$strict>;
|
|
344
|
+
type MemberEventsQuery = z.infer<typeof MemberEventsQuery>;
|
|
345
|
+
declare const MemberEventSummary: z.ZodObject<{
|
|
346
|
+
id: z.ZodString;
|
|
347
|
+
type: z.ZodLiteral<"event">;
|
|
348
|
+
status: z.ZodEnum<{
|
|
349
|
+
draft: "draft";
|
|
350
|
+
published: "published";
|
|
351
|
+
canceled: "canceled";
|
|
352
|
+
}>;
|
|
353
|
+
title: z.ZodString;
|
|
354
|
+
orgId: z.ZodString;
|
|
355
|
+
settings: z.ZodObject<{
|
|
356
|
+
type: z.ZodEnum<{
|
|
357
|
+
public: "public";
|
|
358
|
+
private: "private";
|
|
359
|
+
}>;
|
|
360
|
+
capacity: z.ZodNullable<z.ZodNumber>;
|
|
361
|
+
replay: z.ZodBoolean;
|
|
362
|
+
}, z.core.$strict>;
|
|
363
|
+
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
364
|
+
timeZone: z.ZodString;
|
|
365
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
366
|
+
viewer: z.ZodObject<{
|
|
367
|
+
attending: z.ZodBoolean;
|
|
368
|
+
canRegister: z.ZodBoolean;
|
|
369
|
+
canOpen: z.ZodBoolean;
|
|
370
|
+
canLeave: z.ZodBoolean;
|
|
371
|
+
canManageAttendees: z.ZodBoolean;
|
|
372
|
+
canAddAttendees: z.ZodBoolean;
|
|
373
|
+
canEdit: z.ZodBoolean;
|
|
374
|
+
canCancel: z.ZodBoolean;
|
|
375
|
+
canDelete: z.ZodBoolean;
|
|
376
|
+
}, z.core.$strict>;
|
|
377
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
378
|
+
venue: z.ZodNullable<z.ZodObject<{
|
|
379
|
+
name: z.ZodString;
|
|
380
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
381
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
382
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
383
|
+
city: z.ZodNullable<z.ZodString>;
|
|
384
|
+
region: z.ZodNullable<z.ZodString>;
|
|
385
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
386
|
+
country: z.ZodNullable<z.ZodString>;
|
|
387
|
+
}, z.core.$strict>>;
|
|
388
|
+
}, z.core.$strict>>;
|
|
389
|
+
online: z.ZodNullable<z.ZodObject<{
|
|
390
|
+
url: z.ZodURL;
|
|
391
|
+
details: z.ZodNullable<z.ZodString>;
|
|
392
|
+
}, z.core.$strict>>;
|
|
393
|
+
}, z.core.$strict>>;
|
|
394
|
+
startsAt: z.ZodCoercedDate<unknown>;
|
|
395
|
+
endsAt: z.ZodCoercedDate<unknown>;
|
|
396
|
+
recording: z.ZodNullable<z.ZodObject<{
|
|
397
|
+
url: z.ZodURL;
|
|
398
|
+
details: z.ZodNullable<z.ZodString>;
|
|
399
|
+
}, z.core.$strict>>;
|
|
400
|
+
attendeeCount: z.ZodNumber;
|
|
401
|
+
attendees: z.ZodArray<z.ZodObject<{
|
|
402
|
+
name: z.ZodString;
|
|
403
|
+
orgUserId: z.ZodString;
|
|
404
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
405
|
+
}, z.core.$strict>>;
|
|
406
|
+
placesLeft: z.ZodNullable<z.ZodNumber>;
|
|
407
|
+
}, z.core.$strict>;
|
|
408
|
+
type MemberEventSummary = z.infer<typeof MemberEventSummary>;
|
|
409
|
+
declare const MemberEventsPage: z.ZodObject<{
|
|
410
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
411
|
+
id: z.ZodString;
|
|
412
|
+
type: z.ZodLiteral<"event">;
|
|
413
|
+
status: z.ZodEnum<{
|
|
414
|
+
draft: "draft";
|
|
415
|
+
published: "published";
|
|
416
|
+
canceled: "canceled";
|
|
417
|
+
}>;
|
|
418
|
+
title: z.ZodString;
|
|
419
|
+
orgId: z.ZodString;
|
|
420
|
+
settings: z.ZodObject<{
|
|
421
|
+
type: z.ZodEnum<{
|
|
422
|
+
public: "public";
|
|
423
|
+
private: "private";
|
|
424
|
+
}>;
|
|
425
|
+
capacity: z.ZodNullable<z.ZodNumber>;
|
|
426
|
+
replay: z.ZodBoolean;
|
|
427
|
+
}, z.core.$strict>;
|
|
428
|
+
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
429
|
+
timeZone: z.ZodString;
|
|
430
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
431
|
+
viewer: z.ZodObject<{
|
|
432
|
+
attending: z.ZodBoolean;
|
|
433
|
+
canRegister: z.ZodBoolean;
|
|
434
|
+
canOpen: z.ZodBoolean;
|
|
435
|
+
canLeave: z.ZodBoolean;
|
|
436
|
+
canManageAttendees: z.ZodBoolean;
|
|
437
|
+
canAddAttendees: z.ZodBoolean;
|
|
438
|
+
canEdit: z.ZodBoolean;
|
|
439
|
+
canCancel: z.ZodBoolean;
|
|
440
|
+
canDelete: z.ZodBoolean;
|
|
441
|
+
}, z.core.$strict>;
|
|
442
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
443
|
+
venue: z.ZodNullable<z.ZodObject<{
|
|
444
|
+
name: z.ZodString;
|
|
445
|
+
address: z.ZodNullable<z.ZodObject<{
|
|
446
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
447
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
448
|
+
city: z.ZodNullable<z.ZodString>;
|
|
449
|
+
region: z.ZodNullable<z.ZodString>;
|
|
450
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
451
|
+
country: z.ZodNullable<z.ZodString>;
|
|
452
|
+
}, z.core.$strict>>;
|
|
453
|
+
}, z.core.$strict>>;
|
|
454
|
+
online: z.ZodNullable<z.ZodObject<{
|
|
455
|
+
url: z.ZodURL;
|
|
456
|
+
details: z.ZodNullable<z.ZodString>;
|
|
457
|
+
}, z.core.$strict>>;
|
|
458
|
+
}, z.core.$strict>>;
|
|
459
|
+
startsAt: z.ZodCoercedDate<unknown>;
|
|
460
|
+
endsAt: z.ZodCoercedDate<unknown>;
|
|
461
|
+
recording: z.ZodNullable<z.ZodObject<{
|
|
462
|
+
url: z.ZodURL;
|
|
463
|
+
details: z.ZodNullable<z.ZodString>;
|
|
464
|
+
}, z.core.$strict>>;
|
|
465
|
+
attendeeCount: z.ZodNumber;
|
|
466
|
+
attendees: z.ZodArray<z.ZodObject<{
|
|
467
|
+
name: z.ZodString;
|
|
468
|
+
orgUserId: z.ZodString;
|
|
469
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
470
|
+
}, z.core.$strict>>;
|
|
471
|
+
placesLeft: z.ZodNullable<z.ZodNumber>;
|
|
472
|
+
}, z.core.$strict>>;
|
|
473
|
+
total: z.ZodNumber;
|
|
474
|
+
page: z.ZodNumber;
|
|
475
|
+
pageSize: z.ZodNumber;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
type MemberEventsPage = z.infer<typeof MemberEventsPage>;
|
|
478
|
+
declare const EventAttendee: z.ZodObject<{
|
|
479
|
+
orgUserId: z.ZodString;
|
|
480
|
+
name: z.ZodString;
|
|
481
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
482
|
+
source: z.ZodEnum<{
|
|
483
|
+
manual: "manual";
|
|
484
|
+
self: "self";
|
|
485
|
+
automation: "automation";
|
|
486
|
+
bundle: "bundle";
|
|
487
|
+
}>;
|
|
488
|
+
grantedAt: z.ZodCoercedDate<unknown>;
|
|
489
|
+
}, z.core.$strict>;
|
|
490
|
+
type EventAttendee = z.infer<typeof EventAttendee>;
|
|
491
|
+
declare const EventAttendeesPage: z.ZodObject<{
|
|
492
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
493
|
+
orgUserId: z.ZodString;
|
|
494
|
+
name: z.ZodString;
|
|
495
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
496
|
+
source: z.ZodEnum<{
|
|
497
|
+
manual: "manual";
|
|
498
|
+
self: "self";
|
|
499
|
+
automation: "automation";
|
|
500
|
+
bundle: "bundle";
|
|
501
|
+
}>;
|
|
502
|
+
grantedAt: z.ZodCoercedDate<unknown>;
|
|
503
|
+
}, z.core.$strict>>;
|
|
504
|
+
total: z.ZodNumber;
|
|
505
|
+
page: z.ZodNumber;
|
|
506
|
+
pageSize: z.ZodNumber;
|
|
507
|
+
}, z.core.$strip>;
|
|
508
|
+
type EventAttendeesPage = z.infer<typeof EventAttendeesPage>;
|
|
509
|
+
declare const EventAnalytics: z.ZodObject<{
|
|
510
|
+
attendees: z.ZodNumber;
|
|
511
|
+
capacity: z.ZodNullable<z.ZodNumber>;
|
|
512
|
+
bySource: z.ZodObject<{
|
|
513
|
+
self: z.ZodNumber;
|
|
514
|
+
manual: z.ZodNumber;
|
|
515
|
+
automation: z.ZodNumber;
|
|
516
|
+
bundle: z.ZodNumber;
|
|
517
|
+
}, z.core.$strict>;
|
|
518
|
+
revoked: z.ZodNumber;
|
|
519
|
+
grantsOverTime: z.ZodArray<z.ZodObject<{
|
|
520
|
+
date: z.ZodString;
|
|
521
|
+
count: z.ZodNumber;
|
|
522
|
+
}, z.core.$strict>>;
|
|
523
|
+
}, z.core.$strict>;
|
|
524
|
+
type EventAnalytics = z.infer<typeof EventAnalytics>;
|
|
525
|
+
//#endregion
|
|
526
|
+
export { AddEventAsset, AddEventAttendee, CreateEvent, Event, EventAnalytics, EventAssetParams, EventAttendee, EventAttendeeParams, EventAttendeesPage, EventFile, EventIdParam, EventStatus, EventsPage, EventsQuery, MemberEvent, MemberEventSummary, MemberEventsPage, MemberEventsQuery, RenameEventAsset, ReorderEventAssets, UpdateEvent };
|
|
527
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DateTimeInput, ListQuery, PageQuery, paginated } from "./shared.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { addEventAssetInputSchema, eventAnalyticsSchema, eventAttendeeSchema, eventFileSchema, eventLocationSchema, eventRecordingSchema, eventSettingsSchema, eventSortSchema, eventStatusSchema, eventViewSchema, idSchema, memberEventSchema, memberEventSummarySchema, reorderEventAssetsInputSchema, timeZoneSchema } from "@headless-lms/core/schemas";
|
|
4
|
+
//#region src/http/schemas/events.ts
|
|
5
|
+
const EventStatus = eventStatusSchema;
|
|
6
|
+
const Event = eventViewSchema;
|
|
7
|
+
const EventFile = eventFileSchema;
|
|
8
|
+
const EventTitle = z.string().trim().min(1).max(120);
|
|
9
|
+
const EventDescription = z.string().max(5e3).describe("Markdown");
|
|
10
|
+
const CreateEvent = z.object({
|
|
11
|
+
title: EventTitle,
|
|
12
|
+
description: EventDescription.default(""),
|
|
13
|
+
startsAt: DateTimeInput,
|
|
14
|
+
endsAt: DateTimeInput.describe("After `startsAt`"),
|
|
15
|
+
timeZone: timeZoneSchema,
|
|
16
|
+
location: eventLocationSchema.optional().describe("A venue, a meeting link, both, or neither yet. Default: neither"),
|
|
17
|
+
settings: eventSettingsSchema.partial().optional().describe("Any field left out takes its default")
|
|
18
|
+
});
|
|
19
|
+
const UpdateEvent = z.object({
|
|
20
|
+
title: EventTitle.optional(),
|
|
21
|
+
description: EventDescription.optional(),
|
|
22
|
+
startsAt: DateTimeInput.optional(),
|
|
23
|
+
endsAt: DateTimeInput.optional().describe("After `startsAt`"),
|
|
24
|
+
timeZone: timeZoneSchema.optional(),
|
|
25
|
+
location: eventLocationSchema.optional(),
|
|
26
|
+
thumbnailAssetId: idSchema.nullable().optional().describe("The cover image; null clears it"),
|
|
27
|
+
recording: eventRecordingSchema.nullable().optional().describe("Null clears it"),
|
|
28
|
+
status: EventStatus.extract(["draft", "published"]).optional().describe("`published` publishes the event, `draft` unpublishes it"),
|
|
29
|
+
settings: eventSettingsSchema.partial().optional().describe("Fields left out keep their value")
|
|
30
|
+
});
|
|
31
|
+
const EventsQuery = ListQuery.extend({
|
|
32
|
+
status: EventStatus.optional(),
|
|
33
|
+
from: DateTimeInput.optional().describe("Events that end after this time"),
|
|
34
|
+
to: DateTimeInput.optional().describe("Events that start before this time"),
|
|
35
|
+
sort: eventSortSchema.optional().describe("Default `startsAt`")
|
|
36
|
+
});
|
|
37
|
+
const EventsPage = paginated(Event);
|
|
38
|
+
const AddEventAsset = addEventAssetInputSchema;
|
|
39
|
+
const RenameEventAsset = z.object({ displayName: z.string().trim().min(1).max(255).nullable() });
|
|
40
|
+
const ReorderEventAssets = reorderEventAssetsInputSchema;
|
|
41
|
+
const EventIdParam = z.object({ eventId: z.string() });
|
|
42
|
+
const EventAssetParams = z.object({
|
|
43
|
+
eventId: z.string(),
|
|
44
|
+
assetId: z.string()
|
|
45
|
+
});
|
|
46
|
+
const AddEventAttendee = z.object({ orgUserId: idSchema });
|
|
47
|
+
const EventAttendeeParams = z.object({
|
|
48
|
+
eventId: z.string(),
|
|
49
|
+
orgUserId: z.string()
|
|
50
|
+
});
|
|
51
|
+
const MemberEvent = memberEventSchema;
|
|
52
|
+
const MemberEventsQuery = PageQuery.extend({
|
|
53
|
+
when: z.enum(["upcoming", "past"]).optional().describe("`upcoming` (default): not yet ended, soonest first. `past`: ended, latest first"),
|
|
54
|
+
attending: z.stringbool().optional().describe("`true`: only the events the caller attends")
|
|
55
|
+
});
|
|
56
|
+
const MemberEventSummary = memberEventSummarySchema;
|
|
57
|
+
const MemberEventsPage = paginated(MemberEventSummary);
|
|
58
|
+
const EventAttendee = eventAttendeeSchema;
|
|
59
|
+
const EventAttendeesPage = paginated(EventAttendee);
|
|
60
|
+
const EventAnalytics = eventAnalyticsSchema;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { AddEventAsset, AddEventAttendee, CreateEvent, Event, EventAnalytics, EventAssetParams, EventAttendee, EventAttendeeParams, EventAttendeesPage, EventFile, EventIdParam, EventStatus, EventsPage, EventsQuery, MemberEvent, MemberEventSummary, MemberEventsPage, MemberEventsQuery, RenameEventAsset, ReorderEventAssets, UpdateEvent };
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","names":[],"sources":["../../../src/http/schemas/events.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n addEventAssetInputSchema,\n eventAnalyticsSchema,\n eventAttendeeSchema,\n eventFileSchema,\n eventLocationSchema,\n eventRecordingSchema,\n eventSettingsSchema,\n eventSortSchema,\n eventStatusSchema,\n eventViewSchema,\n idSchema,\n memberEventSchema,\n memberEventSummarySchema,\n reorderEventAssetsInputSchema,\n timeZoneSchema,\n} from '@headless-lms/core/schemas';\nimport { DateTimeInput, ListQuery, PageQuery, paginated } from './shared.js';\n\nexport const EventStatus = eventStatusSchema;\nexport type EventStatus = z.infer<typeof EventStatus>;\n\nexport const Event = eventViewSchema;\nexport type Event = z.infer<typeof Event>;\n\nexport const EventFile = eventFileSchema;\nexport type EventFile = z.infer<typeof EventFile>;\n\nconst EventTitle = z.string().trim().min(1).max(120);\nconst EventDescription = z.string().max(5_000).describe('Markdown');\n\nexport const CreateEvent = z.object({\n title: EventTitle,\n description: EventDescription.default(''),\n startsAt: DateTimeInput,\n endsAt: DateTimeInput.describe('After `startsAt`'),\n timeZone: timeZoneSchema,\n location: eventLocationSchema\n .optional()\n .describe('A venue, a meeting link, both, or neither yet. Default: neither'),\n settings: eventSettingsSchema\n .partial()\n .optional()\n .describe('Any field left out takes its default'),\n});\nexport type CreateEvent = z.infer<typeof CreateEvent>;\n\nexport const UpdateEvent = z.object({\n title: EventTitle.optional(),\n description: EventDescription.optional(),\n startsAt: DateTimeInput.optional(),\n endsAt: DateTimeInput.optional().describe('After `startsAt`'),\n timeZone: timeZoneSchema.optional(),\n location: eventLocationSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional().describe('The cover image; null clears it'),\n recording: eventRecordingSchema.nullable().optional().describe('Null clears it'),\n status: EventStatus.extract(['draft', 'published'])\n .optional()\n .describe('`published` publishes the event, `draft` unpublishes it'),\n settings: eventSettingsSchema.partial().optional().describe('Fields left out keep their value'),\n});\nexport type UpdateEvent = z.infer<typeof UpdateEvent>;\n\nexport const EventsQuery = ListQuery.extend({\n status: EventStatus.optional(),\n from: DateTimeInput.optional().describe('Events that end after this time'),\n to: DateTimeInput.optional().describe('Events that start before this time'),\n sort: eventSortSchema.optional().describe('Default `startsAt`'),\n});\nexport type EventsQuery = z.infer<typeof EventsQuery>;\n\nexport const EventsPage = paginated(Event);\nexport type EventsPage = z.infer<typeof EventsPage>;\n\nexport const AddEventAsset = addEventAssetInputSchema;\nexport type AddEventAsset = z.infer<typeof AddEventAsset>;\n\nexport const RenameEventAsset = z.object({\n displayName: z.string().trim().min(1).max(255).nullable(),\n});\nexport type RenameEventAsset = z.infer<typeof RenameEventAsset>;\n\nexport const ReorderEventAssets = reorderEventAssetsInputSchema;\nexport type ReorderEventAssets = z.infer<typeof ReorderEventAssets>;\n\nexport const EventIdParam = z.object({ eventId: z.string() });\nexport type EventIdParam = z.infer<typeof EventIdParam>;\n\nexport const EventAssetParams = z.object({\n eventId: z.string(),\n assetId: z.string(),\n});\nexport type EventAssetParams = z.infer<typeof EventAssetParams>;\n\nexport const AddEventAttendee = z.object({ orgUserId: idSchema });\nexport type AddEventAttendee = z.infer<typeof AddEventAttendee>;\n\nexport const EventAttendeeParams = z.object({\n eventId: z.string(),\n orgUserId: z.string(),\n});\nexport type EventAttendeeParams = z.infer<typeof EventAttendeeParams>;\n\nexport const MemberEvent = memberEventSchema;\nexport type MemberEvent = z.infer<typeof MemberEvent>;\n\nexport const MemberEventsQuery = PageQuery.extend({\n when: z\n .enum(['upcoming', 'past'])\n .optional()\n .describe('`upcoming` (default): not yet ended, soonest first. `past`: ended, latest first'),\n attending: z.stringbool().optional().describe('`true`: only the events the caller attends'),\n});\nexport type MemberEventsQuery = z.infer<typeof MemberEventsQuery>;\n\nexport const MemberEventSummary = memberEventSummarySchema;\nexport type MemberEventSummary = z.infer<typeof MemberEventSummary>;\n\nexport const MemberEventsPage = paginated(MemberEventSummary);\nexport type MemberEventsPage = z.infer<typeof MemberEventsPage>;\n\nexport const EventAttendee = eventAttendeeSchema;\nexport type EventAttendee = z.infer<typeof EventAttendee>;\n\nexport const EventAttendeesPage = paginated(EventAttendee);\nexport type EventAttendeesPage = z.infer<typeof EventAttendeesPage>;\n\nexport const EventAnalytics = eventAnalyticsSchema;\nexport type EventAnalytics = z.infer<typeof EventAnalytics>;\n"],"mappings":";;;;AAoBA,MAAa,cAAc;AAG3B,MAAa,QAAQ;AAGrB,MAAa,YAAY;AAGzB,MAAM,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AACnD,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,GAAK,CAAC,CAAC,SAAS,UAAU;AAElE,MAAa,cAAc,EAAE,OAAO;CAClC,OAAO;CACP,aAAa,iBAAiB,QAAQ,EAAE;CACxC,UAAU;CACV,QAAQ,cAAc,SAAS,kBAAkB;CACjD,UAAU;CACV,UAAU,oBACP,SAAS,CAAC,CACV,SAAS,iEAAiE;CAC7E,UAAU,oBACP,QAAQ,CAAC,CACT,SAAS,CAAC,CACV,SAAS,sCAAsC;AACpD,CAAC;AAGD,MAAa,cAAc,EAAE,OAAO;CAClC,OAAO,WAAW,SAAS;CAC3B,aAAa,iBAAiB,SAAS;CACvC,UAAU,cAAc,SAAS;CACjC,QAAQ,cAAc,SAAS,CAAC,CAAC,SAAS,kBAAkB;CAC5D,UAAU,eAAe,SAAS;CAClC,UAAU,oBAAoB,SAAS;CACvC,kBAAkB,SAAS,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,iCAAiC;CAC3F,WAAW,qBAAqB,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,gBAAgB;CAC/E,QAAQ,YAAY,QAAQ,CAAC,SAAS,WAAW,CAAC,CAAC,CAChD,SAAS,CAAC,CACV,SAAS,yDAAyD;CACrE,UAAU,oBAAoB,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,kCAAkC;AAChG,CAAC;AAGD,MAAa,cAAc,UAAU,OAAO;CAC1C,QAAQ,YAAY,SAAS;CAC7B,MAAM,cAAc,SAAS,CAAC,CAAC,SAAS,iCAAiC;CACzE,IAAI,cAAc,SAAS,CAAC,CAAC,SAAS,oCAAoC;CAC1E,MAAM,gBAAgB,SAAS,CAAC,CAAC,SAAS,oBAAoB;AAChE,CAAC;AAGD,MAAa,aAAa,UAAU,KAAK;AAGzC,MAAa,gBAAgB;AAG7B,MAAa,mBAAmB,EAAE,OAAO,EACvC,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS,EAC1D,CAAC;AAGD,MAAa,qBAAqB;AAGlC,MAAa,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAG5D,MAAa,mBAAmB,EAAE,OAAO;CACvC,SAAS,EAAE,OAAO;CAClB,SAAS,EAAE,OAAO;AACpB,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO,EAAE,WAAW,SAAS,CAAC;AAGhE,MAAa,sBAAsB,EAAE,OAAO;CAC1C,SAAS,EAAE,OAAO;CAClB,WAAW,EAAE,OAAO;AACtB,CAAC;AAGD,MAAa,cAAc;AAG3B,MAAa,oBAAoB,UAAU,OAAO;CAChD,MAAM,EACH,KAAK,CAAC,YAAY,MAAM,CAAC,CAAC,CAC1B,SAAS,CAAC,CACV,SAAS,iFAAiF;CAC7F,WAAW,EAAE,WAAW,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,4CAA4C;AAC5F,CAAC;AAGD,MAAa,qBAAqB;AAGlC,MAAa,mBAAmB,UAAU,kBAAkB;AAG5D,MAAa,gBAAgB;AAG7B,MAAa,qBAAqB,UAAU,aAAa;AAGzD,MAAa,iBAAiB"}
|
|
@@ -12,6 +12,15 @@ declare const CommunityThumbnailParams: z.ZodObject<{
|
|
|
12
12
|
communityId: z.ZodString;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
type CommunityThumbnailParams = z.infer<typeof CommunityThumbnailParams>;
|
|
15
|
+
declare const SpaceImageParams: z.ZodObject<{
|
|
16
|
+
spaceId: z.ZodString;
|
|
17
|
+
image: z.ZodEnum<{
|
|
18
|
+
cover: "cover";
|
|
19
|
+
background: "background";
|
|
20
|
+
icon: "icon";
|
|
21
|
+
}>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
type SpaceImageParams = z.infer<typeof SpaceImageParams>;
|
|
15
24
|
declare const ActivityFileParams: z.ZodObject<{
|
|
16
25
|
activityId: z.ZodString;
|
|
17
26
|
assetId: z.ZodString;
|
|
@@ -22,24 +31,34 @@ declare const DownloadFileParams: z.ZodObject<{
|
|
|
22
31
|
assetId: z.ZodString;
|
|
23
32
|
}, z.core.$strip>;
|
|
24
33
|
type DownloadFileParams = z.infer<typeof DownloadFileParams>;
|
|
34
|
+
declare const EventThumbnailParams: z.ZodObject<{
|
|
35
|
+
eventId: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
type EventThumbnailParams = z.infer<typeof EventThumbnailParams>;
|
|
38
|
+
declare const EventFileParams: z.ZodObject<{
|
|
39
|
+
eventId: z.ZodString;
|
|
40
|
+
assetId: z.ZodString;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type EventFileParams = z.infer<typeof EventFileParams>;
|
|
25
43
|
declare const PostCoverParams: z.ZodObject<{
|
|
26
44
|
postId: z.ZodString;
|
|
27
45
|
}, z.core.$strip>;
|
|
28
46
|
type PostCoverParams = z.infer<typeof PostCoverParams>;
|
|
47
|
+
declare const PostAssetParams: z.ZodObject<{
|
|
48
|
+
postId: z.ZodString;
|
|
49
|
+
assetId: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
type PostAssetParams = z.infer<typeof PostAssetParams>;
|
|
29
52
|
declare const MessageAttachmentParams: z.ZodObject<{
|
|
30
53
|
chatId: z.ZodString;
|
|
31
54
|
messageId: z.ZodString;
|
|
32
55
|
assetId: z.ZodString;
|
|
33
56
|
}, z.core.$strip>;
|
|
34
57
|
type MessageAttachmentParams = z.infer<typeof MessageAttachmentParams>;
|
|
35
|
-
declare const PersonImageParams: z.ZodObject<{
|
|
36
|
-
orgUserId: z.ZodString;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
|
-
type PersonImageParams = z.infer<typeof PersonImageParams>;
|
|
39
58
|
declare const UploadFileParams: z.ZodObject<{
|
|
40
59
|
id: z.ZodString;
|
|
41
60
|
}, z.core.$strip>;
|
|
42
61
|
type UploadFileParams = z.infer<typeof UploadFileParams>;
|
|
43
62
|
//#endregion
|
|
44
|
-
export { ActivityFileParams, CommunityThumbnailParams, CourseThumbnailParams, DownloadFileParams, DownloadThumbnailParams, MessageAttachmentParams,
|
|
63
|
+
export { ActivityFileParams, CommunityThumbnailParams, CourseThumbnailParams, DownloadFileParams, DownloadThumbnailParams, EventFileParams, EventThumbnailParams, MessageAttachmentParams, PostAssetParams, PostCoverParams, SpaceImageParams, UploadFileParams };
|
|
45
64
|
//# sourceMappingURL=files.d.ts.map
|