mattermost-redux 11.4.0 → 11.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.
Files changed (49) hide show
  1. package/lib/action_types/agents.d.ts +6 -0
  2. package/lib/action_types/agents.js +6 -0
  3. package/lib/action_types/index.d.ts +2 -1
  4. package/lib/action_types/index.js +3 -1
  5. package/lib/action_types/posts.d.ts +1 -0
  6. package/lib/action_types/posts.js +1 -0
  7. package/lib/action_types/roles.d.ts +0 -1
  8. package/lib/action_types/roles.js +0 -1
  9. package/lib/action_types/users.d.ts +0 -2
  10. package/lib/action_types/users.js +0 -2
  11. package/lib/action_types/websocket.d.ts +5 -0
  12. package/lib/action_types/websocket.js +12 -0
  13. package/lib/actions/agents.d.ts +5 -0
  14. package/lib/actions/agents.js +18 -0
  15. package/lib/actions/channels.d.ts +1 -0
  16. package/lib/actions/channels.js +34 -0
  17. package/lib/actions/general.js +4 -3
  18. package/lib/actions/posts.d.ts +2 -1
  19. package/lib/actions/posts.js +21 -2
  20. package/lib/actions/scheduled_posts.d.ts +1 -1
  21. package/lib/actions/users.d.ts +0 -1
  22. package/lib/actions/users.js +0 -25
  23. package/lib/constants/index.d.ts +1 -2
  24. package/lib/constants/index.js +1 -3
  25. package/lib/constants/permissions.d.ts +2 -0
  26. package/lib/constants/permissions.js +2 -0
  27. package/lib/constants/posts.d.ts +2 -0
  28. package/lib/constants/posts.js +1 -0
  29. package/lib/constants/preferences.d.ts +0 -1
  30. package/lib/constants/preferences.js +0 -1
  31. package/lib/reducers/entities/agents.d.ts +16 -1
  32. package/lib/reducers/entities/agents.js +22 -0
  33. package/lib/reducers/entities/index.d.ts +15 -3
  34. package/lib/reducers/entities/posts.js +46 -7
  35. package/lib/reducers/entities/roles.js +0 -8
  36. package/lib/reducers/entities/typing.js +3 -3
  37. package/lib/reducers/entities/users.d.ts +0 -2
  38. package/lib/reducers/entities/users.js +0 -30
  39. package/lib/reducers/index.d.ts +15 -3
  40. package/lib/selectors/entities/agents.d.ts +6 -1
  41. package/lib/selectors/entities/agents.js +8 -0
  42. package/lib/selectors/entities/channels.d.ts +4 -0
  43. package/lib/selectors/entities/channels.js +69 -0
  44. package/lib/selectors/entities/users.d.ts +0 -3
  45. package/lib/selectors/entities/users.js +1 -16
  46. package/lib/store/initial_state.js +2 -1
  47. package/package.json +3 -3
  48. package/lib/constants/websocket.d.ts +0 -56
  49. package/lib/constants/websocket.js +0 -60
@@ -2,5 +2,11 @@ declare const _default: {
2
2
  RECEIVED_AGENTS: "RECEIVED_AGENTS";
3
3
  AGENTS_REQUEST: "AGENTS_REQUEST";
4
4
  AGENTS_FAILURE: "AGENTS_FAILURE";
5
+ RECEIVED_AGENTS_STATUS: "RECEIVED_AGENTS_STATUS";
6
+ AGENTS_STATUS_REQUEST: "AGENTS_STATUS_REQUEST";
7
+ AGENTS_STATUS_FAILURE: "AGENTS_STATUS_FAILURE";
8
+ RECEIVED_LLM_SERVICES: "RECEIVED_LLM_SERVICES";
9
+ LLM_SERVICES_REQUEST: "LLM_SERVICES_REQUEST";
10
+ LLM_SERVICES_FAILURE: "LLM_SERVICES_FAILURE";
5
11
  };
6
12
  export default _default;
@@ -10,4 +10,10 @@ exports.default = (0, key_mirror_1.default)({
10
10
  RECEIVED_AGENTS: null,
11
11
  AGENTS_REQUEST: null,
12
12
  AGENTS_FAILURE: null,
13
+ RECEIVED_AGENTS_STATUS: null,
14
+ AGENTS_STATUS_REQUEST: null,
15
+ AGENTS_STATUS_FAILURE: null,
16
+ RECEIVED_LLM_SERVICES: null,
17
+ LLM_SERVICES_REQUEST: null,
18
+ LLM_SERVICES_FAILURE: null,
13
19
  });
@@ -31,7 +31,8 @@ import SharedChannelTypes from './shared_channels';
31
31
  import TeamTypes from './teams';
32
32
  import ThreadTypes from './threads';
33
33
  import UserTypes from './users';
34
- export { ErrorTypes, GeneralTypes, UserTypes, TeamTypes, ChannelTypes, PostTypes, FileTypes, PreferenceTypes, RecapTypes, IntegrationTypes, EmojiTypes, AdminTypes, JobTypes, LimitsTypes, SearchTypes, RoleTypes, SchemeTypes, GroupTypes, BotTypes, PluginTypes, ChannelCategoryTypes, CloudTypes, AppsTypes, ThreadTypes, HostedCustomerTypes, DraftTypes, PlaybookType, ChannelBookmarkTypes, ScheduledPostTypes, SharedChannelTypes, ContentFlaggingTypes, AgentTypes, };
34
+ import WebSocketTypes from './websocket';
35
+ export { ErrorTypes, GeneralTypes, UserTypes, TeamTypes, ChannelTypes, PostTypes, FileTypes, PreferenceTypes, RecapTypes, IntegrationTypes, EmojiTypes, AdminTypes, JobTypes, LimitsTypes, SearchTypes, RoleTypes, SchemeTypes, GroupTypes, BotTypes, PluginTypes, ChannelCategoryTypes, CloudTypes, AppsTypes, ThreadTypes, HostedCustomerTypes, DraftTypes, PlaybookType, ChannelBookmarkTypes, ScheduledPostTypes, SharedChannelTypes, ContentFlaggingTypes, AgentTypes, WebSocketTypes, };
35
36
  /**
36
37
  * An MMReduxAction is any non-Thunk Redux action accepted by mattermost-redux.
37
38
  */
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  return (mod && mod.__esModule) ? mod : { "default": mod };
6
6
  };
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AgentTypes = exports.ContentFlaggingTypes = exports.SharedChannelTypes = exports.ScheduledPostTypes = exports.ChannelBookmarkTypes = exports.PlaybookType = exports.DraftTypes = exports.HostedCustomerTypes = exports.ThreadTypes = exports.AppsTypes = exports.CloudTypes = exports.ChannelCategoryTypes = exports.PluginTypes = exports.BotTypes = exports.GroupTypes = exports.SchemeTypes = exports.RoleTypes = exports.SearchTypes = exports.LimitsTypes = exports.JobTypes = exports.AdminTypes = exports.EmojiTypes = exports.IntegrationTypes = exports.RecapTypes = exports.PreferenceTypes = exports.FileTypes = exports.PostTypes = exports.ChannelTypes = exports.TeamTypes = exports.UserTypes = exports.GeneralTypes = exports.ErrorTypes = void 0;
8
+ exports.WebSocketTypes = exports.AgentTypes = exports.ContentFlaggingTypes = exports.SharedChannelTypes = exports.ScheduledPostTypes = exports.ChannelBookmarkTypes = exports.PlaybookType = exports.DraftTypes = exports.HostedCustomerTypes = exports.ThreadTypes = exports.AppsTypes = exports.CloudTypes = exports.ChannelCategoryTypes = exports.PluginTypes = exports.BotTypes = exports.GroupTypes = exports.SchemeTypes = exports.RoleTypes = exports.SearchTypes = exports.LimitsTypes = exports.JobTypes = exports.AdminTypes = exports.EmojiTypes = exports.IntegrationTypes = exports.RecapTypes = exports.PreferenceTypes = exports.FileTypes = exports.PostTypes = exports.ChannelTypes = exports.TeamTypes = exports.UserTypes = exports.GeneralTypes = exports.ErrorTypes = void 0;
9
9
  const admin_1 = __importDefault(require("./admin"));
10
10
  exports.AdminTypes = admin_1.default;
11
11
  const agents_1 = __importDefault(require("./agents"));
@@ -70,3 +70,5 @@ const threads_1 = __importDefault(require("./threads"));
70
70
  exports.ThreadTypes = threads_1.default;
71
71
  const users_1 = __importDefault(require("./users"));
72
72
  exports.UserTypes = users_1.default;
