@headless-lms/core 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/assets/events.d.ts +27 -21
  2. package/dist/assets/file-urls.d.ts +11 -7
  3. package/dist/assets/file-urls.js +14 -4
  4. package/dist/assets/file-urls.js.map +1 -1
  5. package/dist/assets/index.d.ts +4 -4
  6. package/dist/assets/index.js +3 -3
  7. package/dist/assets/ports.d.ts +34 -15
  8. package/dist/assets/service.d.ts +30 -14
  9. package/dist/assets/service.js +230 -56
  10. package/dist/assets/service.js.map +1 -1
  11. package/dist/automations/actions.js.map +1 -1
  12. package/dist/automations/catalog.js +69 -4
  13. package/dist/automations/catalog.js.map +1 -1
  14. package/dist/automations/community-derivations.js +16 -16
  15. package/dist/automations/community-derivations.js.map +1 -1
  16. package/dist/automations/community-mail.d.ts +34 -4
  17. package/dist/automations/community-mail.js +32 -4
  18. package/dist/automations/community-mail.js.map +1 -1
  19. package/dist/automations/event-permissions.d.ts +12 -0
  20. package/dist/automations/event-permissions.js +38 -0
  21. package/dist/automations/event-permissions.js.map +1 -0
  22. package/dist/automations/index.d.ts +2 -1
  23. package/dist/automations/index.js +2 -1
  24. package/dist/automations/notifications/applicable.d.ts +8 -0
  25. package/dist/automations/notifications/applicable.js +12 -0
  26. package/dist/automations/notifications/applicable.js.map +1 -0
  27. package/dist/automations/notifications/debounce.js +1 -1
  28. package/dist/automations/notifications/debounce.js.map +1 -1
  29. package/dist/automations/notifications/defaults.js +33 -3
  30. package/dist/automations/notifications/defaults.js.map +1 -1
  31. package/dist/automations/notifications/processor.js +3 -3
  32. package/dist/automations/notifications/processor.js.map +1 -1
  33. package/dist/automations/notifications/rules/content.js +60 -3
  34. package/dist/automations/notifications/rules/content.js.map +1 -1
  35. package/dist/automations/notifications/rules/discussion.js +29 -29
  36. package/dist/automations/notifications/rules/discussion.js.map +1 -1
  37. package/dist/automations/notifications/rules/entitlements.js +36 -9
  38. package/dist/automations/notifications/rules/entitlements.js.map +1 -1
  39. package/dist/automations/notifications/rules/events.d.ts +9 -0
  40. package/dist/automations/notifications/rules/events.js +27 -0
  41. package/dist/automations/notifications/rules/events.js.map +1 -0
  42. package/dist/automations/notifications/rules/organizations.js +17 -10
  43. package/dist/automations/notifications/rules/organizations.js.map +1 -1
  44. package/dist/automations/notifications/rules/recipients.js +0 -1
  45. package/dist/automations/notifications/rules/recipients.js.map +1 -1
  46. package/dist/automations/notifications/service.d.ts +8 -6
  47. package/dist/automations/notifications/service.js +13 -13
  48. package/dist/automations/notifications/service.js.map +1 -1
  49. package/dist/automations/notifications/types.js +94 -7
  50. package/dist/automations/notifications/types.js.map +1 -1
  51. package/dist/automations/ports.d.ts +30 -31
  52. package/dist/automations/service.d.ts +20 -17
  53. package/dist/automations/service.js +91 -62
  54. package/dist/automations/service.js.map +1 -1
  55. package/dist/content/event-sight.d.ts +11 -0
  56. package/dist/content/event-sight.js +11 -0
  57. package/dist/content/event-sight.js.map +1 -0
  58. package/dist/content/events.d.ts +413 -72
  59. package/dist/content/events.js +34 -1
  60. package/dist/content/events.js.map +1 -1
  61. package/dist/content/index.d.ts +6 -4
  62. package/dist/content/index.js +3 -1
  63. package/dist/content/jobs.d.ts +16 -0
  64. package/dist/content/jobs.js +37 -0
  65. package/dist/content/jobs.js.map +1 -0
  66. package/dist/content/model.d.ts +2 -2
  67. package/dist/content/notification-categories.d.ts +5 -4
  68. package/dist/content/notification-categories.js +15 -6
  69. package/dist/content/notification-categories.js.map +1 -1
  70. package/dist/content/ports.d.ts +113 -68
  71. package/dist/content/service.d.ts +99 -67
  72. package/dist/content/service.js +680 -139
  73. package/dist/content/service.js.map +1 -1
  74. package/dist/content/titles.d.ts +6 -3
  75. package/dist/content/titles.js +37 -24
  76. package/dist/content/titles.js.map +1 -1
  77. package/dist/content/types.d.ts +2 -2
  78. package/dist/discussion/authors.d.ts +4 -2
  79. package/dist/discussion/authors.js +9 -5
  80. package/dist/discussion/authors.js.map +1 -1
  81. package/dist/discussion/chats.d.ts +56 -37
  82. package/dist/discussion/chats.js +393 -161
  83. package/dist/discussion/chats.js.map +1 -1
  84. package/dist/discussion/events.d.ts +77 -39
  85. package/dist/discussion/events.js +41 -3
  86. package/dist/discussion/events.js.map +1 -1
  87. package/dist/discussion/index.d.ts +8 -5
  88. package/dist/discussion/index.js +5 -3
  89. package/dist/discussion/live.d.ts +106 -0
  90. package/dist/discussion/live.js +642 -0
  91. package/dist/discussion/live.js.map +1 -0
  92. package/dist/discussion/mentions.js +2 -2
  93. package/dist/discussion/mentions.js.map +1 -1
  94. package/dist/discussion/ports.d.ts +182 -100
  95. package/dist/discussion/ports.js.map +1 -1
  96. package/dist/discussion/posts.d.ts +45 -39
  97. package/dist/discussion/posts.js +268 -154
  98. package/dist/discussion/posts.js.map +1 -1
  99. package/dist/discussion/rules.d.ts +18 -0
  100. package/dist/discussion/rules.js +22 -0
  101. package/dist/discussion/rules.js.map +1 -0
  102. package/dist/discussion/service.d.ts +37 -31
  103. package/dist/discussion/service.js +252 -188
  104. package/dist/discussion/service.js.map +1 -1
  105. package/dist/discussion/subscriptions.d.ts +8 -8
  106. package/dist/discussion/subscriptions.js +29 -13
  107. package/dist/discussion/subscriptions.js.map +1 -1
  108. package/dist/discussion/titles.d.ts +4 -2
  109. package/dist/discussion/titles.js +27 -13
  110. package/dist/discussion/titles.js.map +1 -1
  111. package/dist/entitlements/events.d.ts +20 -20
  112. package/dist/entitlements/index.d.ts +4 -4
  113. package/dist/entitlements/index.js +2 -2
  114. package/dist/entitlements/model.d.ts +2 -2
  115. package/dist/entitlements/ports.d.ts +65 -39
  116. package/dist/entitlements/rules.d.ts +3 -6
  117. package/dist/entitlements/rules.js +5 -10
  118. package/dist/entitlements/rules.js.map +1 -1
  119. package/dist/entitlements/service.d.ts +40 -28
  120. package/dist/entitlements/service.js +370 -163
  121. package/dist/entitlements/service.js.map +1 -1
  122. package/dist/identity/devices.d.ts +3 -3
  123. package/dist/identity/devices.js +7 -5
  124. package/dist/identity/devices.js.map +1 -1
  125. package/dist/identity/events.d.ts +2 -2
  126. package/dist/identity/index.d.ts +2 -2
  127. package/dist/identity/index.js +2 -2
  128. package/dist/identity/notification-settings.d.ts +1 -1
  129. package/dist/identity/notification-settings.js +3 -2
  130. package/dist/identity/notification-settings.js.map +1 -1
  131. package/dist/identity/ports.d.ts +7 -7
  132. package/dist/identity/service.d.ts +8 -7
  133. package/dist/identity/service.js +17 -13
  134. package/dist/identity/service.js.map +1 -1
  135. package/dist/integrations/events.d.ts +3 -3
  136. package/dist/integrations/ports.d.ts +9 -8
  137. package/dist/integrations/service.d.ts +9 -8
  138. package/dist/integrations/service.js +33 -16
  139. package/dist/integrations/service.js.map +1 -1
  140. package/dist/organizations/default-roles.d.ts +22 -0
  141. package/dist/organizations/default-roles.js +89 -0
  142. package/dist/organizations/default-roles.js.map +1 -0
  143. package/dist/organizations/effective-permissions.d.ts +45 -0
  144. package/dist/organizations/effective-permissions.js +113 -0
  145. package/dist/organizations/effective-permissions.js.map +1 -0
  146. package/dist/organizations/events.d.ts +320 -181
  147. package/dist/organizations/events.js +90 -18
  148. package/dist/organizations/events.js.map +1 -1
  149. package/dist/organizations/index.d.ts +14 -10
  150. package/dist/organizations/index.js +7 -3
  151. package/dist/organizations/members.d.ts +66 -8
  152. package/dist/organizations/members.js.map +1 -1
  153. package/dist/organizations/notification-catalog.d.ts +31 -0
  154. package/dist/organizations/notification-catalog.js +32 -0
  155. package/dist/organizations/notification-catalog.js.map +1 -0
  156. package/dist/organizations/notification-categories.d.ts +6 -4
  157. package/dist/organizations/notification-categories.js +25 -10
  158. package/dist/organizations/notification-categories.js.map +1 -1
  159. package/dist/organizations/org-roles.d.ts +33 -0
  160. package/dist/organizations/org-roles.js +49 -0
  161. package/dist/organizations/org-roles.js.map +1 -0
  162. package/dist/organizations/permissions.d.ts +311 -0
  163. package/dist/organizations/permissions.js +327 -0
  164. package/dist/organizations/permissions.js.map +1 -0
  165. package/dist/organizations/ports.d.ts +184 -65
  166. package/dist/organizations/service.d.ts +102 -35
  167. package/dist/organizations/service.js +1245 -328
  168. package/dist/organizations/service.js.map +1 -1
  169. package/dist/organizations/testing.d.ts +18 -0
  170. package/dist/organizations/testing.js +37 -0
  171. package/dist/organizations/testing.js.map +1 -0
  172. package/dist/organizations/types.d.ts +5 -16
  173. package/dist/progress/events.d.ts +14 -14
  174. package/dist/progress/index.d.ts +2 -2
  175. package/dist/progress/ports.d.ts +11 -3
  176. package/dist/progress/service.d.ts +6 -5
  177. package/dist/progress/service.js +23 -8
  178. package/dist/progress/service.js.map +1 -1
  179. package/dist/reporting/admin/index.d.ts +6 -4
  180. package/dist/reporting/admin/model.d.ts +36 -3
  181. package/dist/reporting/admin/ports.d.ts +39 -14
  182. package/dist/reporting/admin/service.d.ts +32 -11
  183. package/dist/reporting/admin/service.js +102 -18
  184. package/dist/reporting/admin/service.js.map +1 -1
  185. package/dist/reporting/events/index.d.ts +27 -0
  186. package/dist/reporting/events/index.js +20 -0
  187. package/dist/reporting/events/index.js.map +1 -0
  188. package/dist/reporting/member/calendar.d.ts +11 -0
  189. package/dist/reporting/member/calendar.js +75 -0
  190. package/dist/reporting/member/calendar.js.map +1 -0
  191. package/dist/reporting/member/index.d.ts +3 -2
  192. package/dist/reporting/member/model.d.ts +26 -5
  193. package/dist/reporting/member/ports.d.ts +48 -29
  194. package/dist/reporting/member/service.d.ts +56 -29
  195. package/dist/reporting/member/service.js +328 -113
  196. package/dist/reporting/member/service.js.map +1 -1
  197. package/dist/shared/actor.d.ts +22 -3
  198. package/dist/shared/errors.d.ts +2 -1
  199. package/dist/shared/errors.js +3 -1
  200. package/dist/shared/errors.js.map +1 -1
  201. package/dist/shared/id.d.ts +4 -0
  202. package/dist/shared/id.js +4 -0
  203. package/dist/shared/id.js.map +1 -1
  204. package/dist/shared/logger.d.ts +2 -1
  205. package/dist/shared/logger.js +10 -1
  206. package/dist/shared/logger.js.map +1 -1
  207. package/dist/shared/ports.d.ts +25 -5
  208. package/dist/types/content.d.ts +2 -2
  209. package/dist/types/discussion.d.ts +4 -5
  210. package/dist/types/email-templates.d.ts +22 -3
  211. package/dist/types/entitlements.d.ts +2 -2
  212. package/dist/types/identity.d.ts +13 -16
  213. package/dist/types/index.d.ts +9 -9
  214. package/dist/types/index.js +2 -1
  215. package/dist/types/notifications.d.ts +4 -4
  216. package/dist/types/organizations.d.ts +3 -2
  217. package/dist/types/ports.d.ts +8 -1
  218. package/dist/types/ports.js +7 -1
  219. package/dist/types/ports.js.map +1 -0
  220. package/dist/types/schemas/assets.d.ts +5 -5
  221. package/dist/types/schemas/assets.js +4 -3
  222. package/dist/types/schemas/assets.js.map +1 -1
  223. package/dist/types/schemas/content.d.ts +537 -13
  224. package/dist/types/schemas/content.js +201 -7
  225. package/dist/types/schemas/content.js.map +1 -1
  226. package/dist/types/schemas/discussion.d.ts +282 -59
  227. package/dist/types/schemas/discussion.js +77 -3
  228. package/dist/types/schemas/discussion.js.map +1 -1
  229. package/dist/types/schemas/entitlements.d.ts +14 -1
  230. package/dist/types/schemas/entitlements.js +11 -4
  231. package/dist/types/schemas/entitlements.js.map +1 -1
  232. package/dist/types/schemas/index.d.ts +5 -5
  233. package/dist/types/schemas/index.js +5 -5
  234. package/dist/types/schemas/notifications.d.ts +13 -12
  235. package/dist/types/schemas/notifications.js +3 -2
  236. package/dist/types/schemas/notifications.js.map +1 -1
  237. package/dist/types/schemas/organizations.d.ts +96 -60
  238. package/dist/types/schemas/organizations.js +78 -27
  239. package/dist/types/schemas/organizations.js.map +1 -1
  240. package/dist/types/schemas/progress.d.ts +3 -4
  241. package/dist/types/schemas/progress.js +0 -1
  242. package/dist/types/schemas/progress.js.map +1 -1
  243. package/package.json +1 -1
  244. package/dist/organizations/access-scopes.d.ts +0 -19
  245. package/dist/organizations/access-scopes.js +0 -89
  246. package/dist/organizations/access-scopes.js.map +0 -1
  247. package/dist/organizations/roles.d.ts +0 -19
  248. package/dist/organizations/roles.js +0 -82
  249. package/dist/organizations/roles.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { ContractNewDomainEvent, DomainEvent, EventMetadata, JsonValue, NewDomainEvent, Page } from "./shared.js";
