Gekidou Update deps (#5530)

This commit is contained in:
Elias Nahum
2021-07-11 07:52:44 -04:00
committed by GitHub
parent 134c4a49c5
commit c64277bdbf
54 changed files with 16537 additions and 23546 deletions

View File

@@ -35,10 +35,10 @@ const {
} = MM_TABLES.SERVER;
export interface GroupHandlerMix {
handleGroupMembership : ({groupMemberships, prepareRecordsOnly}: HandleGroupMembershipArgs) => GroupMembership[] | boolean,
handleGroup : ({groups, prepareRecordsOnly}: HandleGroupArgs) => Group[] | boolean,
handleGroupsInTeam : ({groupsInTeams, prepareRecordsOnly} : HandleGroupsInTeamArgs) => GroupsInTeam[] | boolean,
handleGroupsInChannel : ({groupsInChannels, prepareRecordsOnly}: HandleGroupsInChannelArgs) => GroupsInChannel[] | boolean
handleGroupMembership: ({groupMemberships, prepareRecordsOnly}: HandleGroupMembershipArgs) => GroupMembership[] | boolean;
handleGroup: ({groups, prepareRecordsOnly}: HandleGroupArgs) => Group[] | boolean;
handleGroupsInTeam: ({groupsInTeams, prepareRecordsOnly}: HandleGroupsInTeamArgs) => GroupsInTeam[] | boolean;
handleGroupsInChannel: ({groupsInChannels, prepareRecordsOnly}: HandleGroupsInChannelArgs) => GroupsInChannel[] | boolean;
}
const GroupHandler = (superclass: any) => class extends superclass {
@@ -112,7 +112,7 @@ const GroupHandler = (superclass: any) => class extends superclass {
* @throws DataOperatorException
* @returns {GroupsInTeam[]}
*/
handleGroupsInTeam = async ({groupsInTeams, prepareRecordsOnly = true} : HandleGroupsInTeamArgs) => {
handleGroupsInTeam = async ({groupsInTeams, prepareRecordsOnly = true}: HandleGroupsInTeamArgs) => {
let records: GroupsInTeam[] = [];
if (!groupsInTeams.length) {

View File

@@ -49,7 +49,7 @@ const {
} = MM_TABLES.SERVER;
export interface PostHandlerMix {
handleDraft: ({drafts, prepareRecordsOnly}: HandleDraftArgs) => Draft[] | boolean
handleDraft: ({drafts, prepareRecordsOnly}: HandleDraftArgs) => Draft[] | boolean;
handleFiles: ({files, prepareRecordsOnly}: HandleFilesArgs) => Promise<File[] | any[]>;
handlePostMetadata: ({embeds, images, prepareRecordsOnly}: HandlePostMetadataArgs) => Promise<any[] | PostMetadata[]>;
handlePosts: ({orders, values, previousPostId}: HandlePostsArgs) => Promise<void>;
@@ -132,8 +132,8 @@ const PostHandler = (superclass: any) => class extends superclass {
const postsInThread = [];
let reactions: RawReaction[] = [];
let emojis: RawCustomEmoji[] = [];
const images: { images: Dictionary<PostImage>; postId: string }[] = [];
const embeds: { embed: RawEmbed[]; postId: string }[] = [];
const images: Array<{ images: Dictionary<PostImage>; postId: string }> = [];
const embeds: Array<{ embed: RawEmbed[]; postId: string }> = [];
// We create the 'chain of posts' by linking each posts' previousId to the post before it in the order array
const linkedRawPosts: RecordPair[] = createPostsChain({

View File

@@ -39,10 +39,10 @@ const {
} = MM_TABLES.SERVER;
export interface UserHandlerMix {
handleChannelMembership : ({channelMemberships, prepareRecordsOnly}: HandleChannelMembershipArgs) => Promise<ChannelMembership[]>;
handlePreferences : ({preferences, prepareRecordsOnly}: HandlePreferencesArgs) => Promise<Preference[]>;
handleReactions : ({reactions, prepareRecordsOnly}: HandleReactionsArgs) => Promise<(Reaction | CustomEmoji)[]>;
handleUsers : ({users, prepareRecordsOnly}: HandleUsersArgs) => Promise<User[]>;
handleChannelMembership: ({channelMemberships, prepareRecordsOnly}: HandleChannelMembershipArgs) => Promise<ChannelMembership[]>;
handlePreferences: ({preferences, prepareRecordsOnly}: HandlePreferencesArgs) => Promise<Preference[]>;
handleReactions: ({reactions, prepareRecordsOnly}: HandleReactionsArgs) => Promise<Array<Reaction | CustomEmoji>>;
handleUsers: ({users, prepareRecordsOnly}: HandleUsersArgs) => Promise<User[]>;
}
const UserHandler = (superclass: any) => class extends superclass {
@@ -117,7 +117,7 @@ const UserHandler = (superclass: any) => class extends superclass {
* @returns {Promise<(Reaction| CustomEmoji)[]>}
*/
handleReactions = async ({reactions, prepareRecordsOnly}: HandleReactionsArgs) => {
let batchRecords: (Reaction| CustomEmoji)[] = [];
let batchRecords: Array<Reaction| CustomEmoji> = [];
if (!reactions.length) {
throw new DataOperatorException(