@headless-lms/core 0.2.0 → 0.4.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 (307) hide show
  1. package/dist/assets/events.d.ts +42 -24
  2. package/dist/assets/events.js +1 -1
  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 +6 -4
  8. package/dist/assets/index.js +4 -2
  9. package/dist/assets/jobs.d.ts +15 -0
  10. package/dist/assets/jobs.js +30 -0
  11. package/dist/assets/jobs.js.map +1 -0
  12. package/dist/assets/model.d.ts +2 -2
  13. package/dist/assets/ports.d.ts +46 -15
  14. package/dist/assets/service.d.ts +38 -7
  15. package/dist/assets/service.js +287 -38
  16. package/dist/assets/service.js.map +1 -1
  17. package/dist/automations/actions.d.ts +13 -24
  18. package/dist/automations/actions.js +106 -42
  19. package/dist/automations/actions.js.map +1 -1
  20. package/dist/automations/catalog.js +226 -3
  21. package/dist/automations/catalog.js.map +1 -1
  22. package/dist/automations/community-derivations.d.ts +14 -0
  23. package/dist/automations/community-derivations.js +439 -0
  24. package/dist/automations/community-derivations.js.map +1 -0
  25. package/dist/automations/community-mail.d.ts +98 -0
  26. package/dist/automations/community-mail.js +70 -0
  27. package/dist/automations/community-mail.js.map +1 -0
  28. package/dist/automations/events.d.ts +18 -0
  29. package/dist/automations/index.d.ts +13 -4
  30. package/dist/automations/index.js +10 -2
  31. package/dist/automations/model.d.ts +10 -3
  32. package/dist/automations/model.js +15 -2
  33. package/dist/automations/model.js.map +1 -1
  34. package/dist/automations/notifications/debounce.d.ts +25 -0
  35. package/dist/automations/notifications/debounce.js +93 -0
  36. package/dist/automations/notifications/debounce.js.map +1 -0
  37. package/dist/automations/notifications/defaults.d.ts +8 -0
  38. package/dist/automations/notifications/defaults.js +316 -0
  39. package/dist/automations/notifications/defaults.js.map +1 -0
  40. package/dist/automations/notifications/delivery.d.ts +28 -0
  41. package/dist/automations/notifications/delivery.js +88 -0
  42. package/dist/automations/notifications/delivery.js.map +1 -0
  43. package/dist/automations/notifications/processor.d.ts +64 -0
  44. package/dist/automations/notifications/processor.js +270 -0
  45. package/dist/automations/notifications/processor.js.map +1 -0
  46. package/dist/automations/notifications/rules/content.d.ts +6 -0
  47. package/dist/automations/notifications/rules/content.js +39 -0
  48. package/dist/automations/notifications/rules/content.js.map +1 -0
  49. package/dist/automations/notifications/rules/discussion.d.ts +7 -0
  50. package/dist/automations/notifications/rules/discussion.js +678 -0
  51. package/dist/automations/notifications/rules/discussion.js.map +1 -0
  52. package/dist/automations/notifications/rules/entitlements.d.ts +6 -0
  53. package/dist/automations/notifications/rules/entitlements.js +249 -0
  54. package/dist/automations/notifications/rules/entitlements.js.map +1 -0
  55. package/dist/automations/notifications/rules/index.d.ts +6 -0
  56. package/dist/automations/notifications/rules/index.js +15 -0
  57. package/dist/automations/notifications/rules/index.js.map +1 -0
  58. package/dist/automations/notifications/rules/organizations.d.ts +6 -0
  59. package/dist/automations/notifications/rules/organizations.js +28 -0
  60. package/dist/automations/notifications/rules/organizations.js.map +1 -0
  61. package/dist/automations/notifications/rules/recipients.d.ts +32 -0
  62. package/dist/automations/notifications/rules/recipients.js +99 -0
  63. package/dist/automations/notifications/rules/recipients.js.map +1 -0
  64. package/dist/automations/notifications/service.d.ts +27 -0
  65. package/dist/automations/notifications/service.js +45 -0
  66. package/dist/automations/notifications/service.js.map +1 -0
  67. package/dist/automations/notifications/types.d.ts +7 -0
  68. package/dist/automations/notifications/types.js +473 -0
  69. package/dist/automations/notifications/types.js.map +1 -0
  70. package/dist/automations/ports.d.ts +121 -3
  71. package/dist/automations/schedule.d.ts +6 -0
  72. package/dist/automations/schedule.js +41 -0
  73. package/dist/automations/schedule.js.map +1 -0
  74. package/dist/automations/service.d.ts +20 -4
  75. package/dist/automations/service.js +246 -45
  76. package/dist/automations/service.js.map +1 -1
  77. package/dist/content/events.d.ts +712 -50
  78. package/dist/content/events.js +55 -1
  79. package/dist/content/events.js.map +1 -1
  80. package/dist/content/index.d.ts +6 -4
  81. package/dist/content/index.js +3 -1
  82. package/dist/content/model.d.ts +2 -2
  83. package/dist/content/notification-categories.d.ts +36 -0
  84. package/dist/content/notification-categories.js +64 -0
  85. package/dist/content/notification-categories.js.map +1 -0
  86. package/dist/content/ports.d.ts +90 -18
  87. package/dist/content/service.d.ts +57 -18
  88. package/dist/content/service.js +520 -25
  89. package/dist/content/service.js.map +1 -1
  90. package/dist/content/titles.d.ts +22 -0
  91. package/dist/content/titles.js +69 -0
  92. package/dist/content/titles.js.map +1 -0
  93. package/dist/content/types.d.ts +2 -2
  94. package/dist/discussion/authors.d.ts +10 -0
  95. package/dist/discussion/authors.js +23 -0
  96. package/dist/discussion/authors.js.map +1 -0
  97. package/dist/discussion/chats.d.ts +109 -0
  98. package/dist/discussion/chats.js +831 -0
  99. package/dist/discussion/chats.js.map +1 -0
  100. package/dist/discussion/digests.d.ts +24 -0
  101. package/dist/discussion/digests.js +104 -0
  102. package/dist/discussion/digests.js.map +1 -0
  103. package/dist/discussion/events.d.ts +785 -56
  104. package/dist/discussion/events.js +165 -5
  105. package/dist/discussion/events.js.map +1 -1
  106. package/dist/discussion/index.d.ts +12 -3
  107. package/dist/discussion/index.js +9 -1
  108. package/dist/discussion/jobs.d.ts +16 -0
  109. package/dist/discussion/jobs.js +40 -0
  110. package/dist/discussion/jobs.js.map +1 -0
  111. package/dist/discussion/mentions.d.ts +11 -0
  112. package/dist/discussion/mentions.js +35 -0
  113. package/dist/discussion/mentions.js.map +1 -0
  114. package/dist/discussion/ports.d.ts +372 -28
  115. package/dist/discussion/ports.js +6 -1
  116. package/dist/discussion/ports.js.map +1 -0
  117. package/dist/discussion/posts.d.ts +113 -0
  118. package/dist/discussion/posts.js +775 -0
  119. package/dist/discussion/posts.js.map +1 -0
  120. package/dist/discussion/service.d.ts +42 -11
  121. package/dist/discussion/service.js +364 -85
  122. package/dist/discussion/service.js.map +1 -1
  123. package/dist/discussion/subscriptions.d.ts +37 -0
  124. package/dist/discussion/subscriptions.js +99 -0
  125. package/dist/discussion/subscriptions.js.map +1 -0
  126. package/dist/discussion/titles.d.ts +26 -0
  127. package/dist/discussion/titles.js +84 -0
  128. package/dist/discussion/titles.js.map +1 -0
  129. package/dist/entitlements/events.d.ts +178 -11
  130. package/dist/entitlements/events.js +28 -1
  131. package/dist/entitlements/events.js.map +1 -1
  132. package/dist/entitlements/index.d.ts +6 -4
  133. package/dist/entitlements/index.js +3 -1
  134. package/dist/entitlements/jobs.d.ts +12 -0
  135. package/dist/entitlements/jobs.js +18 -0
  136. package/dist/entitlements/jobs.js.map +1 -0
  137. package/dist/entitlements/model.d.ts +3 -2
  138. package/dist/entitlements/ports.d.ts +128 -11
  139. package/dist/entitlements/rules.d.ts +12 -0
  140. package/dist/entitlements/rules.js +17 -0
  141. package/dist/entitlements/rules.js.map +1 -0
  142. package/dist/entitlements/service.d.ts +57 -3
  143. package/dist/entitlements/service.js +492 -2
  144. package/dist/entitlements/service.js.map +1 -1
  145. package/dist/identity/access.d.ts +6 -0
  146. package/dist/identity/access.js +7 -0
  147. package/dist/identity/access.js.map +1 -0
  148. package/dist/identity/devices.d.ts +30 -0
  149. package/dist/identity/devices.js +107 -0
  150. package/dist/identity/devices.js.map +1 -0
  151. package/dist/identity/events.d.ts +2 -2
  152. package/dist/identity/index.d.ts +7 -4
  153. package/dist/identity/index.js +4 -1
  154. package/dist/identity/model.d.ts +2 -1
  155. package/dist/identity/notification-settings.d.ts +28 -0
  156. package/dist/identity/notification-settings.js +113 -0
  157. package/dist/identity/notification-settings.js.map +1 -0
  158. package/dist/identity/ports.d.ts +97 -3
  159. package/dist/identity/service.d.ts +14 -3
  160. package/dist/identity/service.js +62 -5
  161. package/dist/identity/service.js.map +1 -1
  162. package/dist/integrations/events.d.ts +3 -3
  163. package/dist/integrations/model.js +1 -1
  164. package/dist/integrations/model.js.map +1 -1
  165. package/dist/integrations/service.js +2 -2
  166. package/dist/integrations/service.js.map +1 -1
  167. package/dist/organizations/access-scopes.d.ts +19 -0
  168. package/dist/organizations/access-scopes.js +89 -0
  169. package/dist/organizations/access-scopes.js.map +1 -0
  170. package/dist/organizations/events.d.ts +75 -33
  171. package/dist/organizations/events.js +6 -0
  172. package/dist/organizations/events.js.map +1 -1
  173. package/dist/organizations/index.d.ts +8 -6
  174. package/dist/organizations/index.js +5 -3
  175. package/dist/organizations/members.d.ts +8 -5
  176. package/dist/organizations/members.js.map +1 -1
  177. package/dist/organizations/notification-categories.d.ts +32 -0
  178. package/dist/organizations/notification-categories.js +51 -0
  179. package/dist/organizations/notification-categories.js.map +1 -0
  180. package/dist/organizations/ports.d.ts +17 -11
  181. package/dist/organizations/roles.d.ts +6 -10
  182. package/dist/organizations/roles.js +19 -7
  183. package/dist/organizations/roles.js.map +1 -1
  184. package/dist/organizations/service.d.ts +22 -11
  185. package/dist/organizations/service.js +164 -47
  186. package/dist/organizations/service.js.map +1 -1
  187. package/dist/organizations/types.d.ts +1 -10
  188. package/dist/progress/events.d.ts +14 -14
  189. package/dist/progress/index.d.ts +2 -2
  190. package/dist/progress/ports.d.ts +6 -1
  191. package/dist/progress/service.d.ts +3 -1
  192. package/dist/progress/service.js +6 -2
  193. package/dist/progress/service.js.map +1 -1
  194. package/dist/reporting/admin/index.d.ts +4 -0
  195. package/dist/reporting/admin/index.js +2 -0
  196. package/dist/reporting/admin/model.d.ts +108 -0
  197. package/dist/reporting/admin/ports.d.ts +27 -0
  198. package/dist/reporting/admin/service.d.ts +22 -0
  199. package/dist/reporting/admin/service.js +38 -0
  200. package/dist/reporting/admin/service.js.map +1 -0
  201. package/dist/reporting/member/index.d.ts +5 -0
  202. package/dist/reporting/member/index.js +2 -0
  203. package/dist/reporting/member/model.d.ts +157 -0
  204. package/dist/reporting/member/ports.d.ts +48 -0
  205. package/dist/reporting/member/service.d.ts +92 -0
  206. package/dist/reporting/member/service.js +364 -0
  207. package/dist/reporting/member/service.js.map +1 -0
  208. package/dist/shared/actor.d.ts +9 -0
  209. package/dist/shared/errors.d.ts +19 -1
  210. package/dist/shared/errors.js +27 -1
  211. package/dist/shared/errors.js.map +1 -1
  212. package/dist/shared/id.d.ts +14 -0
  213. package/dist/shared/id.js +15 -1
  214. package/dist/shared/id.js.map +1 -1
  215. package/dist/shared/mailer.d.ts +15 -2
  216. package/dist/shared/mailer.js +32 -5
  217. package/dist/shared/mailer.js.map +1 -1
  218. package/dist/shared/network.d.ts +10 -0
  219. package/dist/shared/network.js +211 -0
  220. package/dist/shared/network.js.map +1 -0
  221. package/dist/shared/notification-categories.d.ts +16 -0
  222. package/dist/shared/notification-categories.js +94 -0
  223. package/dist/shared/notification-categories.js.map +1 -0
  224. package/dist/shared/notification-settings.d.ts +14 -0
  225. package/dist/shared/notification-settings.js +61 -0
  226. package/dist/shared/notification-settings.js.map +1 -0
  227. package/dist/shared/ports.d.ts +48 -2
  228. package/dist/shared/settings.d.ts +2 -1
  229. package/dist/shared/settings.js +1 -0
  230. package/dist/shared/settings.js.map +1 -1
  231. package/dist/types/assets.d.ts +2 -2
  232. package/dist/types/automations.d.ts +15 -1
  233. package/dist/types/content.d.ts +2 -2
  234. package/dist/types/discussion.d.ts +11 -3
  235. package/dist/types/email-templates.d.ts +216 -1
  236. package/dist/types/entitlements.d.ts +2 -2
  237. package/dist/types/identity.d.ts +48 -2
  238. package/dist/types/index.d.ts +9 -8
  239. package/dist/types/notifications.d.ts +157 -0
  240. package/dist/types/ports.d.ts +6 -0
  241. package/dist/types/schemas/assets.d.ts +65 -37
  242. package/dist/types/schemas/assets.js +17 -12
  243. package/dist/types/schemas/assets.js.map +1 -1
  244. package/dist/types/schemas/automations.d.ts +9 -1
  245. package/dist/types/schemas/automations.js +13 -6
  246. package/dist/types/schemas/automations.js.map +1 -1
  247. package/dist/types/schemas/content.d.ts +396 -3
  248. package/dist/types/schemas/content.js +161 -3
  249. package/dist/types/schemas/content.js.map +1 -1
  250. package/dist/types/schemas/discussion.d.ts +443 -3
  251. package/dist/types/schemas/discussion.js +233 -4
  252. package/dist/types/schemas/discussion.js.map +1 -1
  253. package/dist/types/schemas/entitlements.d.ts +36 -2
  254. package/dist/types/schemas/entitlements.js +23 -1
  255. package/dist/types/schemas/entitlements.js.map +1 -1
  256. package/dist/types/schemas/identity.d.ts +27 -1
  257. package/dist/types/schemas/identity.js +14 -2
  258. package/dist/types/schemas/identity.js.map +1 -1
  259. package/dist/types/schemas/index.d.ts +9 -8
  260. package/dist/types/schemas/index.js +9 -8
  261. package/dist/types/schemas/notifications.d.ts +95 -0
  262. package/dist/types/schemas/notifications.js +56 -0
  263. package/dist/types/schemas/notifications.js.map +1 -0
  264. package/dist/types/schemas/organizations.d.ts +8 -0
  265. package/dist/types/schemas/organizations.js +2 -0
  266. package/dist/types/schemas/organizations.js.map +1 -1
  267. package/dist/types/schemas/progress.d.ts +3 -3
  268. package/dist/types/schemas/shared.d.ts +3 -1
  269. package/dist/types/schemas/shared.js +5 -1
  270. package/dist/types/schemas/shared.js.map +1 -1
  271. package/package.json +2 -2
  272. package/dist/reporting/courses/index.d.ts +0 -4
  273. package/dist/reporting/courses/index.js +0 -2
  274. package/dist/reporting/courses/model.d.ts +0 -24
  275. package/dist/reporting/courses/ports.d.ts +0 -13
  276. package/dist/reporting/courses/service.d.ts +0 -19
  277. package/dist/reporting/courses/service.js +0 -20
  278. package/dist/reporting/courses/service.js.map +0 -1
  279. package/dist/reporting/dashboard/index.d.ts +0 -4
  280. package/dist/reporting/dashboard/index.js +0 -2
  281. package/dist/reporting/dashboard/model.d.ts +0 -14
  282. package/dist/reporting/dashboard/ports.d.ts +0 -13
  283. package/dist/reporting/dashboard/service.d.ts +0 -19
  284. package/dist/reporting/dashboard/service.js +0 -20
  285. package/dist/reporting/dashboard/service.js.map +0 -1
  286. package/dist/reporting/learn/index.d.ts +0 -5
  287. package/dist/reporting/learn/index.js +0 -2
  288. package/dist/reporting/learn/model.d.ts +0 -23
  289. package/dist/reporting/learn/ports.d.ts +0 -43
  290. package/dist/reporting/learn/service.d.ts +0 -49
  291. package/dist/reporting/learn/service.js +0 -116
  292. package/dist/reporting/learn/service.js.map +0 -1
  293. package/dist/reporting/students/index.d.ts +0 -4
  294. package/dist/reporting/students/index.js +0 -2
  295. package/dist/reporting/students/model.d.ts +0 -51
  296. package/dist/reporting/students/model.js +0 -1
  297. package/dist/reporting/students/ports.d.ts +0 -15
  298. package/dist/reporting/students/ports.js +0 -1
  299. package/dist/reporting/students/service.d.ts +0 -20
  300. package/dist/reporting/students/service.js +0 -23
  301. package/dist/reporting/students/service.js.map +0 -1
  302. /package/dist/reporting/{courses → admin}/model.js +0 -0
  303. /package/dist/reporting/{courses → admin}/ports.js +0 -0
  304. /package/dist/reporting/{dashboard → member}/model.js +0 -0
  305. /package/dist/reporting/{dashboard → member}/ports.js +0 -0
  306. /package/dist/{reporting/learn/model.js → shared/actor.js} +0 -0
  307. /package/dist/{reporting/learn/ports.js → types/notifications.js} +0 -0
