@headless-lms/server 0.5.0 → 0.6.1
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 +6 -0
- package/dist/app/container.d.ts +5 -1
- package/dist/app/container.js +3 -1
- package/dist/app/container.js.map +1 -1
- package/dist/http/mcp/tools/communities.js +1 -1
- package/dist/http/mcp/tools/communities.js.map +1 -1
- package/dist/http/routes/access.js +1 -1
- package/dist/http/routes/access.js.map +1 -1
- package/dist/http/routes/communities.js +1 -1
- package/dist/http/routes/communities.js.map +1 -1
- package/dist/http/routes/member/files.js +18 -1
- package/dist/http/routes/member/files.js.map +1 -1
- package/dist/http/routes/platform.js +1 -1
- package/dist/http/routes/platform.js.map +1 -1
- package/dist/http/schemas/access.d.ts +6 -6
- package/dist/http/schemas/assets.d.ts +6 -6
- package/dist/http/schemas/chats.d.ts +27 -27
- package/dist/http/schemas/community.d.ts +61 -34
- package/dist/http/schemas/community.js +6 -3
- package/dist/http/schemas/community.js.map +1 -1
- package/dist/http/schemas/content.d.ts +5 -5
- package/dist/http/schemas/course-analytics.d.ts +2 -2
- package/dist/http/schemas/downloads.d.ts +5 -5
- package/dist/http/schemas/entitlements.d.ts +5 -5
- package/dist/http/schemas/events.d.ts +57 -57
- package/dist/http/schemas/files.d.ts +10 -1
- package/dist/http/schemas/files.js +6 -1
- package/dist/http/schemas/files.js.map +1 -1
- package/dist/http/schemas/index.d.ts +2 -2
- package/dist/http/schemas/index.js +2 -2
- package/dist/http/schemas/integrations.d.ts +4 -4
- package/dist/http/schemas/member.d.ts +3 -3
- package/dist/http/schemas/members.d.ts +22 -22
- package/dist/http/schemas/notifications.d.ts +20 -20
- package/dist/http/schemas/platform.d.ts +2 -1
- package/dist/http/schemas/platform.js +2 -2
- package/dist/http/schemas/platform.js.map +1 -1
- package/dist/http/schemas/posts.d.ts +6 -6
- package/dist/http/schemas/profile.d.ts +3 -3
- package/dist/http/schemas/students.d.ts +7 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/packages/server/package.js +1 -1
- package/package.json +5 -5
|
@@ -9,8 +9,8 @@ declare const MemberCourses: z.ZodArray<z.ZodObject<{
|
|
|
9
9
|
slug: z.ZodString;
|
|
10
10
|
description: z.ZodString;
|
|
11
11
|
status: z.ZodEnum<{
|
|
12
|
-
draft: "draft";
|
|
13
12
|
published: "published";
|
|
13
|
+
draft: "draft";
|
|
14
14
|
}>;
|
|
15
15
|
category: z.ZodString;
|
|
16
16
|
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
@@ -57,8 +57,8 @@ declare const MemberDownloads: z.ZodArray<z.ZodObject<{
|
|
|
57
57
|
slug: z.ZodString;
|
|
58
58
|
description: z.ZodString;
|
|
59
59
|
status: z.ZodEnum<{
|
|
60
|
-
draft: "draft";
|
|
61
60
|
published: "published";
|
|
61
|
+
draft: "draft";
|
|
62
62
|
}>;
|
|
63
63
|
category: z.ZodString;
|
|
64
64
|
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
@@ -77,8 +77,8 @@ declare const MemberDownload: z.ZodObject<{
|
|
|
77
77
|
slug: z.ZodString;
|
|
78
78
|
description: z.ZodString;
|
|
79
79
|
status: z.ZodEnum<{
|
|
80
|
-
draft: "draft";
|
|
81
80
|
published: "published";
|
|
81
|
+
draft: "draft";
|
|
82
82
|
}>;
|
|
83
83
|
category: z.ZodString;
|
|
84
84
|
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/http/schemas/members.d.ts
|
|
3
3
|
declare const MemberStatus: z.ZodEnum<{
|
|
4
|
-
invited: "invited";
|
|
5
4
|
active: "active";
|
|
5
|
+
invited: "invited";
|
|
6
6
|
}>;
|
|
7
7
|
type MemberStatus = z.infer<typeof MemberStatus>;
|
|
8
8
|
declare const RoleRef: z.ZodObject<{
|
|
@@ -12,10 +12,10 @@ declare const RoleRef: z.ZodObject<{
|
|
|
12
12
|
declare const ItemRole: z.ZodObject<{
|
|
13
13
|
contentId: z.ZodString;
|
|
14
14
|
contentType: z.ZodEnum<{
|
|
15
|
-
community: "community";
|
|
16
|
-
course: "course";
|
|
17
15
|
download: "download";
|
|
16
|
+
course: "course";
|
|
18
17
|
event: "event";
|
|
18
|
+
community: "community";
|
|
19
19
|
}>;
|
|
20
20
|
roleKey: z.ZodString;
|
|
21
21
|
roleName: z.ZodString;
|
|
@@ -34,17 +34,17 @@ declare const Member: z.ZodObject<{
|
|
|
34
34
|
items: z.ZodArray<z.ZodObject<{
|
|
35
35
|
contentId: z.ZodString;
|
|
36
36
|
contentType: z.ZodEnum<{
|
|
37
|
-
community: "community";
|
|
38
|
-
course: "course";
|
|
39
37
|
download: "download";
|
|
38
|
+
course: "course";
|
|
40
39
|
event: "event";
|
|
40
|
+
community: "community";
|
|
41
41
|
}>;
|
|
42
42
|
roleKey: z.ZodString;
|
|
43
43
|
roleName: z.ZodString;
|
|
44
44
|
}, z.core.$strip>>;
|
|
45
45
|
status: z.ZodEnum<{
|
|
46
|
-
invited: "invited";
|
|
47
46
|
active: "active";
|
|
47
|
+
invited: "invited";
|
|
48
48
|
}>;
|
|
49
49
|
joinedAt: z.ZodNullable<z.ZodString>;
|
|
50
50
|
invitedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -57,8 +57,8 @@ declare const MembersQuery: z.ZodObject<{
|
|
|
57
57
|
sort: z.ZodOptional<z.ZodString>;
|
|
58
58
|
roleKey: z.ZodOptional<z.ZodString>;
|
|
59
59
|
status: z.ZodOptional<z.ZodEnum<{
|
|
60
|
-
invited: "invited";
|
|
61
60
|
active: "active";
|
|
61
|
+
invited: "invited";
|
|
62
62
|
}>>;
|
|
63
63
|
}, z.core.$strip>;
|
|
64
64
|
type MembersQuery = z.infer<typeof MembersQuery>;
|
|
@@ -77,17 +77,17 @@ declare const MembersPage: z.ZodObject<{
|
|
|
77
77
|
items: z.ZodArray<z.ZodObject<{
|
|
78
78
|
contentId: z.ZodString;
|
|
79
79
|
contentType: z.ZodEnum<{
|
|
80
|
-
community: "community";
|
|
81
|
-
course: "course";
|
|
82
80
|
download: "download";
|
|
81
|
+
course: "course";
|
|
83
82
|
event: "event";
|
|
83
|
+
community: "community";
|
|
84
84
|
}>;
|
|
85
85
|
roleKey: z.ZodString;
|
|
86
86
|
roleName: z.ZodString;
|
|
87
87
|
}, z.core.$strip>>;
|
|
88
88
|
status: z.ZodEnum<{
|
|
89
|
-
invited: "invited";
|
|
90
89
|
active: "active";
|
|
90
|
+
invited: "invited";
|
|
91
91
|
}>;
|
|
92
92
|
joinedAt: z.ZodNullable<z.ZodString>;
|
|
93
93
|
invitedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -116,10 +116,10 @@ declare const Assignment: z.ZodObject<{
|
|
|
116
116
|
roleName: z.ZodString;
|
|
117
117
|
contentId: z.ZodNullable<z.ZodString>;
|
|
118
118
|
contentType: z.ZodNullable<z.ZodEnum<{
|
|
119
|
-
community: "community";
|
|
120
|
-
course: "course";
|
|
121
119
|
download: "download";
|
|
120
|
+
course: "course";
|
|
122
121
|
event: "event";
|
|
122
|
+
community: "community";
|
|
123
123
|
}>>;
|
|
124
124
|
}, z.core.$strip>;
|
|
125
125
|
declare const AssignmentList: z.ZodArray<z.ZodObject<{
|
|
@@ -128,10 +128,10 @@ declare const AssignmentList: z.ZodArray<z.ZodObject<{
|
|
|
128
128
|
roleName: z.ZodString;
|
|
129
129
|
contentId: z.ZodNullable<z.ZodString>;
|
|
130
130
|
contentType: z.ZodNullable<z.ZodEnum<{
|
|
131
|
-
community: "community";
|
|
132
|
-
course: "course";
|
|
133
131
|
download: "download";
|
|
132
|
+
course: "course";
|
|
134
133
|
event: "event";
|
|
134
|
+
community: "community";
|
|
135
135
|
}>>;
|
|
136
136
|
}, z.core.$strip>>;
|
|
137
137
|
declare const SetRole: z.ZodObject<{
|
|
@@ -143,10 +143,10 @@ declare const OrgRoleView: z.ZodObject<{
|
|
|
143
143
|
description: z.ZodString;
|
|
144
144
|
base: z.ZodString;
|
|
145
145
|
levels: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"org">, z.ZodLazy<z.ZodEnum<{
|
|
146
|
-
community: "community";
|
|
147
|
-
course: "course";
|
|
148
146
|
download: "download";
|
|
147
|
+
course: "course";
|
|
149
148
|
event: "event";
|
|
149
|
+
community: "community";
|
|
150
150
|
}>>]>>;
|
|
151
151
|
team: z.ZodBoolean;
|
|
152
152
|
permissions: z.ZodArray<z.ZodEnum<{
|
|
@@ -206,10 +206,10 @@ declare const OrgRoleList: z.ZodArray<z.ZodObject<{
|
|
|
206
206
|
description: z.ZodString;
|
|
207
207
|
base: z.ZodString;
|
|
208
208
|
levels: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"org">, z.ZodLazy<z.ZodEnum<{
|
|
209
|
-
community: "community";
|
|
210
|
-
course: "course";
|
|
211
209
|
download: "download";
|
|
210
|
+
course: "course";
|
|
212
211
|
event: "event";
|
|
212
|
+
community: "community";
|
|
213
213
|
}>>]>>;
|
|
214
214
|
team: z.ZodBoolean;
|
|
215
215
|
permissions: z.ZodArray<z.ZodEnum<{
|
|
@@ -267,10 +267,10 @@ declare const UpdateRole: z.ZodObject<{
|
|
|
267
267
|
name: z.ZodOptional<z.ZodString>;
|
|
268
268
|
description: z.ZodOptional<z.ZodString>;
|
|
269
269
|
levels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"org">, z.ZodLazy<z.ZodEnum<{
|
|
270
|
-
community: "community";
|
|
271
|
-
course: "course";
|
|
272
270
|
download: "download";
|
|
271
|
+
course: "course";
|
|
273
272
|
event: "event";
|
|
273
|
+
community: "community";
|
|
274
274
|
}>>]>>>;
|
|
275
275
|
team: z.ZodOptional<z.ZodBoolean>;
|
|
276
276
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
@@ -324,10 +324,10 @@ declare const CreateRole: z.ZodObject<{
|
|
|
324
324
|
name: z.ZodString;
|
|
325
325
|
description: z.ZodOptional<z.ZodString>;
|
|
326
326
|
levels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"org">, z.ZodLazy<z.ZodEnum<{
|
|
327
|
-
community: "community";
|
|
328
|
-
course: "course";
|
|
329
327
|
download: "download";
|
|
328
|
+
course: "course";
|
|
330
329
|
event: "event";
|
|
330
|
+
community: "community";
|
|
331
331
|
}>>]>>>;
|
|
332
332
|
team: z.ZodOptional<z.ZodBoolean>;
|
|
333
333
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
@@ -33,10 +33,10 @@ declare const NotificationView: z.ZodObject<{
|
|
|
33
33
|
id: z.ZodString;
|
|
34
34
|
type: z.ZodString;
|
|
35
35
|
scope: z.ZodEnum<{
|
|
36
|
-
chat: "chat";
|
|
37
36
|
community: "community";
|
|
38
37
|
org: "org";
|
|
39
38
|
space: "space";
|
|
39
|
+
chat: "chat";
|
|
40
40
|
}>;
|
|
41
41
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
42
42
|
subject: "subject";
|
|
@@ -86,14 +86,14 @@ declare const NotificationView: z.ZodObject<{
|
|
|
86
86
|
subject: z.ZodNullable<z.ZodObject<{
|
|
87
87
|
type: z.ZodEnum<{
|
|
88
88
|
message: "message";
|
|
89
|
-
chat: "chat";
|
|
90
|
-
community: "community";
|
|
91
|
-
course: "course";
|
|
92
89
|
download: "download";
|
|
90
|
+
course: "course";
|
|
93
91
|
event: "event";
|
|
94
92
|
bundle: "bundle";
|
|
95
93
|
activity: "activity";
|
|
94
|
+
community: "community";
|
|
96
95
|
space: "space";
|
|
96
|
+
chat: "chat";
|
|
97
97
|
post: "post";
|
|
98
98
|
comment: "comment";
|
|
99
99
|
}>;
|
|
@@ -104,14 +104,14 @@ declare const NotificationView: z.ZodObject<{
|
|
|
104
104
|
parent: z.ZodNullable<z.ZodObject<{
|
|
105
105
|
type: z.ZodEnum<{
|
|
106
106
|
message: "message";
|
|
107
|
-
chat: "chat";
|
|
108
|
-
community: "community";
|
|
109
|
-
course: "course";
|
|
110
107
|
download: "download";
|
|
108
|
+
course: "course";
|
|
111
109
|
event: "event";
|
|
112
110
|
bundle: "bundle";
|
|
113
111
|
activity: "activity";
|
|
112
|
+
community: "community";
|
|
114
113
|
space: "space";
|
|
114
|
+
chat: "chat";
|
|
115
115
|
post: "post";
|
|
116
116
|
comment: "comment";
|
|
117
117
|
}>;
|
|
@@ -127,10 +127,10 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
127
127
|
id: z.ZodString;
|
|
128
128
|
type: z.ZodString;
|
|
129
129
|
scope: z.ZodEnum<{
|
|
130
|
-
chat: "chat";
|
|
131
130
|
community: "community";
|
|
132
131
|
org: "org";
|
|
133
132
|
space: "space";
|
|
133
|
+
chat: "chat";
|
|
134
134
|
}>;
|
|
135
135
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
136
136
|
subject: "subject";
|
|
@@ -180,14 +180,14 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
180
180
|
subject: z.ZodNullable<z.ZodObject<{
|
|
181
181
|
type: z.ZodEnum<{
|
|
182
182
|
message: "message";
|
|
183
|
-
chat: "chat";
|
|
184
|
-
community: "community";
|
|
185
|
-
course: "course";
|
|
186
183
|
download: "download";
|
|
184
|
+
course: "course";
|
|
187
185
|
event: "event";
|
|
188
186
|
bundle: "bundle";
|
|
189
187
|
activity: "activity";
|
|
188
|
+
community: "community";
|
|
190
189
|
space: "space";
|
|
190
|
+
chat: "chat";
|
|
191
191
|
post: "post";
|
|
192
192
|
comment: "comment";
|
|
193
193
|
}>;
|
|
@@ -198,14 +198,14 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
198
198
|
parent: z.ZodNullable<z.ZodObject<{
|
|
199
199
|
type: z.ZodEnum<{
|
|
200
200
|
message: "message";
|
|
201
|
-
chat: "chat";
|
|
202
|
-
community: "community";
|
|
203
|
-
course: "course";
|
|
204
201
|
download: "download";
|
|
202
|
+
course: "course";
|
|
205
203
|
event: "event";
|
|
206
204
|
bundle: "bundle";
|
|
207
205
|
activity: "activity";
|
|
206
|
+
community: "community";
|
|
208
207
|
space: "space";
|
|
208
|
+
chat: "chat";
|
|
209
209
|
post: "post";
|
|
210
210
|
comment: "comment";
|
|
211
211
|
}>;
|
|
@@ -355,10 +355,10 @@ declare const NotificationListScopeQuery: z.ZodObject<{
|
|
|
355
355
|
declare const NotificationTypeInfo: z.ZodObject<{
|
|
356
356
|
type: z.ZodString;
|
|
357
357
|
scopes: z.ZodArray<z.ZodEnum<{
|
|
358
|
-
chat: "chat";
|
|
359
358
|
community: "community";
|
|
360
359
|
org: "org";
|
|
361
360
|
space: "space";
|
|
361
|
+
chat: "chat";
|
|
362
362
|
}>>;
|
|
363
363
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
364
364
|
subject: "subject";
|
|
@@ -379,10 +379,10 @@ declare const NotificationTypeInfo: z.ZodObject<{
|
|
|
379
379
|
declare const NotificationTypeInfos: z.ZodArray<z.ZodObject<{
|
|
380
380
|
type: z.ZodString;
|
|
381
381
|
scopes: z.ZodArray<z.ZodEnum<{
|
|
382
|
-
chat: "chat";
|
|
383
382
|
community: "community";
|
|
384
383
|
org: "org";
|
|
385
384
|
space: "space";
|
|
385
|
+
chat: "chat";
|
|
386
386
|
}>>;
|
|
387
387
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
388
388
|
subject: "subject";
|
|
@@ -422,10 +422,10 @@ declare const CommunityNotificationSettings: z.ZodObject<{
|
|
|
422
422
|
enabled: z.ZodBoolean;
|
|
423
423
|
default: z.ZodBoolean;
|
|
424
424
|
source: z.ZodEnum<{
|
|
425
|
-
locked: "locked";
|
|
426
425
|
default: "default";
|
|
427
426
|
community: "community";
|
|
428
427
|
space: "space";
|
|
428
|
+
locked: "locked";
|
|
429
429
|
spaceDefault: "spaceDefault";
|
|
430
430
|
}>;
|
|
431
431
|
locked: z.ZodBoolean;
|
|
@@ -438,10 +438,10 @@ declare const CommunityNotificationSettings: z.ZodObject<{
|
|
|
438
438
|
enabled: z.ZodBoolean;
|
|
439
439
|
default: z.ZodBoolean;
|
|
440
440
|
source: z.ZodEnum<{
|
|
441
|
-
locked: "locked";
|
|
442
441
|
default: "default";
|
|
443
442
|
community: "community";
|
|
444
443
|
space: "space";
|
|
444
|
+
locked: "locked";
|
|
445
445
|
spaceDefault: "spaceDefault";
|
|
446
446
|
}>;
|
|
447
447
|
locked: z.ZodBoolean;
|
|
@@ -458,10 +458,10 @@ declare const OrgNotificationSettings: z.ZodObject<{
|
|
|
458
458
|
enabled: z.ZodBoolean;
|
|
459
459
|
default: z.ZodBoolean;
|
|
460
460
|
source: z.ZodEnum<{
|
|
461
|
-
locked: "locked";
|
|
462
461
|
default: "default";
|
|
463
462
|
community: "community";
|
|
464
463
|
space: "space";
|
|
464
|
+
locked: "locked";
|
|
465
465
|
spaceDefault: "spaceDefault";
|
|
466
466
|
}>;
|
|
467
467
|
locked: z.ZodBoolean;
|
|
@@ -474,10 +474,10 @@ declare const OrgNotificationSettings: z.ZodObject<{
|
|
|
474
474
|
enabled: z.ZodBoolean;
|
|
475
475
|
default: z.ZodBoolean;
|
|
476
476
|
source: z.ZodEnum<{
|
|
477
|
-
locked: "locked";
|
|
478
477
|
default: "default";
|
|
479
478
|
community: "community";
|
|
480
479
|
space: "space";
|
|
480
|
+
locked: "locked";
|
|
481
481
|
spaceDefault: "spaceDefault";
|
|
482
482
|
}>;
|
|
483
483
|
locked: z.ZodBoolean;
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
declare const CreatePlatformOrganization: z.ZodObject<{
|
|
4
4
|
name: z.ZodString;
|
|
5
5
|
slug: z.ZodString;
|
|
6
|
-
|
|
6
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
8
|
declare const PlatformOrganization: z.ZodObject<{
|
|
9
9
|
organization: z.ZodObject<{
|
|
@@ -11,6 +11,7 @@ declare const PlatformOrganization: z.ZodObject<{
|
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
slug: z.ZodString;
|
|
13
13
|
createdAt: z.ZodString;
|
|
14
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
14
15
|
}, z.core.$strip>;
|
|
15
16
|
apiKey: z.ZodObject<{
|
|
16
17
|
id: z.ZodString;
|
|
@@ -5,10 +5,10 @@ import { z } from "zod";
|
|
|
5
5
|
const CreatePlatformOrganization = z.object({
|
|
6
6
|
name: z.string().trim().min(1).max(100),
|
|
7
7
|
slug: z.string().min(1).max(50).regex(/^[a-z0-9-]+$/, "Use lowercase letters, numbers, and hyphens only"),
|
|
8
|
-
|
|
8
|
+
metadata: z.record(z.string().min(1).max(40), z.string().max(500)).refine((metadata) => Object.keys(metadata).length <= 50, "At most 50 metadata keys").optional().describe("Key-value pairs stored with the organization")
|
|
9
9
|
});
|
|
10
10
|
const PlatformOrganization = z.object({
|
|
11
|
-
organization: Organization,
|
|
11
|
+
organization: Organization.extend({ metadata: z.record(z.string(), z.string()) }),
|
|
12
12
|
apiKey: CreatedApiKey
|
|
13
13
|
});
|
|
14
14
|
const CreatePlatformApiKey = z.object({ name: ApiKeyName });
|
|
@@ -1 +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
|
|
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 metadata: z\n .record(z.string().min(1).max(40), z.string().max(500))\n .refine((metadata) => Object.keys(metadata).length <= 50, 'At most 50 metadata keys')\n .optional()\n .describe('Key-value pairs stored with the organization'),\n});\n\nexport const PlatformOrganization = z.object({\n organization: Organization.extend({ metadata: z.record(z.string(), z.string()) }),\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,UAAU,EACP,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CACtD,QAAQ,aAAa,OAAO,KAAK,QAAQ,CAAC,CAAC,UAAU,IAAI,0BAA0B,CAAC,CACpF,SAAS,CAAC,CACV,SAAS,8CAA8C;AAC5D,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO;CAC3C,cAAc,aAAa,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,CAAC;CAChF,QAAQ;AACV,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEjE,MAAa,qBAAqB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -13,9 +13,9 @@ declare const PostView: z.ZodObject<{
|
|
|
13
13
|
coverAssetId: z.ZodNullable<z.ZodString>;
|
|
14
14
|
status: z.ZodEnum<{
|
|
15
15
|
pending: "pending";
|
|
16
|
-
draft: "draft";
|
|
17
16
|
published: "published";
|
|
18
17
|
removed: "removed";
|
|
18
|
+
draft: "draft";
|
|
19
19
|
scheduled: "scheduled";
|
|
20
20
|
}>;
|
|
21
21
|
scheduledAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
@@ -74,8 +74,8 @@ declare const PostFlag: z.ZodObject<{
|
|
|
74
74
|
reason: z.ZodString;
|
|
75
75
|
resolvedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
76
76
|
resolution: z.ZodNullable<z.ZodEnum<{
|
|
77
|
-
dismissed: "dismissed";
|
|
78
77
|
removed: "removed";
|
|
78
|
+
dismissed: "dismissed";
|
|
79
79
|
}>>;
|
|
80
80
|
resolvedBy: z.ZodNullable<z.ZodString>;
|
|
81
81
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -95,9 +95,9 @@ declare const PostFeedPage: z.ZodObject<{
|
|
|
95
95
|
coverAssetId: z.ZodNullable<z.ZodString>;
|
|
96
96
|
status: z.ZodEnum<{
|
|
97
97
|
pending: "pending";
|
|
98
|
-
draft: "draft";
|
|
99
98
|
published: "published";
|
|
100
99
|
removed: "removed";
|
|
100
|
+
draft: "draft";
|
|
101
101
|
scheduled: "scheduled";
|
|
102
102
|
}>;
|
|
103
103
|
scheduledAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
@@ -208,9 +208,9 @@ declare const SpaceQueue: z.ZodObject<{
|
|
|
208
208
|
coverAssetId: z.ZodNullable<z.ZodString>;
|
|
209
209
|
status: z.ZodEnum<{
|
|
210
210
|
pending: "pending";
|
|
211
|
-
draft: "draft";
|
|
212
211
|
published: "published";
|
|
213
212
|
removed: "removed";
|
|
213
|
+
draft: "draft";
|
|
214
214
|
scheduled: "scheduled";
|
|
215
215
|
}>;
|
|
216
216
|
scheduledAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
@@ -269,8 +269,8 @@ declare const SpaceQueue: z.ZodObject<{
|
|
|
269
269
|
reason: z.ZodString;
|
|
270
270
|
resolvedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
271
271
|
resolution: z.ZodNullable<z.ZodEnum<{
|
|
272
|
-
dismissed: "dismissed";
|
|
273
272
|
removed: "removed";
|
|
273
|
+
dismissed: "dismissed";
|
|
274
274
|
}>>;
|
|
275
275
|
resolvedBy: z.ZodNullable<z.ZodString>;
|
|
276
276
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -284,8 +284,8 @@ declare const SpaceQueue: z.ZodObject<{
|
|
|
284
284
|
reason: z.ZodString;
|
|
285
285
|
resolvedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
286
286
|
resolution: z.ZodNullable<z.ZodEnum<{
|
|
287
|
-
dismissed: "dismissed";
|
|
288
287
|
removed: "removed";
|
|
288
|
+
dismissed: "dismissed";
|
|
289
289
|
}>>;
|
|
290
290
|
resolvedBy: z.ZodNullable<z.ZodString>;
|
|
291
291
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/http/schemas/profile.d.ts
|
|
3
3
|
declare const UserProfile: z.ZodObject<{
|
|
4
|
-
createdAt: z.ZodCoercedDate<unknown>;
|
|
5
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
6
4
|
displayName: z.ZodNullable<z.ZodString>;
|
|
7
5
|
headline: z.ZodNullable<z.ZodString>;
|
|
8
6
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
9
7
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
10
|
-
|
|
8
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
9
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
11
10
|
extra: z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>;
|
|
12
11
|
userId: z.ZodString;
|
|
12
|
+
bio: z.ZodNullable<z.ZodString>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
declare const UpdateProfile: z.ZodObject<{
|
|
15
15
|
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/http/schemas/students.d.ts
|
|
3
3
|
declare const OrgUserStatus: z.ZodEnum<{
|
|
4
|
-
invited: "invited";
|
|
5
4
|
active: "active";
|
|
5
|
+
invited: "invited";
|
|
6
6
|
}>;
|
|
7
7
|
type OrgUserStatus = z.infer<typeof OrgUserStatus>;
|
|
8
8
|
declare const Student: z.ZodObject<{
|
|
@@ -14,18 +14,18 @@ declare const Student: z.ZodObject<{
|
|
|
14
14
|
entitlementCount: z.ZodNumber;
|
|
15
15
|
avgProgress: z.ZodNumber;
|
|
16
16
|
status: z.ZodEnum<{
|
|
17
|
-
invited: "invited";
|
|
18
17
|
active: "active";
|
|
18
|
+
invited: "invited";
|
|
19
19
|
}>;
|
|
20
20
|
joinedAt: z.ZodString;
|
|
21
21
|
lastActiveAt: z.ZodNullable<z.ZodString>;
|
|
22
22
|
items: z.ZodArray<z.ZodObject<{
|
|
23
23
|
contentId: z.ZodString;
|
|
24
24
|
contentType: z.ZodEnum<{
|
|
25
|
-
community: "community";
|
|
26
|
-
course: "course";
|
|
27
25
|
download: "download";
|
|
26
|
+
course: "course";
|
|
28
27
|
event: "event";
|
|
28
|
+
community: "community";
|
|
29
29
|
}>;
|
|
30
30
|
roleKey: z.ZodString;
|
|
31
31
|
roleName: z.ZodString;
|
|
@@ -77,18 +77,18 @@ declare const StudentsPage: z.ZodObject<{
|
|
|
77
77
|
entitlementCount: z.ZodNumber;
|
|
78
78
|
avgProgress: z.ZodNumber;
|
|
79
79
|
status: z.ZodEnum<{
|
|
80
|
-
invited: "invited";
|
|
81
80
|
active: "active";
|
|
81
|
+
invited: "invited";
|
|
82
82
|
}>;
|
|
83
83
|
joinedAt: z.ZodString;
|
|
84
84
|
lastActiveAt: z.ZodNullable<z.ZodString>;
|
|
85
85
|
items: z.ZodArray<z.ZodObject<{
|
|
86
86
|
contentId: z.ZodString;
|
|
87
87
|
contentType: z.ZodEnum<{
|
|
88
|
-
community: "community";
|
|
89
|
-
course: "course";
|
|
90
88
|
download: "download";
|
|
89
|
+
course: "course";
|
|
91
90
|
event: "event";
|
|
91
|
+
community: "community";
|
|
92
92
|
}>;
|
|
93
93
|
roleKey: z.ZodString;
|
|
94
94
|
roleName: z.ZodString;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ import { InlineAutomationEngine } from "@headless-lms/adapter-defaults/workflows
|
|
|
11
11
|
import { AutomationEngine, WebhookSender } from "@headless-lms/core/automations";
|
|
12
12
|
import { Mailer } from "@headless-lms/core/shared/mailer";
|
|
13
13
|
import { PushConfig } from "@headless-lms/core/types";
|
|
14
|
-
import { EmailMessage, EmailSender, ObjectStorage } from "@headless-lms/core/shared/ports";
|
|
14
|
+
import { DomainEvent, EmailMessage, EmailSender, EventBus, EventDefinition, ObjectStorage } from "@headless-lms/core/shared/ports";
|
|
15
15
|
//#region src/index.d.ts
|
|
16
16
|
declare function createContainer(config: ServerConfig, options?: BuildContainerOptions): Promise<Container>;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { type AdapterOverrides, type AuthUser, type AutomationEngine, type BuildContainerOptions, type CatalogueField, type CataloguePermission, type CatalogueTool, type CloseOnSignalsOptions, type Container, type Config as ContainerConfig, type EmailMessage, type EmailSender, InlineAutomationEngine, type LoggingConfig, type Mailer, type McpCatalogue, type ObjectStorage, type PlatformConfig, type PushConfig, type ServerConfig, type WebhookSender, buildServer, closeOnSignals, createContainer, loadIntegrations, mcpCatalogue, runMigrations };
|
|
18
|
+
export { type AdapterOverrides, type AuthUser, type AutomationEngine, type BuildContainerOptions, type CatalogueField, type CataloguePermission, type CatalogueTool, type CloseOnSignalsOptions, type Container, type Config as ContainerConfig, type DomainEvent, type EmailMessage, type EmailSender, type EventBus, type EventDefinition, InlineAutomationEngine, type LoggingConfig, type Mailer, type McpCatalogue, type ObjectStorage, type PlatformConfig, type PushConfig, type ServerConfig, type WebhookSender, buildServer, closeOnSignals, createContainer, loadIntegrations, mcpCatalogue, runMigrations };
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Public surface of @headless-lms/server. Installations compose these:\n// const container = await createContainer(config, { pluginsDir, adapters })\n// const app = await buildServer(config, container)\nimport { buildContainer, type BuildContainerOptions, type Container } from './app/container.js';\nimport type { ServerConfig } from './http/config.js';\n\nexport { buildServer } from './http/server.js';\nexport { closeOnSignals, type CloseOnSignalsOptions } from './http/shutdown.js';\nexport { mcpCatalogue } from './http/mcp/catalogue.js';\nexport type {\n CatalogueField,\n CataloguePermission,\n CatalogueTool,\n McpCatalogue,\n} from './http/mcp/catalogue.js';\nexport { loadIntegrations } from './app/integrations.js';\nexport { InlineAutomationEngine } from '@headless-lms/adapter-defaults/workflows';\n// Operational functions consumed by the @headless-lms/cli bin.\nexport { runMigrations } from '@headless-lms/adapter-db';\nexport type { ServerConfig } from './http/config.js';\n// Re-exporting AuthUser also pulls its module into any program that imports\n// this file (directly or via the workspace path mapping), which is what\n// applies its ambient `declare module \"fastify\"` augmentation\n// (FastifyRequest.authUser/orgId, FastifyInstance.requireOrgSession) —\n// otherwise nothing imports fastify.d.ts and the augmentation never loads.\nexport type { AuthUser } from './http/fastify.js';\nexport type {\n Config as ContainerConfig,\n Container,\n AdapterOverrides,\n BuildContainerOptions,\n LoggingConfig,\n} from './app/container.js';\nexport type { PlatformConfig } from './app/platform.js';\nexport type {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Public surface of @headless-lms/server. Installations compose these:\n// const container = await createContainer(config, { pluginsDir, adapters })\n// const app = await buildServer(config, container)\nimport { buildContainer, type BuildContainerOptions, type Container } from './app/container.js';\nimport type { ServerConfig } from './http/config.js';\n\nexport { buildServer } from './http/server.js';\nexport { closeOnSignals, type CloseOnSignalsOptions } from './http/shutdown.js';\nexport { mcpCatalogue } from './http/mcp/catalogue.js';\nexport type {\n CatalogueField,\n CataloguePermission,\n CatalogueTool,\n McpCatalogue,\n} from './http/mcp/catalogue.js';\nexport { loadIntegrations } from './app/integrations.js';\nexport { InlineAutomationEngine } from '@headless-lms/adapter-defaults/workflows';\n// Operational functions consumed by the @headless-lms/cli bin.\nexport { runMigrations } from '@headless-lms/adapter-db';\nexport type { ServerConfig } from './http/config.js';\n// Re-exporting AuthUser also pulls its module into any program that imports\n// this file (directly or via the workspace path mapping), which is what\n// applies its ambient `declare module \"fastify\"` augmentation\n// (FastifyRequest.authUser/orgId, FastifyInstance.requireOrgSession) —\n// otherwise nothing imports fastify.d.ts and the augmentation never loads.\nexport type { AuthUser } from './http/fastify.js';\nexport type {\n Config as ContainerConfig,\n Container,\n AdapterOverrides,\n BuildContainerOptions,\n LoggingConfig,\n} from './app/container.js';\nexport type { PlatformConfig } from './app/platform.js';\nexport type {\n DomainEvent,\n EmailSender,\n EmailMessage,\n EventBus,\n EventDefinition,\n ObjectStorage,\n} from '@headless-lms/core/shared/ports';\nexport type { Mailer } from '@headless-lms/core/shared/mailer';\nexport type { AutomationEngine, WebhookSender } from '@headless-lms/core/automations';\nexport type { PushConfig } from '@headless-lms/core/types';\n\nexport async function createContainer(\n config: ServerConfig,\n options?: BuildContainerOptions,\n): Promise<Container> {\n return buildContainer(\n {\n ...config.container,\n deliveryExpirySeconds: config.deliveryExpirySeconds,\n memberImageMaxBytes: config.memberImageMaxBytes,\n memberFileMaxBytes: config.memberFileMaxBytes,\n },\n options,\n );\n}\n"],"mappings":";;;;;;;;AA8CA,eAAsB,gBACpB,QACA,SACoB;CACpB,OAAO,eACL;EACE,GAAG,OAAO;EACV,uBAAuB,OAAO;EAC9B,qBAAqB,OAAO;EAC5B,oBAAoB,OAAO;CAC7B,GACA,OACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-lms/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"fastify": "^5.2.0",
|
|
24
24
|
"fastify-type-provider-zod": "^7.0.0",
|
|
25
25
|
"zod": "4.6.7",
|
|
26
|
-
"@headless-lms/adapter-
|
|
27
|
-
"@headless-lms/
|
|
28
|
-
"@headless-lms/adapter-
|
|
29
|
-
"@headless-lms/
|
|
26
|
+
"@headless-lms/adapter-auth": "0.4.1",
|
|
27
|
+
"@headless-lms/adapter-db": "0.6.0",
|
|
28
|
+
"@headless-lms/adapter-defaults": "0.5.1",
|
|
29
|
+
"@headless-lms/core": "0.6.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.10.2",
|