@headless-lms/core 0.4.0 → 0.6.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 +15 -9
- package/dist/assets/file-urls.d.ts +14 -7
- package/dist/assets/file-urls.js +15 -4
- package/dist/assets/file-urls.js.map +1 -1
- package/dist/assets/index.d.ts +4 -4
- package/dist/assets/index.js +3 -3
- package/dist/assets/ports.d.ts +34 -15
- package/dist/assets/service.d.ts +30 -14
- package/dist/assets/service.js +233 -54
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.js +68 -3
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.js +16 -16
- package/dist/automations/community-derivations.js.map +1 -1
- package/dist/automations/community-mail.d.ts +34 -4
- package/dist/automations/community-mail.js +32 -4
- 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/index.d.ts +2 -1
- package/dist/automations/index.js +2 -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.js +1 -1
- package/dist/automations/notifications/debounce.js.map +1 -1
- package/dist/automations/notifications/defaults.js +33 -3
- package/dist/automations/notifications/defaults.js.map +1 -1
- package/dist/automations/notifications/processor.js +1 -1
- package/dist/automations/notifications/processor.js.map +1 -1
- package/dist/automations/notifications/rules/content.js +60 -3
- package/dist/automations/notifications/rules/content.js.map +1 -1
- package/dist/automations/notifications/rules/discussion.js +29 -29
- package/dist/automations/notifications/rules/discussion.js.map +1 -1
- package/dist/automations/notifications/rules/entitlements.js +36 -9
- package/dist/automations/notifications/rules/entitlements.js.map +1 -1
- 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/organizations.js +17 -10
- package/dist/automations/notifications/rules/organizations.js.map +1 -1
- package/dist/automations/notifications/rules/recipients.js +0 -1
- package/dist/automations/notifications/rules/recipients.js.map +1 -1
- package/dist/automations/notifications/service.d.ts +8 -6
- package/dist/automations/notifications/service.js +12 -12
- package/dist/automations/notifications/service.js.map +1 -1
- package/dist/automations/notifications/types.js +94 -7
- package/dist/automations/notifications/types.js.map +1 -1
- package/dist/automations/ports.d.ts +30 -31
- package/dist/automations/service.d.ts +20 -17
- package/dist/automations/service.js +90 -61
- 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 +465 -88
- package/dist/content/events.js +34 -1
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +6 -4
- package/dist/content/index.js +3 -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 +5 -4
- package/dist/content/notification-categories.js +15 -6
- package/dist/content/notification-categories.js.map +1 -1
- package/dist/content/ports.d.ts +113 -68
- package/dist/content/service.d.ts +103 -67
- package/dist/content/service.js +739 -152
- package/dist/content/service.js.map +1 -1
- package/dist/content/titles.d.ts +6 -3
- package/dist/content/titles.js +37 -24
- package/dist/content/titles.js.map +1 -1
- 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 +56 -37
- package/dist/discussion/chats.js +392 -160
- package/dist/discussion/chats.js.map +1 -1
- package/dist/discussion/events.d.ts +85 -47
- package/dist/discussion/events.js +41 -3
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +8 -5
- package/dist/discussion/index.js +5 -3
- 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.js +2 -2
- package/dist/discussion/mentions.js.map +1 -1
- package/dist/discussion/ports.d.ts +182 -100
- package/dist/discussion/ports.js.map +1 -1
- package/dist/discussion/posts.d.ts +45 -39
- package/dist/discussion/posts.js +266 -152
- 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 +37 -31
- package/dist/discussion/service.js +250 -186
- package/dist/discussion/service.js.map +1 -1
- package/dist/discussion/subscriptions.d.ts +8 -8
- package/dist/discussion/subscriptions.js +28 -12
- package/dist/discussion/subscriptions.js.map +1 -1
- package/dist/discussion/titles.d.ts +4 -2
- package/dist/discussion/titles.js +27 -13
- package/dist/discussion/titles.js.map +1 -1
- package/dist/entitlements/events.d.ts +58 -58
- package/dist/entitlements/index.d.ts +4 -4
- package/dist/entitlements/index.js +2 -2
- package/dist/entitlements/model.d.ts +2 -2
- package/dist/entitlements/ports.d.ts +65 -39
- 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 +40 -28
- package/dist/entitlements/service.js +369 -162
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/devices.d.ts +3 -3
- package/dist/identity/devices.js +6 -4
- package/dist/identity/devices.js.map +1 -1
- package/dist/identity/index.d.ts +2 -2
- package/dist/identity/index.js +2 -2
- package/dist/identity/notification-settings.d.ts +1 -1
- package/dist/identity/notification-settings.js +2 -1
- package/dist/identity/notification-settings.js.map +1 -1
- package/dist/identity/ports.d.ts +7 -7
- package/dist/identity/service.d.ts +8 -7
- package/dist/identity/service.js +16 -12
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/events.d.ts +3 -3
- package/dist/integrations/ports.d.ts +9 -8
- package/dist/integrations/service.d.ts +9 -8
- package/dist/integrations/service.js +31 -14
- 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 +47 -0
- package/dist/organizations/effective-permissions.js +118 -0
- package/dist/organizations/effective-permissions.js.map +1 -0
- package/dist/organizations/events.d.ts +326 -181
- package/dist/organizations/events.js +90 -18
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +14 -10
- package/dist/organizations/index.js +7 -3
- package/dist/organizations/members.d.ts +66 -8
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/model.d.ts +2 -2
- 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 +6 -4
- package/dist/organizations/notification-categories.js +25 -10
- package/dist/organizations/notification-categories.js.map +1 -1
- 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 +102 -35
- package/dist/organizations/service.js +1254 -327
- 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/events.d.ts +14 -14
- 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 +21 -6
- 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 +29 -5
- package/dist/reporting/member/ports.d.ts +49 -29
- package/dist/reporting/member/service.d.ts +57 -29
- package/dist/reporting/member/service.js +345 -114
- package/dist/reporting/member/service.js.map +1 -1
- package/dist/shared/actor.d.ts +23 -3
- package/dist/shared/errors.d.ts +2 -1
- package/dist/shared/errors.js +3 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +4 -0
- package/dist/shared/id.js +4 -0
- 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/ports.d.ts +25 -5
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +4 -5
- package/dist/types/email-templates.d.ts +22 -3
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/identity.d.ts +13 -16
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +2 -1
- package/dist/types/notifications.d.ts +4 -4
- 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/content.d.ts +599 -13
- package/dist/types/schemas/content.js +219 -8
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +280 -57
- package/dist/types/schemas/discussion.js +77 -3
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +21 -8
- package/dist/types/schemas/entitlements.js +11 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/index.d.ts +5 -5
- package/dist/types/schemas/index.js +5 -5
- package/dist/types/schemas/notifications.d.ts +11 -10
- package/dist/types/schemas/notifications.js +3 -2
- package/dist/types/schemas/notifications.js.map +1 -1
- package/dist/types/schemas/organizations.d.ts +99 -60
- package/dist/types/schemas/organizations.js +80 -27
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +3 -4
- package/dist/types/schemas/progress.js +0 -1
- package/dist/types/schemas/progress.js.map +1 -1
- package/package.json +1 -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,29 +1,36 @@
|
|
|
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, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadFile, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, PatchCommunitySettingsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceDetail, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput } from "../types/schemas/content.js";
|
|
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, SpaceView, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateEventInput, UpdateSpaceInput } from "../types/schemas/content.js";
|
|
3
3
|
import { SubjectRef } from "../types/notifications.js";
|
|
4
4
|
import "../types/index.js";
|
|
5
|
+
import { Actor } from "../shared/actor.js";
|
|
5
6
|
import { OutboxAppender, UnitOfWork } from "../shared/ports.js";
|
|
6
7
|
import "./model.js";
|
|
7
8
|
import "./types.js";
|
|
8
|
-
import { Actor } from "../shared/actor.js";
|
|
9
9
|
//#region src/content/ports.d.ts
|
|
10
|
-
interface ContentService extends DownloadablesService, CourseManagementService, CommunitiesService {}
|
|
10
|
+
interface ContentService extends DownloadablesService, CourseManagementService, BundlesService, CommunitiesService, EventsService {}
|
|
11
11
|
interface ItemTitle {
|
|
12
12
|
title: string;
|
|
13
13
|
excerpt?: string;
|
|
14
14
|
}
|
|
15
15
|
interface ItemTitles {
|
|
16
|
-
titlesFor(
|
|
16
|
+
titlesFor(refs: SubjectRef[], actor: Actor): Promise<Record<string, ItemTitle>>;
|
|
17
17
|
}
|
|
18
18
|
interface ItemTitleAccess {
|
|
19
19
|
hasAccess(orgId: string, orgUserId: string, contentId: string): Promise<boolean>;
|
|
20
|
-
isCommunityMember(
|
|
21
|
-
canOpenSpace(
|
|
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[]>;
|
|
22
29
|
}
|
|
23
30
|
interface CommunityReader {
|
|
24
|
-
getSpace(
|
|
25
|
-
listSpaces(
|
|
26
|
-
getDmSettings(
|
|
31
|
+
getSpace(spaceId: string, actor: Actor): Promise<SpaceView | null>;
|
|
32
|
+
listSpaces(communityId: string, actor: Actor): Promise<SpaceView[]>;
|
|
33
|
+
getDmSettings(communityId: string, actor: Actor): Promise<DmSettings | null>;
|
|
27
34
|
}
|
|
28
35
|
interface SpaceRowLock {
|
|
29
36
|
lockSpace(orgId: string, spaceId: string): Promise<Space | null>;
|
|
@@ -34,88 +41,112 @@ interface CommunityDigest {
|
|
|
34
41
|
digest: DigestSchedule;
|
|
35
42
|
}
|
|
36
43
|
interface CommunitiesService extends CommunityReader {
|
|
37
|
-
listCommunities(
|
|
38
|
-
getCommunity(
|
|
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>;
|
|
39
47
|
communitiesWithDigest(): Promise<CommunityDigest[]>;
|
|
40
|
-
listCommunitiesById(
|
|
41
|
-
getCommunitySpace(
|
|
42
|
-
createCommunity(
|
|
43
|
-
updateCommunity(
|
|
44
|
-
publishCommunity(
|
|
45
|
-
unpublishCommunity(
|
|
46
|
-
deleteCommunity(
|
|
47
|
-
patchCommunitySettings(
|
|
48
|
-
createSpace(
|
|
49
|
-
updateSpace(
|
|
50
|
-
deleteSpace(
|
|
51
|
-
reorderSpaces(
|
|
52
|
-
setSpaceTopics(
|
|
53
|
-
addSpaceLink(
|
|
54
|
-
removeSpaceLink(
|
|
55
|
-
reorderSpaceLinks(
|
|
48
|
+
listCommunitiesById(ids: string[], actor: Actor): Promise<Community[]>;
|
|
49
|
+
getCommunitySpace(communityId: string, spaceId: string, actor: Actor): Promise<SpaceView>;
|
|
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<SpaceView>;
|
|
57
|
+
updateSpace(communityId: string, spaceId: string, patch: UpdateSpaceInput, actor: Actor): Promise<SpaceView>;
|
|
58
|
+
deleteSpace(communityId: string, spaceId: string, actor: Actor): Promise<void>;
|
|
59
|
+
reorderSpaces(communityId: string, orderedIds: string[], actor: Actor): Promise<SpaceView[]>;
|
|
60
|
+
setSpaceTopics(communityId: string, spaceId: string, input: SetSpaceTopicsInput, actor: Actor): Promise<SpaceView>;
|
|
61
|
+
addSpaceLink(communityId: string, spaceId: string, contentId: string, actor: Actor): Promise<SpaceView>;
|
|
62
|
+
removeSpaceLink(communityId: string, spaceId: string, linkId: string, actor: Actor): Promise<SpaceView>;
|
|
63
|
+
reorderSpaceLinks(communityId: string, spaceId: string, orderedIds: string[], actor: Actor): Promise<SpaceView>;
|
|
56
64
|
}
|
|
57
65
|
interface CourseManagementService {
|
|
58
|
-
listCourses(
|
|
59
|
-
getCourse(
|
|
60
|
-
|
|
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>;
|
|
61
70
|
/** @throws NotFoundError when no course with this id exists in the org. */
|
|
62
|
-
updateCourse(
|
|
71
|
+
updateCourse(id: string, patch: UpdateCourseInput, actor: Actor): Promise<CourseView>;
|
|
63
72
|
/** @throws NotFoundError when no course with this id exists in the org. */
|
|
64
|
-
patchCourseSettings(
|
|
73
|
+
patchCourseSettings(id: string, value: Partial<CourseSettings>, actor: Actor): Promise<CourseSettings>;
|
|
65
74
|
/** @throws NotFoundError when no course with this id exists in the org. */
|
|
66
|
-
deleteCourse(
|
|
67
|
-
listCourseModules(
|
|
68
|
-
listCourseActivities(
|
|
69
|
-
listCourseActivityViews(
|
|
70
|
-
listCourseActivityAssets(
|
|
71
|
-
getActivity(
|
|
72
|
-
getModule(
|
|
73
|
-
reorderModules(
|
|
74
|
-
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[]>;
|
|
75
84
|
/** @throws NotFoundError when no such module exists in this course. */
|
|
76
|
-
updateModule(
|
|
85
|
+
updateModule(courseId: string, moduleId: string, title: string, actor: Actor): Promise<Module[]>;
|
|
77
86
|
/** @throws NotFoundError when no such module exists in this course. */
|
|
78
|
-
deleteModule(
|
|
87
|
+
deleteModule(courseId: string, moduleId: string, actor: Actor): Promise<Module[]>;
|
|
79
88
|
/** @throws NotFoundError when no such module exists in this course. */
|
|
80
|
-
reorderActivities(
|
|
89
|
+
reorderActivities(courseId: string, moduleId: string, orderedIds: string[], actor: Actor): Promise<Module[]>;
|
|
81
90
|
/** @throws NotFoundError when the module — or, on update, the activity — does not exist. */
|
|
82
|
-
saveActivity(
|
|
91
|
+
saveActivity(courseId: string, moduleId: string, input: SaveActivityInput, activityId: string | null, actor: Actor): Promise<Module[]>;
|
|
83
92
|
/** @throws NotFoundError when no such activity exists in this module. */
|
|
84
|
-
deleteActivity(
|
|
93
|
+
deleteActivity(courseId: string, moduleId: string, activityId: string, actor: Actor): Promise<Module[]>;
|
|
85
94
|
}
|
|
86
95
|
interface DownloadablesService {
|
|
87
|
-
listDownloads(
|
|
88
|
-
getDownload(
|
|
89
|
-
|
|
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>;
|
|
90
100
|
/** @throws NotFoundError when no download with this id exists in the org. */
|
|
91
|
-
updateDownload(
|
|
101
|
+
updateDownload(id: string, patch: UpdateDownloadInput, actor: Actor): Promise<DownloadView>;
|
|
92
102
|
/** @throws NotFoundError when no download with this id exists in the org. */
|
|
93
|
-
removeDownload(
|
|
94
|
-
listDownloadAssets(
|
|
95
|
-
addDownloadAsset(
|
|
96
|
-
removeDownloadAsset(
|
|
97
|
-
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[]>;
|
|
98
108
|
/** @throws ConflictError when assetIds is not exactly the download's current asset set. */
|
|
99
|
-
reorderDownloadAssets(
|
|
109
|
+
reorderDownloadAssets(downloadId: string, assetIds: string[], actor: Actor): Promise<DownloadFile[]>;
|
|
100
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[]>;
|
|
127
|
+
}
|
|
128
|
+
type EventPatch = Omit<UpdateEventInput, 'status' | 'settings'> & {
|
|
129
|
+
status?: EventStatus;
|
|
130
|
+
};
|
|
101
131
|
interface BundlesService {
|
|
102
|
-
listBundles(
|
|
103
|
-
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>;
|
|
104
135
|
/** Bundle and its initial items are created together, or not at all.
|
|
105
136
|
* @throws NotFoundError when an initial content id does not exist in the org. */
|
|
106
|
-
createBundle(
|
|
137
|
+
createBundle(input: CreateBundleInput, actor: Actor): Promise<Bundle>;
|
|
107
138
|
/** @throws NotFoundError when no bundle with this id exists in the org. */
|
|
108
|
-
updateBundle(
|
|
139
|
+
updateBundle(id: string, patch: UpdateBundleInput, actor: Actor): Promise<Bundle>;
|
|
109
140
|
/** @throws NotFoundError when no bundle with this id exists in the org. */
|
|
110
|
-
deleteBundle(
|
|
111
|
-
listBundleItems(
|
|
141
|
+
deleteBundle(id: string, actor: Actor): Promise<void>;
|
|
142
|
+
listBundleItems(bundleId: string, actor: Actor): Promise<BundleItem[]>;
|
|
112
143
|
/** @throws NotFoundError when the bundle — or the content — does not exist in the org. */
|
|
113
|
-
addBundleItem(
|
|
144
|
+
addBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
114
145
|
/** @throws NotFoundError when no bundle with this id exists in the org. */
|
|
115
|
-
removeBundleItem(
|
|
146
|
+
removeBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
116
147
|
}
|
|
117
148
|
interface ContentRepository {
|
|
118
|
-
listCourses(orgId: string, query: ListCoursesQuery): Promise<Page<Course>>;
|
|
149
|
+
listCourses(orgId: string, query: ListCoursesQuery, ids?: string[]): Promise<Page<Course>>;
|
|
119
150
|
findCourseById(orgId: string, id: string): Promise<Course | null>;
|
|
120
151
|
createCourse(orgId: string, input: CreateCourseInput, slug: string): Promise<Course>;
|
|
121
152
|
updateCourse(orgId: string, id: string, patch: UpdateCourseInput): Promise<Course | null>;
|
|
@@ -136,7 +167,7 @@ interface ContentRepository {
|
|
|
136
167
|
activity: Activity;
|
|
137
168
|
}>;
|
|
138
169
|
deleteActivity(orgId: string, courseId: string, moduleId: string, activityId: string): Promise<Module[]>;
|
|
139
|
-
listDownloads(orgId: string, query: ListDownloadsQuery): Promise<Page<Download>>;
|
|
170
|
+
listDownloads(orgId: string, query: ListDownloadsQuery, ids?: string[]): Promise<Page<Download>>;
|
|
140
171
|
getDownload(orgId: string, id: string): Promise<Download | null>;
|
|
141
172
|
createDownload(orgId: string, input: CreateDownloadInput, slug: string): Promise<Download>;
|
|
142
173
|
updateDownload(orgId: string, id: string, patch: UpdateDownloadInput): Promise<Download | null>;
|
|
@@ -146,6 +177,20 @@ interface ContentRepository {
|
|
|
146
177
|
removeDownloadAsset(orgId: string, downloadId: string, assetId: string): Promise<DownloadAsset[]>;
|
|
147
178
|
renameDownloadAsset(orgId: string, downloadId: string, assetId: string, displayName: string | null): Promise<DownloadAsset[]>;
|
|
148
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[]>;
|
|
149
194
|
listBundles(orgId: string, query: ListBundlesQuery): Promise<Page<Bundle>>;
|
|
150
195
|
findBundleById(orgId: string, id: string): Promise<Bundle | null>;
|
|
151
196
|
createBundle(orgId: string, input: CreateBundleInput): Promise<Bundle>;
|
|
@@ -155,7 +200,7 @@ interface ContentRepository {
|
|
|
155
200
|
/** Content already in the bundle is left as it is — adding twice is a no-op. */
|
|
156
201
|
addBundleItem(orgId: string, bundleId: string, contentId: string): Promise<BundleItem[]>;
|
|
157
202
|
removeBundleItem(orgId: string, bundleId: string, contentId: string): Promise<BundleItem[]>;
|
|
158
|
-
listCommunities(orgId: string, query: ListCommunitiesQuery): Promise<Page<Community>>;
|
|
203
|
+
listCommunities(orgId: string, query: ListCommunitiesQuery, ids?: string[]): Promise<Page<Community>>;
|
|
159
204
|
findCommunityById(orgId: string, id: string): Promise<Community | null>;
|
|
160
205
|
findCommunitiesByIds(orgId: string, ids: string[]): Promise<Community[]>;
|
|
161
206
|
communitiesWithDigest(): Promise<CommunityDigest[]>;
|
|
@@ -184,5 +229,5 @@ interface ContentTxScope {
|
|
|
184
229
|
}
|
|
185
230
|
type ContentUnitOfWork = UnitOfWork<ContentTxScope>;
|
|
186
231
|
//#endregion
|
|
187
|
-
export { BundlesService, CommunitiesService, CommunityDigest, CommunityReader, ContentRepository, ContentService, ContentTxScope, ContentUnitOfWork, CourseManagementService, DownloadablesService, ItemTitle, ItemTitleAccess, ItemTitles, SpaceRowLock };
|
|
232
|
+
export { BundlesService, CommunitiesService, CommunityDigest, CommunityReader, ContentAssetReader, ContentRepository, ContentService, ContentTxScope, ContentUnitOfWork, CourseManagementService, DownloadablesService, EventPatch, EventsService, ItemTitle, ItemTitleAccess, ItemTitles, LibraryAssetRef, SpaceRowLock };
|
|
188
233
|
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -1,98 +1,134 @@
|
|
|
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, PatchCommunitySettingsInput, SaveActivityInput, SetSpaceTopicsInput,
|
|
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, SpaceView, 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, CommunityDigest, 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' | 'syncPublicImages'>;
|
|
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;
|
|
37
|
+
private spaceView;
|
|
38
|
+
private communityPublished;
|
|
39
|
+
private oneSpaceView;
|
|
40
|
+
private syncSpaceImages;
|
|
30
41
|
private pageWithThumbnails;
|
|
31
42
|
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
|
-
|
|
43
|
+
private eventFiles;
|
|
44
|
+
private assertAttachable;
|
|
45
|
+
private courseAssetIds;
|
|
46
|
+
private downloadAssetIds;
|
|
47
|
+
private eventAssetIds;
|
|
48
|
+
listCourses(query: ListCoursesQuery, actor: Actor): Promise<Page<CourseView>>;
|
|
49
|
+
getCourse(id: string, actor: Actor): Promise<CourseView>;
|
|
50
|
+
findCourse(id: string, actor: Actor): Promise<CourseView | null>;
|
|
51
|
+
createCourse(input: CreateCourseInput, actor: Actor): Promise<CourseView>;
|
|
52
|
+
updateCourse(id: string, patch: UpdateCourseInput, actor: Actor): Promise<CourseView>;
|
|
53
|
+
patchCourseSettings(id: string, value: Partial<CourseSettings>, actor: Actor): Promise<CourseSettings>;
|
|
54
|
+
deleteCourse(id: string, actor: Actor): Promise<void>;
|
|
55
|
+
listCourseModules(courseId: string, actor: Actor): Promise<Module[]>;
|
|
56
|
+
listCourseActivities(courseId: string, actor: Actor): Promise<Activity[]>;
|
|
57
|
+
listCourseActivityViews(courseId: string, actor: Actor): Promise<ActivityView[]>;
|
|
58
|
+
listCourseActivityAssets(courseId: string, actor: Actor): Promise<ActivityAsset[]>;
|
|
59
|
+
getActivity(activityId: string, actor: Actor): Promise<Activity | null>;
|
|
60
|
+
getModule(moduleId: string, actor: Actor): Promise<Module | null>;
|
|
61
|
+
reorderModules(courseId: string, orderedIds: string[], actor: Actor): Promise<Module[]>;
|
|
62
|
+
createModule(courseId: string, title: string, actor: Actor): Promise<Module[]>;
|
|
63
|
+
updateModule(courseId: string, moduleId: string, title: string, actor: Actor): Promise<Module[]>;
|
|
64
|
+
deleteModule(courseId: string, moduleId: string, actor: Actor): Promise<Module[]>;
|
|
65
|
+
reorderActivities(courseId: string, moduleId: string, orderedIds: string[], actor: Actor): Promise<Module[]>;
|
|
66
|
+
saveActivity(courseId: string, moduleId: string, input: SaveActivityInput, activityId: string | null, actor: Actor): Promise<Module[]>;
|
|
67
|
+
deleteActivity(courseId: string, moduleId: string, activityId: string, actor: Actor): Promise<Module[]>;
|
|
68
|
+
listDownloads(query: ListDownloadsQuery, actor: Actor): Promise<Page<DownloadView>>;
|
|
69
|
+
getDownload(id: string, actor: Actor): Promise<DownloadView>;
|
|
70
|
+
findDownload(id: string, actor: Actor): Promise<DownloadView | null>;
|
|
71
|
+
createDownload(input: CreateDownloadInput, actor: Actor): Promise<DownloadView>;
|
|
72
|
+
updateDownload(id: string, patch: UpdateDownloadInput, actor: Actor): Promise<DownloadView>;
|
|
73
|
+
removeDownload(id: string, actor: Actor): Promise<void>;
|
|
74
|
+
listDownloadAssets(downloadId: string, actor: Actor): Promise<DownloadFile[]>;
|
|
75
|
+
addDownloadAsset(downloadId: string, input: AddDownloadAssetInput, actor: Actor): Promise<DownloadFile[]>;
|
|
76
|
+
removeDownloadAsset(downloadId: string, assetId: string, actor: Actor): Promise<DownloadFile[]>;
|
|
77
|
+
renameDownloadAsset(downloadId: string, assetId: string, displayName: string | null, actor: Actor): Promise<DownloadFile[]>;
|
|
61
78
|
/** The caller must send the COMPLETE ordered set — a partial list would
|
|
62
79
|
* silently unlink whatever it omitted. */
|
|
63
|
-
reorderDownloadAssets(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
80
|
+
reorderDownloadAssets(downloadId: string, assetIds: string[], actor: Actor): Promise<DownloadFile[]>;
|
|
81
|
+
listEvents(query: ListEventsQuery, actor: Actor): Promise<Page<EventView>>;
|
|
82
|
+
getEvent(id: string, actor: Actor): Promise<EventView>;
|
|
83
|
+
findEvent(id: string, actor: Actor): Promise<EventView | null>;
|
|
84
|
+
findEvents(ids: string[], actor: Actor): Promise<EventView[]>;
|
|
85
|
+
createEvent(input: CreateEventInput, actor: Actor): Promise<EventView>;
|
|
86
|
+
updateEvent(id: string, patch: UpdateEventInput, actor: Actor): Promise<EventView>;
|
|
87
|
+
cancelEvent(id: string, actor: Actor): Promise<EventView>;
|
|
88
|
+
deleteEvent(id: string, actor: Actor): Promise<void>;
|
|
89
|
+
startingSoon(orgId: string, eventId: string, lead: EventLead, now: Date): Promise<void>;
|
|
90
|
+
private scheduleStartingSoon;
|
|
91
|
+
private cancelStartingSoon;
|
|
92
|
+
listEventAssets(eventId: string, actor: Actor): Promise<EventFile[]>;
|
|
93
|
+
eventFilesFor(eventIds: string[], actor: Actor): Promise<Record<string, EventFile[]>>;
|
|
94
|
+
addEventAsset(eventId: string, input: AddEventAssetInput, actor: Actor): Promise<EventFile[]>;
|
|
95
|
+
removeEventAsset(eventId: string, assetId: string, actor: Actor): Promise<EventFile[]>;
|
|
96
|
+
renameEventAsset(eventId: string, assetId: string, displayName: string | null, actor: Actor): Promise<EventFile[]>;
|
|
97
|
+
reorderEventAssets(eventId: string, assetIds: string[], actor: Actor): Promise<EventFile[]>;
|
|
98
|
+
listBundles(query: ListBundlesQuery, actor: Actor): Promise<Page<Bundle>>;
|
|
99
|
+
getBundle(id: string, actor: Actor): Promise<Bundle>;
|
|
100
|
+
findBundle(id: string, actor: Actor): Promise<Bundle | null>;
|
|
101
|
+
createBundle(input: CreateBundleInput, actor: Actor): Promise<Bundle>;
|
|
102
|
+
updateBundle(id: string, patch: UpdateBundleInput, actor: Actor): Promise<Bundle>;
|
|
103
|
+
deleteBundle(id: string, actor: Actor): Promise<void>;
|
|
104
|
+
listBundleItems(bundleId: string, actor: Actor): Promise<BundleItem[]>;
|
|
105
|
+
addBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
106
|
+
removeBundleItem(bundleId: string, contentId: string, actor: Actor): Promise<BundleItem[]>;
|
|
72
107
|
private spaceUpdates;
|
|
73
108
|
private resolvedSpace;
|
|
74
|
-
listCommunities(
|
|
75
|
-
getCommunity(
|
|
109
|
+
listCommunities(query: ListCommunitiesQuery, actor: Actor): Promise<Page<CommunityView>>;
|
|
110
|
+
getCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
111
|
+
findCommunity(id: string, actor: Actor): Promise<CommunityView | null>;
|
|
76
112
|
communitiesWithDigest(): Promise<CommunityDigest[]>;
|
|
77
|
-
listCommunitiesById(
|
|
78
|
-
getSpace(
|
|
79
|
-
getCommunitySpace(
|
|
80
|
-
listSpaces(
|
|
81
|
-
getDmSettings(
|
|
82
|
-
createCommunity(
|
|
83
|
-
updateCommunity(
|
|
84
|
-
publishCommunity(
|
|
85
|
-
unpublishCommunity(
|
|
86
|
-
deleteCommunity(
|
|
87
|
-
patchCommunitySettings(
|
|
88
|
-
createSpace(
|
|
89
|
-
updateSpace(
|
|
90
|
-
deleteSpace(
|
|
91
|
-
reorderSpaces(
|
|
92
|
-
setSpaceTopics(
|
|
93
|
-
addSpaceLink(
|
|
94
|
-
removeSpaceLink(
|
|
95
|
-
reorderSpaceLinks(
|
|
113
|
+
listCommunitiesById(ids: string[], actor: Actor): Promise<Community[]>;
|
|
114
|
+
getSpace(spaceId: string, actor: Actor): Promise<SpaceView | null>;
|
|
115
|
+
getCommunitySpace(communityId: string, spaceId: string, actor: Actor): Promise<SpaceView>;
|
|
116
|
+
listSpaces(communityId: string, actor: Actor): Promise<SpaceView[]>;
|
|
117
|
+
getDmSettings(communityId: string, actor: Actor): Promise<DmSettings | null>;
|
|
118
|
+
createCommunity(input: CreateCommunityInput, actor: Actor): Promise<CommunityView>;
|
|
119
|
+
updateCommunity(id: string, patch: UpdateCommunityInput, actor: Actor): Promise<CommunityView>;
|
|
120
|
+
publishCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
121
|
+
unpublishCommunity(id: string, actor: Actor): Promise<CommunityView>;
|
|
122
|
+
deleteCommunity(id: string, actor: Actor): Promise<void>;
|
|
123
|
+
patchCommunitySettings(id: string, patch: PatchCommunitySettingsInput, actor: Actor): Promise<CommunityView>;
|
|
124
|
+
createSpace(communityId: string, input: CreateSpaceInput, actor: Actor): Promise<SpaceView>;
|
|
125
|
+
updateSpace(communityId: string, spaceId: string, patch: UpdateSpaceInput, actor: Actor): Promise<SpaceView>;
|
|
126
|
+
deleteSpace(communityId: string, spaceId: string, actor: Actor): Promise<void>;
|
|
127
|
+
reorderSpaces(communityId: string, orderedIds: string[], actor: Actor): Promise<SpaceView[]>;
|
|
128
|
+
setSpaceTopics(communityId: string, spaceId: string, input: SetSpaceTopicsInput, actor: Actor): Promise<SpaceView>;
|
|
129
|
+
addSpaceLink(communityId: string, spaceId: string, contentId: string, actor: Actor): Promise<SpaceView>;
|
|
130
|
+
removeSpaceLink(communityId: string, spaceId: string, linkId: string, actor: Actor): Promise<SpaceView>;
|
|
131
|
+
reorderSpaceLinks(communityId: string, spaceId: string, orderedIds: string[], actor: Actor): Promise<SpaceView>;
|
|
96
132
|
}
|
|
97
133
|
//#endregion
|
|
98
134
|
export { ContentService, ContentServiceParams };
|