@devanachat/sdk 0.13.0 → 0.15.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 +99 -1
- package/build/index.cjs.js +686 -15
- package/build/index.cjs.js.map +1 -1
- package/build/index.mjs +684 -15
- package/build/index.mjs.map +1 -1
- package/build/index.umd.js +1 -1
- package/build/index.umd.js.map +1 -1
- package/build/types/AbstractChatClient.d.ts +28 -1
- package/build/types/Permissions.d.ts +38 -0
- package/build/types/index.d.ts +6 -3
- package/build/types/protocol/index.d.ts +35 -2
- package/build/types/protocol/schemes/Activity.d.ts +16 -0
- package/build/types/protocol/schemes/Call.d.ts +35 -0
- package/build/types/protocol/schemes/IncomingCall.d.ts +6 -0
- package/build/types/protocol/schemes/Message.d.ts +3 -1
- package/build/types/protocol/schemes/MessageCall.d.ts +9 -0
- package/build/types/protocol/schemes/Room.d.ts +2 -0
- package/build/types/protocol/schemes/RoomCall.d.ts +6 -0
- package/build/types/protocol/schemes/SavedItem.d.ts +7 -0
- package/build/types/protocol/schemes/UserData.d.ts +1 -0
- package/build/types/protocol/schemes/UserState.d.ts +4 -0
- package/build/types/protocol/schemes/commands/DeclineCall.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetActivities.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetCallMembers.d.ts +5 -0
- package/build/types/protocol/schemes/commands/GetSavedItems.d.ts +3 -0
- package/build/types/protocol/schemes/commands/InviteToCall.d.ts +5 -0
- package/build/types/protocol/schemes/commands/JoinCall.d.ts +4 -0
- package/build/types/protocol/schemes/commands/KickCallMember.d.ts +4 -0
- package/build/types/protocol/schemes/commands/MuteCallMember.d.ts +4 -0
- package/build/types/protocol/schemes/commands/SaveItem.d.ts +5 -0
- package/build/types/protocol/schemes/commands/SetPermissionOverwrites.d.ts +1 -0
- package/build/types/protocol/schemes/commands/SetSessionData.d.ts +1 -0
- package/build/types/protocol/schemes/commands/SetUserData.d.ts +1 -0
- package/build/types/protocol/schemes/commands/UnsaveItem.d.ts +5 -0
- package/build/types/protocol/schemes/commands/UpdateActivities.d.ts +4 -0
- package/build/types/protocol/schemes/commands/UpdateCallMember.d.ts +7 -0
- package/build/types/protocol/schemes/commands/UpdateRoom.d.ts +2 -0
- package/build/types/protocol/schemes/events/Activities.d.ts +9 -0
- package/build/types/protocol/schemes/events/ActivityDeleted.d.ts +3 -0
- package/build/types/protocol/schemes/events/ActivityUpdated.d.ts +4 -0
- package/build/types/protocol/schemes/events/CallJoined.d.ts +7 -0
- package/build/types/protocol/schemes/events/CallMemberJoined.d.ts +5 -0
- package/build/types/protocol/schemes/events/CallMemberLeft.d.ts +4 -0
- package/build/types/protocol/schemes/events/CallMemberUpdated.d.ts +6 -0
- package/build/types/protocol/schemes/events/CallMembers.d.ts +5 -0
- package/build/types/protocol/schemes/events/CallUpdated.d.ts +5 -0
- package/build/types/protocol/schemes/events/CallVideoLimitReached.d.ts +4 -0
- package/build/types/protocol/schemes/events/Error.d.ts +9 -1
- package/build/types/protocol/schemes/events/IncomingCallUpdated.d.ts +5 -0
- package/build/types/protocol/schemes/events/ItemSaved.d.ts +6 -0
- package/build/types/protocol/schemes/events/ItemUnsaved.d.ts +5 -0
- package/build/types/protocol/schemes/events/NewActivity.d.ts +8 -0
- package/build/types/protocol/schemes/events/SavedItems.d.ts +6 -0
- package/build/types/state-tracker/ActivitiesManager.d.ts +63 -0
- package/build/types/state-tracker/CallsManager.d.ts +74 -0
- package/build/types/state-tracker/ChatStateTracker.d.ts +18 -0
- package/build/types/state-tracker/SavedItemsManager.d.ts +46 -0
- package/build/types/state-tracker/StateSnapshot.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bye, GetSession, JoinSpace, Session, SpaceJoined, Error as ErrorType, SpaceLeft, SpaceMemberJoined, SpaceMemberLeft, SpaceMemberUpdated, SpaceDeleted, SpaceMembers, SpaceRooms, NewRole, RoomDeleted, RoomJoined, RoomLeft, RoomMemberLeft, RoomMembersJoined, RoomMembers, NewRoom, NewTopic, TopicDeleted, NewMessage, GetPermissionOverwrites, GetComputedPermissions, ComputedPermissions, LeaveSpace, CreateSpace, DeleteSpace, GetSpaceMembers, GetSpaceRooms, CreateRole, DeleteRole, AssignRole, DeassignRole, SetPermissionOverwrites, JoinRoom, LeaveRoom, GetIgnoredRooms, IgnoredRooms, CreateRoom, DeleteRoom, GetRoomMembers, CreateTopic, DeleteTopic, CreateMessage, Envelope, PermissionOverwrites, PermissionOverwritesUpdated, RoomMemberUpdated, UpdateRole, RoleUpdated, Ack, UserUpdated, UpdateRoom, RoomUpdated, UpdateSpace, SpaceUpdated, PermissionOverwriteTargets, GetPermissionOverwriteTargets, Owners, Ok, GetOwners, CreateOwner, RoleDeleted, FollowedTopicUpdated, TopicFollowed, FollowedTopics, FollowTopic, UpdateFollowedTopic, GetFollowedTopics, Messages, GetMessages, SearchMessages, FoundMessages, Topics, GetTopics, TopicUpdated, UpdateTopic, GetDiscoverableSpaces, DiscoverableSpaces, CreateEmoticon, DeleteEmoticon, GetEmoticons, Emoticons, EmoticonDeleted, NewEmoticon, Bans, GetBans, Ban, Unban, Kick, ClientData, GetClientData, SetClientData, GetRoomSummary, GetSpaceSummary, RoomSummaryEvent, SpaceSummaryEvent, UpdateSpaceMember, Relationships, RelationshipDeleted, NewRelationship, DeleteRelationship, CreateRelationship, RoomSummaryUpdated, Pong, Ping, RedactMessages, MessagesRedacted, UpdateMessage, MessageUpdated, SearchGifs, GetGifCategories, FoundGifs, GifCategories, ReportAbuse, UpdateRoomMember, GetRelationships, GetUserInfo, UserInfo, SetSessionData, SessionData, GetSessionData, SetUserData, UserData, GetUserData, UnfollowTopic, TopicUnfollowed, Invite, Uninvite, GetInvited, Invited, React, Interact, AckInteraction, Unreact, GetReactionDetails, ReactionUpdated, Reacted, NewInteraction, Interacted, InteractionResolved, ReactionDetails, Type, Typing, GetEntitlements, Entitlements, EntitlementUsage, CreateAccessTicket, AccessTicket } from "./protocol";
|
|
1
|
+
import { Bye, GetSession, JoinSpace, Session, SpaceJoined, Error as ErrorType, SpaceLeft, SpaceMemberJoined, SpaceMemberLeft, SpaceMemberUpdated, SpaceDeleted, SpaceMembers, SpaceRooms, NewRole, RoomDeleted, RoomJoined, RoomLeft, RoomMemberLeft, RoomMembersJoined, RoomMembers, NewRoom, NewTopic, TopicDeleted, NewMessage, GetPermissionOverwrites, GetComputedPermissions, ComputedPermissions, LeaveSpace, CreateSpace, DeleteSpace, GetSpaceMembers, GetSpaceRooms, CreateRole, DeleteRole, AssignRole, DeassignRole, SetPermissionOverwrites, JoinRoom, LeaveRoom, GetIgnoredRooms, IgnoredRooms, CreateRoom, DeleteRoom, GetRoomMembers, CreateTopic, DeleteTopic, CreateMessage, Envelope, PermissionOverwrites, PermissionOverwritesUpdated, RoomMemberUpdated, UpdateRole, RoleUpdated, Ack, UserUpdated, UpdateRoom, RoomUpdated, UpdateSpace, SpaceUpdated, PermissionOverwriteTargets, GetPermissionOverwriteTargets, Owners, Ok, GetOwners, CreateOwner, RoleDeleted, FollowedTopicUpdated, TopicFollowed, FollowedTopics, FollowTopic, UpdateFollowedTopic, GetFollowedTopics, Messages, GetMessages, SearchMessages, FoundMessages, Topics, GetTopics, TopicUpdated, UpdateTopic, GetDiscoverableSpaces, DiscoverableSpaces, CreateEmoticon, DeleteEmoticon, GetEmoticons, Emoticons, EmoticonDeleted, NewEmoticon, Bans, GetBans, Ban, Unban, Kick, ClientData, GetClientData, SetClientData, GetRoomSummary, GetSpaceSummary, RoomSummaryEvent, SpaceSummaryEvent, UpdateSpaceMember, Relationships, RelationshipDeleted, NewRelationship, DeleteRelationship, CreateRelationship, RoomSummaryUpdated, Pong, Ping, RedactMessages, MessagesRedacted, UpdateMessage, MessageUpdated, SearchGifs, GetGifCategories, FoundGifs, GifCategories, ReportAbuse, UpdateRoomMember, GetRelationships, GetUserInfo, UserInfo, SetSessionData, SessionData, GetSessionData, SetUserData, UserData, GetUserData, UnfollowTopic, TopicUnfollowed, Invite, Uninvite, GetInvited, Invited, React, Interact, AckInteraction, Unreact, GetReactionDetails, ReactionUpdated, Reacted, NewInteraction, Interacted, InteractionResolved, ReactionDetails, Type, Typing, GetEntitlements, Entitlements, EntitlementUsage, CreateAccessTicket, AccessTicket, JoinCall, DeclineCall, InviteToCall, MuteCallMember, KickCallMember, UpdateCallMember, GetCallMembers, CallJoined, CallUpdated, IncomingCallUpdated, CallVideoLimitReached, CallMembers, CallMemberJoined, CallMemberUpdated, CallMemberLeft, GetActivities, UpdateActivities, Activities, NewActivity, ActivityUpdated, ActivityDeleted, SaveItem, UnsaveItem, GetSavedItems, SavedItems, ItemSaved, ItemUnsaved } from "./protocol";
|
|
2
2
|
import { EventTarget } from "./EventTarget";
|
|
3
3
|
type ArrayOfPromiseResolvers = [(value: any) => void, (reason?: any) => void];
|
|
4
4
|
type ExtraEventMap = Record<string, any>;
|
|
@@ -112,6 +112,21 @@ export type EventsMap = {
|
|
|
112
112
|
InteractionResolved: InteractionResolved;
|
|
113
113
|
ReactionDetails: ReactionDetails;
|
|
114
114
|
Typing: Typing;
|
|
115
|
+
CallJoined: CallJoined;
|
|
116
|
+
CallUpdated: CallUpdated;
|
|
117
|
+
IncomingCallUpdated: IncomingCallUpdated;
|
|
118
|
+
CallVideoLimitReached: CallVideoLimitReached;
|
|
119
|
+
CallMembers: CallMembers;
|
|
120
|
+
CallMemberJoined: CallMemberJoined;
|
|
121
|
+
CallMemberUpdated: CallMemberUpdated;
|
|
122
|
+
CallMemberLeft: CallMemberLeft;
|
|
123
|
+
Activities: Activities;
|
|
124
|
+
NewActivity: NewActivity;
|
|
125
|
+
ActivityUpdated: ActivityUpdated;
|
|
126
|
+
ActivityDeleted: ActivityDeleted;
|
|
127
|
+
SavedItems: SavedItems;
|
|
128
|
+
ItemSaved: ItemSaved;
|
|
129
|
+
ItemUnsaved: ItemUnsaved;
|
|
115
130
|
};
|
|
116
131
|
/**
|
|
117
132
|
* Map of commands and their corresponding events.
|
|
@@ -199,5 +214,17 @@ export type CommandsMap = {
|
|
|
199
214
|
Unreact: CommandDefinition<Unreact, EventsMap['Reacted'] | EventsMap['Ok']>;
|
|
200
215
|
GetReactionDetails: CommandDefinition<GetReactionDetails, EventsMap['ReactionDetails']>;
|
|
201
216
|
Type: CommandDefinition<Type, EventsMap['Ok']>;
|
|
217
|
+
JoinCall: CommandDefinition<JoinCall, EventsMap['CallJoined']>;
|
|
218
|
+
DeclineCall: CommandDefinition<DeclineCall, EventsMap['Ok']>;
|
|
219
|
+
InviteToCall: CommandDefinition<InviteToCall, EventsMap['Ok']>;
|
|
220
|
+
MuteCallMember: CommandDefinition<MuteCallMember, EventsMap['Ok']>;
|
|
221
|
+
KickCallMember: CommandDefinition<KickCallMember, EventsMap['Ok']>;
|
|
222
|
+
UpdateCallMember: CommandDefinition<UpdateCallMember, EventsMap['Ok']>;
|
|
223
|
+
GetCallMembers: CommandDefinition<GetCallMembers, EventsMap['CallMembers']>;
|
|
224
|
+
GetActivities: CommandDefinition<GetActivities, EventsMap['Activities']>;
|
|
225
|
+
UpdateActivities: CommandDefinition<UpdateActivities, EventsMap['ActivityUpdated']>;
|
|
226
|
+
SaveItem: CommandDefinition<SaveItem, EventsMap['ItemSaved']>;
|
|
227
|
+
UnsaveItem: CommandDefinition<UnsaveItem, EventsMap['ItemUnsaved']>;
|
|
228
|
+
GetSavedItems: CommandDefinition<GetSavedItems, EventsMap['SavedItems']>;
|
|
202
229
|
};
|
|
203
230
|
export {};
|
|
@@ -126,7 +126,45 @@ export declare class Permissions {
|
|
|
126
126
|
value: number;
|
|
127
127
|
maxLayer: Layer;
|
|
128
128
|
};
|
|
129
|
+
JoinCalls: {
|
|
130
|
+
value: number;
|
|
131
|
+
maxLayer: Layer;
|
|
132
|
+
};
|
|
133
|
+
ShareVideo: {
|
|
134
|
+
value: number;
|
|
135
|
+
maxLayer: Layer;
|
|
136
|
+
};
|
|
137
|
+
InviteToCall: {
|
|
138
|
+
value: number;
|
|
139
|
+
maxLayer: Layer;
|
|
140
|
+
};
|
|
141
|
+
ManageCalls: {
|
|
142
|
+
value: number;
|
|
143
|
+
maxLayer: Layer;
|
|
144
|
+
};
|
|
145
|
+
StartCalls: {
|
|
146
|
+
value: number;
|
|
147
|
+
maxLayer: Layer;
|
|
148
|
+
};
|
|
129
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* Whether the permission mask (e.g. from {@link PermissionsManager.calculatePermissions}) grants the permission.
|
|
152
|
+
* Use it and {@link union} / {@link subtract} instead of `&` and `|`: JavaScript bitwise operators keep only
|
|
153
|
+
* 32 bits, and permissions go beyond them.
|
|
154
|
+
*/
|
|
155
|
+
static has(mask: number, name: keyof typeof this.list): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* The permission masks combined (`a | b`), safe for permissions beyond 32 bits.
|
|
158
|
+
*/
|
|
159
|
+
static union(...masks: number[]): number;
|
|
160
|
+
/**
|
|
161
|
+
* The mask without the permissions of `removed` (`mask & ~removed`), safe for permissions beyond 32 bits.
|
|
162
|
+
*/
|
|
163
|
+
static subtract(mask: number, removed: number): number;
|
|
164
|
+
/**
|
|
165
|
+
* Mask of all the permissions this version of the SDK knows - for `SetPermissionOverwrites.knownPermissions`.
|
|
166
|
+
*/
|
|
167
|
+
static getKnownMask(): number;
|
|
130
168
|
static getNames(): (keyof typeof this.list)[];
|
|
131
169
|
static getByName(name: keyof typeof this.list): PermissionDefinition | undefined;
|
|
132
170
|
static canBeDefinedOnLayer(permissionName: keyof typeof this.list, layer: Layer): boolean;
|
package/build/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { IndexedCollection, IndexedObjectCollection, ObservableIndexedCollection
|
|
|
4
4
|
import { FilesClient, File } from "./FilesClient";
|
|
5
5
|
import { Permissions, PermissionDefinition, Layer } from "./Permissions";
|
|
6
6
|
import * as ChatTypes from './protocol';
|
|
7
|
-
import { ErrorCode, HistoryRotation, MessageEmbedFlag, NO_LIMIT, PmParticipantFlag, RoleFlag, SearchRange, UiPurpose, SpaceFeature, SpaceIntent, STORAGE_UNIT_BYTES, UserFeature, UserStatus } from './protocol';
|
|
7
|
+
import { CallMemberFlag, ErrorCode, HistoryRotation, MessageEmbedFlag, NO_LIMIT, PmParticipantFlag, RoleFlag, SearchRange, UiPurpose, SpaceFeature, SpaceIntent, STORAGE_UNIT_BYTES, UserFeature, UserStatus } from './protocol';
|
|
8
8
|
import { extractUserFromMember, getPmPeers, isGroupPm } from "./state-tracker/functions";
|
|
9
9
|
import { AbstractRestClient } from "./AbstractRestClient";
|
|
10
10
|
import { UnreadSummary } from "./state-tracker/FollowedTopicsManager";
|
|
@@ -12,11 +12,14 @@ import { TopicHistoryWindow } from "./state-tracker/TopicHistoryWindow";
|
|
|
12
12
|
import { PermissionsManager } from "./state-tracker/PermissionsManager";
|
|
13
13
|
import { STATE_SNAPSHOT_VERSION } from "./state-tracker/StateSnapshot";
|
|
14
14
|
import { TYPING_INTERVAL_MS, TYPING_TIMEOUT_MS, TypingManager, TypingUsers } from "./state-tracker/TypingManager";
|
|
15
|
-
|
|
15
|
+
import { CallsManager } from "./state-tracker/CallsManager";
|
|
16
|
+
import { ActivitiesManager } from "./state-tracker/ActivitiesManager";
|
|
17
|
+
import { SavedItemsManager, savedItemKey } from "./state-tracker/SavedItemsManager";
|
|
18
|
+
export { IndexedCollection, ObservableIndexedCollection, IndexedObjectCollection, ObservableIndexedObjectCollection, savedItemKey, Permissions, PermissionDefinition, Layer, WebSocketChatClient, WebApiChatClient, FilesClient, AbstractRestClient, extractUserFromMember, isGroupPm, getPmPeers, CallMemberFlag, ErrorCode, MessageEmbedFlag, PmParticipantFlag, UserStatus, RoleFlag, SpaceFeature, UserFeature, HistoryRotation, SearchRange, UiPurpose, SpaceIntent, NO_LIMIT, STORAGE_UNIT_BYTES, STATE_SNAPSHOT_VERSION, TYPING_INTERVAL_MS, TYPING_TIMEOUT_MS, };
|
|
16
19
|
export type { CommandResult, CommandRequest, CommandResponse, CommandsMap, EventsMap, } from "./AbstractChatClient";
|
|
17
20
|
export type { WebSocketClientOptions } from "./WebSocketChatClient";
|
|
18
21
|
export type { WebApiChatClientOptions } from "./WebApiChatClient";
|
|
19
22
|
export type { RestClientOptions, RestClientResponse } from "./AbstractRestClient";
|
|
20
23
|
export type { EventHandler, ObservableInterface } from "./EventTarget";
|
|
21
24
|
export type { StateSnapshot, SpaceRoomsSnapshot, RoomFollowedTopicsSnapshot, EmoticonsSnapshot, StateSnapshotIntent, TopicHistorySnapshot, RoomMembersSnapshot, } from "./state-tracker/StateSnapshot";
|
|
22
|
-
export type { ChatTypes, File, UnreadSummary, TopicHistoryWindow, PermissionsManager, TypingManager, TypingUsers, };
|
|
25
|
+
export type { ChatTypes, File, UnreadSummary, TopicHistoryWindow, PermissionsManager, TypingManager, TypingUsers, CallsManager, ActivitiesManager, SavedItemsManager, };
|
|
@@ -117,6 +117,7 @@ import { SetClientData } from "./schemes/commands/SetClientData";
|
|
|
117
117
|
import { ClientData } from "./schemes/events/ClientData";
|
|
118
118
|
import { RoomStream, RoomStreamType } from "./schemes/RoomStream";
|
|
119
119
|
import { RoomHistory, RoomHistoryMode } from "./schemes/RoomHistory";
|
|
120
|
+
import { RoomCall } from "./schemes/RoomCall";
|
|
120
121
|
import { GetRoomSummary } from "./schemes/commands/GetRoomSummary";
|
|
121
122
|
import { GetSpaceSummary } from "./schemes/commands/GetSpaceSummary";
|
|
122
123
|
import { SpaceSummary as SpaceSummaryEvent } from "./schemes/events/SpaceSummary";
|
|
@@ -178,5 +179,37 @@ import { Entitlements } from "./schemes/events/Entitlements";
|
|
|
178
179
|
import { EntitlementUsage } from "./schemes/events/EntitlementUsage";
|
|
179
180
|
import { CreateAccessTicket, TicketAudience } from "./schemes/commands/CreateAccessTicket";
|
|
180
181
|
import { AccessTicket } from "./schemes/events/AccessTicket";
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
import { Call, CallMember, CallMemberFlag, CallMode, CallQuality, CallTurn } from "./schemes/Call";
|
|
183
|
+
import { MessageCall, MessageCallStatus } from "./schemes/MessageCall";
|
|
184
|
+
import { JoinCall } from "./schemes/commands/JoinCall";
|
|
185
|
+
import { DeclineCall } from "./schemes/commands/DeclineCall";
|
|
186
|
+
import { InviteToCall } from "./schemes/commands/InviteToCall";
|
|
187
|
+
import { MuteCallMember } from "./schemes/commands/MuteCallMember";
|
|
188
|
+
import { KickCallMember } from "./schemes/commands/KickCallMember";
|
|
189
|
+
import { UpdateCallMember } from "./schemes/commands/UpdateCallMember";
|
|
190
|
+
import { CallJoined } from "./schemes/events/CallJoined";
|
|
191
|
+
import { CallUpdated } from "./schemes/events/CallUpdated";
|
|
192
|
+
import { IncomingCall } from "./schemes/IncomingCall";
|
|
193
|
+
import { IncomingCallUpdated } from "./schemes/events/IncomingCallUpdated";
|
|
194
|
+
import { CallVideoLimitReached } from "./schemes/events/CallVideoLimitReached";
|
|
195
|
+
import { GetCallMembers } from "./schemes/commands/GetCallMembers";
|
|
196
|
+
import { CallMembers } from "./schemes/events/CallMembers";
|
|
197
|
+
import { CallMemberJoined } from "./schemes/events/CallMemberJoined";
|
|
198
|
+
import { CallMemberUpdated } from "./schemes/events/CallMemberUpdated";
|
|
199
|
+
import { CallMemberLeft } from "./schemes/events/CallMemberLeft";
|
|
200
|
+
import { Activity, ActivityType } from "./schemes/Activity";
|
|
201
|
+
import { GetActivities } from "./schemes/commands/GetActivities";
|
|
202
|
+
import { UpdateActivities } from "./schemes/commands/UpdateActivities";
|
|
203
|
+
import { Activities } from "./schemes/events/Activities";
|
|
204
|
+
import { NewActivity } from "./schemes/events/NewActivity";
|
|
205
|
+
import { ActivityUpdated } from "./schemes/events/ActivityUpdated";
|
|
206
|
+
import { ActivityDeleted } from "./schemes/events/ActivityDeleted";
|
|
207
|
+
import { SavedItem, SavedItemType } from "./schemes/SavedItem";
|
|
208
|
+
import { SaveItem } from "./schemes/commands/SaveItem";
|
|
209
|
+
import { UnsaveItem } from "./schemes/commands/UnsaveItem";
|
|
210
|
+
import { GetSavedItems } from "./schemes/commands/GetSavedItems";
|
|
211
|
+
import { SavedItems } from "./schemes/events/SavedItems";
|
|
212
|
+
import { ItemSaved } from "./schemes/events/ItemSaved";
|
|
213
|
+
import { ItemUnsaved } from "./schemes/events/ItemUnsaved";
|
|
214
|
+
export type { Envelope, Message, MessageType, MessageAuthor, MessageMentions, Role, RoleIcon, Room, RoomType, PmParticipant, RoomStream, RoomStreamType, RoomHistory, RoomHistoryMode, RoomCall, RoomMember, RoomSummary, RoomSummaryExtras, Space, SpaceMember, Topic, FollowedTopic, NotificationLevel, User, UserState, PermissionOverwritesValue, ChatLocation, SpaceSummary, SpaceDiscoverable, Emoticon, PermissionOverwritesTarget, BanObject, LeaveReason, UserRelationship, UserRelationshipType, CreateTopicInitialMessage, UserInformation, SessionPush, SessionData, SessionPlatform, UserData, PrivateMessagePolicy, ReactionType, MessageReaction, UserReaction, ToggledReaction, MessagePoll, MessagePollOption, MessageEmbed, MessageEmbedType, SendableEmbed, EmbedTone, EmbedComponent, EmbedContainer, EmbedColumns, EmbedColumn, EmbedSeparator, EmbedText, EmbedMedia, EmbedMediaItem, EmbedPlayer, EmbedButton, EmbedSelect, EmbedSelectOption, EntitlementTarget, EntitlementsSubject, EntitlementValue, EntitlementsMap, EntitlementsExtras, TicketAudience, Call, CallMember, CallQuality, CallMode, CallTurn, IncomingCall, MessageCall, MessageCallStatus, Activity, ActivityType, SavedItem, SavedItemType, Bye, Error, ErrorDetails, IgnoredRooms, Messages, MessageUserReactions, NewInteraction, Interacted, InteractionResolved, InteractionStatus, FoundMessages, FoundMessage, TextRange, NewMessage, NewRole, NewRoom, NewTopic, TopicFollowed, TopicUnfollowed, FollowedTopics, FollowedTopicUpdated, ComputedPermissions, PermissionOverwrites, PermissionOverwritesUpdated, RoleDeleted, RoleUpdated, RoomDeleted, RoomUpdated, RoomJoined, RoomLeft, RoomMembersJoined, RoomMemberLeft, RoomMembers, RoomMemberUpdated, UserUpdated, Session, SpaceDeleted, SpaceUpdated, SpaceJoined, SpaceLeft, SpaceMemberJoined, SpaceMemberLeft, SpaceMembers, SpaceMemberUpdated, SpaceRooms, TopicDeleted, TopicUpdated, PermissionOverwriteTargets, Owners, Ok, DiscoverableSpaces, Emoticons, EmoticonDeleted, NewEmoticon, Bans, ClientData, SpaceSummaryEvent, RoomSummaryEvent, NewRelationship, RelationshipDeleted, Relationships, RoomSummaryUpdated, Pong, MessagesRedacted, MessageUpdated, FoundGif, FoundGifs, GifCategory, GifCategories, UserInfo, Invited, ReactionUpdated, Reacted, ReactionDetails, Typing, Entitlements, EntitlementUsage, AccessTicket, CallJoined, CallUpdated, IncomingCallUpdated, CallVideoLimitReached, CallMembers, CallMemberJoined, CallMemberUpdated, CallMemberLeft, Activities, NewActivity, ActivityUpdated, ActivityDeleted, SavedItems, ItemSaved, ItemUnsaved, AssignRole, GetMessages, SearchMessages, SearchDate, CreateMessage, Ack, CreateRole, CreateRoom, CreateSpace, CreateTopic, FollowTopic, UnfollowTopic, UpdateFollowedTopic, GetFollowedTopics, DeassignRole, DeleteRole, DeleteRoom, DeleteSpace, DeleteTopic, SetPermissionOverwrites, GetPermissionOverwrites, GetComputedPermissions, GetRoomMembers, GetSession, GetSpaceMembers, GetSpaceRooms, JoinRoom, JoinSpace, LeaveRoom, GetIgnoredRooms, LeaveSpace, UpdateRole, UpdateSpace, UpdateRoom, UpdateTopic, GetPermissionOverwriteTargets, CreateOwner, DeleteOwner, GetOwners, Topics, GetTopics, GetDiscoverableSpaces, GetEmoticons, CreateEmoticon, DeleteEmoticon, Ban, Unban, GetBans, Kick, GetClientData, SetClientData, GetSpaceSummary, GetRoomSummary, UpdateSpaceMember, CreateRelationship, DeleteRelationship, GetRelationships, UpdateRoomMember, Ping, ReportAbuse, RedactMessages, UpdateMessage, Interact, AckInteraction, SearchGifs, GetGifCategories, GetUserInfo, SetSessionData, GetSessionData, SetUserData, GetUserData, Invite, Uninvite, GetInvited, React, Unreact, GetReactionDetails, Type, GetEntitlements, CreateAccessTicket, JoinCall, DeclineCall, InviteToCall, MuteCallMember, KickCallMember, UpdateCallMember, GetCallMembers, GetActivities, UpdateActivities, SaveItem, UnsaveItem, GetSavedItems, };
|
|
215
|
+
export { CallMemberFlag, ErrorCode, MessageEmbedFlag, NO_LIMIT, STORAGE_UNIT_BYTES, HistoryRotation, PmParticipantFlag, RoleFlag, SearchRange, SpaceFeature, SpaceIntent, UiPurpose, UserFeature, UserStatus, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChatLocation } from "./ChatLocation";
|
|
2
|
+
export type ActivityType = 'Mention' | 'Reply' | 'Reaction' | 'Thread' | 'MissedCall' | 'Custom';
|
|
3
|
+
export interface Activity {
|
|
4
|
+
id: string;
|
|
5
|
+
type: ActivityType;
|
|
6
|
+
groupKey: string | null;
|
|
7
|
+
location: ChatLocation | null;
|
|
8
|
+
messageId: string | null;
|
|
9
|
+
actorIds: string[];
|
|
10
|
+
count: number;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
title: string | null;
|
|
13
|
+
description: string | null;
|
|
14
|
+
link: string | null;
|
|
15
|
+
isRead: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
import { ChatLocation } from "./ChatLocation";
|
|
3
|
+
export type CallMode = 'Conversation' | 'Stage' | 'Queue';
|
|
4
|
+
export declare enum CallMemberFlag {
|
|
5
|
+
Camera = 1,
|
|
6
|
+
ScreenShare = 2,
|
|
7
|
+
Speaker = 4,
|
|
8
|
+
RaiseBlocked = 16
|
|
9
|
+
}
|
|
10
|
+
export interface CallMember {
|
|
11
|
+
user: User;
|
|
12
|
+
joinedAt: string;
|
|
13
|
+
flags: number;
|
|
14
|
+
handRaisedAt: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface CallTurn {
|
|
17
|
+
userId: string;
|
|
18
|
+
endsAt: string;
|
|
19
|
+
claimBy: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface CallQuality {
|
|
22
|
+
audioBitrate: number;
|
|
23
|
+
cameraMaxHeight: number;
|
|
24
|
+
screenMaxHeight: number;
|
|
25
|
+
screenMaxFps: number;
|
|
26
|
+
}
|
|
27
|
+
export interface Call {
|
|
28
|
+
location: ChatLocation;
|
|
29
|
+
messageId: string;
|
|
30
|
+
startedAt: string;
|
|
31
|
+
mode: CallMode;
|
|
32
|
+
turn: CallTurn | null;
|
|
33
|
+
autoEndAt: string | null;
|
|
34
|
+
members: CallMember[];
|
|
35
|
+
}
|
|
@@ -3,7 +3,8 @@ import { ChatLocation } from "./ChatLocation";
|
|
|
3
3
|
import { MessageReaction } from "./Reaction";
|
|
4
4
|
import { MessagePoll } from "./MessagePoll";
|
|
5
5
|
import { MessageEmbed } from "./MessageEmbed";
|
|
6
|
-
|
|
6
|
+
import { MessageCall } from "./MessageCall";
|
|
7
|
+
export type MessageType = 'Text' | 'RoomJoin' | 'RoomMemberAdd' | 'RoomLeave' | 'SpaceJoin' | 'SpaceLeave' | 'TopicChange' | 'CustomNickChange' | 'Ephemeral' | 'Poll' | 'RoomRename' | 'Call' | 'CallJoin' | 'CallLeave';
|
|
7
8
|
/**
|
|
8
9
|
* Mention targets a message actually reached, as resolved by the server: role
|
|
9
10
|
* mentions the author was not allowed to fire are absent, even though they stay
|
|
@@ -29,6 +30,7 @@ export interface Message {
|
|
|
29
30
|
attachments: string[] | null;
|
|
30
31
|
reactions: MessageReaction[];
|
|
31
32
|
poll?: MessagePoll;
|
|
33
|
+
call?: MessageCall | null;
|
|
32
34
|
mentions: MessageMentions | null;
|
|
33
35
|
editedAt?: string | null;
|
|
34
36
|
replyTo?: string | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CallMember, CallMode } from "./Call";
|
|
2
|
+
export type MessageCallStatus = 'Ongoing' | 'Ended' | 'Missed' | 'Declined';
|
|
3
|
+
export interface MessageCall {
|
|
4
|
+
status: MessageCallStatus;
|
|
5
|
+
mode: CallMode;
|
|
6
|
+
duration: number | null;
|
|
7
|
+
partialMembers: CallMember[];
|
|
8
|
+
memberCount: number;
|
|
9
|
+
}
|
|
@@ -3,6 +3,7 @@ import { User } from "./User";
|
|
|
3
3
|
import { RoomStream } from "./RoomStream";
|
|
4
4
|
import { RoomHistory } from "./RoomHistory";
|
|
5
5
|
import { PmParticipant } from "./PmParticipant";
|
|
6
|
+
import { RoomCall } from "./RoomCall";
|
|
6
7
|
export type RoomType = 'Text' | 'ClassicText' | 'Pm';
|
|
7
8
|
export interface Room {
|
|
8
9
|
id: string;
|
|
@@ -17,4 +18,5 @@ export interface Room {
|
|
|
17
18
|
flags: number;
|
|
18
19
|
stream: RoomStream | null;
|
|
19
20
|
history: RoomHistory | null;
|
|
21
|
+
call: RoomCall;
|
|
20
22
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Space } from "./Space";
|
|
2
2
|
import { Room } from "./Room";
|
|
3
|
+
import { Call } from "./Call";
|
|
4
|
+
import { IncomingCall } from "./IncomingCall";
|
|
3
5
|
export interface UserState {
|
|
4
6
|
spaces: Space[];
|
|
5
7
|
rooms: Room[];
|
|
8
|
+
calls: Call[];
|
|
9
|
+
incomingCalls: IncomingCall[];
|
|
6
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RoomStream } from "../RoomStream";
|
|
2
2
|
import { RoomHistory } from "../RoomHistory";
|
|
3
|
+
import { RoomCall } from "../RoomCall";
|
|
3
4
|
export interface UpdateRoom {
|
|
4
5
|
id: string;
|
|
5
6
|
name?: string;
|
|
@@ -7,4 +8,5 @@ export interface UpdateRoom {
|
|
|
7
8
|
flags?: number;
|
|
8
9
|
stream?: RoomStream | null;
|
|
9
10
|
history?: RoomHistory;
|
|
11
|
+
call?: RoomCall;
|
|
10
12
|
}
|
|
@@ -9,6 +9,11 @@ export interface Error {
|
|
|
9
9
|
}
|
|
10
10
|
export declare enum ErrorCode {
|
|
11
11
|
Authentication = "AuthenticationException",
|
|
12
|
+
CallFull = "CallFullException",
|
|
13
|
+
CallMode = "CallModeException",
|
|
14
|
+
CallNotFound = "CallNotFoundException",
|
|
15
|
+
CallsNotAccepted = "CallsNotAcceptedException",
|
|
16
|
+
CallsUnavailable = "CallsUnavailableException",
|
|
12
17
|
CommandRateLimitExceeded = "CommandRateLimitExceededException",
|
|
13
18
|
InvalidSearchQuery = "InvalidSearchQueryException",
|
|
14
19
|
MessageSearchUnavailable = "MessageSearchUnavailableException",
|
|
@@ -16,7 +21,10 @@ export declare enum ErrorCode {
|
|
|
16
21
|
ReactionExistsAlready = "ReactionExistsAlreadyException",
|
|
17
22
|
RoomIgnored = "RoomIgnoredException",
|
|
18
23
|
RoomNotFound = "RoomNotFoundException",
|
|
24
|
+
SavedItemsLimitReached = "SavedItemsLimitReachedException",
|
|
19
25
|
SpaceJoinRestricted = "SpaceJoinRestrictedException",
|
|
26
|
+
TooManyCallInvitees = "TooManyCallInviteesException",
|
|
20
27
|
TopicNotFound = "TopicNotFoundException",
|
|
21
|
-
UserNotFound = "UserNotFoundException"
|
|
28
|
+
UserNotFound = "UserNotFoundException",
|
|
29
|
+
UserType = "UserTypeException"
|
|
22
30
|
}
|