@headless-lms/server 0.3.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 +10 -10
- package/dist/app/community-mail.js +72 -28
- package/dist/app/community-mail.js.map +1 -1
- package/dist/app/container.d.ts +48 -10
- package/dist/app/container.js +268 -48
- package/dist/app/container.js.map +1 -1
- package/dist/app/notification-channels.d.ts +47 -0
- package/dist/app/notification-channels.js +175 -0
- package/dist/app/notification-channels.js.map +1 -0
- package/dist/app/notification-reads.d.ts +23 -0
- package/dist/app/notification-reads.js +74 -0
- package/dist/app/notification-reads.js.map +1 -0
- 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.d.ts +1 -0
- package/dist/http/errors.js +24 -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 +13 -3
- 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 +144 -136
- 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 +177 -75
- 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 +68 -51
- 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.d.ts +7 -0
- package/dist/http/routes/member/devices.js +97 -0
- package/dist/http/routes/member/devices.js.map +1 -0
- 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 +6 -0
- package/dist/http/routes/member/index.js.map +1 -1
- package/dist/http/routes/member/notification-settings.d.ts +7 -0
- package/dist/http/routes/member/notification-settings.js +100 -0
- package/dist/http/routes/member/notification-settings.js.map +1 -0
- package/dist/http/routes/member/notifications.js +69 -45
- 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 +94 -95
- 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 +415 -110
- 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 +13 -8
- 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 -8
- package/dist/http/schemas/chats.d.ts +238 -36
- package/dist/http/schemas/chats.js +14 -7
- package/dist/http/schemas/chats.js.map +1 -1
- package/dist/http/schemas/community.d.ts +140 -33
- 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 +45 -73
- package/dist/http/schemas/discussion.js +16 -4
- 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 +14 -12
- package/dist/http/schemas/index.js +14 -12
- 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 +502 -175
- package/dist/http/schemas/notifications.js +148 -28
- package/dist/http/schemas/notifications.js.map +1 -1
- 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 +92 -38
- 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 +10 -13
- package/dist/http/schemas/shared.js +3 -11
- 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 -12
- package/dist/http/scope.js +30 -35
- 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 +5 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chats.js","names":[],"sources":["../../../src/http/schemas/chats.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n chatLastMessageSchema,\n chatSchema,\n idSchema,\n messageFlagResolutionSchema,\n messageFlagSchema,\n messageViewSchema,\n} from '@headless-lms/core/schemas';\nimport {
|
|
1
|
+
{"version":3,"file":"chats.js","names":[],"sources":["../../../src/http/schemas/chats.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n chatLastMessageSchema,\n chatLiveEventSchema,\n chatSchema,\n chatUnreadSummarySchema,\n commentAuthorSchema,\n idSchema,\n messageFlagResolutionSchema,\n messageFlagSchema,\n messageViewSchema,\n subscriptionViewSchema,\n} from '@headless-lms/core/schemas';\nimport { PageQuery, paginated } from './shared.js';\n\nexport const Chat = chatSchema;\nexport const MessageFlag = messageFlagSchema;\nexport const MessageView = messageViewSchema;\nexport const MessagesPage = paginated(MessageView);\n\nexport const ChatListItem = z.object({\n chat: Chat,\n participantIds: z.array(z.string()),\n participants: z\n .array(commentAuthorSchema)\n .describe('The profiles of the people in `participantIds`'),\n lastReadMessageId: z.string().nullable(),\n subscription: subscriptionViewSchema\n .nullable()\n .describe('Your mute on this chat while it applies; null when none'),\n unread: z.number().int(),\n lastMessage: chatLastMessageSchema.nullable(),\n});\nexport const ChatsPage = paginated(ChatListItem);\n\nexport const ChatListQuery = PageQuery.extend({\n requests: z\n .stringbool()\n .optional()\n .describe(\n '`true` for only the pending message requests to you, `false` for everything else; omit for every chat',\n ),\n}).strict();\n\nexport const ChatUnreadSummary = chatUnreadSummarySchema;\nexport const ChatLiveEvent = chatLiveEventSchema;\n\nexport const MessageQueueEntry = z.object({\n message: MessageView,\n flags: z.array(MessageFlag),\n chat: Chat,\n participantIds: z.array(z.string()),\n});\n\nexport const MessageQueue = z.object({\n entries: z.array(MessageQueueEntry),\n});\n\nconst MessageBody = z.string().trim().min(1).max(10_000);\nconst Attachments = z\n .array(idSchema)\n .max(10)\n .default([])\n .describe('Up to 10 finalized images you uploaded through `requestMemberUpload`');\n\nexport const StartDirectChat = z\n .object({\n communityId: idSchema,\n orgUserId: idSchema.describe('The person to talk to'),\n body: MessageBody.nullable().describe(\n 'The first message. Null opens the chat without one; a new chat that starts as a message request needs one, and attachments need one.',\n ),\n assetIds: Attachments,\n })\n .strict();\n\nexport const StartGroupChat = z\n .object({\n communityId: idSchema,\n orgUserIds: z\n .array(idSchema)\n .min(2)\n .max(99)\n .describe(\n \"The people to add besides you. The chat may not exceed the community's group size.\",\n ),\n })\n .strict();\n\nexport const SendMessage = z\n .object({\n body: MessageBody,\n replyToId: idSchema\n .nullable()\n .default(null)\n .describe('A message in the same chat this one answers'),\n assetIds: Attachments,\n clientId: z\n .uuid()\n .optional()\n .describe(\n 'Your id for this send. Sending again with the same id returns the message already sent.',\n ),\n })\n .strict();\n\nexport const EditMessage = z.object({ body: MessageBody }).strict();\nexport const MarkRead = z\n .object({ messageId: idSchema.describe('The newest message you have read in this chat') })\n .strict();\nexport const OrgUserBody = z.object({ orgUserId: idSchema }).strict();\nexport const ResolveMessageFlags = z\n .object({\n resolution: messageFlagResolutionSchema\n .extract(['dismissed'])\n .describe(\n '`dismissed` closes the open flags and leaves the message up. Deleting the message or locking the chat resolves its flags as `deleted` or `locked` instead.',\n ),\n })\n .strict();\n\nexport const ChatIdParam = z.object({ chatId: z.string() });\nexport const MessageIdParam = z.object({ messageId: z.string() });\nexport const CommunityParam = z.object({ communityId: z.string() });\nexport const BlockParam = z.object({ communityId: z.string(), orgUserId: z.string() });\nexport const DirectChatParam = z.object({ communityId: z.string(), orgUserId: z.string() });\n"],"mappings":";;;;AAeA,MAAa,OAAO;AACpB,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,eAAe,UAAU,WAAW;AAEjD,MAAa,eAAe,EAAE,OAAO;CACnC,MAAM;CACN,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;CAClC,cAAc,EACX,MAAM,mBAAmB,CAAC,CAC1B,SAAS,gDAAgD;CAC5D,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS;CACvC,cAAc,uBACX,SAAS,CAAC,CACV,SAAS,yDAAyD;CACrE,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI;CACvB,aAAa,sBAAsB,SAAS;AAC9C,CAAC;AACD,MAAa,YAAY,UAAU,YAAY;AAE/C,MAAa,gBAAgB,UAAU,OAAO,EAC5C,UAAU,EACP,WAAW,CAAC,CACZ,SAAS,CAAC,CACV,SACC,uGACF,EACJ,CAAC,CAAC,CAAC,OAAO;AAEV,MAAa,oBAAoB;AACjC,MAAa,gBAAgB;AAE7B,MAAa,oBAAoB,EAAE,OAAO;CACxC,SAAS;CACT,OAAO,EAAE,MAAM,WAAW;CAC1B,MAAM;CACN,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;AACpC,CAAC;AAED,MAAa,eAAe,EAAE,OAAO,EACnC,SAAS,EAAE,MAAM,iBAAiB,EACpC,CAAC;AAED,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAM;AACvD,MAAM,cAAc,EACjB,MAAM,QAAQ,CAAC,CACf,IAAI,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,CAAC,CACX,SAAS,sEAAsE;AAElF,MAAa,kBAAkB,EAC5B,OAAO;CACN,aAAa;CACb,WAAW,SAAS,SAAS,uBAAuB;C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-16,12 +16,21 @@ declare const Community: z.ZodObject<{
|
|
|
16
16
|
dm: z.ZodObject<{
|
|
17
17
|
enabled: z.ZodBoolean;
|
|
18
18
|
memberToMember: z.ZodBoolean;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
memberToTeam: z.ZodBoolean;
|
|
20
|
+
teamToAnyone: z.ZodBoolean;
|
|
21
21
|
firstMessageIsRequest: z.ZodBoolean;
|
|
22
22
|
groupChats: z.ZodBoolean;
|
|
23
23
|
groupSize: z.ZodNumber;
|
|
24
24
|
}, z.core.$strict>;
|
|
25
|
+
digest: z.ZodNullable<z.ZodObject<{
|
|
26
|
+
cadence: z.ZodEnum<{
|
|
27
|
+
daily: "daily";
|
|
28
|
+
weekly: "weekly";
|
|
29
|
+
}>;
|
|
30
|
+
weekday: z.ZodNumber;
|
|
31
|
+
hour: z.ZodNumber;
|
|
32
|
+
timeZone: z.ZodString;
|
|
33
|
+
}, z.core.$strict>>;
|
|
25
34
|
}, z.core.$strict>;
|
|
26
35
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
27
36
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -54,12 +63,21 @@ declare const CommunitiesPage: z.ZodObject<{
|
|
|
54
63
|
dm: z.ZodObject<{
|
|
55
64
|
enabled: z.ZodBoolean;
|
|
56
65
|
memberToMember: z.ZodBoolean;
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
memberToTeam: z.ZodBoolean;
|
|
67
|
+
teamToAnyone: z.ZodBoolean;
|
|
59
68
|
firstMessageIsRequest: z.ZodBoolean;
|
|
60
69
|
groupChats: z.ZodBoolean;
|
|
61
70
|
groupSize: z.ZodNumber;
|
|
62
71
|
}, z.core.$strict>;
|
|
72
|
+
digest: z.ZodNullable<z.ZodObject<{
|
|
73
|
+
cadence: z.ZodEnum<{
|
|
74
|
+
daily: "daily";
|
|
75
|
+
weekly: "weekly";
|
|
76
|
+
}>;
|
|
77
|
+
weekday: z.ZodNumber;
|
|
78
|
+
hour: z.ZodNumber;
|
|
79
|
+
timeZone: z.ZodString;
|
|
80
|
+
}, z.core.$strict>>;
|
|
63
81
|
}, z.core.$strict>;
|
|
64
82
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
65
83
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -85,17 +103,35 @@ declare const UpdateCommunity: z.ZodObject<{
|
|
|
85
103
|
declare const PatchDmSettings: z.ZodObject<{
|
|
86
104
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
87
105
|
memberToMember: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
-
|
|
89
|
-
|
|
106
|
+
memberToTeam: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
+
teamToAnyone: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
firstMessageIsRequest: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
groupChats: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
groupSize: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
}, z.core.$strict>;
|
|
112
|
+
declare const PatchCommunitySettings: z.ZodObject<{
|
|
113
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
memberToMember: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
+
memberToTeam: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
+
teamToAnyone: z.ZodOptional<z.ZodBoolean>;
|
|
90
117
|
firstMessageIsRequest: z.ZodOptional<z.ZodBoolean>;
|
|
91
118
|
groupChats: z.ZodOptional<z.ZodBoolean>;
|
|
92
119
|
groupSize: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
digest: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
121
|
+
cadence: z.ZodEnum<{
|
|
122
|
+
daily: "daily";
|
|
123
|
+
weekly: "weekly";
|
|
124
|
+
}>;
|
|
125
|
+
weekday: z.ZodNumber;
|
|
126
|
+
hour: z.ZodNumber;
|
|
127
|
+
timeZone: z.ZodString;
|
|
128
|
+
}, z.core.$strict>>>;
|
|
93
129
|
}, z.core.$strict>;
|
|
94
130
|
declare const DmSettings: z.ZodObject<{
|
|
95
131
|
enabled: z.ZodBoolean;
|
|
96
132
|
memberToMember: z.ZodBoolean;
|
|
97
|
-
|
|
98
|
-
|
|
133
|
+
memberToTeam: z.ZodBoolean;
|
|
134
|
+
teamToAnyone: z.ZodBoolean;
|
|
99
135
|
firstMessageIsRequest: z.ZodBoolean;
|
|
100
136
|
groupChats: z.ZodBoolean;
|
|
101
137
|
groupSize: z.ZodNumber;
|
|
@@ -233,6 +269,9 @@ declare const CommunitySpaceParam: z.ZodObject<{
|
|
|
233
269
|
communityId: z.ZodString;
|
|
234
270
|
spaceId: z.ZodString;
|
|
235
271
|
}, z.core.$strip>;
|
|
272
|
+
declare const SpaceIdParam: z.ZodObject<{
|
|
273
|
+
spaceId: z.ZodString;
|
|
274
|
+
}, z.core.$strip>;
|
|
236
275
|
declare const SpaceLinkParam: z.ZodObject<{
|
|
237
276
|
communityId: z.ZodString;
|
|
238
277
|
spaceId: z.ZodString;
|
|
@@ -265,13 +304,9 @@ declare const CommunityMember: z.ZodObject<{
|
|
|
265
304
|
lastName: z.ZodNullable<z.ZodString>;
|
|
266
305
|
email: z.ZodString;
|
|
267
306
|
image: z.ZodNullable<z.ZodString>;
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
instructor: "instructor";
|
|
272
|
-
moderator: "moderator";
|
|
273
|
-
student: "student";
|
|
274
|
-
}>;
|
|
307
|
+
team: z.ZodBoolean;
|
|
308
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
309
|
+
opensEverySpace: z.ZodBoolean;
|
|
275
310
|
}, z.core.$strip>;
|
|
276
311
|
declare const CommunityMembersQuery: z.ZodObject<{
|
|
277
312
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -285,13 +320,9 @@ declare const CommunityMembersPage: z.ZodObject<{
|
|
|
285
320
|
lastName: z.ZodNullable<z.ZodString>;
|
|
286
321
|
email: z.ZodString;
|
|
287
322
|
image: z.ZodNullable<z.ZodString>;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
instructor: "instructor";
|
|
292
|
-
moderator: "moderator";
|
|
293
|
-
student: "student";
|
|
294
|
-
}>;
|
|
323
|
+
team: z.ZodBoolean;
|
|
324
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
325
|
+
opensEverySpace: z.ZodBoolean;
|
|
295
326
|
}, z.core.$strip>>;
|
|
296
327
|
total: z.ZodNumber;
|
|
297
328
|
page: z.ZodNumber;
|
|
@@ -299,12 +330,14 @@ declare const CommunityMembersPage: z.ZodObject<{
|
|
|
299
330
|
}, z.core.$strip>;
|
|
300
331
|
declare const DirectoryEntry: z.ZodObject<{
|
|
301
332
|
orgUserId: z.ZodString;
|
|
302
|
-
role: z.ZodString;
|
|
303
333
|
displayName: z.ZodNullable<z.ZodString>;
|
|
304
334
|
headline: z.ZodNullable<z.ZodString>;
|
|
305
335
|
bio: z.ZodNullable<z.ZodString>;
|
|
306
336
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
307
337
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
338
|
+
team: z.ZodBoolean;
|
|
339
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
340
|
+
opensEverySpace: z.ZodBoolean;
|
|
308
341
|
}, z.core.$strip>;
|
|
309
342
|
declare const DirectoryQuery: z.ZodObject<{
|
|
310
343
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -314,12 +347,14 @@ declare const DirectoryQuery: z.ZodObject<{
|
|
|
314
347
|
declare const DirectoryPage: z.ZodObject<{
|
|
315
348
|
rows: z.ZodArray<z.ZodObject<{
|
|
316
349
|
orgUserId: z.ZodString;
|
|
317
|
-
role: z.ZodString;
|
|
318
350
|
displayName: z.ZodNullable<z.ZodString>;
|
|
319
351
|
headline: z.ZodNullable<z.ZodString>;
|
|
320
352
|
bio: z.ZodNullable<z.ZodString>;
|
|
321
353
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
322
354
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
355
|
+
team: z.ZodBoolean;
|
|
356
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
357
|
+
opensEverySpace: z.ZodBoolean;
|
|
323
358
|
}, z.core.$strip>>;
|
|
324
359
|
total: z.ZodNumber;
|
|
325
360
|
page: z.ZodNumber;
|
|
@@ -336,9 +371,9 @@ declare const LockedCommunitySpace: z.ZodObject<{
|
|
|
336
371
|
}>;
|
|
337
372
|
standing: z.ZodEnum<{
|
|
338
373
|
open: "open";
|
|
339
|
-
member: "member";
|
|
340
374
|
requested: "requested";
|
|
341
375
|
invited: "invited";
|
|
376
|
+
member: "member";
|
|
342
377
|
full: "full";
|
|
343
378
|
none: "none";
|
|
344
379
|
}>;
|
|
@@ -355,9 +390,9 @@ declare const OpenCommunitySpace: z.ZodObject<{
|
|
|
355
390
|
}>;
|
|
356
391
|
standing: z.ZodEnum<{
|
|
357
392
|
open: "open";
|
|
358
|
-
member: "member";
|
|
359
393
|
requested: "requested";
|
|
360
394
|
invited: "invited";
|
|
395
|
+
member: "member";
|
|
361
396
|
full: "full";
|
|
362
397
|
none: "none";
|
|
363
398
|
}>;
|
|
@@ -383,6 +418,13 @@ declare const OpenCommunitySpace: z.ZodObject<{
|
|
|
383
418
|
}>;
|
|
384
419
|
title: z.ZodString;
|
|
385
420
|
}, z.core.$strip>>;
|
|
421
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
422
|
+
state: z.ZodEnum<{
|
|
423
|
+
following: "following";
|
|
424
|
+
muted: "muted";
|
|
425
|
+
}>;
|
|
426
|
+
mutedUntil: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
427
|
+
}, z.core.$strict>>;
|
|
386
428
|
}, z.core.$strip>;
|
|
387
429
|
declare const CommunityHomeSpace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
388
430
|
id: z.ZodString;
|
|
@@ -395,9 +437,9 @@ declare const CommunityHomeSpace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
395
437
|
}>;
|
|
396
438
|
standing: z.ZodEnum<{
|
|
397
439
|
open: "open";
|
|
398
|
-
member: "member";
|
|
399
440
|
requested: "requested";
|
|
400
441
|
invited: "invited";
|
|
442
|
+
member: "member";
|
|
401
443
|
full: "full";
|
|
402
444
|
none: "none";
|
|
403
445
|
}>;
|
|
@@ -413,9 +455,9 @@ declare const CommunityHomeSpace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
413
455
|
}>;
|
|
414
456
|
standing: z.ZodEnum<{
|
|
415
457
|
open: "open";
|
|
416
|
-
member: "member";
|
|
417
458
|
requested: "requested";
|
|
418
459
|
invited: "invited";
|
|
460
|
+
member: "member";
|
|
419
461
|
full: "full";
|
|
420
462
|
none: "none";
|
|
421
463
|
}>;
|
|
@@ -441,6 +483,13 @@ declare const CommunityHomeSpace: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
441
483
|
}>;
|
|
442
484
|
title: z.ZodString;
|
|
443
485
|
}, z.core.$strip>>;
|
|
486
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
487
|
+
state: z.ZodEnum<{
|
|
488
|
+
following: "following";
|
|
489
|
+
muted: "muted";
|
|
490
|
+
}>;
|
|
491
|
+
mutedUntil: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
492
|
+
}, z.core.$strict>>;
|
|
444
493
|
}, z.core.$strip>], "locked">;
|
|
445
494
|
declare const CommunityHome: z.ZodObject<{
|
|
446
495
|
communityId: z.ZodString;
|
|
@@ -450,8 +499,8 @@ declare const CommunityHome: z.ZodObject<{
|
|
|
450
499
|
dm: z.ZodObject<{
|
|
451
500
|
enabled: z.ZodBoolean;
|
|
452
501
|
memberToMember: z.ZodBoolean;
|
|
453
|
-
|
|
454
|
-
|
|
502
|
+
memberToTeam: z.ZodBoolean;
|
|
503
|
+
teamToAnyone: z.ZodBoolean;
|
|
455
504
|
firstMessageIsRequest: z.ZodBoolean;
|
|
456
505
|
groupChats: z.ZodBoolean;
|
|
457
506
|
groupSize: z.ZodNumber;
|
|
@@ -467,9 +516,9 @@ declare const CommunityHome: z.ZodObject<{
|
|
|
467
516
|
}>;
|
|
468
517
|
standing: z.ZodEnum<{
|
|
469
518
|
open: "open";
|
|
470
|
-
member: "member";
|
|
471
519
|
requested: "requested";
|
|
472
520
|
invited: "invited";
|
|
521
|
+
member: "member";
|
|
473
522
|
full: "full";
|
|
474
523
|
none: "none";
|
|
475
524
|
}>;
|
|
@@ -485,9 +534,9 @@ declare const CommunityHome: z.ZodObject<{
|
|
|
485
534
|
}>;
|
|
486
535
|
standing: z.ZodEnum<{
|
|
487
536
|
open: "open";
|
|
488
|
-
member: "member";
|
|
489
537
|
requested: "requested";
|
|
490
538
|
invited: "invited";
|
|
539
|
+
member: "member";
|
|
491
540
|
full: "full";
|
|
492
541
|
none: "none";
|
|
493
542
|
}>;
|
|
@@ -513,7 +562,65 @@ declare const CommunityHome: z.ZodObject<{
|
|
|
513
562
|
}>;
|
|
514
563
|
title: z.ZodString;
|
|
515
564
|
}, z.core.$strip>>;
|
|
565
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
566
|
+
state: z.ZodEnum<{
|
|
567
|
+
following: "following";
|
|
568
|
+
muted: "muted";
|
|
569
|
+
}>;
|
|
570
|
+
mutedUntil: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
571
|
+
}, z.core.$strict>>;
|
|
516
572
|
}, z.core.$strip>], "locked">>;
|
|
573
|
+
viewer: z.ZodObject<{
|
|
574
|
+
permissions: z.ZodArray<z.ZodEnum<{
|
|
575
|
+
"organizations:read": "organizations:read";
|
|
576
|
+
"organizations:write": "organizations:write";
|
|
577
|
+
"api_keys:read": "api_keys:read";
|
|
578
|
+
"api_keys:write": "api_keys:write";
|
|
579
|
+
"api_keys:delete": "api_keys:delete";
|
|
580
|
+
"notification_categories:read": "notification_categories:read";
|
|
581
|
+
"notification_categories:write": "notification_categories:write";
|
|
582
|
+
"integrations:read": "integrations:read";
|
|
583
|
+
"integrations:write": "integrations:write";
|
|
584
|
+
"integrations:delete": "integrations:delete";
|
|
585
|
+
"analytics:read": "analytics:read";
|
|
586
|
+
"people:read": "people:read";
|
|
587
|
+
"people:write": "people:write";
|
|
588
|
+
"people:delete": "people:delete";
|
|
589
|
+
"roles:read": "roles:read";
|
|
590
|
+
"roles:write": "roles:write";
|
|
591
|
+
"roles:delete": "roles:delete";
|
|
592
|
+
"access:read": "access:read";
|
|
593
|
+
"access:write": "access:write";
|
|
594
|
+
"bundles:read": "bundles:read";
|
|
595
|
+
"bundles:write": "bundles:write";
|
|
596
|
+
"bundles:delete": "bundles:delete";
|
|
597
|
+
"media:read": "media:read";
|
|
598
|
+
"media:write": "media:write";
|
|
599
|
+
"media:delete": "media:delete";
|
|
600
|
+
"courses:read": "courses:read";
|
|
601
|
+
"courses:write": "courses:write";
|
|
602
|
+
"courses:delete": "courses:delete";
|
|
603
|
+
"courses:moderate": "courses:moderate";
|
|
604
|
+
"progress:read": "progress:read";
|
|
605
|
+
"downloads:read": "downloads:read";
|
|
606
|
+
"downloads:write": "downloads:write";
|
|
607
|
+
"downloads:delete": "downloads:delete";
|
|
608
|
+
"communities:read": "communities:read";
|
|
609
|
+
"communities:write": "communities:write";
|
|
610
|
+
"communities:delete": "communities:delete";
|
|
611
|
+
"communities:moderate": "communities:moderate";
|
|
612
|
+
"events:read": "events:read";
|
|
613
|
+
"events:write": "events:write";
|
|
614
|
+
"events:delete": "events:delete";
|
|
615
|
+
"automations:read": "automations:read";
|
|
616
|
+
"automations:write": "automations:write";
|
|
617
|
+
"automations:delete": "automations:delete";
|
|
618
|
+
}>>;
|
|
619
|
+
opensEverySpace: z.ZodBoolean;
|
|
620
|
+
team: z.ZodBoolean;
|
|
621
|
+
roleName: z.ZodString;
|
|
622
|
+
canCreateEvents: z.ZodBoolean;
|
|
623
|
+
}, z.core.$strip>;
|
|
517
624
|
}, z.core.$strip>;
|
|
518
625
|
declare const CommunityAnalytics: z.ZodObject<{
|
|
519
626
|
memberCount: z.ZodNumber;
|
|
@@ -533,5 +640,5 @@ declare const CommunityAnalytics: z.ZodObject<{
|
|
|
533
640
|
grantsRenewed: z.ZodNumber;
|
|
534
641
|
}, z.core.$strip>;
|
|
535
642
|
//#endregion
|
|
536
|
-
export { CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityPostParam, CommunitySpaceParam, CreateCommunity, CreateSpace, DirectoryEntry, DirectoryPage, DirectoryQuery, DmSettings, LockedCommunitySpace, OpenCommunitySpace, OrderedIds, PatchDmSettings, SetSpaceTopics, SpaceDetail, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, UpdateCommunity, UpdateSpace };
|
|
643
|
+
export { CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityPostParam, CommunitySpaceParam, CreateCommunity, CreateSpace, DirectoryEntry, DirectoryPage, DirectoryQuery, DmSettings, LockedCommunitySpace, OpenCommunitySpace, OrderedIds, PatchCommunitySettings, PatchDmSettings, SetSpaceTopics, SpaceDetail, SpaceIdParam, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, UpdateCommunity, UpdateSpace };
|
|
537
644
|
//# sourceMappingURL=community.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ListQuery, OrgUserProfileSchema, PageQuery, paginated } from "./shared.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { communityStatusSchema, communityViewSchema, createCommunityInputSchema, createSpaceInputSchema, dmSettingsSchema, idSchema, patchDmSettingsInputSchema,
|
|
3
|
+
import { communityStatusSchema, communityViewSchema, createCommunityInputSchema, createSpaceInputSchema, dmSettingsSchema, idSchema, patchCommunitySettingsInputSchema, patchDmSettingsInputSchema, permissionSchema, setSpaceTopicsInputSchema, spaceDetailSchema, spaceMemberSchema, subscriptionViewSchema, updateCommunityInputSchema, updateSpaceInputSchema } from "@headless-lms/core/schemas";
|
|
4
4
|
//#region src/http/schemas/community.ts
|
|
5
5
|
const Community = communityViewSchema;
|
|
6
6
|
const CommunitiesQuery = ListQuery.extend({ status: communityStatusSchema.optional() });
|
|
@@ -8,6 +8,7 @@ const CommunitiesPage = paginated(Community);
|
|
|
8
8
|
const CreateCommunity = createCommunityInputSchema;
|
|
9
9
|
const UpdateCommunity = updateCommunityInputSchema;
|
|
10
10
|
const PatchDmSettings = patchDmSettingsInputSchema;
|
|
11
|
+
const PatchCommunitySettings = patchCommunitySettingsInputSchema;
|
|
11
12
|
const DmSettings = dmSettingsSchema;
|
|
12
13
|
const SpaceDetail = spaceDetailSchema;
|
|
13
14
|
const SpaceMember = spaceMemberSchema;
|
|
@@ -22,6 +23,7 @@ const CommunitySpaceParam = z.object({
|
|
|
22
23
|
communityId: z.string(),
|
|
23
24
|
spaceId: z.string()
|
|
24
25
|
});
|
|
26
|
+
const SpaceIdParam = z.object({ spaceId: z.string() });
|
|
25
27
|
const SpaceLinkParam = CommunitySpaceParam.extend({ linkId: z.string() });
|
|
26
28
|
const SpaceMemberParam = CommunitySpaceParam.extend({ orgUserId: z.string() });
|
|
27
29
|
const CommunityPostParam = z.object({
|
|
@@ -40,17 +42,23 @@ const CommunityChatParam = z.object({
|
|
|
40
42
|
communityId: z.string(),
|
|
41
43
|
chatId: z.string()
|
|
42
44
|
});
|
|
43
|
-
const CommunityMember = OrgUserProfileSchema.extend({
|
|
45
|
+
const CommunityMember = OrgUserProfileSchema.extend({
|
|
46
|
+
team: z.boolean().describe("Shown as team in the community."),
|
|
47
|
+
roleName: z.string().nullable().describe("The name of the role that makes them team in the community, or null."),
|
|
48
|
+
opensEverySpace: z.boolean().describe("Opens every space of the community, so holds no place in its spaces.")
|
|
49
|
+
});
|
|
44
50
|
const CommunityMembersQuery = PageQuery.extend({ search: z.string().trim().optional() });
|
|
45
51
|
const CommunityMembersPage = paginated(CommunityMember);
|
|
46
52
|
const DirectoryEntry = z.object({
|
|
47
53
|
orgUserId: z.string(),
|
|
48
|
-
role: z.string(),
|
|
49
54
|
displayName: z.string().nullable(),
|
|
50
55
|
headline: z.string().nullable(),
|
|
51
56
|
bio: z.string().nullable(),
|
|
52
57
|
imageAssetId: z.string().nullable(),
|
|
53
|
-
imageUrl: z.string().nullable()
|
|
58
|
+
imageUrl: z.string().nullable(),
|
|
59
|
+
team: z.boolean().describe("Shown as team in this community"),
|
|
60
|
+
roleName: z.string().nullable().describe("The name of the role that makes the person team here; null when not team"),
|
|
61
|
+
opensEverySpace: z.boolean().describe("Opens every space in this community, so holds no place in its spaces")
|
|
54
62
|
});
|
|
55
63
|
const DirectoryQuery = PageQuery.extend({ search: z.string().trim().max(100).optional().describe("Matches part of a display name") });
|
|
56
64
|
const DirectoryPage = paginated(DirectoryEntry);
|
|
@@ -70,9 +78,9 @@ const CommunityHomeSpaceBase = z.object({
|
|
|
70
78
|
"invited",
|
|
71
79
|
"full",
|
|
72
80
|
"none"
|
|
73
|
-
]).describe("Where the viewer stands with this space, and so which action it offers. `open`: the viewer can open it without joining (an all-members space, or
|
|
81
|
+
]).describe("Where the viewer stands with this space, and so which action it offers. `open`: the viewer can open it without joining (an all-members space, or the viewer opens every space). `member`: the viewer belongs to it. `requested`: the viewer asked to join and awaits a decision. `invited`: the viewer may accept or refuse an invitation. `full`: it is at capacity. `none`: none of these; ask to join a `by_request` space, or wait for an invitation to a `by_invite` one.")
|
|
74
82
|
});
|
|
75
|
-
const LockedCommunitySpace = CommunityHomeSpaceBase.extend({ locked: z.literal(true).describe("The viewer cannot open this space. Only enough to request a place, accept an invite or contact
|
|
83
|
+
const LockedCommunitySpace = CommunityHomeSpaceBase.extend({ locked: z.literal(true).describe("The viewer cannot open this space. Only enough to request a place, accept an invite or contact the team is served; never its description, topics, links or settings") });
|
|
76
84
|
const OpenCommunitySpace = CommunityHomeSpaceBase.extend({
|
|
77
85
|
locked: z.literal(false).describe("The viewer can open this space and read its feed"),
|
|
78
86
|
description: z.string().nullable(),
|
|
@@ -95,7 +103,8 @@ const OpenCommunitySpace = CommunityHomeSpaceBase.extend({
|
|
|
95
103
|
"community"
|
|
96
104
|
]),
|
|
97
105
|
title: z.string()
|
|
98
|
-
})).describe("Linked content that is published;
|
|
106
|
+
})).describe("Linked content that is published; a holder of the item's read permission also sees it unpublished"),
|
|
107
|
+
subscription: subscriptionViewSchema.nullable().describe("Your mute on this space while it applies; null when none")
|
|
99
108
|
});
|
|
100
109
|
const CommunityHomeSpace = z.discriminatedUnion("locked", [LockedCommunitySpace, OpenCommunitySpace]).describe("A space as the viewer sees it. A by-invite space the viewer is not invited to or a member of is never served");
|
|
101
110
|
const CommunityHome = z.object({
|
|
@@ -104,7 +113,14 @@ const CommunityHome = z.object({
|
|
|
104
113
|
description: z.string(),
|
|
105
114
|
thumbnailUrl: z.string().nullable(),
|
|
106
115
|
dm: dmSettingsSchema,
|
|
107
|
-
spaces: z.array(CommunityHomeSpace)
|
|
116
|
+
spaces: z.array(CommunityHomeSpace),
|
|
117
|
+
viewer: z.object({
|
|
118
|
+
permissions: z.array(permissionSchema).describe("What the viewer holds on this community"),
|
|
119
|
+
opensEverySpace: z.boolean().describe("The viewer opens every space, so holds no place in its spaces"),
|
|
120
|
+
team: z.boolean().describe("The viewer is shown as team here"),
|
|
121
|
+
roleName: z.string().describe("The name of the viewer's role here"),
|
|
122
|
+
canCreateEvents: z.boolean().describe("The viewer holds `events:write` on the org")
|
|
123
|
+
}).describe("The viewer in this community")
|
|
108
124
|
});
|
|
109
125
|
const CommunityAnalytics = z.object({
|
|
110
126
|
memberCount: z.number().int(),
|
|
@@ -124,6 +140,6 @@ const CommunityAnalytics = z.object({
|
|
|
124
140
|
grantsRenewed: z.number().int()
|
|
125
141
|
});
|
|
126
142
|
//#endregion
|
|
127
|
-
export { CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityPostParam, CommunitySpaceParam, CreateCommunity, CreateSpace, DirectoryEntry, DirectoryPage, DirectoryQuery, DmSettings, LockedCommunitySpace, OpenCommunitySpace, OrderedIds, PatchDmSettings, SetSpaceTopics, SpaceDetail, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, UpdateCommunity, UpdateSpace };
|
|
143
|
+
export { CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityPostParam, CommunitySpaceParam, CreateCommunity, CreateSpace, DirectoryEntry, DirectoryPage, DirectoryQuery, DmSettings, LockedCommunitySpace, OpenCommunitySpace, OrderedIds, PatchCommunitySettings, PatchDmSettings, SetSpaceTopics, SpaceDetail, SpaceIdParam, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, UpdateCommunity, UpdateSpace };
|
|
128
144
|
|
|
129
145
|
//# sourceMappingURL=community.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"community.js","names":[],"sources":["../../../src/http/schemas/community.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n communityStatusSchema,\n roleSchema,\n communityViewSchema,\n createCommunityInputSchema,\n createSpaceInputSchema,\n dmSettingsSchema,\n idSchema,\n patchDmSettingsInputSchema,\n setSpaceTopicsInputSchema,\n spaceDetailSchema,\n spaceMemberSchema,\n updateCommunityInputSchema,\n updateSpaceInputSchema,\n} from '@headless-lms/core/schemas';\nimport type {\n CommunityAnalytics as DomainCommunityAnalytics,\n CommunityMember as DomainCommunityMember,\n} from '@headless-lms/core/reporting/admin';\nimport type {\n CommunityHome as DomainCommunityHome,\n CommunityHomeSpace as DomainCommunityHomeSpace,\n DirectoryEntry as DomainDirectoryEntry,\n} from '@headless-lms/core/reporting/member';\nimport { ListQuery, OrgUserProfileSchema, PageQuery, paginated, type Matches } from './shared.js';\n\nexport const Community = communityViewSchema;\nexport const CommunitiesQuery = ListQuery.extend({\n status: communityStatusSchema.optional(),\n});\nexport const CommunitiesPage = paginated(Community);\nexport const CreateCommunity = createCommunityInputSchema;\nexport const UpdateCommunity = updateCommunityInputSchema;\nexport const PatchDmSettings = patchDmSettingsInputSchema;\nexport const DmSettings = dmSettingsSchema;\nexport const SpaceDetail = spaceDetailSchema;\nexport const SpaceMember = spaceMemberSchema;\nexport const SpaceMembersPage = paginated(SpaceMember);\nexport const CreateSpace = createSpaceInputSchema;\nexport const UpdateSpace = updateSpaceInputSchema;\nexport const SetSpaceTopics = setSpaceTopicsInputSchema;\nexport const OrderedIds = z\n .object({\n ids: z\n .array(idSchema)\n .min(1)\n .max(200)\n .describe('Every id in the collection, once each, in the new order'),\n })\n .strict();\nexport const SpaceLinkBody = z\n .object({ contentId: idSchema.describe('The course, download or community to link') })\n .strict();\n\nexport const CommunityIdParam = z.object({ communityId: z.string() });\nexport const CommunitySpaceParam = z.object({ communityId: z.string(), spaceId: z.string() });\nexport const SpaceLinkParam = CommunitySpaceParam.extend({ linkId: z.string() });\nexport const SpaceMemberParam = CommunitySpaceParam.extend({ orgUserId: z.string() });\nexport const CommunityPostParam = z.object({ communityId: z.string(), postId: z.string() });\nexport const CommunityCommentParam = z.object({ communityId: z.string(), commentId: z.string() });\nexport const CommunityMessageParam = z.object({ communityId: z.string(), messageId: z.string() });\nexport const CommunityChatParam = z.object({ communityId: z.string(), chatId: z.string() });\n\nexport const CommunityMember = OrgUserProfileSchema.extend({ role: roleSchema });\ntype _CommunityMemberMatches = Matches<DomainCommunityMember, z.infer<typeof CommunityMember>> &\n Matches<z.infer<typeof CommunityMember>, DomainCommunityMember>;\nexport const CommunityMembersQuery = PageQuery.extend({ search: z.string().trim().optional() });\nexport const CommunityMembersPage = paginated(CommunityMember);\n\nexport const DirectoryEntry = z.object({\n orgUserId: z.string(),\n role: z.string(),\n displayName: z.string().nullable(),\n headline: z.string().nullable(),\n bio: z.string().nullable(),\n imageAssetId: z.string().nullable(),\n imageUrl: z.string().nullable(),\n});\ntype _DirectoryMatches = Matches<\n Omit<DomainDirectoryEntry, 'userId'>,\n z.infer<typeof DirectoryEntry>\n> &\n Matches<z.infer<typeof DirectoryEntry>, Omit<DomainDirectoryEntry, 'userId'>>;\nexport const DirectoryQuery = PageQuery.extend({\n search: z.string().trim().max(100).optional().describe('Matches part of a display name'),\n});\nexport const DirectoryPage = paginated(DirectoryEntry);\n\nconst CommunityHomeSpaceBase = z.object({\n id: z.string(),\n name: z.string(),\n memberCount: z.number().int().describe('Active space members'),\n accessRule: z.enum(['all_members', 'by_request', 'by_invite']),\n standing: z\n .enum(['open', 'member', 'requested', 'invited', 'full', 'none'])\n .describe(\n 'Where the viewer stands with this space, and so which action it offers. `open`: the viewer can open it without joining (an all-members space, or staff). `member`: the viewer belongs to it. `requested`: the viewer asked to join and awaits a decision. `invited`: the viewer may accept or refuse an invitation. `full`: it is at capacity. `none`: none of these; ask to join a `by_request` space, or wait for an invitation to a `by_invite` one.',\n ),\n});\n\nexport const LockedCommunitySpace = CommunityHomeSpaceBase.extend({\n locked: z\n .literal(true)\n .describe(\n 'The viewer cannot open this space. Only enough to request a place, accept an invite or contact staff is served; never its description, topics, links or settings',\n ),\n});\n\nexport const OpenCommunitySpace = CommunityHomeSpaceBase.extend({\n locked: z.literal(false).describe('The viewer can open this space and read its feed'),\n description: z.string().nullable(),\n capacity: z.number().int().nullable(),\n settings: z.object({\n comments: z.boolean(),\n reactions: z.boolean(),\n requireReview: z.boolean(),\n }),\n topics: z.array(z.object({ id: z.string(), name: z.string() })),\n links: z\n .array(\n z.object({\n id: z.string(),\n contentId: z.string(),\n type: z.enum(['course', 'download', 'community']),\n title: z.string(),\n }),\n )\n .describe('Linked content that is published; staff also see unpublished targets'),\n});\n\nexport const CommunityHomeSpace = z\n .discriminatedUnion('locked', [LockedCommunitySpace, OpenCommunitySpace])\n .describe(\n 'A space as the viewer sees it. A by-invite space the viewer is not invited to or a member of is never served',\n );\ntype _HomeSpaceMatches = Matches<DomainCommunityHomeSpace, z.infer<typeof CommunityHomeSpace>> &\n Matches<z.infer<typeof CommunityHomeSpace>, DomainCommunityHomeSpace>;\n\nexport const CommunityHome = z.object({\n communityId: z.string(),\n title: z.string(),\n description: z.string(),\n thumbnailUrl: z.string().nullable(),\n dm: dmSettingsSchema,\n spaces: z.array(CommunityHomeSpace),\n});\ntype _HomeMatches = Matches<DomainCommunityHome, z.infer<typeof CommunityHome>> &\n Matches<z.infer<typeof CommunityHome>, DomainCommunityHome>;\n\nexport const CommunityAnalytics = z.object({\n memberCount: z.number().int(),\n activeMembers: z.number().int(),\n postsPerSpace: z.array(z.object({ spaceId: z.string(), count: z.number().int() })),\n commentsPerPost: z.array(z.object({ postId: z.string(), count: z.number().int() })),\n messagesSent: z.number().int(),\n flagsRaised: z.number().int(),\n flagsResolved: z.number().int(),\n grantsLapsed: z.number().int(),\n grantsRenewed: z.number().int(),\n});\ntype _AnalyticsMatches = Matches<DomainCommunityAnalytics, z.infer<typeof CommunityAnalytics>> &\n Matches<z.infer<typeof CommunityAnalytics>, DomainCommunityAnalytics>;\n"],"mappings":";;;;AA2BA,MAAa,YAAY;AACzB,MAAa,mBAAmB,UAAU,OAAO,EAC/C,QAAQ,sBAAsB,SAAS,EACzC,CAAC;AACD,MAAa,kBAAkB,UAAU,SAAS;AAClD,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;AAC/B,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,cAA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http/schemas/community.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n communityStatusSchema,\n communityViewSchema,\n createCommunityInputSchema,\n createSpaceInputSchema,\n dmSettingsSchema,\n idSchema,\n patchDmSettingsInputSchema,\n permissionSchema,\n patchCommunitySettingsInputSchema,\n setSpaceTopicsInputSchema,\n spaceDetailSchema,\n spaceMemberSchema,\n subscriptionViewSchema,\n updateCommunityInputSchema,\n updateSpaceInputSchema,\n} from '@headless-lms/core/schemas';\nimport type {\n CommunityAnalytics as DomainCommunityAnalytics,\n CommunityMember as DomainCommunityMember,\n} from '@headless-lms/core/reporting/admin';\nimport type {\n CommunityHome as DomainCommunityHome,\n CommunityHomeSpace as DomainCommunityHomeSpace,\n DirectoryEntry as DomainDirectoryEntry,\n} from '@headless-lms/core/reporting/member';\nimport { ListQuery, OrgUserProfileSchema, PageQuery, paginated, type Matches } from './shared.js';\n\nexport const Community = communityViewSchema;\nexport const CommunitiesQuery = ListQuery.extend({\n status: communityStatusSchema.optional(),\n});\nexport const CommunitiesPage = paginated(Community);\nexport const CreateCommunity = createCommunityInputSchema;\nexport const UpdateCommunity = updateCommunityInputSchema;\nexport const PatchDmSettings = patchDmSettingsInputSchema;\nexport const PatchCommunitySettings = patchCommunitySettingsInputSchema;\nexport const DmSettings = dmSettingsSchema;\nexport const SpaceDetail = spaceDetailSchema;\nexport const SpaceMember = spaceMemberSchema;\nexport const SpaceMembersPage = paginated(SpaceMember);\nexport const CreateSpace = createSpaceInputSchema;\nexport const UpdateSpace = updateSpaceInputSchema;\nexport const SetSpaceTopics = setSpaceTopicsInputSchema;\nexport const OrderedIds = z\n .object({\n ids: z\n .array(idSchema)\n .min(1)\n .max(200)\n .describe('Every id in the collection, once each, in the new order'),\n })\n .strict();\nexport const SpaceLinkBody = z\n .object({ contentId: idSchema.describe('The course, download or community to link') })\n .strict();\n\nexport const CommunityIdParam = z.object({ communityId: z.string() });\nexport const CommunitySpaceParam = z.object({ communityId: z.string(), spaceId: z.string() });\nexport const SpaceIdParam = z.object({ spaceId: z.string() });\nexport const SpaceLinkParam = CommunitySpaceParam.extend({ linkId: z.string() });\nexport const SpaceMemberParam = CommunitySpaceParam.extend({ orgUserId: z.string() });\nexport const CommunityPostParam = z.object({ communityId: z.string(), postId: z.string() });\nexport const CommunityCommentParam = z.object({ communityId: z.string(), commentId: z.string() });\nexport const CommunityMessageParam = z.object({ communityId: z.string(), messageId: z.string() });\nexport const CommunityChatParam = z.object({ communityId: z.string(), chatId: z.string() });\n\nexport const CommunityMember = OrgUserProfileSchema.extend({\n team: z.boolean().describe('Shown as team in the community.'),\n roleName: z\n .string()\n .nullable()\n .describe('The name of the role that makes them team in the community, or null.'),\n opensEverySpace: z\n .boolean()\n .describe('Opens every space of the community, so holds no place in its spaces.'),\n});\ntype _CommunityMemberMatches = Matches<DomainCommunityMember, z.infer<typeof CommunityMember>> &\n Matches<z.infer<typeof CommunityMember>, DomainCommunityMember>;\nexport const CommunityMembersQuery = PageQuery.extend({ search: z.string().trim().optional() });\nexport const CommunityMembersPage = paginated(CommunityMember);\n\nexport const DirectoryEntry = z.object({\n orgUserId: z.string(),\n displayName: z.string().nullable(),\n headline: z.string().nullable(),\n bio: z.string().nullable(),\n imageAssetId: z.string().nullable(),\n imageUrl: z.string().nullable(),\n team: z.boolean().describe('Shown as team in this community'),\n roleName: z\n .string()\n .nullable()\n .describe('The name of the role that makes the person team here; null when not team'),\n opensEverySpace: z\n .boolean()\n .describe('Opens every space in this community, so holds no place in its spaces'),\n});\ntype _DirectoryMatches = Matches<\n Omit<DomainDirectoryEntry, 'userId'>,\n z.infer<typeof DirectoryEntry>\n> &\n Matches<z.infer<typeof DirectoryEntry>, Omit<DomainDirectoryEntry, 'userId'>>;\nexport const DirectoryQuery = PageQuery.extend({\n search: z.string().trim().max(100).optional().describe('Matches part of a display name'),\n});\nexport const DirectoryPage = paginated(DirectoryEntry);\n\nconst CommunityHomeSpaceBase = z.object({\n id: z.string(),\n name: z.string(),\n memberCount: z.number().int().describe('Active space members'),\n accessRule: z.enum(['all_members', 'by_request', 'by_invite']),\n standing: z\n .enum(['open', 'member', 'requested', 'invited', 'full', 'none'])\n .describe(\n 'Where the viewer stands with this space, and so which action it offers. `open`: the viewer can open it without joining (an all-members space, or the viewer opens every space). `member`: the viewer belongs to it. `requested`: the viewer asked to join and awaits a decision. `invited`: the viewer may accept or refuse an invitation. `full`: it is at capacity. `none`: none of these; ask to join a `by_request` space, or wait for an invitation to a `by_invite` one.',\n ),\n});\n\nexport const LockedCommunitySpace = CommunityHomeSpaceBase.extend({\n locked: z\n .literal(true)\n .describe(\n 'The viewer cannot open this space. Only enough to request a place, accept an invite or contact the team is served; never its description, topics, links or settings',\n ),\n});\n\nexport const OpenCommunitySpace = CommunityHomeSpaceBase.extend({\n locked: z.literal(false).describe('The viewer can open this space and read its feed'),\n description: z.string().nullable(),\n capacity: z.number().int().nullable(),\n settings: z.object({\n comments: z.boolean(),\n reactions: z.boolean(),\n requireReview: z.boolean(),\n }),\n topics: z.array(z.object({ id: z.string(), name: z.string() })),\n links: z\n .array(\n z.object({\n id: z.string(),\n contentId: z.string(),\n type: z.enum(['course', 'download', 'community']),\n title: z.string(),\n }),\n )\n .describe(\n \"Linked content that is published; a holder of the item's read permission also sees it unpublished\",\n ),\n subscription: subscriptionViewSchema\n .nullable()\n .describe('Your mute on this space while it applies; null when none'),\n});\n\nexport const CommunityHomeSpace = z\n .discriminatedUnion('locked', [LockedCommunitySpace, OpenCommunitySpace])\n .describe(\n 'A space as the viewer sees it. A by-invite space the viewer is not invited to or a member of is never served',\n );\ntype _HomeSpaceMatches = Matches<DomainCommunityHomeSpace, z.infer<typeof CommunityHomeSpace>> &\n Matches<z.infer<typeof CommunityHomeSpace>, DomainCommunityHomeSpace>;\n\nexport const CommunityHome = z.object({\n communityId: z.string(),\n title: z.string(),\n description: z.string(),\n thumbnailUrl: z.string().nullable(),\n dm: dmSettingsSchema,\n spaces: z.array(CommunityHomeSpace),\n viewer: z\n .object({\n permissions: z.array(permissionSchema).describe('What the viewer holds on this community'),\n opensEverySpace: z\n .boolean()\n .describe('The viewer opens every space, so holds no place in its spaces'),\n team: z.boolean().describe('The viewer is shown as team here'),\n roleName: z.string().describe(\"The name of the viewer's role here\"),\n canCreateEvents: z.boolean().describe('The viewer holds `events:write` on the org'),\n })\n .describe('The viewer in this community'),\n});\ntype _HomeMatches = Matches<DomainCommunityHome, z.infer<typeof CommunityHome>> &\n Matches<z.infer<typeof CommunityHome>, DomainCommunityHome>;\n\nexport const CommunityAnalytics = z.object({\n memberCount: z.number().int(),\n activeMembers: z.number().int(),\n postsPerSpace: z.array(z.object({ spaceId: z.string(), count: z.number().int() })),\n commentsPerPost: z.array(z.object({ postId: z.string(), count: z.number().int() })),\n messagesSent: z.number().int(),\n flagsRaised: z.number().int(),\n flagsResolved: z.number().int(),\n grantsLapsed: z.number().int(),\n grantsRenewed: z.number().int(),\n});\ntype _AnalyticsMatches = Matches<DomainCommunityAnalytics, z.infer<typeof CommunityAnalytics>> &\n Matches<z.infer<typeof CommunityAnalytics>, DomainCommunityAnalytics>;\n"],"mappings":";;;;AA6BA,MAAa,YAAY;AACzB,MAAa,mBAAmB,UAAU,OAAO,EAC/C,QAAQ,sBAAsB,SAAS,EACzC,CAAC;AACD,MAAa,kBAAkB,UAAU,SAAS;AAClD,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;AAC/B,MAAa,yBAAyB;AACtC,MAAa,aAAa;AAC1B,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,mBAAmB,UAAU,WAAW;AACrD,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,iBAAiB;AAC9B,MAAa,aAAa,EACvB,OAAO,EACN,KAAK,EACF,MAAM,QAAQ,CAAC,CACf,IAAI,CAAC,CAAC,CACN,IAAI,GAAG,CAAC,CACR,SAAS,yDAAyD,EACvE,CAAC,CAAC,CACD,OAAO;AACV,MAAa,gBAAgB,EAC1B,OAA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O;EAAG,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI;CAAE,CAAC,CAAC;CACjF,iBAAiB,EAAE,MAAM,EAAE,OAAO;EAAE,QAAQ,EAAE,OAAO;EAAG,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI;CAAE,CAAC,CAAC;CAClF,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI;CAC7B,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI;CAC5B,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI;CAC9B,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI;CAC7B,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI;AAChC,CAAC"}
|
|
@@ -24,6 +24,56 @@ declare const CourseAnalytics: z.ZodObject<{
|
|
|
24
24
|
}, z.core.$strip>>;
|
|
25
25
|
}, z.core.$strip>;
|
|
26
26
|
type CourseAnalytics = z.infer<typeof CourseAnalytics>;
|
|
27
|
+
declare const CourseLearner: z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
30
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
31
|
+
email: z.ZodString;
|
|
32
|
+
image: z.ZodNullable<z.ZodString>;
|
|
33
|
+
status: z.ZodEnum<{
|
|
34
|
+
active: "active";
|
|
35
|
+
revoked: "revoked";
|
|
36
|
+
expired: "expired";
|
|
37
|
+
}>;
|
|
38
|
+
source: z.ZodString;
|
|
39
|
+
grantedAt: z.ZodString;
|
|
40
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
41
|
+
totalActivities: z.ZodNumber;
|
|
42
|
+
completedActivities: z.ZodNumber;
|
|
43
|
+
progress: z.ZodNumber;
|
|
44
|
+
lastActivityAt: z.ZodNullable<z.ZodString>;
|
|
45
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
declare const CourseLearnersQuery: z.ZodObject<{
|
|
48
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
49
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
50
|
+
search: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
declare const CourseLearnersPage: z.ZodObject<{
|
|
53
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
56
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
57
|
+
email: z.ZodString;
|
|
58
|
+
image: z.ZodNullable<z.ZodString>;
|
|
59
|
+
status: z.ZodEnum<{
|
|
60
|
+
active: "active";
|
|
61
|
+
revoked: "revoked";
|
|
62
|
+
expired: "expired";
|
|
63
|
+
}>;
|
|
64
|
+
source: z.ZodString;
|
|
65
|
+
grantedAt: z.ZodString;
|
|
66
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
67
|
+
totalActivities: z.ZodNumber;
|
|
68
|
+
completedActivities: z.ZodNumber;
|
|
69
|
+
progress: z.ZodNumber;
|
|
70
|
+
lastActivityAt: z.ZodNullable<z.ZodString>;
|
|
71
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
total: z.ZodNumber;
|
|
74
|
+
page: z.ZodNumber;
|
|
75
|
+
pageSize: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>;
|
|
27
77
|
//#endregion
|
|
28
|
-
export { CourseActivityEngagement, CourseAnalytics };
|
|
78
|
+
export { CourseActivityEngagement, CourseAnalytics, CourseLearner, CourseLearnersPage, CourseLearnersQuery };
|
|
29
79
|
//# sourceMappingURL=course-analytics.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OrgUserProfileSchema, PageQuery, paginated } from "./shared.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
//#region src/http/schemas/course-analytics.ts
|
|
3
4
|
const CourseActivityEngagement = z.object({
|
|
@@ -15,7 +16,24 @@ const CourseAnalytics = z.object({
|
|
|
15
16
|
avgProgress: z.number().int(),
|
|
16
17
|
activities: z.array(CourseActivityEngagement)
|
|
17
18
|
});
|
|
19
|
+
const CourseLearner = OrgUserProfileSchema.extend({
|
|
20
|
+
status: z.enum([
|
|
21
|
+
"active",
|
|
22
|
+
"expired",
|
|
23
|
+
"revoked"
|
|
24
|
+
]).describe("The status of the grant that opens the course to them."),
|
|
25
|
+
source: z.string().describe("Where the grant came from."),
|
|
26
|
+
grantedAt: z.string(),
|
|
27
|
+
expiresAt: z.string().nullable(),
|
|
28
|
+
totalActivities: z.number().int().describe("Published activities in the course."),
|
|
29
|
+
completedActivities: z.number().int(),
|
|
30
|
+
progress: z.number().int().describe("Completed published activities over the total, 0–100."),
|
|
31
|
+
lastActivityAt: z.string().nullable(),
|
|
32
|
+
completedAt: z.string().nullable()
|
|
33
|
+
});
|
|
34
|
+
const CourseLearnersQuery = PageQuery.extend({ search: z.string().trim().optional() });
|
|
35
|
+
const CourseLearnersPage = paginated(CourseLearner);
|
|
18
36
|
//#endregion
|
|
19
|
-
export { CourseActivityEngagement, CourseAnalytics };
|
|
37
|
+
export { CourseActivityEngagement, CourseAnalytics, CourseLearner, CourseLearnersPage, CourseLearnersQuery };
|
|
20
38
|
|
|
21
39
|
//# sourceMappingURL=course-analytics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"course-analytics.js","names":[],"sources":["../../../src/http/schemas/course-analytics.ts"],"sourcesContent":["// Per-course analytics resource schemas.\nimport { z } from 'zod';\n\nexport const CourseActivityEngagement = z.object({\n activityId: z.string(),\n title: z.string(),\n moduleId: z.string(),\n moduleTitle: z.string(),\n started: z.number().int(),\n completed: z.number().int(),\n});\nexport type CourseActivityEngagement = z.infer<typeof CourseActivityEngagement>;\n\nexport const CourseAnalytics = z.object({\n enrolled: z.number().int(),\n started: z.number().int(),\n completed: z.number().int(),\n avgProgress: z.number().int(),\n activities: z.array(CourseActivityEngagement),\n});\nexport type CourseAnalytics = z.infer<typeof CourseAnalytics>;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"course-analytics.js","names":[],"sources":["../../../src/http/schemas/course-analytics.ts"],"sourcesContent":["// Per-course analytics resource schemas.\nimport type { CourseLearner as DomainCourseLearner } from '@headless-lms/core/reporting/admin';\nimport { z } from 'zod';\nimport { OrgUserProfileSchema, PageQuery, paginated, type Matches } from './shared.js';\n\nexport const CourseActivityEngagement = z.object({\n activityId: z.string(),\n title: z.string(),\n moduleId: z.string(),\n moduleTitle: z.string(),\n started: z.number().int(),\n completed: z.number().int(),\n});\nexport type CourseActivityEngagement = z.infer<typeof CourseActivityEngagement>;\n\nexport const CourseAnalytics = z.object({\n enrolled: z.number().int(),\n started: z.number().int(),\n completed: z.number().int(),\n avgProgress: z.number().int(),\n activities: z.array(CourseActivityEngagement),\n});\nexport type CourseAnalytics = z.infer<typeof CourseAnalytics>;\n\nexport const CourseLearner = OrgUserProfileSchema.extend({\n status: z\n .enum(['active', 'expired', 'revoked'])\n .describe('The status of the grant that opens the course to them.'),\n source: z.string().describe('Where the grant came from.'),\n grantedAt: z.string(),\n expiresAt: z.string().nullable(),\n totalActivities: z.number().int().describe('Published activities in the course.'),\n completedActivities: z.number().int(),\n progress: z.number().int().describe('Completed published activities over the total, 0–100.'),\n lastActivityAt: z.string().nullable(),\n completedAt: z.string().nullable(),\n});\ntype _CourseLearnerMatches = Matches<DomainCourseLearner, z.infer<typeof CourseLearner>> &\n Matches<z.infer<typeof CourseLearner>, DomainCourseLearner>;\nexport const CourseLearnersQuery = PageQuery.extend({ search: z.string().trim().optional() });\nexport const CourseLearnersPage = paginated(CourseLearner);\n"],"mappings":";;;AAKA,MAAa,2BAA2B,EAAE,OAAO;CAC/C,YAAY,EAAE,OAAO;CACrB,OAAO,EAAE,OAAO;CAChB,UAAU,EAAE,OAAO;CACnB,aAAa,EAAE,OAAO;CACtB,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI;CACxB,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI;AAC5B,CAAC;AAGD,MAAa,kBAAkB,EAAE,OAAO;CACtC,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI;CACzB,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI;CACxB,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI;CAC1B,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI;CAC5B,YAAY,EAAE,MAAM,wBAAwB;AAC9C,CAAC;AAGD,MAAa,gBAAgB,qBAAqB,OAAO;CACvD,QAAQ,EACL,KAAK;EAAC;EAAU;EAAW;CAAS,CAAC,CAAC,CACtC,SAAS,wDAAwD;CACpE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CACxD,WAAW,EAAE,OAAO;CACpB,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qCAAqC;CAChF,qBAAqB,EAAE,OAAO,CAAC,CAAC,IAAI;CACpC,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD;CAC3F,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS;CACpC,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;AACnC,CAAC;AAGD,MAAa,sBAAsB,UAAU,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;AAC5F,MAAa,qBAAqB,UAAU,aAAa"}
|
|
@@ -5,6 +5,7 @@ declare const OverviewStats: z.ZodObject<{
|
|
|
5
5
|
draftCourses: z.ZodNumber;
|
|
6
6
|
activeStudents: z.ZodNumber;
|
|
7
7
|
expiringSoon: z.ZodNumber;
|
|
8
|
+
upcomingEvents: z.ZodNumber;
|
|
8
9
|
}, z.core.$strip>;
|
|
9
10
|
type OverviewStats = z.infer<typeof OverviewStats>;
|
|
10
11
|
declare const EnrollmentPoint: z.ZodObject<{
|
|
@@ -4,7 +4,8 @@ const OverviewStats = z.object({
|
|
|
4
4
|
publishedCourses: z.number().int(),
|
|
5
5
|
draftCourses: z.number().int(),
|
|
6
6
|
activeStudents: z.number().int(),
|
|
7
|
-
expiringSoon: z.number().int()
|
|
7
|
+
expiringSoon: z.number().int(),
|
|
8
|
+
upcomingEvents: z.number().int().describe("Published events that have not ended")
|
|
8
9
|
});
|
|
9
10
|
const EnrollmentPoint = z.object({
|
|
10
11
|
date: z.string(),
|