@headless-lms/core 0.1.0 → 0.3.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.
Files changed (249) hide show
  1. package/dist/assets/events.d.ts +90 -9
  2. package/dist/assets/events.js +19 -3
  3. package/dist/assets/events.js.map +1 -1
  4. package/dist/assets/file-urls.d.ts +20 -0
  5. package/dist/assets/file-urls.js +25 -0
  6. package/dist/assets/file-urls.js.map +1 -0
  7. package/dist/assets/index.d.ts +5 -4
  8. package/dist/assets/index.js +3 -2
  9. package/dist/assets/model.d.ts +2 -2
  10. package/dist/assets/ports.d.ts +45 -15
  11. package/dist/assets/service.d.ts +39 -7
  12. package/dist/assets/service.js +292 -37
  13. package/dist/assets/service.js.map +1 -1
  14. package/dist/automations/actions.d.ts +12 -15
  15. package/dist/automations/actions.js +188 -30
  16. package/dist/automations/actions.js.map +1 -1
  17. package/dist/automations/catalog.d.ts +5 -1
  18. package/dist/automations/catalog.js +514 -197
  19. package/dist/automations/catalog.js.map +1 -1
  20. package/dist/automations/community-derivations.d.ts +14 -0
  21. package/dist/automations/community-derivations.js +439 -0
  22. package/dist/automations/community-derivations.js.map +1 -0
  23. package/dist/automations/community-mail.d.ts +112 -0
  24. package/dist/automations/community-mail.js +90 -0
  25. package/dist/automations/community-mail.js.map +1 -0
  26. package/dist/automations/community-notifications.d.ts +16 -0
  27. package/dist/automations/community-notifications.js +84 -0
  28. package/dist/automations/community-notifications.js.map +1 -0
  29. package/dist/automations/events.d.ts +74 -24
  30. package/dist/automations/events.js +5 -5
  31. package/dist/automations/events.js.map +1 -1
  32. package/dist/automations/index.d.ts +7 -5
  33. package/dist/automations/index.js +3 -2
  34. package/dist/automations/model.d.ts +20 -3
  35. package/dist/automations/model.js +36 -3
  36. package/dist/automations/model.js.map +1 -1
  37. package/dist/automations/ports.d.ts +27 -8
  38. package/dist/automations/schedule.d.ts +6 -0
  39. package/dist/automations/schedule.js +41 -0
  40. package/dist/automations/schedule.js.map +1 -0
  41. package/dist/automations/seeds.d.ts +17 -0
  42. package/dist/automations/seeds.js +235 -0
  43. package/dist/automations/seeds.js.map +1 -0
  44. package/dist/automations/service.d.ts +41 -6
  45. package/dist/automations/service.js +542 -59
  46. package/dist/automations/service.js.map +1 -1
  47. package/dist/automations/types.d.ts +2 -2
  48. package/dist/automations/webhook-signing.d.ts +7 -0
  49. package/dist/automations/webhook-signing.js +22 -0
  50. package/dist/automations/webhook-signing.js.map +1 -0
  51. package/dist/content/events.d.ts +1013 -25
  52. package/dist/content/events.js +168 -19
  53. package/dist/content/events.js.map +1 -1
  54. package/dist/content/index.d.ts +5 -5
  55. package/dist/content/index.js +2 -2
  56. package/dist/content/model.d.ts +2 -2
  57. package/dist/content/ports.d.ts +109 -25
  58. package/dist/content/service.d.ts +68 -23
  59. package/dist/content/service.js +647 -60
  60. package/dist/content/service.js.map +1 -1
  61. package/dist/content/types.d.ts +2 -2
  62. package/dist/discussion/authors.d.ts +10 -0
  63. package/dist/discussion/authors.js +23 -0
  64. package/dist/discussion/authors.js.map +1 -0
  65. package/dist/discussion/chats.d.ts +104 -0
  66. package/dist/discussion/chats.js +798 -0
  67. package/dist/discussion/chats.js.map +1 -0
  68. package/dist/discussion/events.d.ts +633 -14
  69. package/dist/discussion/events.js +134 -5
  70. package/dist/discussion/events.js.map +1 -1
  71. package/dist/discussion/index.d.ts +7 -3
  72. package/dist/discussion/index.js +4 -1
  73. package/dist/discussion/model.d.ts +1 -2
  74. package/dist/discussion/ports.d.ts +288 -27
  75. package/dist/discussion/ports.js +6 -1
  76. package/dist/discussion/ports.js.map +1 -0
  77. package/dist/discussion/posts.d.ts +103 -0
  78. package/dist/discussion/posts.js +723 -0
  79. package/dist/discussion/posts.js.map +1 -0
  80. package/dist/discussion/service.d.ts +33 -11
  81. package/dist/discussion/service.js +297 -81
  82. package/dist/discussion/service.js.map +1 -1
  83. package/dist/entitlements/events.d.ts +264 -13
  84. package/dist/entitlements/events.js +49 -5
  85. package/dist/entitlements/events.js.map +1 -1
  86. package/dist/entitlements/index.d.ts +5 -4
  87. package/dist/entitlements/index.js +2 -1
  88. package/dist/entitlements/model.d.ts +3 -2
  89. package/dist/entitlements/ports.d.ts +124 -11
  90. package/dist/entitlements/rules.d.ts +12 -0
  91. package/dist/entitlements/rules.js +17 -0
  92. package/dist/entitlements/rules.js.map +1 -0
  93. package/dist/entitlements/service.d.ts +54 -3
  94. package/dist/entitlements/service.js +473 -2
  95. package/dist/entitlements/service.js.map +1 -1
  96. package/dist/identity/access.d.ts +6 -0
  97. package/dist/identity/access.js +7 -0
  98. package/dist/identity/access.js.map +1 -0
  99. package/dist/identity/events.d.ts +17 -3
  100. package/dist/identity/events.js +12 -2
  101. package/dist/identity/events.js.map +1 -1
  102. package/dist/identity/index.d.ts +6 -4
  103. package/dist/identity/index.js +3 -1
  104. package/dist/identity/model.d.ts +2 -1
  105. package/dist/identity/notifications.d.ts +27 -0
  106. package/dist/identity/notifications.js +101 -0
  107. package/dist/identity/notifications.js.map +1 -0
  108. package/dist/identity/ports.d.ts +76 -3
  109. package/dist/identity/service.d.ts +17 -3
  110. package/dist/identity/service.js +73 -5
  111. package/dist/identity/service.js.map +1 -1
  112. package/dist/integrations/events.d.ts +27 -3
  113. package/dist/integrations/events.js +15 -3
  114. package/dist/integrations/events.js.map +1 -1
  115. package/dist/integrations/model.js +1 -1
  116. package/dist/integrations/model.js.map +1 -1
  117. package/dist/integrations/service.js +2 -2
  118. package/dist/integrations/service.js.map +1 -1
  119. package/dist/organizations/access-scopes.d.ts +19 -0
  120. package/dist/organizations/access-scopes.js +89 -0
  121. package/dist/organizations/access-scopes.js.map +1 -0
  122. package/dist/organizations/events.d.ts +234 -25
  123. package/dist/organizations/events.js +58 -9
  124. package/dist/organizations/events.js.map +1 -1
  125. package/dist/organizations/index.d.ts +8 -7
  126. package/dist/organizations/index.js +4 -3
  127. package/dist/organizations/members.d.ts +8 -5
  128. package/dist/organizations/members.js.map +1 -1
  129. package/dist/organizations/ports.d.ts +20 -21
  130. package/dist/organizations/roles.d.ts +6 -10
  131. package/dist/organizations/roles.js +19 -7
  132. package/dist/organizations/roles.js.map +1 -1
  133. package/dist/organizations/service.d.ts +28 -14
  134. package/dist/organizations/service.js +274 -105
  135. package/dist/organizations/service.js.map +1 -1
  136. package/dist/organizations/types.d.ts +2 -11
  137. package/dist/progress/events.d.ts +34 -2
  138. package/dist/progress/events.js +15 -2
  139. package/dist/progress/events.js.map +1 -1
  140. package/dist/progress/index.d.ts +2 -2
  141. package/dist/progress/ports.d.ts +6 -1
  142. package/dist/progress/service.d.ts +5 -3
  143. package/dist/progress/service.js +9 -3
  144. package/dist/progress/service.js.map +1 -1
  145. package/dist/reporting/admin/index.d.ts +4 -0
  146. package/dist/reporting/admin/index.js +2 -0
  147. package/dist/reporting/admin/model.d.ts +108 -0
  148. package/dist/reporting/admin/ports.d.ts +27 -0
  149. package/dist/reporting/admin/service.d.ts +22 -0
  150. package/dist/reporting/admin/service.js +38 -0
  151. package/dist/reporting/admin/service.js.map +1 -0
  152. package/dist/reporting/member/index.d.ts +5 -0
  153. package/dist/reporting/member/index.js +2 -0
  154. package/dist/reporting/member/model.d.ts +124 -0
  155. package/dist/reporting/member/ports.d.ts +45 -0
  156. package/dist/reporting/member/service.d.ts +73 -0
  157. package/dist/reporting/member/service.js +286 -0
  158. package/dist/reporting/member/service.js.map +1 -0
  159. package/dist/shared/actor.d.ts +9 -0
  160. package/dist/shared/errors.d.ts +7 -1
  161. package/dist/shared/errors.js +10 -1
  162. package/dist/shared/errors.js.map +1 -1
  163. package/dist/shared/events.d.ts +5 -3
  164. package/dist/shared/events.js +1 -0
  165. package/dist/shared/events.js.map +1 -1
  166. package/dist/shared/id.d.ts +12 -0
  167. package/dist/shared/id.js +13 -1
  168. package/dist/shared/id.js.map +1 -1
  169. package/dist/shared/mailer.d.ts +6 -1
  170. package/dist/shared/mailer.js.map +1 -1
  171. package/dist/shared/network.d.ts +10 -0
  172. package/dist/shared/network.js +211 -0
  173. package/dist/shared/network.js.map +1 -0
  174. package/dist/shared/settings.js.map +1 -1
  175. package/dist/types/assets.d.ts +2 -2
  176. package/dist/types/automations.d.ts +21 -2
  177. package/dist/types/content.d.ts +2 -2
  178. package/dist/types/discussion.d.ts +12 -3
  179. package/dist/types/email-templates.d.ts +124 -1
  180. package/dist/types/entitlements.d.ts +2 -2
  181. package/dist/types/events.d.ts +3 -3
  182. package/dist/types/identity.d.ts +48 -2
  183. package/dist/types/index.d.ts +10 -10
  184. package/dist/types/organizations.d.ts +2 -2
  185. package/dist/types/ports.d.ts +7 -1
  186. package/dist/types/schemas/assets.d.ts +67 -36
  187. package/dist/types/schemas/assets.js +19 -13
  188. package/dist/types/schemas/assets.js.map +1 -1
  189. package/dist/types/schemas/automations.d.ts +88 -4
  190. package/dist/types/schemas/automations.js +46 -6
  191. package/dist/types/schemas/automations.js.map +1 -1
  192. package/dist/types/schemas/content.d.ts +385 -20
  193. package/dist/types/schemas/content.js +178 -15
  194. package/dist/types/schemas/content.js.map +1 -1
  195. package/dist/types/schemas/credentials.js.map +1 -1
  196. package/dist/types/schemas/discussion.d.ts +379 -4
  197. package/dist/types/schemas/discussion.js +209 -7
  198. package/dist/types/schemas/discussion.js.map +1 -1
  199. package/dist/types/schemas/entitlements.d.ts +44 -4
  200. package/dist/types/schemas/entitlements.js +32 -4
  201. package/dist/types/schemas/entitlements.js.map +1 -1
  202. package/dist/types/schemas/identity.d.ts +115 -5
  203. package/dist/types/schemas/identity.js +59 -6
  204. package/dist/types/schemas/identity.js.map +1 -1
  205. package/dist/types/schemas/index.d.ts +9 -9
  206. package/dist/types/schemas/index.js +9 -9
  207. package/dist/types/schemas/integrations.js.map +1 -1
  208. package/dist/types/schemas/organizations.d.ts +27 -5
  209. package/dist/types/schemas/organizations.js +14 -7
  210. package/dist/types/schemas/organizations.js.map +1 -1
  211. package/dist/types/schemas/outbox.d.ts +1 -0
  212. package/dist/types/schemas/outbox.js +1 -0
  213. package/dist/types/schemas/outbox.js.map +1 -1
  214. package/dist/types/schemas/progress.d.ts +1 -0
  215. package/dist/types/schemas/progress.js +1 -0
  216. package/dist/types/schemas/progress.js.map +1 -1
  217. package/dist/types/schemas/settings.js.map +1 -1
  218. package/dist/types/schemas/shared.d.ts +4 -1
  219. package/dist/types/schemas/shared.js +7 -1
  220. package/dist/types/schemas/shared.js.map +1 -1
  221. package/dist/types/shared.d.ts +1 -1
  222. package/package.json +2 -2
  223. package/dist/reporting/dashboard/index.d.ts +0 -4
  224. package/dist/reporting/dashboard/index.js +0 -2
  225. package/dist/reporting/dashboard/model.d.ts +0 -14
  226. package/dist/reporting/dashboard/ports.d.ts +0 -13
  227. package/dist/reporting/dashboard/service.d.ts +0 -19
  228. package/dist/reporting/dashboard/service.js +0 -20
  229. package/dist/reporting/dashboard/service.js.map +0 -1
  230. package/dist/reporting/learn/index.d.ts +0 -5
  231. package/dist/reporting/learn/index.js +0 -2
  232. package/dist/reporting/learn/model.d.ts +0 -23
  233. package/dist/reporting/learn/ports.d.ts +0 -42
  234. package/dist/reporting/learn/service.d.ts +0 -48
  235. package/dist/reporting/learn/service.js +0 -111
  236. package/dist/reporting/learn/service.js.map +0 -1
  237. package/dist/reporting/students/index.d.ts +0 -4
  238. package/dist/reporting/students/index.js +0 -2
  239. package/dist/reporting/students/model.d.ts +0 -31
  240. package/dist/reporting/students/ports.d.ts +0 -13
  241. package/dist/reporting/students/ports.js +0 -1
  242. package/dist/reporting/students/service.d.ts +0 -19
  243. package/dist/reporting/students/service.js +0 -20
  244. package/dist/reporting/students/service.js.map +0 -1
  245. /package/dist/reporting/{dashboard → admin}/model.js +0 -0
  246. /package/dist/reporting/{dashboard → admin}/ports.js +0 -0
  247. /package/dist/reporting/{learn → member}/model.js +0 -0
  248. /package/dist/reporting/{learn → member}/ports.js +0 -0
  249. /package/dist/{reporting/students/model.js → shared/actor.js} +0 -0
