@devanachat/sdk 0.0.0-stage → 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/CHANGELOG.md +37 -0
- package/LICENSE +21 -0
- package/README.md +391 -2
- package/build/index.cjs.js +3559 -0
- package/build/index.cjs.js.map +1 -0
- package/build/index.mjs +3517 -0
- package/build/index.mjs.map +1 -0
- package/build/index.umd.js +2 -0
- package/build/index.umd.js.map +1 -0
- package/build/types/AbstractChatClient.d.ts +182 -0
- package/build/types/AbstractRestClient.d.ts +21 -0
- package/build/types/EventTarget.d.ts +32 -0
- package/build/types/FilesClient.d.ts +16 -0
- package/build/types/IndexedObjectCollection.d.ts +66 -0
- package/build/types/Permissions.d.ts +109 -0
- package/build/types/WebApiChatClient.d.ts +38 -0
- package/build/types/WebSocketChatClient.d.ts +110 -0
- package/build/types/index.d.ts +19 -0
- package/build/types/protocol/index.d.ts +163 -0
- package/build/types/protocol/schemes/BanObject.d.ts +14 -0
- package/build/types/protocol/schemes/ChatLocation.d.ts +5 -0
- package/build/types/protocol/schemes/Emoticon.d.ts +9 -0
- package/build/types/protocol/schemes/Entitlements.d.ts +92 -0
- package/build/types/protocol/schemes/Envelope.d.ts +5 -0
- package/build/types/protocol/schemes/FollowedTopic.d.ts +10 -0
- package/build/types/protocol/schemes/LeaveReason.d.ts +9 -0
- package/build/types/protocol/schemes/Message.d.ts +32 -0
- package/build/types/protocol/schemes/MessagePoll.d.ts +10 -0
- package/build/types/protocol/schemes/PermissionOverwritesTarget.d.ts +5 -0
- package/build/types/protocol/schemes/PermissionOverwritesValue.d.ts +4 -0
- package/build/types/protocol/schemes/Reaction.d.ts +13 -0
- package/build/types/protocol/schemes/Role.d.ts +20 -0
- package/build/types/protocol/schemes/Room.d.ts +17 -0
- package/build/types/protocol/schemes/RoomHistory.d.ts +5 -0
- package/build/types/protocol/schemes/RoomMember.d.ts +11 -0
- package/build/types/protocol/schemes/RoomStream.d.ts +5 -0
- package/build/types/protocol/schemes/RoomSummary.d.ts +14 -0
- package/build/types/protocol/schemes/SessionData.d.ts +10 -0
- package/build/types/protocol/schemes/Space.d.ts +19 -0
- package/build/types/protocol/schemes/SpaceMember.d.ts +7 -0
- package/build/types/protocol/schemes/SpaceSummary.d.ts +8 -0
- package/build/types/protocol/schemes/Topic.d.ts +8 -0
- package/build/types/protocol/schemes/User.d.ts +23 -0
- package/build/types/protocol/schemes/UserData.d.ts +10 -0
- package/build/types/protocol/schemes/UserInformation.d.ts +11 -0
- package/build/types/protocol/schemes/UserRelationship.d.ts +6 -0
- package/build/types/protocol/schemes/UserState.d.ts +6 -0
- package/build/types/protocol/schemes/commands/Ack.d.ts +5 -0
- package/build/types/protocol/schemes/commands/AssignRole.d.ts +6 -0
- package/build/types/protocol/schemes/commands/Ban.d.ts +10 -0
- package/build/types/protocol/schemes/commands/CreateAccessTicket.d.ts +13 -0
- package/build/types/protocol/schemes/commands/CreateEmoticon.d.ts +5 -0
- package/build/types/protocol/schemes/commands/CreateMessage.d.ts +11 -0
- package/build/types/protocol/schemes/commands/CreateOwner.d.ts +5 -0
- package/build/types/protocol/schemes/commands/CreateRelationship.d.ts +5 -0
- package/build/types/protocol/schemes/commands/CreateRole.d.ts +6 -0
- package/build/types/protocol/schemes/commands/CreateRoom.d.ts +9 -0
- package/build/types/protocol/schemes/commands/CreateSpace.d.ts +6 -0
- package/build/types/protocol/schemes/commands/CreateTopic.d.ts +11 -0
- package/build/types/protocol/schemes/commands/DeassignRole.d.ts +6 -0
- package/build/types/protocol/schemes/commands/DeleteEmoticon.d.ts +3 -0
- package/build/types/protocol/schemes/commands/DeleteOwner.d.ts +5 -0
- package/build/types/protocol/schemes/commands/DeleteRelationship.d.ts +5 -0
- package/build/types/protocol/schemes/commands/DeleteRole.d.ts +4 -0
- package/build/types/protocol/schemes/commands/DeleteRoom.d.ts +3 -0
- package/build/types/protocol/schemes/commands/DeleteSpace.d.ts +3 -0
- package/build/types/protocol/schemes/commands/DeleteTopic.d.ts +4 -0
- package/build/types/protocol/schemes/commands/FollowTopic.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetBans.d.ts +6 -0
- package/build/types/protocol/schemes/commands/GetClientData.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetComputedPermissions.d.ts +10 -0
- package/build/types/protocol/schemes/commands/GetDiscoverableSpaces.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetEmoticons.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetEntitlements.d.ts +8 -0
- package/build/types/protocol/schemes/commands/GetFollowedTopics.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetInvited.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetMessages.d.ts +13 -0
- package/build/types/protocol/schemes/commands/GetOwners.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetPermissionOverwriteTargets.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetPermissionOverwrites.d.ts +6 -0
- package/build/types/protocol/schemes/commands/GetReactionDetails.d.ts +8 -0
- package/build/types/protocol/schemes/commands/GetRelationships.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetRoomMembers.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetRoomSummary.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetSession.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetSessionData.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetSpaceMembers.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetSpaceRooms.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetSpaceSummary.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetTopics.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetUserData.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetUserInfo.d.ts +3 -0
- package/build/types/protocol/schemes/commands/Invite.d.ts +5 -0
- package/build/types/protocol/schemes/commands/JoinRoom.d.ts +13 -0
- package/build/types/protocol/schemes/commands/JoinSpace.d.ts +3 -0
- package/build/types/protocol/schemes/commands/Kick.d.ts +7 -0
- package/build/types/protocol/schemes/commands/LeaveRoom.d.ts +3 -0
- package/build/types/protocol/schemes/commands/LeaveSpace.d.ts +3 -0
- package/build/types/protocol/schemes/commands/Ping.d.ts +2 -0
- package/build/types/protocol/schemes/commands/React.d.ts +6 -0
- package/build/types/protocol/schemes/commands/RedactMessages.d.ts +3 -0
- package/build/types/protocol/schemes/commands/ReportAbuse.d.ts +9 -0
- package/build/types/protocol/schemes/commands/SetClientData.d.ts +1 -0
- package/build/types/protocol/schemes/commands/SetPermissionOverwrites.d.ts +8 -0
- package/build/types/protocol/schemes/commands/SetSessionData.d.ts +17 -0
- package/build/types/protocol/schemes/commands/SetUserData.d.ts +6 -0
- package/build/types/protocol/schemes/commands/Unban.d.ts +3 -0
- package/build/types/protocol/schemes/commands/UnfollowTopic.d.ts +4 -0
- package/build/types/protocol/schemes/commands/Uninvite.d.ts +5 -0
- package/build/types/protocol/schemes/commands/Unreact.d.ts +6 -0
- package/build/types/protocol/schemes/commands/UpdateFollowedTopic.d.ts +6 -0
- package/build/types/protocol/schemes/commands/UpdateRole.d.ts +8 -0
- package/build/types/protocol/schemes/commands/UpdateRoom.d.ts +10 -0
- package/build/types/protocol/schemes/commands/UpdateRoomMember.d.ts +8 -0
- package/build/types/protocol/schemes/commands/UpdateSpace.d.ts +12 -0
- package/build/types/protocol/schemes/commands/UpdateSpaceMember.d.ts +6 -0
- package/build/types/protocol/schemes/commands/UpdateTopic.d.ts +5 -0
- package/build/types/protocol/schemes/events/AccessTicket.d.ts +14 -0
- package/build/types/protocol/schemes/events/Bans.d.ts +6 -0
- package/build/types/protocol/schemes/events/Bye.d.ts +4 -0
- package/build/types/protocol/schemes/events/ClientData.d.ts +1 -0
- package/build/types/protocol/schemes/events/ComputedPermissions.d.ts +9 -0
- package/build/types/protocol/schemes/events/DiscoverableSpaces.d.ts +4 -0
- package/build/types/protocol/schemes/events/EmoticonDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/Emoticons.d.ts +6 -0
- package/build/types/protocol/schemes/events/EntitlementUsage.d.ts +11 -0
- package/build/types/protocol/schemes/events/Entitlements.d.ts +12 -0
- package/build/types/protocol/schemes/events/Error.d.ts +4 -0
- package/build/types/protocol/schemes/events/FollowedTopicUpdated.d.ts +4 -0
- package/build/types/protocol/schemes/events/FollowedTopics.d.ts +6 -0
- package/build/types/protocol/schemes/events/Invited.d.ts +10 -0
- package/build/types/protocol/schemes/events/Messages.d.ts +9 -0
- package/build/types/protocol/schemes/events/MessagesRedacted.d.ts +5 -0
- package/build/types/protocol/schemes/events/NewEmoticon.d.ts +4 -0
- package/build/types/protocol/schemes/events/NewMessage.d.ts +4 -0
- package/build/types/protocol/schemes/events/NewRelationship.d.ts +4 -0
- package/build/types/protocol/schemes/events/NewRole.d.ts +5 -0
- package/build/types/protocol/schemes/events/NewRoom.d.ts +5 -0
- package/build/types/protocol/schemes/events/NewTopic.d.ts +5 -0
- package/build/types/protocol/schemes/events/Ok.d.ts +2 -0
- package/build/types/protocol/schemes/events/Owners.d.ts +8 -0
- package/build/types/protocol/schemes/events/PermissionOverwriteTargets.d.ts +10 -0
- package/build/types/protocol/schemes/events/PermissionOverwrites.d.ts +8 -0
- package/build/types/protocol/schemes/events/PermissionOverwritesUpdated.d.ts +8 -0
- package/build/types/protocol/schemes/events/Pong.d.ts +2 -0
- package/build/types/protocol/schemes/events/Reacted.d.ts +9 -0
- package/build/types/protocol/schemes/events/ReactionDetails.d.ts +11 -0
- package/build/types/protocol/schemes/events/ReactionUpdated.d.ts +8 -0
- package/build/types/protocol/schemes/events/RelationshipDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/Relationships.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoleDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoleUpdated.d.ts +5 -0
- package/build/types/protocol/schemes/events/RoomDeleted.d.ts +3 -0
- package/build/types/protocol/schemes/events/RoomJoined.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoomLeft.d.ts +5 -0
- package/build/types/protocol/schemes/events/RoomMemberLeft.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoomMemberUpdated.d.ts +6 -0
- package/build/types/protocol/schemes/events/RoomMembers.d.ts +5 -0
- package/build/types/protocol/schemes/events/RoomMembersJoined.d.ts +9 -0
- package/build/types/protocol/schemes/events/RoomSummary.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoomSummaryUpdated.d.ts +8 -0
- package/build/types/protocol/schemes/events/RoomUpdated.d.ts +4 -0
- package/build/types/protocol/schemes/events/Session.d.ts +9 -0
- package/build/types/protocol/schemes/events/SpaceDeleted.d.ts +3 -0
- package/build/types/protocol/schemes/events/SpaceJoined.d.ts +4 -0
- package/build/types/protocol/schemes/events/SpaceLeft.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceMemberJoined.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceMemberLeft.d.ts +4 -0
- package/build/types/protocol/schemes/events/SpaceMemberUpdated.d.ts +6 -0
- package/build/types/protocol/schemes/events/SpaceMembers.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceRooms.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceSummary.d.ts +4 -0
- package/build/types/protocol/schemes/events/SpaceUpdated.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicFollowed.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicUnfollowed.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicUpdated.d.ts +6 -0
- package/build/types/protocol/schemes/events/Topics.d.ts +6 -0
- package/build/types/protocol/schemes/events/UserInfo.d.ts +4 -0
- package/build/types/protocol/schemes/events/UserUpdated.d.ts +4 -0
- package/build/types/state-tracker/AsyncUtils.d.ts +15 -0
- package/build/types/state-tracker/ChatStateTracker.d.ts +41 -0
- package/build/types/state-tracker/EmoticonsManager.d.ts +15 -0
- package/build/types/state-tracker/FollowedTopicsManager.d.ts +85 -0
- package/build/types/state-tracker/MessagesManager.d.ts +24 -0
- package/build/types/state-tracker/PermissionsManager.d.ts +47 -0
- package/build/types/state-tracker/RelationshipsManager.d.ts +15 -0
- package/build/types/state-tracker/RoomMessagesHistory.d.ts +69 -0
- package/build/types/state-tracker/RoomsManager.d.ts +72 -0
- package/build/types/state-tracker/SpacesManager.d.ts +63 -0
- package/build/types/state-tracker/TopicHistoryWindow.d.ts +182 -0
- package/build/types/state-tracker/UsersManager.d.ts +23 -0
- package/build/types/state-tracker/functions.d.ts +6 -0
- package/package.json +67 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChatLocation } from "../ChatLocation";
|
|
2
|
+
import { MessagePoll } from "../MessagePoll";
|
|
3
|
+
export interface CreateMessage {
|
|
4
|
+
location: ChatLocation;
|
|
5
|
+
content: string;
|
|
6
|
+
attachments?: string[];
|
|
7
|
+
customNick?: string;
|
|
8
|
+
customColor?: string;
|
|
9
|
+
/** Turns the message into a poll; its content becomes the question. */
|
|
10
|
+
poll?: MessagePoll;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChatLocation } from "../ChatLocation";
|
|
2
|
+
export interface CreateTopicInitialMessage {
|
|
3
|
+
content?: string;
|
|
4
|
+
attachments?: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface CreateTopic {
|
|
7
|
+
location: ChatLocation;
|
|
8
|
+
name: string;
|
|
9
|
+
refMessageId?: string;
|
|
10
|
+
initialMessage?: CreateTopicInitialMessage;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChatLocation } from "../ChatLocation";
|
|
2
|
+
/**
|
|
3
|
+
* Computed permissions of a user in the location. Without `userId` those of the requesting
|
|
4
|
+
* user are returned. Another user may be asked about only when both are members of the
|
|
5
|
+
* location; on the global layer it requires the global `ManagePermissions` permission.
|
|
6
|
+
*/
|
|
7
|
+
export interface GetComputedPermissions {
|
|
8
|
+
location: ChatLocation;
|
|
9
|
+
userId?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package entitlements of a space (readable by its members) or of an account. Without both
|
|
3
|
+
* fields the entitlements of the requesting user are returned; `userId` may only be their own.
|
|
4
|
+
*/
|
|
5
|
+
export interface GetEntitlements {
|
|
6
|
+
spaceId?: string;
|
|
7
|
+
userId?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChatLocation } from "../ChatLocation";
|
|
2
|
+
export interface GetMessages {
|
|
3
|
+
location: ChatLocation;
|
|
4
|
+
before?: string;
|
|
5
|
+
after?: string;
|
|
6
|
+
around?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Pull the reactions of the asking user along with the messages, instead of
|
|
10
|
+
* asking for their own state separately.
|
|
11
|
+
*/
|
|
12
|
+
includeMyReactions?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface JoinRoom {
|
|
2
|
+
id: string;
|
|
3
|
+
/**
|
|
4
|
+
* Ids of the users to add to the room instead of joining it yourself.
|
|
5
|
+
* Requires the `AddMembers` permission.
|
|
6
|
+
*/
|
|
7
|
+
userIds?: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Ids of the roles whose members should be added to the room. The space default
|
|
10
|
+
* ("everyone") role is not supported. Requires the `AddMembers` permission.
|
|
11
|
+
*/
|
|
12
|
+
roleIds?: string[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type AbuseCategory = 'SpamOrScam' | 'HarassmentOrBullying' | 'HateSpeechOrExtremism' | 'ThreatsOrViolence' | 'SelfHarmOrSuicide' | 'SexualContent' | 'SexualExploitationOfMinors' | 'ChildSafety' | 'NonConsensualIntimateContent' | 'PrivacyViolation' | 'Impersonation' | 'IllegalGoodsOrServices' | 'RegulatedGoodsOrServices' | 'AccountSecurity' | 'IntellectualProperty' | 'Misinformation';
|
|
2
|
+
type ReportTarget = 'Profile' | 'Message';
|
|
3
|
+
export interface ReportAbuse {
|
|
4
|
+
category: AbuseCategory;
|
|
5
|
+
target: ReportTarget;
|
|
6
|
+
userId?: string;
|
|
7
|
+
messageId?: string;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SetClientData = Record<string, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PermissionOverwritesValue } from "../PermissionOverwritesValue";
|
|
2
|
+
import { ChatLocation } from "../ChatLocation";
|
|
3
|
+
import { PermissionOverwritesTarget } from "../PermissionOverwritesTarget";
|
|
4
|
+
export interface SetPermissionOverwrites {
|
|
5
|
+
location: ChatLocation;
|
|
6
|
+
target: PermissionOverwritesTarget;
|
|
7
|
+
overwrites: PermissionOverwritesValue;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SessionPlatform } from "../SessionData";
|
|
2
|
+
export interface SessionPush {
|
|
3
|
+
token?: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated The platform describes the session, not its push registration.
|
|
7
|
+
* Use {@link SetSessionData.platform} (or the `platform` connection query
|
|
8
|
+
* parameter). Still accepted by the server, but the top-level field wins.
|
|
9
|
+
*/
|
|
10
|
+
platform?: SessionPlatform;
|
|
11
|
+
}
|
|
12
|
+
export interface SetSessionData {
|
|
13
|
+
clientFocused?: boolean;
|
|
14
|
+
push?: SessionPush;
|
|
15
|
+
/** Client platform of this session; null leaves the stored value unchanged. */
|
|
16
|
+
platform?: SessionPlatform;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpaceDiscoverable } from "../Space";
|
|
2
|
+
export interface UpdateSpace {
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
systemRoom?: string | null;
|
|
7
|
+
defaultRooms?: string[];
|
|
8
|
+
icon?: string | null;
|
|
9
|
+
banner?: string | null;
|
|
10
|
+
discoverable?: SpaceDiscoverable;
|
|
11
|
+
flags?: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TicketAudience } from "../commands/CreateAccessTicket";
|
|
2
|
+
/**
|
|
3
|
+
* A signed ticket to send as a bearer token to the service named by {@link audience}. It is
|
|
4
|
+
* valid for a couple of minutes only, so ask for it right before the request.
|
|
5
|
+
*/
|
|
6
|
+
export interface AccessTicket {
|
|
7
|
+
id: string;
|
|
8
|
+
token: string;
|
|
9
|
+
audience: TicketAudience;
|
|
10
|
+
/** Resource the ticket covers: `space:<id>` or `user:<id>`. */
|
|
11
|
+
scope: string;
|
|
12
|
+
permissions: string[];
|
|
13
|
+
expiresAt: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ClientData = Record<string, any>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EntitlementsSubject } from "../Entitlements";
|
|
2
|
+
/**
|
|
3
|
+
* A limit of the package is running out (80%) or is used up (100%). Only the owners of the space
|
|
4
|
+
* are told, because only they can raise the package.
|
|
5
|
+
*/
|
|
6
|
+
export interface EntitlementUsage {
|
|
7
|
+
subject: EntitlementsSubject;
|
|
8
|
+
feature: string;
|
|
9
|
+
usage: number;
|
|
10
|
+
limit: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EntitlementsExtras, EntitlementsMap, EntitlementsSubject } from "../Entitlements";
|
|
2
|
+
/**
|
|
3
|
+
* Sent in response to `GetEntitlements` and pushed whenever the package of the subject changes -
|
|
4
|
+
* to every member of the space, or to every session of the user. `extras` is filled in only for
|
|
5
|
+
* the answer to the command: usage changes with every file, so it is asked for when it is needed.
|
|
6
|
+
*/
|
|
7
|
+
export interface Entitlements {
|
|
8
|
+
subject: EntitlementsSubject;
|
|
9
|
+
planCode: string;
|
|
10
|
+
entitlements: EntitlementsMap;
|
|
11
|
+
extras?: EntitlementsExtras | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChatLocation } from "../ChatLocation";
|
|
2
|
+
import { Role } from "../Role";
|
|
3
|
+
export interface Invited {
|
|
4
|
+
location: ChatLocation;
|
|
5
|
+
/**
|
|
6
|
+
* Ids of the invited users. Join them with the space member collection to display them.
|
|
7
|
+
*/
|
|
8
|
+
userIds: string[];
|
|
9
|
+
roles: Role[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChatLocation } from "../ChatLocation";
|
|
2
|
+
import { Message } from "../Message";
|
|
3
|
+
import { UserReaction } from "../Reaction";
|
|
4
|
+
export interface Messages {
|
|
5
|
+
location: ChatLocation;
|
|
6
|
+
messages: Message[];
|
|
7
|
+
/** Message id => reactions of the asking user; present only when requested. */
|
|
8
|
+
myReactions?: Record<string, UserReaction[]>;
|
|
9
|
+
}
|