@@ -2,8 +2,9 @@ import { JsonValue } from "../shared.js";
2
2
  import { z } from "zod";
3
3
  //#region src/types/schemas/content.d.ts
4
4
  declare const contentTypeSchema: z.ZodEnum<{
5
- download: "download";
6
5
  course: "course";
6
+ download: "download";
7
+ community: "community";
7
8
  }>;
8
9
  type ContentType = z.infer<typeof contentTypeSchema>;
9
10
  declare const courseStatusSchema: z.ZodEnum<{
@@ -69,8 +70,9 @@ declare const contentItemSchema: z.ZodObject<{
69
70
  orgId: z.ZodString;
70
71
  id: z.ZodString;
71
72
  type: z.ZodEnum<{
72
- download: "download";
73
73
  course: "course";
74
+ download: "download";
75
+ community: "community";
74
76
  }>;
75
77
  createdAt: z.ZodCoercedDate<unknown>;
76
78
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -103,6 +105,33 @@ declare const courseSchema: z.ZodObject<{
103
105
  updatedAt: z.ZodCoercedDate<unknown>;
104
106
  }, z.core.$strict>;
105
107
  type Course = z.output<typeof courseSchema>;
108
+ declare const courseViewSchema: z.ZodObject<{
109
+ orgId: z.ZodString;
110
+ id: z.ZodString;
111
+ type: z.ZodLiteral<"course">;
112
+ title: z.ZodString;
113
+ slug: z.ZodString;
114
+ description: z.ZodString;
115
+ status: z.ZodEnum<{
116
+ draft: "draft";
117
+ published: "published";
118
+ }>;
119
+ category: z.ZodString;
120
+ thumbnailAssetId: z.ZodNullable<z.ZodString>;
121
+ settings: z.ZodObject<{
122
+ transcriptDownloads: z.ZodBoolean;
123
+ comments: z.ZodOptional<z.ZodObject<{
124
+ enabled: z.ZodBoolean;
125
+ threaded: z.ZodBoolean;
126
+ requireReview: z.ZodBoolean;
127
+ reactions: z.ZodBoolean;
128
+ }, z.core.$strict>>;
129
+ }, z.core.$strict>;
130
+ createdAt: z.ZodCoercedDate<unknown>;
131
+ updatedAt: z.ZodCoercedDate<unknown>;
132
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
133
+ }, z.core.$strict>;
134
+ type CourseView = z.output<typeof courseViewSchema>;
106
135
  declare const activitySchema: z.ZodObject<{
107
136
  orgId: z.ZodString;
108
137
  id: z.ZodString;
@@ -115,6 +144,18 @@ declare const activitySchema: z.ZodObject<{
115
144
  }, z.core.$strict>;
116
145
  type Activity = z.output<typeof activitySchema>;
117
146
  type ActivityInput = z.input<typeof activitySchema>;
147
+ declare const activityViewSchema: z.ZodObject<{
148
+ orgId: z.ZodString;
149
+ id: z.ZodString;
150
+ moduleId: z.ZodString;
151
+ courseId: z.ZodString;
152
+ seq: z.ZodNumber;
153
+ settings: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
154
+ createdAt: z.ZodCoercedDate<unknown>;
155
+ updatedAt: z.ZodCoercedDate<unknown>;
156
+ assetUrls: z.ZodRecord<z.ZodString, z.ZodString>;
157
+ }, z.core.$strict>;
158
+ type ActivityView = z.output<typeof activityViewSchema>;
118
159
  declare const moduleSchema: z.ZodObject<{
119
160
  orgId: z.ZodString;
120
161
  id: z.ZodString;
@@ -194,6 +235,24 @@ declare const downloadSchema: z.ZodObject<{
194
235
  }, z.core.$strict>;
195
236
  type Download = z.output<typeof downloadSchema>;
196
237
  type DownloadInput = z.input<typeof downloadSchema>;
238
+ declare const downloadViewSchema: z.ZodObject<{
239
+ orgId: z.ZodString;
240
+ id: z.ZodString;
241
+ type: z.ZodLiteral<"download">;
242
+ title: z.ZodString;
243
+ slug: z.ZodString;
244
+ description: z.ZodString;
245
+ status: z.ZodEnum<{
246
+ draft: "draft";
247
+ published: "published";
248
+ }>;
249
+ category: z.ZodString;
250
+ thumbnailAssetId: z.ZodNullable<z.ZodString>;
251
+ createdAt: z.ZodCoercedDate<unknown>;
252
+ updatedAt: z.ZodCoercedDate<unknown>;
253
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
254
+ }, z.core.$strict>;
255
+ type DownloadView = z.output<typeof downloadViewSchema>;
197
256
  declare const downloadAssetSchema: z.ZodObject<{
198
257
  orgId: z.ZodString;
199
258
  id: z.ZodString;
@@ -206,6 +265,21 @@ declare const downloadAssetSchema: z.ZodObject<{
206
265
  }, z.core.$strict>;
207
266
  type DownloadAsset = z.output<typeof downloadAssetSchema>;
208
267
  type DownloadAssetInput = z.input<typeof downloadAssetSchema>;
268
+ declare const downloadFileSchema: z.ZodObject<{
269
+ orgId: z.ZodString;
270
+ id: z.ZodString;
271
+ downloadId: z.ZodString;
272
+ assetId: z.ZodString;
273
+ seq: z.ZodNumber;
274
+ displayName: z.ZodNullable<z.ZodString>;
275
+ createdAt: z.ZodCoercedDate<unknown>;
276
+ updatedAt: z.ZodCoercedDate<unknown>;
277
+ filename: z.ZodString;
278
+ contentType: z.ZodString;
279
+ size: z.ZodNumber;
280
+ url: z.ZodString;
281
+ }, z.core.$strict>;
282
+ type DownloadFile = z.output<typeof downloadFileSchema>;
209
283
  declare const listDownloadsQuerySchema: z.ZodObject<{
210
284
  page: z.ZodNumber;
211
285
  pageSize: z.ZodNumber;
@@ -244,6 +318,325 @@ declare const reorderDownloadAssetsInputSchema: z.ZodObject<{
244
318
  assetIds: z.ZodArray<z.ZodString>;
245
319
  }, z.core.$strict>;
246
320
  type ReorderDownloadAssetsInput = z.infer<typeof reorderDownloadAssetsInputSchema>;
321
+ declare const communityStatusSchema: z.ZodEnum<{
322
+ draft: "draft";
323
+ published: "published";
324
+ }>;
325
+ type CommunityStatus = z.infer<typeof communityStatusSchema>;
326
+ declare const dmSettingsSchema: z.ZodObject<{
327
+ enabled: z.ZodBoolean;
328
+ memberToMember: z.ZodBoolean;
329
+ memberToStaff: z.ZodBoolean;
330
+ staffToAnyone: z.ZodBoolean;
331
+ firstMessageIsRequest: z.ZodBoolean;
332
+ groupChats: z.ZodBoolean;
333
+ groupSize: z.ZodNumber;
334
+ }, z.core.$strict>;
335
+ type DmSettings = z.infer<typeof dmSettingsSchema>;
336
+ declare const dmSettingsDefaults: DmSettings;
337
+ declare const digestCadenceSchema: z.ZodEnum<{
338
+ daily: "daily";
339
+ weekly: "weekly";
340
+ }>;
341
+ type DigestCadence = z.infer<typeof digestCadenceSchema>;
342
+ declare const digestScheduleSchema: z.ZodObject<{
343
+ cadence: z.ZodEnum<{
344
+ daily: "daily";
345
+ weekly: "weekly";
346
+ }>;
347
+ weekday: z.ZodNumber;
348
+ hour: z.ZodNumber;
349
+ timeZone: z.ZodString;
350
+ }, z.core.$strict>;
351
+ type DigestSchedule = z.infer<typeof digestScheduleSchema>;
352
+ declare const communitySettingsSchema: z.ZodObject<{
353
+ dm: z.ZodObject<{
354
+ enabled: z.ZodBoolean;
355
+ memberToMember: z.ZodBoolean;
356
+ memberToStaff: z.ZodBoolean;
357
+ staffToAnyone: z.ZodBoolean;
358
+ firstMessageIsRequest: z.ZodBoolean;
359
+ groupChats: z.ZodBoolean;
360
+ groupSize: z.ZodNumber;
361
+ }, z.core.$strict>;
362
+ digest: z.ZodNullable<z.ZodObject<{
363
+ cadence: z.ZodEnum<{
364
+ daily: "daily";
365
+ weekly: "weekly";
366
+ }>;
367
+ weekday: z.ZodNumber;
368
+ hour: z.ZodNumber;
369
+ timeZone: z.ZodString;
370
+ }, z.core.$strict>>;
371
+ }, z.core.$strict>;
372
+ type CommunitySettings = z.infer<typeof communitySettingsSchema>;
373
+ declare const communitySettingsDefaults: CommunitySettings;
374
+ declare const communitySchema: z.ZodObject<{
375
+ orgId: z.ZodString;
376
+ id: z.ZodString;
377
+ type: z.ZodLiteral<"community">;
378
+ title: z.ZodString;
379
+ slug: z.ZodString;
380
+ description: z.ZodString;
381
+ status: z.ZodEnum<{
382
+ draft: "draft";
383
+ published: "published";
384
+ }>;
385
+ thumbnailAssetId: z.ZodNullable<z.ZodString>;
386
+ settings: z.ZodObject<{
387
+ dm: z.ZodObject<{
388
+ enabled: z.ZodBoolean;
389
+ memberToMember: z.ZodBoolean;
390
+ memberToStaff: z.ZodBoolean;
391
+ staffToAnyone: z.ZodBoolean;
392
+ firstMessageIsRequest: z.ZodBoolean;
393
+ groupChats: z.ZodBoolean;
394
+ groupSize: z.ZodNumber;
395
+ }, z.core.$strict>;
396
+ digest: z.ZodNullable<z.ZodObject<{
397
+ cadence: z.ZodEnum<{
398
+ daily: "daily";
399
+ weekly: "weekly";
400
+ }>;
401
+ weekday: z.ZodNumber;
402
+ hour: z.ZodNumber;
403
+ timeZone: z.ZodString;
404
+ }, z.core.$strict>>;
405
+ }, z.core.$strict>;
406
+ createdAt: z.ZodCoercedDate<unknown>;
407
+ updatedAt: z.ZodCoercedDate<unknown>;
408
+ }, z.core.$strict>;
409
+ type Community = z.output<typeof communitySchema>;
410
+ declare const communityViewSchema: z.ZodObject<{
411
+ orgId: z.ZodString;
412
+ id: z.ZodString;
413
+ type: z.ZodLiteral<"community">;
414
+ title: z.ZodString;
415
+ slug: z.ZodString;
416
+ description: z.ZodString;
417
+ status: z.ZodEnum<{
418
+ draft: "draft";
419
+ published: "published";
420
+ }>;
421
+ thumbnailAssetId: z.ZodNullable<z.ZodString>;
422
+ settings: z.ZodObject<{
423
+ dm: z.ZodObject<{
424
+ enabled: z.ZodBoolean;
425
+ memberToMember: z.ZodBoolean;
426
+ memberToStaff: z.ZodBoolean;
427
+ staffToAnyone: z.ZodBoolean;
428
+ firstMessageIsRequest: z.ZodBoolean;
429
+ groupChats: z.ZodBoolean;
430
+ groupSize: z.ZodNumber;
431
+ }, z.core.$strict>;
432
+ digest: z.ZodNullable<z.ZodObject<{
433
+ cadence: z.ZodEnum<{
434
+ daily: "daily";
435
+ weekly: "weekly";
436
+ }>;
437
+ weekday: z.ZodNumber;
438
+ hour: z.ZodNumber;
439
+ timeZone: z.ZodString;
440
+ }, z.core.$strict>>;
441
+ }, z.core.$strict>;
442
+ createdAt: z.ZodCoercedDate<unknown>;
443
+ updatedAt: z.ZodCoercedDate<unknown>;
444
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
445
+ }, z.core.$strict>;
446
+ type CommunityView = z.output<typeof communityViewSchema>;
447
+ declare const spaceAccessRuleSchema: z.ZodEnum<{
448
+ all_members: "all_members";
449
+ by_request: "by_request";
450
+ by_invite: "by_invite";
451
+ }>;
452
+ type SpaceAccessRule = z.infer<typeof spaceAccessRuleSchema>;
453
+ declare const spaceSettingsSchema: z.ZodObject<{
454
+ comments: z.ZodBoolean;
455
+ reactions: z.ZodBoolean;
456
+ requireReview: z.ZodBoolean;
457
+ }, z.core.$strict>;
458
+ type SpaceSettings = z.infer<typeof spaceSettingsSchema>;
459
+ declare const spaceSettingsDefaults: SpaceSettings;
460
+ declare const spaceSchema: z.ZodObject<{
461
+ orgId: z.ZodString;
462
+ id: z.ZodString;
463
+ communityId: z.ZodString;
464
+ name: z.ZodString;
465
+ description: z.ZodString;
466
+ seq: z.ZodNumber;
467
+ accessRule: z.ZodEnum<{
468
+ all_members: "all_members";
469
+ by_request: "by_request";
470
+ by_invite: "by_invite";
471
+ }>;
472
+ capacity: z.ZodNullable<z.ZodNumber>;
473
+ settings: z.ZodObject<{
474
+ comments: z.ZodBoolean;
475
+ reactions: z.ZodBoolean;
476
+ requireReview: z.ZodBoolean;
477
+ }, z.core.$strict>;
478
+ createdAt: z.ZodCoercedDate<unknown>;
479
+ updatedAt: z.ZodCoercedDate<unknown>;
480
+ }, z.core.$strict>;
481
+ type Space = z.output<typeof spaceSchema>;
482
+ declare const spaceTopicSchema: z.ZodObject<{
483
+ orgId: z.ZodString;
484
+ id: z.ZodString;
485
+ spaceId: z.ZodString;
486
+ name: z.ZodString;
487
+ seq: z.ZodNumber;
488
+ createdAt: z.ZodCoercedDate<unknown>;
489
+ updatedAt: z.ZodCoercedDate<unknown>;
490
+ }, z.core.$strict>;
491
+ type SpaceTopic = z.output<typeof spaceTopicSchema>;
492
+ declare const spaceLinkSchema: z.ZodObject<{
493
+ orgId: z.ZodString;
494
+ id: z.ZodString;
495
+ spaceId: z.ZodString;
496
+ contentId: z.ZodString;
497
+ seq: z.ZodNumber;
498
+ createdAt: z.ZodCoercedDate<unknown>;
499
+ updatedAt: z.ZodCoercedDate<unknown>;
500
+ }, z.core.$strict>;
501
+ type SpaceLink = z.output<typeof spaceLinkSchema>;
502
+ declare const spaceDetailSchema: z.ZodObject<{
503
+ orgId: z.ZodString;
504
+ id: z.ZodString;
505
+ communityId: z.ZodString;
506
+ name: z.ZodString;
507
+ description: z.ZodString;
508
+ seq: z.ZodNumber;
509
+ accessRule: z.ZodEnum<{
510
+ all_members: "all_members";
511
+ by_request: "by_request";
512
+ by_invite: "by_invite";
513
+ }>;
514
+ capacity: z.ZodNullable<z.ZodNumber>;
515
+ settings: z.ZodObject<{
516
+ comments: z.ZodBoolean;
517
+ reactions: z.ZodBoolean;
518
+ requireReview: z.ZodBoolean;
519
+ }, z.core.$strict>;
520
+ createdAt: z.ZodCoercedDate<unknown>;
521
+ updatedAt: z.ZodCoercedDate<unknown>;
522
+ topics: z.ZodArray<z.ZodObject<{
523
+ orgId: z.ZodString;
524
+ id: z.ZodString;
525
+ spaceId: z.ZodString;
526
+ name: z.ZodString;
527
+ seq: z.ZodNumber;
528
+ createdAt: z.ZodCoercedDate<unknown>;
529
+ updatedAt: z.ZodCoercedDate<unknown>;
530
+ }, z.core.$strict>>;
531
+ links: z.ZodArray<z.ZodObject<{
532
+ orgId: z.ZodString;
533
+ id: z.ZodString;
534
+ spaceId: z.ZodString;
535
+ contentId: z.ZodString;
536
+ seq: z.ZodNumber;
537
+ createdAt: z.ZodCoercedDate<unknown>;
538
+ updatedAt: z.ZodCoercedDate<unknown>;
539
+ }, z.core.$strict>>;
540
+ }, z.core.$strict>;
541
+ type SpaceDetail = z.output<typeof spaceDetailSchema>;
542
+ declare const listCommunitiesQuerySchema: z.ZodObject<{
543
+ page: z.ZodNumber;
544
+ pageSize: z.ZodNumber;
545
+ search: z.ZodOptional<z.ZodString>;
546
+ sort: z.ZodOptional<z.ZodString>;
547
+ status: z.ZodOptional<z.ZodEnum<{
548
+ draft: "draft";
549
+ published: "published";
550
+ }>>;
551
+ }, z.core.$strict>;
552
+ type ListCommunitiesQuery = z.infer<typeof listCommunitiesQuerySchema>;
553
+ declare const createCommunityInputSchema: z.ZodObject<{
554
+ title: z.ZodString;
555
+ description: z.ZodOptional<z.ZodString>;
556
+ }, z.core.$strict>;
557
+ type CreateCommunityInput = z.infer<typeof createCommunityInputSchema>;
558
+ declare const updateCommunityInputSchema: z.ZodObject<{
559
+ title: z.ZodOptional<z.ZodString>;
560
+ description: z.ZodOptional<z.ZodString>;
561
+ status: z.ZodOptional<z.ZodEnum<{
562
+ draft: "draft";
563
+ published: "published";
564
+ }>>;
565
+ thumbnailAssetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
566
+ }, z.core.$strict>;
567
+ type UpdateCommunityInput = z.infer<typeof updateCommunityInputSchema>;
568
+ declare const patchDmSettingsInputSchema: z.ZodObject<{
569
+ enabled: z.ZodOptional<z.ZodBoolean>;
570
+ memberToMember: z.ZodOptional<z.ZodBoolean>;
571
+ memberToStaff: z.ZodOptional<z.ZodBoolean>;
572
+ staffToAnyone: z.ZodOptional<z.ZodBoolean>;
573
+ firstMessageIsRequest: z.ZodOptional<z.ZodBoolean>;
574
+ groupChats: z.ZodOptional<z.ZodBoolean>;
575
+ groupSize: z.ZodOptional<z.ZodNumber>;
576
+ }, z.core.$strict>;
577
+ type PatchDmSettingsInput = z.infer<typeof patchDmSettingsInputSchema>;
578
+ declare const patchCommunitySettingsInputSchema: z.ZodObject<{
579
+ enabled: z.ZodOptional<z.ZodBoolean>;
580
+ memberToMember: z.ZodOptional<z.ZodBoolean>;
581
+ memberToStaff: z.ZodOptional<z.ZodBoolean>;
582
+ staffToAnyone: z.ZodOptional<z.ZodBoolean>;
583
+ firstMessageIsRequest: z.ZodOptional<z.ZodBoolean>;
584
+ groupChats: z.ZodOptional<z.ZodBoolean>;
585
+ groupSize: z.ZodOptional<z.ZodNumber>;
586
+ digest: z.ZodOptional<z.ZodNullable<z.ZodObject<{
587
+ cadence: z.ZodEnum<{
588
+ daily: "daily";
589
+ weekly: "weekly";
590
+ }>;
591
+ weekday: z.ZodNumber;
592
+ hour: z.ZodNumber;
593
+ timeZone: z.ZodString;
594
+ }, z.core.$strict>>>;
595
+ }, z.core.$strict>;
596
+ type PatchCommunitySettingsInput = z.infer<typeof patchCommunitySettingsInputSchema>;
597
+ declare const createSpaceInputSchema: z.ZodObject<{
598
+ name: z.ZodString;
599
+ description: z.ZodOptional<z.ZodString>;
600
+ accessRule: z.ZodOptional<z.ZodEnum<{
601
+ all_members: "all_members";
602
+ by_request: "by_request";
603
+ by_invite: "by_invite";
604
+ }>>;
605
+ capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
606
+ settings: z.ZodOptional<z.ZodObject<{
607
+ comments: z.ZodOptional<z.ZodBoolean>;
608
+ reactions: z.ZodOptional<z.ZodBoolean>;
609
+ requireReview: z.ZodOptional<z.ZodBoolean>;
610
+ }, z.core.$strict>>;
611
+ }, z.core.$strict>;
612
+ type CreateSpaceInput = z.infer<typeof createSpaceInputSchema>;
613
+ declare const updateSpaceInputSchema: z.ZodObject<{
614
+ name: z.ZodOptional<z.ZodString>;
615
+ description: z.ZodOptional<z.ZodString>;
616
+ accessRule: z.ZodOptional<z.ZodEnum<{
617
+ all_members: "all_members";
618
+ by_request: "by_request";
619
+ by_invite: "by_invite";
620
+ }>>;
621
+ capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
622
+ settings: z.ZodOptional<z.ZodObject<{
623
+ comments: z.ZodOptional<z.ZodBoolean>;
624
+ reactions: z.ZodOptional<z.ZodBoolean>;
625
+ requireReview: z.ZodOptional<z.ZodBoolean>;
626
+ }, z.core.$strict>>;
627
+ }, z.core.$strict>;
628
+ type UpdateSpaceInput = z.infer<typeof updateSpaceInputSchema>;
629
+ declare const setSpaceTopicsInputSchema: z.ZodObject<{
630
+ topics: z.ZodArray<z.ZodObject<{
631
+ id: z.ZodOptional<z.ZodString>;
632
+ name: z.ZodString;
633
+ }, z.core.$strict>>;
634
+ }, z.core.$strict>;
635
+ type SetSpaceTopicsInput = z.infer<typeof setSpaceTopicsInputSchema>;
636
+ declare const addSpaceLinkInputSchema: z.ZodObject<{
637
+ contentId: z.ZodString;
638
+ }, z.core.$strict>;
639
+ type AddSpaceLinkInput = z.infer<typeof addSpaceLinkInputSchema>;
247
640
  //#endregion
248
- export { Activity, ActivityAsset, ActivityAssetInput, ActivityInput, ActivitySettings, AddDownloadAssetInput, Bundle, BundleInput, BundleItem, BundleItemInput, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CreateBundleInput, CreateCourseInput, CreateDownloadInput, Download, DownloadAsset, DownloadAssetInput, DownloadInput, DownloadStatus, ListBundlesQuery, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, ReorderDownloadAssetsInput, SaveActivityInput, UpdateBundleInput, UpdateCourseInput, UpdateDownloadInput, activityAssetSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, bundleItemSchema, bundleSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, createBundleInputSchema, createCourseInputSchema, createDownloadInputSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, listBundlesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, updateBundleInputSchema, updateCourseInputSchema, updateDownloadInputSchema };
641
+ export { Activity, ActivityAsset, ActivityAssetInput, ActivityInput, ActivitySettings, ActivityView, AddDownloadAssetInput, AddSpaceLinkInput, Bundle, BundleInput, BundleItem, BundleItemInput, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DigestCadence, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadAssetInput, DownloadFile, DownloadInput, DownloadStatus, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, PatchCommunitySettingsInput, PatchDmSettingsInput, ReorderDownloadAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput, 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, digestCadenceSchema, digestScheduleSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchCommunitySettingsInputSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema };
249
642
  //# sourceMappingURL=content.d.ts.map
@@ -1,8 +1,13 @@
1
1
  import { idSchema, jsonValueSchema } from "./shared.js";
2
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(),
@@ -58,6 +63,7 @@ const courseSchema = z.object({
58
63
  createdAt: z.coerce.date(),
59
64
  updatedAt: z.coerce.date()
60
65
  }).strict();
66
+ const courseViewSchema = courseSchema.extend({ thumbnailUrl: z.string().nullable() }).strict();
61
67
  const activitySchema = z.object({
62
68
  orgId: idSchema,
63
69
  id: idSchema,
@@ -68,6 +74,7 @@ const activitySchema = z.object({
68
74
  createdAt: z.coerce.date(),
69
75
  updatedAt: z.coerce.date()
70
76
  }).strict();
77
+ const activityViewSchema = activitySchema.extend({ assetUrls: assetUrlsSchema }).strict();
71
78
  const moduleSchema = z.object({
72
79
  orgId: idSchema,
73
80
  id: idSchema,
@@ -124,6 +131,7 @@ const downloadSchema = z.object({
124
131
  createdAt: z.coerce.date(),
125
132
  updatedAt: z.coerce.date()
126
133
  }).strict();
134
+ const downloadViewSchema = downloadSchema.extend({ thumbnailUrl: z.string().nullable() }).strict();
127
135
  const downloadAssetSchema = z.object({
128
136
  orgId: idSchema,
129
137
  id: idSchema,
@@ -134,6 +142,12 @@ const downloadAssetSchema = z.object({
134
142
  createdAt: z.coerce.date(),
135
143
  updatedAt: z.coerce.date()
136
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()
150
+ }).strict();
137
151
  const listDownloadsQuerySchema = z.object({
138
152
  page: z.number().int().min(1),
139
153
  pageSize: z.number().int().min(1),
@@ -158,8 +172,152 @@ const addDownloadAssetInputSchema = z.object({
158
172
  assetId: idSchema,
159
173
  displayName: z.string().optional()
160
174
  }).strict();
161
- 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
+ function isTimeZone(value) {
196
+ try {
197
+ new Intl.DateTimeFormat("en-US", { timeZone: value });
198
+ return true;
199
+ } catch {
200
+ return false;
201
+ }
202
+ }
203
+ const digestCadenceSchema = z.enum(["daily", "weekly"]);
204
+ const digestScheduleSchema = z.object({
205
+ cadence: digestCadenceSchema,
206
+ weekday: z.number().int().min(0).max(6).describe("The day a weekly digest goes out, 0 is Sunday; a daily digest ignores it"),
207
+ hour: z.number().int().min(0).max(23).describe("The hour of the day it goes out, 0–23"),
208
+ timeZone: z.string().refine(isTimeZone, { message: "must be an IANA time zone" }).describe("The IANA time zone the weekday and hour are in, such as `Europe/Madrid`")
209
+ }).strict();
210
+ const communitySettingsSchema = z.object({
211
+ dm: dmSettingsSchema,
212
+ digest: digestScheduleSchema.nullable()
213
+ }).strict();
214
+ const communitySettingsDefaults = {
215
+ dm: dmSettingsDefaults,
216
+ digest: null
217
+ };
218
+ const communitySchema = z.object({
219
+ orgId: idSchema,
220
+ id: idSchema,
221
+ type: z.literal("community"),
222
+ title: z.string(),
223
+ slug: z.string(),
224
+ description: z.string(),
225
+ status: communityStatusSchema,
226
+ thumbnailAssetId: idSchema.nullable(),
227
+ settings: communitySettingsSchema,
228
+ createdAt: z.coerce.date(),
229
+ updatedAt: z.coerce.date()
230
+ }).strict();
231
+ const communityViewSchema = communitySchema.extend({ thumbnailUrl: z.string().nullable() }).strict();
232
+ const spaceAccessRuleSchema = z.enum([
233
+ "all_members",
234
+ "by_request",
235
+ "by_invite"
236
+ ]);
237
+ const spaceSettingsSchema = z.object({
238
+ comments: z.boolean(),
239
+ reactions: z.boolean(),
240
+ requireReview: z.boolean()
241
+ }).strict();
242
+ const spaceSettingsDefaults = {
243
+ comments: true,
244
+ reactions: true,
245
+ requireReview: false
246
+ };
247
+ const spaceSchema = z.object({
248
+ orgId: idSchema,
249
+ id: idSchema,
250
+ communityId: idSchema,
251
+ name: z.string(),
252
+ description: z.string(),
253
+ seq: z.number().int(),
254
+ accessRule: spaceAccessRuleSchema,
255
+ capacity: z.number().int().nullable(),
256
+ settings: spaceSettingsSchema,
257
+ createdAt: z.coerce.date(),
258
+ updatedAt: z.coerce.date()
259
+ }).strict();
260
+ const spaceTopicSchema = z.object({
261
+ orgId: idSchema,
262
+ id: idSchema,
263
+ spaceId: idSchema,
264
+ name: z.string(),
265
+ seq: z.number().int(),
266
+ createdAt: z.coerce.date(),
267
+ updatedAt: z.coerce.date()
268
+ }).strict();
269
+ const spaceLinkSchema = z.object({
270
+ orgId: idSchema,
271
+ id: idSchema,
272
+ spaceId: idSchema,
273
+ contentId: idSchema,
274
+ seq: z.number().int(),
275
+ createdAt: z.coerce.date(),
276
+ updatedAt: z.coerce.date()
277
+ }).strict();
278
+ const spaceDetailSchema = spaceSchema.extend({
279
+ topics: z.array(spaceTopicSchema),
280
+ links: z.array(spaceLinkSchema)
281
+ });
282
+ const listCommunitiesQuerySchema = z.object({
283
+ page: z.number().int().min(1),
284
+ pageSize: z.number().int().min(1),
285
+ search: z.string().optional(),
286
+ sort: z.string().optional(),
287
+ status: communityStatusSchema.optional()
288
+ }).strict();
289
+ const createCommunityInputSchema = z.object({
290
+ title: z.string().trim().min(1).max(200),
291
+ description: z.string().trim().max(5e3).optional()
292
+ }).strict();
293
+ const updateCommunityInputSchema = z.object({
294
+ title: z.string().trim().min(1).max(200).optional(),
295
+ description: z.string().trim().max(5e3).optional(),
296
+ status: communityStatusSchema.optional(),
297
+ thumbnailAssetId: idSchema.nullable().optional()
298
+ }).strict();
299
+ 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();
300
+ const patchCommunitySettingsInputSchema = patchDmSettingsInputSchema.extend({ digest: digestScheduleSchema.nullable().optional().describe("When the community digest goes out; null stops it") });
301
+ const createSpaceInputSchema = z.object({
302
+ name: z.string().trim().min(1).max(120),
303
+ description: z.string().trim().max(2e3).optional(),
304
+ accessRule: spaceAccessRuleSchema.optional(),
305
+ capacity: z.number().int().min(0).nullable().optional(),
306
+ settings: spaceSettingsSchema.partial().optional()
307
+ }).strict();
308
+ const updateSpaceInputSchema = z.object({
309
+ name: z.string().trim().min(1).max(120).optional(),
310
+ description: z.string().trim().max(2e3).optional(),
311
+ accessRule: spaceAccessRuleSchema.optional(),
312
+ capacity: z.number().int().min(0).nullable().optional(),
313
+ settings: spaceSettingsSchema.partial().optional()
314
+ }).strict();
315
+ const setSpaceTopicsInputSchema = z.object({ topics: z.array(z.object({
316
+ id: idSchema.optional().describe("Keep an existing topic; omit to add a new one"),
317
+ name: z.string().trim().min(1).max(60)
318
+ }).strict()).max(50).describe("The complete list, in order. A topic left out is deleted") }).strict();
319
+ const addSpaceLinkInputSchema = z.object({ contentId: idSchema }).strict();
162
320
  //#endregion
163
- export { activityAssetSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, bundleItemSchema, bundleSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, createBundleInputSchema, createCourseInputSchema, createDownloadInputSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, listBundlesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, updateBundleInputSchema, updateCourseInputSchema, updateDownloadInputSchema };
321
+ 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, digestCadenceSchema, digestScheduleSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchCommunitySettingsInputSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema };
164
322
 
165
323
  //# sourceMappingURL=content.js.map