2
2
  import { EventDefinition, EventParseResult, MakeEventInput } from "./events.js";
3
- import { EmailMessage, EmailSender, Logger, ObjectStorage, PresignDownloadInput, PresignedUpload, StoredObjectInfo } from "./ports.js";
4
- import { Activity, ActivityAsset, ActivitySettings, ActivityView, AddDownloadAssetInput, AddSpaceLinkInput, Bundle, BundleItem, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DigestCadence, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, PatchCommunitySettingsInput, PatchDmSettingsInput, ReorderDownloadAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput } from "./schemas/content.js";
5
- import { EmailContent, EmailTemplateId, EmailTemplateParams, TemplateContext, TemplateRenderer } from "./email-templates.js";
3
+ import { EmailMessage, EmailSender, Logger, ObjectStorage, PUBLIC_CACHE_CONTROL, PUBLIC_PREFIX, PresignDownloadInput, PresignedUpload, StoredObjectInfo } from "./ports.js";
4
+ import { Activity, ActivityAsset, ActivitySettings, ActivityView, AddDownloadAssetInput, AddEventAssetInput, AddSpaceLinkInput, Bundle, BundleItem, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateEventInput, CreateSpaceInput, DigestCadence, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, Event, EventAddress, EventAnalytics, EventAsset, EventAttendee, EventAttendeeFace, EventAttendeeSource, EventFile, EventLead, EventLocation, EventOnline, EventRecording, EventSettings, EventSort, EventStatus, EventType, EventVenue, EventView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, ListEventsQuery, MemberEvent, MemberEventSummary, MemberEventViewer, MemberEventsQuery, Module, PatchCommunitySettingsInput, PatchDmSettingsInput, ReorderDownloadAssetsInput, ReorderEventAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateEventInput, UpdateSpaceInput } from "./schemas/content.js";
5
+ import { EmailContent, EmailTemplateId, EmailTemplateParams, EventEmailParams, TemplateContext, TemplateRenderer } from "./email-templates.js";
6
6
  import { CreateUserInput, ProvisionUserInput, UpdateUserInput, UserProfile, UserProfileView } from "./schemas/identity.js";
