@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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Page } from "../types/shared.js";
|
|
2
|
+
import { Logger } from "../types/ports.js";
|
|
3
|
+
import { SpaceDetail } from "../types/schemas/content.js";
|
|
4
|
+
import { Post, PostFlag, PostFlagResolution, PostView, ReactionEmoji } from "../types/schemas/discussion.js";
|
|
5
|
+
import "../types/index.js";
|
|
6
|
+
import "../shared/ports.js";
|
|
7
|
+
import { FileUrls } from "../assets/file-urls.js";
|
|
8
|
+
import { AssetFiles, MemberImageReader } from "../assets/ports.js";
|
|
9
|
+
import "../assets/index.js";
|
|
10
|
+
import { Actor } from "../shared/actor.js";
|
|
11
|
+
import { CommunityReader } from "../content/ports.js";
|
|
12
|
+
import "../content/index.js";
|
|
13
|
+
import { CommunityAccessReader } from "../entitlements/ports.js";
|
|
14
|
+
import "../entitlements/index.js";
|
|
15
|
+
import "./types.js";
|
|
16
|
+
import { AuthorProfileReader, AuthorRoleReader, CreatePostInput, FeedQuery, PageQuery, PostCommentReader, PostReactions, PostRepository, PostService, PostUnitOfWork, SpaceModerationQueue, UpdatePostInput } from "./ports.js";
|
|
17
|
+
//#region src/discussion/posts.d.ts
|
|
18
|
+
type PostServiceParams = {
|
|
19
|
+
repo: PostRepository;
|
|
20
|
+
access: CommunityAccessReader;
|
|
21
|
+
content: CommunityReader;
|
|
22
|
+
authors: AuthorRoleReader;
|
|
23
|
+
profiles: AuthorProfileReader;
|
|
24
|
+
comments: PostCommentReader;
|
|
25
|
+
images: MemberImageReader & Pick<AssetFiles, 'signFile'>;
|
|
26
|
+
fileUrls: FileUrls;
|
|
27
|
+
uow: PostUnitOfWork;
|
|
28
|
+
logger?: Logger;
|
|
29
|
+
};
|
|
30
|
+
declare class PostServiceImpl implements PostService {
|
|
31
|
+
private readonly repo;
|
|
32
|
+
private readonly access;
|
|
33
|
+
private readonly content;
|
|
34
|
+
private readonly authors;
|
|
35
|
+
private readonly profiles;
|
|
36
|
+
private readonly comments;
|
|
37
|
+
private readonly images;
|
|
38
|
+
private readonly fileUrls;
|
|
39
|
+
private readonly uow;
|
|
40
|
+
private readonly logger;
|
|
41
|
+
constructor(params: PostServiceParams);
|
|
42
|
+
visibleTitles(orgId: string, actor: Actor, postIds: string[]): Promise<Record<string, string>>;
|
|
43
|
+
create(orgId: string, actor: Actor, input: CreatePostInput): Promise<PostView>;
|
|
44
|
+
update(orgId: string, postId: string, actor: Actor, patch: UpdatePostInput): Promise<PostView>;
|
|
45
|
+
submit(orgId: string, postId: string, actor: Actor): Promise<PostView>;
|
|
46
|
+
schedule(orgId: string, postId: string, actor: Actor, scheduledAt: Date): Promise<PostView>;
|
|
47
|
+
approve(orgId: string, postId: string, actor: Actor, communityId?: string): Promise<PostView>;
|
|
48
|
+
remove(orgId: string, postId: string, actor: Actor, communityId?: string): Promise<PostView>;
|
|
49
|
+
restore(orgId: string, postId: string, actor: Actor, communityId?: string): Promise<PostView>;
|
|
50
|
+
pin(orgId: string, postId: string, actor: Actor): Promise<PostView>;
|
|
51
|
+
unpin(orgId: string, postId: string, actor: Actor): Promise<PostView>;
|
|
52
|
+
closeComments(orgId: string, postId: string, actor: Actor): Promise<PostView>;
|
|
53
|
+
openComments(orgId: string, postId: string, actor: Actor): Promise<PostView>;
|
|
54
|
+
setReactions(orgId: string, postId: string, actor: Actor, enabled: boolean): Promise<PostView>;
|
|
55
|
+
setReaction(orgId: string, postId: string, actor: Actor, emoji: ReactionEmoji | null): Promise<PostReactions>;
|
|
56
|
+
follow(orgId: string, postId: string, actor: Actor): Promise<void>;
|
|
57
|
+
unfollow(orgId: string, postId: string, actor: Actor): Promise<void>;
|
|
58
|
+
bookmark(orgId: string, postId: string, actor: Actor): Promise<void>;
|
|
59
|
+
unbookmark(orgId: string, postId: string, actor: Actor): Promise<void>;
|
|
60
|
+
flag(orgId: string, postId: string, actor: Actor, reason: string): Promise<PostFlag>;
|
|
61
|
+
resolveFlags(orgId: string, postId: string, actor: Actor, resolution: Extract<PostFlagResolution, 'dismissed'>, communityId?: string): Promise<void>;
|
|
62
|
+
spaceFeed(orgId: string, actor: Actor, communityId: string, spaceId: string, query: FeedQuery): Promise<Page<PostView>>;
|
|
63
|
+
memberFeed(orgId: string, actor: Actor, communityId: string, query: Pick<FeedQuery, 'page' | 'pageSize'>): Promise<Page<PostView>>;
|
|
64
|
+
private openSpaceIdsIn;
|
|
65
|
+
listOwn(orgId: string, actor: Actor, communityId: string, query: PageQuery): Promise<Page<PostView>>;
|
|
66
|
+
listBookmarked(orgId: string, actor: Actor, communityId: string, query: PageQuery): Promise<Page<PostView>>;
|
|
67
|
+
coverFile(orgId: string, actor: Actor, postId: string): Promise<string | null>;
|
|
68
|
+
getPost(orgId: string, actor: Actor, postId: string): Promise<PostView>;
|
|
69
|
+
moderationQueue(orgId: string, actor: Actor, communityId: string, spaceId: string): Promise<SpaceModerationQueue>;
|
|
70
|
+
visible(orgId: string, actor: Actor, postId: string): Promise<{
|
|
71
|
+
post: Post;
|
|
72
|
+
space: SpaceDetail;
|
|
73
|
+
}>;
|
|
74
|
+
find(orgId: string, postId: string): Promise<Post | null>;
|
|
75
|
+
followerIds(orgId: string, postId: string): Promise<string[]>;
|
|
76
|
+
hasDue(orgId: string, now: Date): Promise<boolean>;
|
|
77
|
+
publishDue(orgId: string, now: Date): Promise<void>;
|
|
78
|
+
private submitDue;
|
|
79
|
+
private submittable;
|
|
80
|
+
private feedPage;
|
|
81
|
+
private viewOf;
|
|
82
|
+
private viewsOf;
|
|
83
|
+
private commitSubmission;
|
|
84
|
+
private moderate;
|
|
85
|
+
private mustUpdate;
|
|
86
|
+
private initial;
|
|
87
|
+
private submissionOf;
|
|
88
|
+
private requireOwnedImage;
|
|
89
|
+
private openSpace;
|
|
90
|
+
private requireOpen;
|
|
91
|
+
private loadVisible;
|
|
92
|
+
private canSee;
|
|
93
|
+
private visibleStatuses;
|
|
94
|
+
private canModerate;
|
|
95
|
+
private assertAuthor;
|
|
96
|
+
private topicFits;
|
|
97
|
+
private assertTopic;
|
|
98
|
+
private patchChanges;
|
|
99
|
+
private meta;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { PostServiceImpl, PostServiceParams };
|
|
103
|
+
//# sourceMappingURL=posts.d.ts.map
|