@headless-lms/server 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +3 -3
- package/dist/http/schemas/assets.d.ts +20 -20
- package/dist/http/schemas/chats.d.ts +12 -12
- package/dist/http/schemas/community.d.ts +46 -19
- package/dist/http/schemas/community.js +6 -3
- package/dist/http/schemas/community.js.map +1 -1
- package/dist/http/schemas/events.d.ts +12 -12
- 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/members.d.ts +13 -13
- package/dist/http/schemas/notifications.d.ts +27 -27
- 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/students.d.ts +5 -5
- package/dist/packages/server/package.js +1 -1
- package/package.json +5 -5
|
@@ -35,21 +35,21 @@ declare const AvailableIntegrationsList: z.ZodArray<z.ZodObject<{
|
|
|
35
35
|
type AvailableIntegrationsList = z.infer<typeof AvailableIntegrationsList>;
|
|
36
36
|
/** The connection row minus credentialRef — not even the reference leaks. */
|
|
37
37
|
declare const Connection: z.ZodObject<{
|
|
38
|
-
orgId: z.ZodString;
|
|
39
38
|
id: z.ZodString;
|
|
40
39
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
41
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
42
40
|
active: z.ZodBoolean;
|
|
41
|
+
orgId: z.ZodString;
|
|
42
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
43
43
|
config: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
44
44
|
integrationId: z.ZodString;
|
|
45
45
|
}, z.core.$strict>;
|
|
46
46
|
type Connection = z.infer<typeof Connection>;
|
|
47
47
|
declare const ConnectionsList: z.ZodArray<z.ZodObject<{
|
|
48
|
-
orgId: z.ZodString;
|
|
49
48
|
id: z.ZodString;
|
|
50
49
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
51
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
52
50
|
active: z.ZodBoolean;
|
|
51
|
+
orgId: z.ZodString;
|
|
52
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
53
53
|
config: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
54
54
|
integrationId: z.ZodString;
|
|
55
55
|
}, z.core.$strict>>;
|
|
@@ -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,9 +12,9 @@ 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
15
|
course: "course";
|
|
17
16
|
download: "download";
|
|
17
|
+
community: "community";
|
|
18
18
|
event: "event";
|
|
19
19
|
}>;
|
|
20
20
|
roleKey: 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
37
|
course: "course";
|
|
39
38
|
download: "download";
|
|
39
|
+
community: "community";
|
|
40
40
|
event: "event";
|
|
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
80
|
course: "course";
|
|
82
81
|
download: "download";
|
|
82
|
+
community: "community";
|
|
83
83
|
event: "event";
|
|
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,9 +116,9 @@ 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
119
|
course: "course";
|
|
121
120
|
download: "download";
|
|
121
|
+
community: "community";
|
|
122
122
|
event: "event";
|
|
123
123
|
}>>;
|
|
124
124
|
}, z.core.$strip>;
|
|
@@ -128,9 +128,9 @@ 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
131
|
course: "course";
|
|
133
132
|
download: "download";
|
|
133
|
+
community: "community";
|
|
134
134
|
event: "event";
|
|
135
135
|
}>>;
|
|
136
136
|
}, z.core.$strip>>;
|
|
@@ -143,9 +143,9 @@ 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
146
|
course: "course";
|
|
148
147
|
download: "download";
|
|
148
|
+
community: "community";
|
|
149
149
|
event: "event";
|
|
150
150
|
}>>]>>;
|
|
151
151
|
team: z.ZodBoolean;
|
|
@@ -206,9 +206,9 @@ 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
209
|
course: "course";
|
|
211
210
|
download: "download";
|
|
211
|
+
community: "community";
|
|
212
212
|
event: "event";
|
|
213
213
|
}>>]>>;
|
|
214
214
|
team: z.ZodBoolean;
|
|
@@ -267,9 +267,9 @@ 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
270
|
course: "course";
|
|
272
271
|
download: "download";
|
|
272
|
+
community: "community";
|
|
273
273
|
event: "event";
|
|
274
274
|
}>>]>>>;
|
|
275
275
|
team: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -324,9 +324,9 @@ 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
327
|
course: "course";
|
|
329
328
|
download: "download";
|
|
329
|
+
community: "community";
|
|
330
330
|
event: "event";
|
|
331
331
|
}>>]>>>;
|
|
332
332
|
team: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5,8 +5,8 @@ declare const NotificationIdParam: z.ZodObject<{
|
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
declare const NotificationFilterQuery: z.ZodObject<{
|
|
7
7
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
8
|
-
community: "community";
|
|
9
8
|
org: "org";
|
|
9
|
+
community: "community";
|
|
10
10
|
}>>;
|
|
11
11
|
communityId: z.ZodOptional<z.ZodString>;
|
|
12
12
|
includeOrg: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
@@ -19,8 +19,8 @@ declare const NotificationListQuery: z.ZodObject<{
|
|
|
19
19
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
20
20
|
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
21
21
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
22
|
-
community: "community";
|
|
23
22
|
org: "org";
|
|
23
|
+
community: "community";
|
|
24
24
|
}>>;
|
|
25
25
|
communityId: z.ZodOptional<z.ZodString>;
|
|
26
26
|
includeOrg: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
@@ -33,9 +33,9 @@ declare const NotificationView: z.ZodObject<{
|
|
|
33
33
|
id: z.ZodString;
|
|
34
34
|
type: z.ZodString;
|
|
35
35
|
scope: z.ZodEnum<{
|
|
36
|
-
chat: "chat";
|
|
37
|
-
community: "community";
|
|
38
36
|
org: "org";
|
|
37
|
+
community: "community";
|
|
38
|
+
chat: "chat";
|
|
39
39
|
space: "space";
|
|
40
40
|
}>;
|
|
41
41
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
@@ -85,12 +85,12 @@ declare const NotificationView: z.ZodObject<{
|
|
|
85
85
|
}, z.core.$strip>>;
|
|
86
86
|
subject: z.ZodNullable<z.ZodObject<{
|
|
87
87
|
type: z.ZodEnum<{
|
|
88
|
-
message: "message";
|
|
89
|
-
chat: "chat";
|
|
90
|
-
community: "community";
|
|
91
88
|
course: "course";
|
|
92
89
|
download: "download";
|
|
90
|
+
community: "community";
|
|
93
91
|
event: "event";
|
|
92
|
+
message: "message";
|
|
93
|
+
chat: "chat";
|
|
94
94
|
bundle: "bundle";
|
|
95
95
|
activity: "activity";
|
|
96
96
|
space: "space";
|
|
@@ -103,12 +103,12 @@ declare const NotificationView: z.ZodObject<{
|
|
|
103
103
|
}, z.core.$strip>>;
|
|
104
104
|
parent: z.ZodNullable<z.ZodObject<{
|
|
105
105
|
type: z.ZodEnum<{
|
|
106
|
-
message: "message";
|
|
107
|
-
chat: "chat";
|
|
108
|
-
community: "community";
|
|
109
106
|
course: "course";
|
|
110
107
|
download: "download";
|
|
108
|
+
community: "community";
|
|
111
109
|
event: "event";
|
|
110
|
+
message: "message";
|
|
111
|
+
chat: "chat";
|
|
112
112
|
bundle: "bundle";
|
|
113
113
|
activity: "activity";
|
|
114
114
|
space: "space";
|
|
@@ -127,9 +127,9 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
127
127
|
id: z.ZodString;
|
|
128
128
|
type: z.ZodString;
|
|
129
129
|
scope: z.ZodEnum<{
|
|
130
|
-
chat: "chat";
|
|
131
|
-
community: "community";
|
|
132
130
|
org: "org";
|
|
131
|
+
community: "community";
|
|
132
|
+
chat: "chat";
|
|
133
133
|
space: "space";
|
|
134
134
|
}>;
|
|
135
135
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
@@ -179,12 +179,12 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
179
179
|
}, z.core.$strip>>;
|
|
180
180
|
subject: z.ZodNullable<z.ZodObject<{
|
|
181
181
|
type: z.ZodEnum<{
|
|
182
|
-
message: "message";
|
|
183
|
-
chat: "chat";
|
|
184
|
-
community: "community";
|
|
185
182
|
course: "course";
|
|
186
183
|
download: "download";
|
|
184
|
+
community: "community";
|
|
187
185
|
event: "event";
|
|
186
|
+
message: "message";
|
|
187
|
+
chat: "chat";
|
|
188
188
|
bundle: "bundle";
|
|
189
189
|
activity: "activity";
|
|
190
190
|
space: "space";
|
|
@@ -197,12 +197,12 @@ declare const NotificationsPage: z.ZodObject<{
|
|
|
197
197
|
}, z.core.$strip>>;
|
|
198
198
|
parent: z.ZodNullable<z.ZodObject<{
|
|
199
199
|
type: z.ZodEnum<{
|
|
200
|
-
message: "message";
|
|
201
|
-
chat: "chat";
|
|
202
|
-
community: "community";
|
|
203
200
|
course: "course";
|
|
204
201
|
download: "download";
|
|
202
|
+
community: "community";
|
|
205
203
|
event: "event";
|
|
204
|
+
message: "message";
|
|
205
|
+
chat: "chat";
|
|
206
206
|
bundle: "bundle";
|
|
207
207
|
activity: "activity";
|
|
208
208
|
space: "space";
|
|
@@ -348,16 +348,16 @@ declare const NotificationCategoryDefaults: z.ZodObject<{
|
|
|
348
348
|
}, z.core.$strip>;
|
|
349
349
|
declare const NotificationListScopeQuery: z.ZodObject<{
|
|
350
350
|
scope: z.ZodEnum<{
|
|
351
|
-
community: "community";
|
|
352
351
|
org: "org";
|
|
352
|
+
community: "community";
|
|
353
353
|
}>;
|
|
354
354
|
}, z.core.$strict>;
|
|
355
355
|
declare const NotificationTypeInfo: z.ZodObject<{
|
|
356
356
|
type: z.ZodString;
|
|
357
357
|
scopes: z.ZodArray<z.ZodEnum<{
|
|
358
|
-
chat: "chat";
|
|
359
|
-
community: "community";
|
|
360
358
|
org: "org";
|
|
359
|
+
community: "community";
|
|
360
|
+
chat: "chat";
|
|
361
361
|
space: "space";
|
|
362
362
|
}>>;
|
|
363
363
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
@@ -379,9 +379,9 @@ 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
|
-
community: "community";
|
|
384
382
|
org: "org";
|
|
383
|
+
community: "community";
|
|
384
|
+
chat: "chat";
|
|
385
385
|
space: "space";
|
|
386
386
|
}>>;
|
|
387
387
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
@@ -422,9 +422,9 @@ 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";
|
|
427
|
+
locked: "locked";
|
|
428
428
|
space: "space";
|
|
429
429
|
spaceDefault: "spaceDefault";
|
|
430
430
|
}>;
|
|
@@ -438,9 +438,9 @@ 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";
|
|
443
|
+
locked: "locked";
|
|
444
444
|
space: "space";
|
|
445
445
|
spaceDefault: "spaceDefault";
|
|
446
446
|
}>;
|
|
@@ -458,9 +458,9 @@ 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";
|
|
463
|
+
locked: "locked";
|
|
464
464
|
space: "space";
|
|
465
465
|
spaceDefault: "spaceDefault";
|
|
466
466
|
}>;
|
|
@@ -474,9 +474,9 @@ 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";
|
|
479
|
+
locked: "locked";
|
|
480
480
|
space: "space";
|
|
481
481
|
spaceDefault: "spaceDefault";
|
|
482
482
|
}>;
|
|
@@ -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"}
|
|
@@ -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,17 +14,17 @@ 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
25
|
course: "course";
|
|
27
26
|
download: "download";
|
|
27
|
+
community: "community";
|
|
28
28
|
event: "event";
|
|
29
29
|
}>;
|
|
30
30
|
roleKey: z.ZodString;
|
|
@@ -77,17 +77,17 @@ 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
88
|
course: "course";
|
|
90
89
|
download: "download";
|
|
90
|
+
community: "community";
|
|
91
91
|
event: "event";
|
|
92
92
|
}>;
|
|
93
93
|
roleKey: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-lms/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|