@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authors.js","names":[],"sources":["../../src/discussion/authors.ts"],"sourcesContent":["import type { FileUrls } from '../assets/index.js';\nimport type { CommentAuthor } from './model.js';\nimport type { AuthorRecord } from './ports.js';\n\nfunction imageOf(orgId: string, record: AuthorRecord): string | null {\n return record.imageAssetOrgId === orgId ? record.imageAssetId : null;\n}\n\nexport function
|
|
1
|
+
{"version":3,"file":"authors.js","names":[],"sources":["../../src/discussion/authors.ts"],"sourcesContent":["import type { FileUrls } from '../assets/index.js';\nimport type { CommentAuthor } from './model.js';\nimport type { AuthorRecord } from './ports.js';\nimport type { TeamBadge } from './rules.js';\n\nfunction imageOf(orgId: string, record: AuthorRecord): string | null {\n return record.imageAssetOrgId === orgId ? record.imageAssetId : null;\n}\n\nexport function authorName(record: AuthorRecord): string | null {\n const fullName = [record.firstName, record.lastName].filter(Boolean).join(' ');\n return record.displayName?.trim() || fullName || null;\n}\n\nexport function authorView(\n orgId: string,\n record: AuthorRecord,\n fileUrls: FileUrls,\n badge: TeamBadge,\n): CommentAuthor {\n const imageAssetId = imageOf(orgId, record);\n return {\n id: record.id,\n firstName: record.firstName,\n lastName: record.lastName,\n displayName: authorName(record),\n headline: record.headline,\n image: record.image,\n imageAssetId,\n imageUrl: imageAssetId ? fileUrls.publicImage(orgId, record.id, imageAssetId) : null,\n team: badge.team,\n roleName: badge.roleName,\n };\n}\n"],"mappings":";AAKA,SAAS,QAAQ,OAAe,QAAqC;CACnE,OAAO,OAAO,oBAAoB,QAAQ,OAAO,eAAe;AAClE;AAEA,SAAgB,WAAW,QAAqC;CAC9D,MAAM,WAAW,CAAC,OAAO,WAAW,OAAO,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAC7E,OAAO,OAAO,aAAa,KAAK,KAAK,YAAY;AACnD;AAEA,SAAgB,WACd,OACA,QACA,UACA,OACe;CACf,MAAM,eAAe,QAAQ,OAAO,MAAM;CAC1C,OAAO;EACL,IAAI,OAAO;EACX,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,aAAa,WAAW,MAAM;EAC9B,UAAU,OAAO;EACjB,OAAO,OAAO;EACd;EACA,UAAU,eAAe,SAAS,YAAY,OAAO,OAAO,IAAI,YAAY,IAAI;EAChF,MAAM,MAAM;EACZ,UAAU,MAAM;CAClB;AACF"}
|
|
@@ -1,79 +1,102 @@
|
|
|
1
1
|
import { Page } from "../types/shared.js";
|
|
2
2
|
import { Logger } from "../types/ports.js";
|
|
3
|
-
import { Chat, ChatUser, MessageFlag, MessageFlagResolution, MessageView, ReactionEmoji } from "../types/schemas/discussion.js";
|
|
3
|
+
import { Chat, ChatLiveEvent, ChatUnreadSummary, ChatUser, LiveMessage, Message, MessageFlag, MessageFlagResolution, MessageView, ReactionCounts, ReactionEmoji } from "../types/schemas/discussion.js";
|
|
4
4
|
import "../types/index.js";
|
|
5
|
-
import "../shared/
|
|
5
|
+
import { Actor } from "../shared/actor.js";
|
|
6
|
+
import { PubSub } from "../shared/ports.js";
|
|
6
7
|
import { FileUrls } from "../assets/file-urls.js";
|
|
7
8
|
import { AssetFiles, MemberImageReader } from "../assets/ports.js";
|
|
8
9
|
import "../assets/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "../content/index.js";
|
|
12
|
-
import { CommunityAccessReader } from "../entitlements/ports.js";
|
|
13
|
-
import "../entitlements/index.js";
|
|
14
|
-
import { AuthorProfileReader, AuthorRoleReader, ChatListItem, ChatRepository, ChatService, ChatUnitOfWork, MessageQueue, MessageReactions, PageQuery, SendMessageInput, StartDirectInput, StartGroupInput } from "./ports.js";
|
|
10
|
+
import { AuthorPermissionReader, AuthorProfileReader, ChatListItem, ChatListQuery, ChatLiveReads, ChatMemberStates, ChatRepository, ChatService, ChatUnitOfWork, ChatUnread, CommunityAccess, LiveChat, MentionsRepository, MessageQueue, MessageReactions, SendMessageInput, SpaceReader, StartDirectInput, StartGroupInput, SubscriptionsRepository } from "./ports.js";
|
|
11
|
+
import { ChatHub, ChatHubOptions } from "./live.js";
|
|
15
12
|
//#region src/discussion/chats.d.ts
|
|
16
13
|
type ChatServiceParams = {
|
|
17
14
|
repo: ChatRepository;
|
|
18
|
-
access:
|
|
19
|
-
content:
|
|
20
|
-
authors:
|
|
15
|
+
access: CommunityAccess;
|
|
16
|
+
content: Pick<SpaceReader, 'getDmSettings'>;
|
|
17
|
+
authors: AuthorPermissionReader;
|
|
21
18
|
profiles: AuthorProfileReader;
|
|
19
|
+
subscriptions: SubscriptionsRepository;
|
|
20
|
+
mentions: MentionsRepository;
|
|
22
21
|
images: MemberImageReader & Pick<AssetFiles, 'signFile'>;
|
|
23
22
|
fileUrls: FileUrls;
|
|
24
23
|
uow: ChatUnitOfWork;
|
|
24
|
+
pubsub?: PubSub;
|
|
25
|
+
live?: ChatHubOptions;
|
|
25
26
|
logger?: Logger;
|
|
26
27
|
};
|
|
27
|
-
declare class ChatServiceImpl implements ChatService {
|
|
28
|
+
declare class ChatServiceImpl implements ChatService, ChatLiveReads {
|
|
29
|
+
/** This process's live chat hub; null without a PubSub. */
|
|
30
|
+
readonly hub: ChatHub | null;
|
|
28
31
|
private readonly repo;
|
|
29
32
|
private readonly access;
|
|
30
33
|
private readonly content;
|
|
31
34
|
private readonly authors;
|
|
32
35
|
private readonly profiles;
|
|
36
|
+
private readonly subscriptions;
|
|
37
|
+
private readonly mentions;
|
|
33
38
|
private readonly images;
|
|
34
39
|
private readonly fileUrls;
|
|
35
40
|
private readonly uow;
|
|
41
|
+
private readonly pubsub;
|
|
36
42
|
private readonly logger;
|
|
43
|
+
private readonly typed;
|
|
37
44
|
constructor(params: ChatServiceParams);
|
|
38
|
-
startDirect(
|
|
39
|
-
startGroup(
|
|
40
|
-
addParticipant(
|
|
41
|
-
leave(
|
|
42
|
-
accept(
|
|
43
|
-
send(
|
|
44
|
-
editMessage(
|
|
45
|
-
deleteMessage(
|
|
46
|
-
setReaction(
|
|
47
|
-
markRead(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
startDirect(input: StartDirectInput, actor: Actor): Promise<Chat>;
|
|
46
|
+
startGroup(input: StartGroupInput, actor: Actor): Promise<Chat>;
|
|
47
|
+
addParticipant(chatId: string, orgUserId: string, actor: Actor): Promise<Chat>;
|
|
48
|
+
leave(chatId: string, actor: Actor): Promise<Chat>;
|
|
49
|
+
accept(chatId: string, actor: Actor): Promise<Chat>;
|
|
50
|
+
send(chatId: string, input: SendMessageInput, actor: Actor): Promise<MessageView>;
|
|
51
|
+
editMessage(messageId: string, body: string, actor: Actor): Promise<MessageView>;
|
|
52
|
+
deleteMessage(messageId: string, actor: Actor): Promise<MessageView>;
|
|
53
|
+
setReaction(messageId: string, emoji: ReactionEmoji | null, actor: Actor): Promise<MessageReactions>;
|
|
54
|
+
markRead(chatId: string, messageId: string, actor: Actor): Promise<void>;
|
|
55
|
+
block(communityId: string, orgUserId: string, actor: Actor): Promise<void>;
|
|
56
|
+
unblock(communityId: string, orgUserId: string, actor: Actor): Promise<void>;
|
|
57
|
+
flagMessage(messageId: string, reason: string, actor: Actor): Promise<MessageFlag>;
|
|
58
|
+
resolveMessageFlags(messageId: string, resolution: Extract<MessageFlagResolution, 'dismissed'>, communityId: string | null, actor: Actor): Promise<void>;
|
|
59
|
+
lock(chatId: string, communityId: string | null, actor: Actor): Promise<Chat>;
|
|
60
|
+
unlock(chatId: string, communityId: string | null, actor: Actor): Promise<Chat>;
|
|
61
|
+
listChats(communityId: string, query: ChatListQuery, actor: Actor): Promise<Page<ChatListItem>>;
|
|
62
|
+
chat(chatId: string, actor: Actor): Promise<ChatListItem>;
|
|
63
|
+
directChat(communityId: string, orgUserId: string, actor: Actor): Promise<ChatListItem>;
|
|
64
|
+
unreadSummary(communityId: string, actor: Actor): Promise<ChatUnreadSummary>;
|
|
65
|
+
typing(chatId: string, actor: Actor): Promise<void>;
|
|
66
|
+
watch(communityId: string, actor: Actor): Promise<AsyncIterable<ChatLiveEvent>>;
|
|
67
|
+
messageViews(orgId: string, messageIds: string[]): Promise<LiveMessage[]>;
|
|
68
|
+
activeParticipants(orgId: string, chatId: string): Promise<string[]>;
|
|
69
|
+
messageReactions(orgId: string, messageId: string): Promise<ReactionCounts>;
|
|
70
|
+
liveChat(orgId: string, chatId: string): Promise<LiveChat | null>;
|
|
71
|
+
memberStates(orgId: string, communityId: string, orgUserIds: string[]): Promise<ChatMemberStates[]>;
|
|
72
|
+
messages(chatId: string, query: {
|
|
58
73
|
page: number;
|
|
59
74
|
pageSize: number;
|
|
60
|
-
}): Promise<Page<MessageView>>;
|
|
61
|
-
attachmentFile(
|
|
62
|
-
messageQueue(
|
|
75
|
+
}, actor: Actor): Promise<Page<MessageView>>;
|
|
76
|
+
attachmentFile(chatId: string, messageId: string, assetId: string, actor: Actor): Promise<string>;
|
|
77
|
+
messageQueue(communityId: string, actor: Actor): Promise<MessageQueue>;
|
|
63
78
|
chatSummary(orgId: string, chatId: string): Promise<{
|
|
64
79
|
chat: Chat;
|
|
65
80
|
participants: ChatUser[];
|
|
66
81
|
} | null>;
|
|
67
|
-
titlesFor(
|
|
82
|
+
titlesFor(chatIds: string[], actor: Actor): Promise<Record<string, string>>;
|
|
83
|
+
unreadInChat(orgId: string, chatId: string, orgUserId: string): Promise<ChatUnread>;
|
|
84
|
+
findMessage(orgId: string, messageId: string): Promise<Message | null>;
|
|
68
85
|
latestMessageBody(orgId: string, chatId: string): Promise<string | null>;
|
|
69
86
|
isBlocked(orgId: string, communityId: string, a: string, b: string): Promise<boolean>;
|
|
70
87
|
private setLock;
|
|
88
|
+
private requireModerator;
|
|
71
89
|
private requireSettings;
|
|
72
90
|
private requireActor;
|
|
91
|
+
/** Whether the person is team in the community; throws when they are not a
|
|
92
|
+
* member of it. */
|
|
73
93
|
private requirePerson;
|
|
74
|
-
|
|
75
|
-
|
|
94
|
+
/** Each member of the community among the given people, with whether they
|
|
95
|
+
* are team there. People who are not members are left out. */
|
|
96
|
+
private membersTeam;
|
|
97
|
+
private teamsOf;
|
|
76
98
|
private assertMaySend;
|
|
99
|
+
private mentionable;
|
|
77
100
|
private writeMessage;
|
|
78
101
|
private assertMayMessage;
|
|
79
102
|
private assertGroup;
|
|
@@ -97,7 +120,8 @@ declare class ChatServiceImpl implements ChatService {
|
|
|
97
120
|
private sentEvent;
|
|
98
121
|
private viewOf;
|
|
99
122
|
private withSenders;
|
|
100
|
-
private
|
|
123
|
+
private listItems;
|
|
124
|
+
private participantsOf;
|
|
101
125
|
}
|
|
102
126
|
//#endregion
|
|
103
127
|
export { ChatServiceImpl, ChatServiceParams };
|