@headless-lms/core 0.1.0 → 0.2.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 (154) hide show
  1. package/dist/assets/events.d.ts +66 -3
  2. package/dist/assets/events.js +19 -3
  3. package/dist/assets/events.js.map +1 -1
  4. package/dist/assets/service.js +5 -3
  5. package/dist/assets/service.js.map +1 -1
  6. package/dist/automations/actions.d.ts +11 -3
  7. package/dist/automations/actions.js +38 -5
  8. package/dist/automations/actions.js.map +1 -1
  9. package/dist/automations/catalog.d.ts +4 -1
  10. package/dist/automations/catalog.js +289 -188
  11. package/dist/automations/catalog.js.map +1 -1
  12. package/dist/automations/events.d.ts +46 -24
  13. package/dist/automations/events.js +5 -5
  14. package/dist/automations/events.js.map +1 -1
  15. package/dist/automations/index.d.ts +5 -5
  16. package/dist/automations/index.js +2 -2
  17. package/dist/automations/model.d.ts +13 -3
  18. package/dist/automations/model.js +23 -3
  19. package/dist/automations/model.js.map +1 -1
  20. package/dist/automations/ports.d.ts +23 -8
  21. package/dist/automations/service.d.ts +21 -5
  22. package/dist/automations/service.js +267 -47
  23. package/dist/automations/service.js.map +1 -1
  24. package/dist/automations/types.d.ts +2 -2
  25. package/dist/automations/webhook-signing.d.ts +7 -0
  26. package/dist/automations/webhook-signing.js +22 -0
  27. package/dist/automations/webhook-signing.js.map +1 -0
  28. package/dist/content/events.d.ts +401 -25
  29. package/dist/content/events.js +125 -19
  30. package/dist/content/events.js.map +1 -1
  31. package/dist/content/index.d.ts +5 -5
  32. package/dist/content/index.js +2 -2
  33. package/dist/content/model.d.ts +2 -2
  34. package/dist/content/ports.d.ts +42 -11
  35. package/dist/content/service.d.ts +15 -9
  36. package/dist/content/service.js +153 -45
  37. package/dist/content/service.js.map +1 -1
  38. package/dist/content/types.d.ts +2 -2
  39. package/dist/discussion/events.d.ts +60 -4
  40. package/dist/discussion/events.js +30 -4
  41. package/dist/discussion/events.js.map +1 -1
  42. package/dist/discussion/model.d.ts +1 -2
  43. package/dist/discussion/ports.d.ts +1 -1
  44. package/dist/discussion/service.d.ts +1 -1
  45. package/dist/discussion/service.js +11 -10
  46. package/dist/discussion/service.js.map +1 -1
  47. package/dist/entitlements/events.d.ts +96 -12
  48. package/dist/entitlements/events.js +21 -4
  49. package/dist/entitlements/events.js.map +1 -1
  50. package/dist/entitlements/service.js +1 -0
  51. package/dist/entitlements/service.js.map +1 -1
  52. package/dist/identity/events.d.ts +17 -3
  53. package/dist/identity/events.js +12 -2
  54. package/dist/identity/events.js.map +1 -1
  55. package/dist/identity/ports.d.ts +3 -0
  56. package/dist/identity/service.d.ts +3 -0
  57. package/dist/identity/service.js +12 -1
  58. package/dist/identity/service.js.map +1 -1
  59. package/dist/integrations/events.d.ts +27 -3
  60. package/dist/integrations/events.js +15 -3
  61. package/dist/integrations/events.js.map +1 -1
  62. package/dist/integrations/service.js +1 -1
  63. package/dist/integrations/service.js.map +1 -1
  64. package/dist/organizations/events.d.ts +178 -11
  65. package/dist/organizations/events.js +52 -9
  66. package/dist/organizations/events.js.map +1 -1
  67. package/dist/organizations/index.d.ts +3 -3
  68. package/dist/organizations/members.js.map +1 -1
  69. package/dist/organizations/ports.d.ts +6 -10
  70. package/dist/organizations/roles.js.map +1 -1
  71. package/dist/organizations/service.d.ts +9 -4
  72. package/dist/organizations/service.js +131 -72
  73. package/dist/organizations/service.js.map +1 -1
  74. package/dist/organizations/types.d.ts +2 -2
  75. package/dist/progress/events.d.ts +34 -2
  76. package/dist/progress/events.js +15 -2
  77. package/dist/progress/events.js.map +1 -1
  78. package/dist/progress/service.d.ts +2 -2
  79. package/dist/progress/service.js +4 -2
  80. package/dist/progress/service.js.map +1 -1
  81. package/dist/reporting/courses/index.d.ts +4 -0
  82. package/dist/reporting/courses/index.js +2 -0
  83. package/dist/reporting/courses/model.d.ts +24 -0
  84. package/dist/reporting/courses/model.js +1 -0
  85. package/dist/reporting/courses/ports.d.ts +13 -0
  86. package/dist/reporting/courses/ports.js +1 -0
  87. package/dist/reporting/courses/service.d.ts +19 -0
  88. package/dist/reporting/courses/service.js +20 -0
  89. package/dist/reporting/courses/service.js.map +1 -0
  90. package/dist/reporting/learn/model.d.ts +2 -2
  91. package/dist/reporting/learn/ports.d.ts +2 -1
  92. package/dist/reporting/learn/service.d.ts +2 -1
  93. package/dist/reporting/learn/service.js +5 -0
  94. package/dist/reporting/learn/service.js.map +1 -1
  95. package/dist/reporting/students/index.d.ts +2 -2
  96. package/dist/reporting/students/model.d.ts +21 -1
  97. package/dist/reporting/students/ports.d.ts +3 -1
  98. package/dist/reporting/students/service.d.ts +2 -1
  99. package/dist/reporting/students/service.js +3 -0
  100. package/dist/reporting/students/service.js.map +1 -1
  101. package/dist/shared/events.d.ts +5 -3
  102. package/dist/shared/events.js +1 -0
  103. package/dist/shared/events.js.map +1 -1
  104. package/dist/shared/id.d.ts +1 -0
  105. package/dist/shared/id.js +1 -0
  106. package/dist/shared/id.js.map +1 -1
  107. package/dist/shared/mailer.d.ts +2 -0
  108. package/dist/shared/mailer.js.map +1 -1
  109. package/dist/shared/settings.js.map +1 -1
  110. package/dist/types/automations.d.ts +13 -2
  111. package/dist/types/content.d.ts +2 -2
  112. package/dist/types/discussion.d.ts +3 -2
  113. package/dist/types/email-templates.d.ts +3 -1
  114. package/dist/types/events.d.ts +3 -3
  115. package/dist/types/index.d.ts +6 -6
  116. package/dist/types/organizations.d.ts +2 -2
  117. package/dist/types/ports.d.ts +1 -1
  118. package/dist/types/schemas/assets.d.ts +3 -0
  119. package/dist/types/schemas/assets.js +2 -1
  120. package/dist/types/schemas/assets.js.map +1 -1
  121. package/dist/types/schemas/automations.d.ts +71 -4
  122. package/dist/types/schemas/automations.js +35 -4
  123. package/dist/types/schemas/automations.js.map +1 -1
  124. package/dist/types/schemas/content.d.ts +51 -18
  125. package/dist/types/schemas/content.js +40 -13
  126. package/dist/types/schemas/content.js.map +1 -1
  127. package/dist/types/schemas/credentials.js.map +1 -1
  128. package/dist/types/schemas/discussion.d.ts +10 -2
  129. package/dist/types/schemas/discussion.js +12 -5
  130. package/dist/types/schemas/discussion.js.map +1 -1
  131. package/dist/types/schemas/entitlements.d.ts +8 -2
  132. package/dist/types/schemas/entitlements.js +10 -4
  133. package/dist/types/schemas/entitlements.js.map +1 -1
  134. package/dist/types/schemas/identity.d.ts +4 -4
  135. package/dist/types/schemas/identity.js +5 -5
  136. package/dist/types/schemas/identity.js.map +1 -1
  137. package/dist/types/schemas/index.d.ts +6 -6
  138. package/dist/types/schemas/index.js +6 -6
  139. package/dist/types/schemas/integrations.js.map +1 -1
  140. package/dist/types/schemas/organizations.d.ts +19 -5
  141. package/dist/types/schemas/organizations.js +12 -7
  142. package/dist/types/schemas/organizations.js.map +1 -1
  143. package/dist/types/schemas/outbox.d.ts +1 -0
  144. package/dist/types/schemas/outbox.js +1 -0
  145. package/dist/types/schemas/outbox.js.map +1 -1
  146. package/dist/types/schemas/progress.d.ts +1 -0
  147. package/dist/types/schemas/progress.js +1 -0
  148. package/dist/types/schemas/progress.js.map +1 -1
  149. package/dist/types/schemas/settings.js.map +1 -1
  150. package/dist/types/schemas/shared.d.ts +2 -1
  151. package/dist/types/schemas/shared.js +3 -1
  152. package/dist/types/schemas/shared.js.map +1 -1
  153. package/dist/types/shared.d.ts +1 -1
  154. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