73
+ const websocket_1 = __importDefault(require("./websocket"));
74
+ exports.WebSocketTypes = websocket_1.default;
@@ -27,6 +27,7 @@ declare const _default: {
27
27
  RECEIVED_POSTS_SINCE: "RECEIVED_POSTS_SINCE";
28
28
  POST_DELETED: "POST_DELETED";
29
29
  POST_REMOVED: "POST_REMOVED";
30
+ POST_TRANSLATION_UPDATED: "POST_TRANSLATION_UPDATED";
30
31
  POST_PINNED_CHANGED: "POST_PINNED_CHANGED";
31
32
  RECEIVED_FOCUSED_POST: "RECEIVED_FOCUSED_POST";
32
33
  RECEIVED_EDIT_POST: "RECEIVED_EDIT_POST";
@@ -35,6 +35,7 @@ exports.default = (0, key_mirror_1.default)({
35
35
  RECEIVED_POSTS_SINCE: null,
36
36
  POST_DELETED: null,
37
37
  POST_REMOVED: null,
38
+ POST_TRANSLATION_UPDATED: null,
38
39
  POST_PINNED_CHANGED: null,
39
40
  RECEIVED_FOCUSED_POST: null,
40
41
  RECEIVED_EDIT_POST: null,
@@ -13,7 +13,6 @@ declare const _default: {
13
13
  EDIT_ROLE_FAILURE: "EDIT_ROLE_FAILURE";
14
14
  RECEIVED_ROLES: "RECEIVED_ROLES";
15
15
  RECEIVED_ROLE: "RECEIVED_ROLE";
16
- ROLE_DELETED: "ROLE_DELETED";
17
16
  SET_PENDING_ROLES: "SET_PENDING_ROLES";
18
17
  };
19
18
  export default _default;
@@ -21,6 +21,5 @@ exports.default = (0, key_mirror_1.default)({
21
21
  EDIT_ROLE_FAILURE: null,
22
22
  RECEIVED_ROLES: null,
23
23
  RECEIVED_ROLE: null,
24
- ROLE_DELETED: null,
25
24
  SET_PENDING_ROLES: null,
26
25
  });
@@ -28,8 +28,6 @@ declare const _default: {
28
28
  RECEIVED_PROFILE_NOT_IN_TEAM: "RECEIVED_PROFILE_NOT_IN_TEAM";
29
29
  RECEIVED_PROFILES_LIST_NOT_IN_TEAM: "RECEIVED_PROFILES_LIST_NOT_IN_TEAM";
30
30
  RECEIVED_PROFILES_LIST_NOT_IN_TEAM_AND_REPLACE: "RECEIVED_PROFILES_LIST_NOT_IN_TEAM_AND_REPLACE";
31
- RECEIVED_PROFILE_WITHOUT_TEAM: "RECEIVED_PROFILE_WITHOUT_TEAM";
32
- RECEIVED_PROFILES_LIST_WITHOUT_TEAM: "RECEIVED_PROFILES_LIST_WITHOUT_TEAM";
33
31
  RECEIVED_PROFILES_IN_CHANNEL: "RECEIVED_PROFILES_IN_CHANNEL";
34
32
  RECEIVED_PROFILES_LIST_IN_CHANNEL: "RECEIVED_PROFILES_LIST_IN_CHANNEL";
35
33
  RECEIVED_PROFILE_IN_CHANNEL: "RECEIVED_PROFILE_IN_CHANNEL";
@@ -36,8 +36,6 @@ exports.default = (0, key_mirror_1.default)({
36
36
  RECEIVED_PROFILE_NOT_IN_TEAM: null,
37
37
  RECEIVED_PROFILES_LIST_NOT_IN_TEAM: null,
38
38
  RECEIVED_PROFILES_LIST_NOT_IN_TEAM_AND_REPLACE: null,
39
- RECEIVED_PROFILE_WITHOUT_TEAM: null,
40
- RECEIVED_PROFILES_LIST_WITHOUT_TEAM: null,
41
39
  RECEIVED_PROFILES_IN_CHANNEL: null,
42
40
  RECEIVED_PROFILES_LIST_IN_CHANNEL: null,
43
41
  RECEIVED_PROFILE_IN_CHANNEL: null,
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ TYPING: "TYPING";
3
+ STOPPED_TYPING: "STOPPED_TYPING";
4
+ };
5
+ export default _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
+ // See LICENSE.txt for license information.
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const key_mirror_1 = __importDefault(require("mattermost-redux/utils/key_mirror"));
9
+ exports.default = (0, key_mirror_1.default)({
10
+ TYPING: null,
11
+ STOPPED_TYPING: null,
12
+ });
@@ -1 +1,6 @@
1
1
  export declare function getAgents(): import("../types/actions").ActionFuncAsync<import("@mattermost/types/agents").Agent[], import("@mattermost/types/store").GlobalState, import("redux").AnyAction>;
2
+ export declare function getAgentsStatus(): import("../types/actions").ActionFuncAsync<{
3
+ available: boolean;
4
+ reason?: string;
5
+ }, import("@mattermost/types/store").GlobalState, import("redux").AnyAction>;
6
+ export declare function getLLMServices(): import("../types/actions").ActionFuncAsync<import("@mattermost/types/agents").LLMService[], import("@mattermost/types/store").GlobalState, import("redux").AnyAction>;
@@ -3,6 +3,8 @@
3
3
  // See LICENSE.txt for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getAgents = getAgents;
6
+ exports.getAgentsStatus = getAgentsStatus;
7
+ exports.getLLMServices = getLLMServices;
6
8
  const helpers_1 = require("./helpers");
7
9
  const action_types_1 = require("../action_types");
8
10
  const client_1 = require("../client");
@@ -14,3 +16,19 @@ function getAgents() {
14
16
  onRequest: action_types_1.AgentTypes.AGENTS_REQUEST,
15
17
  });
16
18
  }
19
+ function getAgentsStatus() {
20
+ return (0, helpers_1.bindClientFunc)({
21
+ clientFunc: client_1.Client4.getAgentsStatus,
22
+ onSuccess: [action_types_1.AgentTypes.RECEIVED_AGENTS_STATUS],
23
+ onFailure: action_types_1.AgentTypes.AGENTS_STATUS_FAILURE,
24
+ onRequest: action_types_1.AgentTypes.AGENTS_STATUS_REQUEST,
25
+ });
26
+ }
27
+ function getLLMServices() {
28
+ return (0, helpers_1.bindClientFunc)({
29
+ clientFunc: client_1.Client4.getLLMServices,
30
+ onSuccess: [action_types_1.AgentTypes.RECEIVED_LLM_SERVICES],
31
+ onFailure: action_types_1.AgentTypes.LLM_SERVICES_FAILURE,
32
+ onRequest: action_types_1.AgentTypes.LLM_SERVICES_REQUEST,
33
+ });
34
+ }
@@ -12,6 +12,7 @@ export declare function createDirectChannel(userId: string, otherUserId: string)
12
12
  export declare function markGroupChannelOpen(channelId: string): ActionFuncAsync;
13
13
  export declare function createGroupChannel(userIds: string[]): ActionFuncAsync<Channel>;
14
14
  export declare function patchChannel(channelId: string, patch: Partial<Channel>): ActionFuncAsync<Channel>;
15
+ export declare function setMyChannelAutotranslation(channelId: string, enabled: boolean): ActionFuncAsync<boolean>;
15
16
  export declare function updateChannelPrivacy(channelId: string, privacy: string): ActionFuncAsync<Channel>;
16
17
  export declare function convertGroupMessageToPrivateChannel(channelID: string, teamID: string, displayName: string, name: string): ActionFuncAsync<Channel>;
17
18
  export declare function updateChannelNotifyProps(userId: string, channelId: string, props: Partial<ChannelNotifyProps>): ActionFuncAsync;
@@ -8,6 +8,7 @@ exports.createDirectChannel = createDirectChannel;
8
8
  exports.markGroupChannelOpen = markGroupChannelOpen;
9
9
  exports.createGroupChannel = createGroupChannel;
10
10
  exports.patchChannel = patchChannel;
11
+ exports.setMyChannelAutotranslation = setMyChannelAutotranslation;
11
12
  exports.updateChannelPrivacy = updateChannelPrivacy;
12
13
  exports.convertGroupMessageToPrivateChannel = convertGroupMessageToPrivateChannel;
13
14
  exports.updateChannelNotifyProps = updateChannelNotifyProps;
@@ -72,6 +73,7 @@ const data_loader_1 = require("mattermost-redux/utils/data_loader");
72
73
  const channel_categories_3 = require("./channel_categories");
73
74
  const errors_1 = require("./errors");
74
75
  const helpers_1 = require("./helpers");
76
+ const posts_1 = require("./posts");
75
77
  const preferences_1 = require("./preferences");
76
78
  const roles_1 = require("./roles");
77
79
  const users_1 = require("./users");
@@ -267,6 +269,38 @@ function patchChannel(channelId, patch) {
267
269
  params: [channelId, patch],
268
270
  });
269
271
  }
272
+ function setMyChannelAutotranslation(channelId, enabled) {
273
+ return async (dispatch, getState) => {
274
+ const state = getState();
275
+ const myChannelMember = (0, channels_2.getMyChannelMember)(state, channelId);
276
+ if (!myChannelMember) {
277
+ return { data: false, error: 'Channel member not found' };
278
+ }
279
+ const updatedMember = {
280
+ ...myChannelMember,
281
+ autotranslation_disabled: !enabled,
282
+ };
283
+ try {
284
+ await client_1.Client4.setMyChannelAutotranslation(channelId, enabled);
285
+ }
286
+ catch (error) {
287
+ (0, helpers_1.forceLogoutIfNecessary)(error, dispatch, getState);
288
+ dispatch((0, errors_1.logError)(error));
289
+ return { data: undefined, error };
290
+ }
291
+ // We check before updating the store
292
+ const becameEnabled = (0, channels_2.hasAutotranslationBecomeEnabled)(state, updatedMember);
293
+ dispatch({
294
+ type: action_types_1.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,
295
+ data: updatedMember,
296
+ });
297
+ // If autotranslation changed, delete posts for this channel
298
+ if (becameEnabled) {
299
+ await dispatch((0, posts_1.resetReloadPostsInChannel)(channelId));
300
+ }
301
+ return { data: true, error: undefined };
302
+ };
303
+ }
270
304
  function updateChannelPrivacy(channelId, privacy) {
271
305
  return (0, helpers_1.bindClientFunc)({
272
306
  clientFunc: client_1.Client4.updateChannelPrivacy,
@@ -111,9 +111,10 @@ function checkCWSAvailability() {
111
111
  }
112
112
  dispatch({ type: action_types_1.GeneralTypes.CWS_AVAILABILITY_CHECK_REQUEST });
113
113
  try {
114
- await client_1.Client4.cwsAvailabilityCheck();
115
- dispatch({ type: action_types_1.GeneralTypes.CWS_AVAILABILITY_CHECK_SUCCESS, data: 'available' });
116
- return { data: 'available' };
114
+ const response = await client_1.Client4.cwsAvailabilityCheck();
115
+ const status = response.status;
116
+ dispatch({ type: action_types_1.GeneralTypes.CWS_AVAILABILITY_CHECK_SUCCESS, data: status });
117
+ return { data: status };
117
118
  }
118
119
  catch (error) {
119
120
  dispatch({ type: action_types_1.GeneralTypes.CWS_AVAILABILITY_CHECK_FAILURE });
@@ -138,10 +138,11 @@ export declare function resetHistoryIndex(index: string): {
138
138
  };
139
139
  export declare function moveHistoryIndexBack(index: string): ActionFuncAsync;
140
140
  export declare function moveHistoryIndexForward(index: string): ActionFuncAsync;
141
+ export declare function resetReloadPostsInTranslatedChannels(): ActionFuncAsync;
141
142
  /**
142
143
  * Ensures thread-replies in channels correctly follow CRT:ON/OFF
143
144
  */
144
- export declare function resetReloadPostsInChannel(): ActionFuncAsync;
145
+ export declare function resetReloadPostsInChannel(channelId?: string): ActionFuncAsync;
145
146
  export declare function acknowledgePost(postId: string): ActionFuncAsync;
146
147
  export declare function unacknowledgePost(postId: string): ActionFuncAsync;
147
148
  export declare function restorePostVersion(postId: string, restoreVersionId: string, connectionId: string): ActionFuncAsync;
@@ -74,6 +74,7 @@ exports.addMessageIntoHistory = addMessageIntoHistory;
74
74
  exports.resetHistoryIndex = resetHistoryIndex;
75
75
  exports.moveHistoryIndexBack = moveHistoryIndexBack;
76
76
  exports.moveHistoryIndexForward = moveHistoryIndexForward;
77
+ exports.resetReloadPostsInTranslatedChannels = resetReloadPostsInTranslatedChannels;
77
78
  exports.resetReloadPostsInChannel = resetReloadPostsInChannel;
78
79
  exports.acknowledgePost = acknowledgePost;
79
80
  exports.unacknowledgePost = unacknowledgePost;
@@ -1157,16 +1158,34 @@ function moveHistoryIndexForward(index) {
1157
1158
  return { data: true };
1158
1159
  };
1159
1160
  }
1161
+ function resetReloadPostsInTranslatedChannels() {
1162
+ return async (dispatch, getState) => {
1163
+ const state = getState();
1164
+ const channels = (0, channels_2.getAllChannels)(state);
1165
+ for (const channel of Object.values(channels)) {
1166
+ if (!channel.autotranslation) {
1167
+ continue;
1168
+ }
1169
+ const myMember = (0, channels_2.getMyChannelMember)(state, channel.id);
1170
+ if (myMember?.autotranslation_disabled) {
1171
+ continue;
1172
+ }
1173
+ dispatch(resetReloadPostsInChannel(channel.id));
1174
+ }
1175
+ return { data: true };
1176
+ };
1177
+ }
1160
1178
  /**
1161
1179
  * Ensures thread-replies in channels correctly follow CRT:ON/OFF
1162
1180
  */
1163
- function resetReloadPostsInChannel() {
1181
+ function resetReloadPostsInChannel(channelId) {
1164
1182
  return async (dispatch, getState) => {
1165
1183
  dispatch({
1166
1184
  type: action_types_1.PostTypes.RESET_POSTS_IN_CHANNEL,
1185
+ channelId,
1167
1186
  });
1168
1187
  const currentChannelId = (0, channels_2.getCurrentChannelId)(getState());
1169
- if (currentChannelId) {
1188
+ if (currentChannelId && (!channelId || channelId === currentChannelId)) {
1170
1189
  // wait for channel to be fully deselected; prevent stuck loading screen
1171
1190
  // full state-change/reconciliation will cause prefetchChannelPosts to reload posts
1172
1191
  await dispatch((0, channels_1.selectChannel)('')); // do not remove await
@@ -7,7 +7,7 @@ export declare function createSchedulePost(schedulePost: ScheduledPost, teamId:
7
7
  error: any;
8
8
  data?: undefined;
9
9
  }>;
10
- export declare function fetchTeamScheduledPosts(teamId: string, includeDirectChannels: boolean, prune?: false): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
10
+ export declare function fetchTeamScheduledPosts(teamId: string, includeDirectChannels: boolean, prune?: boolean): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
11
11
  error: any;
12
12
  data?: undefined;
13
13
  } | {
@@ -18,7 +18,6 @@ export declare function getProfilesByIds(userIds: string[], options?: any): Acti
18
18
  export declare function getProfilesByUsernames(usernames: string[]): ActionFuncAsync<UserProfile[]>;
19
19
  export declare function getProfilesInTeam(teamId: string, page: number, perPage?: number, sort?: string, options?: any): ActionFuncAsync<UserProfile[]>;
20
20
  export declare function getProfilesNotInTeam(teamId: string, groupConstrained: boolean, page: number, perPage?: number): ActionFuncAsync<UserProfile[]>;
21
- export declare function getProfilesWithoutTeam(page: number, perPage?: number, options?: any): ActionFuncAsync<UserProfile[]>;
22
21
  export declare enum ProfilesInChannelSortBy {
23
22
  None = "",
24
23
  Admin = "admin"
@@ -16,7 +16,6 @@ exports.getProfilesByIds = getProfilesByIds;
16
16
  exports.getProfilesByUsernames = getProfilesByUsernames;
17
17
  exports.getProfilesInTeam = getProfilesInTeam;
18
18
  exports.getProfilesNotInTeam = getProfilesNotInTeam;
19
- exports.getProfilesWithoutTeam = getProfilesWithoutTeam;
20
19
  exports.getProfilesInChannel = getProfilesInChannel;
21
20
  exports.batchGetProfilesInChannel = batchGetProfilesInChannel;
22
21
  exports.getProfilesInGroupChannels = getProfilesInGroupChannels;
@@ -335,30 +334,6 @@ function getProfilesNotInTeam(teamId, groupConstrained, page, perPage = constant
335
334
  return { data: profiles };
336
335
  };
337
336
  }
338
- function getProfilesWithoutTeam(page, perPage = constants_1.General.PROFILE_CHUNK_SIZE, options = {}) {
339
- return async (dispatch, getState) => {
340
- let profiles = null;
341
- try {
342
- profiles = await client_1.Client4.getProfilesWithoutTeam(page, perPage, options);
343
- }
344
- catch (error) {
345
- (0, helpers_1.forceLogoutIfNecessary)(error, dispatch, getState);
346
- dispatch((0, errors_1.logError)(error));
347
- return { error };
348
- }
349
- dispatch((0, redux_batched_actions_1.batchActions)([
350
- {
351
- type: action_types_1.UserTypes.RECEIVED_PROFILES_LIST_WITHOUT_TEAM,
352
- data: profiles,
353
- },
354
- {
355
- type: action_types_1.UserTypes.RECEIVED_PROFILES_LIST,
356
- data: profiles,
357
- },
358
- ]));
359
- return { data: profiles };
360
- };
361
- }
362
337
  var ProfilesInChannelSortBy;
363
338
  (function (ProfilesInChannelSortBy) {
364
339
  ProfilesInChannelSortBy["None"] = "";
@@ -11,5 +11,4 @@ import Stats from './stats';
11
11
  import Teams from './teams';
12
12
  import Threads from './threads';
13
13
  import Users from './users';
14
- import WebsocketEvents from './websocket';
15
- export { General, Preferences, Posts, Files, RequestStatus, WebsocketEvents, Teams, Stats, Permissions, Emoji, Plugins, Users, Roles, Threads };
14
+ export { General, Preferences, Posts, Files, RequestStatus, Teams, Stats, Permissions, Emoji, Plugins, Users, Roles, Threads };
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  return (mod && mod.__esModule) ? mod : { "default": mod };
6
6
  };
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Threads = exports.Roles = exports.Users = exports.Plugins = exports.Emoji = exports.Permissions = exports.Stats = exports.Teams = exports.WebsocketEvents = exports.RequestStatus = exports.Files = exports.Posts = exports.Preferences = exports.General = void 0;
8
+ exports.Threads = exports.Roles = exports.Users = exports.Plugins = exports.Emoji = exports.Permissions = exports.Stats = exports.Teams = exports.RequestStatus = exports.Files = exports.Posts = exports.Preferences = exports.General = void 0;
9
9
  const emoji_1 = __importDefault(require("./emoji"));
10
10
  exports.Emoji = emoji_1.default;
11
11
  const files_1 = __importDefault(require("./files"));
@@ -32,5 +32,3 @@ const threads_1 = __importDefault(require("./threads"));
32
32
  exports.Threads = threads_1.default;
33
33
  const users_1 = __importDefault(require("./users"));
34
34
  exports.Users = users_1.default;
35
- const websocket_1 = __importDefault(require("./websocket"));
36
- exports.WebsocketEvents = websocket_1.default;
@@ -19,6 +19,8 @@ declare const values: {
19
19
  CREATE_GROUP_CHANNEL: string;
20
20
  MANAGE_PUBLIC_CHANNEL_PROPERTIES: string;
21
21
  MANAGE_PRIVATE_CHANNEL_PROPERTIES: string;
22
+ MANAGE_PUBLIC_CHANNEL_AUTO_TRANSLATION: string;
23
+ MANAGE_PRIVATE_CHANNEL_AUTO_TRANSLATION: string;
22
24
  LIST_PUBLIC_TEAMS: string;
23
25
  JOIN_PUBLIC_TEAMS: string;
24
26
  LIST_PRIVATE_TEAMS: string;
@@ -23,6 +23,8 @@ const values = {
23
23
  CREATE_GROUP_CHANNEL: 'create_group_channel',
24
24
  MANAGE_PUBLIC_CHANNEL_PROPERTIES: 'manage_public_channel_properties',
25
25
  MANAGE_PRIVATE_CHANNEL_PROPERTIES: 'manage_private_channel_properties',
26
+ MANAGE_PUBLIC_CHANNEL_AUTO_TRANSLATION: 'manage_public_channel_auto_translation',
27
+ MANAGE_PRIVATE_CHANNEL_AUTO_TRANSLATION: 'manage_private_channel_auto_translation',
26
28
  LIST_PUBLIC_TEAMS: 'list_public_teams',
27
29
  JOIN_PUBLIC_TEAMS: 'join_public_teams',
28
30
  LIST_PRIVATE_TEAMS: 'list_private_teams',
@@ -8,6 +8,7 @@ export declare const PostTypes: {
8
8
  EPHEMERAL_ADD_TO_CHANNEL: PostType;
9
9
  HEADER_CHANGE: PostType;
10
10
  PURPOSE_CHANGE: PostType;
11
+ AUTO_TRANSLATION_CHANGE: PostType;
11
12
  JOIN_LEAVE: PostType;
12
13
  JOIN_CHANNEL: PostType;
13
14
  GUEST_JOIN_CHANNEL: PostType;
@@ -43,6 +44,7 @@ declare const _default: {
43
44
  EPHEMERAL_ADD_TO_CHANNEL: PostType;
44
45
  HEADER_CHANGE: PostType;
45
46
  PURPOSE_CHANGE: PostType;
47
+ AUTO_TRANSLATION_CHANGE: PostType;
46
48
  JOIN_LEAVE: PostType;
47
49
  JOIN_CHANNEL: PostType;
48
50
  GUEST_JOIN_CHANNEL: PostType;
@@ -12,6 +12,7 @@ exports.PostTypes = {
12
12
  EPHEMERAL_ADD_TO_CHANNEL: 'system_ephemeral_add_to_channel',
13
13
  HEADER_CHANGE: 'system_header_change',
14
14
  PURPOSE_CHANGE: 'system_purpose_change',
15
+ AUTO_TRANSLATION_CHANGE: 'system_autotranslation',
15
16
  JOIN_LEAVE: 'system_join_leave',
16
17
  JOIN_CHANNEL: 'system_join_channel',
17
18
  GUEST_JOIN_CHANNEL: 'system_guest_join_channel',
@@ -59,7 +59,6 @@ declare const Preferences: {
59
59
  CATEGORY_DRAFTS: string;
60
60
  CATEGORY_REPORTING: string;
61
61
  HIDE_BATCH_EXPORT_CONFIRM_MODAL: string;
62
- HIDE_MYSQL_STATS_NOTIFICATION: string;
63
62
  CATEGORY_OVERAGE_USERS_BANNER: string;
64
63
  CATEGORY_POST_HISTORY_LIMIT_BANNER: string;
65
64
  CATEGORY_BURN_ON_READ: string;
@@ -63,7 +63,6 @@ const Preferences = {
63
63
  CATEGORY_DRAFTS: 'drafts',
64
64
  CATEGORY_REPORTING: 'reporting',
65
65
  HIDE_BATCH_EXPORT_CONFIRM_MODAL: 'hide_batch_export_confirm_modal',
66
- HIDE_MYSQL_STATS_NOTIFICATION: 'hide_mysql_stats_notifcation',
67
66
  CATEGORY_OVERAGE_USERS_BANNER: 'overage_users_banner',
68
67
  CATEGORY_POST_HISTORY_LIMIT_BANNER: 'post_history_limit_banner',
69
68
  CATEGORY_BURN_ON_READ: 'burn_on_read',
@@ -1,10 +1,25 @@
1
- import type { Agent } from '@mattermost/types/agents';
1
+ import type { Agent, LLMService } from '@mattermost/types/agents';
2
2
  export interface AgentsState {
3
3
  agents: Agent[];
4
+ agentsStatus: {
5
+ available: boolean;
6
+ reason?: string;
7
+ };
8
+ llmServices: LLMService[];
4
9
  }
5
10
  declare const _default: import("redux").Reducer<{
6
11
  agents: Agent[];
12
+ agentsStatus: {
13
+ available: boolean;
14
+ reason?: string;
15
+ };
16
+ llmServices: LLMService[];
7
17
  }, import("redux").AnyAction, Partial<{
8
18
  agents: Agent[] | undefined;
19
+ agentsStatus: {
20
+ available: boolean;
21
+ reason?: string;
22
+ } | undefined;
23
+ llmServices: LLMService[] | undefined;
9
24
  }>>;
10
25
  export default _default;
@@ -14,6 +14,28 @@ function agents(state = [], action) {
14
14
  return state;
15
15
  }
16
16
  }
17
+ function agentsStatus(state = { available: false }, action) {
18
+ switch (action.type) {
19
+ case action_types_1.AgentTypes.RECEIVED_AGENTS_STATUS:
20
+ return action.data || { available: false };
21
+ case action_types_1.AgentTypes.AGENTS_STATUS_FAILURE:
22
+ return { available: false };
23
+ default:
24
+ return state;
25
+ }
26
+ }
27
+ function llmServices(state = [], action) {
28
+ switch (action.type) {
29
+ case action_types_1.AgentTypes.RECEIVED_LLM_SERVICES:
30
+ return action.data || [];
31
+ case action_types_1.AgentTypes.LLM_SERVICES_FAILURE:
32
+ return [];
33
+ default:
34
+ return state;
35
+ }
36
+ }
17
37
  exports.default = (0, redux_1.combineReducers)({
18
38
  agents,
39
+ agentsStatus,
40
+ llmServices,
19
41
  });
@@ -10,6 +10,11 @@ declare const _default: import("redux").Reducer<{
10
10
  };
11
11
  agents: {
12
12
  agents: import("@mattermost/types/agents").Agent[];
13
+ agentsStatus: {
14
+ available: boolean;
15
+ reason?: string;
16
+ };
17
+ llmServices: import("@mattermost/types/agents").LLMService[];
13
18
  };
14
19
  users: {
15
20
  currentUserId: any;
@@ -19,7 +24,6 @@ declare const _default: import("redux").Reducer<{
19
24
  profiles: import("@mattermost/types/utilities").IDMappedObjects<import("@mattermost/types/users").UserProfile>;
20
25
  profilesInTeam: {};
21
26
  profilesNotInTeam: {};
22
- profilesWithoutTeam: Set<string>;
23
27
  profilesInChannel: {};
24
28
  profilesNotInChannel: {};
25
29
  profilesInGroup: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile>;
@@ -343,8 +347,18 @@ declare const _default: import("redux").Reducer<{
343
347
  }> | undefined;
344
348
  agents: {
345
349
  agents: import("@mattermost/types/agents").Agent[];
350
+ agentsStatus: {
351
+ available: boolean;
352
+ reason?: string;
353
+ };
354
+ llmServices: import("@mattermost/types/agents").LLMService[];
346
355
  } | Partial<{
347
356
  agents: import("@mattermost/types/agents").Agent[] | undefined;
357
+ agentsStatus: {
358
+ available: boolean;
359
+ reason?: string;
360
+ } | undefined;
361
+ llmServices: import("@mattermost/types/agents").LLMService[] | undefined;
348
362
  }> | undefined;
349
363
  users: {
350
364
  currentUserId: any;
@@ -354,7 +368,6 @@ declare const _default: import("redux").Reducer<{
354
368
  profiles: import("@mattermost/types/utilities").IDMappedObjects<import("@mattermost/types/users").UserProfile>;
355
369
  profilesInTeam: {};
356
370
  profilesNotInTeam: {};
357
- profilesWithoutTeam: Set<string>;
358
371
  profilesInChannel: {};
359
372
  profilesNotInChannel: {};
360
373
  profilesInGroup: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile>;
@@ -373,7 +386,6 @@ declare const _default: import("redux").Reducer<{
373
386
  profiles: import("@mattermost/types/utilities").IDMappedObjects<import("@mattermost/types/users").UserProfile> | undefined;
374
387
  profilesInTeam: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile> | undefined;
375
388
  profilesNotInTeam: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile> | undefined;
376
- profilesWithoutTeam: Set<string> | undefined;
377
389
  profilesInChannel: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/channels").Channel, import("@mattermost/types/users").UserProfile> | undefined;
378
390
  profilesNotInChannel: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/channels").Channel, import("@mattermost/types/users").UserProfile> | undefined;
379
391
  profilesInGroup: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/groups").Group, import("@mattermost/types/users").UserProfile> | undefined;
@@ -359,6 +359,31 @@ function handlePosts(state = {}, action) {
359
359
  },
360
360
  };
361
361
  }
362
+ case action_types_1.PostTypes.POST_TRANSLATION_UPDATED: {
363
+ const data = action.data;
364
+ if (!state[data.object_id]) {
365
+ return state;
366
+ }
367
+ const existingTranslations = state[data.object_id].metadata?.translations || {};
368
+ const newTranslations = {
369
+ ...existingTranslations,
370
+ [data.language]: {
371
+ object: data.translation ? JSON.parse(data.translation) : undefined,
372
+ state: data.state,
373
+ source_lang: data.src_lang,
374
+ },
375
+ };
376
+ return {
377
+ ...state,
378
+ [data.object_id]: {
379
+ ...state[data.object_id],
380
+ metadata: {
381
+ ...state[data.object_id].metadata,
382
+ translations: newTranslations,
383
+ },
384
+ },
385
+ };
386
+ }
362
387
  case action_types_1.UserTypes.LOGOUT_SUCCESS:
363
388
  return {};
364
389
  default:
@@ -376,9 +401,19 @@ function handlePostReceived(nextState, post, nestedPermalinkLevel) {
376
401
  if (!nestedPermalinkLevel && (0, post_utils_1.isPermalink)(post) && currentState[post.id] && !currentState[post.id].metadata && post.metadata) {
377
402
  currentState[post.id] = { ...currentState[post.id], ...post.metadata };
378
403
  }
379
- // Edited posts that don't have 'is_following' specified should maintain 'is_following' state
380
- if (post.update_at > 0 && post.is_following == null && currentState[post.id]) {
381
- post.is_following = currentState[post.id].is_following;
404
+ // Posts that don't have CRT fields specified should maintain existing state.
405
+ // This happens when posts are returned via GetPostsByIds (e.g. translation
406
+ // supplement) which doesn't JOIN the Threads/ThreadMemberships tables.
407
+ if (post.update_at > 0 && currentState[post.id]) {
408
+ if (post.is_following == null) {
409
+ post.is_following = currentState[post.id].is_following;
410
+ }
411
+ if (post.participants == null && currentState[post.id].participants) {
412
+ post.participants = currentState[post.id].participants;
413
+ }
414
+ if (!post.last_reply_at && currentState[post.id].last_reply_at) {
415
+ post.last_reply_at = currentState[post.id].last_reply_at;
416
+ }
382
417
  }
383
418
  if (post.delete_at > 0) {
384
419
  // We've received a deleted post, so mark the post as deleted if we already have it
@@ -478,7 +513,13 @@ function handlePendingPosts(state = [], action) {
478
513
  function postsInChannel(state = {}, action, prevPosts, nextPosts) {
479
514
  switch (action.type) {
480
515
  case action_types_1.PostTypes.RESET_POSTS_IN_CHANNEL: {
481
- return {};
516
+ const { channelId } = action;
517
+ if (!channelId) {
518
+ return {};
519
+ }
520
+ const nextState = { ...state };
521
+ Reflect.deleteProperty(nextState, channelId);
522
+ return nextState;
482
523
  }
483
524
  case action_types_1.PostTypes.RECEIVED_NEW_POST: {
484
525
  const post = action.data;
@@ -758,9 +799,7 @@ function postsInChannel(state = {}, action, prevPosts, nextPosts) {
758
799
  const block = nextPostsForChannel[i];
759
800
  // For BoR posts: only remove the post itself (BoR doesn't support threads)
760
801
  // For regular posts: remove the post and its thread replies
761
- const nextOrder = isBoRPost ?
762
- block.order.filter((postId) => postId !== post.id) :
763
- block.order.filter((postId) => postId !== post.id && prevPosts[postId]?.root_id !== post.id);
802
+ const nextOrder = isBoRPost ? block.order.filter((postId) => postId !== post.id) : block.order.filter((postId) => postId !== post.id && prevPosts[postId]?.root_id !== post.id);
764
803
  if (nextOrder.length !== block.order.length) {
765
804
  nextPostsForChannel[i] = {
766
805
  ...block,
@@ -26,14 +26,6 @@ function roles(state = {}, action) {
26
26
  }
27
27
  return state;
28
28
  }
29
- case action_types_1.RoleTypes.ROLE_DELETED: {
30
- if (action.data) {
31
- const nextState = { ...state };
32
- Reflect.deleteProperty(nextState, action.data.name);
33
- return nextState;
34
- }
35
- return state;
36
- }
37
29
  case action_types_1.RoleTypes.RECEIVED_ROLE: {
38
30
  if (action.data) {
39
31
  const nextState = { ...state };
@@ -3,11 +3,11 @@
3
3
  // See LICENSE.txt for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.default = typing;
6
- const constants_1 = require("mattermost-redux/constants");
6
+ const action_types_1 = require("mattermost-redux/action_types");
7
7
  function typing(state = {}, action) {
8
8
  const { data, type, } = action;
9
9
  switch (type) {
10
- case constants_1.WebsocketEvents.TYPING: {
10
+ case action_types_1.WebSocketTypes.TYPING: {
11
11
  const { id, userId, now, } = data;
12
12
  if (id && userId) {
13
13
  return {
@@ -20,7 +20,7 @@ function typing(state = {}, action) {
20
20
  }
21
21
  return state;
22
22
  }
23
- case constants_1.WebsocketEvents.STOP_TYPING: {
23
+ case action_types_1.WebSocketTypes.STOPPED_TYPING: {
24
24
  const { id, userId, now, } = data;
25
25
  if (state[id] && state[id][userId] <= now) {
26
26
  const nextState = {
@@ -10,7 +10,6 @@ declare const _default: import("redux").Reducer<{
10
10
  profiles: IDMappedObjects<UserProfile>;
11
11
  profilesInTeam: {};
12
12
  profilesNotInTeam: {};
13
- profilesWithoutTeam: Set<string>;
14
13
  profilesInChannel: {};
15
14
  profilesNotInChannel: {};
16
15
  profilesInGroup: RelationOneToManyUnique<Team, UserProfile>;
@@ -29,7 +28,6 @@ declare const _default: import("redux").Reducer<{
29
28
  profiles: IDMappedObjects<UserProfile> | undefined;
30
29
  profilesInTeam: RelationOneToManyUnique<Team, UserProfile> | undefined;
31
30
  profilesNotInTeam: RelationOneToManyUnique<Team, UserProfile> | undefined;
32
- profilesWithoutTeam: Set<string> | undefined;
33
31
  profilesInChannel: RelationOneToManyUnique<import("@mattermost/types/channels").Channel, UserProfile> | undefined;
34
32
  profilesNotInChannel: RelationOneToManyUnique<import("@mattermost/types/channels").Channel, UserProfile> | undefined;
35
33
  profilesInGroup: RelationOneToManyUnique<import("@mattermost/types/groups").Group, UserProfile> | undefined;
@@ -287,34 +287,6 @@ function profilesNotInTeam(state = {}, action) {
287
287
  return state;
288
288
  }
289
289
  }
290
- function profilesWithoutTeam(state = new Set(), action) {
291
- switch (action.type) {
292
- case action_types_1.UserTypes.RECEIVED_PROFILE_WITHOUT_TEAM: {
293
- const nextSet = new Set(state);
294
- Object.values(action.data).forEach((id) => nextSet.add(id));
295
- return nextSet;
296
- }
297
- case action_types_1.UserTypes.RECEIVED_PROFILES_LIST_WITHOUT_TEAM: {
298
- const nextSet = new Set(state);
299
- action.data.forEach((user) => nextSet.add(user.id));
300
- return nextSet;
301
- }
302
- case action_types_1.UserTypes.RECEIVED_PROFILE_IN_TEAM: {
303
- const nextSet = new Set(state);
304
- nextSet.delete(action.data.id);
305
- return nextSet;
306
- }
307
- case action_types_1.UserTypes.PROFILE_NO_LONGER_VISIBLE: {
308
- const nextSet = new Set(state);
309
- nextSet.delete(action.data.user_id);
310
- return nextSet;
311
- }
312
- case action_types_1.UserTypes.LOGOUT_SUCCESS:
313
- return new Set();
314
- default:
315
- return state;
316
- }
317
- }
318
290
  function profilesInChannel(state = {}, action) {
319
291
  switch (action.type) {
320
292
  case action_types_1.UserTypes.RECEIVED_PROFILE_IN_CHANNEL:
@@ -598,8 +570,6 @@ exports.default = (0, redux_1.combineReducers)({
598
570
  profilesInTeam,
599
571
  // object where every key is a team id and has a Set with the users id that are not members of the team
600
572
  profilesNotInTeam,
601
- // set with user ids for users that are not on any team
602
- profilesWithoutTeam,
603
573
  // object where every key is a channel id and has a Set with the users id that are members of the channel
604
574
  profilesInChannel,
605
575
  // object where every key is a channel id and has a Set with the users id that are not members of the channel
@@ -12,6 +12,11 @@ declare const _default: {
12
12
  };
13
13
  agents: {
14
14
  agents: import("@mattermost/types/agents").Agent[];
15
+ agentsStatus: {
16
+ available: boolean;
17
+ reason?: string;
18
+ };
19
+ llmServices: import("@mattermost/types/agents").LLMService[];
15
20
  };
16
21
  users: {
17
22
  currentUserId: any;
@@ -21,7 +26,6 @@ declare const _default: {
21
26
  profiles: import("@mattermost/types/utilities").IDMappedObjects<import("@mattermost/types/users").UserProfile>;
22
27
  profilesInTeam: {};
23
28
  profilesNotInTeam: {};
24
- profilesWithoutTeam: Set<string>;
25
29
  profilesInChannel: {};
26
30
  profilesNotInChannel: {};
27
31
  profilesInGroup: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile>;
@@ -345,8 +349,18 @@ declare const _default: {
345
349
  }> | undefined;
346
350
  agents: {
347
351
  agents: import("@mattermost/types/agents").Agent[];
352
+ agentsStatus: {
353
+ available: boolean;
354
+ reason?: string;
355
+ };
356
+ llmServices: import("@mattermost/types/agents").LLMService[];
348
357
  } | Partial<{
349
358
  agents: import("@mattermost/types/agents").Agent[] | undefined;
359
+ agentsStatus: {
360
+ available: boolean;
361
+ reason?: string;
362
+ } | undefined;
363
+ llmServices: import("@mattermost/types/agents").LLMService[] | undefined;
350
364
  }> | undefined;
351
365
  users: {
352
366
  currentUserId: any;
@@ -356,7 +370,6 @@ declare const _default: {
356
370
  profiles: import("@mattermost/types/utilities").IDMappedObjects<import("@mattermost/types/users").UserProfile>;
357
371
  profilesInTeam: {};
358
372
  profilesNotInTeam: {};
359
- profilesWithoutTeam: Set<string>;
360
373
  profilesInChannel: {};
361
374
  profilesNotInChannel: {};
362
375
  profilesInGroup: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile>;
@@ -375,7 +388,6 @@ declare const _default: {
375
388
  profiles: import("@mattermost/types/utilities").IDMappedObjects<import("@mattermost/types/users").UserProfile> | undefined;
376
389
  profilesInTeam: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile> | undefined;
377
390
  profilesNotInTeam: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/teams").Team, import("@mattermost/types/users").UserProfile> | undefined;
378
- profilesWithoutTeam: Set<string> | undefined;
379
391
  profilesInChannel: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/channels").Channel, import("@mattermost/types/users").UserProfile> | undefined;
380
392
  profilesNotInChannel: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/channels").Channel, import("@mattermost/types/users").UserProfile> | undefined;
381
393
  profilesInGroup: import("@mattermost/types/utilities").RelationOneToManyUnique<import("@mattermost/types/groups").Group, import("@mattermost/types/users").UserProfile> | undefined;
@@ -1,4 +1,9 @@
1
- import type { Agent } from '@mattermost/types/agents';
1
+ import type { Agent, LLMService } from '@mattermost/types/agents';
2
2
  import type { GlobalState } from '@mattermost/types/store';
3
3
  export declare function getAgents(state: GlobalState): Agent[];
4
+ export declare function getAgentsStatus(state: GlobalState): {
5
+ available: boolean;
6
+ reason?: string;
7
+ };
4
8
  export declare function getAgent(state: GlobalState, agentId: string): Agent | undefined;
9
+ export declare function getLLMServices(state: GlobalState): LLMService[];
@@ -3,11 +3,19 @@
3
3
  // See LICENSE.txt for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getAgents = getAgents;
6
+ exports.getAgentsStatus = getAgentsStatus;
6
7
  exports.getAgent = getAgent;
8
+ exports.getLLMServices = getLLMServices;
7
9
  function getAgents(state) {
8
10
  return state.entities.agents?.agents;
9
11
  }
12
+ function getAgentsStatus(state) {
13
+ return state.entities.agents?.agentsStatus || { available: false };
14
+ }
10
15
  function getAgent(state, agentId) {
11
16
  const agents = getAgents(state);
12
17
  return agents.find((agent) => agent.id === agentId);
13
18
  }
19
+ function getLLMServices(state) {
20
+ return state.entities.agents?.llmServices || [];
21
+ }
@@ -110,3 +110,7 @@ export declare const getMyActiveChannelIds: import("mattermost-redux/selectors/c
110
110
  export declare const getRecentProfilesFromDMs: (state: GlobalState) => UserProfile[];
111
111
  export declare const isDeactivatedDirectChannel: (state: GlobalState, channelId: string) => boolean;
112
112
  export declare function getChannelBanner(state: GlobalState, channelId: string): ChannelBanner | undefined;
113
+ export declare function isChannelAutotranslated(state: GlobalState, channelId: string): boolean;
114
+ export declare function isMyChannelAutotranslated(state: GlobalState, channelId: string): boolean;
115
+ export declare function isUserLanguageSupportedForAutotranslation(state: GlobalState): boolean;
116
+ export declare function hasAutotranslationBecomeEnabled(state: GlobalState, channelOrMember: Channel | ChannelMembership): boolean | undefined;
@@ -39,6 +39,10 @@ exports.searchChannelsInPolicy = searchChannelsInPolicy;
39
39
  exports.getDirectTeammate = getDirectTeammate;
40
40
  exports.makeGetGmChannelMemberCount = makeGetGmChannelMemberCount;
41
41
  exports.getChannelBanner = getChannelBanner;
42
+ exports.isChannelAutotranslated = isChannelAutotranslated;
43
+ exports.isMyChannelAutotranslated = isMyChannelAutotranslated;
44
+ exports.isUserLanguageSupportedForAutotranslation = isUserLanguageSupportedForAutotranslation;
45
+ exports.hasAutotranslationBecomeEnabled = hasAutotranslationBecomeEnabled;
42
46
  const max_1 = __importDefault(require("lodash/max"));
43
47
  const constants_1 = require("mattermost-redux/constants");
44
48
  const channel_categories_1 = require("mattermost-redux/constants/channel_categories");
@@ -46,12 +50,14 @@ const create_selector_1 = require("mattermost-redux/selectors/create_selector");
46
50
  const admin_1 = require("mattermost-redux/selectors/entities/admin");
47
51
  const channel_categories_2 = require("mattermost-redux/selectors/entities/channel_categories");
48
52
  const common_1 = require("mattermost-redux/selectors/entities/common");
53
+ const general_1 = require("mattermost-redux/selectors/entities/general");
49
54
  const preferences_1 = require("mattermost-redux/selectors/entities/preferences");
50
55
  const roles_1 = require("mattermost-redux/selectors/entities/roles");
51
56
  const teams_1 = require("mattermost-redux/selectors/entities/teams");
52
57
  const users_1 = require("mattermost-redux/selectors/entities/users");
53
58
  const channel_utils_1 = require("mattermost-redux/utils/channel_utils");
54
59
  const helpers_1 = require("mattermost-redux/utils/helpers");
60
+ const i18n_1 = require("./i18n");
55
61
  const posts_1 = require("./posts");
56
62
  const threads_1 = require("./threads");
57
63
  // Re-define these types to ensure that these are typed correctly when mattermost-redux is published
@@ -881,3 +887,66 @@ function getChannelBanner(state, channelId) {
881
887
  const channel = getChannel(state, channelId);
882
888
  return channel ? channel.banner_info : undefined;
883
889
  }
890
+ // isChannelAutotranslated returns whether the channel is autotranslated
891
+ // in general terms in this server.
892
+ function isChannelAutotranslated(state, channelId) {
893
+ const channel = getChannel(state, channelId);
894
+ const config = (0, general_1.getConfig)(state);
895
+ if (!channel?.autotranslation || config?.EnableAutoTranslation !== 'true') {
896
+ return false;
897
+ }
898
+ // When autotranslation is restricted on DMs and GMs, do not consider them autotranslated
899
+ const isDMOrGM = channel.type === constants_1.General.DM_CHANNEL || channel.type === constants_1.General.GM_CHANNEL;
900
+ if (isDMOrGM && config?.RestrictDMAndGMAutotranslation === 'true') {
901
+ return false;
902
+ }
903
+ return true;
904
+ }
905
+ // isMyChannelAutotranslated returns whether the current user is seeing the autotranslated
906
+ // version of the channel.
907
+ function isMyChannelAutotranslated(state, channelId) {
908
+ if (!isChannelAutotranslated(state, channelId)) {
909
+ return false;
910
+ }
911
+ if (!isUserLanguageSupportedForAutotranslation(state)) {
912
+ return false;
913
+ }
914
+ const myChannelMember = (0, exports.getMyChannelMember)(state, channelId);
915
+ return !myChannelMember?.autotranslation_disabled;
916
+ }
917
+ function isUserLanguageSupportedForAutotranslation(state) {
918
+ const locale = (0, i18n_1.getCurrentUserLocale)(state);
919
+ const config = (0, general_1.getConfig)(state);
920
+ if (config?.EnableAutoTranslation !== 'true') {
921
+ return false;
922
+ }
923
+ const targetLanguages = config?.AutoTranslationLanguages?.split(',').map((l) => l.trim()).filter(Boolean);
924
+ return Boolean(targetLanguages?.length && targetLanguages.includes(locale));
925
+ }
926
+ function hasAutotranslationBecomeEnabled(state, channelOrMember) {
927
+ const autotranslationEnabled = (0, general_1.getConfig)(state)?.EnableAutoTranslation === 'true';
928
+ let existingChannel;
929
+ let existingMember;
930
+ let newChannel;
931
+ let newMember;
932
+ if ('channel_id' in channelOrMember) {
933
+ newMember = channelOrMember;
934
+ existingChannel = getChannel(state, newMember.channel_id);
935
+ existingMember = (0, exports.getMyChannelMember)(state, newMember.channel_id);
936
+ newChannel = existingChannel;
937
+ }
938
+ else {
939
+ newChannel = channelOrMember;
940
+ existingChannel = getChannel(state, newChannel.id);
941
+ existingMember = (0, exports.getMyChannelMember)(state, newChannel.id);
942
+ newMember = existingMember;
943
+ }
944
+ if (!existingChannel || !existingMember) {
945
+ // channel is not in the state, so there is no need
946
+ // to reload posts
947
+ return false;
948
+ }
949
+ const wasTranslating = autotranslationEnabled && existingChannel.autotranslation && !existingMember.autotranslation_disabled;
950
+ const isTranslating = autotranslationEnabled && newChannel?.autotranslation && !newMember?.autotranslation_disabled;
951
+ return !wasTranslating && isTranslating;
952
+ }
@@ -23,7 +23,6 @@ export declare function getUserIdsInChannels(state: GlobalState): RelationOneToM
23
23
  export declare function getUserIdsNotInChannels(state: GlobalState): RelationOneToManyUnique<Channel, UserProfile>;
24
24
  export declare function getUserIdsInTeams(state: GlobalState): RelationOneToManyUnique<Team, UserProfile>;
25
25
  export declare function getUserIdsNotInTeams(state: GlobalState): RelationOneToManyUnique<Team, UserProfile>;
26
- export declare function getUserIdsWithoutTeam(state: GlobalState): Set<UserProfile['id']>;
27
26
  export declare function getUserIdsInGroups(state: GlobalState): RelationOneToManyUnique<Group, UserProfile>;
28
27
  export declare function getUserIdsNotInGroups(state: GlobalState): RelationOneToManyUnique<Group, UserProfile>;
29
28
  export declare function getUserStatuses(state: GlobalState): RelationOneToOne<UserProfile, string>;
@@ -63,7 +62,6 @@ export declare const getProfilesInCurrentTeam: (state: GlobalState, filters?: Fi
63
62
  export declare const getProfilesInTeam: (state: GlobalState, teamId: Team['id'], filters?: Filters) => UserProfile[];
64
63
  export declare const getProfilesNotInTeam: (state: GlobalState, teamId: Team['id'], filters?: Filters) => UserProfile[];
65
64
  export declare const getProfilesNotInCurrentTeam: (state: GlobalState) => UserProfile[];
66
- export declare const getProfilesWithoutTeam: (state: GlobalState, filters: Filters) => UserProfile[];
67
65
  export declare function getStatusForUserId(state: GlobalState, userId: UserProfile['id']): string;
68
66
  export declare function getDndEndTimeForUserId(state: GlobalState, userId: UserProfile['id']): number;
69
67
  export declare function getTotalUsersStats(state: GlobalState): Partial<import("@mattermost/types/users").UsersStats>;
@@ -77,7 +75,6 @@ export declare function searchProfilesNotInCurrentChannel(state: GlobalState, te
77
75
  export declare function searchProfilesInCurrentTeam(state: GlobalState, term: string, skipCurrent?: boolean, filters?: Filters): UserProfile[];
78
76
  export declare function searchProfilesInTeam(state: GlobalState, teamId: Team['id'], term: string, skipCurrent?: boolean, filters?: Filters): UserProfile[];
79
77
  export declare function searchProfilesNotInCurrentTeam(state: GlobalState, term: string, skipCurrent?: boolean): UserProfile[];
80
- export declare function searchProfilesWithoutTeam(state: GlobalState, term: string, skipCurrent: boolean | undefined, filters: Filters): UserProfile[];
81
78
  export declare const shouldShowTermsOfService: (state: GlobalState) => boolean;
82
79
  export declare const getUsersInVisibleDMs: (state: GlobalState) => UserProfile[];
83
80
  export declare function makeGetProfilesForReactions(): (state: GlobalState, reactions: Reaction[]) => UserProfile[];
@@ -2,12 +2,11 @@
2
2
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
3
  // See LICENSE.txt for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getLastActiveTimestampUnits = exports.displayLastActiveLabel = exports.isFirstAdmin = exports.getProfilesNotInCurrentGroup = exports.getProfilesInGroupWithoutSorting = exports.getProfilesInGroup = exports.getUsersInVisibleDMs = exports.shouldShowTermsOfService = exports.getProfilesWithoutTeam = exports.getProfilesNotInCurrentTeam = exports.getProfilesNotInTeam = exports.getProfilesInTeam = exports.getProfilesInCurrentTeam = exports.getProfilesNotInCurrentChannel = exports.getActiveProfilesInCurrentChannelWithoutSorting = exports.getActiveProfilesInCurrentChannel = exports.getProfilesInCurrentChannel = exports.getProfiles = exports.getProfileSetNotInCurrentTeam = exports.getProfileSetInCurrentTeam = exports.getProfileSetNotInCurrentChannel = exports.getProfileSetInCurrentChannel = exports.getHighlightWithoutNotificationKeys = exports.getCurrentUserMentionKeys = exports.getCurrentUserRoles = exports.currentUserHasAnAdminRole = exports.isCurrentUserGuestUser = exports.isCurrentUserSystemAdmin = exports.getUsersByEmail = exports.getUsersByUsername = exports.getUsers = exports.getCurrentUserId = exports.getCurrentUser = void 0;
5
+ exports.getLastActiveTimestampUnits = exports.displayLastActiveLabel = exports.isFirstAdmin = exports.getProfilesNotInCurrentGroup = exports.getProfilesInGroupWithoutSorting = exports.getProfilesInGroup = exports.getUsersInVisibleDMs = exports.shouldShowTermsOfService = exports.getProfilesNotInCurrentTeam = exports.getProfilesNotInTeam = exports.getProfilesInTeam = exports.getProfilesInCurrentTeam = exports.getProfilesNotInCurrentChannel = exports.getActiveProfilesInCurrentChannelWithoutSorting = exports.getActiveProfilesInCurrentChannel = exports.getProfilesInCurrentChannel = exports.getProfiles = exports.getProfileSetNotInCurrentTeam = exports.getProfileSetInCurrentTeam = exports.getProfileSetNotInCurrentChannel = exports.getProfileSetInCurrentChannel = exports.getHighlightWithoutNotificationKeys = exports.getCurrentUserMentionKeys = exports.getCurrentUserRoles = exports.currentUserHasAnAdminRole = exports.isCurrentUserGuestUser = exports.isCurrentUserSystemAdmin = exports.getUsersByEmail = exports.getUsersByUsername = exports.getUsers = exports.getCurrentUserId = exports.getCurrentUser = void 0;
6
6
  exports.getUserIdsInChannels = getUserIdsInChannels;
7
7
  exports.getUserIdsNotInChannels = getUserIdsNotInChannels;
8
8
  exports.getUserIdsInTeams = getUserIdsInTeams;
9
9
  exports.getUserIdsNotInTeams = getUserIdsNotInTeams;
10
- exports.getUserIdsWithoutTeam = getUserIdsWithoutTeam;
11
10
  exports.getUserIdsInGroups = getUserIdsInGroups;
12
11
  exports.getUserIdsNotInGroups = getUserIdsNotInGroups;
13
12
  exports.getUserStatuses = getUserStatuses;
@@ -32,7 +31,6 @@ exports.searchProfilesNotInCurrentChannel = searchProfilesNotInCurrentChannel;
32
31
  exports.searchProfilesInCurrentTeam = searchProfilesInCurrentTeam;
33
32
  exports.searchProfilesInTeam = searchProfilesInTeam;
34
33
  exports.searchProfilesNotInCurrentTeam = searchProfilesNotInCurrentTeam;
35
- exports.searchProfilesWithoutTeam = searchProfilesWithoutTeam;
36
34
  exports.makeGetProfilesForReactions = makeGetProfilesForReactions;
37
35
  exports.makeGetProfilesInChannel = makeGetProfilesInChannel;
38
36
  exports.makeGetProfilesNotInChannel = makeGetProfilesNotInChannel;
@@ -67,9 +65,6 @@ function getUserIdsInTeams(state) {
67
65
  function getUserIdsNotInTeams(state) {
68
66
  return state.entities.users.profilesNotInTeam;
69
67
  }
70
- function getUserIdsWithoutTeam(state) {
71
- return state.entities.users.profilesWithoutTeam;
72
- }
73
68
  function getUserIdsInGroups(state) {
74
69
  return state.entities.users.profilesInGroup;
75
70
  }
@@ -264,9 +259,6 @@ exports.getProfilesNotInTeam = (0, create_selector_1.createSelector)('getProfile
264
259
  exports.getProfilesNotInCurrentTeam = (0, create_selector_1.createSelector)('getProfilesNotInCurrentTeam', exports.getUsers, exports.getProfileSetNotInCurrentTeam, (profiles, notInCurrentTeamProfileSet) => {
265
260
  return sortAndInjectProfiles(profiles, notInCurrentTeamProfileSet);
266
261
  });
267
- exports.getProfilesWithoutTeam = (0, create_selector_1.createSelector)('getProfilesWithoutTeam', exports.getUsers, getUserIdsWithoutTeam, (state, filters) => filters, (profiles, withoutTeamProfileSet, filters) => {
268
- return sortAndInjectProfiles(filterProfiles(profiles, filters), withoutTeamProfileSet);
269
- });
270
262
  function getStatusForUserId(state, userId) {
271
263
  return getUserStatuses(state)[userId];
272
264
  }
@@ -347,13 +339,6 @@ function searchProfilesNotInCurrentTeam(state, term, skipCurrent = false) {
347
339
  }
348
340
  return profiles;
349
341
  }
350
- function searchProfilesWithoutTeam(state, term, skipCurrent = false, filters) {
351
- const filteredProfiles = (0, user_utils_1.filterProfilesStartingWithTerm)((0, exports.getProfilesWithoutTeam)(state, filters), term);
352
- if (skipCurrent) {
353
- removeCurrentUserFromList(filteredProfiles, (0, exports.getCurrentUserId)(state));
354
- }
355
- return filteredProfiles;
356
- }
357
342
  function removeCurrentUserFromList(profiles, currentUserId) {
358
343
  const index = profiles.findIndex((p) => p.id === currentUserId);
359
344
  if (index >= 0) {
@@ -7,6 +7,8 @@ const state = {
7
7
  entities: {
8
8
  agents: {
9
9
  agents: [],
10
+ llmServices: [],
11
+ agentsStatus: { available: false },
10
12
  },
11
13
  general: {
12
14
  config: {},
@@ -25,7 +27,6 @@ const state = {
25
27
  profiles: {},
26
28
  profilesInTeam: {},
27
29
  profilesNotInTeam: {},
28
- profilesWithoutTeam: new Set(),
29
30
  profilesInChannel: {},
30
31
  profilesNotInChannel: {},
31
32
  profilesInGroup: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mattermost-redux",
3
- "version": "11.4.0",
3
+ "version": "11.5.0",
4
4
  "description": "Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client",
5
5
  "keywords": [
6
6
  "mattermost"
@@ -39,8 +39,8 @@
39
39
  "directory": "webapp/platform/mattermost-redux"
40
40
  },
41
41
  "dependencies": {
42
- "@mattermost/client": "11.4.0",
43
- "@mattermost/types": "11.4.0",
42
+ "@mattermost/client": "11.5.0",
43
+ "@mattermost/types": "11.5.0",
44
44
  "@redux-devtools/extension": "3.3.0",
45
45
  "lodash": "^4.17.21",
46
46
  "moment-timezone": "^0.5.38",
@@ -1,56 +0,0 @@
1
- declare const WebsocketEvents: {
2
- POSTED: string;
3
- POST_EDITED: string;
4
- POST_DELETED: string;
5
- POST_UNREAD: string;
6
- CHANNEL_CONVERTED: string;
7
- CHANNEL_CREATED: string;
8
- CHANNEL_DELETED: string;
9
- CHANNEL_UNARCHIVED: string;
10
- CHANNEL_UPDATED: string;
11
- MULTIPLE_CHANNELS_VIEWED: string;
12
- CHANNEL_MEMBER_UPDATED: string;
13
- CHANNEL_SCHEME_UPDATED: string;
14
- DIRECT_ADDED: string;
15
- ADDED_TO_TEAM: string;
16
- LEAVE_TEAM: string;
17
- UPDATE_TEAM: string;
18
- USER_ADDED: string;
19
- USER_REMOVED: string;
20
- USER_UPDATED: string;
21
- USER_ROLE_UPDATED: string;
22
- ROLE_ADDED: string;
23
- ROLE_REMOVED: string;
24
- ROLE_UPDATED: string;
25
- TYPING: string;
26
- STOP_TYPING: string;
27
- PREFERENCE_CHANGED: string;
28
- PREFERENCES_CHANGED: string;
29
- PREFERENCES_DELETED: string;
30
- EPHEMERAL_MESSAGE: string;
31
- STATUS_CHANGED: string;
32
- HELLO: string;
33
- WEBRTC: string;
34
- REACTION_ADDED: string;
35
- REACTION_REMOVED: string;
36
- EMOJI_ADDED: string;
37
- LICENSE_CHANGED: string;
38
- CONFIG_CHANGED: string;
39
- PLUGIN_STATUSES_CHANGED: string;
40
- OPEN_DIALOG: string;
41
- INCREASE_POST_VISIBILITY_BY_ONE: string;
42
- RECEIVED_GROUP: string;
43
- RECEIVED_GROUP_ASSOCIATED_TO_TEAM: string;
44
- RECEIVED_GROUP_NOT_ASSOCIATED_TO_TEAM: string;
45
- RECEIVED_GROUP_ASSOCIATED_TO_CHANNEL: string;
46
- RECEIVED_GROUP_NOT_ASSOCIATED_TO_CHANNEL: string;
47
- THREAD_UPDATED: string;
48
- THREAD_FOLLOW_CHANGED: string;
49
- THREAD_READ_CHANGED: string;
50
- FIRST_ADMIN_VISIT_MARKETPLACE_STATUS_RECEIVED: string;
51
- GROUP_MEMBER_DELETED: string;
52
- BURN_ON_READ_POST_REVEALED: string;
53
- BURN_ON_READ_POST_BURNED: string;
54
- BURN_ON_READ_ALL_REVEALED: string;
55
- };
56
- export default WebsocketEvents;
@@ -1,60 +0,0 @@
1
- "use strict";
2
- // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
- // See LICENSE.txt for license information.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- const WebsocketEvents = {
6
- POSTED: 'posted',
7
- POST_EDITED: 'post_edited',
8
- POST_DELETED: 'post_deleted',
9
- POST_UNREAD: 'post_unread',
10
- CHANNEL_CONVERTED: 'channel_converted',
11
- CHANNEL_CREATED: 'channel_created',
12
- CHANNEL_DELETED: 'channel_deleted',
13
- CHANNEL_UNARCHIVED: 'channel_restored',
14
- CHANNEL_UPDATED: 'channel_updated',
15
- MULTIPLE_CHANNELS_VIEWED: 'multiple_channels_viewed',
16
- CHANNEL_MEMBER_UPDATED: 'channel_member_updated',
17
- CHANNEL_SCHEME_UPDATED: 'channel_scheme_updated',
18
- DIRECT_ADDED: 'direct_added',
19
- ADDED_TO_TEAM: 'added_to_team',
20
- LEAVE_TEAM: 'leave_team',
21
- UPDATE_TEAM: 'update_team',
22
- USER_ADDED: 'user_added',
23
- USER_REMOVED: 'user_removed',
24
- USER_UPDATED: 'user_updated',
25
- USER_ROLE_UPDATED: 'user_role_updated',
26
- ROLE_ADDED: 'role_added',
27
- ROLE_REMOVED: 'role_removed',
28
- ROLE_UPDATED: 'role_updated',
29
- TYPING: 'typing',
30
- STOP_TYPING: 'stop_typing',
31
- PREFERENCE_CHANGED: 'preference_changed',
32
- PREFERENCES_CHANGED: 'preferences_changed',
33
- PREFERENCES_DELETED: 'preferences_deleted',
34
- EPHEMERAL_MESSAGE: 'ephemeral_message',
35
- STATUS_CHANGED: 'status_change',
36
- HELLO: 'hello',
37
- WEBRTC: 'webrtc',
38
- REACTION_ADDED: 'reaction_added',
39
- REACTION_REMOVED: 'reaction_removed',
40
- EMOJI_ADDED: 'emoji_added',
41
- LICENSE_CHANGED: 'license_changed',
42
- CONFIG_CHANGED: 'config_changed',
43
- PLUGIN_STATUSES_CHANGED: 'plugin_statuses_changed',
44
- OPEN_DIALOG: 'open_dialog',
45
- INCREASE_POST_VISIBILITY_BY_ONE: 'increase_post_visibility_by_one',
46
- RECEIVED_GROUP: 'received_group',
47
- RECEIVED_GROUP_ASSOCIATED_TO_TEAM: 'group_associated_to_team',
48
- RECEIVED_GROUP_NOT_ASSOCIATED_TO_TEAM: 'group_not_associated_to_team',
49
- RECEIVED_GROUP_ASSOCIATED_TO_CHANNEL: 'group_associated_to_channel',
50
- RECEIVED_GROUP_NOT_ASSOCIATED_TO_CHANNEL: 'group_not_associated_to_channel',
51
- THREAD_UPDATED: 'thread_updated',
52
- THREAD_FOLLOW_CHANGED: 'thread_follow_changed',
53
- THREAD_READ_CHANGED: 'thread_read_changed',
54
- FIRST_ADMIN_VISIT_MARKETPLACE_STATUS_RECEIVED: 'first_admin_visit_marketplace_status_received',
55
- GROUP_MEMBER_DELETED: 'group_member_deleted',
56
- BURN_ON_READ_POST_REVEALED: 'post_revealed',
57
- BURN_ON_READ_POST_BURNED: 'post_burned',
58
- BURN_ON_READ_ALL_REVEALED: 'burn_on_read_all_revealed',
59
- };
60
- exports.default = WebsocketEvents;