7
- import { AccessGrant, AccessRequest, AccessTokenVerifier, AccountProvisioner, ActiveSession, ApiKeySummary, AppAccessAdmin, ConnectedApp, CreatedApiKey, HeaderBag, NewApiKey, SessionVerifier, User, UserId } from "./identity.js";
8
- import { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, UpdateOrgUserInput } from "./schemas/organizations.js";
9
- import { CreateOrganizationInput, InviteId, OrgUserId, OrganizationId } from "./organizations.js";
7
+ import { AccessGrant, AccessRequest, AccessTokenVerifier, AccountProvisioner, ActiveSession, ApiKeySummary, ConnectedApp, CreatedApiKey, CredentialLimit, HeaderBag, SessionVerifier, User, UserId } from "./identity.js";
8
+ import { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, Level, NewOrganizationInput, OrgRoleRow, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Permission, RoleAssignment, RoleKey, UpdateOrgUserInput } from "./schemas/organizations.js";
9
+ import { ContentId, CreateOrganizationInput, InviteId, OrgUserId, OrganizationId } from "./organizations.js";
10
10
  import "./content.js";
11
- import { Entitlement, EntitlementStatus, EntitlementsQuery, GrantEntitlementInput, SpaceMember, SpaceMemberSource, SpaceMemberStatus } from "./schemas/entitlements.js";
11
+ import { Entitlement, EntitlementStatus, EntitlementsQuery, GrantEntitlementInput, GrantSource, SpaceMember, SpaceMemberSource, SpaceMemberStatus } from "./schemas/entitlements.js";
12
12
  import "./entitlements.js";
13
13
  import { ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ReportProgressInput } from "./schemas/progress.js";
14
14
  import { ProgressId } from "./progress.js";
@@ -18,7 +18,7 @@ import { ConfigureInput, ConnectInput, Connection, Validation } from "./schemas/
18
18
  import { Action, ActionContext, Integration } from "./integrations.js";
19
19
  import { Automation, AutomationAction, AutomationActionResult, AutomationKind, AutomationRun, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableActions, AvailableTriggers, CreateAutomationInput, CreateWebhookInput, CreatedWebhook, DeliverWebhookInput, UpdateAutomationInput, UpdateWebhookInput, Webhook, WebhookSecret } from "./schemas/automations.js";