@@ -1,24 +1,53 @@
1
1
  import { idSchema, jsonValueSchema } from "./shared.js";
2
- import { commentSettingsSchema } from "./discussion.js";
2
+ import { activityCommentsRuleSchema, commentSettingsSchema } from "./discussion.js";
3
+ import { assetUrlsSchema } from "./assets.js";
3
4
  import { z } from "zod";
4
5
  //#region src/types/schemas/content.ts
5
- const contentTypeSchema = z.enum(["course", "download"]);
6
+ const contentTypeSchema = z.enum([
7
+ "course",
8
+ "download",
9
+ "community"
10
+ ]);
6
11
  const courseStatusSchema = z.enum(["draft", "published"]);
7
12
  const courseSettingsSchema = z.object({
8
13
  transcriptDownloads: z.boolean(),
9
14
  comments: commentSettingsSchema.optional()
10
15
  }).strict();
11
- const activityCommentsRuleSchema = z.enum([
12
- "inherit",
13
- "always",
14
- "never"
15
- ]);
16
+ /** Defaults for keys a stored settings row doesn't carry (or no row at all). */
17
+ const courseSettingsDefaults = { transcriptDownloads: false };
16
18
  const activitySettingsSchema = z.object({ comments: activityCommentsRuleSchema.optional() }).strict();
