@mattermost/types 10.12.0 → 11.1.0-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 (57) hide show
  1. package/lib/apps.js +46 -0
  2. package/lib/content_flagging.js +8 -0
  3. package/lib/properties.js +5 -0
  4. package/package.json +1 -1
  5. package/lib/access_control.d.ts +0 -71
  6. package/lib/admin.d.ts +0 -147
  7. package/lib/apps.d.ts +0 -187
  8. package/lib/audits.d.ts +0 -9
  9. package/lib/autocomplete.d.ts +0 -12
  10. package/lib/bots.d.ts +0 -15
  11. package/lib/channel_bookmarks.d.ts +0 -51
  12. package/lib/channel_categories.d.ts +0 -30
  13. package/lib/channels.d.ts +0 -189
  14. package/lib/client4.d.ts +0 -42
  15. package/lib/cloud.d.ts +0 -174
  16. package/lib/compliance.d.ts +0 -13
  17. package/lib/config.d.ts +0 -1054
  18. package/lib/content_flagging.d.ts +0 -2
  19. package/lib/data_retention.d.ts +0 -30
  20. package/lib/drafts.d.ts +0 -14
  21. package/lib/emojis.d.ts +0 -44
  22. package/lib/errors.d.ts +0 -8
  23. package/lib/files.d.ts +0 -41
  24. package/lib/general.d.ts +0 -16
  25. package/lib/groups.d.ts +0 -169
  26. package/lib/hosted_customer.d.ts +0 -7
  27. package/lib/integration_actions.d.ts +0 -20
  28. package/lib/integrations.d.ts +0 -177
  29. package/lib/jobs.d.ts +0 -23
  30. package/lib/limits.d.ts +0 -7
  31. package/lib/marketplace.d.ts +0 -42
  32. package/lib/message_attachments.d.ts +0 -24
  33. package/lib/mfa.d.ts +0 -4
  34. package/lib/plugins.d.ts +0 -136
  35. package/lib/posts.d.ts +0 -182
  36. package/lib/preferences.d.ts +0 -9
  37. package/lib/product_notices.d.ts +0 -26
  38. package/lib/products.d.ts +0 -8
  39. package/lib/properties.d.ts +0 -47
  40. package/lib/reactions.d.ts +0 -6
  41. package/lib/remote_clusters.d.ts +0 -35
  42. package/lib/reports.d.ts +0 -65
  43. package/lib/requests.d.ts +0 -53
  44. package/lib/roles.d.ts +0 -12
  45. package/lib/saml.d.ts +0 -10
  46. package/lib/schedule_post.d.ts +0 -27
  47. package/lib/schemes.d.ts +0 -29
  48. package/lib/search.d.ts +0 -25
  49. package/lib/sessions.d.ts +0 -15
  50. package/lib/setup.d.ts +0 -4
  51. package/lib/shared_channels.d.ts +0 -26
  52. package/lib/store.d.ts +0 -95
  53. package/lib/teams.d.ts +0 -98
  54. package/lib/terms_of_service.d.ts +0 -6
  55. package/lib/threads.d.ts +0 -63
  56. package/lib/typing.d.ts +0 -5
  57. package/lib/users.d.ts +0 -139