20
20
  import { AutomationDispatch, AutomationEngine, AutomationExecutor, DeliveryDispatch, ScheduledAutomation, WebhookRequest, WebhookResponse, WebhookSender } from "./automations.js";
21
- import { ActivityCommentsRule, BlockedUser, Chat, ChatKind, ChatLastMessage, ChatStatus, ChatUser, CommentFlagResolution, CommentListItem, CommentReaction, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, DigestRun, FlaggedComment, ListCommentsQuery, Mention, MentionItemType, MentionView, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Post, PostBookmark, PostFlag, PostFlagResolution, PostReaction, PostStatus, PostView, ReactionCounts, ReactionEmoji, Subscription, SubscriptionItemType, SubscriptionState, SubscriptionView } from "./schemas/discussion.js";
21
+ import { ActivityCommentsRule, BlockedUser, Chat, ChatKind, ChatLastMessage, ChatLiveEvent, ChatStatus, ChatUnreadSummary, ChatUser, CommentFlagResolution, CommentListItem, CommentReaction, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, DigestRun, FlaggedComment, FlaggedCommentView, ListCommentsQuery, LiveMessage, Mention, MentionItemType, MentionView, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Post, PostBookmark, PostFlag, PostFlagResolution, PostReaction, PostStatus, PostView, ReactionCounts, ReactionEmoji, Subscription, SubscriptionItemType, SubscriptionState, SubscriptionView } from "./schemas/discussion.js";
22
22
  import { Comment, CommentAuthor, CommentReport } from "./discussion.js";
23
23
  import { ChannelRecipient, Delivery, DeliveryResult, DeliveryStatus, DeviceView, NotificationCategory, NotificationFilter, NotificationTypeDeclaration, PushConfig, PushDevice, PushMessage, PushProvider, Reason, RecipientList, Scope, SettingsScope, StoredNotification, StoredSetting, SubjectRef } from "./notifications.js";