19
+ const bundleSchema = z.object({
20
+ orgId: idSchema,
21
+ id: idSchema,
22
+ name: z.string(),
23
+ createdAt: z.coerce.date(),
24
+ updatedAt: z.coerce.date()
25
+ }).strict();
26
+ const bundleItemSchema = z.object({
27
+ orgId: idSchema,
28
+ bundleId: idSchema,
29
+ contentId: idSchema,
30
+ createdAt: z.coerce.date(),
31
+ updatedAt: z.coerce.date()
32
+ }).strict();
33
+ const listBundlesQuerySchema = z.object({
34
+ page: z.number().int().min(1),
35
+ pageSize: z.number().int().min(1),
36
+ search: z.string().optional(),
37
+ sort: z.string().optional()
38
+ }).strict();
39
+ const createBundleInputSchema = z.object({
40
+ name: z.string(),
41
+ /** Content to put in the bundle at creation — bundle and items land together. */
42
+ contentIds: z.array(idSchema).optional()
43
+ }).strict();
44
+ const updateBundleInputSchema = z.object({ name: z.string().optional() }).strict();
17
45
  const contentItemSchema = z.object({
18
46
  orgId: idSchema,
19
47
  id: idSchema,
20
48
  type: contentTypeSchema,
21
- createdAt: z.coerce.date()
49
+ createdAt: z.coerce.date(),
50
+ updatedAt: z.coerce.date()
22
51
  }).strict();
