@headless-lms/core 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/events.d.ts +24 -18
- package/dist/assets/file-urls.d.ts +11 -7
- package/dist/assets/file-urls.js +14 -4
- package/dist/assets/file-urls.js.map +1 -1
- package/dist/assets/index.d.ts +5 -4
- package/dist/assets/index.js +4 -3
- package/dist/assets/jobs.d.ts +15 -0
- package/dist/assets/jobs.js +30 -0
- package/dist/assets/jobs.js.map +1 -0
- package/dist/assets/ports.d.ts +37 -17
- package/dist/assets/service.d.ts +30 -15
- package/dist/assets/service.js +229 -59
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.js +2 -63
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.d.ts +1 -2
- package/dist/automations/catalog.js +137 -65
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.js +20 -20
- package/dist/automations/community-derivations.js.map +1 -1
- package/dist/automations/community-mail.d.ts +36 -20
- package/dist/automations/community-mail.js +32 -24
- package/dist/automations/community-mail.js.map +1 -1
- package/dist/automations/event-permissions.d.ts +12 -0
- package/dist/automations/event-permissions.js +38 -0
- package/dist/automations/event-permissions.js.map +1 -0
- package/dist/automations/events.d.ts +0 -10
- package/dist/automations/index.d.ts +12 -4
- package/dist/automations/index.js +9 -1
- package/dist/automations/notifications/applicable.d.ts +8 -0
- package/dist/automations/notifications/applicable.js +12 -0
- package/dist/automations/notifications/applicable.js.map +1 -0
- package/dist/automations/notifications/debounce.d.ts +25 -0
- package/dist/automations/notifications/debounce.js +93 -0
- package/dist/automations/notifications/debounce.js.map +1 -0
- package/dist/automations/notifications/defaults.d.ts +8 -0
- package/dist/automations/notifications/defaults.js +346 -0
- package/dist/automations/notifications/defaults.js.map +1 -0
- package/dist/automations/notifications/delivery.d.ts +28 -0
- package/dist/automations/notifications/delivery.js +88 -0
- package/dist/automations/notifications/delivery.js.map +1 -0
- package/dist/automations/notifications/processor.d.ts +64 -0
- package/dist/automations/notifications/processor.js +270 -0
- package/dist/automations/notifications/processor.js.map +1 -0
- package/dist/automations/notifications/rules/content.d.ts +6 -0
- package/dist/automations/notifications/rules/content.js +96 -0
- package/dist/automations/notifications/rules/content.js.map +1 -0
- package/dist/automations/notifications/rules/discussion.d.ts +7 -0
- package/dist/automations/notifications/rules/discussion.js +678 -0
- package/dist/automations/notifications/rules/discussion.js.map +1 -0
- package/dist/automations/notifications/rules/entitlements.d.ts +6 -0
- package/dist/automations/notifications/rules/entitlements.js +276 -0
- package/dist/automations/notifications/rules/entitlements.js.map +1 -0
- package/dist/automations/notifications/rules/events.d.ts +9 -0
- package/dist/automations/notifications/rules/events.js +27 -0
- package/dist/automations/notifications/rules/events.js.map +1 -0
- package/dist/automations/notifications/rules/index.d.ts +6 -0
- package/dist/automations/notifications/rules/index.js +15 -0
- package/dist/automations/notifications/rules/index.js.map +1 -0
- package/dist/automations/notifications/rules/organizations.d.ts +6 -0
- package/dist/automations/notifications/rules/organizations.js +35 -0
- package/dist/automations/notifications/rules/organizations.js.map +1 -0
- package/dist/automations/notifications/rules/recipients.d.ts +32 -0
- package/dist/automations/notifications/rules/recipients.js +98 -0
- package/dist/automations/notifications/rules/recipients.js.map +1 -0
- package/dist/automations/notifications/service.d.ts +29 -0
- package/dist/automations/notifications/service.js +45 -0
- package/dist/automations/notifications/service.js.map +1 -0
- package/dist/automations/notifications/types.d.ts +7 -0
- package/dist/automations/notifications/types.js +560 -0
- package/dist/automations/notifications/types.js.map +1 -0
- package/dist/automations/ports.d.ts +134 -21
- package/dist/automations/service.d.ts +30 -30
- package/dist/automations/service.js +111 -144
- package/dist/automations/service.js.map +1 -1
- package/dist/content/event-sight.d.ts +11 -0
- package/dist/content/event-sight.js +11 -0
- package/dist/content/event-sight.js.map +1 -0
- package/dist/content/events.d.ts +437 -46
- package/dist/content/events.js +45 -1
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +8 -4
- package/dist/content/index.js +5 -1
- package/dist/content/jobs.d.ts +16 -0
- package/dist/content/jobs.js +37 -0
- package/dist/content/jobs.js.map +1 -0
- package/dist/content/model.d.ts +2 -2
- package/dist/content/notification-categories.d.ts +37 -0
- package/dist/content/notification-categories.js +73 -0
- package/dist/content/notification-categories.js.map +1 -0
- package/dist/content/ports.d.ts +132 -68
- package/dist/content/service.d.ts +100 -68
- package/dist/content/service.js +703 -146
- package/dist/content/service.js.map +1 -1
- package/dist/content/titles.d.ts +25 -0
- package/dist/content/titles.js +82 -0
- package/dist/content/titles.js.map +1 -0
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/authors.d.ts +4 -2
- package/dist/discussion/authors.js +9 -5
- package/dist/discussion/authors.js.map +1 -1
- package/dist/discussion/chats.d.ts +63 -39
- package/dist/discussion/chats.js +455 -190
- package/dist/discussion/chats.js.map +1 -1
- package/dist/discussion/digests.d.ts +24 -0
- package/dist/discussion/digests.js +104 -0
- package/dist/discussion/digests.js.map +1 -0
- package/dist/discussion/events.d.ts +227 -23
- package/dist/discussion/events.js +114 -19
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +12 -4
- package/dist/discussion/index.js +9 -2
- package/dist/discussion/jobs.d.ts +16 -0
- package/dist/discussion/jobs.js +40 -0
- package/dist/discussion/jobs.js.map +1 -0
- package/dist/discussion/live.d.ts +106 -0
- package/dist/discussion/live.js +642 -0
- package/dist/discussion/live.js.map +1 -0
- package/dist/discussion/mentions.d.ts +11 -0
- package/dist/discussion/mentions.js +35 -0
- package/dist/discussion/mentions.js.map +1 -0
- package/dist/discussion/ports.d.ts +279 -114
- package/dist/discussion/ports.js.map +1 -1
- package/dist/discussion/posts.d.ts +60 -44
- package/dist/discussion/posts.js +453 -287
- package/dist/discussion/posts.js.map +1 -1
- package/dist/discussion/rules.d.ts +18 -0
- package/dist/discussion/rules.js +22 -0
- package/dist/discussion/rules.js.map +1 -0
- package/dist/discussion/service.d.ts +50 -35
- package/dist/discussion/service.js +333 -205
- package/dist/discussion/service.js.map +1 -1
- package/dist/discussion/subscriptions.d.ts +37 -0
- package/dist/discussion/subscriptions.js +115 -0
- package/dist/discussion/subscriptions.js.map +1 -0
- package/dist/discussion/titles.d.ts +28 -0
- package/dist/discussion/titles.js +98 -0
- package/dist/discussion/titles.js.map +1 -0
- package/dist/entitlements/events.d.ts +20 -20
- package/dist/entitlements/index.d.ts +5 -4
- package/dist/entitlements/index.js +3 -2
- package/dist/entitlements/jobs.d.ts +12 -0
- package/dist/entitlements/jobs.js +18 -0
- package/dist/entitlements/jobs.js.map +1 -0
- package/dist/entitlements/model.d.ts +2 -2
- package/dist/entitlements/ports.d.ts +68 -38
- package/dist/entitlements/rules.d.ts +3 -6
- package/dist/entitlements/rules.js +5 -10
- package/dist/entitlements/rules.js.map +1 -1
- package/dist/entitlements/service.d.ts +43 -28
- package/dist/entitlements/service.js +387 -160
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/devices.d.ts +30 -0
- package/dist/identity/devices.js +109 -0
- package/dist/identity/devices.js.map +1 -0
- package/dist/identity/index.d.ts +6 -5
- package/dist/identity/index.js +4 -3
- package/dist/identity/model.d.ts +2 -2
- package/dist/identity/notification-settings.d.ts +28 -0
- package/dist/identity/notification-settings.js +114 -0
- package/dist/identity/notification-settings.js.map +1 -0
- package/dist/identity/ports.d.ts +80 -56
- package/dist/identity/service.d.ts +8 -7
- package/dist/identity/service.js +17 -13
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/ports.d.ts +9 -8
- package/dist/integrations/service.d.ts +9 -8
- package/dist/integrations/service.js +33 -16
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/default-roles.d.ts +22 -0
- package/dist/organizations/default-roles.js +89 -0
- package/dist/organizations/default-roles.js.map +1 -0
- package/dist/organizations/effective-permissions.d.ts +45 -0
- package/dist/organizations/effective-permissions.js +113 -0
- package/dist/organizations/effective-permissions.js.map +1 -0
- package/dist/organizations/events.d.ts +320 -181
- package/dist/organizations/events.js +90 -18
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +15 -10
- package/dist/organizations/index.js +8 -3
- package/dist/organizations/members.d.ts +66 -8
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/notification-catalog.d.ts +31 -0
- package/dist/organizations/notification-catalog.js +32 -0
- package/dist/organizations/notification-catalog.js.map +1 -0
- package/dist/organizations/notification-categories.d.ts +34 -0
- package/dist/organizations/notification-categories.js +66 -0
- package/dist/organizations/notification-categories.js.map +1 -0
- package/dist/organizations/org-roles.d.ts +33 -0
- package/dist/organizations/org-roles.js +49 -0
- package/dist/organizations/org-roles.js.map +1 -0
- package/dist/organizations/permissions.d.ts +311 -0
- package/dist/organizations/permissions.js +327 -0
- package/dist/organizations/permissions.js.map +1 -0
- package/dist/organizations/ports.d.ts +187 -65
- package/dist/organizations/service.d.ts +104 -35
- package/dist/organizations/service.js +1247 -323
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/testing.d.ts +18 -0
- package/dist/organizations/testing.js +37 -0
- package/dist/organizations/testing.js.map +1 -0
- package/dist/organizations/types.d.ts +5 -16
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/ports.d.ts +11 -3
- package/dist/progress/service.d.ts +6 -5
- package/dist/progress/service.js +23 -8
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/admin/index.d.ts +6 -4
- package/dist/reporting/admin/model.d.ts +36 -3
- package/dist/reporting/admin/ports.d.ts +39 -14
- package/dist/reporting/admin/service.d.ts +32 -11
- package/dist/reporting/admin/service.js +102 -18
- package/dist/reporting/admin/service.js.map +1 -1
- package/dist/reporting/events/index.d.ts +27 -0
- package/dist/reporting/events/index.js +20 -0
- package/dist/reporting/events/index.js.map +1 -0
- package/dist/reporting/member/calendar.d.ts +11 -0
- package/dist/reporting/member/calendar.js +75 -0
- package/dist/reporting/member/calendar.js.map +1 -0
- package/dist/reporting/member/index.d.ts +3 -2
- package/dist/reporting/member/model.d.ts +80 -26
- package/dist/reporting/member/ports.d.ts +50 -28
- package/dist/reporting/member/service.d.ts +81 -35
- package/dist/reporting/member/service.js +438 -145
- package/dist/reporting/member/service.js.map +1 -1
- package/dist/shared/actor.d.ts +22 -3
- package/dist/shared/errors.d.ts +15 -2
- package/dist/shared/errors.js +21 -2
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +7 -0
- package/dist/shared/id.js +8 -1
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/logger.d.ts +2 -1
- package/dist/shared/logger.js +10 -1
- package/dist/shared/logger.js.map +1 -1
- package/dist/shared/mailer.d.ts +11 -1
- package/dist/shared/mailer.js +32 -5
- package/dist/shared/mailer.js.map +1 -1
- package/dist/shared/notification-categories.d.ts +16 -0
- package/dist/shared/notification-categories.js +94 -0
- package/dist/shared/notification-categories.js.map +1 -0
- package/dist/shared/notification-settings.d.ts +14 -0
- package/dist/shared/notification-settings.js +61 -0
- package/dist/shared/notification-settings.js.map +1 -0
- package/dist/shared/ports.d.ts +68 -2
- package/dist/shared/settings.d.ts +2 -1
- package/dist/shared/settings.js +1 -0
- package/dist/shared/settings.js.map +1 -1
- package/dist/types/automations.d.ts +8 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +4 -5
- package/dist/types/email-templates.d.ts +119 -6
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/identity.d.ts +14 -17
- package/dist/types/index.d.ts +13 -12
- package/dist/types/index.js +2 -1
- package/dist/types/notifications.d.ts +157 -0
- package/dist/types/notifications.js +1 -0
- package/dist/types/organizations.d.ts +3 -2
- package/dist/types/ports.d.ts +8 -1
- package/dist/types/ports.js +7 -1
- package/dist/types/ports.js.map +1 -0
- package/dist/types/schemas/assets.d.ts +5 -5
- package/dist/types/schemas/assets.js +4 -3
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/automations.d.ts +1 -10
- package/dist/types/schemas/automations.js +1 -3
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +596 -11
- package/dist/types/schemas/content.js +225 -9
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +362 -66
- package/dist/types/schemas/discussion.js +123 -15
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +14 -1
- package/dist/types/schemas/entitlements.js +11 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +1 -85
- package/dist/types/schemas/identity.js +1 -42
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +8 -7
- package/dist/types/schemas/index.js +8 -7
- package/dist/types/schemas/notifications.d.ts +96 -0
- package/dist/types/schemas/notifications.js +57 -0
- package/dist/types/schemas/notifications.js.map +1 -0
- package/dist/types/schemas/organizations.d.ts +96 -60
- package/dist/types/schemas/organizations.js +78 -27
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +0 -1
- package/dist/types/schemas/progress.js +0 -1
- package/dist/types/schemas/progress.js.map +1 -1
- package/package.json +1 -1
- package/dist/automations/community-notifications.d.ts +0 -16
- package/dist/automations/community-notifications.js +0 -84
- package/dist/automations/community-notifications.js.map +0 -1
- package/dist/automations/seeds.d.ts +0 -17
- package/dist/automations/seeds.js +0 -235
- package/dist/automations/seeds.js.map +0 -1
- package/dist/identity/notifications.d.ts +0 -27
- package/dist/identity/notifications.js +0 -101
- package/dist/identity/notifications.js.map +0 -1
- package/dist/organizations/access-scopes.d.ts +0 -19
- package/dist/organizations/access-scopes.js +0 -89
- package/dist/organizations/access-scopes.js.map +0 -1
- package/dist/organizations/roles.d.ts +0 -19
- package/dist/organizations/roles.js +0 -82
- package/dist/organizations/roles.js.map +0 -1
package/dist/content/ports.d.ts
CHANGED
|
@@ -1,102 +1,152 @@
|
|
|
1
1
|
import { Page } from "../types/shared.js";
|
|
2
|
-
import { Activity, ActivityAsset, ActivityView, AddDownloadAssetInput, Bundle, BundleItem, Community, CommunityView, Course, CourseSettings, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DmSettings, Download, DownloadAsset, DownloadFile, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module,
|
|
2
|
+
import { Activity, ActivityAsset, ActivityView, AddDownloadAssetInput, AddEventAssetInput, Bundle, BundleItem, Community, CommunityView, Course, CourseSettings, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateEventInput, CreateSpaceInput, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadFile, DownloadView, Event, EventAsset, EventFile, EventLead, EventSettings, EventStatus, EventView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, ListEventsQuery, Module, PatchCommunitySettingsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceDetail, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateEventInput, UpdateSpaceInput } from "../types/schemas/content.js";
|
|
3
|
+
import { SubjectRef } from "../types/notifications.js";
|
|
4
|
+
import "../types/index.js";
|
|
5
|
+
import { Actor } from "../shared/actor.js";
|
|
3
6
|
import { OutboxAppender, UnitOfWork } from "../shared/ports.js";
|
|
4
7
|
import "./model.js";
|
|
5
8
|
import "./types.js";
|
|
6
|
-
import { Actor } from "../shared/actor.js";
|
|
7
9
|
//#region src/content/ports.d.ts
|
|
8
|
-
interface ContentService extends DownloadablesService, CourseManagementService, CommunitiesService {}
|
|
10
|
+
interface ContentService extends DownloadablesService, CourseManagementService, BundlesService, CommunitiesService, EventsService {}
|
|
11
|
+
interface ItemTitle {
|
|
12
|
+
title: string;
|
|
13
|
+
excerpt?: string;
|
|
14
|
+
}
|
|
15
|
+
interface ItemTitles {
|
|
16
|
+
titlesFor(refs: SubjectRef[], actor: Actor): Promise<Record<string, ItemTitle>>;
|
|
17
|
+
}
|
|
18
|
+
interface ItemTitleAccess {
|
|
19
|
+
hasAccess(orgId: string, orgUserId: string, contentId: string): Promise<boolean>;
|
|
20
|
+
isCommunityMember(communityId: string, actor: Actor): Promise<boolean>;
|
|
21
|
+
canOpenSpace(spaceId: string, actor: Actor): Promise<boolean>;
|
|
22
|
+
}
|
|
23
|
+
interface LibraryAssetRef {
|
|
24
|
+
id: string;
|
|
25
|
+
contentId: string | null;
|
|
26
|
+
}
|
|
27
|
+
interface ContentAssetReader {
|
|
28
|
+
libraryAssetsFor(orgId: string, assetIds: string[]): Promise<LibraryAssetRef[]>;
|
|
29
|
+
}
|
|
9
30
|
interface CommunityReader {
|
|
10
|
-
getSpace(
|
|
11
|
-
listSpaces(
|
|
12
|
-
getDmSettings(
|
|
31
|
+
getSpace(spaceId: string, actor: Actor): Promise<SpaceDetail | null>;
|
|
32
|
+
listSpaces(communityId: string, actor: Actor): Promise<SpaceDetail[]>;
|
|
33
|
+
getDmSettings(communityId: string, actor: Actor): Promise<DmSettings | null>;
|
|
13
34
|
}
|
|
14
35
|
interface SpaceRowLock {
|
|
15
36
|
lockSpace(orgId: string, spaceId: string): Promise<Space | null>;
|
|
16
37
|
}
|
|
38
|
+
interface CommunityDigest {
|
|
39
|
+
orgId: string;
|
|
40
|
+
communityId: string;
|
|
41
|
+
digest: DigestSchedule;
|
|
42
|
+
}
|
|
17
43
|
interface CommunitiesService extends CommunityReader {
|
|
18
|
-
listCommunities(
|
|
19
|
-
getCommunity(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
listCommunities(query: ListCommunitiesQuery, actor: Actor): Promise<Page<CommunityView>>;
|
|
45
|
+
getCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
46
|
+
findCommunity(id: string, actor: Actor): Promise<CommunityView | null>;
|
|
47
|
+
communitiesWithDigest(): Promise<CommunityDigest[]>;
|
|
48
|
+
listCommunitiesById(ids: string[], actor: Actor): Promise<Community[]>;
|
|
49
|
+
getCommunitySpace(communityId: string, spaceId: string, actor: Actor): Promise<SpaceDetail>;
|
|
50
|
+
createCommunity(input: CreateCommunityInput, actor: Actor): Promise<CommunityView>;
|
|
51
|
+
updateCommunity(id: string, patch: UpdateCommunityInput, actor: Actor): Promise<CommunityView>;
|
|
52
|
+
publishCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
53
|
+
unpublishCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
54
|
+
deleteCommunity(id: string, actor: Actor): Promise<void>;
|
|
55
|
+
patchCommunitySettings(id: string, patch: PatchCommunitySettingsInput, actor: Actor): Promise<CommunityView>;
|
|
56
|
+
createSpace(communityId: string, input: CreateSpaceInput, actor: Actor): Promise<SpaceDetail>;
|
|
57
|
+
updateSpace(communityId: string, spaceId: string, patch: UpdateSpaceInput, actor: Actor): Promise<SpaceDetail>;
|
|
58
|
+
deleteSpace(communityId: string, spaceId: string, actor: Actor): Promise<void>;
|
|
59
|
+
reorderSpaces(communityId: string, orderedIds: string[], actor: Actor): Promise<SpaceDetail[]>;
|
|
60
|
+
setSpaceTopics(communityId: string, spaceId: string, input: SetSpaceTopicsInput, actor: Actor): Promise<SpaceDetail>;
|
|
61
|
+
addSpaceLink(communityId: string, spaceId: string, contentId: string, actor: Actor): Promise<SpaceDetail>;
|
|
62
|
+
removeSpaceLink(communityId: string, spaceId: string, linkId: string, actor: Actor): Promise<SpaceDetail>;
|
|
63
|
+
reorderSpaceLinks(communityId: string, spaceId: string, orderedIds: string[], actor: Actor): Promise<SpaceDetail>;
|
|
37
64
|
}
|
|
38
65
|
interface CourseManagementService {
|
|
39
|
-
listCourses(
|
|
40
|
-
getCourse(
|
|
41
|
-
|
|
66
|
+
listCourses(query: ListCoursesQuery, actor: Actor): Promise<Page<CourseView>>;
|
|
67
|
+
getCourse(id: string, actor: Actor): Promise<CourseView>;
|
|
68
|
+
findCourse(id: string, actor: Actor): Promise<CourseView | null>;
|
|
69
|
+
createCourse(input: CreateCourseInput, actor: Actor): Promise<CourseView>;
|
|
42
70
|
/** @throws NotFoundError when no course with this id exists in the org. */
|
|
43
|
-
updateCourse(
|
|
71
|
+
updateCourse(id: string, patch: UpdateCourseInput, actor: Actor): Promise<CourseView>;
|
|
44
72
|
/** @throws NotFoundError when no course with this id exists in the org. */
|
|
45
|
-
patchCourseSettings(
|
|
73
|
+
patchCourseSettings(id: string, value: Partial<CourseSettings>, actor: Actor): Promise<CourseSettings>;
|
|
46
74
|
/** @throws NotFoundError when no course with this id exists in the org. */
|
|
47
|
-
deleteCourse(
|
|
48
|
-
listCourseModules(
|
|
49
|
-
listCourseActivities(
|
|
50
|
-
listCourseActivityViews(
|
|
51
|
-
listCourseActivityAssets(
|
|
52
|
-
getActivity(
|
|
53
|
-
getModule(
|
|
54
|
-
reorderModules(
|
|
55
|
-
createModule(
|
|
75
|
+
deleteCourse(id: string, actor: Actor): Promise<void>;
|
|
76
|
+
listCourseModules(courseId: string, actor: Actor): Promise<Module[]>;
|
|
77
|
+
listCourseActivities(courseId: string, actor: Actor): Promise<Activity[]>;
|
|
78
|
+
listCourseActivityViews(courseId: string, actor: Actor): Promise<ActivityView[]>;
|
|
79
|
+
listCourseActivityAssets(courseId: string, actor: Actor): Promise<ActivityAsset[]>;
|
|
80
|
+
getActivity(activityId: string, actor: Actor): Promise<Activity | null>;
|
|
81
|
+
getModule(moduleId: string, actor: Actor): Promise<Module | null>;
|
|
82
|
+
reorderModules(courseId: string, orderedIds: string[], actor: Actor): Promise<Module[]>;
|
|
83
|
+
createModule(courseId: string, title: string, actor: Actor): Promise<Module[]>;
|
|
56
84
|
/** @throws NotFoundError when no such module exists in this course. */
|
|
57
|
-
updateModule(
|
|
85
|
+
updateModule(courseId: string, moduleId: string, title: string, actor: Actor): Promise<Module[]>;
|
|
58
86
|
/** @throws NotFoundError when no such module exists in this course. */
|
|
59
|
-
deleteModule(
|
|
87
|
+
deleteModule(courseId: string, moduleId: string, actor: Actor): Promise<Module[]>;
|
|
60
88
|
/** @throws NotFoundError when no such module exists in this course. */
|
|
61
|
-
reorderActivities(
|
|
89
|
+
reorderActivities(courseId: string, moduleId: string, orderedIds: string[], actor: Actor): Promise<Module[]>;
|
|
62
90
|
/** @throws NotFoundError when the module — or, on update, the activity — does not exist. */
|
|
63
|
-
saveActivity(
|
|
91
|
+
saveActivity(courseId: string, moduleId: string, input: SaveActivityInput, activityId: string | null, actor: Actor): Promise<Module[]>;
|
|
64
92
|
/** @throws NotFoundError when no such activity exists in this module. */
|
|
65
|
-
deleteActivity(
|
|
93
|
+
deleteActivity(courseId: string, moduleId: string, activityId: string, actor: Actor): Promise<Module[]>;
|
|
66
94
|
}
|
|
67
95
|
interface DownloadablesService {
|
|
68
|
-
listDownloads(
|
|
69
|
-
getDownload(
|
|
70
|
-
|
|
96
|
+
listDownloads(query: ListDownloadsQuery, actor: Actor): Promise<Page<DownloadView>>;
|
|
97
|
+
getDownload(id: string, actor: Actor): Promise<DownloadView>;
|
|
98
|
+
findDownload(id: string, actor: Actor): Promise<DownloadView | null>;
|
|
99
|
+
createDownload(input: CreateDownloadInput, actor: Actor): Promise<DownloadView>;
|
|
71
100
|
/** @throws NotFoundError when no download with this id exists in the org. */
|
|
72
|
-
updateDownload(
|
|
101
|
+
updateDownload(id: string, patch: UpdateDownloadInput, actor: Actor): Promise<DownloadView>;
|
|
73
102
|
/** @throws NotFoundError when no download with this id exists in the org. */
|
|
74
|
-
removeDownload(
|
|
75
|
-
listDownloadAssets(
|
|
76
|
-
addDownloadAsset(
|
|
77
|
-
removeDownloadAsset(
|
|
78
|
-
renameDownloadAsset(
|
|
103
|
+
removeDownload(id: string, actor: Actor): Promise<void>;
|
|
104
|
+
listDownloadAssets(downloadId: string, actor: Actor): Promise<DownloadFile[]>;
|
|
105
|
+
addDownloadAsset(downloadId: string, input: AddDownloadAssetInput, actor: Actor): Promise<DownloadFile[]>;
|
|
106
|
+
removeDownloadAsset(downloadId: string, assetId: string, actor: Actor): Promise<DownloadFile[]>;
|
|
107
|
+
renameDownloadAsset(downloadId: string, assetId: string, displayName: string | null, actor: Actor): Promise<DownloadFile[]>;
|
|
79
108
|
/** @throws ConflictError when assetIds is not exactly the download's current asset set. */
|
|
80
|
-
reorderDownloadAssets(
|
|
109
|
+
reorderDownloadAssets(downloadId: string, assetIds: string[], actor: Actor): Promise<DownloadFile[]>;
|
|
110
|
+
}
|
|
111
|
+
interface EventsService {
|
|
112
|
+
listEvents(query: ListEventsQuery, actor: Actor): Promise<Page<EventView>>;
|
|
113
|
+
getEvent(id: string, actor: Actor): Promise<EventView>;
|
|
114
|
+
findEvent(id: string, actor: Actor): Promise<EventView | null>;
|
|
115
|
+
findEvents(ids: string[], actor: Actor): Promise<EventView[]>;
|
|
116
|
+
createEvent(input: CreateEventInput, actor: Actor): Promise<EventView>;
|
|
117
|
+
updateEvent(id: string, patch: UpdateEventInput, actor: Actor): Promise<EventView>;
|
|
118
|
+
cancelEvent(id: string, actor: Actor): Promise<EventView>;
|
|
119
|
+
deleteEvent(id: string, actor: Actor): Promise<void>;
|
|
120
|
+
startingSoon(orgId: string, eventId: string, lead: EventLead, now: Date): Promise<void>;
|
|
121
|
+
listEventAssets(eventId: string, actor: Actor): Promise<EventFile[]>;
|
|
122
|
+
eventFilesFor(eventIds: string[], actor: Actor): Promise<Record<string, EventFile[]>>;
|
|
123
|
+
addEventAsset(eventId: string, input: AddEventAssetInput, actor: Actor): Promise<EventFile[]>;
|
|
124
|
+
removeEventAsset(eventId: string, assetId: string, actor: Actor): Promise<EventFile[]>;
|
|
125
|
+
renameEventAsset(eventId: string, assetId: string, displayName: string | null, actor: Actor): Promise<EventFile[]>;
|
|
126
|
+
reorderEventAssets(eventId: string, assetIds: string[], actor: Actor): Promise<EventFile[]>;
|
|
81
127
|
}
|
|
128
|
+
type EventPatch = Omit<UpdateEventInput, 'status' | 'settings'> & {
|
|
129
|
+
status?: EventStatus;
|
|
130
|
+
};
|
|
82
131
|
interface BundlesService {
|
|
83
|
-
listBundles(
|
|
84
|
-
getBundle(
|
|
132
|
+
listBundles(query: ListBundlesQuery, actor: Actor): Promise<Page<Bundle>>;
|
|
133
|
+
getBundle(id: string, actor: Actor): Promise<Bundle>;
|
|
134
|
+
findBundle(id: string, actor: Actor): Promise<Bundle | null>;
|
|
85
135
|
/** Bundle and its initial items are created together, or not at all.
|
|
86
136
|
* @throws NotFoundError when an initial content id does not exist in the org. */
|
|
87
|
-
createBundle(
|
|
137
|
+
createBundle(input: CreateBundleInput, actor: Actor): Promise<Bundle>;
|
|
88
138
|
/** @throws NotFoundError when no bundle with this id exists in the org. */
|
|
89
|
-
updateBundle(
|
|
139
|
+
updateBundle(id: string, patch: UpdateBundleInput, actor: Actor): Promise<Bundle>;
|
|
90
140
|
/** @throws NotFoundError when no bundle with this id exists in the org. */
|
|
91
|
-
deleteBundle(
|
|
92
|
-
listBundleItems(
|
|
141
|
+
deleteBundle(id: string, actor: Actor): Promise<void>;
|
|
142
|
+
listBundleItems(bundleId: string, actor: Actor): Promise<BundleItem[]>;
|
|
93
143
|
/** @throws NotFoundError when the bundle — or the content — does not exist in the org. */
|
|
94
|
-
addBundleItem(
|
|
144
|
+
addBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
95
145
|
/** @throws NotFoundError when no bundle with this id exists in the org. */
|
|
96
|
-
removeBundleItem(
|
|
146
|
+
removeBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
97
147
|
}
|
|
98
148
|
interface ContentRepository {
|
|
99
|
-
listCourses(orgId: string, query: ListCoursesQuery): Promise<Page<Course>>;
|
|
149
|
+
listCourses(orgId: string, query: ListCoursesQuery, ids?: string[]): Promise<Page<Course>>;
|
|
100
150
|
findCourseById(orgId: string, id: string): Promise<Course | null>;
|
|
101
151
|
createCourse(orgId: string, input: CreateCourseInput, slug: string): Promise<Course>;
|
|
102
152
|
updateCourse(orgId: string, id: string, patch: UpdateCourseInput): Promise<Course | null>;
|
|
@@ -117,7 +167,7 @@ interface ContentRepository {
|
|
|
117
167
|
activity: Activity;
|
|
118
168
|
}>;
|
|
119
169
|
deleteActivity(orgId: string, courseId: string, moduleId: string, activityId: string): Promise<Module[]>;
|
|
120
|
-
listDownloads(orgId: string, query: ListDownloadsQuery): Promise<Page<Download>>;
|
|
170
|
+
listDownloads(orgId: string, query: ListDownloadsQuery, ids?: string[]): Promise<Page<Download>>;
|
|
121
171
|
getDownload(orgId: string, id: string): Promise<Download | null>;
|
|
122
172
|
createDownload(orgId: string, input: CreateDownloadInput, slug: string): Promise<Download>;
|
|
123
173
|
updateDownload(orgId: string, id: string, patch: UpdateDownloadInput): Promise<Download | null>;
|
|
@@ -127,6 +177,20 @@ interface ContentRepository {
|
|
|
127
177
|
removeDownloadAsset(orgId: string, downloadId: string, assetId: string): Promise<DownloadAsset[]>;
|
|
128
178
|
renameDownloadAsset(orgId: string, downloadId: string, assetId: string, displayName: string | null): Promise<DownloadAsset[]>;
|
|
129
179
|
reorderDownloadAssets(orgId: string, downloadId: string, assetIds: string[]): Promise<DownloadAsset[]>;
|
|
180
|
+
listEvents(orgId: string, query: ListEventsQuery, ids?: string[]): Promise<Page<Event>>;
|
|
181
|
+
findEventById(orgId: string, id: string): Promise<Event | null>;
|
|
182
|
+
findEventsByIds(orgId: string, ids: string[]): Promise<Event[]>;
|
|
183
|
+
createEvent(orgId: string, input: Omit<CreateEventInput, 'settings'>): Promise<Event>;
|
|
184
|
+
updateEvent(orgId: string, id: string, patch: EventPatch): Promise<Event | null>;
|
|
185
|
+
patchEventSettings(orgId: string, id: string, value: Partial<EventSettings>): Promise<EventSettings>;
|
|
186
|
+
deleteEvent(orgId: string, id: string): Promise<boolean>;
|
|
187
|
+
deleteEventSettings(orgId: string, id: string): Promise<void>;
|
|
188
|
+
listEventAssets(orgId: string, eventId: string): Promise<EventAsset[]>;
|
|
189
|
+
listEventAssetsFor(orgId: string, eventIds: string[]): Promise<EventAsset[]>;
|
|
190
|
+
addEventAsset(orgId: string, eventId: string, input: AddEventAssetInput): Promise<EventAsset[]>;
|
|
191
|
+
removeEventAsset(orgId: string, eventId: string, assetId: string): Promise<EventAsset[]>;
|
|
192
|
+
renameEventAsset(orgId: string, eventId: string, assetId: string, displayName: string | null): Promise<EventAsset[]>;
|
|
193
|
+
reorderEventAssets(orgId: string, eventId: string, assetIds: string[]): Promise<EventAsset[]>;
|
|
130
194
|
listBundles(orgId: string, query: ListBundlesQuery): Promise<Page<Bundle>>;
|
|
131
195
|
findBundleById(orgId: string, id: string): Promise<Bundle | null>;
|
|
132
196
|
createBundle(orgId: string, input: CreateBundleInput): Promise<Bundle>;
|
|
@@ -136,13 +200,13 @@ interface ContentRepository {
|
|
|
136
200
|
/** Content already in the bundle is left as it is — adding twice is a no-op. */
|
|
137
201
|
addBundleItem(orgId: string, bundleId: string, contentId: string): Promise<BundleItem[]>;
|
|
138
202
|
removeBundleItem(orgId: string, bundleId: string, contentId: string): Promise<BundleItem[]>;
|
|
139
|
-
listCommunities(orgId: string, query: ListCommunitiesQuery): Promise<Page<Community>>;
|
|
203
|
+
listCommunities(orgId: string, query: ListCommunitiesQuery, ids?: string[]): Promise<Page<Community>>;
|
|
140
204
|
findCommunityById(orgId: string, id: string): Promise<Community | null>;
|
|
141
205
|
findCommunitiesByIds(orgId: string, ids: string[]): Promise<Community[]>;
|
|
142
|
-
|
|
206
|
+
communitiesWithDigest(): Promise<CommunityDigest[]>;
|
|
143
207
|
createCommunity(orgId: string, input: CreateCommunityInput, slug: string): Promise<Community>;
|
|
144
208
|
updateCommunity(orgId: string, id: string, patch: UpdateCommunityInput): Promise<Community | null>;
|
|
145
|
-
|
|
209
|
+
patchCommunitySettings(orgId: string, id: string, patch: PatchCommunitySettingsInput): Promise<Community | null>;
|
|
146
210
|
deleteCommunity(orgId: string, id: string): Promise<boolean>;
|
|
147
211
|
deleteCommunitySettings(orgId: string, id: string): Promise<void>;
|
|
148
212
|
listSpaces(orgId: string, communityId: string): Promise<SpaceDetail[]>;
|
|
@@ -165,5 +229,5 @@ interface ContentTxScope {
|
|
|
165
229
|
}
|
|
166
230
|
type ContentUnitOfWork = UnitOfWork<ContentTxScope>;
|
|
167
231
|
//#endregion
|
|
168
|
-
export { BundlesService, CommunitiesService, CommunityReader, ContentRepository, ContentService, ContentTxScope, ContentUnitOfWork, CourseManagementService, DownloadablesService, SpaceRowLock };
|
|
232
|
+
export { BundlesService, CommunitiesService, CommunityDigest, CommunityReader, ContentAssetReader, ContentRepository, ContentService, ContentTxScope, ContentUnitOfWork, CourseManagementService, DownloadablesService, EventPatch, EventsService, ItemTitle, ItemTitleAccess, ItemTitles, LibraryAssetRef, SpaceRowLock };
|
|
169
233
|
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -1,98 +1,130 @@
|
|
|
1
1
|
import { Page } from "../types/shared.js";
|
|
2
2
|
import { Logger } from "../types/ports.js";
|
|
3
|
-
import { Activity, ActivityAsset, ActivityView, AddDownloadAssetInput, Bundle, BundleItem, Community, CommunityView, CourseSettings, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DmSettings, DownloadFile, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module,
|
|
4
|
-
import "../shared/
|
|
3
|
+
import { Activity, ActivityAsset, ActivityView, AddDownloadAssetInput, AddEventAssetInput, Bundle, BundleItem, Community, CommunityView, CourseSettings, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateEventInput, CreateSpaceInput, DmSettings, DownloadFile, DownloadView, EventFile, EventLead, EventView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, ListEventsQuery, Module, PatchCommunitySettingsInput, SaveActivityInput, SetSpaceTopicsInput, SpaceDetail, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateEventInput, UpdateSpaceInput } from "../types/schemas/content.js";
|
|
4
|
+
import { Actor } from "../shared/actor.js";
|
|
5
|
+
import { Scheduler } from "../shared/ports.js";
|
|
5
6
|
import { FileUrls } from "../assets/file-urls.js";
|
|
6
|
-
import { AssetFiles
|
|
7
|
+
import { AssetFiles } from "../assets/ports.js";
|
|
7
8
|
import "../assets/index.js";
|
|
8
9
|
import "./model.js";
|
|
9
10
|
import "./types.js";
|
|
10
|
-
import {
|
|
11
|
-
import { BundlesService, CommunitiesService, ContentRepository, ContentUnitOfWork, CourseManagementService, DownloadablesService } from "./ports.js";
|
|
11
|
+
import { BundlesService, CommunitiesService, CommunityDigest, ContentAssetReader, ContentRepository, ContentUnitOfWork, CourseManagementService, DownloadablesService, EventsService } from "./ports.js";
|
|
12
12
|
//#region src/content/service.d.ts
|
|
13
13
|
type ContentServiceParams = {
|
|
14
14
|
repo: ContentRepository;
|
|
15
15
|
uow: ContentUnitOfWork;
|
|
16
|
-
libraryAssets:
|
|
17
|
-
files: Pick<AssetFiles, 'readyFiles'>;
|
|
16
|
+
libraryAssets: ContentAssetReader;
|
|
17
|
+
files: Pick<AssetFiles, 'readyFiles' | 'syncPublicImage'>;
|
|
18
18
|
fileUrls: FileUrls;
|
|
19
|
+
scheduler: Pick<Scheduler, 'at' | 'cancel'>;
|
|
19
20
|
logger?: Logger;
|
|
20
21
|
};
|
|
21
|
-
declare class ContentService implements CourseManagementService, DownloadablesService, BundlesService, CommunitiesService {
|
|
22
|
+
declare class ContentService implements CourseManagementService, DownloadablesService, BundlesService, CommunitiesService, EventsService {
|
|
22
23
|
private readonly repo;
|
|
23
24
|
private readonly uow;
|
|
24
25
|
private readonly libraryAssets;
|
|
25
26
|
private readonly files;
|
|
26
27
|
private readonly fileUrls;
|
|
28
|
+
private readonly scheduler;
|
|
27
29
|
private readonly logger;
|
|
28
30
|
constructor(params: ContentServiceParams);
|
|
31
|
+
private require;
|
|
32
|
+
private requireAny;
|
|
33
|
+
private visibleIds;
|
|
29
34
|
private withThumbnail;
|
|
35
|
+
private syncThumbnail;
|
|
36
|
+
private withdrawThumbnail;
|
|
30
37
|
private pageWithThumbnails;
|
|
31
38
|
private downloadFiles;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
39
|
+
private eventFiles;
|
|
40
|
+
private assertAttachable;
|
|
41
|
+
private courseAssetIds;
|
|
42
|
+
private downloadAssetIds;
|
|
43
|
+
private eventAssetIds;
|
|
44
|
+
listCourses(query: ListCoursesQuery, actor: Actor): Promise<Page<CourseView>>;
|
|
45
|
+
getCourse(id: string, actor: Actor): Promise<CourseView>;
|
|
46
|
+
findCourse(id: string, actor: Actor): Promise<CourseView | null>;
|
|
47
|
+
createCourse(input: CreateCourseInput, actor: Actor): Promise<CourseView>;
|
|
48
|
+
updateCourse(id: string, patch: UpdateCourseInput, actor: Actor): Promise<CourseView>;
|
|
49
|
+
patchCourseSettings(id: string, value: Partial<CourseSettings>, actor: Actor): Promise<CourseSettings>;
|
|
50
|
+
deleteCourse(id: string, actor: Actor): Promise<void>;
|
|
51
|
+
listCourseModules(courseId: string, actor: Actor): Promise<Module[]>;
|
|
52
|
+
listCourseActivities(courseId: string, actor: Actor): Promise<Activity[]>;
|
|
53
|
+
listCourseActivityViews(courseId: string, actor: Actor): Promise<ActivityView[]>;
|
|
54
|
+
listCourseActivityAssets(courseId: string, actor: Actor): Promise<ActivityAsset[]>;
|
|
55
|
+
getActivity(activityId: string, actor: Actor): Promise<Activity | null>;
|
|
56
|
+
getModule(moduleId: string, actor: Actor): Promise<Module | null>;
|
|
57
|
+
reorderModules(courseId: string, orderedIds: string[], actor: Actor): Promise<Module[]>;
|
|
58
|
+
createModule(courseId: string, title: string, actor: Actor): Promise<Module[]>;
|
|
59
|
+
updateModule(courseId: string, moduleId: string, title: string, actor: Actor): Promise<Module[]>;
|
|
60
|
+
deleteModule(courseId: string, moduleId: string, actor: Actor): Promise<Module[]>;
|
|
61
|
+
reorderActivities(courseId: string, moduleId: string, orderedIds: string[], actor: Actor): Promise<Module[]>;
|
|
62
|
+
saveActivity(courseId: string, moduleId: string, input: SaveActivityInput, activityId: string | null, actor: Actor): Promise<Module[]>;
|
|
63
|
+
deleteActivity(courseId: string, moduleId: string, activityId: string, actor: Actor): Promise<Module[]>;
|
|
64
|
+
listDownloads(query: ListDownloadsQuery, actor: Actor): Promise<Page<DownloadView>>;
|
|
65
|
+
getDownload(id: string, actor: Actor): Promise<DownloadView>;
|
|
66
|
+
findDownload(id: string, actor: Actor): Promise<DownloadView | null>;
|
|
67
|
+
createDownload(input: CreateDownloadInput, actor: Actor): Promise<DownloadView>;
|
|
68
|
+
updateDownload(id: string, patch: UpdateDownloadInput, actor: Actor): Promise<DownloadView>;
|
|
69
|
+
removeDownload(id: string, actor: Actor): Promise<void>;
|
|
70
|
+
listDownloadAssets(downloadId: string, actor: Actor): Promise<DownloadFile[]>;
|
|
71
|
+
addDownloadAsset(downloadId: string, input: AddDownloadAssetInput, actor: Actor): Promise<DownloadFile[]>;
|
|
72
|
+
removeDownloadAsset(downloadId: string, assetId: string, actor: Actor): Promise<DownloadFile[]>;
|
|
73
|
+
renameDownloadAsset(downloadId: string, assetId: string, displayName: string | null, actor: Actor): Promise<DownloadFile[]>;
|
|
61
74
|
/** The caller must send the COMPLETE ordered set — a partial list would
|
|
62
75
|
* silently unlink whatever it omitted. */
|
|
63
|
-
reorderDownloadAssets(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
76
|
+
reorderDownloadAssets(downloadId: string, assetIds: string[], actor: Actor): Promise<DownloadFile[]>;
|
|
77
|
+
listEvents(query: ListEventsQuery, actor: Actor): Promise<Page<EventView>>;
|
|
78
|
+
getEvent(id: string, actor: Actor): Promise<EventView>;
|
|
79
|
+
findEvent(id: string, actor: Actor): Promise<EventView | null>;
|
|
80
|
+
findEvents(ids: string[], actor: Actor): Promise<EventView[]>;
|
|
81
|
+
createEvent(input: CreateEventInput, actor: Actor): Promise<EventView>;
|
|
82
|
+
updateEvent(id: string, patch: UpdateEventInput, actor: Actor): Promise<EventView>;
|
|
83
|
+
cancelEvent(id: string, actor: Actor): Promise<EventView>;
|
|
84
|
+
deleteEvent(id: string, actor: Actor): Promise<void>;
|
|
85
|
+
startingSoon(orgId: string, eventId: string, lead: EventLead, now: Date): Promise<void>;
|
|
86
|
+
private scheduleStartingSoon;
|
|
87
|
+
private cancelStartingSoon;
|
|
88
|
+
listEventAssets(eventId: string, actor: Actor): Promise<EventFile[]>;
|
|
89
|
+
eventFilesFor(eventIds: string[], actor: Actor): Promise<Record<string, EventFile[]>>;
|
|
90
|
+
addEventAsset(eventId: string, input: AddEventAssetInput, actor: Actor): Promise<EventFile[]>;
|
|
91
|
+
removeEventAsset(eventId: string, assetId: string, actor: Actor): Promise<EventFile[]>;
|
|
92
|
+
renameEventAsset(eventId: string, assetId: string, displayName: string | null, actor: Actor): Promise<EventFile[]>;
|
|
93
|
+
reorderEventAssets(eventId: string, assetIds: string[], actor: Actor): Promise<EventFile[]>;
|
|
94
|
+
listBundles(query: ListBundlesQuery, actor: Actor): Promise<Page<Bundle>>;
|
|
95
|
+
getBundle(id: string, actor: Actor): Promise<Bundle>;
|
|
96
|
+
findBundle(id: string, actor: Actor): Promise<Bundle | null>;
|
|
97
|
+
createBundle(input: CreateBundleInput, actor: Actor): Promise<Bundle>;
|
|
98
|
+
updateBundle(id: string, patch: UpdateBundleInput, actor: Actor): Promise<Bundle>;
|
|
99
|
+
deleteBundle(id: string, actor: Actor): Promise<void>;
|
|
100
|
+
listBundleItems(bundleId: string, actor: Actor): Promise<BundleItem[]>;
|
|
101
|
+
addBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
102
|
+
removeBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
72
103
|
private spaceUpdates;
|
|
73
104
|
private resolvedSpace;
|
|
74
|
-
listCommunities(
|
|
75
|
-
getCommunity(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
105
|
+
listCommunities(query: ListCommunitiesQuery, actor: Actor): Promise<Page<CommunityView>>;
|
|
106
|
+
getCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
107
|
+
findCommunity(id: string, actor: Actor): Promise<CommunityView | null>;
|
|
108
|
+
communitiesWithDigest(): Promise<CommunityDigest[]>;
|
|
109
|
+
listCommunitiesById(ids: string[], actor: Actor): Promise<Community[]>;
|
|
110
|
+
getSpace(spaceId: string, actor: Actor): Promise<SpaceDetail | null>;
|
|
111
|
+
getCommunitySpace(communityId: string, spaceId: string, actor: Actor): Promise<SpaceDetail>;
|
|
112
|
+
listSpaces(communityId: string, actor: Actor): Promise<SpaceDetail[]>;
|
|
113
|
+
getDmSettings(communityId: string, actor: Actor): Promise<DmSettings | null>;
|
|
114
|
+
createCommunity(input: CreateCommunityInput, actor: Actor): Promise<CommunityView>;
|
|
115
|
+
updateCommunity(id: string, patch: UpdateCommunityInput, actor: Actor): Promise<CommunityView>;
|
|
116
|
+
publishCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
117
|
+
unpublishCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
118
|
+
deleteCommunity(id: string, actor: Actor): Promise<void>;
|
|
119
|
+
patchCommunitySettings(id: string, patch: PatchCommunitySettingsInput, actor: Actor): Promise<CommunityView>;
|
|
120
|
+
createSpace(communityId: string, input: CreateSpaceInput, actor: Actor): Promise<SpaceDetail>;
|
|
121
|
+
updateSpace(communityId: string, spaceId: string, patch: UpdateSpaceInput, actor: Actor): Promise<SpaceDetail>;
|
|
122
|
+
deleteSpace(communityId: string, spaceId: string, actor: Actor): Promise<void>;
|
|
123
|
+
reorderSpaces(communityId: string, orderedIds: string[], actor: Actor): Promise<SpaceDetail[]>;
|
|
124
|
+
setSpaceTopics(communityId: string, spaceId: string, input: SetSpaceTopicsInput, actor: Actor): Promise<SpaceDetail>;
|
|
125
|
+
addSpaceLink(communityId: string, spaceId: string, contentId: string, actor: Actor): Promise<SpaceDetail>;
|
|
126
|
+
removeSpaceLink(communityId: string, spaceId: string, linkId: string, actor: Actor): Promise<SpaceDetail>;
|
|
127
|
+
reorderSpaceLinks(communityId: string, spaceId: string, orderedIds: string[], actor: Actor): Promise<SpaceDetail>;
|
|
96
128
|
}
|
|
97
129
|
//#endregion
|
|
98
130
|
export { ContentService, ContentServiceParams };
|