@headless-lms/core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/events.d.ts +39 -21
- package/dist/assets/events.js +1 -1
- package/dist/assets/events.js.map +1 -1
- package/dist/assets/file-urls.d.ts +20 -0
- package/dist/assets/file-urls.js +25 -0
- package/dist/assets/file-urls.js.map +1 -0
- package/dist/assets/index.d.ts +5 -4
- package/dist/assets/index.js +3 -2
- package/dist/assets/model.d.ts +2 -2
- package/dist/assets/ports.d.ts +45 -15
- package/dist/assets/service.d.ts +39 -7
- package/dist/assets/service.js +291 -38
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.d.ts +13 -24
- package/dist/automations/actions.js +168 -43
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.d.ts +2 -1
- package/dist/automations/catalog.js +229 -13
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.d.ts +14 -0
- package/dist/automations/community-derivations.js +439 -0
- package/dist/automations/community-derivations.js.map +1 -0
- package/dist/automations/community-mail.d.ts +112 -0
- package/dist/automations/community-mail.js +90 -0
- package/dist/automations/community-mail.js.map +1 -0
- package/dist/automations/community-notifications.d.ts +16 -0
- package/dist/automations/community-notifications.js +84 -0
- package/dist/automations/community-notifications.js.map +1 -0
- package/dist/automations/events.d.ts +28 -0
- package/dist/automations/index.d.ts +4 -2
- package/dist/automations/index.js +3 -2
- package/dist/automations/model.d.ts +10 -3
- package/dist/automations/model.js +15 -2
- package/dist/automations/model.js.map +1 -1
- package/dist/automations/ports.d.ts +5 -1
- package/dist/automations/schedule.d.ts +6 -0
- package/dist/automations/schedule.js +41 -0
- package/dist/automations/schedule.js.map +1 -0
- package/dist/automations/seeds.d.ts +17 -0
- package/dist/automations/seeds.js +235 -0
- package/dist/automations/seeds.js.map +1 -0
- package/dist/automations/service.d.ts +22 -3
- package/dist/automations/service.js +306 -43
- package/dist/automations/service.js.map +1 -1
- package/dist/content/events.d.ts +631 -19
- package/dist/content/events.js +44 -1
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +4 -4
- package/dist/content/model.d.ts +2 -2
- package/dist/content/ports.d.ts +71 -18
- package/dist/content/service.d.ts +57 -18
- package/dist/content/service.js +502 -23
- package/dist/content/service.js.map +1 -1
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/authors.d.ts +10 -0
- package/dist/discussion/authors.js +23 -0
- package/dist/discussion/authors.js.map +1 -0
- package/dist/discussion/chats.d.ts +104 -0
- package/dist/discussion/chats.js +798 -0
- package/dist/discussion/chats.js.map +1 -0
- package/dist/discussion/events.d.ts +619 -56
- package/dist/discussion/events.js +106 -3
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +7 -3
- package/dist/discussion/index.js +4 -1
- package/dist/discussion/ports.d.ts +288 -27
- package/dist/discussion/ports.js +6 -1
- package/dist/discussion/ports.js.map +1 -0
- package/dist/discussion/posts.d.ts +103 -0
- package/dist/discussion/posts.js +723 -0
- package/dist/discussion/posts.js.map +1 -0
- package/dist/discussion/service.d.ts +32 -10
- package/dist/discussion/service.js +293 -78
- package/dist/discussion/service.js.map +1 -1
- package/dist/entitlements/events.d.ts +178 -11
- package/dist/entitlements/events.js +28 -1
- package/dist/entitlements/events.js.map +1 -1
- package/dist/entitlements/index.d.ts +5 -4
- package/dist/entitlements/index.js +2 -1
- package/dist/entitlements/model.d.ts +3 -2
- package/dist/entitlements/ports.d.ts +124 -11
- package/dist/entitlements/rules.d.ts +12 -0
- package/dist/entitlements/rules.js +17 -0
- package/dist/entitlements/rules.js.map +1 -0
- package/dist/entitlements/service.d.ts +54 -3
- package/dist/entitlements/service.js +472 -2
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/access.d.ts +6 -0
- package/dist/identity/access.js +7 -0
- package/dist/identity/access.js.map +1 -0
- package/dist/identity/index.d.ts +6 -4
- package/dist/identity/index.js +3 -1
- package/dist/identity/model.d.ts +2 -1
- package/dist/identity/notifications.d.ts +27 -0
- package/dist/identity/notifications.js +101 -0
- package/dist/identity/notifications.js.map +1 -0
- package/dist/identity/ports.d.ts +73 -3
- package/dist/identity/service.d.ts +14 -3
- package/dist/identity/service.js +62 -5
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/model.js +1 -1
- package/dist/integrations/model.js.map +1 -1
- package/dist/integrations/service.js +2 -2
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/access-scopes.d.ts +19 -0
- package/dist/organizations/access-scopes.js +89 -0
- package/dist/organizations/access-scopes.js.map +1 -0
- package/dist/organizations/events.d.ts +74 -32
- package/dist/organizations/events.js +6 -0
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +7 -6
- package/dist/organizations/index.js +4 -3
- package/dist/organizations/members.d.ts +8 -5
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/ports.d.ts +14 -11
- package/dist/organizations/roles.d.ts +6 -10
- package/dist/organizations/roles.js +19 -7
- package/dist/organizations/roles.js.map +1 -1
- package/dist/organizations/service.d.ts +20 -11
- package/dist/organizations/service.js +157 -47
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/types.d.ts +1 -10
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/ports.d.ts +6 -1
- package/dist/progress/service.d.ts +3 -1
- package/dist/progress/service.js +6 -2
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/admin/index.d.ts +4 -0
- package/dist/reporting/admin/index.js +2 -0
- package/dist/reporting/admin/model.d.ts +108 -0
- package/dist/reporting/admin/ports.d.ts +27 -0
- package/dist/reporting/admin/service.d.ts +22 -0
- package/dist/reporting/admin/service.js +38 -0
- package/dist/reporting/admin/service.js.map +1 -0
- package/dist/reporting/member/index.d.ts +5 -0
- package/dist/reporting/member/index.js +2 -0
- package/dist/reporting/member/model.d.ts +124 -0
- package/dist/reporting/member/ports.d.ts +45 -0
- package/dist/reporting/member/service.d.ts +73 -0
- package/dist/reporting/member/service.js +286 -0
- package/dist/reporting/member/service.js.map +1 -0
- package/dist/shared/actor.d.ts +9 -0
- package/dist/shared/errors.d.ts +7 -1
- package/dist/shared/errors.js +10 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +11 -0
- package/dist/shared/id.js +12 -1
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/mailer.d.ts +4 -1
- package/dist/shared/mailer.js.map +1 -1
- package/dist/shared/network.d.ts +10 -0
- package/dist/shared/network.js +211 -0
- package/dist/shared/network.js.map +1 -0
- package/dist/types/assets.d.ts +2 -2
- package/dist/types/automations.d.ts +10 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +11 -3
- package/dist/types/email-templates.d.ts +121 -0
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/identity.d.ts +48 -2
- package/dist/types/index.d.ts +9 -9
- package/dist/types/ports.d.ts +6 -0
- package/dist/types/schemas/assets.d.ts +65 -37
- package/dist/types/schemas/assets.js +17 -12
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/automations.d.ts +18 -1
- package/dist/types/schemas/automations.js +15 -6
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +335 -3
- package/dist/types/schemas/content.js +139 -3
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +370 -3
- package/dist/types/schemas/discussion.js +199 -4
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +36 -2
- package/dist/types/schemas/entitlements.js +23 -1
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +111 -1
- package/dist/types/schemas/identity.js +55 -2
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +8 -8
- package/dist/types/schemas/index.js +8 -8
- package/dist/types/schemas/organizations.d.ts +8 -0
- package/dist/types/schemas/organizations.js +2 -0
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/shared.d.ts +3 -1
- package/dist/types/schemas/shared.js +5 -1
- package/dist/types/schemas/shared.js.map +1 -1
- package/package.json +2 -2
- package/dist/reporting/courses/index.d.ts +0 -4
- package/dist/reporting/courses/index.js +0 -2
- package/dist/reporting/courses/model.d.ts +0 -24
- package/dist/reporting/courses/ports.d.ts +0 -13
- package/dist/reporting/courses/service.d.ts +0 -19
- package/dist/reporting/courses/service.js +0 -20
- package/dist/reporting/courses/service.js.map +0 -1
- package/dist/reporting/dashboard/index.d.ts +0 -4
- package/dist/reporting/dashboard/index.js +0 -2
- package/dist/reporting/dashboard/model.d.ts +0 -14
- package/dist/reporting/dashboard/ports.d.ts +0 -13
- package/dist/reporting/dashboard/service.d.ts +0 -19
- package/dist/reporting/dashboard/service.js +0 -20
- package/dist/reporting/dashboard/service.js.map +0 -1
- package/dist/reporting/learn/index.d.ts +0 -5
- package/dist/reporting/learn/index.js +0 -2
- package/dist/reporting/learn/model.d.ts +0 -23
- package/dist/reporting/learn/ports.d.ts +0 -43
- package/dist/reporting/learn/ports.js +0 -1
- package/dist/reporting/learn/service.d.ts +0 -49
- package/dist/reporting/learn/service.js +0 -116
- package/dist/reporting/learn/service.js.map +0 -1
- package/dist/reporting/students/index.d.ts +0 -4
- package/dist/reporting/students/index.js +0 -2
- package/dist/reporting/students/model.d.ts +0 -51
- package/dist/reporting/students/model.js +0 -1
- package/dist/reporting/students/ports.d.ts +0 -15
- package/dist/reporting/students/ports.js +0 -1
- package/dist/reporting/students/service.d.ts +0 -20
- package/dist/reporting/students/service.js +0 -23
- package/dist/reporting/students/service.js.map +0 -1
- /package/dist/reporting/{courses → admin}/model.js +0 -0
- /package/dist/reporting/{courses → admin}/ports.js +0 -0
- /package/dist/reporting/{dashboard → member}/model.js +0 -0
- /package/dist/reporting/{dashboard → member}/ports.js +0 -0
- /package/dist/{reporting/learn/model.js → shared/actor.js} +0 -0
|
@@ -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";
|
|
2
|
-
import { CreateUserInput, ProvisionUserInput, UpdateUserInput, User, UserInput, createUserInputSchema, provisionUserInputSchema, updateUserInputSchema, userSchema } from "./identity.js";
|
|
1
|
+
import { Activity, ActivityAsset, ActivityAssetInput, ActivityInput, ActivitySettings, ActivityView, AddDownloadAssetInput, AddSpaceLinkInput, Bundle, BundleInput, BundleItem, BundleItemInput, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DmSettings, Download, DownloadAsset, DownloadAssetInput, DownloadFile, DownloadInput, DownloadStatus, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, ModuleInput, PatchDmSettingsInput, ReorderDownloadAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput, activityAssetSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addSpaceLinkInputSchema, bundleItemSchema, bundleSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createSpaceInputSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema } from "./content.js";
|
|
2
|
+
import { CreateUserInput, Notification, NotificationKind, NotificationPreference, ProvisionUserInput, UpdateUserInput, User, UserInput, UserProfile, UserProfileView, createUserInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, provisionUserInputSchema, updateUserInputSchema, userProfileSchema, userProfileViewSchema, userSchema } from "./identity.js";
|
|
3
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
|
-
import { Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, GrantEntitlementInput, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema } from "./entitlements.js";
|
|
4
|
+
import { Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, GrantEntitlementInput, SpaceMember, SpaceMemberSource, SpaceMemberStatus, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema } from "./entitlements.js";
|
|
5
5
|
import { ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ReportProgressInput, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, reportProgressInputSchema } from "./progress.js";
|
|
6
|
-
import { Asset, AssetInput, AssetKind, AssetStatus,
|
|
6
|
+
import { Asset, AssetInput, AssetKind, AssetSource, AssetStatus, AssetUrls, AssetView, AssetsQuery, RequestUploadInput, UploadTicket, assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, 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, 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";
|
|
8
|
+
import { Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationSource, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableActions, AvailableTriggers, CreateAutomationInput, CreateWebhookInput, CreatedWebhook, DeliverWebhookInput, MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, UpdateAutomationInput, UpdateWebhookInput, Webhook, WebhookSecret, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationSourceSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema } from "./automations.js";
|
|
9
|
+
import { ActivityCommentsRule, BlockedUser, Chat, ChatKind, ChatLastMessage, ChatStatus, ChatUser, Comment, CommentAuthor, CommentFlagResolution, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, FlaggedComment, ListCommentsQuery, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Post, PostBookmark, PostFlag, PostFlagResolution, PostFollow, PostReaction, PostStatus, PostView, ReactionCounts, ReactionEmoji, activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, flaggedCommentSchema, listCommentsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
|
|
10
10
|
import { Credential, CredentialInput, credentialSchema } from "./credentials.js";
|
|
11
|
-
import { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
|
|
11
|
+
import { boundedJsonSchema, 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, 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,
|
|
14
|
+
export { AcceptInviteInput, Activity, ActivityAsset, ActivityAssetInput, ActivityCommentsRule, ActivityInput, ActivitySettings, ActivityView, AddDownloadAssetInput, AddOrgUserInput, AddSpaceLinkInput, Asset, AssetInput, AssetKind, AssetSource, AssetStatus, AssetUrls, AssetView, AssetsQuery, Automation, AutomationAction, AutomationActionResult, AutomationInput, AutomationKind, AutomationRun, AutomationRunInput, AutomationRunStatus, AutomationRunsQuery, AutomationSource, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableActions, AvailableTriggers, BlockedUser, Bundle, BundleInput, BundleItem, BundleItemInput, Chat, ChatKind, ChatLastMessage, ChatStatus, ChatUser, Comment, CommentAuthor, CommentFlagResolution, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, Community, CommunitySettings, CommunityStatus, CommunityView, ConfigureInput, ConnectInput, Connection, ConnectionInput, ContentItem, ContentItemInput, ContentType, Course, CourseSettings, CourseStatus, CourseView, CreateAutomationInput, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateInviteInput, CreateOrgUserInput, CreateSpaceInput, CreateUserInput, CreateWebhookInput, CreatedWebhook, Credential, CredentialInput, DeliverWebhookInput, DmSettings, Download, DownloadAsset, DownloadAssetInput, DownloadFile, DownloadInput, DownloadStatus, DownloadView, Entitlement, EntitlementInput, EntitlementStatus, EntitlementsQuery, EventOutbox, EventOutboxInput, FlaggedComment, GrantEntitlementInput, Invite, InviteInput, InviteRole, ListBundlesQuery, ListCommentsQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Module, ModuleInput, NewOrganizationInput, Notification, NotificationKind, NotificationPreference, OrgUser, OrgUserInput, OrgUserProfile, OrgUserStatus, Organization, OrganizationInput, PatchDmSettingsInput, Post, PostBookmark, PostFlag, PostFlagResolution, PostFollow, PostReaction, PostStatus, PostView, ProgressRecord, ProgressRecordInput, ProgressReportItem, ProgressTarget, ProgressTargetType, ProvisionUserInput, ReactionCounts, ReactionEmoji, ReorderDownloadAssetsInput, ReportProgressInput, RequestUploadInput, Role, SaveActivityInput, SetSpaceTopicsInput, Setting, SettingInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceMember, SpaceMemberSource, SpaceMemberStatus, SpaceSettings, SpaceTopic, UpdateAutomationInput, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateOrgUserInput, UpdateSpaceInput, UpdateUserInput, UpdateWebhookInput, UploadTicket, User, UserInput, UserProfile, UserProfileView, Validation, Webhook, WebhookSecret, acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, addSpaceLinkInputSchema, assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationSourceSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, blockedUserSchema, boundedJsonSchema, bundleItemSchema, bundleSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createAutomationInputSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createSpaceInputSchema, createUserInputSchema, createWebhookInputSchema, createdWebhookSchema, credentialSchema, deliverWebhookInputSchema, dmSettingsDefaults, dmSettingsSchema, domainEventSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, emailSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, flaggedCommentSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listBundlesQuerySchema, listCommentsQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, moduleSchema, newOrganizationInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, patchDmSettingsInputSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, setSpaceTopicsInputSchema, settingSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateAutomationInputSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateOrgUserInputSchema, updateSpaceInputSchema, updateUserInputSchema, updateWebhookInputSchema, uploadTicketSchema, userProfileSchema, userProfileViewSchema, userSchema, validationSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
|
|
2
|
-
import { createUserInputSchema, provisionUserInputSchema, updateUserInputSchema, userSchema } from "./identity.js";
|
|
1
|
+
import { boundedJsonSchema, domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema } from "./shared.js";
|
|
2
|
+
import { createUserInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, provisionUserInputSchema, updateUserInputSchema, userProfileSchema, userProfileViewSchema, userSchema } from "./identity.js";
|
|
3
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 {
|
|
6
|
-
import {
|
|
4
|
+
import { activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, flaggedCommentSchema, listCommentsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema } from "./discussion.js";
|
|
5
|
+
import { assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, requestUploadInputSchema, uploadTicketSchema } from "./assets.js";
|
|
6
|
+
import { activityAssetSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addSpaceLinkInputSchema, bundleItemSchema, bundleSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createSpaceInputSchema, dmSettingsDefaults, dmSettingsSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, listBundlesQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, moduleSchema, patchDmSettingsInputSchema, reorderDownloadAssetsInputSchema, saveActivityInputSchema, setSpaceTopicsInputSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateSpaceInputSchema } from "./content.js";
|
|
7
|
+
import { entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, grantEntitlementInputSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema } from "./entitlements.js";
|
|
7
8
|
import { progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, reportProgressInputSchema } from "./progress.js";
|
|
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, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, createAutomationInputSchema, createWebhookInputSchema, createdWebhookSchema, deliverWebhookInputSchema, updateAutomationInputSchema, updateWebhookInputSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema } from "./automations.js";
|
|
10
|
+
import { MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationSourceSchema, 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, 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,
|
|
14
|
+
export { MAX_AUTOMATION_ACTIONS, MAX_AUTOMATION_TRIGGERS, MAX_WEBHOOK_EVENTS, acceptInviteInputSchema, activityAssetSchema, activityCommentsRuleSchema, activitySchema, activitySettingsSchema, activityViewSchema, addDownloadAssetInputSchema, addOrgUserInputSchema, addSpaceLinkInputSchema, assetKindSchema, assetSchema, assetSourceSchema, assetStatusSchema, assetUrlsSchema, assetViewSchema, assetsQuerySchema, automationActionResultSchema, automationActionSchema, automationKindSchema, automationRunSchema, automationRunStatusSchema, automationRunsQuerySchema, automationSchema, automationSourceSchema, automationTriggerSchema, automationTriggersSchema, automationsQuerySchema, availableActionSchema, availableTriggersSchema, blockedUserSchema, boundedJsonSchema, bundleItemSchema, bundleSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, communitySchema, communitySettingsDefaults, communitySettingsSchema, communityStatusSchema, communityViewSchema, configureInputSchema, connectInputSchema, connectionSchema, contentItemSchema, contentTypeSchema, courseSchema, courseSettingsDefaults, courseSettingsSchema, courseStatusSchema, courseViewSchema, createAutomationInputSchema, createBundleInputSchema, createCommunityInputSchema, createCourseInputSchema, createDownloadInputSchema, createInviteInputSchema, createOrgUserInputSchema, createSpaceInputSchema, createUserInputSchema, createWebhookInputSchema, createdWebhookSchema, credentialSchema, deliverWebhookInputSchema, dmSettingsDefaults, dmSettingsSchema, domainEventSchema, downloadAssetSchema, downloadFileSchema, downloadSchema, downloadStatusSchema, downloadViewSchema, emailSchema, entitlementSchema, entitlementStatusSchema, entitlementsQuerySchema, eventMetadataSchema, eventOutboxSchema, flaggedCommentSchema, grantEntitlementInputSchema, idSchema, inviteRoleSchema, inviteSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, listBundlesQuerySchema, listCommentsQuerySchema, listCommunitiesQuerySchema, listCoursesQuerySchema, listDownloadsQuerySchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, moduleSchema, newOrganizationInputSchema, notificationKindSchema, notificationPreferenceSchema, notificationSchema, orgUserProfileSchema, orgUserSchema, orgUserStatusSchema, organizationSchema, patchDmSettingsInputSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postFollowSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, progressRecordSchema, progressReportItemSchema, progressTargetSchema, progressTargetTypeSchema, provisionUserInputSchema, reactionCountsSchema, reactionEmojiSchema, reorderDownloadAssetsInputSchema, reportProgressInputSchema, requestUploadInputSchema, roleSchema, saveActivityInputSchema, serializableDateSchema, setSpaceTopicsInputSchema, settingSchema, spaceAccessRuleSchema, spaceDetailSchema, spaceLinkSchema, spaceMemberSchema, spaceMemberSourceSchema, spaceMemberStatusSchema, spaceSchema, spaceSettingsDefaults, spaceSettingsSchema, spaceTopicSchema, updateAutomationInputSchema, updateBundleInputSchema, updateCommunityInputSchema, updateCourseInputSchema, updateDownloadInputSchema, updateOrgUserInputSchema, updateSpaceInputSchema, updateUserInputSchema, updateWebhookInputSchema, uploadTicketSchema, userProfileSchema, userProfileViewSchema, userSchema, validationSchema, webhookSchema, webhookSecretSchema, webhookUrlSchema };
|
|
@@ -4,6 +4,7 @@ declare const roleSchema: z.ZodEnum<{
|
|
|
4
4
|
owner: "owner";
|
|
5
5
|
admin: "admin";
|
|
6
6
|
instructor: "instructor";
|
|
7
|
+
moderator: "moderator";
|
|
7
8
|
student: "student";
|
|
8
9
|
}>;
|
|
9
10
|
type Role = z.infer<typeof roleSchema>;
|
|
@@ -15,6 +16,7 @@ type OrgUserStatus = z.infer<typeof orgUserStatusSchema>;
|
|
|
15
16
|
declare const inviteRoleSchema: z.ZodEnum<{
|
|
16
17
|
admin: "admin";
|
|
17
18
|
instructor: "instructor";
|
|
19
|
+
moderator: "moderator";
|
|
18
20
|
student: "student";
|
|
19
21
|
}>;
|
|
20
22
|
type InviteRole = z.infer<typeof inviteRoleSchema>;
|
|
@@ -37,6 +39,7 @@ declare const orgUserSchema: z.ZodObject<{
|
|
|
37
39
|
owner: "owner";
|
|
38
40
|
admin: "admin";
|
|
39
41
|
instructor: "instructor";
|
|
42
|
+
moderator: "moderator";
|
|
40
43
|
student: "student";
|
|
41
44
|
}>;
|
|
42
45
|
status: z.ZodEnum<{
|
|
@@ -63,6 +66,7 @@ declare const inviteSchema: z.ZodObject<{
|
|
|
63
66
|
role: z.ZodEnum<{
|
|
64
67
|
admin: "admin";
|
|
65
68
|
instructor: "instructor";
|
|
69
|
+
moderator: "moderator";
|
|
66
70
|
student: "student";
|
|
67
71
|
}>;
|
|
68
72
|
status: z.ZodEnum<{
|
|
@@ -92,6 +96,7 @@ declare const addOrgUserInputSchema: z.ZodObject<{
|
|
|
92
96
|
owner: "owner";
|
|
93
97
|
admin: "admin";
|
|
94
98
|
instructor: "instructor";
|
|
99
|
+
moderator: "moderator";
|
|
95
100
|
student: "student";
|
|
96
101
|
}>;
|
|
97
102
|
}, z.core.$strict>;
|
|
@@ -103,6 +108,7 @@ declare const createOrgUserInputSchema: z.ZodObject<{
|
|
|
103
108
|
owner: "owner";
|
|
104
109
|
admin: "admin";
|
|
105
110
|
instructor: "instructor";
|
|
111
|
+
moderator: "moderator";
|
|
106
112
|
student: "student";
|
|
107
113
|
}>;
|
|
108
114
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -116,6 +122,7 @@ declare const updateOrgUserInputSchema: z.ZodObject<{
|
|
|
116
122
|
owner: "owner";
|
|
117
123
|
admin: "admin";
|
|
118
124
|
instructor: "instructor";
|
|
125
|
+
moderator: "moderator";
|
|
119
126
|
student: "student";
|
|
120
127
|
}>>;
|
|
121
128
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -130,6 +137,7 @@ declare const createInviteInputSchema: z.ZodObject<{
|
|
|
130
137
|
role: z.ZodEnum<{
|
|
131
138
|
admin: "admin";
|
|
132
139
|
instructor: "instructor";
|
|
140
|
+
moderator: "moderator";
|
|
133
141
|
student: "student";
|
|
134
142
|
}>;
|
|
135
143
|
inviterUserId: z.ZodString;
|
|
@@ -5,12 +5,14 @@ const roleSchema = z.enum([
|
|
|
5
5
|
"owner",
|
|
6
6
|
"admin",
|
|
7
7
|
"instructor",
|
|
8
|
+
"moderator",
|
|
8
9
|
"student"
|
|
9
10
|
]);
|
|
10
11
|
const orgUserStatusSchema = z.enum(["invited", "active"]);
|
|
11
12
|
const inviteRoleSchema = z.enum([
|
|
12
13
|
"admin",
|
|
13
14
|
"instructor",
|
|
15
|
+
"moderator",
|
|
14
16
|
"student"
|
|
15
17
|
]);
|
|
16
18
|
const organizationSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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', 'moderator', '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', 'moderator', '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;CAAa;AAAS,CAAC;AAGzF,MAAa,sBAAsB,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC;AAG/D,MAAa,mBAAmB,EAAE,KAAK;CAAC;CAAS;CAAc;CAAa;AAAS,CAAC;AAGtF,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"}
|
|
@@ -7,8 +7,10 @@ declare const isoDateStringSchema: z.ZodString;
|
|
|
7
7
|
declare const serializableDateSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>, z.ZodString]>;
|
|
8
8
|
declare const jsonValueSchema: z.ZodType<JsonValue, unknown>;
|
|
9
9
|
declare const jsonRecordSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
10
|
+
/** Free-form JSON whose serialized form fits in `maxBytes` of UTF-8. */
|
|
11
|
+
declare function boundedJsonSchema(maxBytes: number): z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
10
12
|
declare const eventMetadataSchema: z.ZodType<EventMetadata>;
|
|
11
13
|
declare const domainEventSchema: z.ZodType<DomainEvent>;
|
|
12
14
|
//#endregion
|
|
13
|
-
export { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
15
|
+
export { boundedJsonSchema, domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
14
16
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -14,6 +14,10 @@ const jsonValueSchema = z.lazy(() => z.union([
|
|
|
14
14
|
]));
|
|
15
15
|
z.globalRegistry.add(jsonValueSchema, { id: "JsonValue" });
|
|
16
16
|
const jsonRecordSchema = z.record(z.string(), jsonValueSchema);
|
|
17
|
+
/** Free-form JSON whose serialized form fits in `maxBytes` of UTF-8. */
|
|
18
|
+
function boundedJsonSchema(maxBytes) {
|
|
19
|
+
return jsonValueSchema.refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= maxBytes, { message: `must be at most ${Math.floor(maxBytes / 1024)} KB once serialized` }).describe(`Free-form JSON, at most ${Math.floor(maxBytes / 1024)} KB once serialized`);
|
|
20
|
+
}
|
|
17
21
|
const eventMetadataSchema = z.record(z.string(), jsonValueSchema);
|
|
18
22
|
const domainEventSchema = z.object({
|
|
19
23
|
type: z.string().trim().min(1),
|
|
@@ -25,6 +29,6 @@ const domainEventSchema = z.object({
|
|
|
25
29
|
metadata: eventMetadataSchema.optional()
|
|
26
30
|
}).strict();
|
|
27
31
|
//#endregion
|
|
28
|
-
export { domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
32
|
+
export { boundedJsonSchema, domainEventSchema, emailSchema, eventMetadataSchema, idSchema, isoDateStringSchema, jsonRecordSchema, jsonValueSchema, serializableDateSchema };
|
|
29
33
|
|
|
30
34
|
//# 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\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;
|
|
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\n/** Free-form JSON whose serialized form fits in `maxBytes` of UTF-8. */\nexport function boundedJsonSchema(maxBytes: number) {\n return jsonValueSchema\n .refine((value) => new TextEncoder().encode(JSON.stringify(value)).length <= maxBytes, {\n message: `must be at most ${Math.floor(maxBytes / 1024)} KB once serialized`,\n })\n .describe(`Free-form JSON, at most ${Math.floor(maxBytes / 1024)} KB once serialized`);\n}\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;;AAGpE,SAAgB,kBAAkB,UAAkB;CAClD,OAAO,gBACJ,QAAQ,UAAU,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK,UAAU,KAAK,CAAC,CAAC,CAAC,UAAU,UAAU,EACrF,SAAS,mBAAmB,KAAK,MAAM,WAAW,IAAI,EAAE,qBAC1D,CAAC,CAAC,CACD,SAAS,2BAA2B,KAAK,MAAM,WAAW,IAAI,EAAE,oBAAoB;AACzF;AAEA,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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-lms/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"ksuid": "^3.0.0",
|
|
33
|
-
"zod": "4.
|
|
33
|
+
"zod": "4.6.7"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^22.10.2",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CourseActivityEngagement, CourseAnalytics, CourseEnrollmentPoint } from "./model.js";
|
|
2
|
-
import { CoursesReportRepository, CoursesReportService } from "./ports.js";
|
|
3
|
-
import { CoursesReportServiceImpl } from "./service.js";
|
|
4
|
-
export { type CourseActivityEngagement, type CourseAnalytics, type CourseEnrollmentPoint, type CoursesReportRepository, type CoursesReportService, CoursesReportServiceImpl };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//#region src/reporting/courses/model.d.ts
|
|
2
|
-
interface CourseActivityEngagement {
|
|
3
|
-
activityId: string;
|
|
4
|
-
title: string;
|
|
5
|
-
moduleId: string;
|
|
6
|
-
moduleTitle: string;
|
|
7
|
-
started: number;
|
|
8
|
-
completed: number;
|
|
9
|
-
}
|
|
10
|
-
interface CourseAnalytics {
|
|
11
|
-
enrolled: number;
|
|
12
|
-
started: number;
|
|
13
|
-
completed: number;
|
|
14
|
-
/** Mean of each cohort member's completed-activities percentage (0–100). */
|
|
15
|
-
avgProgress: number;
|
|
16
|
-
activities: CourseActivityEngagement[];
|
|
17
|
-
}
|
|
18
|
-
interface CourseEnrollmentPoint {
|
|
19
|
-
date: string;
|
|
20
|
-
count: number;
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { CourseActivityEngagement, CourseAnalytics, CourseEnrollmentPoint };
|
|
24
|
-
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CourseAnalytics, CourseEnrollmentPoint } from "./model.js";
|
|
2
|
-
//#region src/reporting/courses/ports.d.ts
|
|
3
|
-
interface CoursesReportService {
|
|
4
|
-
analytics(orgId: string, courseId: string): Promise<CourseAnalytics | null>;
|
|
5
|
-
enrollments(orgId: string, courseId: string, days: number): Promise<CourseEnrollmentPoint[] | null>;
|
|
6
|
-
}
|
|
7
|
-
interface CoursesReportRepository {
|
|
8
|
-
analytics(orgId: string, courseId: string): Promise<CourseAnalytics | null>;
|
|
9
|
-
enrollments(orgId: string, courseId: string, days: number): Promise<CourseEnrollmentPoint[] | null>;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { CoursesReportRepository, CoursesReportService };
|
|
13
|
-
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Logger } from "../../types/ports.js";
|
|
2
|
-
import "../../shared/ports.js";
|
|
3
|
-
import { CourseAnalytics, CourseEnrollmentPoint } from "./model.js";
|
|
4
|
-
import { CoursesReportRepository, CoursesReportService } from "./ports.js";
|
|
5
|
-
//#region src/reporting/courses/service.d.ts
|
|
6
|
-
type CoursesReportServiceParams = {
|
|
7
|
-
repo: CoursesReportRepository;
|
|
8
|
-
logger?: Logger;
|
|
9
|
-
};
|
|
10
|
-
declare class CoursesReportServiceImpl implements CoursesReportService {
|
|
11
|
-
private readonly repo;
|
|
12
|
-
private readonly logger;
|
|
13
|
-
constructor(params: CoursesReportServiceParams);
|
|
14
|
-
analytics(orgId: string, courseId: string): Promise<CourseAnalytics | null>;
|
|
15
|
-
enrollments(orgId: string, courseId: string, days: number): Promise<CourseEnrollmentPoint[] | null>;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { CoursesReportServiceImpl, CoursesReportServiceParams };
|
|
19
|
-
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { noopLogger } from "../../shared/logger.js";
|
|
2
|
-
//#region src/reporting/courses/service.ts
|
|
3
|
-
var CoursesReportServiceImpl = class {
|
|
4
|
-
repo;
|
|
5
|
-
logger;
|
|
6
|
-
constructor(params) {
|
|
7
|
-
this.repo = params.repo;
|
|
8
|
-
this.logger = params.logger ?? noopLogger;
|
|
9
|
-
}
|
|
10
|
-
analytics(orgId, courseId) {
|
|
11
|
-
return this.repo.analytics(orgId, courseId);
|
|
12
|
-
}
|
|
13
|
-
enrollments(orgId, courseId, days) {
|
|
14
|
-
return this.repo.enrollments(orgId, courseId, days);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { CoursesReportServiceImpl };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","names":[],"sources":["../../../src/reporting/courses/service.ts"],"sourcesContent":["// reporting/courses — service implementation (inbound port).\nimport type { CourseAnalytics, CourseEnrollmentPoint } from './model.js';\nimport type { CoursesReportRepository, CoursesReportService } from './ports.js';\nimport type { Logger } from '../../shared/ports.js';\nimport { noopLogger } from '../../shared/logger.js';\n\nexport type CoursesReportServiceParams = {\n repo: CoursesReportRepository;\n logger?: Logger;\n};\n\nexport class CoursesReportServiceImpl implements CoursesReportService {\n private readonly repo: CoursesReportRepository;\n private readonly logger: Logger;\n\n constructor(params: CoursesReportServiceParams) {\n this.repo = params.repo;\n this.logger = params.logger ?? noopLogger;\n }\n\n analytics(orgId: string, courseId: string): Promise<CourseAnalytics | null> {\n return this.repo.analytics(orgId, courseId);\n }\n\n enrollments(\n orgId: string,\n courseId: string,\n days: number,\n ): Promise<CourseEnrollmentPoint[] | null> {\n return this.repo.enrollments(orgId, courseId, days);\n }\n}\n"],"mappings":";;AAWA,IAAa,2BAAb,MAAsE;CACpE;CACA;CAEA,YAAY,QAAoC;EAC9C,KAAK,OAAO,OAAO;EACnB,KAAK,SAAS,OAAO,UAAU;CACjC;CAEA,UAAU,OAAe,UAAmD;EAC1E,OAAO,KAAK,KAAK,UAAU,OAAO,QAAQ;CAC5C;CAEA,YACE,OACA,UACA,MACyC;EACzC,OAAO,KAAK,KAAK,YAAY,OAAO,UAAU,IAAI;CACpD;AACF"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EnrollmentPoint, OverviewStats } from "./model.js";
|
|
2
|
-
import { DashboardReportRepository, DashboardReportService } from "./ports.js";
|
|
3
|
-
import { DashboardReportServiceImpl } from "./service.js";
|
|
4
|
-
export { type DashboardReportRepository, type DashboardReportService, DashboardReportServiceImpl, type EnrollmentPoint, type OverviewStats };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/reporting/dashboard/model.d.ts
|
|
2
|
-
interface OverviewStats {
|
|
3
|
-
publishedCourses: number;
|
|
4
|
-
draftCourses: number;
|
|
5
|
-
activeStudents: number;
|
|
6
|
-
expiringSoon: number;
|
|
7
|
-
}
|
|
8
|
-
interface EnrollmentPoint {
|
|
9
|
-
date: string;
|
|
10
|
-
count: number;
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { EnrollmentPoint, OverviewStats };
|
|
14
|
-
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EnrollmentPoint, OverviewStats } from "./model.js";
|
|
2
|
-
//#region src/reporting/dashboard/ports.d.ts
|
|
3
|
-
interface DashboardReportService {
|
|
4
|
-
overview(orgId: string): Promise<OverviewStats>;
|
|
5
|
-
enrollments(orgId: string, days: number): Promise<EnrollmentPoint[]>;
|
|
6
|
-
}
|
|
7
|
-
interface DashboardReportRepository {
|
|
8
|
-
overview(orgId: string): Promise<OverviewStats>;
|
|
9
|
-
enrollments(orgId: string, days: number): Promise<EnrollmentPoint[]>;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { DashboardReportRepository, DashboardReportService };
|
|
13
|
-
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Logger } from "../../types/ports.js";
|
|
2
|
-
import "../../shared/ports.js";
|
|
3
|
-
import { EnrollmentPoint, OverviewStats } from "./model.js";
|
|
4
|
-
import { DashboardReportRepository, DashboardReportService } from "./ports.js";
|
|
5
|
-
//#region src/reporting/dashboard/service.d.ts
|
|
6
|
-
type DashboardReportServiceParams = {
|
|
7
|
-
repo: DashboardReportRepository;
|
|
8
|
-
logger?: Logger;
|
|
9
|
-
};
|
|
10
|
-
declare class DashboardReportServiceImpl implements DashboardReportService {
|
|
11
|
-
private readonly repo;
|
|
12
|
-
private readonly logger;
|
|
13
|
-
constructor(params: DashboardReportServiceParams);
|
|
14
|
-
overview(orgId: string): Promise<OverviewStats>;
|
|
15
|
-
enrollments(orgId: string, days: number): Promise<EnrollmentPoint[]>;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { DashboardReportServiceImpl, DashboardReportServiceParams };
|
|
19
|
-
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { noopLogger } from "../../shared/logger.js";
|
|
2
|
-
//#region src/reporting/dashboard/service.ts
|
|
3
|
-
var DashboardReportServiceImpl = class {
|
|
4
|
-
repo;
|
|
5
|
-
logger;
|
|
6
|
-
constructor(params) {
|
|
7
|
-
this.repo = params.repo;
|
|
8
|
-
this.logger = params.logger ?? noopLogger;
|
|
9
|
-
}
|
|
10
|
-
overview(orgId) {
|
|
11
|
-
return this.repo.overview(orgId);
|
|
12
|
-
}
|
|
13
|
-
enrollments(orgId, days) {
|
|
14
|
-
return this.repo.enrollments(orgId, days);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { DashboardReportServiceImpl };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","names":[],"sources":["../../../src/reporting/dashboard/service.ts"],"sourcesContent":["// reporting/dashboard — service implementation (inbound port).\nimport type { EnrollmentPoint, OverviewStats } from './model.js';\nimport type { DashboardReportRepository, DashboardReportService } from './ports.js';\nimport type { Logger } from '../../shared/ports.js';\nimport { noopLogger } from '../../shared/logger.js';\n\nexport type DashboardReportServiceParams = {\n repo: DashboardReportRepository;\n logger?: Logger;\n};\n\nexport class DashboardReportServiceImpl implements DashboardReportService {\n private readonly repo: DashboardReportRepository;\n private readonly logger: Logger;\n\n constructor(params: DashboardReportServiceParams) {\n this.repo = params.repo;\n this.logger = params.logger ?? noopLogger;\n }\n\n overview(orgId: string): Promise<OverviewStats> {\n return this.repo.overview(orgId);\n }\n\n enrollments(orgId: string, days: number): Promise<EnrollmentPoint[]> {\n return this.repo.enrollments(orgId, days);\n }\n}\n"],"mappings":";;AAWA,IAAa,6BAAb,MAA0E;CACxE;CACA;CAEA,YAAY,QAAsC;EAChD,KAAK,OAAO,OAAO;EACnB,KAAK,SAAS,OAAO,UAAU;CACjC;CAEA,SAAS,OAAuC;EAC9C,OAAO,KAAK,KAAK,SAAS,KAAK;CACjC;CAEA,YAAY,OAAe,MAA0C;EACnE,OAAO,KAAK,KAAK,YAAY,OAAO,IAAI;CAC1C;AACF"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Course, Module } from "../../types/schemas/content.js";
|
|
2
|
-
import { ContentRef, CourseProgressView } from "./model.js";
|
|
3
|
-
import { LearnEntitlementReader, LearnReportService } from "./ports.js";
|
|
4
|
-
import { LearnReportServiceImpl } from "./service.js";
|
|
5
|
-
export { type ContentRef, type Course, type CourseProgressView, type LearnEntitlementReader, type LearnReportService, LearnReportServiceImpl, type Module };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Activity, Course, Download, DownloadAsset, Module } from "../../types/schemas/content.js";
|
|
2
|
-
import "../../content/index.js";
|
|
3
|
-
//#region src/reporting/learn/model.d.ts
|
|
4
|
-
/** An active-entitlement pointer: the org + content item a student may consume. */
|
|
5
|
-
interface ContentRef {
|
|
6
|
-
orgId: string;
|
|
7
|
-
contentId: string;
|
|
8
|
-
}
|
|
9
|
-
/** Per-course progress for the student surface. Derived on read against the
|
|
10
|
-
* current published structure — never stored. */
|
|
11
|
-
interface CourseProgressView {
|
|
12
|
-
/** Keyed by activity id; absent key = not started. */
|
|
13
|
-
activities: Record<string, 'in-progress' | 'completed'>;
|
|
14
|
-
/** Integer 0–100: completed ÷ current published activities, rounded. */
|
|
15
|
-
percent: number;
|
|
16
|
-
/** The course target's own record says so. */
|
|
17
|
-
completed: boolean;
|
|
18
|
-
/** Per-activity reported state (the record's position map); absent key = none reported. */
|
|
19
|
-
positions: Record<string, unknown>;
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { type Activity, ContentRef, type Course, CourseProgressView, type Download, type DownloadAsset, type Module };
|
|
23
|
-
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Activity, Course, Download, DownloadAsset, Module } from "../../types/schemas/content.js";
|
|
2
|
-
import { ContentRef, CourseProgressView } from "./model.js";
|
|
3
|
-
//#region src/reporting/learn/ports.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Inbound: the student-scoped read use-cases. Scoped by `(orgId, orgUserId)` —
|
|
6
|
-
* the portal org resolved at the boundary. `null` ⇒ not enrolled (→ 404).
|
|
7
|
-
*/
|
|
8
|
-
interface LearnReportService {
|
|
9
|
-
listCourses(orgId: string, orgUserId: string): Promise<Course[]>;
|
|
10
|
-
getCourse(orgId: string, orgUserId: string, courseId: string): Promise<Course | null>;
|
|
11
|
-
listModules(orgId: string, orgUserId: string, courseId: string): Promise<Module[] | null>;
|
|
12
|
-
listActivities(orgId: string, orgUserId: string, courseId: string): Promise<Activity[] | null>;
|
|
13
|
-
courseProgress(orgId: string, orgUserId: string, courseId: string): Promise<CourseProgressView | null>;
|
|
14
|
-
listDownloads(orgId: string, orgUserId: string): Promise<Download[]>;
|
|
15
|
-
getDownload(orgId: string, orgUserId: string, downloadId: string): Promise<{
|
|
16
|
-
download: Download;
|
|
17
|
-
assets: DownloadAsset[];
|
|
18
|
-
} | null>;
|
|
19
|
-
/** Entitlement-gated. Returns null (→ 404) for every failure — never 403,
|
|
20
|
-
* which would confirm the resource exists to someone not entitled to it. */
|
|
21
|
-
downloadAssetUrl(orgId: string, orgUserId: string, downloadId: string, assetId: string): Promise<{
|
|
22
|
-
url: string;
|
|
23
|
-
filename: string;
|
|
24
|
-
} | null>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Outbound: the student's active, non-expired course entitlements in PUBLISHED
|
|
28
|
-
* courses, scoped to the portal org. Implemented by a Drizzle read repo; the
|
|
29
|
-
* service resolves each ref against the content service for the full
|
|
30
|
-
* Course/Module payload.
|
|
31
|
-
*/
|
|
32
|
-
interface LearnEntitlementReader {
|
|
33
|
-
activeRefs(orgId: string, orgUserId: string): Promise<ContentRef[]>;
|
|
34
|
-
activeRef(orgId: string, orgUserId: string, courseId: string): Promise<ContentRef | null>;
|
|
35
|
-
/** Active, non-expired grants to PUBLISHED downloads, scoped to the org. */
|
|
36
|
-
activeDownloadRefs(orgId: string, orgUserId: string): Promise<ContentRef[]>;
|
|
37
|
-
activeDownloadRef(orgId: string, orgUserId: string, downloadId: string): Promise<ContentRef | null>;
|
|
38
|
-
/** Whether this asset is linked to this download. The paywall's second gate. */
|
|
39
|
-
downloadHasAsset(orgId: string, downloadId: string, assetId: string): Promise<boolean>;
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
export { LearnEntitlementReader, LearnReportService };
|
|
43
|
-
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Logger } from "../../types/ports.js";
|
|
2
|
-
import { Activity, Course, Download, DownloadAsset, Module } from "../../types/schemas/content.js";
|
|
3
|
-
import "../../shared/ports.js";
|
|
4
|
-
import { AssetsService } from "../../assets/ports.js";
|
|
5
|
-
import "../../assets/index.js";
|
|
6
|
-
import { ContentService } from "../../content/ports.js";
|
|
7
|
-
import "../../content/index.js";
|
|
8
|
-
import { ProgressService } from "../../progress/ports.js";
|
|
9
|
-
import "../../progress/index.js";
|
|
10
|
-
import { CourseProgressView } from "./model.js";
|
|
11
|
-
import { LearnEntitlementReader, LearnReportService } from "./ports.js";
|
|
12
|
-
//#region src/reporting/learn/service.d.ts
|
|
13
|
-
type LearnReportServiceParams = {
|
|
14
|
-
reader: LearnEntitlementReader;
|
|
15
|
-
content: ContentService;
|
|
16
|
-
progress: ProgressService;
|
|
17
|
-
assets: AssetsService;
|
|
18
|
-
deliveryExpirySeconds: number;
|
|
19
|
-
logger?: Logger;
|
|
20
|
-
};
|
|
21
|
-
declare class LearnReportServiceImpl implements LearnReportService {
|
|
22
|
-
private readonly reader;
|
|
23
|
-
private readonly content;
|
|
24
|
-
private readonly progress;
|
|
25
|
-
private readonly assets;
|
|
26
|
-
private readonly deliveryExpirySeconds;
|
|
27
|
-
private readonly logger;
|
|
28
|
-
constructor(params: LearnReportServiceParams);
|
|
29
|
-
listCourses(orgId: string, orgUserId: string): Promise<Course[]>;
|
|
30
|
-
getCourse(orgId: string, orgUserId: string, courseId: string): Promise<Course | null>;
|
|
31
|
-
listModules(orgId: string, orgUserId: string, courseId: string): Promise<Module[] | null>;
|
|
32
|
-
listActivities(orgId: string, orgUserId: string, courseId: string): Promise<Activity[] | null>;
|
|
33
|
-
courseProgress(orgId: string, orgUserId: string, courseId: string): Promise<CourseProgressView | null>;
|
|
34
|
-
listDownloads(orgId: string, orgUserId: string): Promise<Download[]>;
|
|
35
|
-
getDownload(orgId: string, orgUserId: string, downloadId: string): Promise<{
|
|
36
|
-
download: Download;
|
|
37
|
-
assets: DownloadAsset[];
|
|
38
|
-
} | null>;
|
|
39
|
-
/** The paywall. Two gates, in order: an active entitlement to a published
|
|
40
|
-
* download, then the asset actually belonging to that download — so a
|
|
41
|
-
* student entitled to X cannot reach an asset of Y by swapping the id. */
|
|
42
|
-
downloadAssetUrl(orgId: string, orgUserId: string, downloadId: string, assetId: string): Promise<{
|
|
43
|
-
url: string;
|
|
44
|
-
filename: string;
|
|
45
|
-
} | null>;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
export { LearnReportServiceImpl, LearnReportServiceParams };
|
|
49
|
-
//# sourceMappingURL=service.d.ts.map
|