24
- export { type AcceptInviteInput, AccessGrant, AccessRequest, AccessTokenVerifier, AccountProvisioner, Action, ActionContext, ActiveSession, type Activity, type ActivityAsset, type ActivityCommentsRule, type ActivitySettings, type ActivityView, type AddDownloadAssetInput, type AddOrgUserInput, type AddSpaceLinkInput, ApiKeySummary, AppAccessAdmin, type Asset, type AssetKind, type AssetSource, type AssetStatus, type AssetUrls, type AssetView, type AssetsQuery, type Automation, type AutomationAction, type AutomationActionResult, AutomationDispatch, AutomationEngine, AutomationExecutor, type AutomationKind, type AutomationRun, type AutomationRunStatus, type AutomationRunsQuery, type AutomationTrigger, type AutomationsQuery, type AvailableAction, type AvailableActions, type AvailableTriggers, type BlockedUser, type Bundle, type BundleItem, ChannelRecipient, type Chat, type ChatKind, type ChatLastMessage, type ChatStatus, type ChatUser, Comment, CommentAuthor, type CommentFlagResolution, type CommentListItem, type CommentReaction, CommentReport, type CommentReportSummary, type CommentSettings, type CommentStatus, type CommentView, type CommentsConfig, type Community, type CommunitySettings, type CommunityStatus, type CommunityView, type ConfigureInput, type ConnectInput, ConnectedApp, type Connection, type ContentItem, type ContentType, ContractNewDomainEvent, type Course, type CourseSettings, type CourseStatus, type CourseView, type CreateAutomationInput, type CreateBundleInput, type CreateCommunityInput, type CreateCourseInput, type CreateDownloadInput, type CreateInviteInput, type CreateOrgUserInput, CreateOrganizationInput, type CreateSpaceInput, type CreateUserInput, type CreateWebhookInput, CreatedApiKey, type CreatedWebhook, type DeliverWebhookInput, Delivery, DeliveryDispatch, DeliveryResult, DeliveryStatus, DeviceView, type DigestCadence, type DigestRun, type DigestSchedule, type DmSettings, DomainEvent, type Download, type DownloadAsset, type DownloadFile, type DownloadStatus, type DownloadView, EmailContent, EmailMessage, EmailSender, EmailTemplateId, EmailTemplateParams, type Entitlement, type EntitlementStatus, type EntitlementsQuery, EventDefinition, EventMetadata, EventParseResult, type FlaggedComment, type GrantEntitlementInput, HeaderBag, Integration, type Invite, InviteId, type InviteInput, type InviteRole, JsonValue, type ListBundlesQuery, type ListCommentsQuery, type ListCommunitiesQuery, type ListCoursesQuery, type ListDownloadsQuery, Logger, MakeEventInput, type Mention, type MentionItemType, type MentionView, type Message, type MessageAttachment, type MessageFile, type MessageFlag, type MessageFlagResolution, type MessageReaction, type MessageView, type Module, NewApiKey, NewDomainEvent, type NewOrganizationInput, NotificationCategory, NotificationFilter, NotificationTypeDeclaration, ObjectStorage, type OrgUser, OrgUserId, type OrgUserInput, type OrgUserProfile, type OrgUserStatus, type Organization, OrganizationId, type OrganizationInput, Page, type PatchCommunitySettingsInput, type PatchDmSettingsInput, type Post, type PostBookmark, type PostFlag, type PostFlagResolution, type PostReaction, type PostStatus, type PostView, PresignDownloadInput, PresignedUpload, ProgressId, type ProgressRecord, type ProgressRecordInput, type ProgressReportItem, type ProgressTarget, type ProgressTargetType, type ProvisionUserInput, PushConfig, PushDevice, PushMessage, PushProvider, type ReactionCounts, type ReactionEmoji, Reason, RecipientList, type ReorderDownloadAssetsInput, type ReportProgressInput, type RequestUploadInput, type Role, type SaveActivityInput, ScheduledAutomation, Scope, SessionVerifier, type SetSpaceTopicsInput, SettingsScope, type Space, type SpaceAccessRule, type SpaceDetail, type SpaceLink, type SpaceMember, type SpaceMemberSource, type SpaceMemberStatus, type SpaceSettings, type SpaceTopic, StoredNotification, StoredObjectInfo, StoredSetting, SubjectRef, type Subscription, type SubscriptionItemType, type SubscriptionState, type SubscriptionView, TemplateContext, TemplateRenderer, type UpdateAutomationInput, type UpdateBundleInput, type UpdateCommunityInput, type UpdateCourseInput, type UpdateDownloadInput, type UpdateOrgUserInput, type UpdateSpaceInput, type UpdateUserInput, type UpdateWebhookInput, type UploadTicket, User, UserId, type UserProfile, type UserProfileView, type Validation, type Webhook, WebhookRequest, WebhookResponse, type WebhookSecret, WebhookSender };
24
+ export { type AcceptInviteInput, AccessGrant, AccessRequest, AccessTokenVerifier, AccountProvisioner, Action, ActionContext, ActiveSession, type Activity, type ActivityAsset, type ActivityCommentsRule, type ActivitySettings, type ActivityView, type AddDownloadAssetInput, type AddEventAssetInput, type AddOrgUserInput, type AddSpaceLinkInput, ApiKeySummary, type Asset, type AssetKind, type AssetSource, type AssetStatus, type AssetUrls, type AssetView, type AssetsQuery, type Automation, type AutomationAction, type AutomationActionResult, AutomationDispatch, AutomationEngine, AutomationExecutor, type AutomationKind, type AutomationRun, type AutomationRunStatus, type AutomationRunsQuery, type AutomationTrigger, type AutomationsQuery, type AvailableAction, type AvailableActions, type AvailableTriggers, type BlockedUser, type Bundle, type BundleItem, ChannelRecipient, type Chat, type ChatKind, type ChatLastMessage, type ChatLiveEvent, type ChatStatus, type ChatUnreadSummary, type ChatUser, Comment, CommentAuthor, type CommentFlagResolution, type CommentListItem, type CommentReaction, CommentReport, type CommentReportSummary, type CommentSettings, type CommentStatus, type CommentView, type CommentsConfig, type Community, type CommunitySettings, type CommunityStatus, type CommunityView, type ConfigureInput, type ConnectInput, ConnectedApp, type Connection, ContentId, type ContentItem, type ContentType, ContractNewDomainEvent, type Course, type CourseSettings, type CourseStatus, type CourseView, type CreateAutomationInput, type CreateBundleInput, type CreateCommunityInput, type CreateCourseInput, type CreateDownloadInput, type CreateEventInput, type CreateInviteInput, type CreateOrgUserInput, CreateOrganizationInput, type CreateSpaceInput, type CreateUserInput, type CreateWebhookInput, CreatedApiKey, type CreatedWebhook, CredentialLimit, type DeliverWebhookInput, Delivery, DeliveryDispatch, DeliveryResult, DeliveryStatus, DeviceView, type DigestCadence, type DigestRun, type DigestSchedule, type DmSettings, DomainEvent, type Download, type DownloadAsset, type DownloadFile, type DownloadStatus, type DownloadView, EmailContent, EmailMessage, EmailSender, EmailTemplateId, EmailTemplateParams, type Entitlement, type EntitlementStatus, type EntitlementsQuery, type Event, type EventAddress, type EventAnalytics, type EventAsset, type EventAttendee, type EventAttendeeFace, type EventAttendeeSource, EventDefinition, EventEmailParams, type EventFile, type EventLead, type EventLocation, EventMetadata, type EventOnline, EventParseResult, type EventRecording, type EventSettings, type EventSort, type EventStatus, type EventType, type EventVenue, type EventView, type FlaggedComment, type FlaggedCommentView, type GrantEntitlementInput, type GrantSource, HeaderBag, Integration, type Invite, InviteId, type InviteInput, JsonValue, type Level, type ListBundlesQuery, type ListCommentsQuery, type ListCommunitiesQuery, type ListCoursesQuery, type ListDownloadsQuery, type ListEventsQuery, type LiveMessage, Logger, MakeEventInput, type MemberEvent, type MemberEventSummary, type MemberEventViewer, type MemberEventsQuery, type Mention, type MentionItemType, type MentionView, type Message, type MessageAttachment, type MessageFile, type MessageFlag, type MessageFlagResolution, type MessageReaction, type MessageView, type Module, NewDomainEvent, type NewOrganizationInput, NotificationCategory, NotificationFilter, NotificationTypeDeclaration, ObjectStorage, type OrgRoleRow, type OrgUser, OrgUserId, type OrgUserInput, type OrgUserProfile, type OrgUserStatus, type Organization, OrganizationId, type OrganizationInput, PUBLIC_CACHE_CONTROL, PUBLIC_PREFIX, Page, type PatchCommunitySettingsInput, type PatchDmSettingsInput, type Permission, type Post, type PostBookmark, type PostFlag, type PostFlagResolution, type PostReaction, type PostStatus, type PostView, PresignDownloadInput, PresignedUpload, ProgressId, type ProgressRecord, type ProgressRecordInput, type ProgressReportItem, type ProgressTarget, type ProgressTargetType, type ProvisionUserInput, PushConfig, PushDevice, PushMessage, PushProvider, type ReactionCounts, type ReactionEmoji, Reason, RecipientList, type ReorderDownloadAssetsInput, type ReorderEventAssetsInput, type ReportProgressInput, type RequestUploadInput, type RoleAssignment, type RoleKey, type SaveActivityInput, ScheduledAutomation, Scope, SessionVerifier, type SetSpaceTopicsInput, SettingsScope, type Space, type SpaceAccessRule, type SpaceDetail, type SpaceLink, type SpaceMember, type SpaceMemberSource, type SpaceMemberStatus, type SpaceSettings, type SpaceTopic, StoredNotification, StoredObjectInfo, StoredSetting, SubjectRef, type Subscription, type SubscriptionItemType, type SubscriptionState, type SubscriptionView, TemplateContext, TemplateRenderer, type UpdateAutomationInput, type UpdateBundleInput, type UpdateCommunityInput, type UpdateCourseInput, type UpdateDownloadInput, type UpdateEventInput, type UpdateOrgUserInput, type UpdateSpaceInput, type UpdateUserInput, type UpdateWebhookInput, type UploadTicket, User, UserId, type UserProfile, type UserProfileView, type Validation, type Webhook, WebhookRequest, WebhookResponse, type WebhookSecret, WebhookSender };
@@ -1 +1,2 @@
1
- export {};
1
+ import { PUBLIC_CACHE_CONTROL, PUBLIC_PREFIX } from "./ports.js";
2
+ export { PUBLIC_CACHE_CONTROL, PUBLIC_PREFIX };
@@ -1,10 +1,10 @@
1
1
  import { JsonValue } from "./shared.js";
2
2
  import { EmailTemplateId } from "./email-templates.js";
3
3
  //#region src/types/notifications.d.ts
