@mattermost/types 6.7.0-0 → 7.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.
package/lib/admin.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Audit } from './audits';
2
3
  import { Compliance } from './compliance';
3
4
  import { AdminConfig, ClientLicense, EnvironmentConfig } from './config';
@@ -8,10 +9,6 @@ import { SamlCertificateStatus, SamlMetadataResponse } from './saml';
8
9
  import { Team } from './teams';
9
10
  import { UserAccessToken, UserProfile } from './users';
10
11
  import { RelationOneToOne } from './utilities';
11
- export declare type ConsoleAccess = {
12
- read: Record<string, boolean>;
13
- write: Record<string, boolean>;
14
- };
15
12
  export declare type AdminState = {
16
13
  logs: string[];
17
14
  audits: Record<string, Audit>;
@@ -44,6 +41,15 @@ export declare type AnalyticsRow = {
44
41
  name: string;
45
42
  value: number;
46
43
  };
44
+ export declare type IndexedPluginAnalyticsRow = {
45
+ [key: string]: PluginAnalyticsRow;
46
+ };
47
+ export declare type PluginAnalyticsRow = {
48
+ id: string;
49
+ name: React.ReactNode;
50
+ icon: string;
51
+ value: number;
52
+ };
47
53
  export declare type SchemaMigration = {
48
54
  version: number;
49
55
  name: string;
package/lib/client4.d.ts CHANGED
@@ -9,23 +9,6 @@ export declare type ClientResponse<T> = {
9
9
  headers: Map<string, string>;
10
10
  data: T;
11
11
  };
12
- declare type ErrorOffline = {
13
- message: string;
14
- url: string;
15
- };
16
- declare type ErrorInvalidResponse = {
17
- intl: {
18
- id: string;
19
- defaultMessage: string;
20
- };
21
- };
22
- export declare type ErrorApi = {
23
- message: string;
24
- server_error_id: string;
25
- status_code: number;
26
- url: string;
27
- };
28
- export declare type Client4Error = ErrorOffline | ErrorInvalidResponse | ErrorApi;
29
12
  export declare type Options = {
30
13
  headers?: {
31
14
  [x: string]: string;
@@ -38,4 +21,3 @@ export declare type Options = {
38
21
  export declare type StatusOK = {
39
22
  status: 'OK';
40
23
  };
41
- export {};
package/lib/cloud.d.ts CHANGED
@@ -3,6 +3,10 @@ export declare type CloudState = {
3
3
  products?: Record<string, Product>;
4
4
  customer?: CloudCustomer;
5
5
  invoices?: Record<string, Invoice>;
6
+ limits: {
7
+ limitsLoaded: boolean;
8
+ limits: Limits;
9
+ };
6
10
  };
7
11
  export declare type Subscription = {
8
12
  id: string;
@@ -100,3 +104,21 @@ export declare type InvoiceLineItem = {
100
104
  type: typeof InvoiceLineItemType[keyof typeof InvoiceLineItemType];
101
105
  metadata: Record<string, string>;
102
106
  };
107
+ export declare type Limits = {
108
+ integrations?: {
109
+ enabled?: number;
110
+ };
111
+ messages?: {
112
+ history?: number;
113
+ };
114
+ files?: {
115
+ total_storage?: number;
116
+ };
117
+ teams?: {
118
+ active?: number;
119
+ };
120
+ boards?: {
121
+ cards?: number;
122
+ views?: number;
123
+ };
124
+ };
package/lib/config.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { ThemeKey } from './themes';
2
1
  export declare type ClientConfig = {
3
2
  AboutLink: string;
4
3
  AllowBannerDismissal: string;
@@ -30,7 +29,7 @@ export declare type ClientConfig = {
30
29
  DataRetentionFileRetentionDays: string;
31
30
  DataRetentionMessageRetentionDays: string;
32
31
  DefaultClientLocale: string;
33
- DefaultTheme: ThemeKey;
32
+ DefaultTheme: string;
34
33
  DiagnosticId: string;
35
34
  DiagnosticsEnabled: string;
36
35
  EmailLoginButtonBorderColor: string;
@@ -180,6 +179,7 @@ export declare type ClientConfig = {
180
179
  WebsocketSecurePort: string;
181
180
  WebsocketURL: string;
182
181
  ExperimentalSharedChannels: string;
182
+ EnableAppBar: string;
183
183
  };
184
184
  export declare type License = {
185
185
  id: string;
@@ -225,6 +225,11 @@ export declare type LicenseFeatures = {
225
225
  future_features?: boolean;
226
226
  };
227
227
  export declare type ClientLicense = Record<string, string>;
228
+ export declare type RequestLicenseBody = {
229
+ users: number;
230
+ terms_accepted: boolean;
231
+ receive_emails_accepted: boolean;
232
+ };
228
233
  export declare type DataRetentionPolicy = {
229
234
  message_deletion_enabled: boolean;
230
235
  file_deletion_enabled: boolean;
@@ -276,8 +281,11 @@ export declare type ServiceSettings = {
276
281
  AllowCookiesForSubdomains: boolean;
277
282
  ExtendSessionLengthWithActivity: boolean;
278
283
  SessionLengthWebInDays: number;
284
+ SessionLengthWebInHours: number;
279
285
  SessionLengthMobileInDays: number;
286
+ SessionLengthMobileInHours: number;
280
287
  SessionLengthSSOInDays: number;
288
+ SessionLengthSSOInHours: number;
281
289
  SessionCacheInMinutes: number;
282
290
  SessionIdleTimeoutInMinutes: number;
283
291
  WebsocketSecurePort: number;
@@ -313,7 +321,7 @@ export declare type ServiceSettings = {
313
321
  EnableLatex: boolean;
314
322
  EnableLocalMode: boolean;
315
323
  LocalModeSocketLocation: string;
316
- CollapsedThreads: 'disabled' | 'default_on' | 'default_off';
324
+ CollapsedThreads: CollapsedThreads;
317
325
  ThreadAutoFollow: boolean;
318
326
  };
319
327
  export declare type TeamSettings = {
@@ -777,5 +785,6 @@ export declare type WarnMetricStatus = {
777
785
  export declare enum CollapsedThreads {
778
786
  DISABLED = "disabled",
779
787
  DEFAULT_ON = "default_on",
780
- DEFAULT_OFF = "default_off"
788
+ DEFAULT_OFF = "default_off",
789
+ ALWAYS_ON = "always_on"
781
790
  }
package/lib/config.js CHANGED
@@ -8,4 +8,5 @@ var CollapsedThreads;
8
8
  CollapsedThreads["DISABLED"] = "disabled";
9
9
  CollapsedThreads["DEFAULT_ON"] = "default_on";
10
10
  CollapsedThreads["DEFAULT_OFF"] = "default_off";
11
+ CollapsedThreads["ALWAYS_ON"] = "always_on";
11
12
  })(CollapsedThreads = exports.CollapsedThreads || (exports.CollapsedThreads = {}));
package/lib/files.d.ts CHANGED
@@ -13,6 +13,7 @@ export declare type FileInfo = {
13
13
  has_preview_image: boolean;
14
14
  clientId: string;
15
15
  post_id?: string;
16
+ mini_preview?: string;
16
17
  };
17
18
  export declare type FilesState = {
18
19
  files: Record<string, FileInfo>;
package/lib/general.d.ts CHANGED
@@ -15,12 +15,3 @@ export declare type SystemSetting = {
15
15
  name: string;
16
16
  value: string;
17
17
  };
18
- export declare enum LicenseSkus {
19
- E10 = "E10",
20
- E20 = "E20",
21
- Starter = "starter",
22
- Professional = "professional",
23
- Enterprise = "enterprise"
24
- }
25
- export declare const isEnterpriseLicense: (license?: ClientLicense | undefined) => boolean;
26
- export declare const isNonEnterpriseLicense: (license?: ClientLicense | undefined) => boolean;
package/lib/general.js CHANGED
@@ -2,23 +2,3 @@
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.isNonEnterpriseLicense = exports.isEnterpriseLicense = exports.LicenseSkus = void 0;
6
- var LicenseSkus;
7
- (function (LicenseSkus) {
8
- LicenseSkus["E10"] = "E10";
9
- LicenseSkus["E20"] = "E20";
10
- LicenseSkus["Starter"] = "starter";
11
- LicenseSkus["Professional"] = "professional";
12
- LicenseSkus["Enterprise"] = "enterprise";
13
- })(LicenseSkus = exports.LicenseSkus || (exports.LicenseSkus = {}));
14
- const isEnterpriseLicense = (license) => {
15
- switch (license === null || license === void 0 ? void 0 : license.SkuShortName) {
16
- case LicenseSkus.Enterprise:
17
- case LicenseSkus.E20:
18
- return true;
19
- }
20
- return false;
21
- };
22
- exports.isEnterpriseLicense = isEnterpriseLicense;
23
- const isNonEnterpriseLicense = (license) => !exports.isEnterpriseLicense(license);
24
- exports.isNonEnterpriseLicense = isNonEnterpriseLicense;
@@ -0,0 +1,29 @@
1
+ export declare enum InsightsWidgetTypes {
2
+ TOP_CHANNELS = "TOP_CHANNELS",
3
+ TOP_REACTIONS = "TOP_REACTIONS"
4
+ }
5
+ export declare enum CardSizes {
6
+ large = "lg",
7
+ medium = "md",
8
+ small = "sm"
9
+ }
10
+ export declare type CardSize = CardSizes;
11
+ export declare enum TimeFrames {
12
+ INSIGHTS_1_DAY = "today",
13
+ INSIGHTS_7_DAYS = "7_day",
14
+ INSIGHTS_28_DAYS = "28_day"
15
+ }
16
+ export declare type TimeFrame = TimeFrames;
17
+ export declare type TopReaction = {
18
+ emoji_name: string;
19
+ count: number;
20
+ };
21
+ export declare type TopReactionResponse = {
22
+ has_next: boolean;
23
+ items: TopReaction[];
24
+ timeFrame?: TimeFrame;
25
+ };
26
+ export declare type InsightsState = {
27
+ topReactions: Record<string, Record<TimeFrame, Record<string, TopReaction>>>;
28
+ myTopReactions: Record<string, Record<TimeFrame, Record<string, TopReaction>>>;
29
+ };
@@ -0,0 +1,22 @@
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
+ exports.TimeFrames = exports.CardSizes = exports.InsightsWidgetTypes = void 0;
6
+ var InsightsWidgetTypes;
7
+ (function (InsightsWidgetTypes) {
8
+ InsightsWidgetTypes["TOP_CHANNELS"] = "TOP_CHANNELS";
9
+ InsightsWidgetTypes["TOP_REACTIONS"] = "TOP_REACTIONS";
10
+ })(InsightsWidgetTypes = exports.InsightsWidgetTypes || (exports.InsightsWidgetTypes = {}));
11
+ var CardSizes;
12
+ (function (CardSizes) {
13
+ CardSizes["large"] = "lg";
14
+ CardSizes["medium"] = "md";
15
+ CardSizes["small"] = "sm";
16
+ })(CardSizes = exports.CardSizes || (exports.CardSizes = {}));
17
+ var TimeFrames;
18
+ (function (TimeFrames) {
19
+ TimeFrames["INSIGHTS_1_DAY"] = "today";
20
+ TimeFrames["INSIGHTS_7_DAYS"] = "7_day";
21
+ TimeFrames["INSIGHTS_28_DAYS"] = "28_day";
22
+ })(TimeFrames = exports.TimeFrames || (exports.TimeFrames = {}));
@@ -100,21 +100,6 @@ export declare type IntegrationsState = {
100
100
  systemCommands: IDMappedObjects<Command>;
101
101
  commands: IDMappedObjects<Command>;
102
102
  };
103
- export declare type InteractiveDialogConfig = {
104
- app_id: string;
105
- trigger_id: string;
106
- url: string;
107
- dialog: {
108
- callback_id: string;
109
- title: string;
110
- introduction_text: string;
111
- icon_url?: string;
112
- elements: DialogElement[];
113
- submit_label: string;
114
- notify_on_cancel: boolean;
115
- state: string;
116
- };
117
- };
118
103
  export declare type DialogSubmission = {
119
104
  url: string;
120
105
  callback_id: string;
package/lib/jobs.js CHANGED
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
+ // See LICENSE.txt for license information.
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
package/lib/plugins.d.ts CHANGED
@@ -8,6 +8,7 @@ declare type Plugin = {
8
8
  icon_path?: string;
9
9
  version: string;
10
10
  min_server_version?: string;
11
+ translate?: boolean;
11
12
  server?: PluginManifestServer;
12
13
  backend?: PluginManifestServer;
13
14
  webapp?: PluginManifestWebapp;
package/lib/posts.d.ts CHANGED
@@ -52,10 +52,6 @@ export declare type Post = {
52
52
  is_following?: boolean;
53
53
  exists?: boolean;
54
54
  };
55
- export declare type UserActivityPost = Post & {
56
- system_post_ids: string[];
57
- user_activity_posts: Post[];
58
- };
59
55
  export declare type PostList = {
60
56
  order: Array<Post['id']>;
61
57
  posts: Map<string, Post>;
@@ -65,16 +61,6 @@ export declare type PostList = {
65
61
  export declare type PostSearchResults = PostList & {
66
62
  matches: RelationOneToOne<Post, string[]>;
67
63
  };
68
- export declare type PostWithFormatData = Post & {
69
- isFirstReply: boolean;
70
- isLastReply: boolean;
71
- previousPostIsComment: boolean;
72
- commentedOnPost?: Post;
73
- consecutivePostByUser: boolean;
74
- replyCount: number;
75
- isCommentMention: boolean;
76
- highlight: boolean;
77
- };
78
64
  export declare type PostOrderBlock = {
79
65
  order: string[];
80
66
  recent?: boolean;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Action = void 0;
4
2
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
5
3
  // See LICENSE.txt for license information.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Action = void 0;
6
6
  var Action;
7
7
  (function (Action) {
8
8
  Action["URL"] = "url";
package/lib/reactions.js CHANGED
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
+ // See LICENSE.txt for license information.
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
package/lib/roles.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export declare type ChannelModerationRoles = 'members' | 'guests';
2
1
  export declare type Role = {
3
2
  id: string;
4
3
  name: string;
package/lib/roles.js CHANGED
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
+ // See LICENSE.txt for license information.
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
package/lib/schemes.js CHANGED
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
+ // See LICENSE.txt for license information.
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
package/lib/store.d.ts CHANGED
@@ -20,6 +20,7 @@ import { ThreadsState } from './threads';
20
20
  import { Typing } from './typing';
21
21
  import { UsersState } from './users';
22
22
  import { AppsState } from './apps';
23
+ import { InsightsState } from './insights';
23
24
  export declare type GlobalState = {
24
25
  entities: {
25
26
  general: GeneralState;
@@ -55,6 +56,7 @@ export declare type GlobalState = {
55
56
  channelCategories: ChannelCategoriesState;
56
57
  apps: AppsState;
57
58
  cloud: CloudState;
59
+ insights: InsightsState;
58
60
  };
59
61
  errors: any[];
60
62
  requests: {
package/lib/typing.js CHANGED
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
+ // See LICENSE.txt for license information.
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
package/lib/users.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Audit } from './audits';
2
2
  import { Channel } from './channels';
3
3
  import { Group } from './groups';
4
- import { PostType } from './posts';
5
4
  import { Session } from './sessions';
6
5
  import { Team } from './teams';
7
6
  import { IDMappedObjects, RelationOneToMany, RelationOneToManyUnique, RelationOneToOne } from './utilities';
@@ -78,14 +77,6 @@ export declare type UserTimezone = {
78
77
  automaticTimezone: string;
79
78
  manualTimezone: string;
80
79
  };
81
- export declare type UserActivity = {
82
- [postType in PostType]: {
83
- [userId in UserProfile['id']]: {
84
- ids: Array<UserProfile['id']>;
85
- usernames: Array<UserProfile['username']>;
86
- } | Array<UserProfile['id']>;
87
- };
88
- };
89
80
  export declare type UserStatus = {
90
81
  user_id: string;
91
82
  status: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "6.7.0-0",
3
+ "version": "7.0.0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"
package/lib/themes.d.ts DELETED
@@ -1,34 +0,0 @@
1
- export declare type LegacyThemeKey = 'default' | 'organization' | 'mattermostDark' | 'windows10';
2
- export declare type ThemeKey = 'denim' | 'sapphire' | 'quartz' | 'indigo' | 'onyx';
3
- export declare type LegacyThemeType = 'Mattermost' | 'Organization' | 'Mattermost Dark' | 'Windows Dark';
4
- export declare type ThemeType = 'Denim' | 'Sapphire' | 'Quartz' | 'Indigo' | 'Onyx';
5
- export declare type Theme = {
6
- [key: string]: string | undefined;
7
- type?: ThemeType | 'custom';
8
- sidebarBg: string;
9
- sidebarText: string;
10
- sidebarUnreadText: string;
11
- sidebarTextHoverBg: string;
12
- sidebarTextActiveBorder: string;
13
- sidebarTextActiveColor: string;
14
- sidebarHeaderBg: string;
15
- sidebarTeamBarBg: string;
16
- sidebarHeaderTextColor: string;
17
- onlineIndicator: string;
18
- awayIndicator: string;
19
- dndIndicator: string;
20
- mentionBg: string;
21
- mentionBj: string;
22
- mentionColor: string;
23
- centerChannelBg: string;
24
- centerChannelColor: string;
25
- newMessageSeparator: string;
26
- linkColor: string;
27
- buttonBg: string;
28
- buttonColor: string;
29
- errorTextColor: string;
30
- mentionHighlightBg: string;
31
- mentionHighlightLink: string;
32
- codeTheme: string;
33
- };
34
- export declare type ThemeTypeMap = Record<ThemeType | LegacyThemeType, ThemeKey>;
package/lib/themes.js DELETED
@@ -1,4 +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 });
@@ -1,17 +0,0 @@
1
- export declare type WebSocketBroadcast = {
2
- omit_users: Record<string, boolean>;
3
- user_id: string;
4
- channel_id: string;
5
- team_id: string;
6
- };
7
- export declare type WebSocketMessage<T> = {
8
- event: string;
9
- data: T;
10
- broadcast: WebSocketBroadcast;
11
- seq: number;
12
- };
13
- export declare type WebsocketStatus = {
14
- connected: boolean;
15
- lastConnectAt: number;
16
- lastDisconnectAt: number;
17
- };
package/lib/websocket.js DELETED
@@ -1,4 +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 });