@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.
- package/dist/assets/events.d.ts +66 -3
- package/dist/assets/events.js +19 -3
- package/dist/assets/events.js.map +1 -1
- package/dist/assets/service.js +5 -3
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.d.ts +11 -3
- package/dist/automations/actions.js +38 -5
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.d.ts +4 -1
- package/dist/automations/catalog.js +289 -188
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/events.d.ts +46 -24
- package/dist/automations/events.js +5 -5
- package/dist/automations/events.js.map +1 -1
- package/dist/automations/index.d.ts +5 -5
- package/dist/automations/index.js +2 -2
- package/dist/automations/model.d.ts +13 -3
- package/dist/automations/model.js +23 -3
- package/dist/automations/model.js.map +1 -1
- package/dist/automations/ports.d.ts +23 -8
- package/dist/automations/service.d.ts +21 -5
- package/dist/automations/service.js +267 -47
- package/dist/automations/service.js.map +1 -1
- package/dist/automations/types.d.ts +2 -2
- package/dist/automations/webhook-signing.d.ts +7 -0
- package/dist/automations/webhook-signing.js +22 -0
- package/dist/automations/webhook-signing.js.map +1 -0
- package/dist/content/events.d.ts +401 -25
- package/dist/content/events.js +125 -19
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +5 -5
- package/dist/content/index.js +2 -2
- package/dist/content/model.d.ts +2 -2
- package/dist/content/ports.d.ts +42 -11
- package/dist/content/service.d.ts +15 -9
- package/dist/content/service.js +153 -45
- package/dist/content/service.js.map +1 -1
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/events.d.ts +60 -4
- package/dist/discussion/events.js +30 -4
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/model.d.ts +1 -2
- package/dist/discussion/ports.d.ts +1 -1
- package/dist/discussion/service.d.ts +1 -1
- package/dist/discussion/service.js +11 -10
- package/dist/discussion/service.js.map +1 -1
- package/dist/entitlements/events.d.ts +96 -12
- package/dist/entitlements/events.js +21 -4
- package/dist/entitlements/events.js.map +1 -1
- package/dist/entitlements/service.js +1 -0
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/events.d.ts +17 -3
- package/dist/identity/events.js +12 -2
- package/dist/identity/events.js.map +1 -1
- package/dist/identity/ports.d.ts +3 -0
- package/dist/identity/service.d.ts +3 -0
- package/dist/identity/service.js +12 -1
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/events.d.ts +27 -3
- package/dist/integrations/events.js +15 -3
- package/dist/integrations/events.js.map +1 -1
- package/dist/integrations/service.js +1 -1
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/events.d.ts +178 -11
- package/dist/organizations/events.js +52 -9
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +3 -3
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/ports.d.ts +6 -10
- package/dist/organizations/roles.js.map +1 -1
- package/dist/organizations/service.d.ts +9 -4
- package/dist/organizations/service.js +131 -72
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/types.d.ts +2 -2
- package/dist/progress/events.d.ts +34 -2
- package/dist/progress/events.js +15 -2
- package/dist/progress/events.js.map +1 -1
- package/dist/progress/service.d.ts +2 -2
- package/dist/progress/service.js +4 -2
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/courses/index.d.ts +4 -0
- package/dist/reporting/courses/index.js +2 -0
- package/dist/reporting/courses/model.d.ts +24 -0
- package/dist/reporting/courses/model.js +1 -0
- package/dist/reporting/courses/ports.d.ts +13 -0
- package/dist/reporting/courses/ports.js +1 -0
- package/dist/reporting/courses/service.d.ts +19 -0
- package/dist/reporting/courses/service.js +20 -0
- package/dist/reporting/courses/service.js.map +1 -0
- package/dist/reporting/learn/model.d.ts +2 -2
- package/dist/reporting/learn/ports.d.ts +2 -1
- package/dist/reporting/learn/service.d.ts +2 -1
- package/dist/reporting/learn/service.js +5 -0
- package/dist/reporting/learn/service.js.map +1 -1
- package/dist/reporting/students/index.d.ts +2 -2
- package/dist/reporting/students/model.d.ts +21 -1
- package/dist/reporting/students/ports.d.ts +3 -1
- package/dist/reporting/students/service.d.ts +2 -1
- package/dist/reporting/students/service.js +3 -0
- package/dist/reporting/students/service.js.map +1 -1
- package/dist/shared/events.d.ts +5 -3
- package/dist/shared/events.js +1 -0
- package/dist/shared/events.js.map +1 -1
- package/dist/shared/id.d.ts +1 -0
- package/dist/shared/id.js +1 -0
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/mailer.d.ts +2 -0
- package/dist/shared/mailer.js.map +1 -1
- package/dist/shared/settings.js.map +1 -1
- package/dist/types/automations.d.ts +13 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +3 -2
- package/dist/types/email-templates.d.ts +3 -1
- package/dist/types/events.d.ts +3 -3
- package/dist/types/index.d.ts +6 -6
- package/dist/types/organizations.d.ts +2 -2
- package/dist/types/ports.d.ts +1 -1
- package/dist/types/schemas/assets.d.ts +3 -0
- package/dist/types/schemas/assets.js +2 -1
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/automations.d.ts +71 -4
- package/dist/types/schemas/automations.js +35 -4
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +51 -18
- package/dist/types/schemas/content.js +40 -13
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/credentials.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +10 -2
- package/dist/types/schemas/discussion.js +12 -5
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +8 -2
- package/dist/types/schemas/entitlements.js +10 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +4 -4
- package/dist/types/schemas/identity.js +5 -5
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +6 -6
- package/dist/types/schemas/index.js +6 -6
- package/dist/types/schemas/integrations.js.map +1 -1
- package/dist/types/schemas/organizations.d.ts +19 -5
- package/dist/types/schemas/organizations.js +12 -7
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/outbox.d.ts +1 -0
- package/dist/types/schemas/outbox.js +1 -0
- package/dist/types/schemas/outbox.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +1 -0
- package/dist/types/schemas/progress.js +1 -0
- package/dist/types/schemas/progress.js.map +1 -1
- package/dist/types/schemas/settings.js.map +1 -1
- package/dist/types/schemas/shared.d.ts +2 -1
- package/dist/types/schemas/shared.js +3 -1
- package/dist/types/schemas/shared.js.map +1 -1
- package/dist/types/shared.d.ts +1 -1
- 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,
|
|
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,
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbox.js","names":[],"sources":["../../../src/types/schemas/outbox.ts"],"sourcesContent":["import { z } from
|
|
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
|
|
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
|
|
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
|
|
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"}
|
package/dist/types/shared.d.ts
CHANGED
|
@@ -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,
|
|
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[];
|