4
- type Reason = 'subject' | 'post_author' | 'comment_author' | 'message_author' | 'follower' | 'thread_participant' | 'mentioned' | 'participant' | 'space_member' | 'community_member' | 'course_member' | 'moderator' | 'staff';
4
+ type Reason = 'subject' | 'post_author' | 'comment_author' | 'message_author' | 'follower' | 'thread_participant' | 'mentioned' | 'participant' | 'space_member' | 'community_member' | 'course_member' | 'event_member' | 'moderator';
5
5
  type Scope = 'org' | 'community' | 'space' | 'chat';
6
6
  interface SubjectRef {
7
- type: 'post' | 'comment' | 'chat' | 'message' | 'space' | 'community' | 'course' | 'download' | 'bundle' | 'activity';
7
+ type: 'post' | 'comment' | 'chat' | 'message' | 'space' | 'community' | 'course' | 'download' | 'event' | 'bundle' | 'activity';
8
8
  id: string;
9
9
  }
10
10
  interface NotificationTypeDeclaration {
@@ -45,7 +45,7 @@ interface StoredNotification {
45
45
  category: string;
46
46
  communityId: string | null;
47
47
  spaceId: string | null;
48
- actorOrgUserId: string | null;
48
+ actorId: string | null;
49
49
  subject: SubjectRef | null;
50
50
  parent: SubjectRef | null;
51
51
  display: Record<string, JsonValue>;
@@ -115,7 +115,7 @@ interface NotificationFilter {
115
115
  interface RecipientList {
116
116
  type: string;
117
117
  scope: Scope;
118
- actorOrgUserId: string | null;
118
+ actorId: string | null;
119
119
  communityId: string | null;
120
120
  spaceId: string | null;
121
121
  subject: SubjectRef | null;
@@ -1,5 +1,6 @@
1
- import { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, UpdateOrgUserInput } from "./schemas/organizations.js";
1
+ import { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, Level, NewOrganizationInput, OrgRoleRow, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Permission, RoleAssignment, RoleKey, UpdateOrgUserInput } from "./schemas/organizations.js";
2
2
  //#region src/types/organizations.d.ts
3
+ type ContentId = string;
3
4
  type OrganizationId = string;
4
5
  type OrgUserId = string;
5
6
  type InviteId = string;
@@ -11,5 +12,5 @@ interface CreateOrganizationInput {
11
12
  ownerId: string;
12
13
  }
13
14
  //#endregion
14
- export { type AcceptInviteInput, type AddOrgUserInput, type CreateInviteInput, type CreateOrgUserInput, CreateOrganizationInput, type Invite, InviteId, type InviteInput, type InviteRole, type NewOrganizationInput, type OrgUser, OrgUserId, type OrgUserInput, type OrgUserProfile, type OrgUserStatus, type Organization, OrganizationId, type OrganizationInput, type Role, type UpdateOrgUserInput };
15
+ export { type AcceptInviteInput, type AddOrgUserInput, ContentId, type CreateInviteInput, type CreateOrgUserInput, CreateOrganizationInput, type Invite, InviteId, type InviteInput, type Level, type NewOrganizationInput, type OrgRoleRow, type OrgUser, OrgUserId, type OrgUserInput, type OrgUserProfile, type OrgUserStatus, type Organization, OrganizationId, type OrganizationInput, type Permission, type RoleAssignment, type RoleKey, type UpdateOrgUserInput };
15
16
  //# sourceMappingURL=organizations.d.ts.map
@@ -55,9 +55,16 @@ interface ObjectStorage {
55
55
  from: string;
56
56
  to: string;
57
57
  }): Promise<void>;
58
+ publish(input: {
59
+ from: string;
60
+ to: string;
61
+ }): Promise<void>;
62
+ publicUrl(key: string): string;
58
63
  /** Permanently remove an object. */
59
64
  remove(key: string): Promise<void>;
60
65
  }
66
+ declare const PUBLIC_PREFIX = "public/";
67
+ declare const PUBLIC_CACHE_CONTROL = "public, max-age=31536000, immutable";
61
68
  //#endregion
62
- export { EmailMessage, EmailSender, Logger, ObjectStorage, PresignDownloadInput, PresignedUpload, StoredObjectInfo };
69
+ export { EmailMessage, EmailSender, Logger, ObjectStorage, PUBLIC_CACHE_CONTROL, PUBLIC_PREFIX, PresignDownloadInput, PresignedUpload, StoredObjectInfo };
63
70
  //# sourceMappingURL=ports.d.ts.map
@@ -1 +1,7 @@
1
- export {};
1
+ //#region src/types/ports.ts
2
+ const PUBLIC_PREFIX = "public/";
3
+ const PUBLIC_CACHE_CONTROL = "public, max-age=31536000, immutable";
4
+ //#endregion
5
+ export { PUBLIC_CACHE_CONTROL, PUBLIC_PREFIX };
6
+
7
+ //# sourceMappingURL=ports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ports.js","names":[],"sources":["../../src/types/ports.ts"],"sourcesContent":["// Deployment-swappable ports, implemented by @headless-lms/adapter-* packages.\n\nexport interface Logger {\n debug(msg: string, meta?: Record<string, unknown>): void;\n info(msg: string, meta?: Record<string, unknown>): void;\n warn(msg: string, meta?: Record<string, unknown>): void;\n error(msg: string, meta?: Record<string, unknown>): void;\n /** A logger whose every entry carries `bindings` (call-site meta wins on key clash). */\n child(bindings: Record<string, unknown>): Logger;\n}\n\nexport interface EmailMessage {\n to: string;\n subject: string;\n text: string;\n /** Optional rendered HTML body; transports fall back to text when absent. */\n html?: string;\n}\n\nexport interface EmailSender {\n send(message: EmailMessage): Promise<void>;\n}\n\n// --- Object storage (S3-compatible, opaque keys) ----------------------------\n\n/** A presigned URL the browser uses to PUT a file straight to the store. */\nexport interface PresignedUpload {\n url: string;\n method: 'PUT';\n key: string;\n expiresInSeconds: number;\n /** Headers the client must send on the PUT (e.g. Content-Type). */\n headers: Record<string, string>;\n}\n\nexport interface StoredObjectInfo {\n key: string;\n size: number;\n contentType?: string;\n lastModified?: string;\n}\n\nexport interface PresignDownloadInput {\n key: string;\n expiresInSeconds?: number;\n /** Force a download with this filename (Content-Disposition: attachment). */\n downloadFilename?: string;\n}\n\nexport interface ObjectStorage {\n readonly uploadExpirySeconds: number;\n /** Presigned URL for a direct browser upload (temporary, expiring). */\n presignUpload(input: {\n key: string;\n contentType?: string;\n expiresInSeconds?: number;\n }): Promise<PresignedUpload>;\n /** Presigned URL to fetch/serve a private object (temporary, expiring). */\n presignDownload(input: PresignDownloadInput): Promise<string>;\n /** Object metadata, or null if it does not exist. */\n stat(key: string): Promise<StoredObjectInfo | null>;\n list(prefix: string): Promise<StoredObjectInfo[]>;\n copy(input: { from: string; to: string }): Promise<void>;\n publish(input: { from: string; to: string }): Promise<void>;\n publicUrl(key: string): string;\n /** Permanently remove an object. */\n remove(key: string): Promise<void>;\n}\n\nexport const PUBLIC_PREFIX = 'public/';\nexport const PUBLIC_CACHE_CONTROL = 'public, max-age=31536000, immutable';\n"],"mappings":";AAqEA,MAAa,gBAAgB;AAC7B,MAAa,uBAAuB"}
@@ -39,6 +39,7 @@ declare const assetSchema: z.ZodObject<{
39
39
  ready: "ready";
40
40
  }>;
41
41
  uploadedBy: z.ZodString;
42
+ contentId: z.ZodNullable<z.ZodString>;
42
43
  createdAt: z.ZodCoercedDate<unknown>;
43
44
  updatedAt: z.ZodCoercedDate<unknown>;
44
45
  }, z.core.$strict>;
@@ -66,6 +67,7 @@ declare const assetViewSchema: z.ZodObject<{
66
67
  ready: "ready";
67
68
  }>;
68
69
  uploadedBy: z.ZodString;
70
+ contentId: z.ZodNullable<z.ZodString>;
69
71
  createdAt: z.ZodCoercedDate<unknown>;
70
72
  updatedAt: z.ZodCoercedDate<unknown>;
71
73
  url: z.ZodNullable<z.ZodString>;
@@ -75,13 +77,9 @@ type AssetView = z.output<typeof assetViewSchema>;
75
77
  declare const assetUrlsSchema: z.ZodRecord<z.ZodString, z.ZodString>;
76
78
  type AssetUrls = z.infer<typeof assetUrlsSchema>;
77
79
  declare const requestUploadInputSchema: z.ZodObject<{
78
- uploadedBy: z.ZodString;
79
80
  filename: z.ZodString;
80
81
  contentType: z.ZodString;
81
- source: z.ZodEnum<{
82
- library: "library";
83
- member: "member";
84
- }>;
82
+ contentId: z.ZodOptional<z.ZodString>;
85
83
  }, z.core.$strict>;
86
84
  type RequestUploadInput = z.infer<typeof requestUploadInputSchema>;
87
85
  declare const uploadTicketSchema: z.ZodObject<{
@@ -107,6 +105,7 @@ declare const uploadTicketSchema: z.ZodObject<{
107
105
  ready: "ready";
108
106
  }>;
109
107
  uploadedBy: z.ZodString;
108
+ contentId: z.ZodNullable<z.ZodString>;
110
109
  createdAt: z.ZodCoercedDate<unknown>;
111
110
  updatedAt: z.ZodCoercedDate<unknown>;
112
111
  url: z.ZodNullable<z.ZodString>;
@@ -133,6 +132,7 @@ declare const assetsQuerySchema: z.ZodObject<{
133
132
  library: "library";
134
133
  member: "member";
135
134
  }>>;
135
+ contentId: z.ZodOptional<z.ZodString>;
136
136
  }, z.core.$strict>;
137
137
  type AssetsQuery = z.infer<typeof assetsQuerySchema>;
138
138
  //#endregion
@@ -20,6 +20,7 @@ const assetSchema = z.object({
20
20
  size: z.number().int().min(0),
21
21
  status: assetStatusSchema,
22
22
  uploadedBy: idSchema,
23
+ contentId: idSchema.nullable(),
23
24
  createdAt: z.coerce.date(),
24
25
  updatedAt: z.coerce.date()
25
26
  }).strict();
@@ -29,10 +30,9 @@ const assetViewSchema = assetSchema.extend({
29
30
  }).strict();
30
31
  const assetUrlsSchema = z.record(idSchema, z.string());
31
32
  const requestUploadInputSchema = z.object({
32
- uploadedBy: idSchema,
33
33
  filename: z.string().trim().min(1).max(255),
34
34
  contentType: z.string().trim().min(1).max(255),
35
- source: assetSourceSchema
35
+ contentId: idSchema.optional()
36
36
  }).strict();
37
37
  const uploadTicketSchema = z.object({
38
38
  asset: assetViewSchema,
@@ -47,7 +47,8 @@ const assetsQuerySchema = z.object({
47
47
  search: z.string().optional(),
48
48
  sort: z.string().optional(),
49
49
  kind: assetKindSchema.optional(),
50
- source: assetSourceSchema.optional()
50
+ source: assetSourceSchema.optional(),
51
+ contentId: idSchema.optional()
51
52
  }).strict();
52
53
  //#endregion
53
54
  export { assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, requestUploadInputSchema, uploadTicketSchema };
@@ -1 +1 @@
1
- {"version":3,"file":"assets.js","names":[],"sources":["../../../src/types/schemas/assets.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema } from './shared.js';\n\nexport const assetKindSchema = z.enum(['image', 'video', 'audio', 'document']);\nexport type AssetKind = z.infer<typeof assetKindSchema>;\n\nexport const assetSourceSchema = z.enum(['library', 'member']);\nexport type AssetSource = z.infer<typeof assetSourceSchema>;\n\nexport const assetStatusSchema = z.enum(['pending', 'ready']);\nexport type AssetStatus = z.infer<typeof assetStatusSchema>;\n\nexport const assetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n key: z.string().trim().min(1),\n kind: assetKindSchema,\n source: assetSourceSchema,\n filename: z.string().trim().min(1),\n contentType: z.string().trim().min(1),\n size: z.number().int().min(0),\n status: assetStatusSchema,\n uploadedBy: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Asset = z.output<typeof assetSchema>;\nexport type AssetInput = z.input<typeof assetSchema>;\n\nexport const assetViewSchema = assetSchema\n .extend({ url: z.string().nullable(), downloadUrl: z.string().nullable() })\n .strict();\nexport type AssetView = z.output<typeof assetViewSchema>;\n\nexport const assetUrlsSchema = z.record(idSchema, z.string());\nexport type AssetUrls = z.infer<typeof assetUrlsSchema>;\n\nexport const requestUploadInputSchema = z\n .object({\n uploadedBy: idSchema,\n filename: z.string().trim().min(1).max(255),\n contentType: z.string().trim().min(1).max(255),\n source: assetSourceSchema,\n })\n .strict();\nexport type RequestUploadInput = z.infer<typeof requestUploadInputSchema>;\n\nexport const uploadTicketSchema = z\n .object({\n asset: assetViewSchema,\n uploadUrl: z.string().trim().min(1),\n method: z.literal('PUT'),\n expiresInSeconds: z.number().int().positive(),\n headers: z.record(z.string(), z.string()),\n })\n .strict();\nexport type UploadTicket = z.infer<typeof uploadTicketSchema>;\n\nexport const assetsQuerySchema = 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 kind: assetKindSchema.optional(),\n source: assetSourceSchema.optional(),\n })\n .strict();\nexport type AssetsQuery = z.infer<typeof assetsQuerySchema>;\n"],"mappings":";;;AAGA,MAAa,kBAAkB,EAAE,KAAK;CAAC;CAAS;CAAS;CAAS;AAAU,CAAC;AAG7E,MAAa,oBAAoB,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC;AAG7D,MAAa,oBAAoB,EAAE,KAAK,CAAC,WAAW,OAAO,CAAC;AAG5D,MAAa,cAAc,EACxB,OAAO;CACN,OAAO;CACP,IAAI;CACJ,KAAK,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC5B,MAAM;CACN,QAAQ;CACR,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CACjC,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CACpC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAC5B,QAAQ;CACR,YAAY;CACZ,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,kBAAkB,YAC5B,OAAO;CAAE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS;CAAG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;AAAE,CAAC,CAAC,CAC1E,OAAO;AAGV,MAAa,kBAAkB,EAAE,OAAO,UAAU,EAAE,OAAO,CAAC;AAG5D,MAAa,2BAA2B,EACrC,OAAO;CACN,YAAY;CACZ,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC1C,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC7C,QAAQ;AACV,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,qBAAqB,EAC/B,OAAO;CACN,OAAO;CACP,WAAW,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAClC,QAAQ,EAAE,QAAQ,KAAK;CACvB,kBAAkB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CAC5C,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC;AAC1C,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,oBAAoB,EAC9B,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;CAC1B,MAAM,gBAAgB,SAAS;CAC/B,QAAQ,kBAAkB,SAAS;AACrC,CAAC,CAAC,CACD,OAAO"}
1
+ {"version":3,"file":"assets.js","names":[],"sources":["../../../src/types/schemas/assets.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema } from './shared.js';\n\nexport const assetKindSchema = z.enum(['image', 'video', 'audio', 'document']);\nexport type AssetKind = z.infer<typeof assetKindSchema>;\n\nexport const assetSourceSchema = z.enum(['library', 'member']);\nexport type AssetSource = z.infer<typeof assetSourceSchema>;\n\nexport const assetStatusSchema = z.enum(['pending', 'ready']);\nexport type AssetStatus = z.infer<typeof assetStatusSchema>;\n\nexport const assetSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n key: z.string().trim().min(1),\n kind: assetKindSchema,\n source: assetSourceSchema,\n filename: z.string().trim().min(1),\n contentType: z.string().trim().min(1),\n size: z.number().int().min(0),\n status: assetStatusSchema,\n uploadedBy: idSchema,\n contentId: idSchema.nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Asset = z.output<typeof assetSchema>;\nexport type AssetInput = z.input<typeof assetSchema>;\n\nexport const assetViewSchema = assetSchema\n .extend({ url: z.string().nullable(), downloadUrl: z.string().nullable() })\n .strict();\nexport type AssetView = z.output<typeof assetViewSchema>;\n\nexport const assetUrlsSchema = z.record(idSchema, z.string());\nexport type AssetUrls = z.infer<typeof assetUrlsSchema>;\n\nexport const requestUploadInputSchema = z\n .object({\n filename: z.string().trim().min(1).max(255),\n contentType: z.string().trim().min(1).max(255),\n contentId: idSchema.optional(),\n })\n .strict();\nexport type RequestUploadInput = z.infer<typeof requestUploadInputSchema>;\n\nexport const uploadTicketSchema = z\n .object({\n asset: assetViewSchema,\n uploadUrl: z.string().trim().min(1),\n method: z.literal('PUT'),\n expiresInSeconds: z.number().int().positive(),\n headers: z.record(z.string(), z.string()),\n })\n .strict();\nexport type UploadTicket = z.infer<typeof uploadTicketSchema>;\n\nexport const assetsQuerySchema = 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 kind: assetKindSchema.optional(),\n source: assetSourceSchema.optional(),\n contentId: idSchema.optional(),\n })\n .strict();\nexport type AssetsQuery = z.infer<typeof assetsQuerySchema>;\n"],"mappings":";;;AAGA,MAAa,kBAAkB,EAAE,KAAK;CAAC;CAAS;CAAS;CAAS;AAAU,CAAC;AAG7E,MAAa,oBAAoB,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC;AAG7D,MAAa,oBAAoB,EAAE,KAAK,CAAC,WAAW,OAAO,CAAC;AAG5D,MAAa,cAAc,EACxB,OAAO;CACN,OAAO;CACP,IAAI;CACJ,KAAK,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC5B,MAAM;CACN,QAAQ;CACR,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CACjC,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CACpC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAC5B,QAAQ;CACR,YAAY;CACZ,WAAW,SAAS,SAAS;CAC7B,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,kBAAkB,YAC5B,OAAO;CAAE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS;CAAG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;AAAE,CAAC,CAAC,CAC1E,OAAO;AAGV,MAAa,kBAAkB,EAAE,OAAO,UAAU,EAAE,OAAO,CAAC;AAG5D,MAAa,2BAA2B,EACrC,OAAO;CACN,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC1C,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC7C,WAAW,SAAS,SAAS;AAC/B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,qBAAqB,EAC/B,OAAO;CACN,OAAO;CACP,WAAW,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAClC,QAAQ,EAAE,QAAQ,KAAK;CACvB,kBAAkB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CAC5C,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC;AAC1C,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,oBAAoB,EAC9B,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;CAC1B,MAAM,gBAAgB,SAAS;CAC/B,QAAQ,kBAAkB,SAAS;CACnC,WAAW,SAAS,SAAS;AAC/B,CAAC,CAAC,CACD,OAAO"}