23
52
  const courseSchema = z.object({
24
53
  orgId: idSchema,
@@ -30,10 +59,11 @@ const courseSchema = z.object({
30
59
  status: courseStatusSchema,
31
60
  category: z.string(),
32
61
  thumbnailAssetId: idSchema.nullable(),
33
- settings: jsonValueSchema,
62
+ settings: courseSettingsSchema,
34
63
  createdAt: z.coerce.date(),
35
64
  updatedAt: z.coerce.date()
36
65
  }).strict();
66
+ const courseViewSchema = courseSchema.extend({ thumbnailUrl: z.string().nullable() }).strict();
37
67
  const activitySchema = z.object({
38
68
  orgId: idSchema,
39
69
  id: idSchema,
@@ -44,6 +74,7 @@ const activitySchema = z.object({
44
74
  createdAt: z.coerce.date(),
45
75
  updatedAt: z.coerce.date()
46
76
  }).strict();
77
+ const activityViewSchema = activitySchema.extend({ assetUrls: assetUrlsSchema }).strict();
47
78
  const moduleSchema = z.object({
48
79
  orgId: idSchema,
49
80
  id: idSchema,
@@ -58,7 +89,9 @@ const activityAssetSchema = z.object({
58
89
  id: idSchema,
59
90
  activityId: idSchema,
60
91
  assetId: idSchema,
61
- seq: z.number().int()
92
+ seq: z.number().int(),
93
+ createdAt: z.coerce.date(),
94
+ updatedAt: z.coerce.date()
62
95
  }).strict();
63
96
  const saveActivityInputSchema = z.object({
64
97
  settings: jsonValueSchema.optional(),
@@ -82,8 +115,7 @@ const updateCourseInputSchema = z.object({
82
115
  description: z.string().optional(),
83
116
  category: z.string().optional(),
84
117
  status: courseStatusSchema.optional(),
85
- thumbnailAssetId: idSchema.nullable().optional(),
86
- settings: courseSettingsSchema.partial().optional()
118
+ thumbnailAssetId: idSchema.nullable().optional()
87
119
  }).strict();
88
120
  const downloadStatusSchema = z.enum(["draft", "published"]);
89
121
  const downloadSchema = z.object({
@@ -99,13 +131,22 @@ const downloadSchema = z.object({
99
131
  createdAt: z.coerce.date(),
100
132
  updatedAt: z.coerce.date()
101
133
  }).strict();
134
+ const downloadViewSchema = downloadSchema.extend({ thumbnailUrl: z.string().nullable() }).strict();
102
135
  const downloadAssetSchema = z.object({
103
136
  orgId: idSchema,
104
137
  id: idSchema,
105
138
  downloadId: idSchema,
106
139
  assetId: idSchema,
107
140
  seq: z.number().int(),
108
- displayName: z.string().nullable()
141
+ displayName: z.string().nullable(),
142
+ createdAt: z.coerce.date(),
143
+ updatedAt: z.coerce.date()
144
+ }).strict();
145
+ const downloadFileSchema = downloadAssetSchema.extend({
146
+ filename: z.string(),
147
+ contentType: z.string(),
148
+ size: z.number().int().min(0),
149
+ url: z.string()
109
150
  }).strict();
110
151
  const listDownloadsQuerySchema = z.object({
111
152
  page: z.number().int().min(1),
@@ -131,8 +172,130 @@ const addDownloadAssetInputSchema = z.object({
131
172
  assetId: idSchema,
132
173
  displayName: z.string().optional()
133
174
  }).strict();
134
- const reorderDownloadAssetsInputSchema = z.object({ assetIds: z.array(idSchema) }).strict();
175
+ const reorderDownloadAssetsInputSchema = z.object({ assetIds: z.array(idSchema).max(500) }).strict();
176
+ const communityStatusSchema = z.enum(["draft", "published"]);
177
+ const dmSettingsSchema = z.object({
178
+ enabled: z.boolean(),
179
+ memberToMember: z.boolean(),
180
+ memberToStaff: z.boolean(),
181
+ staffToAnyone: z.boolean(),
182
+ firstMessageIsRequest: z.boolean(),
183
+ groupChats: z.boolean(),
184
+ groupSize: z.number().int().min(1)
185
+ }).strict();
186
+ const dmSettingsDefaults = {
187
+ enabled: true,
188
+ memberToMember: true,
189
+ memberToStaff: true,
190
+ staffToAnyone: true,
191
+ firstMessageIsRequest: true,
192
+ groupChats: true,
193
+ groupSize: 8
194
+ };
195
+ const communitySettingsSchema = z.object({ dm: dmSettingsSchema }).strict();
196
+ const communitySettingsDefaults = { dm: dmSettingsDefaults };
197
+ const communitySchema = z.object({
198
+ orgId: idSchema,
199
+ id: idSchema,
200
+ type: z.literal("community"),
201
+ title: z.string(),
202
+ slug: z.string(),
203
+ description: z.string(),
204
+ status: communityStatusSchema,
205
+ thumbnailAssetId: idSchema.nullable(),
206
+ settings: communitySettingsSchema,
207
+ createdAt: z.coerce.date(),
208
+ updatedAt: z.coerce.date()
209
+ }).strict();
210
+ const communityViewSchema = communitySchema.extend({ thumbnailUrl: z.string().nullable() }).strict();
211
+ const spaceAccessRuleSchema = z.enum([
212
+ "all_members",
213
+ "by_request",
214
+ "by_invite"
215
+ ]);
216
+ const spaceSettingsSchema = z.object({
217
+ comments: z.boolean(),
218
+ reactions: z.boolean(),
219
+ requireReview: z.boolean()
220
+ }).strict();
221
+ const spaceSettingsDefaults = {
222
+ comments: true,
223
+ reactions: true,
224
+ requireReview: false
225
+ };
226
+ const spaceSchema = z.object({
227
+ orgId: idSchema,
228
+ id: idSchema,
229
+ communityId: idSchema,
230
+ name: z.string(),
231
+ description: z.string(),
232
+ seq: z.number().int(),
233
+ accessRule: spaceAccessRuleSchema,
234
+ capacity: z.number().int().nullable(),
235
+ settings: spaceSettingsSchema,
236
+ createdAt: z.coerce.date(),
237
+ updatedAt: z.coerce.date()
238
+ }).strict();
239
+ const spaceTopicSchema = z.object({
240
+ orgId: idSchema,
241
+ id: idSchema,
242
+ spaceId: idSchema,
243
+ name: z.string(),
244
+ seq: z.number().int(),
245
+ createdAt: z.coerce.date(),
246
+ updatedAt: z.coerce.date()
247
+ }).strict();
248
+ const spaceLinkSchema = z.object({
249
+ orgId: idSchema,
250
+ id: idSchema,
251
+ spaceId: idSchema,
252
+ contentId: idSchema,
253
+ seq: z.number().int(),
254
+ createdAt: z.coerce.date(),
255
+ updatedAt: z.coerce.date()
256
+ }).strict();
257
+ const spaceDetailSchema = spaceSchema.extend({
258
+ topics: z.array(spaceTopicSchema),
259
+ links: z.array(spaceLinkSchema)
260
+ });
261
+ const listCommunitiesQuerySchema = z.object({
262
+ page: z.number().int().min(1),
263
+ pageSize: z.number().int().min(1),
264
+ search: z.string().optional(),
265
+ sort: z.string().optional(),
266
+ status: communityStatusSchema.optional()
267
+ }).strict();
268
+ const createCommunityInputSchema = z.object({
269
+ title: z.string().trim().min(1).max(200),
270
+ description: z.string().trim().max(5e3).optional()
271
+ }).strict();
272
+ const updateCommunityInputSchema = z.object({
273
+ title: z.string().trim().min(1).max(200).optional(),
274
+ description: z.string().trim().max(5e3).optional(),
275
+ status: communityStatusSchema.optional(),
276
+ thumbnailAssetId: idSchema.nullable().optional()
277
+ }).strict();
278
+ const patchDmSettingsInputSchema = dmSettingsSchema.extend({ groupSize: z.number().int().min(3).max(100).describe("The most people a group chat may hold, its creator included") }).partial();
279
+ const createSpaceInputSchema = z.object({
280
+ name: z.string().trim().min(1).max(120),
281
+ description: z.string().trim().max(2e3).optional(),
282
+ accessRule: spaceAccessRuleSchema.optional(),
283
+ capacity: z.number().int().min(0).nullable().optional(),
284
+ settings: spaceSettingsSchema.partial().optional()
285
+ }).strict();
286
+ const updateSpaceInputSchema = z.object({
287
+ name: z.string().trim().min(1).max(120).optional(),
288
+ description: z.string().trim().max(2e3).optional(),
289
+ accessRule: spaceAccessRuleSchema.optional(),
290
+ capacity: z.number().int().min(0).nullable().optional(),
291
+ settings: spaceSettingsSchema.partial().optional()
292
+ }).strict();
293
+ const setSpaceTopicsInputSchema = z.object({ topics: z.array(z.object({
294
+ id: idSchema.optional().describe("Keep an existing topic; omit to add a new one"),
295
+ name: z.string().trim().min(1).max(60)
296
+ }).strict()).max(50).describe("The complete list, in order. A topic left out is deleted") }).strict();
297
+ const addSpaceLinkInputSchema = z.object({ contentId: idSchema }).strict();
135
298
  //#endregion
136
- export { activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsSchema, courseStatusSchema, createCourseInputSchema, createDownloadInputSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, updateCourseInputSchema, updateDownloadInputSchema };
299
+ export { activityAssetSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addSpaceLinkInputSchema, bundleItemSchema, bundleSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createSpaceInputSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema };
137
300
 
138
301
  //# sourceMappingURL=content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","names":[],"sources":["../../../src/types/schemas/content.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { commentSettingsSchema } from \"./discussion.js\";\nimport { idSchema, jsonValueSchema } from \"./shared.js\";\n\nexport const contentTypeSchema = z.enum([\"course\", \"download\"]);\nexport type ContentType = z.infer<typeof contentTypeSchema>;\n\nexport const courseStatusSchema = z.enum([\"draft\", \"published\"]);\nexport type CourseStatus = z.infer<typeof courseStatusSchema>;\n\nexport const courseSettingsSchema = z.object({\n transcriptDownloads: z.boolean(),\n comments: commentSettingsSchema.optional(),\n}).strict();\nexport type CourseSettings = z.infer<typeof courseSettingsSchema>;\n\nexport const activityCommentsRuleSchema = z.enum([\"inherit\", \"always\", \"never\"]);\nexport type ActivityCommentsRule = z.infer<typeof activityCommentsRuleSchema>;\n\nexport const activitySettingsSchema = z.object({\n comments: activityCommentsRuleSchema.optional(),\n}).strict();\nexport type ActivitySettings = z.infer<typeof activitySettingsSchema>;\n\nexport const contentItemSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n type: contentTypeSchema,\n createdAt: z.coerce.date(),\n}).strict();\nexport type ContentItem = z.output<typeof contentItemSchema>;\nexport type ContentItemInput = z.input<typeof contentItemSchema>;\n\nexport const courseSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal(\"course\"),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: courseStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n settings: jsonValueSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Course = z.output<typeof courseSchema>;\nexport type CourseInput = z.input<typeof courseSchema>;\n\nexport const activitySchema = z.object({\n orgId: idSchema,\n id: idSchema,\n moduleId: idSchema,\n courseId: idSchema,\n seq: z.number().int().min(0),\n settings: jsonValueSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Activity = z.output<typeof activitySchema>;\nexport type ActivityInput = z.input<typeof activitySchema>;\n\nexport const moduleSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n courseId: idSchema,\n title: z.string(),\n seq: z.number().int().min(0),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Module = z.output<typeof moduleSchema>;\nexport type ModuleInput = z.input<typeof moduleSchema>;\n\nexport const activityAssetSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n activityId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n}).strict();\nexport type ActivityAsset = z.output<typeof activityAssetSchema>;\nexport type ActivityAssetInput = z.input<typeof activityAssetSchema>;\n\nexport const saveActivityInputSchema = z.object({\n settings: jsonValueSchema.optional(),\n assetIds: z.array(idSchema).optional(),\n}).strict();\nexport type SaveActivityInput = z.infer<typeof saveActivityInputSchema>;\n\nexport const listCoursesQuerySchema = z.object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: courseStatusSchema.optional(),\n category: z.string().optional(),\n}).strict();\nexport type ListCoursesQuery = z.infer<typeof listCoursesQuerySchema>;\n\nexport const createCourseInputSchema = z.object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n}).strict();\nexport type CreateCourseInput = z.infer<typeof createCourseInputSchema>;\n\nexport const updateCourseInputSchema = z.object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: courseStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n settings: courseSettingsSchema.partial().optional(),\n}).strict();\nexport type UpdateCourseInput = z.infer<typeof updateCourseInputSchema>;\n\nexport const downloadStatusSchema = z.enum([\"draft\", \"published\"]);\nexport type DownloadStatus = z.infer<typeof downloadStatusSchema>;\n\nexport const downloadSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal(\"download\"),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: downloadStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Download = z.output<typeof downloadSchema>;\nexport type DownloadInput = z.input<typeof downloadSchema>;\n\nexport const downloadAssetSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n downloadId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n displayName: z.string().nullable(),\n}).strict();\nexport type DownloadAsset = z.output<typeof downloadAssetSchema>;\nexport type DownloadAssetInput = z.input<typeof downloadAssetSchema>;\n\nexport const listDownloadsQuerySchema = z.object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: downloadStatusSchema.optional(),\n category: z.string().optional(),\n}).strict();\nexport type ListDownloadsQuery = z.infer<typeof listDownloadsQuerySchema>;\n\nexport const createDownloadInputSchema = z.object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n}).strict();\nexport type CreateDownloadInput = z.infer<typeof createDownloadInputSchema>;\n\nexport const updateDownloadInputSchema = z.object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: downloadStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n}).strict();\nexport type UpdateDownloadInput = z.infer<typeof updateDownloadInputSchema>;\n\nexport const addDownloadAssetInputSchema = z.object({\n assetId: idSchema,\n displayName: z.string().optional(),\n}).strict();\nexport type AddDownloadAssetInput = z.infer<typeof addDownloadAssetInputSchema>;\n\nexport const reorderDownloadAssetsInputSchema = z.object({\n assetIds: z.array(idSchema),\n}).strict();\nexport type ReorderDownloadAssetsInput = z.infer<typeof reorderDownloadAssetsInputSchema>;\n"],"mappings":";;;;AAIA,MAAa,oBAAoB,EAAE,KAAK,CAAC,UAAU,UAAU,CAAC;AAG9D,MAAa,qBAAqB,EAAE,KAAK,CAAC,SAAS,WAAW,CAAC;AAG/D,MAAa,uBAAuB,EAAE,OAAO;CAC3C,qBAAqB,EAAE,QAAQ;CAC/B,UAAU,sBAAsB,SAAS;AAC3C,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,6BAA6B,EAAE,KAAK;CAAC;CAAW;CAAU;AAAO,CAAC;AAG/E,MAAa,yBAAyB,EAAE,OAAO,EAC7C,UAAU,2BAA2B,SAAS,EAChD,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,oBAAoB,EAAE,OAAO;CACxC,OAAO;CACP,IAAI;CACJ,MAAM;CACN,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO;AAIV,MAAa,eAAe,EAAE,OAAO;CACnC,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,QAAQ,QAAQ;CACxB,OAAO,EAAE,OAAO;CAChB,MAAM,EAAE,OAAO;CACf,aAAa,EAAE,OAAO;CACtB,QAAQ;CACR,UAAU,EAAE,OAAO;CACnB,kBAAkB,SAAS,SAAS;CACpC,UAAU;CACV,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;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OAAO,CAAC,CAAC,SAAS;CAC1B,QAAQ,qBAAqB,SAAS;CACtC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,4BAA4B,EAAE,OAAO;CAChD,OAAO,EAAE,OAAO;CAChB,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,4BAA4B,EAAE,OAAO;CAChD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,QAAQ,qBAAqB,SAAS;CACtC,kBAAkB,SAAS,SAAS,CAAC,CAAC,SAAS;AACjD,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,8BAA8B,EAAE,OAAO;CAClD,SAAS;CACT,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;AACnC,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,mCAAmC,EAAE,OAAO,EACvD,UAAU,EAAE,MAAM,QAAQ,EAC5B,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"content.js","names":[],"sources":["../../../src/types/schemas/content.ts"],"sourcesContent":["import { z } from 'zod';\nimport { assetUrlsSchema } from './assets.js';\nimport { activityCommentsRuleSchema, commentSettingsSchema } from './discussion.js';\nimport { idSchema, jsonValueSchema } from './shared.js';\n\nexport const contentTypeSchema = z.enum(['course', 'download', 'community']);\nexport type ContentType = z.infer<typeof contentTypeSchema>;\n\nexport const courseStatusSchema = z.enum(['draft', 'published']);\nexport type CourseStatus = z.infer<typeof courseStatusSchema>;\n\nexport const courseSettingsSchema = z\n .object({\n transcriptDownloads: z.boolean(),\n comments: commentSettingsSchema.optional(),\n })\n .strict();\nexport type CourseSettings = z.infer<typeof courseSettingsSchema>;\n\n/** Defaults for keys a stored settings row doesn't carry (or no row at all). */\nexport const courseSettingsDefaults: CourseSettings = { transcriptDownloads: false };\n\nexport const activitySettingsSchema = z\n .object({\n comments: activityCommentsRuleSchema.optional(),\n })\n .strict();\nexport type ActivitySettings = z.infer<typeof activitySettingsSchema>;\n\nexport const bundleSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n name: z.string(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Bundle = z.output<typeof bundleSchema>;\nexport type BundleInput = z.input<typeof bundleSchema>;\n\nexport const bundleItemSchema = z\n .object({\n orgId: idSchema,\n bundleId: idSchema,\n contentId: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type BundleItem = z.output<typeof bundleItemSchema>;\nexport type BundleItemInput = z.input<typeof bundleItemSchema>;\n\nexport const listBundlesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n })\n .strict();\nexport type ListBundlesQuery = z.infer<typeof listBundlesQuerySchema>;\n\nexport const createBundleInputSchema = z\n .object({\n name: z.string(),\n /** Content to put in the bundle at creation — bundle and items land together. */\n contentIds: z.array(idSchema).optional(),\n })\n .strict();\nexport type CreateBundleInput = z.infer<typeof createBundleInputSchema>;\n\nexport const updateBundleInputSchema = z\n .object({\n name: z.string().optional(),\n })\n .strict();\nexport type UpdateBundleInput = z.infer<typeof updateBundleInputSchema>;\n\nexport const contentItemSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: contentTypeSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ContentItem = z.output<typeof contentItemSchema>;\nexport type ContentItemInput = z.input<typeof contentItemSchema>;\n\nexport const courseSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('course'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: courseStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n settings: courseSettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Course = z.output<typeof courseSchema>;\n\nexport const courseViewSchema = courseSchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type CourseView = z.output<typeof courseViewSchema>;\n\nexport const activitySchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n moduleId: idSchema,\n courseId: idSchema,\n seq: z.number().int().min(0),\n settings: jsonValueSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Activity = z.output<typeof activitySchema>;\nexport type ActivityInput = z.input<typeof activitySchema>;\n\nexport const activityViewSchema = activitySchema.extend({ assetUrls: assetUrlsSchema }).strict();\nexport type ActivityView = z.output<typeof activityViewSchema>;\n\nexport const moduleSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n courseId: idSchema,\n title: z.string(),\n seq: z.number().int().min(0),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Module = z.output<typeof moduleSchema>;\nexport type ModuleInput = z.input<typeof moduleSchema>;\n\nexport const activityAssetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n activityId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ActivityAsset = z.output<typeof activityAssetSchema>;\nexport type ActivityAssetInput = z.input<typeof activityAssetSchema>;\n\nexport const saveActivityInputSchema = z\n .object({\n settings: jsonValueSchema.optional(),\n assetIds: z.array(idSchema).optional(),\n })\n .strict();\nexport type SaveActivityInput = z.infer<typeof saveActivityInputSchema>;\n\nexport const listCoursesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: courseStatusSchema.optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type ListCoursesQuery = z.infer<typeof listCoursesQuerySchema>;\n\nexport const createCourseInputSchema = z\n .object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type CreateCourseInput = z.infer<typeof createCourseInputSchema>;\n\nexport const updateCourseInputSchema = z\n .object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: courseStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateCourseInput = z.infer<typeof updateCourseInputSchema>;\n\nexport const downloadStatusSchema = z.enum(['draft', 'published']);\nexport type DownloadStatus = z.infer<typeof downloadStatusSchema>;\n\nexport const downloadSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('download'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: downloadStatusSchema,\n category: z.string(),\n thumbnailAssetId: idSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Download = z.output<typeof downloadSchema>;\nexport type DownloadInput = z.input<typeof downloadSchema>;\n\nexport const downloadViewSchema = downloadSchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type DownloadView = z.output<typeof downloadViewSchema>;\n\nexport const downloadAssetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n downloadId: idSchema,\n assetId: idSchema,\n seq: z.number().int(),\n displayName: z.string().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type DownloadAsset = z.output<typeof downloadAssetSchema>;\nexport type DownloadAssetInput = z.input<typeof downloadAssetSchema>;\n\nexport const downloadFileSchema = downloadAssetSchema\n .extend({\n filename: z.string(),\n contentType: z.string(),\n size: z.number().int().min(0),\n url: z.string(),\n })\n .strict();\nexport type DownloadFile = z.output<typeof downloadFileSchema>;\n\nexport const listDownloadsQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: downloadStatusSchema.optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type ListDownloadsQuery = z.infer<typeof listDownloadsQuerySchema>;\n\nexport const createDownloadInputSchema = z\n .object({\n title: z.string(),\n description: z.string().optional(),\n category: z.string().optional(),\n })\n .strict();\nexport type CreateDownloadInput = z.infer<typeof createDownloadInputSchema>;\n\nexport const updateDownloadInputSchema = z\n .object({\n title: z.string().optional(),\n description: z.string().optional(),\n category: z.string().optional(),\n status: downloadStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateDownloadInput = z.infer<typeof updateDownloadInputSchema>;\n\nexport const addDownloadAssetInputSchema = z\n .object({\n assetId: idSchema,\n displayName: z.string().optional(),\n })\n .strict();\nexport type AddDownloadAssetInput = z.infer<typeof addDownloadAssetInputSchema>;\n\nexport const reorderDownloadAssetsInputSchema = z\n .object({\n assetIds: z.array(idSchema).max(500),\n })\n .strict();\nexport type ReorderDownloadAssetsInput = z.infer<typeof reorderDownloadAssetsInputSchema>;\n\nexport const communityStatusSchema = z.enum(['draft', 'published']);\nexport type CommunityStatus = z.infer<typeof communityStatusSchema>;\n\nexport const dmSettingsSchema = z\n .object({\n enabled: z.boolean(),\n memberToMember: z.boolean(),\n memberToStaff: z.boolean(),\n staffToAnyone: z.boolean(),\n firstMessageIsRequest: z.boolean(),\n groupChats: z.boolean(),\n groupSize: z.number().int().min(1),\n })\n .strict();\nexport type DmSettings = z.infer<typeof dmSettingsSchema>;\n\nexport const dmSettingsDefaults: DmSettings = {\n enabled: true,\n memberToMember: true,\n memberToStaff: true,\n staffToAnyone: true,\n firstMessageIsRequest: true,\n groupChats: true,\n groupSize: 8,\n};\n\nexport const communitySettingsSchema = z\n .object({\n dm: dmSettingsSchema,\n })\n .strict();\nexport type CommunitySettings = z.infer<typeof communitySettingsSchema>;\n\nexport const communitySettingsDefaults: CommunitySettings = { dm: dmSettingsDefaults };\n\nexport const communitySchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.literal('community'),\n title: z.string(),\n slug: z.string(),\n description: z.string(),\n status: communityStatusSchema,\n thumbnailAssetId: idSchema.nullable(),\n settings: communitySettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Community = z.output<typeof communitySchema>;\n\nexport const communityViewSchema = communitySchema\n .extend({ thumbnailUrl: z.string().nullable() })\n .strict();\nexport type CommunityView = z.output<typeof communityViewSchema>;\n\nexport const spaceAccessRuleSchema = z.enum(['all_members', 'by_request', 'by_invite']);\nexport type SpaceAccessRule = z.infer<typeof spaceAccessRuleSchema>;\n\nexport const spaceSettingsSchema = z\n .object({\n comments: z.boolean(),\n reactions: z.boolean(),\n requireReview: z.boolean(),\n })\n .strict();\nexport type SpaceSettings = z.infer<typeof spaceSettingsSchema>;\n\nexport const spaceSettingsDefaults: SpaceSettings = {\n comments: true,\n reactions: true,\n requireReview: false,\n};\n\nexport const spaceSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n communityId: idSchema,\n name: z.string(),\n description: z.string(),\n seq: z.number().int(),\n accessRule: spaceAccessRuleSchema,\n capacity: z.number().int().nullable(),\n settings: spaceSettingsSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Space = z.output<typeof spaceSchema>;\n\nexport const spaceTopicSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n spaceId: idSchema,\n name: z.string(),\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type SpaceTopic = z.output<typeof spaceTopicSchema>;\n\nexport const spaceLinkSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n spaceId: idSchema,\n contentId: idSchema,\n seq: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type SpaceLink = z.output<typeof spaceLinkSchema>;\n\nexport const spaceDetailSchema = spaceSchema.extend({\n topics: z.array(spaceTopicSchema),\n links: z.array(spaceLinkSchema),\n});\nexport type SpaceDetail = z.output<typeof spaceDetailSchema>;\n\nexport const listCommunitiesQuerySchema = z\n .object({\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1),\n search: z.string().optional(),\n sort: z.string().optional(),\n status: communityStatusSchema.optional(),\n })\n .strict();\nexport type ListCommunitiesQuery = z.infer<typeof listCommunitiesQuerySchema>;\n\nexport const createCommunityInputSchema = z\n .object({\n title: z.string().trim().min(1).max(200),\n description: z.string().trim().max(5_000).optional(),\n })\n .strict();\nexport type CreateCommunityInput = z.infer<typeof createCommunityInputSchema>;\n\nexport const updateCommunityInputSchema = z\n .object({\n title: z.string().trim().min(1).max(200).optional(),\n description: z.string().trim().max(5_000).optional(),\n status: communityStatusSchema.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n })\n .strict();\nexport type UpdateCommunityInput = z.infer<typeof updateCommunityInputSchema>;\n\nexport const patchDmSettingsInputSchema = dmSettingsSchema\n .extend({\n groupSize: z\n .number()\n .int()\n .min(3)\n .max(100)\n .describe('The most people a group chat may hold, its creator included'),\n })\n .partial();\nexport type PatchDmSettingsInput = z.infer<typeof patchDmSettingsInputSchema>;\n\nexport const createSpaceInputSchema = z\n .object({\n name: z.string().trim().min(1).max(120),\n description: z.string().trim().max(2_000).optional(),\n accessRule: spaceAccessRuleSchema.optional(),\n capacity: z.number().int().min(0).nullable().optional(),\n settings: spaceSettingsSchema.partial().optional(),\n })\n .strict();\nexport type CreateSpaceInput = z.infer<typeof createSpaceInputSchema>;\n\nexport const updateSpaceInputSchema = z\n .object({\n name: z.string().trim().min(1).max(120).optional(),\n description: z.string().trim().max(2_000).optional(),\n accessRule: spaceAccessRuleSchema.optional(),\n capacity: z.number().int().min(0).nullable().optional(),\n settings: spaceSettingsSchema.partial().optional(),\n })\n .strict();\nexport type UpdateSpaceInput = z.infer<typeof updateSpaceInputSchema>;\n\nexport const setSpaceTopicsInputSchema = z\n .object({\n topics: z\n .array(\n z\n .object({\n id: idSchema.optional().describe('Keep an existing topic; omit to add a new one'),\n name: z.string().trim().min(1).max(60),\n })\n .strict(),\n )\n .max(50)\n .describe('The complete list, in order. A topic left out is deleted'),\n })\n .strict();\nexport type SetSpaceTopicsInput = z.infer<typeof setSpaceTopicsInputSchema>;\n\nexport const addSpaceLinkInputSchema = z\n .object({\n contentId: idSchema,\n })\n .strict();\nexport type AddSpaceLinkInput = z.infer<typeof addSpaceLinkInputSchema>;\n"],"mappings":";;;;;AAKA,MAAa,oBAAoB,EAAE,KAAK;CAAC;CAAU;CAAY;AAAW,CAAC;AAG3E,MAAa,qBAAqB,EAAE,KAAK,CAAC,SAAS,WAAW,CAAC;AAG/D,MAAa,uBAAuB,EACjC,OAAO;CACN,qBAAqB,EAAE,QAAQ;CAC/B,UAAU,sBAAsB,SAAS;AAC3C,CAAC,CAAC,CACD,OAAO;;AAIV,MAAa,yBAAyC,EAAE,qBAAqB,MAAM;AAEnF,MAAa,yBAAyB,EACnC,OAAO,EACN,UAAU,2BAA2B,SAAS,EAChD,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,eAAe,EACzB,OAAO;CACN,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,mBAAmB,EAC7B,OAAO;CACN,OAAO;CACP,UAAU;CACV,WAAW;CACX,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,yBAAyB,EACnC,OAAO;CACN,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAC5B,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAChC,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC,C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AAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;AACvC,CAAC,CAAC,CACD,OAAO,CACZ,CAAC,CACA,IAAI,EAAE,CAAC,CACP,SAAS,0DAA0D,EACxE,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,0BAA0B,EACpC,OAAO,EACN,WAAW,SACb,CAAC,CAAC,CACD,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","names":[],"sources":["../../../src/types/schemas/credentials.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { idSchema } from \"./shared.js\";\n\nexport const credentialSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n ciphertext: z.string(),\n keyVersion: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Credential = z.output<typeof credentialSchema>;\nexport type CredentialInput = z.input<typeof credentialSchema>;\n"],"mappings":";;;AAGA,MAAa,mBAAmB,EAAE,OAAO;CACvC,OAAO;CACP,IAAI;CACJ,YAAY,EAAE,OAAO;CACrB,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI;CAC3B,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"credentials.js","names":[],"sources":["../../../src/types/schemas/credentials.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema } from './shared.js';\n\nexport const credentialSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n ciphertext: z.string(),\n keyVersion: z.number().int(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Credential = z.output<typeof credentialSchema>;\nexport type CredentialInput = z.input<typeof credentialSchema>;\n"],"mappings":";;;AAGA,MAAa,mBAAmB,EAC7B,OAAO;CACN,OAAO;CACP,IAAI;CACJ,YAAY,EAAE,OAAO;CACrB,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI;CAC3B,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO"}