@headless-lms/server 0.4.0 → 0.5.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 +16 -31
- 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 +71 -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 +19 -14
- 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 +211 -32
- package/dist/http/schemas/chats.js +13 -4
- package/dist/http/schemas/chats.js.map +1 -1
- package/dist/http/schemas/community.d.ts +91 -44
- package/dist/http/schemas/community.js +21 -8
- 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 +15 -5
- package/dist/http/schemas/files.js +10 -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/integrations.d.ts +4 -4
- 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 +333 -69
- package/dist/http/schemas/members.js +67 -25
- package/dist/http/schemas/members.js.map +1 -1
- package/dist/http/schemas/notifications.d.ts +57 -53
- package/dist/http/schemas/platform.d.ts +37 -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 +25 -3
- 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
|
@@ -5,13 +5,13 @@ declare const NotificationIdParam: z.ZodObject<{
|
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
declare const NotificationFilterQuery: z.ZodObject<{
|
|
7
7
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
8
|
-
org: "org";
|
|
9
8
|
community: "community";
|
|
9
|
+
org: "org";
|
|
10
10
|
}>>;
|
|
11
11
|
communityId: z.ZodOptional<z.ZodString>;
|
|
12
12
|
includeOrg: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
13
13
|
category: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
|
|
14
|
-
reason: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<"
|
|
14
|
+
reason: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string, z.core.$ZodTypeInternals<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string>>>>>;
|
|
15
15
|
type: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
|
|
16
16
|
unread: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
17
17
|
}, z.core.$strict>;
|
|
@@ -19,13 +19,13 @@ declare const NotificationListQuery: z.ZodObject<{
|
|
|
19
19
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
20
20
|
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
21
21
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
22
|
-
org: "org";
|
|
23
22
|
community: "community";
|
|
23
|
+
org: "org";
|
|
24
24
|
}>>;
|
|
25
25
|
communityId: z.ZodOptional<z.ZodString>;
|
|
26
26
|
includeOrg: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
27
27
|
category: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
|
|
28
|
-
reason: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<"
|
|
28
|
+
reason: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string, z.core.$ZodTypeInternals<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string>>>>>;
|
|
29
29
|
type: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
|
|
30
30
|
unread: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
31
31
|
}, z.core.$strict>;
|
|
@@ -33,13 +33,12 @@ declare const NotificationView: z.ZodObject<{
|
|
|
33
33
|
id: z.ZodString;
|
|
34
34
|
type: z.ZodString;
|
|
35
35
|
scope: z.ZodEnum<{
|
|
36
|
-
|
|
36
|
+
chat: "chat";
|
|
37
37
|
community: "community";
|
|
38
|
+
org: "org";
|
|
38
39
|
space: "space";
|
|
39
|
-
chat: "chat";
|
|
40
40
|
}>;
|
|
41
41
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
42
|
-
moderator: "moderator";
|
|
43
42
|
subject: "subject";
|
|
44
43
|
post_author: "post_author";
|
|
45
44
|
comment_author: "comment_author";
|
|
@@ -51,10 +50,10 @@ declare const NotificationView: z.ZodObject<{
|
|
|
51
50
|
space_member: "space_member";
|
|
52
51
|
community_member: "community_member";
|
|
53
52
|
course_member: "course_member";
|
|
54
|
-
|
|
53
|
+
event_member: "event_member";
|
|
54
|
+
moderator: "moderator";
|
|
55
55
|
}>>;
|
|
56
56
|
matchedReason: z.ZodEnum<{
|
|
57
|
-
moderator: "moderator";
|
|
58
57
|
subject: "subject";
|
|
59
58
|
post_author: "post_author";
|
|
60
59
|
comment_author: "comment_author";
|
|
@@ -66,7 +65,8 @@ declare const NotificationView: z.ZodObject<{
|
|
|
66
65
|
space_member: "space_member";
|
|
67
66
|
community_member: "community_member";
|
|
68
67
|
course_member: "course_member";
|
|
69
|
-
|
|
68
|
+
event_member: "event_member";
|
|
69
|
+
moderator: "moderator";
|
|
70
70
|
}>;
|
|
71
71
|
category: z.ZodString;
|
|
72
72
|
display: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
@@ -86,15 +86,16 @@ declare const NotificationView: z.ZodObject<{
|
|
|
86
86
|
subject: z.ZodNullable<z.ZodObject<{
|
|
87
87
|
type: z.ZodEnum<{
|
|
88
88
|
message: "message";
|
|
89
|
-
community: "community";
|
|
90
|
-
space: "space";
|
|
91
89
|
chat: "chat";
|
|
92
|
-
|
|
93
|
-
comment: "comment";
|
|
90
|
+
community: "community";
|
|
94
91
|
course: "course";
|
|
95
92
|
download: "download";
|
|
93
|
+
event: "event";
|
|
96
94
|
bundle: "bundle";
|
|
97
95
|
activity: "activity";
|
|
96
|
+
space: "space";
|
|
97
|
+
post: "post";
|
|
98
|
+
comment: "comment";
|
|
98
99
|
}>;
|
|
99
100
|
id: z.ZodString;
|
|
100
101
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -103,15 +104,16 @@ declare const NotificationView: z.ZodObject<{
|
|
|
103
104
|
parent: z.ZodNullable<z.ZodObject<{
|
|
104
105
|
type: z.ZodEnum<{
|
|
105
106
|
message: "message";
|
|
106
|
-
community: "community";
|
|
107
|
-
space: "space";
|
|
108
107
|
chat: "chat";
|
|
109
|
-
|
|
110
|
-
comment: "comment";
|
|
108
|
+
community: "community";
|
|
111
109
|
course: "course";
|
|
112
110
|
download: "download";
|
|
111
|
+
event: "event";
|
|
113
112
|
bundle: "bundle";
|
|
114
113
|
activity: "activity";
|
|
114
|
+
space: "space";
|
|
115
|
+
post: "post";
|
|
116
|
+
comment: "comment";
|
|
115
117
|
}>;
|
|
116
118
|
id: z.ZodString;
|
|
117
119
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -125,13 +127,12 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
125
127
|
id: z.ZodString;
|
|
126
128
|
type: z.ZodString;
|
|
127
129
|
scope: z.ZodEnum<{
|
|
128
|
-
|
|
130
|
+
chat: "chat";
|
|
129
131
|
community: "community";
|
|
132
|
+
org: "org";
|
|
130
133
|
space: "space";
|
|
131
|
-
chat: "chat";
|
|
132
134
|
}>;
|
|
133
135
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
134
|
-
moderator: "moderator";
|
|
135
136
|
subject: "subject";
|
|
136
137
|
post_author: "post_author";
|
|
137
138
|
comment_author: "comment_author";
|
|
@@ -143,10 +144,10 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
143
144
|
space_member: "space_member";
|
|
144
145
|
community_member: "community_member";
|
|
145
146
|
course_member: "course_member";
|
|
146
|
-
|
|
147
|
+
event_member: "event_member";
|
|
148
|
+
moderator: "moderator";
|
|
147
149
|
}>>;
|
|
148
150
|
matchedReason: z.ZodEnum<{
|
|
149
|
-
moderator: "moderator";
|
|
150
151
|
subject: "subject";
|
|
151
152
|
post_author: "post_author";
|
|
152
153
|
comment_author: "comment_author";
|
|
@@ -158,7 +159,8 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
158
159
|
space_member: "space_member";
|
|
159
160
|
community_member: "community_member";
|
|
160
161
|
course_member: "course_member";
|
|
161
|
-
|
|
162
|
+
event_member: "event_member";
|
|
163
|
+
moderator: "moderator";
|
|
162
164
|
}>;
|
|
163
165
|
category: z.ZodString;
|
|
164
166
|
display: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
@@ -178,15 +180,16 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
178
180
|
subject: z.ZodNullable<z.ZodObject<{
|
|
179
181
|
type: z.ZodEnum<{
|
|
180
182
|
message: "message";
|
|
181
|
-
community: "community";
|
|
182
|
-
space: "space";
|
|
183
183
|
chat: "chat";
|
|
184
|
-
|
|
185
|
-
comment: "comment";
|
|
184
|
+
community: "community";
|
|
186
185
|
course: "course";
|
|
187
186
|
download: "download";
|
|
187
|
+
event: "event";
|
|
188
188
|
bundle: "bundle";
|
|
189
189
|
activity: "activity";
|
|
190
|
+
space: "space";
|
|
191
|
+
post: "post";
|
|
192
|
+
comment: "comment";
|
|
190
193
|
}>;
|
|
191
194
|
id: z.ZodString;
|
|
192
195
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -195,15 +198,16 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
195
198
|
parent: z.ZodNullable<z.ZodObject<{
|
|
196
199
|
type: z.ZodEnum<{
|
|
197
200
|
message: "message";
|
|
198
|
-
community: "community";
|
|
199
|
-
space: "space";
|
|
200
201
|
chat: "chat";
|
|
201
|
-
|
|
202
|
-
comment: "comment";
|
|
202
|
+
community: "community";
|
|
203
203
|
course: "course";
|
|
204
204
|
download: "download";
|
|
205
|
+
event: "event";
|
|
205
206
|
bundle: "bundle";
|
|
206
207
|
activity: "activity";
|
|
208
|
+
space: "space";
|
|
209
|
+
post: "post";
|
|
210
|
+
comment: "comment";
|
|
207
211
|
}>;
|
|
208
212
|
id: z.ZodString;
|
|
209
213
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -229,7 +233,6 @@ declare const NotificationCategory: z.ZodObject<{
|
|
|
229
233
|
covers: z.ZodArray<z.ZodObject<{
|
|
230
234
|
type: z.ZodString;
|
|
231
235
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
232
|
-
moderator: "moderator";
|
|
233
236
|
subject: "subject";
|
|
234
237
|
post_author: "post_author";
|
|
235
238
|
comment_author: "comment_author";
|
|
@@ -241,7 +244,8 @@ declare const NotificationCategory: z.ZodObject<{
|
|
|
241
244
|
space_member: "space_member";
|
|
242
245
|
community_member: "community_member";
|
|
243
246
|
course_member: "course_member";
|
|
244
|
-
|
|
247
|
+
event_member: "event_member";
|
|
248
|
+
moderator: "moderator";
|
|
245
249
|
}>>;
|
|
246
250
|
}, z.core.$strict>>;
|
|
247
251
|
channels: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -257,7 +261,6 @@ declare const NotificationCategoryList: z.ZodObject<{
|
|
|
257
261
|
covers: z.ZodArray<z.ZodObject<{
|
|
258
262
|
type: z.ZodString;
|
|
259
263
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
260
|
-
moderator: "moderator";
|
|
261
264
|
subject: "subject";
|
|
262
265
|
post_author: "post_author";
|
|
263
266
|
comment_author: "comment_author";
|
|
@@ -269,7 +272,8 @@ declare const NotificationCategoryList: z.ZodObject<{
|
|
|
269
272
|
space_member: "space_member";
|
|
270
273
|
community_member: "community_member";
|
|
271
274
|
course_member: "course_member";
|
|
272
|
-
|
|
275
|
+
event_member: "event_member";
|
|
276
|
+
moderator: "moderator";
|
|
273
277
|
}>>;
|
|
274
278
|
}, z.core.$strict>>;
|
|
275
279
|
channels: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -290,7 +294,6 @@ declare const ReplaceNotificationCategories: z.ZodObject<{
|
|
|
290
294
|
covers: z.ZodArray<z.ZodObject<{
|
|
291
295
|
type: z.ZodString;
|
|
292
296
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
293
|
-
moderator: "moderator";
|
|
294
297
|
subject: "subject";
|
|
295
298
|
post_author: "post_author";
|
|
296
299
|
comment_author: "comment_author";
|
|
@@ -302,7 +305,8 @@ declare const ReplaceNotificationCategories: z.ZodObject<{
|
|
|
302
305
|
space_member: "space_member";
|
|
303
306
|
community_member: "community_member";
|
|
304
307
|
course_member: "course_member";
|
|
305
|
-
|
|
308
|
+
event_member: "event_member";
|
|
309
|
+
moderator: "moderator";
|
|
306
310
|
}>>;
|
|
307
311
|
}, z.core.$strict>>;
|
|
308
312
|
channels: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -319,7 +323,6 @@ declare const NotificationCategoryDefaults: z.ZodObject<{
|
|
|
319
323
|
covers: z.ZodArray<z.ZodObject<{
|
|
320
324
|
type: z.ZodString;
|
|
321
325
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
322
|
-
moderator: "moderator";
|
|
323
326
|
subject: "subject";
|
|
324
327
|
post_author: "post_author";
|
|
325
328
|
comment_author: "comment_author";
|
|
@@ -331,7 +334,8 @@ declare const NotificationCategoryDefaults: z.ZodObject<{
|
|
|
331
334
|
space_member: "space_member";
|
|
332
335
|
community_member: "community_member";
|
|
333
336
|
course_member: "course_member";
|
|
334
|
-
|
|
337
|
+
event_member: "event_member";
|
|
338
|
+
moderator: "moderator";
|
|
335
339
|
}>>;
|
|
336
340
|
}, z.core.$strict>>;
|
|
337
341
|
channels: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -344,20 +348,19 @@ declare const NotificationCategoryDefaults: z.ZodObject<{
|
|
|
344
348
|
}, z.core.$strip>;
|
|
345
349
|
declare const NotificationListScopeQuery: z.ZodObject<{
|
|
346
350
|
scope: z.ZodEnum<{
|
|
347
|
-
org: "org";
|
|
348
351
|
community: "community";
|
|
352
|
+
org: "org";
|
|
349
353
|
}>;
|
|
350
354
|
}, z.core.$strict>;
|
|
351
355
|
declare const NotificationTypeInfo: z.ZodObject<{
|
|
352
356
|
type: z.ZodString;
|
|
353
357
|
scopes: z.ZodArray<z.ZodEnum<{
|
|
354
|
-
|
|
358
|
+
chat: "chat";
|
|
355
359
|
community: "community";
|
|
360
|
+
org: "org";
|
|
356
361
|
space: "space";
|
|
357
|
-
chat: "chat";
|
|
358
362
|
}>>;
|
|
359
363
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
360
|
-
moderator: "moderator";
|
|
361
364
|
subject: "subject";
|
|
362
365
|
post_author: "post_author";
|
|
363
366
|
comment_author: "comment_author";
|
|
@@ -369,19 +372,19 @@ declare const NotificationTypeInfo: z.ZodObject<{
|
|
|
369
372
|
space_member: "space_member";
|
|
370
373
|
community_member: "community_member";
|
|
371
374
|
course_member: "course_member";
|
|
372
|
-
|
|
375
|
+
event_member: "event_member";
|
|
376
|
+
moderator: "moderator";
|
|
373
377
|
}>>;
|
|
374
378
|
}, z.core.$strip>;
|
|
375
379
|
declare const NotificationTypeInfos: z.ZodArray<z.ZodObject<{
|
|
376
380
|
type: z.ZodString;
|
|
377
381
|
scopes: z.ZodArray<z.ZodEnum<{
|
|
378
|
-
|
|
382
|
+
chat: "chat";
|
|
379
383
|
community: "community";
|
|
384
|
+
org: "org";
|
|
380
385
|
space: "space";
|
|
381
|
-
chat: "chat";
|
|
382
386
|
}>>;
|
|
383
387
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
384
|
-
moderator: "moderator";
|
|
385
388
|
subject: "subject";
|
|
386
389
|
post_author: "post_author";
|
|
387
390
|
comment_author: "comment_author";
|
|
@@ -393,7 +396,8 @@ declare const NotificationTypeInfos: z.ZodArray<z.ZodObject<{
|
|
|
393
396
|
space_member: "space_member";
|
|
394
397
|
community_member: "community_member";
|
|
395
398
|
course_member: "course_member";
|
|
396
|
-
|
|
399
|
+
event_member: "event_member";
|
|
400
|
+
moderator: "moderator";
|
|
397
401
|
}>>;
|
|
398
402
|
}, z.core.$strip>>;
|
|
399
403
|
declare const NotificationChannelInfos: z.ZodArray<z.ZodObject<{
|
|
@@ -418,10 +422,10 @@ declare const CommunityNotificationSettings: z.ZodObject<{
|
|
|
418
422
|
enabled: z.ZodBoolean;
|
|
419
423
|
default: z.ZodBoolean;
|
|
420
424
|
source: z.ZodEnum<{
|
|
425
|
+
locked: "locked";
|
|
421
426
|
default: "default";
|
|
422
427
|
community: "community";
|
|
423
428
|
space: "space";
|
|
424
|
-
locked: "locked";
|
|
425
429
|
spaceDefault: "spaceDefault";
|
|
426
430
|
}>;
|
|
427
431
|
locked: z.ZodBoolean;
|
|
@@ -434,10 +438,10 @@ declare const CommunityNotificationSettings: z.ZodObject<{
|
|
|
434
438
|
enabled: z.ZodBoolean;
|
|
435
439
|
default: z.ZodBoolean;
|
|
436
440
|
source: z.ZodEnum<{
|
|
441
|
+
locked: "locked";
|
|
437
442
|
default: "default";
|
|
438
443
|
community: "community";
|
|
439
444
|
space: "space";
|
|
440
|
-
locked: "locked";
|
|
441
445
|
spaceDefault: "spaceDefault";
|
|
442
446
|
}>;
|
|
443
447
|
locked: z.ZodBoolean;
|
|
@@ -454,10 +458,10 @@ declare const OrgNotificationSettings: z.ZodObject<{
|
|
|
454
458
|
enabled: z.ZodBoolean;
|
|
455
459
|
default: z.ZodBoolean;
|
|
456
460
|
source: z.ZodEnum<{
|
|
461
|
+
locked: "locked";
|
|
457
462
|
default: "default";
|
|
458
463
|
community: "community";
|
|
459
464
|
space: "space";
|
|
460
|
-
locked: "locked";
|
|
461
465
|
spaceDefault: "spaceDefault";
|
|
462
466
|
}>;
|
|
463
467
|
locked: z.ZodBoolean;
|
|
@@ -470,10 +474,10 @@ declare const OrgNotificationSettings: z.ZodObject<{
|
|
|
470
474
|
enabled: z.ZodBoolean;
|
|
471
475
|
default: z.ZodBoolean;
|
|
472
476
|
source: z.ZodEnum<{
|
|
477
|
+
locked: "locked";
|
|
473
478
|
default: "default";
|
|
474
479
|
community: "community";
|
|
475
480
|
space: "space";
|
|
476
|
-
locked: "locked";
|
|
477
481
|
spaceDefault: "spaceDefault";
|
|
478
482
|
}>;
|
|
479
483
|
locked: z.ZodBoolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/http/schemas/platform.d.ts
|
|
3
|
+
declare const CreatePlatformOrganization: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
slug: z.ZodString;
|
|
6
|
+
keyName: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
declare const PlatformOrganization: z.ZodObject<{
|
|
9
|
+
organization: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
slug: z.ZodString;
|
|
13
|
+
createdAt: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
apiKey: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
name: z.ZodNullable<z.ZodString>;
|
|
18
|
+
start: z.ZodNullable<z.ZodString>;
|
|
19
|
+
role: z.ZodNullable<z.ZodObject<{
|
|
20
|
+
key: z.ZodString;
|
|
21
|
+
name: z.ZodNullable<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
24
|
+
lastUsedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
25
|
+
expiresAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
26
|
+
key: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
declare const CreatePlatformApiKey: z.ZodObject<{
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
declare const PlatformOrgIdParam: z.ZodObject<{
|
|
33
|
+
orgId: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { CreatePlatformApiKey, CreatePlatformOrganization, PlatformOrgIdParam, PlatformOrganization };
|
|
37
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Organization } from "./organizations.js";
|
|
2
|
+
import { ApiKeyName, CreatedApiKey } from "./access.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/http/schemas/platform.ts
|
|
5
|
+
const CreatePlatformOrganization = z.object({
|
|
6
|
+
name: z.string().trim().min(1).max(100),
|
|
7
|
+
slug: z.string().min(1).max(50).regex(/^[a-z0-9-]+$/, "Use lowercase letters, numbers, and hyphens only"),
|
|
8
|
+
keyName: ApiKeyName.optional().describe("The name of the API key created with it. Default `Platform`")
|
|
9
|
+
});
|
|
10
|
+
const PlatformOrganization = z.object({
|
|
11
|
+
organization: Organization,
|
|
12
|
+
apiKey: CreatedApiKey
|
|
13
|
+
});
|
|
14
|
+
const CreatePlatformApiKey = z.object({ name: ApiKeyName });
|
|
15
|
+
const PlatformOrgIdParam = z.object({ orgId: z.string() });
|
|
16
|
+
//#endregion
|
|
17
|
+
export { CreatePlatformApiKey, CreatePlatformOrganization, PlatformOrgIdParam, PlatformOrganization };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","names":[],"sources":["../../../src/http/schemas/platform.ts"],"sourcesContent":["import { z } from 'zod';\nimport { ApiKeyName, CreatedApiKey } from './access.js';\nimport { Organization } from './organizations.js';\n\nexport const CreatePlatformOrganization = z.object({\n name: z.string().trim().min(1).max(100),\n slug: z\n .string()\n .min(1)\n .max(50)\n .regex(/^[a-z0-9-]+$/, 'Use lowercase letters, numbers, and hyphens only'),\n keyName: ApiKeyName.optional().describe(\n 'The name of the API key created with it. Default `Platform`',\n ),\n});\n\nexport const PlatformOrganization = z.object({\n organization: Organization,\n apiKey: CreatedApiKey,\n});\n\nexport const CreatePlatformApiKey = z.object({ name: ApiKeyName });\n\nexport const PlatformOrgIdParam = z.object({ orgId: z.string() });\n"],"mappings":";;;;AAIA,MAAa,6BAA6B,EAAE,OAAO;CACjD,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CACtC,MAAM,EACH,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,IAAI,EAAE,CAAC,CACP,MAAM,gBAAgB,kDAAkD;CAC3E,SAAS,WAAW,SAAS,CAAC,CAAC,SAC7B,6DACF;AACF,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO;CAC3C,cAAc;CACd,QAAQ;AACV,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEjE,MAAa,qBAAqB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -27,6 +27,17 @@ declare const PostView: z.ZodObject<{
|
|
|
27
27
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
28
28
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
29
29
|
coverUrl: z.ZodNullable<z.ZodString>;
|
|
30
|
+
assets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
31
|
+
url: z.ZodString;
|
|
32
|
+
kind: z.ZodEnum<{
|
|
33
|
+
image: "image";
|
|
34
|
+
video: "video";
|
|
35
|
+
audio: "audio";
|
|
36
|
+
document: "document";
|
|
37
|
+
}>;
|
|
38
|
+
filename: z.ZodString;
|
|
39
|
+
size: z.ZodNumber;
|
|
40
|
+
}, z.core.$strict>>;
|
|
30
41
|
author: z.ZodObject<{
|
|
31
42
|
id: z.ZodString;
|
|
32
43
|
firstName: z.ZodNullable<z.ZodString>;
|
|
@@ -36,13 +47,8 @@ declare const PostView: z.ZodObject<{
|
|
|
36
47
|
image: z.ZodNullable<z.ZodString>;
|
|
37
48
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
38
49
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
admin: "admin";
|
|
42
|
-
instructor: "instructor";
|
|
43
|
-
moderator: "moderator";
|
|
44
|
-
student: "student";
|
|
45
|
-
}>;
|
|
50
|
+
team: z.ZodBoolean;
|
|
51
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
46
52
|
}, z.core.$strict>;
|
|
47
53
|
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
48
54
|
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
@@ -103,6 +109,17 @@ declare const PostFeedPage: z.ZodObject<{
|
|
|
103
109
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
104
110
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
105
111
|
coverUrl: z.ZodNullable<z.ZodString>;
|
|
112
|
+
assets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
113
|
+
url: z.ZodString;
|
|
114
|
+
kind: z.ZodEnum<{
|
|
115
|
+
image: "image";
|
|
116
|
+
video: "video";
|
|
117
|
+
audio: "audio";
|
|
118
|
+
document: "document";
|
|
119
|
+
}>;
|
|
120
|
+
filename: z.ZodString;
|
|
121
|
+
size: z.ZodNumber;
|
|
122
|
+
}, z.core.$strict>>;
|
|
106
123
|
author: z.ZodObject<{
|
|
107
124
|
id: z.ZodString;
|
|
108
125
|
firstName: z.ZodNullable<z.ZodString>;
|
|
@@ -112,13 +129,8 @@ declare const PostFeedPage: z.ZodObject<{
|
|
|
112
129
|
image: z.ZodNullable<z.ZodString>;
|
|
113
130
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
114
131
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
admin: "admin";
|
|
118
|
-
instructor: "instructor";
|
|
119
|
-
moderator: "moderator";
|
|
120
|
-
student: "student";
|
|
121
|
-
}>;
|
|
132
|
+
team: z.ZodBoolean;
|
|
133
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
122
134
|
}, z.core.$strict>;
|
|
123
135
|
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
124
136
|
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
@@ -210,6 +222,17 @@ declare const SpaceQueue: z.ZodObject<{
|
|
|
210
222
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
211
223
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
212
224
|
coverUrl: z.ZodNullable<z.ZodString>;
|
|
225
|
+
assets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
226
|
+
url: z.ZodString;
|
|
227
|
+
kind: z.ZodEnum<{
|
|
228
|
+
image: "image";
|
|
229
|
+
video: "video";
|
|
230
|
+
audio: "audio";
|
|
231
|
+
document: "document";
|
|
232
|
+
}>;
|
|
233
|
+
filename: z.ZodString;
|
|
234
|
+
size: z.ZodNumber;
|
|
235
|
+
}, z.core.$strict>>;
|
|
213
236
|
author: z.ZodObject<{
|
|
214
237
|
id: z.ZodString;
|
|
215
238
|
firstName: z.ZodNullable<z.ZodString>;
|
|
@@ -219,13 +242,8 @@ declare const SpaceQueue: z.ZodObject<{
|
|
|
219
242
|
image: z.ZodNullable<z.ZodString>;
|
|
220
243
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
221
244
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
admin: "admin";
|
|
225
|
-
instructor: "instructor";
|
|
226
|
-
moderator: "moderator";
|
|
227
|
-
student: "student";
|
|
228
|
-
}>;
|
|
245
|
+
team: z.ZodBoolean;
|
|
246
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
229
247
|
}, z.core.$strict>;
|
|
230
248
|
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
231
249
|
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
@@ -282,6 +300,18 @@ declare const SpaceQueue: z.ZodObject<{
|
|
|
282
300
|
published: "published";
|
|
283
301
|
removed: "removed";
|
|
284
302
|
}>;
|
|
303
|
+
author: z.ZodObject<{
|
|
304
|
+
id: z.ZodString;
|
|
305
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
306
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
307
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
308
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
309
|
+
image: z.ZodNullable<z.ZodString>;
|
|
310
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
311
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
312
|
+
team: z.ZodBoolean;
|
|
313
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
314
|
+
}, z.core.$strict>;
|
|
285
315
|
}, z.core.$strict>;
|
|
286
316
|
}, z.core.$strict>>;
|
|
287
317
|
}, z.core.$strip>;
|
|
@@ -301,13 +331,8 @@ declare const PostCommentsPage: z.ZodObject<{
|
|
|
301
331
|
image: z.ZodNullable<z.ZodString>;
|
|
302
332
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
303
333
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
admin: "admin";
|
|
307
|
-
instructor: "instructor";
|
|
308
|
-
moderator: "moderator";
|
|
309
|
-
student: "student";
|
|
310
|
-
}>;
|
|
334
|
+
team: z.ZodBoolean;
|
|
335
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
311
336
|
}, z.core.$strict>;
|
|
312
337
|
body: z.ZodNullable<z.ZodString>;
|
|
313
338
|
status: z.ZodEnum<{
|
|
@@ -324,13 +349,8 @@ declare const PostCommentsPage: z.ZodObject<{
|
|
|
324
349
|
image: z.ZodNullable<z.ZodString>;
|
|
325
350
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
326
351
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
admin: "admin";
|
|
330
|
-
instructor: "instructor";
|
|
331
|
-
moderator: "moderator";
|
|
332
|
-
student: "student";
|
|
333
|
-
}>;
|
|
352
|
+
team: z.ZodBoolean;
|
|
353
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
334
354
|
}, z.core.$strict>>;
|
|
335
355
|
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
336
356
|
viewerReaction: z.ZodOptional<z.ZodString>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DateTimeInput, PageQuery, paginated } from "./shared.js";
|
|
2
2
|
import { CommentView } from "./discussion.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { boundedJsonSchema,
|
|
4
|
+
import { boundedJsonSchema, flaggedCommentViewSchema, idSchema, postFlagResolutionSchema, postFlagSchema, postViewSchema } from "@headless-lms/core/schemas";
|
|
5
5
|
//#region src/http/schemas/posts.ts
|
|
6
6
|
const PostView = postViewSchema;
|
|
7
7
|
const PostFlag = postFlagSchema;
|
|
@@ -9,7 +9,7 @@ const PostFeedPage = paginated(PostView);
|
|
|
9
9
|
const PostIdParam = z.object({ postId: z.string() });
|
|
10
10
|
const FeedQuery = PageQuery.extend({ topicId: z.string().optional().describe("Only posts under this topic") }).strict();
|
|
11
11
|
const PostTitle = z.string().trim().min(1).max(200);
|
|
12
|
-
const PostBody = z.string().max(5e4);
|
|
12
|
+
const PostBody = z.string().max(5e4).describe("The post's text, in the installation's body format (plain text unless the installation sets one). Mention a member with `<@orgUserId>`.");
|
|
13
13
|
const PostExtra = boundedJsonSchema(16 * 1024);
|
|
14
14
|
const CreatePost = z.object({
|
|
15
15
|
title: PostTitle,
|
|
@@ -21,7 +21,7 @@ const CreatePost = z.object({
|
|
|
21
21
|
"draft",
|
|
22
22
|
"submit",
|
|
23
23
|
"schedule"
|
|
24
|
-
]).describe("`draft` keeps the post to yourself. `submit` publishes it, or holds it for review when the space requires review and you
|
|
24
|
+
]).describe("`draft` keeps the post to yourself. `submit` publishes it, or holds it for review when the space requires review and you do not moderate the community. `schedule` submits it at `scheduledAt`."),
|
|
25
25
|
scheduledAt: DateTimeInput.nullable().describe("When a scheduled post is submitted. Required, and in the future, when `mode` is `schedule`; ignored otherwise.")
|
|
26
26
|
}).strict();
|
|
27
27
|
const UpdatePost = z.object({
|
|
@@ -38,7 +38,7 @@ const ResolvePostFlags = z.object({ resolution: postFlagResolutionSchema.extract
|
|
|
38
38
|
const SpaceQueue = z.object({
|
|
39
39
|
pending: z.array(PostView),
|
|
40
40
|
flags: z.array(PostFlag),
|
|
41
|
-
commentFlags: z.array(
|
|
41
|
+
commentFlags: z.array(flaggedCommentViewSchema)
|
|
42
42
|
});
|
|
43
43
|
const PostCommentsPage = paginated(CommentView);
|
|
44
44
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.js","names":[],"sources":["../../../src/http/schemas/posts.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n boundedJsonSchema,\n
|
|
1
|
+
{"version":3,"file":"posts.js","names":[],"sources":["../../../src/http/schemas/posts.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n boundedJsonSchema,\n flaggedCommentViewSchema,\n idSchema,\n postFlagResolutionSchema,\n postFlagSchema,\n postViewSchema,\n} from '@headless-lms/core/schemas';\nimport { CommentView } from './discussion.js';\nimport { DateTimeInput, PageQuery, paginated } from './shared.js';\n\nexport const PostView = postViewSchema;\nexport const PostFlag = postFlagSchema;\nexport const PostFeedPage = paginated(PostView);\nexport const PostIdParam = z.object({ postId: z.string() });\nexport const FeedQuery = PageQuery.extend({\n topicId: z.string().optional().describe('Only posts under this topic'),\n}).strict();\n\nconst PostTitle = z.string().trim().min(1).max(200);\nconst PostBody = z\n .string()\n .max(50_000)\n .describe(\n \"The post's text, in the installation's body format (plain text unless the installation sets one). Mention a member with `<@orgUserId>`.\",\n );\nconst PostExtra = boundedJsonSchema(16 * 1024);\n\nexport const CreatePost = z\n .object({\n title: PostTitle,\n body: PostBody,\n topicId: idSchema\n .nullable()\n .describe(\"One of the space's topics. Required when the space has topics, else null\"),\n extra: PostExtra.default({}),\n coverAssetId: idSchema\n .nullable()\n .describe('A finalized image you uploaded through `requestMemberUpload`'),\n mode: z\n .enum(['draft', 'submit', 'schedule'])\n .describe(\n '`draft` keeps the post to yourself. `submit` publishes it, or holds it for review when the space requires review and you do not moderate the community. `schedule` submits it at `scheduledAt`.',\n ),\n scheduledAt: DateTimeInput.nullable().describe(\n 'When a scheduled post is submitted. Required, and in the future, when `mode` is `schedule`; ignored otherwise.',\n ),\n })\n .strict();\n\nexport const UpdatePost = z\n .object({\n title: PostTitle.optional(),\n body: PostBody.optional(),\n topicId: idSchema.nullable().optional(),\n extra: PostExtra.optional(),\n coverAssetId: idSchema.nullable().optional(),\n })\n .strict();\n\nexport const SchedulePost = z\n .object({\n scheduledAt: DateTimeInput.describe('When the post is submitted; must be in the future'),\n })\n .strict();\nexport const SetPostReactions = z\n .object({ enabled: z.boolean().describe('Whether readers may react to this post') })\n .strict();\nexport const FlagReason = z.object({ reason: z.string().trim().min(1).max(1_000) }).strict();\nexport const ResolvePostFlags = z\n .object({\n resolution: postFlagResolutionSchema\n .extract(['dismissed'])\n .describe(\n '`dismissed` closes the open flags and leaves the post up. Removing the post resolves its flags as `removed` instead.',\n ),\n })\n .strict();\n\nexport const SpaceQueue = z.object({\n pending: z.array(PostView),\n flags: z.array(PostFlag),\n commentFlags: z.array(flaggedCommentViewSchema),\n});\n\nexport const PostCommentsPage = paginated(CommentView);\n"],"mappings":";;;;;AAYA,MAAa,WAAW;AACxB,MAAa,WAAW;AACxB,MAAa,eAAe,UAAU,QAAQ;AAC9C,MAAa,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC1D,MAAa,YAAY,UAAU,OAAO,EACxC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,6BAA6B,EACvE,CAAC,CAAC,CAAC,OAAO;AAEV,MAAM,YAAY,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AAClD,MAAM,WAAW,EACd,OAAO,CAAC,CACR,IAAI,GAAM,CAAC,CACX,SACC,yIACF;AACF,MAAM,YAAY,kBAAkB,KAAK,IAAI;AAE7C,MAAa,aAAa,EACvB,OAAO;CACN,OAAO;CACP,MAAM;CACN,SAAS,SACN,SAAS,CAAC,CACV,SAAS,0EAA0E;CACtF,OAAO,UAAU,QAAQ,CAAC,CAAC;CAC3B,cAAc,SACX,SAAS,CAAC,CACV,SAAS,8DAA8D;CAC1E,MAAM,EACH,KAAK;EAAC;EAAS;EAAU;CAAU,CAAC,CAAC,CACrC,SACC,iMACF;CACF,aAAa,cAAc,SAAS,CAAC,CAAC,SACpC,gHACF;AACF,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,aAAa,EACvB,OAAO;CACN,OAAO,UAAU,SAAS;CAC1B,MAAM,SAAS,SAAS;CACxB,SAAS,SAAS,SAAS,CAAC,CAAC,SAAS;CACtC,OAAO,UAAU,SAAS;CAC1B,cAAc,SAAS,SAAS,CAAC,CAAC,SAAS;AAC7C,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,eAAe,EACzB,OAAO,EACN,aAAa,cAAc,SAAS,mDAAmD,EACzF,CAAC,CAAC,CACD,OAAO;AACV,MAAa,mBAAmB,EAC7B,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC,EAAE,CAAC,CAAC,CACnF,OAAO;AACV,MAAa,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAK,EAAE,CAAC,CAAC,CAAC,OAAO;AAC3F,MAAa,mBAAmB,EAC7B,OAAO,EACN,YAAY,yBACT,QAAQ,CAAC,WAAW,CAAC,CAAC,CACtB,SACC,sHACF,EACJ,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,aAAa,EAAE,OAAO;CACjC,SAAS,EAAE,MAAM,QAAQ;CACzB,OAAO,EAAE,MAAM,QAAQ;CACvB,cAAc,EAAE,MAAM,wBAAwB;AAChD,CAAC;AAED,MAAa,mBAAmB,UAAU,WAAW"}
|
|
@@ -3,10 +3,10 @@ import { z } from "zod";
|
|
|
3
3
|
declare const UserProfile: z.ZodObject<{
|
|
4
4
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
5
5
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
6
|
-
imageUrl: z.ZodNullable<z.ZodString>;
|
|
7
6
|
displayName: z.ZodNullable<z.ZodString>;
|
|
8
7
|
headline: z.ZodNullable<z.ZodString>;
|
|
9
8
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
9
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
10
10
|
bio: z.ZodNullable<z.ZodString>;
|
|
11
11
|
extra: z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>;
|
|
12
12
|
userId: z.ZodString;
|