package/lib/apps.js CHANGED
@@ -145,6 +145,9 @@ function isAppForm(v) {
145
145
  if (form.icon !== undefined && typeof form.icon !== 'string') {
146
146
  return false;
147
147
  }
148
+ if (form.submit_label !== undefined && typeof form.submit_label !== 'string') {
149
+ return false;
150
+ }
148
151
  if (form.submit_buttons !== undefined && typeof form.submit_buttons !== 'string') {
149
152
  return false;
150
153
  }
@@ -178,6 +181,9 @@ function isAppFormValue(v) {
178
181
  if (v === null) {
179
182
  return true;
180
183
  }
184
+ if (Array.isArray(v)) {
185
+ return v.every(isAppSelectOption);
186
+ }
181
187
  return isAppSelectOption(v);
182
188
  }
183
189
  function isAppSelectOption(v) {
@@ -193,6 +199,25 @@ function isAppSelectOption(v) {
193
199
  }
194
200
  return true;
195
201
  }
202
+ /**
203
+ * Validates if a string is a valid date format (ISO date, datetime, or relative reference)
204
+ * Uses native Date constructor which is permissive - server-side validation is authoritative
205
+ */
206
+ function isValidDateString(dateStr) {
207
+ const relativePatterns = [
208
+ /^today$/,
209
+ /^tomorrow$/,
210
+ /^yesterday$/,
211
+ /^[+-]\d{1,4}[dwm]$/i,
212
+ ];
213
+ for (const pattern of relativePatterns) {
214
+ if (pattern.test(dateStr)) {
215
+ return true;
216
+ }
217
+ }
218
+ const date = new Date(dateStr);
219
+ return !isNaN(date.getTime());
220
+ }
196
221
  function isAppField(v) {
197
222
  if (typeof v !== 'object' || v === null) {
198
223
  return false;
@@ -246,5 +271,26 @@ function isAppField(v) {
246
271
  if (field.max_length !== undefined && typeof field.max_length !== 'number') {
247
272
  return false;
248
273
  }
274
+ if (field.min_date !== undefined) {
275
+ if (typeof field.min_date !== 'string') {
276
+ return false;
277
+ }
278
+ // Validate that min_date is a valid date format (ISO or relative)
279
+ if (!isValidDateString(field.min_date)) {
280
+ return false;
281
+ }
282
+ }
283
+ if (field.max_date !== undefined) {
284
+ if (typeof field.max_date !== 'string') {
285
+ return false;
286
+ }
287
+ // Validate that max_date is a valid date format (ISO or relative)
288
+ if (!isValidDateString(field.max_date)) {
289
+ return false;
290
+ }
291
+ }
292
+ if (field.time_interval !== undefined && typeof field.time_interval !== 'number') {
293
+ return false;
294
+ }
249
295
  return true;
250
296
  }
@@ -2,3 +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.ContentFlaggingStatus = void 0;
6
+ var ContentFlaggingStatus;
7
+ (function (ContentFlaggingStatus) {
8
+ ContentFlaggingStatus["Pending"] = "Pending";
9
+ ContentFlaggingStatus["Assigned"] = "Assigned";
10
+ ContentFlaggingStatus["Removed"] = "Removed";
11
+ ContentFlaggingStatus["Retained"] = "Retained";
12
+ })(ContentFlaggingStatus || (exports.ContentFlaggingStatus = ContentFlaggingStatus = {}));
package/lib/properties.js CHANGED
@@ -2,3 +2,8 @@
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.supportsOptions = void 0;
6
+ const supportsOptions = (field) => {
7
+ return field.type === 'select' || field.type === 'multiselect';
8
+ };
9
+ exports.supportsOptions = supportsOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "10.12.0",
3
+ "version": "11.1.0-0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"
@@ -1,71 +0,0 @@
1
- import type { ChannelWithTeamData } from './channels';
2
- import type { UserProfile } from './users';
3
- export type AccessControlPolicy = {
4
- id: string;
5
- name: string;
6
- type: string;
7
- revision?: number;
8
- created_at?: number;
9
- version?: string;
10
- active?: boolean;
11
- imports?: string[];
12
- props?: Record<string, unknown[]>;
13
- rules: AccessControlPolicyRule[];
14
- };
15
- export type AccessControlPolicyCursor = {
16
- id: string;
17
- };
18
- export type AccessControlPoliciesResult = {
19
- policies: AccessControlPolicy[];
20
- total: number;
21
- };
22
- export type AccessControlPolicySearchOpts = {
23
- term: string;
24
- type: string;
25
- cursor: AccessControlPolicyCursor;
26
- limit: number;
27
- };
28
- export type AccessControlPolicyChannelsResult = {
29
- channels: ChannelWithTeamData[];
30
- total: number;
31
- };
32
- export type AccessControlPolicyRule = {
33
- actions?: string[];
34
- expression: string;
35
- };
36
- export type CELExpressionError = {
37
- message: string;
38
- line: number;
39
- column: number;
40
- };
41
- export type AccessControlTestResult = {
42
- users: UserProfile[];
43
- total: number;
44
- };
45
- export type AccessControlAttribute = {
46
- name: string;
47
- values: string[];
48
- };
49
- export type AccessControlVisualAST = {
50
- conditions: AccessControlVisualASTNode[];
51
- };
52
- export type AccessControlVisualASTNode = {
53
- attribute: string;
54
- operator: string;
55
- value: any;
56
- value_type: number;
57
- attribute_type: string;
58
- };
59
- /**
60
- * Type definition for access control attributes
61
- */
62
- export type AccessControlAttributes = Record<string, string[]>;
63
- /**
64
- * Interface for entities that can have access control
65
- */
66
- export interface AccessControlled {
67
- /**
68
- * Whether access control is enforced for this entity
69
- */
70
- access_control_enforced?: boolean;
71
- }
package/lib/admin.d.ts DELETED
@@ -1,147 +0,0 @@
1
- import type { AccessControlPolicy } from './access_control';
2
- import type { Audit } from './audits';
3
- import type { Compliance } from './compliance';
4
- import type { AdminConfig, ClientLicense, EnvironmentConfig } from './config';
5
- import type { DataRetentionCustomPolicies } from './data_retention';
6
- import type { MixedUnlinkedGroupRedux } from './groups';
7
- import type { PluginRedux, PluginStatusRedux } from './plugins';
8
- import type { SamlCertificateStatus, SamlMetadataResponse } from './saml';
9
- import type { Team } from './teams';
10
- import type { UserAccessToken, UserProfile } from './users';
11
- import type { RelationOneToOne, IDMappedObjects } from './utilities';
12
- export declare enum LogLevelEnum {
13
- SILLY = "silly",
14
- DEBUG = "debug",
15
- INFO = "info",
16
- WARN = "warn",
17
- ERROR = "error"
18
- }
19
- export type LogServerNames = string[];
20
- export type LogLevels = LogLevelEnum[];
21
- export type LogDateFrom = string;
22
- export type LogDateTo = string;
23
- export type LogObject = {
24
- caller: string;
25
- job_id: string;
26
- level: LogLevelEnum;
27
- msg: string;
28
- timestamp: string;
29
- worker: string;
30
- };
31
- export type LogFilter = {
32
- serverNames: LogServerNames;
33
- logLevels: LogLevels;
34
- dateFrom: LogDateFrom;
35
- dateTo: LogDateTo;
36
- };
37
- export type LogFilterQuery = {
38
- server_names: LogServerNames;
39
- log_levels: LogLevels;
40
- date_from: LogDateFrom;
41
- date_to: LogDateTo;
42
- };
43
- export type AdminState = {
44
- logs: LogObject[];
45
- plainLogs: string[];
46
- audits: Record<string, Audit>;
47
- config: Partial<AdminConfig>;
48
- environmentConfig: Partial<EnvironmentConfig>;
49
- complianceReports: Record<string, Compliance>;
50
- ldapGroups: Record<string, MixedUnlinkedGroupRedux>;
51
- ldapGroupsCount: number;
52
- userAccessTokens: Record<string, UserAccessToken>;
53
- clusterInfo: ClusterInfo[];
54
- samlCertStatus?: SamlCertificateStatus;
55
- analytics: AnalyticsState;
56
- teamAnalytics: RelationOneToOne<Team, AnalyticsState>;
57
- userAccessTokensByUser?: RelationOneToOne<UserProfile, Record<string, UserAccessToken>>;
58
- plugins?: Record<string, PluginRedux>;
59
- pluginStatuses?: Record<string, PluginStatusRedux>;
60
- samlMetadataResponse?: SamlMetadataResponse;
61
- dataRetentionCustomPolicies: DataRetentionCustomPolicies;
62
- dataRetentionCustomPoliciesCount: number;
63
- prevTrialLicense: ClientLicense;
64
- accessControlPolicies: IDMappedObjects<AccessControlPolicy>;
65
- channelsForAccessControlPolicy: Record<string, string[]>;
66
- };
67
- export type AnalyticsState = {
68
- POST_PER_DAY?: AnalyticsRow[];
69
- BOT_POST_PER_DAY?: AnalyticsRow[];
70
- USERS_WITH_POSTS_PER_DAY?: AnalyticsRow[];
71
- TOTAL_PUBLIC_CHANNELS?: number;
72
- TOTAL_PRIVATE_GROUPS?: number;
73
- TOTAL_POSTS?: number;
74
- TOTAL_USERS?: number;
75
- TOTAL_INACTIVE_USERS?: number;
76
- TOTAL_TEAMS?: number;
77
- TOTAL_WEBSOCKET_CONNECTIONS?: number;
78
- TOTAL_MASTER_DB_CONNECTIONS?: number;
79
- TOTAL_READ_DB_CONNECTIONS?: number;
80
- DAILY_ACTIVE_USERS?: number;
81
- MONTHLY_ACTIVE_USERS?: number;
82
- TOTAL_IHOOKS?: number;
83
- TOTAL_OHOOKS?: number;
84
- TOTAL_COMMANDS?: number;
85
- TOTAL_SESSIONS?: number;
86
- REGISTERED_USERS?: number;
87
- TOTAL_FILE_COUNT?: number;
88
- TOTAL_FILE_SIZE?: number;
89
- };
90
- export type ClusterInfo = {
91
- id: string;
92
- version: string;
93
- config_hash: string;
94
- ipaddress: string;
95
- hostname: string;
96
- schema_version: string;
97
- };
98
- export type AnalyticsRow = {
99
- name: string;
100
- value: number;
101
- };
102
- export type IndexedPluginAnalyticsRow = {
103
- [key: string]: PluginAnalyticsRow;
104
- };
105
- export declare enum AnalyticsVisualizationType {
106
- Count = "count",
107
- LineChart = "line_chart",
108
- DoughnutChart = "doughnut_chart"
109
- }
110
- export type PluginAnalyticsRow = {
111
- id: string;
112
- name: React.ReactNode;
113
- icon?: string;
114
- value: any;
115
- visualizationType?: AnalyticsVisualizationType;
116
- };
117
- export type SchemaMigration = {
118
- version: number;
119
- name: string;
120
- };
121
- export type SupportPacketContent = {
122
- id: string;
123
- translation_id?: string;
124
- label: string;
125
- selected: boolean;
126
- mandatory: boolean;
127
- };
128
- export type LdapSampleEntry = {
129
- dn: string;
130
- username?: string;
131
- email?: string;
132
- first_name?: string;
133
- last_name?: string;
134
- id?: string;
135
- display_name?: string;
136
- available_attributes?: Record<string, string>;
137
- };
138
- export type LdapDiagnosticResult = {
139
- test_name: string;
140
- test_value: string;
141
- total_count: number;
142
- entries_with_value: number;
143
- message?: string;
144
- error?: string;
145
- sample_results: LdapSampleEntry[];
146
- };
147
- export type TestLdapFiltersResponse = LdapDiagnosticResult[];
package/lib/apps.d.ts DELETED
@@ -1,187 +0,0 @@
1
- import { type ProductScope } from './products';
2
- export declare enum Permission {
3
- UserJoinedChannelNotification = "user_joined_channel_notification",
4
- ActAsBot = "act_as_bot",
5
- ActAsUser = "act_as_user",
6
- PermissionActAsAdmin = "act_as_admin",
7
- RemoteOAuth2 = "remote_oauth2",
8
- RemoteWebhooks = "remote_webhooks"
9
- }
10
- export declare enum Locations {
11
- PostMenu = "/post_menu",
12
- ChannelHeader = "/channel_header",
13
- Command = "/command",
14
- InPost = "/in_post"
15
- }
16
- export type AppManifest = {
17
- app_id: string;
18
- version?: string;
19
- homepage_url?: string;
20
- icon?: string;
21
- display_name: string;
22
- description?: string;
23
- requested_permissions?: Permission[];
24
- requested_locations?: Locations[];
25
- };
26
- export type AppModalState = {
27
- form: AppForm;
28
- call: AppCallRequest;
29
- };
30
- export type AppCommandFormMap = {
31
- [location: string]: AppForm;
32
- };
33
- export type BindingsInfo = {
34
- bindings: AppBinding[];
35
- forms: AppCommandFormMap;
36
- };
37
- export type AppsState = {
38
- main: BindingsInfo;
39
- rhs: BindingsInfo;
40
- pluginEnabled: boolean;
41
- };
42
- export type AppBinding = {
43
- app_id: string;
44
- location?: string;
45
- supported_product_ids?: ProductScope;
46
- icon?: string;
47
- label: string;
48
- hint?: string;
49
- description?: string;
50
- role_id?: string;
51
- depends_on_team?: boolean;
52
- depends_on_channel?: boolean;
53
- depends_on_user?: boolean;
54
- depends_on_post?: boolean;
55
- bindings?: AppBinding[];
56
- form?: AppForm;
57
- submit?: AppCall;
58
- };
59
- export declare function isAppBinding(obj: unknown): obj is AppBinding;
60
- export type AppCallValues = {
61
- [name: string]: any;
62
- };
63
- export type AppCall = {
64
- path: string;
65
- expand?: AppExpand;
66
- state?: any;
67
- };
68
- export type AppCallRequest = AppCall & {
69
- context: AppContext;
70
- values?: AppCallValues;
71
- raw_command?: string;
72
- selected_field?: string;
73
- query?: string;
74
- };
75
- export type AppCallResponseType = string;
76
- export type AppCallResponse<Res = unknown> = {
77
- type: AppCallResponseType;
78
- text?: string;
79
- data?: Res;
80
- navigate_to_url?: string;
81
- use_external_browser?: boolean;
82
- call?: AppCall;
83
- form?: AppForm;
84
- app_metadata?: AppMetadataForClient;
85
- };
86
- export type AppMetadataForClient = {
87
- bot_user_id: string;
88
- bot_username: string;
89
- };
90
- export type AppContext = {
91
- app_id: string;
92
- location?: string;
93
- acting_user_id?: string;
94
- user_id?: string;
95
- channel_id?: string;
96
- team_id?: string;
97
- post_id?: string;
98
- root_id?: string;
99
- props?: AppContextProps;
100
- user_agent?: string;
101
- track_as_submit?: boolean;
102
- };
103
- export type AppContextProps = {
104
- [name: string]: string;
105
- };
106
- export type AppExpandLevel = '' | 'none' | 'summary' | '+summary' | 'all' | '+all' | 'id';
107
- export type AppExpand = {
108
- app?: AppExpandLevel;
109
- acting_user?: AppExpandLevel;
110
- acting_user_access_token?: AppExpandLevel;
111
- channel?: AppExpandLevel;
112
- config?: AppExpandLevel;
113
- mentioned?: AppExpandLevel;
114
- parent_post?: AppExpandLevel;
115
- post?: AppExpandLevel;
116
- root_post?: AppExpandLevel;
117
- team?: AppExpandLevel;
118
- user?: AppExpandLevel;
119
- locale?: AppExpandLevel;
120
- };
121
- export type AppForm = {
122
- title?: string;
123
- header?: string;
124
- footer?: string;
125
- icon?: string;
126
- submit_buttons?: string;
127
- cancel_button?: boolean;
128
- submit_on_cancel?: boolean;
129
- fields?: AppField[];
130
- source?: AppCall;
131
- submit?: AppCall;
132
- depends_on?: string[];
133
- };
134
- export type AppFormValue = string | AppSelectOption | boolean | null;
135
- export type AppFormValues = {
136
- [name: string]: AppFormValue;
137
- };
138
- export type AppSelectOption = {
139
- label: string;
140
- value: string;
141
- icon_data?: string;
142
- };
143
- export type AppFieldType = string;
144
- export type AppField = {
145
- name: string;
146
- type: AppFieldType;
147
- is_required?: boolean;
148
- readonly?: boolean;
149
- value?: AppFormValue;
150
- description?: string;
151
- label?: string;
152
- hint?: string;
153
- position?: number;
154
- modal_label?: string;
155
- refresh?: boolean;
156
- options?: AppSelectOption[];
157
- multiselect?: boolean;
158
- lookup?: AppCall;
159
- subtype?: string;
160
- min_length?: number;
161
- max_length?: number;
162
- };
163
- export type AutocompleteSuggestion = {
164
- suggestion: string;
165
- complete?: string;
166
- description?: string;
167
- hint?: string;
168
- iconData?: string;
169
- };
170
- export type AutocompleteSuggestionWithComplete = AutocompleteSuggestion & {
171
- complete: string;
172
- };
173
- export type AutocompleteElement = AppField;
174
- export type AutocompleteStaticSelect = AutocompleteElement & {
175
- options: AppSelectOption[];
176
- };
177
- export type AutocompleteDynamicSelect = AutocompleteElement;
178
- export type AutocompleteUserSelect = AutocompleteElement;
179
- export type AutocompleteChannelSelect = AutocompleteElement;
180
- export type FormResponseData = {
181
- errors?: {
182
- [field: string]: string;
183
- };
184
- };
185
- export type AppLookupResponse = {
186
- items: AppSelectOption[];
187
- };
package/lib/audits.d.ts DELETED
@@ -1,9 +0,0 @@
1
- export type Audit = {
2
- id: string;
3
- create_at: number;
4
- user_id: string;
5
- action: string;
6
- extra_info: string;
7
- ip_address: string;
8
- session_id: string;
9
- };
@@ -1,12 +0,0 @@
1
- import type { UserProfile } from './users';
2
- export type UserAutocomplete = {
3
- users: UserProfile[];
4
- out_of_channel?: UserProfile[];
5
- };
6
- export type AutocompleteSuggestion = {
7
- Complete: string;
8
- Suggestion: string;
9
- Hint: string;
10
- Description: string;
11
- IconData: string;
12
- };
package/lib/bots.d.ts DELETED
@@ -1,15 +0,0 @@
1
- export type Bot = {
2
- user_id: string;
3
- username: string;
4
- display_name?: string;
5
- description?: string;
6
- owner_id: string;
7
- create_at: number;
8
- update_at: number;
9
- delete_at: number;
10
- };
11
- export type BotPatch = {
12
- username: string;
13
- display_name: string;
14
- description: string;
15
- };
@@ -1,51 +0,0 @@
1
- import type { Channel } from './channels';
2
- import type { FileInfo } from './files';
3
- import type { IDMappedObjects } from './utilities';
4
- type ChannelBookmarkType = 'link' | 'file';
5
- export type ChannelBookmark = {
6
- id: string;
7
- create_at: number;
8
- update_at: number;
9
- delete_at: number;
10
- channel_id: string;
11
- owner_id: string;
12
- file_id?: string;
13
- file?: FileInfo;
14
- display_name: string;
15
- sort_order: number;
16
- link_url?: string;
17
- image_url?: string;
18
- emoji?: string;
19
- type: ChannelBookmarkType;
20
- original_id?: string;
21
- parent_id?: string;
22
- };
23
- export type ChannelBookmarkCreate = {
24
- display_name: string;
25
- image_url?: string;
26
- emoji?: string;
27
- type: ChannelBookmarkType;
28
- } & ({
29
- type: 'link';
30
- link_url: string;
31
- } | {
32
- type: 'file';
33
- file_id: string;
34
- });
35
- export type ChannelBookmarkPatch = {
36
- file_id?: string;
37
- display_name?: string;
38
- sort_order?: number;
39
- link_url?: string;
40
- image_url?: string;
41
- emoji?: string;
42
- };
43
- export type ChannelBookmarkWithFileInfo = ChannelBookmark & {
44
- file: FileInfo;
45
- };
46
- export type ChannelBookmarksState = {
47
- byChannelId: {
48
- [channelId: Channel['id']]: IDMappedObjects<ChannelBookmark>;
49
- };
50
- };
51
- export {};
@@ -1,30 +0,0 @@
1
- import type { Channel } from './channels';
2
- import type { Team } from './teams';
3
- import type { UserProfile } from './users';
4
- import type { IDMappedObjects, RelationOneToOne } from './utilities';
5
- export type ChannelCategoryType = 'favorites' | 'channels' | 'direct_messages' | 'custom';
6
- export declare enum CategorySorting {
7
- Alphabetical = "alpha",
8
- Default = "",// behaves the same as manual
9
- Recency = "recent",
10
- Manual = "manual"
11
- }
12
- export type ChannelCategory = {
13
- id: string;
14
- user_id: UserProfile['id'];
15
- team_id: Team['id'];
16
- type: ChannelCategoryType;
17
- display_name: string;
18
- sorting: CategorySorting;
19
- channel_ids: Array<Channel['id']>;
20
- muted: boolean;
21
- collapsed: boolean;
22
- };
23
- export type OrderedChannelCategories = {
24
- categories: ChannelCategory[];
25
- order: string[];
26
- };
27
- export type ChannelCategoriesState = {
28
- byId: IDMappedObjects<ChannelCategory>;
29
- orderByTeam: RelationOneToOne<Team, Array<ChannelCategory['id']>>;
30
- };