+ import { 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 } from "./content.js";
1
2
  import { CreateUserInput, ProvisionUserInput, UpdateUserInput, User, UserInput, createUserInputSchema, provisionUserInputSchema, updateUserInputSchema, userSchema } from "./identity.js";
2
- import { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema } from "./organizations.js";
3
- import { Activity, ActivityAsset, ActivityAssetInput, ActivityCommentsRule, ActivityInput, ActivitySettings, AddDownloadAssetInput, ContentItem, ContentItemInput, ContentType, Course, CourseInput, CourseSettings, CourseStatus, CreateCourseInput, CreateDownloadInput, Download, DownloadAsset, DownloadAssetInput, DownloadInput, DownloadStatus, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, ReorderDownloadAssetsInput, SaveActivityInput, UpdateCourseInput, UpdateDownloadInput, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsSchema, courseStatusSchema, createCourseInputSchema, createDownloadInputSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, updateCourseInputSchema, updateDownloadInputSchema } from "./content.js";
3
+ import { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, UpdateOrgUserInput, acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema } from "./organizations.js";
4
4
  import { Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, GrantEntitlementInput, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema } from "./entitlements.js";
5
5
  import { ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ReportProgressInput, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, reportProgressInputSchema } from "./progress.js";
6
6
  import { Asset, AssetInput, AssetKind, AssetStatus, AssetsQuery, DownloadTicket, RequestUploadInput, UploadTicket, assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, downloadTicketSchema, requestUploadInputSchema, uploadTicketSchema } from "./assets.js";
7
7
  import { ConfigureInput, ConnectInput, Connection, ConnectionInput, Validation, configureInputSchema, connectInputSchema, connectionSchema, validationSchema } from "./integrations.js";
