diff --git a/app/constants/database.ts b/app/constants/database.ts index 3fc69705b..f69136ba6 100644 --- a/app/constants/database.ts +++ b/app/constants/database.ts @@ -27,7 +27,6 @@ export const MM_TABLES = { PREFERENCE: 'Preference', REACTION: 'Reaction', ROLE: 'Role', - SLASH_COMMAND: 'SlashCommand', SYSTEM: 'System', TEAM: 'Team', TEAM_CHANNEL_HISTORY: 'TeamChannelHistory', diff --git a/app/database/manager/__mocks__/index.ts b/app/database/manager/__mocks__/index.ts index 64e448527..fa3a51cab 100644 --- a/app/database/manager/__mocks__/index.ts +++ b/app/database/manager/__mocks__/index.ts @@ -14,7 +14,7 @@ import {InfoModel, GlobalModel, ServersModel} from '@database/models/app'; import {CategoryModel, CategoryChannelModel, ChannelModel, ChannelInfoModel, ChannelMembershipModel, CustomEmojiModel, DraftModel, FileModel, MyChannelModel, MyChannelSettingsModel, MyTeamModel, PostModel, PostsInChannelModel, PostsInThreadModel, PreferenceModel, ReactionModel, RoleModel, - SlashCommandModel, SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, + SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, TermsOfServiceModel, ThreadModel, ThreadParticipantModel, ThreadInTeamModel, UserModel, } from '@database/models/server'; import AppDataOperator from '@database/operator/app_data_operator'; @@ -50,7 +50,7 @@ class DatabaseManager { CategoryModel, CategoryChannelModel, ChannelModel, ChannelInfoModel, ChannelMembershipModel, CustomEmojiModel, DraftModel, FileModel, MyChannelModel, MyChannelSettingsModel, MyTeamModel, PostModel, PostsInChannelModel, PostsInThreadModel, PreferenceModel, ReactionModel, RoleModel, - SlashCommandModel, SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, + SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, TermsOfServiceModel, ThreadModel, ThreadParticipantModel, ThreadInTeamModel, UserModel, ]; this.databaseDirectory = ''; diff --git a/app/database/manager/index.ts b/app/database/manager/index.ts index 5b7d679e4..941224541 100644 --- a/app/database/manager/index.ts +++ b/app/database/manager/index.ts @@ -15,7 +15,7 @@ import {InfoModel, GlobalModel, ServersModel} from '@database/models/app'; import {CategoryModel, CategoryChannelModel, ChannelModel, ChannelInfoModel, ChannelMembershipModel, CustomEmojiModel, DraftModel, FileModel, MyChannelModel, MyChannelSettingsModel, MyTeamModel, PostModel, PostsInChannelModel, PostsInThreadModel, PreferenceModel, ReactionModel, RoleModel, - SlashCommandModel, SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, + SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, TermsOfServiceModel, ThreadModel, ThreadParticipantModel, ThreadInTeamModel, UserModel, } from '@database/models/server'; import AppDataOperator from '@database/operator/app_data_operator'; @@ -45,7 +45,7 @@ class DatabaseManager { CategoryModel, CategoryChannelModel, ChannelModel, ChannelInfoModel, ChannelMembershipModel, CustomEmojiModel, DraftModel, FileModel, MyChannelModel, MyChannelSettingsModel, MyTeamModel, PostModel, PostsInChannelModel, PostsInThreadModel, PreferenceModel, ReactionModel, RoleModel, - SlashCommandModel, SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, + SystemModel, TeamModel, TeamChannelHistoryModel, TeamMembershipModel, TeamSearchHistoryModel, TermsOfServiceModel, ThreadModel, ThreadParticipantModel, ThreadInTeamModel, UserModel, ]; diff --git a/app/database/models/server/index.ts b/app/database/models/server/index.ts index 6eb389c76..635cf2fd5 100644 --- a/app/database/models/server/index.ts +++ b/app/database/models/server/index.ts @@ -18,7 +18,6 @@ export {default as PostsInThreadModel} from './posts_in_thread'; export {default as PreferenceModel} from './preference'; export {default as ReactionModel} from './reaction'; export {default as RoleModel} from './role'; -export {default as SlashCommandModel} from './slash_command'; export {default as SystemModel} from './system'; export {default as TeamChannelHistoryModel} from './team_channel_history'; export {default as TeamMembershipModel} from './team_membership'; diff --git a/app/database/models/server/slash_command.ts b/app/database/models/server/slash_command.ts deleted file mode 100644 index 4e23637dd..000000000 --- a/app/database/models/server/slash_command.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -import {Relation} from '@nozbe/watermelondb'; -import {field, immutableRelation} from '@nozbe/watermelondb/decorators'; -import Model, {Associations} from '@nozbe/watermelondb/Model'; - -import {MM_TABLES} from '@constants/database'; - -import type SlashCommandModelInterface from '@typings/database/models/servers/slash_command'; -import type TeamModel from '@typings/database/models/servers/team'; - -const {SLASH_COMMAND, TEAM} = MM_TABLES.SERVER; - -/** - * The SlashCommand model describes the commands of the various commands available in each team. - */ -export default class SlashCommandModel extends Model implements SlashCommandModelInterface { - /** table (name) : SlashCommand */ - static table = SLASH_COMMAND; - - /** associations : Describes every relationship to this table. */ - static associations: Associations = { - - /** A TEAM can have multiple slash commands. (relationship is 1:N) */ - [TEAM]: {type: 'belongs_to', key: 'team_id'}, - }; - - /** is_auto_complete : Boolean flag for auto-completing slash commands */ - @field('is_auto_complete') isAutoComplete!: boolean; - - /** description : The description for the slash command */ - @field('description') description!: string; - - /** display_name : The name for the command */ - @field('display_name') displayName!: string; - - /** hint : A helpful text explaining the purpose of the command */ - @field('hint') hint!: string; - - /** method : HTTP API methods like get, put, post, patch, etc. */ - @field('method') method!: string; - - /** team_id : The foreign key of the parent Team */ - @field('team_id') teamId!: string; - - /** token : A key identifying this slash command */ - @field('token') token!: string; - - /** trigger : A pattern/text used to recognize when a slash command needs to launch */ - @field('trigger') trigger!: string; - - /** update_at : The timestamp to when this command was last updated on the server */ - @field('update_at') updateAt!: number; - - /** team : The related parent TEAM record */ - @immutableRelation(TEAM, 'team_id') team!: Relation; -} diff --git a/app/database/models/server/team.ts b/app/database/models/server/team.ts index 965052fb8..10793354a 100644 --- a/app/database/models/server/team.ts +++ b/app/database/models/server/team.ts @@ -10,7 +10,6 @@ import {MM_TABLES} from '@constants/database'; import type CategoryModel from '@typings/database/models/servers/category'; import type ChannelModel from '@typings/database/models/servers/channel'; import type MyTeamModel from '@typings/database/models/servers/my_team'; -import type SlashCommandModel from '@typings/database/models/servers/slash_command'; import type TeamModelInterface from '@typings/database/models/servers/team'; import type TeamChannelHistoryModel from '@typings/database/models/servers/team_channel_history'; import type TeamMembershipModel from '@typings/database/models/servers/team_membership'; @@ -22,7 +21,6 @@ const { CHANNEL, TEAM, MY_TEAM, - SLASH_COMMAND, TEAM_CHANNEL_HISTORY, TEAM_MEMBERSHIP, TEAM_SEARCH_HISTORY, @@ -49,9 +47,6 @@ export default class TeamModel extends Model implements TeamModelInterface { /** A TEAM can be associated to one MY_TEAM (relationship is 1:1) */ [MY_TEAM]: {type: 'has_many', foreignKey: 'id'}, - /** A TEAM has a 1:N relationship with SLASH_COMMAND. A TEAM can possess multiple slash commands */ - [SLASH_COMMAND]: {type: 'has_many', foreignKey: 'team_id'}, - /** A TEAM has a 1:N relationship with TEAM_MEMBERSHIP. A TEAM can regroup multiple users */ [TEAM_MEMBERSHIP]: {type: 'has_many', foreignKey: 'team_id'}, @@ -98,9 +93,6 @@ export default class TeamModel extends Model implements TeamModelInterface { /** myTeam : Retrieves additional information about the team that this user is possibly part of. */ @immutableRelation(MY_TEAM, 'id') myTeam!: Relation; - /** slashCommands : All the slash commands associated with this team */ - @children(SLASH_COMMAND) slashCommands!: Query; - /** teamChannelHistory : A history of the channels in this team that has been visited, ordered by the most recent and capped to the last 5 */ @immutableRelation(TEAM_CHANNEL_HISTORY, 'id') teamChannelHistory!: Relation; diff --git a/app/database/operator/server_data_operator/handlers/team.test.ts b/app/database/operator/server_data_operator/handlers/team.test.ts index c7e00a182..64dbab05a 100644 --- a/app/database/operator/server_data_operator/handlers/team.test.ts +++ b/app/database/operator/server_data_operator/handlers/team.test.ts @@ -4,7 +4,6 @@ import DatabaseManager from '@database/manager'; import { isRecordMyTeamEqualToRaw, - isRecordSlashCommandEqualToRaw, isRecordTeamChannelHistoryEqualToRaw, isRecordTeamEqualToRaw, isRecordTeamMembershipEqualToRaw, @@ -12,7 +11,6 @@ import { } from '@database/operator/server_data_operator/comparators'; import { transformMyTeamRecord, - transformSlashCommandRecord, transformTeamChannelHistoryRecord, transformTeamMembershipRecord, transformTeamRecord, @@ -184,46 +182,4 @@ describe('*** Operator: Team Handlers tests ***', () => { transformer: transformTeamSearchHistoryRecord, }); }); - - it('=> HandleSlashCommand: should write to the SLASH_COMMAND table', async () => { - expect.assertions(2); - - const spyOnHandleRecords = jest.spyOn(operator, 'handleRecords'); - const slashCommands = [ - { - id: 'command_1', - auto_complete: true, - auto_complete_desc: 'mock_command', - auto_complete_hint: 'hint', - create_at: 1445538153952, - creator_id: 'creator_id', - delete_at: 1445538153952, - description: 'description', - display_name: 'display_name', - icon_url: 'display_name', - method: 'get', - team_id: 'teamA', - token: 'token', - trigger: 'trigger', - update_at: 1445538153953, - url: 'url', - username: 'userA', - }, - ]; - - await operator.handleSlashCommand({ - slashCommands, - prepareRecordsOnly: false, - }); - - expect(spyOnHandleRecords).toHaveBeenCalledTimes(1); - expect(spyOnHandleRecords).toHaveBeenCalledWith({ - fieldName: 'id', - createOrUpdateRawValues: slashCommands, - tableName: 'SlashCommand', - prepareRecordsOnly: false, - findMatchingRecordBy: isRecordSlashCommandEqualToRaw, - transformer: transformSlashCommandRecord, - }); - }); }); diff --git a/app/database/operator/server_data_operator/handlers/team.ts b/app/database/operator/server_data_operator/handlers/team.ts index bb84772ca..66d952ff1 100644 --- a/app/database/operator/server_data_operator/handlers/team.ts +++ b/app/database/operator/server_data_operator/handlers/team.ts @@ -5,7 +5,6 @@ import {MM_TABLES} from '@constants/database'; import DataOperatorException from '@database/exceptions/data_operator_exception'; import { isRecordMyTeamEqualToRaw, - isRecordSlashCommandEqualToRaw, isRecordTeamChannelHistoryEqualToRaw, isRecordTeamEqualToRaw, isRecordTeamMembershipEqualToRaw, @@ -13,7 +12,6 @@ import { } from '@database/operator/server_data_operator/comparators'; import { transformMyTeamRecord, - transformSlashCommandRecord, transformTeamChannelHistoryRecord, transformTeamMembershipRecord, transformTeamRecord, @@ -34,7 +32,6 @@ import type TeamSearchHistoryModel from '@typings/database/models/servers/team_s const { MY_TEAM, - SLASH_COMMAND, TEAM, TEAM_CHANNEL_HISTORY, TEAM_MEMBERSHIP, @@ -159,33 +156,6 @@ const TeamHandler = (superclass: any) => class extends superclass { }); }; - /** - * handleSlashCommand: Handler responsible for the Create/Update operations occurring on the SLASH_COMMAND table from the 'Server' schema - * @param {HandleSlashCommandArgs} slashCommandsArgs - * @param {SlashCommand[]} slashCommandsArgs.slashCommands - * @param {boolean} slashCommandsArgs.prepareRecordsOnly - * @throws DataOperatorException - * @returns {Promise} - */ - handleSlashCommand = ({slashCommands, prepareRecordsOnly = true}: HandleSlashCommandArgs): Promise => { - if (!slashCommands.length) { - throw new DataOperatorException( - 'An empty "slashCommands" array has been passed to the handleSlashCommand method', - ); - } - - const createOrUpdateRawValues = getUniqueRawsBy({raws: slashCommands, key: 'id'}); - - return this.handleRecords({ - fieldName: 'id', - findMatchingRecordBy: isRecordSlashCommandEqualToRaw, - transformer: transformSlashCommandRecord, - prepareRecordsOnly, - createOrUpdateRawValues, - tableName: SLASH_COMMAND, - }); - }; - /** * handleMyTeam: Handler responsible for the Create/Update operations occurring on the MY_TEAM table from the 'Server' schema * @param {HandleMyTeamArgs} myTeamsArgs diff --git a/app/database/operator/server_data_operator/transformers/team.test.ts b/app/database/operator/server_data_operator/transformers/team.test.ts index 0c979e30a..c53628118 100644 --- a/app/database/operator/server_data_operator/transformers/team.test.ts +++ b/app/database/operator/server_data_operator/transformers/team.test.ts @@ -3,7 +3,6 @@ import { transformMyTeamRecord, - transformSlashCommandRecord, transformTeamChannelHistoryRecord, transformTeamMembershipRecord, transformTeamRecord, @@ -13,43 +12,6 @@ import {createTestConnection} from '@database/operator/utils/create_test_connect import {OperationType} from '@typings/database/enums'; describe('*** TEAM Prepare Records Test ***', () => { - it('=> transformSlashCommandRecord: should return an array of type SlashCommand', async () => { - expect.assertions(3); - - const database = await createTestConnection({databaseName: 'team_prepare_records', setActive: true}); - expect(database).toBeTruthy(); - - const preparedRecords = await transformSlashCommandRecord({ - action: OperationType.CREATE, - database: database!, - value: { - record: undefined, - raw: { - id: 'command_1', - auto_complete: true, - auto_complete_desc: 'mock_command', - auto_complete_hint: 'hint', - create_at: 1445538153952, - creator_id: 'creator_id', - delete_at: 1445538153952, - description: 'description', - display_name: 'display_name', - icon_url: 'display_name', - method: 'get', - team_id: 'teamA', - token: 'token', - trigger: 'trigger', - update_at: 1445538153953, - url: 'url', - username: 'userA', - }, - }, - }); - - expect(preparedRecords).toBeTruthy(); - expect(preparedRecords!.collection.modelClass.name).toBe('SlashCommandModel'); - }); - it('=> transformMyTeamRecord: should return an array of type MyTeam', async () => { expect.assertions(3); diff --git a/app/database/operator/server_data_operator/transformers/team.ts b/app/database/operator/server_data_operator/transformers/team.ts index 29a464897..aabb7eeea 100644 --- a/app/database/operator/server_data_operator/transformers/team.ts +++ b/app/database/operator/server_data_operator/transformers/team.ts @@ -7,7 +7,6 @@ import {OperationType} from '@typings/database/enums'; import type {TransformerArgs} from '@typings/database/database'; import type MyTeamModel from '@typings/database/models/servers/my_team'; -import type SlashCommandModel from '@typings/database/models/servers/slash_command'; import type TeamModel from '@typings/database/models/servers/team'; import type TeamChannelHistoryModel from '@typings/database/models/servers/team_channel_history'; import type TeamMembershipModel from '@typings/database/models/servers/team_membership'; @@ -15,7 +14,6 @@ import type TeamSearchHistoryModel from '@typings/database/models/servers/team_s const { MY_TEAM, - SLASH_COMMAND, TEAM, TEAM_CHANNEL_HISTORY, TEAM_MEMBERSHIP, @@ -140,41 +138,6 @@ export const transformTeamSearchHistoryRecord = ({action, database, value}: Tran }) as Promise; }; -/** - * transformSlashCommandRecord: Prepares a record of the SERVER database 'SlashCommand' table for update or create actions. - * @param {DataFactory} operator - * @param {Database} operator.database - * @param {RecordPair} operator.value - * @returns {Promise} - */ -export const transformSlashCommandRecord = ({action, database, value}: TransformerArgs): Promise => { - const raw = value.raw as SlashCommand; - const record = value.record as SlashCommandModel; - const isCreateAction = action === OperationType.CREATE; - - // If isCreateAction is true, we will use the id (API response) from the RAW, else we shall use the existing record id from the database - const fieldsMapper = (slashCommand: SlashCommandModel) => { - slashCommand._raw.id = isCreateAction ? (raw?.id ?? slashCommand.id) : record.id; - slashCommand.isAutoComplete = raw.auto_complete; - slashCommand.description = raw.description; - slashCommand.displayName = raw.display_name; - slashCommand.hint = raw.auto_complete_hint; - slashCommand.method = raw.method; - slashCommand.teamId = raw.team_id; - slashCommand.token = raw.token; - slashCommand.trigger = raw.trigger; - slashCommand.updateAt = raw.update_at; - }; - - return prepareBaseRecord({ - action, - database, - tableName: SLASH_COMMAND, - value, - fieldsMapper, - }) as Promise; -}; - /** * transformMyTeamRecord: Prepares a record of the SERVER database 'MyTeam' table for update or create actions. * @param {DataFactory} operator diff --git a/app/database/operator/utils/general.ts b/app/database/operator/utils/general.ts index d4c7bf5ea..d47f3cc38 100644 --- a/app/database/operator/utils/general.ts +++ b/app/database/operator/utils/general.ts @@ -10,7 +10,7 @@ import type SlashCommandModel from '@typings/database/models/servers/slash_comma import type TeamModel from '@typings/database/models/servers/team'; import type UserModel from '@typings/database/models/servers/user'; -const {CHANNEL, POST, SLASH_COMMAND, TEAM, USER} = MM_TABLES.SERVER; +const {CHANNEL, POST, TEAM, USER} = MM_TABLES.SERVER; /** * getValidRecordsForUpdate: Database Operations on some tables are expensive. As such, we would like to operate if and only if we are @@ -22,7 +22,7 @@ const {CHANNEL, POST, SLASH_COMMAND, TEAM, USER} = MM_TABLES.SERVER; * @returns {boolean} */ export const getValidRecordsForUpdate = ({tableName, newValue, existingRecord}: IdenticalRecordArgs) => { - const guardTables = [CHANNEL, POST, SLASH_COMMAND, TEAM, USER]; + const guardTables = [CHANNEL, POST, TEAM, USER]; if (guardTables.includes(tableName)) { type Raw = Post | UserProfile | Team | SlashCommand | Channel; type ExistingRecord = PostModel | UserModel | TeamModel | SlashCommandModel | ChannelModel; diff --git a/app/database/schema/server/index.ts b/app/database/schema/server/index.ts index a09e076f6..32f88c139 100644 --- a/app/database/schema/server/index.ts +++ b/app/database/schema/server/index.ts @@ -21,7 +21,6 @@ import { PreferenceSchema, ReactionSchema, RoleSchema, - SlashCommandSchema, SystemSchema, TeamChannelHistorySchema, TeamMembershipSchema, @@ -54,7 +53,6 @@ export const serverSchema: AppSchema = appSchema({ PreferenceSchema, ReactionSchema, RoleSchema, - SlashCommandSchema, SystemSchema, TeamChannelHistorySchema, TeamMembershipSchema, diff --git a/app/database/schema/server/table_schemas/index.ts b/app/database/schema/server/table_schemas/index.ts index 87c9b9221..f8d6de4a8 100644 --- a/app/database/schema/server/table_schemas/index.ts +++ b/app/database/schema/server/table_schemas/index.ts @@ -18,7 +18,6 @@ export {default as PostsInChannelSchema} from './posts_in_channel'; export {default as PreferenceSchema} from './preference'; export {default as ReactionSchema} from './reaction'; export {default as RoleSchema} from './role'; -export {default as SlashCommandSchema} from './slash_command'; export {default as SystemSchema} from './system'; export {default as TeamChannelHistorySchema} from './team_channel_history'; export {default as TeamMembershipSchema} from './team_membership'; diff --git a/app/database/schema/server/table_schemas/slash_command.ts b/app/database/schema/server/table_schemas/slash_command.ts deleted file mode 100644 index b6b959727..000000000 --- a/app/database/schema/server/table_schemas/slash_command.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -import {tableSchema} from '@nozbe/watermelondb'; - -import {MM_TABLES} from '@constants/database'; - -const {SLASH_COMMAND} = MM_TABLES.SERVER; - -export default tableSchema({ - name: SLASH_COMMAND, - columns: [ - {name: 'is_auto_complete', type: 'boolean'}, - {name: 'description', type: 'string'}, - {name: 'display_name', type: 'string'}, - {name: 'hint', type: 'string'}, - {name: 'method', type: 'string'}, - {name: 'team_id', type: 'string', isIndexed: true}, - {name: 'token', type: 'string'}, - {name: 'trigger', type: 'string'}, - {name: 'update_at', type: 'number'}, - ], -}); diff --git a/app/database/schema/server/test.ts b/app/database/schema/server/test.ts index 5a56fb5fc..a83d8e103 100644 --- a/app/database/schema/server/test.ts +++ b/app/database/schema/server/test.ts @@ -25,7 +25,6 @@ const { PREFERENCE, REACTION, ROLE, - SLASH_COMMAND, SYSTEM, TEAM, TEAM_CHANNEL_HISTORY, @@ -345,32 +344,6 @@ describe('*** Test schema for SERVER database ***', () => { {name: 'permissions', type: 'string'}, ], }, - [SLASH_COMMAND]: { - name: SLASH_COMMAND, - unsafeSql: undefined, - columns: { - is_auto_complete: {name: 'is_auto_complete', type: 'boolean'}, - description: {name: 'description', type: 'string'}, - display_name: {name: 'display_name', type: 'string'}, - hint: {name: 'hint', type: 'string'}, - method: {name: 'method', type: 'string'}, - team_id: {name: 'team_id', type: 'string', isIndexed: true}, - token: {name: 'token', type: 'string'}, - trigger: {name: 'trigger', type: 'string'}, - update_at: {name: 'update_at', type: 'number'}, - }, - columnArray: [ - {name: 'is_auto_complete', type: 'boolean'}, - {name: 'description', type: 'string'}, - {name: 'display_name', type: 'string'}, - {name: 'hint', type: 'string'}, - {name: 'method', type: 'string'}, - {name: 'team_id', type: 'string', isIndexed: true}, - {name: 'token', type: 'string'}, - {name: 'trigger', type: 'string'}, - {name: 'update_at', type: 'number'}, - ], - }, [SYSTEM]: { name: SYSTEM, unsafeSql: undefined, diff --git a/app/queries/servers/team.ts b/app/queries/servers/team.ts index 3f0fd3103..e4070557f 100644 --- a/app/queries/servers/team.ts +++ b/app/queries/servers/team.ts @@ -236,7 +236,6 @@ export const prepareDeleteTeam = async (team: TeamModel): Promise => { const associatedChildren: Array|undefined> = [ team.members, - team.slashCommands, team.teamSearchHistories, ]; await Promise.all(associatedChildren.map(async (children) => { diff --git a/types/database/models/servers/team.d.ts b/types/database/models/servers/team.d.ts index 8a68267ce..6aec2b8d0 100644 --- a/types/database/models/servers/team.d.ts +++ b/types/database/models/servers/team.d.ts @@ -4,7 +4,6 @@ import type CategoryModel from './category'; import type ChannelModel from './channel'; import type MyTeamModel from './my_team'; -import type SlashCommandModel from './slash_command'; import type TeamChannelHistoryModel from './team_channel_history'; import type TeamMembershipModel from './team_membership'; import type TeamSearchHistoryModel from './team_search_history'; @@ -57,9 +56,6 @@ export default class TeamModel extends Model { /** myTeam : Retrieves additional information about the team that this user is possibly part of. This query might yield no result if the user isn't part of a team. */ myTeam: Relation; - /** slashCommands : All the slash commands associated with this team */ - slashCommands: Query; - /** teamChannelHistory : A history of the channels in this team that has been visited, ordered by the most recent and capped to the last 5 */ teamChannelHistory: Relation;