8
- import { Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AvailableAction, AvailableActions, AvailableTriggers, CreateAutomationInput, UpdateAutomationInput, automationActionResultSchema, automationActionSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, updateAutomationInputSchema } from "./automations.js";
9
- import { Comment, CommentAuthor, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, ListCommentsQuery, ReactionCounts, ReactionEmoji, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, listCommentsQuerySchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
8
+ import { Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableActions, AvailableTriggers, CreateAutomationInput, CreateWebhookInput, CreatedWebhook, DeliverWebhookInput, UpdateAutomationInput, UpdateWebhookInput, Webhook, WebhookSecret, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema } from "./automations.js";
9
+ import { ActivityCommentsRule, Comment, CommentAuthor, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, ListCommentsQuery, ReactionCounts, ReactionEmoji, activityCommentsRuleSchema, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, listCommentsQuerySchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
10
10
  import { Credential, CredentialInput, credentialSchema } from "./credentials.js";
11
- import { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
11
+ import { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
12
12
  import { EventOutbox, EventOutboxInput, eventOutboxSchema } from "./outbox.js";
13
13
  import { Setting, SettingInput, settingSchema } from "./settings.js";
14
- export { AcceptInviteInput, Activity, ActivityAsset, ActivityAssetInput, ActivityCommentsRule, ActivityInput, ActivitySettings, AddDownloadAssetInput, AddOrgUserInput, Asset, AssetInput, AssetKind, AssetStatus, AssetsQuery, Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AvailableAction, AvailableActions, AvailableTriggers, Comment, CommentAuthor, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, ConfigureInput, ConnectInput, Connection, ConnectionInput, ContentItem, ContentItemInput, ContentType, Course, CourseInput, CourseSettings, CourseStatus, CreateAutomationInput, CreateCourseInput, CreateDownloadInput, CreateInviteInput, CreateOrgUserInput, CreateUserInput, Credential, CredentialInput, Download, DownloadAsset, DownloadAssetInput, DownloadInput, DownloadStatus, DownloadTicket, Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, EventOutbox, EventOutboxInput, GrantEntitlementInput, Invite, InviteInput, InviteRole, ListCommentsQuery, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ProvisionUserInput, ReactionCounts, ReactionEmoji, ReorderDownloadAssetsInput, ReportProgressInput, RequestUploadInput, Role, SaveActivityInput, Setting, SettingInput, UpdateAutomationInput, UpdateCourseInput, UpdateDownloadInput, UpdateUserInput, UploadTicket, User, UserInput, Validation, acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, availableActionSchema, availableTriggersSchema, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsSchema, courseStatusSchema, createAutomationInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createUserInputSchema, credentialSchema, domainEventSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, downloadTicketSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listCommentsQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, settingSchema, updateAutomationInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateUserInputSchema, uploadTicketSchema, userSchema, validationSchema };
14
+ export { AcceptInviteInput, Activity, ActivityAsset, ActivityAssetInput, ActivityCommentsRule, ActivityInput, ActivitySettings, AddDownloadAssetInput, AddOrgUserInput, Asset, AssetInput, AssetKind, AssetStatus, AssetsQuery, Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableActions, AvailableTriggers, Bundle, BundleInput, BundleItem, BundleItemInput, Comment, CommentAuthor, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, ConfigureInput, ConnectInput, Connection, ConnectionInput, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CreateAutomationInput, CreateBundleInput, CreateCourseInput, CreateDownloadInput, CreateInviteInput, CreateOrgUserInput, CreateUserInput, CreateWebhookInput, CreatedWebhook, Credential, CredentialInput, DeliverWebhookInput, Download, DownloadAsset, DownloadAssetInput, DownloadInput, DownloadStatus, DownloadTicket, Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, EventOutbox, EventOutboxInput, GrantEntitlementInput, Invite, InviteInput, InviteRole, ListBundlesQuery, ListCommentsQuery, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ProvisionUserInput, ReactionCounts, ReactionEmoji, ReorderDownloadAssetsInput, ReportProgressInput, RequestUploadInput, Role, SaveActivityInput, Setting, SettingInput, UpdateAutomationInput, UpdateBundleInput, UpdateCourseInput, UpdateDownloadInput, UpdateOrgUserInput, UpdateUserInput, UpdateWebhookInput, UploadTicket, User, UserInput, Validation, Webhook, WebhookSecret, acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, bundleItemSchema, bundleSchema, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, createAutomationInputSchema, createBundleInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createUserInputSchema, createWebhookInputSchema, createdWebhookSchema, credentialSchema, deliverWebhookInputSchema, domainEventSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, downloadTicketSchema, emailSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listBundlesQuerySchema, listCommentsQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, settingSchema, updateAutomationInputSchema, updateBundleInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateOrgUserInputSchema, updateUserInputSchema, updateWebhookInputSchema, uploadTicketSchema, userSchema, validationSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
@@ -1,14 +1,14 @@
1
- import { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
1
+ import { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
2
2
  import { createUserInputSchema, provisionUserInputSchema, updateUserInputSchema, userSchema } from "./identity.js";
3
- import { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema } from "./organizations.js";
4
- import { commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, listCommentsQuerySchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
5
- import { activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsSchema, courseStatusSchema, createCourseInputSchema, createDownloadInputSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, updateCourseInputSchema, updateDownloadInputSchema } from "./content.js";
3
+ import { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema } from "./organizations.js";
4
+ import { activityCommentsRuleSchema, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, listCommentsQuerySchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
5
+ import { 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 } from "./content.js";
6
6
  import { entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema } from "./entitlements.js";
7
7
  import { progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, reportProgressInputSchema } from "./progress.js";
8
8
  import { assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, downloadTicketSchema, requestUploadInputSchema, uploadTicketSchema } from "./assets.js";
9
9
  import { configureInputSchema, connectInputSchema, connectionSchema, validationSchema } from "./integrations.js";
10
- import { automationActionResultSchema, automationActionSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, updateAutomationInputSchema } from "./automations.js";
10
+ import { automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema } from "./automations.js";
11
11
  import { credentialSchema } from "./credentials.js";
12
12
  import { eventOutboxSchema } from "./outbox.js";
13
13
  import { settingSchema } from "./settings.js";
14
- export { acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, availableActionSchema, availableTriggersSchema, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsSchema, courseStatusSchema, createAutomationInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createUserInputSchema, credentialSchema, domainEventSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, downloadTicketSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listCommentsQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, settingSchema, updateAutomationInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateUserInputSchema, uploadTicketSchema, userSchema, validationSchema };
14
+ export { acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, assetKindSchema, assetSchema, assetStatusSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, bundleItemSchema, bundleSchema, commentAuthorSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, createAutomationInputSchema, createBundleInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createUserInputSchema, createWebhookInputSchema, createdWebhookSchema, credentialSchema, deliverWebhookInputSchema, domainEventSchema, downloadAssetSchema, downloadSchema, downloadStatusSchema, downloadTicketSchema, emailSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listBundlesQuerySchema, listCommentsQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, settingSchema, updateAutomationInputSchema, updateBundleInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateOrgUserInputSchema, updateUserInputSchema, updateWebhookInputSchema, uploadTicketSchema, userSchema, validationSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.js","names":[],"sources":["../../../src/types/schemas/integrations.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { idSchema, jsonRecordSchema } from \"./shared.js\";\n\nexport const validationSchema = z.union([\n z.object({ ok: z.literal(true) }).strict(),\n z.object({ ok: z.literal(false), errors: z.array(z.string()) }).strict(),\n]);\nexport type Validation = z.infer<typeof validationSchema>;\n\nexport const connectionSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n integrationId: idSchema,\n config: jsonRecordSchema,\n active: z.boolean(),\n credentialRef: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Connection = z.output<typeof connectionSchema>;\nexport type ConnectionInput = z.input<typeof connectionSchema>;\n\nexport const connectInputSchema = z.object({\n integrationId: idSchema,\n secrets: jsonRecordSchema,\n config: jsonRecordSchema.optional(),\n}).strict();\nexport type ConnectInput = z.output<typeof connectInputSchema>;\n\nexport const configureInputSchema = z.object({\n config: jsonRecordSchema.optional(),\n active: z.boolean().optional(),\n}).strict();\nexport type ConfigureInput = z.output<typeof configureInputSchema>;\n"],"mappings":";;;AAGA,MAAa,mBAAmB,EAAE,MAAM,CACtC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,GACzC,EAAE,OAAO;CAAE,IAAI,EAAE,QAAQ,KAAK;CAAG,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;AAAE,CAAC,CAAC,CAAC,OAAO,CACzE,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO;CACvC,OAAO;CACP,IAAI;CACJ,eAAe;CACf,QAAQ;CACR,QAAQ,EAAE,QAAQ;CAClB,eAAe;CACf,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO;AAIV,MAAa,qBAAqB,EAAE,OAAO;CACzC,eAAe;CACf,SAAS;CACT,QAAQ,iBAAiB,SAAS;AACpC,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,uBAAuB,EAAE,OAAO;CAC3C,QAAQ,iBAAiB,SAAS;CAClC,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;AAC/B,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"integrations.js","names":[],"sources":["../../../src/types/schemas/integrations.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonRecordSchema } from './shared.js';\n\nexport const validationSchema = z.union([\n z.object({ ok: z.literal(true) }).strict(),\n z.object({ ok: z.literal(false), errors: z.array(z.string()) }).strict(),\n]);\nexport type Validation = z.infer<typeof validationSchema>;\n\nexport const connectionSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n integrationId: idSchema,\n config: jsonRecordSchema,\n active: z.boolean(),\n credentialRef: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Connection = z.output<typeof connectionSchema>;\nexport type ConnectionInput = z.input<typeof connectionSchema>;\n\nexport const connectInputSchema = z\n .object({\n integrationId: idSchema,\n secrets: jsonRecordSchema,\n config: jsonRecordSchema.optional(),\n })\n .strict();\nexport type ConnectInput = z.output<typeof connectInputSchema>;\n\nexport const configureInputSchema = z\n .object({\n config: jsonRecordSchema.optional(),\n active: z.boolean().optional(),\n })\n .strict();\nexport type ConfigureInput = z.output<typeof configureInputSchema>;\n"],"mappings":";;;AAGA,MAAa,mBAAmB,EAAE,MAAM,CACtC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,GACzC,EAAE,OAAO;CAAE,IAAI,EAAE,QAAQ,KAAK;CAAG,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;AAAE,CAAC,CAAC,CAAC,OAAO,CACzE,CAAC;AAGD,MAAa,mBAAmB,EAC7B,OAAO;CACN,OAAO;CACP,IAAI;CACJ,eAAe;CACf,QAAQ;CACR,QAAQ,EAAE,QAAQ;CAClB,eAAe;CACf,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,qBAAqB,EAC/B,OAAO;CACN,eAAe;CACf,SAAS;CACT,QAAQ,iBAAiB,SAAS;AACpC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,uBAAuB,EACjC,OAAO;CACN,QAAQ,iBAAiB,SAAS;CAClC,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;AAC/B,CAAC,CAAC,CACD,OAAO"}
@@ -52,14 +52,14 @@ declare const orgUserProfileSchema: z.ZodObject<{
52
52
  id: z.ZodString;
53
53
  firstName: z.ZodNullable<z.ZodString>;
54
54
  lastName: z.ZodNullable<z.ZodString>;
55
- email: z.ZodString;
55
+ email: z.ZodEmail;
56
56
  image: z.ZodNullable<z.ZodString>;
57
57
  }, z.core.$strict>;
58
58
  type OrgUserProfile = z.infer<typeof orgUserProfileSchema>;
59
59
  declare const inviteSchema: z.ZodObject<{
60
60
  id: z.ZodString;
61
61
  orgId: z.ZodString;
62
- email: z.ZodString;
62
+ email: z.ZodEmail;
63
63
  role: z.ZodEnum<{
64
64
  admin: "admin";
65
65
  instructor: "instructor";
@@ -75,6 +75,7 @@ declare const inviteSchema: z.ZodObject<{
75
75
  tokenHash: z.ZodNullable<z.ZodString>;
76
76
  expiresAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
77
77
  createdAt: z.ZodCoercedDate<unknown>;
78
+ updatedAt: z.ZodCoercedDate<unknown>;
78
79
  }, z.core.$strict>;
79
80
  type Invite = z.output<typeof inviteSchema>;
80
81
  type InviteInput = z.input<typeof inviteSchema>;
@@ -110,9 +111,22 @@ declare const createOrgUserInputSchema: z.ZodObject<{
110
111
  }>>;
111
112
  }, z.core.$strict>;
112
113
  type CreateOrgUserInput = z.infer<typeof createOrgUserInputSchema>;
114
+ declare const updateOrgUserInputSchema: z.ZodObject<{
115
+ role: z.ZodOptional<z.ZodEnum<{
116
+ owner: "owner";
117
+ admin: "admin";
118
+ instructor: "instructor";
119
+ student: "student";
120
+ }>>;
121
+ status: z.ZodOptional<z.ZodEnum<{
122
+ active: "active";
123
+ invited: "invited";
124
+ }>>;
125
+ }, z.core.$strict>;
126
+ type UpdateOrgUserInput = z.infer<typeof updateOrgUserInputSchema>;
113
127
  declare const createInviteInputSchema: z.ZodObject<{
114
128
  orgId: z.ZodString;
115
- email: z.ZodString;
129
+ email: z.ZodEmail;
116
130
  role: z.ZodEnum<{
117
131
  admin: "admin";
118
132
  instructor: "instructor";
@@ -127,9 +141,9 @@ type CreateInviteInput = z.infer<typeof createInviteInputSchema>;
127
141
  declare const acceptInviteInputSchema: z.ZodObject<{
128
142
  token: z.ZodString;
129
143
  userId: z.ZodString;
130
- email: z.ZodString;
144
+ email: z.ZodEmail;
131
145
  }, z.core.$strict>;
132
146
  type AcceptInviteInput = z.infer<typeof acceptInviteInputSchema>;
133
147
  //#endregion
134
- export { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema };
148
+ export { AcceptInviteInput, AddOrgUserInput, CreateInviteInput, CreateOrgUserInput, Invite, InviteInput, InviteRole, NewOrganizationInput, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, Role, UpdateOrgUserInput, acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema };
135
149
  //# sourceMappingURL=organizations.d.ts.map
@@ -1,4 +1,4 @@
1
- import { idSchema } from "./shared.js";
1
+ import { emailSchema, idSchema } from "./shared.js";
2
2
  import { z } from "zod";
3
3
  //#region src/types/schemas/organizations.ts
4
4
  const roleSchema = z.enum([
@@ -35,13 +35,13 @@ const orgUserProfileSchema = z.object({
35
35
  id: idSchema,
36
36
  firstName: z.string().nullable(),
37
37
  lastName: z.string().nullable(),
38
- email: z.string().email(),
38
+ email: emailSchema,
39
39
  image: z.string().nullable()
40
40
  }).strict();
41
41
  const inviteSchema = z.object({
42
42
  id: idSchema,
43
43
  orgId: idSchema,
44
- email: z.string().email(),
44
+ email: emailSchema,
45
45
  role: inviteRoleSchema,
46
46
  status: z.enum([
47
47
  "pending",
@@ -52,7 +52,8 @@ const inviteSchema = z.object({
52
52
  invitedBy: idSchema,
53
53
  tokenHash: z.string().nullable(),
54
54
  expiresAt: z.coerce.date().nullable(),
55
- createdAt: z.coerce.date()
55
+ createdAt: z.coerce.date(),
56
+ updatedAt: z.coerce.date()
56
57
  }).strict();
57
58
  const newOrganizationInputSchema = z.object({
58
59
  name: z.string(),
@@ -70,9 +71,13 @@ const createOrgUserInputSchema = z.object({
70
71
  role: roleSchema,
71
72
  status: orgUserStatusSchema.optional()
72
73
  }).strict();
74
+ const updateOrgUserInputSchema = z.object({
75
+ role: roleSchema.optional(),
76
+ status: orgUserStatusSchema.optional()
77
+ }).strict();
73
78
  const createInviteInputSchema = z.object({
74
79
  orgId: idSchema,
75
- email: z.string().email(),
80
+ email: emailSchema,
76
81
  role: inviteRoleSchema,
77
82
  inviterUserId: idSchema,
78
83
  firstName: z.string().optional(),
@@ -82,9 +87,9 @@ const createInviteInputSchema = z.object({
82
87
  const acceptInviteInputSchema = z.object({
83
88
  token: z.string().trim().min(1),
84
89
  userId: idSchema,
85
- email: z.string().email()
90
+ email: emailSchema
86
91
  }).strict();
87
92
  //#endregion
88
- export { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema };
93
+ export { acceptInviteInputSchema, addOrgUserInputSchema, createInviteInputSchema, createOrgUserInputSchema, inviteRoleSchema, inviteSchema, newOrganizationInputSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, roleSchema, updateOrgUserInputSchema };
89
94
 
90
95
  //# sourceMappingURL=organizations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.js","names":[],"sources":["../../../src/types/schemas/organizations.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { idSchema } from \"./shared.js\";\n\nexport const roleSchema = z.enum([\"owner\", \"admin\", \"instructor\", \"student\"]);\nexport type Role = z.infer<typeof roleSchema>;\n\nexport const orgUserStatusSchema = z.enum([\"invited\", \"active\"]);\nexport type OrgUserStatus = z.infer<typeof orgUserStatusSchema>;\n\nexport const inviteRoleSchema = z.enum([\"admin\", \"instructor\", \"student\"]);\nexport type InviteRole = z.infer<typeof inviteRoleSchema>;\n\nexport const organizationSchema = z.object({\n id: idSchema,\n externalId: idSchema.nullable(),\n name: z.string(),\n slug: z.string(),\n ownerId: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Organization = z.output<typeof organizationSchema>;\nexport type OrganizationInput = z.input<typeof organizationSchema>;\n\nexport const orgUserSchema = z.object({\n id: idSchema,\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n status: orgUserStatusSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type OrgUser = z.output<typeof orgUserSchema>;\nexport type OrgUserInput = z.input<typeof orgUserSchema>;\n\nexport const orgUserProfileSchema = z.object({\n id: idSchema,\n firstName: z.string().nullable(),\n lastName: z.string().nullable(),\n email: z.string().email(),\n image: z.string().nullable(),\n}).strict();\nexport type OrgUserProfile = z.infer<typeof orgUserProfileSchema>;\n\nexport const inviteSchema = z.object({\n id: idSchema,\n orgId: idSchema,\n email: z.string().email(),\n role: inviteRoleSchema,\n status: z.enum([\"pending\", \"accepted\", \"rejected\", \"canceled\"]),\n invitedBy: idSchema,\n tokenHash: z.string().nullable(),\n expiresAt: z.coerce.date().nullable(),\n createdAt: z.coerce.date(),\n}).strict();\nexport type Invite = z.output<typeof inviteSchema>;\nexport type InviteInput = z.input<typeof inviteSchema>;\n\nexport const newOrganizationInputSchema = z.object({\n name: z.string(),\n slug: z.string(),\n logo: z.string().optional(),\n}).strict();\nexport type NewOrganizationInput = z.infer<typeof newOrganizationInputSchema>;\n\nexport const addOrgUserInputSchema = z.object({\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n}).strict();\nexport type AddOrgUserInput = z.infer<typeof addOrgUserInputSchema>;\n\nexport const createOrgUserInputSchema = z.object({\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n status: orgUserStatusSchema.optional(),\n}).strict();\nexport type CreateOrgUserInput = z.infer<typeof createOrgUserInputSchema>;\n\nexport const createInviteInputSchema = z.object({\n orgId: idSchema,\n email: z.string().email(),\n role: inviteRoleSchema,\n inviterUserId: idSchema,\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n sendEmail: z.boolean().optional(),\n}).strict();\nexport type CreateInviteInput = z.infer<typeof createInviteInputSchema>;\n\nexport const acceptInviteInputSchema = z.object({\n token: z.string().trim().min(1),\n userId: idSchema,\n email: z.string().email(),\n}).strict();\nexport type AcceptInviteInput = z.infer<typeof acceptInviteInputSchema>;\n"],"mappings":";;;AAGA,MAAa,aAAa,EAAE,KAAK;CAAC;CAAS;CAAS;CAAc;AAAS,CAAC;AAG5E,MAAa,sBAAsB,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC;AAG/D,MAAa,mBAAmB,EAAE,KAAK;CAAC;CAAS;CAAc;AAAS,CAAC;AAGzE,MAAa,qBAAqB,EAAE,OAAO;CACzC,IAAI;CACJ,YAAY,SAAS,SAAS;CAC9B,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,SAAS;CACT,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO;AAIV,MAAa,gBAAgB,EAAE,OAAO;CACpC,IAAI;CACJ,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO;AAIV,MAAa,uBAAuB,EAAE,OAAO;CAC3C,IAAI;CACJ,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM;CACxB,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,eAAe,EAAE,OAAO;CACnC,IAAI;CACJ,OAAO;CACP,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM;CACxB,MAAM;CACN,QAAQ,EAAE,KAAK;EAAC;EAAW;EAAY;EAAY;CAAU,CAAC;CAC9D,WAAW;CACX,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;CACpC,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO;AAIV,MAAa,6BAA6B,EAAE,OAAO;CACjD,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,wBAAwB,EAAE,OAAO;CAC5C,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,2BAA2B,EAAE,OAAO;CAC/C,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ,oBAAoB,SAAS;AACvC,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,0BAA0B,EAAE,OAAO;CAC9C,OAAO;CACP,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM;CACxB,MAAM;CACN,eAAe;CACf,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;AAClC,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,0BAA0B,EAAE,OAAO;CAC9C,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC9B,QAAQ;CACR,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM;AAC1B,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"organizations.js","names":[],"sources":["../../../src/types/schemas/organizations.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, emailSchema } from './shared.js';\n\nexport const roleSchema = z.enum(['owner', 'admin', 'instructor', 'student']);\nexport type Role = z.infer<typeof roleSchema>;\n\nexport const orgUserStatusSchema = z.enum(['invited', 'active']);\nexport type OrgUserStatus = z.infer<typeof orgUserStatusSchema>;\n\nexport const inviteRoleSchema = z.enum(['admin', 'instructor', 'student']);\nexport type InviteRole = z.infer<typeof inviteRoleSchema>;\n\nexport const organizationSchema = z\n .object({\n id: idSchema,\n externalId: idSchema.nullable(),\n name: z.string(),\n slug: z.string(),\n ownerId: idSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Organization = z.output<typeof organizationSchema>;\nexport type OrganizationInput = z.input<typeof organizationSchema>;\n\nexport const orgUserSchema = z\n .object({\n id: idSchema,\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n status: orgUserStatusSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type OrgUser = z.output<typeof orgUserSchema>;\nexport type OrgUserInput = z.input<typeof orgUserSchema>;\n\nexport const orgUserProfileSchema = z\n .object({\n id: idSchema,\n firstName: z.string().nullable(),\n lastName: z.string().nullable(),\n email: emailSchema,\n image: z.string().nullable(),\n })\n .strict();\nexport type OrgUserProfile = z.infer<typeof orgUserProfileSchema>;\n\nexport const inviteSchema = z\n .object({\n id: idSchema,\n orgId: idSchema,\n email: emailSchema,\n role: inviteRoleSchema,\n status: z.enum(['pending', 'accepted', 'rejected', 'canceled']),\n invitedBy: idSchema,\n tokenHash: z.string().nullable(),\n expiresAt: z.coerce.date().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Invite = z.output<typeof inviteSchema>;\nexport type InviteInput = z.input<typeof inviteSchema>;\n\nexport const newOrganizationInputSchema = z\n .object({\n name: z.string(),\n slug: z.string(),\n logo: z.string().optional(),\n })\n .strict();\nexport type NewOrganizationInput = z.infer<typeof newOrganizationInputSchema>;\n\nexport const addOrgUserInputSchema = z\n .object({\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n })\n .strict();\nexport type AddOrgUserInput = z.infer<typeof addOrgUserInputSchema>;\n\nexport const createOrgUserInputSchema = z\n .object({\n orgId: idSchema,\n userId: idSchema,\n role: roleSchema,\n status: orgUserStatusSchema.optional(),\n })\n .strict();\nexport type CreateOrgUserInput = z.infer<typeof createOrgUserInputSchema>;\n\nexport const updateOrgUserInputSchema = z\n .object({\n role: roleSchema.optional(),\n status: orgUserStatusSchema.optional(),\n })\n .strict();\nexport type UpdateOrgUserInput = z.infer<typeof updateOrgUserInputSchema>;\n\nexport const createInviteInputSchema = z\n .object({\n orgId: idSchema,\n email: emailSchema,\n role: inviteRoleSchema,\n inviterUserId: idSchema,\n firstName: z.string().optional(),\n lastName: z.string().optional(),\n sendEmail: z.boolean().optional(),\n })\n .strict();\nexport type CreateInviteInput = z.infer<typeof createInviteInputSchema>;\n\nexport const acceptInviteInputSchema = z\n .object({\n token: z.string().trim().min(1),\n userId: idSchema,\n email: emailSchema,\n })\n .strict();\nexport type AcceptInviteInput = z.infer<typeof acceptInviteInputSchema>;\n"],"mappings":";;;AAGA,MAAa,aAAa,EAAE,KAAK;CAAC;CAAS;CAAS;CAAc;AAAS,CAAC;AAG5E,MAAa,sBAAsB,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC;AAG/D,MAAa,mBAAmB,EAAE,KAAK;CAAC;CAAS;CAAc;AAAS,CAAC;AAGzE,MAAa,qBAAqB,EAC/B,OAAO;CACN,IAAI;CACJ,YAAY,SAAS,SAAS;CAC9B,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,SAAS;CACT,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,gBAAgB,EAC1B,OAAO;CACN,IAAI;CACJ,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,uBAAuB,EACjC,OAAO;CACN,IAAI;CACJ,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,OAAO;CACP,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,eAAe,EACzB,OAAO;CACN,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACN,QAAQ,EAAE,KAAK;EAAC;EAAW;EAAY;EAAY;CAAU,CAAC;CAC9D,WAAW;CACX,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;CACpC,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,6BAA6B,EACvC,OAAO;CACN,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,wBAAwB,EAClC,OAAO;CACN,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,EACrC,OAAO;CACN,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ,oBAAoB,SAAS;AACvC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,EACrC,OAAO;CACN,MAAM,WAAW,SAAS;CAC1B,QAAQ,oBAAoB,SAAS;AACvC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,0BAA0B,EACpC,OAAO;CACN,OAAO;CACP,OAAO;CACP,MAAM;CACN,eAAe;CACf,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;AAClC,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,0BAA0B,EACpC,OAAO;CACN,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC9B,QAAQ;CACR,OAAO;AACT,CAAC,CAAC,CACD,OAAO"}
@@ -10,6 +10,7 @@ declare const eventOutboxSchema: z.ZodObject<{
10
10
  nextAttemptAt: z.ZodCoercedDate<unknown>;
11
11
  lastError: z.ZodNullable<z.ZodString>;
12
12
  createdAt: z.ZodCoercedDate<unknown>;
13
+ updatedAt: z.ZodCoercedDate<unknown>;
13
14
  processedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
14
15
  }, z.core.$strict>;
15
16
  type EventOutbox = z.output<typeof eventOutboxSchema>;
@@ -10,6 +10,7 @@ const eventOutboxSchema = z.object({
10
10
  nextAttemptAt: z.coerce.date(),
11
11
  lastError: z.string().nullable(),
12
12
  createdAt: z.coerce.date(),
13
+ updatedAt: z.coerce.date(),
13
14
  processedAt: z.coerce.date().nullable()
14
15
  }).strict();
15
16
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"outbox.js","names":[],"sources":["../../../src/types/schemas/outbox.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { idSchema, jsonRecordSchema } from \"./shared.js\";\n\nexport const eventOutboxSchema = z.object({\n orgId: idSchema,\n id: idSchema,\n type: z.string(),\n payload: jsonRecordSchema,\n attempts: z.number().int(),\n nextAttemptAt: z.coerce.date(),\n lastError: z.string().nullable(),\n createdAt: z.coerce.date(),\n processedAt: z.coerce.date().nullable(),\n}).strict();\nexport type EventOutbox = z.output<typeof eventOutboxSchema>;\nexport type EventOutboxInput = z.input<typeof eventOutboxSchema>;\n"],"mappings":";;;AAGA,MAAa,oBAAoB,EAAE,OAAO;CACxC,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,SAAS;CACT,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI;CACzB,eAAe,EAAE,OAAO,KAAK;CAC7B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,OAAO,KAAK;CACzB,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;AACxC,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"outbox.js","names":[],"sources":["../../../src/types/schemas/outbox.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonRecordSchema } from './shared.js';\n\nexport const eventOutboxSchema = z\n .object({\n orgId: idSchema,\n id: idSchema,\n type: z.string(),\n payload: jsonRecordSchema,\n attempts: z.number().int(),\n nextAttemptAt: z.coerce.date(),\n lastError: z.string().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n processedAt: z.coerce.date().nullable(),\n })\n .strict();\nexport type EventOutbox = z.output<typeof eventOutboxSchema>;\nexport type EventOutboxInput = z.input<typeof eventOutboxSchema>;\n"],"mappings":";;;AAGA,MAAa,oBAAoB,EAC9B,OAAO;CACN,OAAO;CACP,IAAI;CACJ,MAAM,EAAE,OAAO;CACf,SAAS;CACT,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI;CACzB,eAAe,EAAE,OAAO,KAAK;CAC7B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;CACzB,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;AACxC,CAAC,CAAC,CACD,OAAO"}
@@ -20,6 +20,7 @@ declare const progressRecordSchema: z.ZodObject<{
20
20
  startedAt: z.ZodCoercedDate<unknown>;
21
21
  position: z.ZodNullable<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
22
22
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
23
+ createdAt: z.ZodCoercedDate<unknown>;
23
24
  updatedAt: z.ZodCoercedDate<unknown>;
24
25
  }, z.core.$strict>;
25
26
  type ProgressRecord = z.output<typeof progressRecordSchema>;
@@ -15,6 +15,7 @@ const progressRecordSchema = z.object({
15
15
  startedAt: z.coerce.date(),
16
16
  position: jsonValueSchema.nullable(),
17
17
  completedAt: z.coerce.date().nullable(),
18
+ createdAt: z.coerce.date(),
18
19
  updatedAt: z.coerce.date()
19
20
  }).strict();
20
21
  const progressTargetSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","names":[],"sources":["../../../src/types/schemas/progress.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { idSchema, jsonValueSchema } from \"./shared.js\";\n\nexport const progressTargetTypeSchema = z.enum([\"activity\", \"module\", \"course\"]);\nexport type ProgressTargetType = z.infer<typeof progressTargetTypeSchema>;\n\nexport const progressRecordSchema = z.object({\n id: idSchema,\n orgId: idSchema,\n orgUserId: idSchema,\n targetType: progressTargetTypeSchema,\n targetId: idSchema,\n startedAt: z.coerce.date(),\n position: jsonValueSchema.nullable(),\n completedAt: z.coerce.date().nullable(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type ProgressRecord = z.output<typeof progressRecordSchema>;\nexport type ProgressRecordInput = z.input<typeof progressRecordSchema>;\n\nexport const progressTargetSchema = z.object({\n orgUserId: idSchema,\n targetType: progressTargetTypeSchema,\n targetId: idSchema,\n}).strict();\nexport type ProgressTarget = z.infer<typeof progressTargetSchema>;\n\nexport const progressReportItemSchema = z.object({\n asset: z.string().optional(),\n completed: z.boolean().optional(),\n}).catchall(jsonValueSchema);\nexport type ProgressReportItem = z.infer<typeof progressReportItemSchema>;\n\nexport const reportProgressInputSchema = z.object({\n orgUserId: idSchema,\n activityId: idSchema,\n reports: z.array(progressReportItemSchema),\n}).strict();\nexport type ReportProgressInput = z.infer<typeof reportProgressInputSchema>;\n"],"mappings":";;;AAGA,MAAa,2BAA2B,EAAE,KAAK;CAAC;CAAY;CAAU;AAAQ,CAAC;AAG/E,MAAa,uBAAuB,EAAE,OAAO;CAC3C,IAAI;CACJ,OAAO;CACP,WAAW;CACX,YAAY;CACZ,UAAU;CACV,WAAW,EAAE,OAAO,KAAK;CACzB,UAAU,gBAAgB,SAAS;CACnC,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;CACtC,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO;AAIV,MAAa,uBAAuB,EAAE,OAAO;CAC3C,WAAW;CACX,YAAY;CACZ,UAAU;AACZ,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,2BAA2B,EAAE,OAAO;CAC/C,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;AAClC,CAAC,CAAC,CAAC,SAAS,eAAe;AAG3B,MAAa,4BAA4B,EAAE,OAAO;CAChD,WAAW;CACX,YAAY;CACZ,SAAS,EAAE,MAAM,wBAAwB;AAC3C,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"progress.js","names":[],"sources":["../../../src/types/schemas/progress.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonValueSchema } from './shared.js';\n\nexport const progressTargetTypeSchema = z.enum(['activity', 'module', 'course']);\nexport type ProgressTargetType = z.infer<typeof progressTargetTypeSchema>;\n\nexport const progressRecordSchema = z\n .object({\n id: idSchema,\n orgId: idSchema,\n orgUserId: idSchema,\n targetType: progressTargetTypeSchema,\n targetId: idSchema,\n startedAt: z.coerce.date(),\n position: jsonValueSchema.nullable(),\n completedAt: z.coerce.date().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type ProgressRecord = z.output<typeof progressRecordSchema>;\nexport type ProgressRecordInput = z.input<typeof progressRecordSchema>;\n\nexport const progressTargetSchema = z\n .object({\n orgUserId: idSchema,\n targetType: progressTargetTypeSchema,\n targetId: idSchema,\n })\n .strict();\nexport type ProgressTarget = z.infer<typeof progressTargetSchema>;\n\nexport const progressReportItemSchema = z\n .object({\n asset: z.string().optional(),\n completed: z.boolean().optional(),\n })\n .catchall(jsonValueSchema);\nexport type ProgressReportItem = z.infer<typeof progressReportItemSchema>;\n\nexport const reportProgressInputSchema = z\n .object({\n orgUserId: idSchema,\n activityId: idSchema,\n reports: z.array(progressReportItemSchema),\n })\n .strict();\nexport type ReportProgressInput = z.infer<typeof reportProgressInputSchema>;\n"],"mappings":";;;AAGA,MAAa,2BAA2B,EAAE,KAAK;CAAC;CAAY;CAAU;AAAQ,CAAC;AAG/E,MAAa,uBAAuB,EACjC,OAAO;CACN,IAAI;CACJ,OAAO;CACP,WAAW;CACX,YAAY;CACZ,UAAU;CACV,WAAW,EAAE,OAAO,KAAK;CACzB,UAAU,gBAAgB,SAAS;CACnC,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS;CACtC,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO;AAIV,MAAa,uBAAuB,EACjC,OAAO;CACN,WAAW;CACX,YAAY;CACZ,UAAU;AACZ,CAAC,CAAC,CACD,OAAO;AAGV,MAAa,2BAA2B,EACrC,OAAO;CACN,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;AAClC,CAAC,CAAC,CACD,SAAS,eAAe;AAG3B,MAAa,4BAA4B,EACtC,OAAO;CACN,WAAW;CACX,YAAY;CACZ,SAAS,EAAE,MAAM,wBAAwB;AAC3C,CAAC,CAAC,CACD,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","names":[],"sources":["../../../src/types/schemas/settings.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { idSchema, jsonRecordSchema } from \"./shared.js\";\n\nexport const settingSchema = z.object({\n orgId: idSchema,\n namespace: z.string(),\n scopeId: idSchema,\n value: jsonRecordSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n}).strict();\nexport type Setting = z.output<typeof settingSchema>;\nexport type SettingInput = z.input<typeof settingSchema>;\n"],"mappings":";;;AAGA,MAAa,gBAAgB,EAAE,OAAO;CACpC,OAAO;CACP,WAAW,EAAE,OAAO;CACpB,SAAS;CACT,OAAO;CACP,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"settings.js","names":[],"sources":["../../../src/types/schemas/settings.ts"],"sourcesContent":["import { z } from 'zod';\nimport { idSchema, jsonRecordSchema } from './shared.js';\n\nexport const settingSchema = z\n .object({\n orgId: idSchema,\n namespace: z.string(),\n scopeId: idSchema,\n value: jsonRecordSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n })\n .strict();\nexport type Setting = z.output<typeof settingSchema>;\nexport type SettingInput = z.input<typeof settingSchema>;\n"],"mappings":";;;AAGA,MAAa,gBAAgB,EAC1B,OAAO;CACN,OAAO;CACP,WAAW,EAAE,OAAO;CACpB,SAAS;CACT,OAAO;CACP,WAAW,EAAE,OAAO,KAAK;CACzB,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC,CAAC,CACD,OAAO"}
@@ -2,6 +2,7 @@ import { DomainEvent, EventMetadata, JsonValue } from "../shared.js";
2
2
  import { z } from "zod";
3
3
  //#region src/types/schemas/shared.d.ts
4
4
  declare const idSchema: z.ZodString;
5
+ declare const emailSchema: z.ZodEmail;
5
6
  declare const isoDateStringSchema: z.ZodString;
6
7
  declare const serializableDateSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>, z.ZodString]>;
7
8
  declare const jsonValueSchema: z.ZodType<JsonValue, unknown>;
@@ -9,5 +10,5 @@ declare const jsonRecordSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, un
9
10
  declare const eventMetadataSchema: z.ZodType<EventMetadata>;
10
11
  declare const domainEventSchema: z.ZodType<DomainEvent>;
11
12
  //#endregion
12
- export { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
13
+ export { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
13
14
  //# sourceMappingURL=shared.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  //#region src/types/schemas/shared.ts
3
3
  const idSchema = z.string().trim().min(1);
4
+ const emailSchema = z.email({ pattern: z.regexes.html5Email });
4
5
  const isoDateStringSchema = z.string().trim().min(1);
5
6
  const serializableDateSchema = z.union([z.coerce.date().transform((value) => value.toISOString()), isoDateStringSchema]);
6
7
  const jsonValueSchema = z.lazy(() => z.union([
@@ -11,6 +12,7 @@ const jsonValueSchema = z.lazy(() => z.union([
11
12
  z.array(jsonValueSchema),
12
13
  z.record(z.string(), jsonValueSchema)
13
14
  ]));
15
+ z.globalRegistry.add(jsonValueSchema, { id: "JsonValue" });
14
16
  const jsonRecordSchema = z.record(z.string(), jsonValueSchema);
15
17
  const eventMetadataSchema = z.record(z.string(), jsonValueSchema);
16
18
  const domainEventSchema = z.object({
@@ -23,6 +25,6 @@ const domainEventSchema = z.object({
23
25
  metadata: eventMetadataSchema.optional()
24
26
  }).strict();
25
27
  //#endregion
26
- export { domainEventSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
28
+ export { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
27
29
 
28
30
  //# sourceMappingURL=shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","names":[],"sources":["../../../src/types/schemas/shared.ts"],"sourcesContent":["import { z } from \"zod\";\nimport type { DomainEvent, EventMetadata, JsonValue } from \"../shared.js\";\n\nexport const idSchema: z.ZodString = z.string().trim().min(1);\n\nexport const isoDateStringSchema = z.string().trim().min(1);\n\nexport const serializableDateSchema = z.union([\n z.coerce.date().transform((value) => value.toISOString()),\n isoDateStringSchema,\n]);\n\nexport const jsonValueSchema: z.ZodType<JsonValue, unknown> = z.lazy(() =>\n z.union([\n z.null(),\n z.string(),\n z.number().finite(),\n z.boolean(),\n z.array(jsonValueSchema),\n z.record(z.string(), jsonValueSchema),\n ]),\n);\n\nexport const jsonRecordSchema = z.record(z.string(), jsonValueSchema);\n\nexport const eventMetadataSchema: z.ZodType<EventMetadata> = z.record(z.string(), jsonValueSchema);\n\nexport const domainEventSchema: z.ZodType<DomainEvent> = z.object({\n type: z.string().trim().min(1),\n version: z.number().int().positive(),\n id: idSchema,\n orgId: idSchema,\n occurredAt: isoDateStringSchema,\n data: jsonValueSchema,\n metadata: eventMetadataSchema.optional(),\n}).strict();\n"],"mappings":";;AAGA,MAAa,WAAwB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAE5D,MAAa,sBAAsB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAE1D,MAAa,yBAAyB,EAAE,MAAM,CAC5C,EAAE,OAAO,KAAK,CAAC,CAAC,WAAW,UAAU,MAAM,YAAY,CAAC,GACxD,mBACF,CAAC;AAED,MAAa,kBAAiD,EAAE,WAC9D,EAAE,MAAM;CACN,EAAE,KAAK;CACP,EAAE,OAAO;CACT,EAAE,OAAO,CAAC,CAAC,OAAO;CAClB,EAAE,QAAQ;CACV,EAAE,MAAM,eAAe;CACvB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AACtC,CAAC,CACH;AAEA,MAAa,mBAAmB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AAEpE,MAAa,sBAAgD,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AAEjG,MAAa,oBAA4C,EAAE,OAAO;CAChE,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC7B,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACnC,IAAI;CACJ,OAAO;CACP,YAAY;CACZ,MAAM;CACN,UAAU,oBAAoB,SAAS;AACzC,CAAC,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"shared.js","names":[],"sources":["../../../src/types/schemas/shared.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { DomainEvent, EventMetadata, JsonValue } from '../shared.js';\n\nexport const idSchema: z.ZodString = z.string().trim().min(1);\n\n// The default z.email() pattern uses lookaheads, which RE2-based OpenAPI\n// consumers (Go, linters) reject. The HTML5 pattern is lookahead-free.\nexport const emailSchema: z.ZodEmail = z.email({ pattern: z.regexes.html5Email });\n\nexport const isoDateStringSchema = z.string().trim().min(1);\n\nexport const serializableDateSchema = z.union([\n z.coerce.date().transform((value) => value.toISOString()),\n isoDateStringSchema,\n]);\n\nexport const jsonValueSchema: z.ZodType<JsonValue, unknown> = z.lazy(() =>\n z.union([\n z.null(),\n z.string(),\n z.number().finite(),\n z.boolean(),\n z.array(jsonValueSchema),\n z.record(z.string(), jsonValueSchema),\n ]),\n);\n// Recursive schemas serialize to JSON Schema as a $ref; without a registered\n// id the ref gets an auto-name (\"schema0\") that OpenAPI tooling can't resolve.\nz.globalRegistry.add(jsonValueSchema, { id: 'JsonValue' });\n\nexport const jsonRecordSchema = z.record(z.string(), jsonValueSchema);\n\nexport const eventMetadataSchema: z.ZodType<EventMetadata> = z.record(z.string(), jsonValueSchema);\n\nexport const domainEventSchema: z.ZodType<DomainEvent> = z\n .object({\n type: z.string().trim().min(1),\n version: z.number().int().positive(),\n id: idSchema,\n orgId: idSchema,\n occurredAt: isoDateStringSchema,\n data: jsonValueSchema,\n metadata: eventMetadataSchema.optional(),\n })\n .strict();\n"],"mappings":";;AAGA,MAAa,WAAwB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAI5D,MAAa,cAA0B,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,WAAW,CAAC;AAEhF,MAAa,sBAAsB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAE1D,MAAa,yBAAyB,EAAE,MAAM,CAC5C,EAAE,OAAO,KAAK,CAAC,CAAC,WAAW,UAAU,MAAM,YAAY,CAAC,GACxD,mBACF,CAAC;AAED,MAAa,kBAAiD,EAAE,WAC9D,EAAE,MAAM;CACN,EAAE,KAAK;CACP,EAAE,OAAO;CACT,EAAE,OAAO,CAAC,CAAC,OAAO;CAClB,EAAE,QAAQ;CACV,EAAE,MAAM,eAAe;CACvB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AACtC,CAAC,CACH;AAGA,EAAE,eAAe,IAAI,iBAAiB,EAAE,IAAI,YAAY,CAAC;AAEzD,MAAa,mBAAmB,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AAEpE,MAAa,sBAAgD,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe;AAEjG,MAAa,oBAA4C,EACtD,OAAO;CACN,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;CAC7B,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACnC,IAAI;CACJ,OAAO;CACP,YAAY;CACZ,MAAM;CACN,UAAU,oBAAoB,SAAS;AACzC,CAAC,CAAC,CACD,OAAO"}
@@ -12,7 +12,7 @@ interface DomainEvent<TData = unknown, TType extends string = string, TVersion e
12
12
  readonly data: TData;
13
13
  readonly metadata?: EventMetadata | undefined;
14
14
  }
15
- type ContractNewDomainEvent<E extends DomainEvent = DomainEvent> = Omit<E, "id" | "occurredAt">;
15
+ type ContractNewDomainEvent<E extends DomainEvent = DomainEvent> = Omit<E, 'id' | 'occurredAt'>;
16
16
  type NewDomainEvent<E extends DomainEvent = DomainEvent> = ContractNewDomainEvent<E>;
17
17
  interface Page<T> {
18
18
  rows: T[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@headless-lms/core",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {