@mattermost/types 9.4.0 → 9.6.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
@@ -34,6 +34,12 @@ export type LogFilter = {
34
34
  dateFrom: LogDateFrom;
35
35
  dateTo: LogDateTo;
36
36
  };
37
+ export type LogFilterQuery = {
38
+ server_names: LogServerNames;
39
+ log_levels: LogLevels;
40
+ date_from: LogDateFrom;
41
+ date_to: LogDateTo;
42
+ };
37
43
  export type AdminState = {
38
44
  logs: LogObject[];
39
45
  plainLogs: string[];
package/lib/cloud.d.ts CHANGED
@@ -45,6 +45,7 @@ export type Subscription = {
45
45
  billing_type?: string;
46
46
  cancel_at?: number;
47
47
  will_renew?: string;
48
+ simulated_current_time_ms?: number;
48
49
  };
49
50
  export type Product = {
50
51
  id: string;
@@ -158,6 +159,8 @@ export type InvoiceLineItem = {
158
159
  description: string;
159
160
  type: typeof InvoiceLineItemType[keyof typeof InvoiceLineItemType];
160
161
  metadata: Record<string, string>;
162
+ period_start: number;
163
+ period_end: number;
161
164
  };
162
165
  export type Limits = {
163
166
  messages?: {
package/lib/config.d.ts CHANGED
@@ -28,8 +28,8 @@ export type ClientConfig = {
28
28
  CWSMock: string;
29
29
  DataRetentionEnableFileDeletion: string;
30
30
  DataRetentionEnableMessageDeletion: string;
31
- DataRetentionFileRetentionDays: string;
32
- DataRetentionMessageRetentionDays: string;
31
+ DataRetentionFileRetentionHours: string;
32
+ DataRetentionMessageRetentionHours: string;
33
33
  DefaultClientLocale: string;
34
34
  DefaultTheme: string;
35
35
  DiagnosticId: string;
@@ -52,6 +52,7 @@ export type ClientConfig = {
52
52
  EnableCustomEmoji: string;
53
53
  EnableCustomGroups: string;
54
54
  EnableCustomUserStatuses: string;
55
+ EnableUserStatuses: string;
55
56
  EnableLastActiveTime: string;
56
57
  EnableTimedDND: string;
57
58
  EnableCustomTermsOfService: string;
@@ -76,6 +77,7 @@ export type ClientConfig = {
76
77
  EnableMobileFileUpload: string;
77
78
  EnableMultifactorAuthentication: string;
78
79
  EnableOAuthServiceProvider: string;
80
+ EnableOutgoingOAuthConnections: string;
79
81
  EnableOpenServer: string;
80
82
  EnableOutgoingWebhooks: string;
81
83
  EnablePostIconOverride: string;
@@ -194,6 +196,12 @@ export type ClientConfig = {
194
196
  PersistentNotificationIntervalMinutes: string;
195
197
  AllowPersistentNotificationsForGuests: string;
196
198
  DelayChannelAutocomplete: 'true' | 'false';
199
+ WranglerPermittedWranglerRoles: string;
200
+ WranglerAllowedEmailDomain: string;
201
+ WranglerMoveThreadMaxCount: string;
202
+ WranglerMoveThreadFromPrivateChannelEnable: string;
203
+ WranglerMoveThreadFromDirectMessageChannelEnable: string;
204
+ WranglerMoveThreadFromGroupMessageChannelEnable: string;
197
205
  ServiceEnvironment: string;
198
206
  UniqueEmojiReactionLimitPerPost: string;
199
207
  };
@@ -285,6 +293,7 @@ export type ServiceSettings = {
285
293
  EnableIncomingWebhooks: boolean;
286
294
  EnableOutgoingWebhooks: boolean;
287
295
  EnableCommands: boolean;
296
+ OutgoingIntegrationRequestsTimeout: number;
288
297
  EnablePostUsernameOverride: boolean;
289
298
  EnablePostIconOverride: boolean;
290
299
  EnableLinkPreviews: boolean;
@@ -369,6 +378,7 @@ export type ServiceSettings = {
369
378
  PersistentNotificationMaxRecipients: number;
370
379
  UniqueEmojiReactionLimitPerPost: number;
371
380
  RefreshPostStatsRunTime: string;
381
+ MaximumPayloadSizeBytes: number;
372
382
  };
373
383
  export type TeamSettings = {
374
384
  SiteName: string;
@@ -433,6 +443,7 @@ export type LogSettings = {
433
443
  EnableSentry: boolean;
434
444
  AdvancedLoggingConfig: string;
435
445
  AdvancedLoggingJSON: Record<string, any>;
446
+ MaxFieldSize: number;
436
447
  };
437
448
  export type ExperimentalAuditSettings = {
438
449
  FileEnabled: boolean;
@@ -465,6 +476,15 @@ export type PasswordSettings = {
465
476
  Symbol: boolean;
466
477
  EnableForgotLink: boolean;
467
478
  };
479
+ export type WranglerSettings = {
480
+ PermittedWranglerRoles: string[];
481
+ AllowedEmailDomain: string[];
482
+ MoveThreadMaxCount: number;
483
+ MoveThreadToAnotherTeamEnable: boolean;
484
+ MoveThreadFromPrivateChannelEnable: boolean;
485
+ MoveThreadFromDirectMessageChannelEnable: boolean;
486
+ MoveThreadFromGroupMessageChannelEnable: boolean;
487
+ };
468
488
  export type FileSettings = {
469
489
  EnableFileAttachments: boolean;
470
490
  EnableMobileUpload: boolean;
@@ -771,7 +791,9 @@ export type DataRetentionSettings = {
771
791
  EnableMessageDeletion: boolean;
772
792
  EnableFileDeletion: boolean;
773
793
  MessageRetentionDays: number;
794
+ MessageRetentionHours: number;
774
795
  FileRetentionDays: number;
796
+ FileRetentionHours: number;
775
797
  DeletionJobStartTime: string;
776
798
  BatchSize: number;
777
799
  EnableBoardsDeletion: boolean;
@@ -896,6 +918,7 @@ export type AdminConfig = {
896
918
  FeatureFlags: FeatureFlags;
897
919
  ImportSettings: ImportSettings;
898
920
  ExportSettings: ExportSettings;
921
+ WranglerSettings: WranglerSettings;
899
922
  };
900
923
  export type ReplicaLagSetting = {
901
924
  DataSource: string;
package/lib/general.d.ts CHANGED
@@ -1,12 +1,10 @@
1
- import { ClientConfig, ClientLicense, WarnMetricStatus } from './config';
1
+ import { ClientConfig, ClientLicense } from './config';
2
2
  export type GeneralState = {
3
3
  config: Partial<ClientConfig>;
4
- dataRetentionPolicy: any;
5
4
  firstAdminVisitMarketplaceStatus: boolean;
6
5
  firstAdminCompleteSetup: boolean;
7
6
  license: ClientLicense;
8
7
  serverVersion: string;
9
- warnMetricsStatus: Record<string, WarnMetricStatus>;
10
8
  };
11
9
  export type SystemSetting = {
12
10
  name: string;
@@ -92,10 +92,25 @@ export type OAuthApp = {
92
92
  'homepage': string;
93
93
  'is_trusted': boolean;
94
94
  };
95
+ export type OutgoingOAuthConnection = {
96
+ 'id': string;
97
+ 'name': string;
98
+ 'creator_id': string;
99
+ 'create_at': number;
100
+ 'update_at': number;
101
+ 'client_id': string;
102
+ 'client_secret'?: string;
103
+ 'credentials_username'?: string;
104
+ 'credentials_password'?: string;
105
+ 'oauth_token_url': string;
106
+ 'grant_type': 'client_credentials' | 'password';
107
+ 'audiences': string[];
108
+ };
95
109
  export type IntegrationsState = {
96
110
  incomingHooks: IDMappedObjects<IncomingWebhook>;
97
111
  outgoingHooks: IDMappedObjects<OutgoingWebhook>;
98
112
  oauthApps: IDMappedObjects<OAuthApp>;
113
+ outgoingOAuthConnections: IDMappedObjects<OutgoingOAuthConnection>;
99
114
  appsOAuthAppIDs: string[];
100
115
  appsBotIDs: string[];
101
116
  systemCommands: IDMappedObjects<Command>;
@@ -0,0 +1,7 @@
1
+ export type LimitsState = {
2
+ usersLimits: UsersLimits;
3
+ };
4
+ export type UsersLimits = {
5
+ activeUserCount: number;
6
+ maxUsersLimit: number;
7
+ };
package/lib/limits.js ADDED
@@ -0,0 +1,4 @@
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 });
package/lib/plugins.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ type MessageDescriptor = {
2
+ id: string;
3
+ defaultMessage: string;
4
+ };
1
5
  export type PluginManifest = {
2
6
  id: string;
3
7
  name: string;
@@ -38,7 +42,7 @@ export type PluginSetting = {
38
42
  key: string;
39
43
  display_name: string;
40
44
  type: string;
41
- help_text: string;
45
+ help_text: string | MessageDescriptor;
42
46
  regenerate_help_text?: string;
43
47
  placeholder: string;
44
48
  default: any;
package/lib/posts.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Reaction } from './reactions';
5
5
  import { TeamType } from './teams';
6
6
  import { UserProfile } from './users';
7
7
  import { RelationOneToOne, RelationOneToMany, IDMappedObjects } from './utilities';
8
- export type PostType = 'system_add_remove' | 'system_add_to_channel' | 'system_add_to_team' | 'system_channel_deleted' | 'system_channel_restored' | 'system_displayname_change' | 'system_convert_channel' | 'system_ephemeral' | 'system_header_change' | 'system_join_channel' | 'system_join_leave' | 'system_leave_channel' | 'system_purpose_change' | 'system_remove_from_channel' | 'system_combined_user_activity' | 'system_fake_parent_deleted' | 'system_generic' | 'reminder' | '';
8
+ export type PostType = 'system_add_remove' | 'system_add_to_channel' | 'system_add_to_team' | 'system_channel_deleted' | 'system_channel_restored' | 'system_displayname_change' | 'system_convert_channel' | 'system_ephemeral' | 'system_header_change' | 'system_join_channel' | 'system_join_leave' | 'system_leave_channel' | 'system_purpose_change' | 'system_remove_from_channel' | 'system_combined_user_activity' | 'system_fake_parent_deleted' | 'system_generic' | 'reminder' | 'system_wrangler' | '';
9
9
  export type PostEmbedType = 'image' | 'link' | 'message_attachment' | 'opengraph' | 'permalink';
10
10
  export type PostEmbed = {
11
11
  type: PostEmbedType;
@@ -106,7 +106,6 @@ export type PostsState = {
106
106
  reactions: RelationOneToOne<Post, Record<string, Reaction>>;
107
107
  openGraph: RelationOneToOne<Post, Record<string, OpenGraphMetadata>>;
108
108
  pendingPostIds: string[];
109
- selectedPostId: string;
110
109
  postEditHistory: Post[];
111
110
  currentFocusedPostId: string;
112
111
  messagesHistory: MessageHistory;
@@ -0,0 +1,65 @@
1
+ import { UserProfile } from './users';
2
+ export declare enum UserReportSortColumns {
3
+ username = "Username",
4
+ email = "Email",
5
+ createAt = "CreateAt",
6
+ firstName = "FirstName",
7
+ lastName = "LastName",
8
+ nickname = "Nickname"
9
+ }
10
+ export declare enum ReportSortDirection {
11
+ ascending = "asc",
12
+ descending = "desc"
13
+ }
14
+ export declare enum ReportDuration {
15
+ AllTime = "all_time",
16
+ Last30Days = "last_30_days",
17
+ PreviousMonth = "previous_month",
18
+ Last6Months = "last_6_months"
19
+ }
20
+ export declare enum CursorPaginationDirection {
21
+ 'prev' = "prev",
22
+ 'next' = "next"
23
+ }
24
+ export type UserReportFilter = {
25
+ role_filter?: string;
26
+ has_no_team?: boolean;
27
+ team_filter?: string;
28
+ hide_active?: boolean;
29
+ hide_inactive?: boolean;
30
+ search_term?: string;
31
+ };
32
+ export type UserReportOptions = UserReportFilter & {
33
+ page_size?: number;
34
+ /**
35
+ * The column to sort on. Provide the id of the column. Use the UserReportSortColumns enum.
36
+ */
37
+ sort_column?: UserReportSortColumns;
38
+ /**
39
+ * The sort direction to use. Either "asc" or "desc". Use the ReportSortDirection enum.
40
+ */
41
+ sort_direction?: ReportSortDirection;
42
+ /**
43
+ * The direction to paginate in. Either "up" or "down". Use the CursorPaginationDirection enum.
44
+ */
45
+ direction?: CursorPaginationDirection;
46
+ /**
47
+ * The cursor to paginate from.
48
+ */
49
+ from_column_value?: string;
50
+ /**
51
+ * The id of the user to paginate from.
52
+ */
53
+ from_id?: string;
54
+ /**
55
+ * The duration to filter by. Use the ReportDuration enum.
56
+ */
57
+ date_range?: ReportDuration;
58
+ };
59
+ export type UserReport = UserProfile & {
60
+ last_login_at: number;
61
+ last_status_at?: number;
62
+ last_post_date?: number;
63
+ days_active?: number;
64
+ total_posts?: number;
65
+ };
package/lib/reports.js ADDED
@@ -0,0 +1,31 @@
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.CursorPaginationDirection = exports.ReportDuration = exports.ReportSortDirection = exports.UserReportSortColumns = void 0;
6
+ var UserReportSortColumns;
7
+ (function (UserReportSortColumns) {
8
+ UserReportSortColumns["username"] = "Username";
9
+ UserReportSortColumns["email"] = "Email";
10
+ UserReportSortColumns["createAt"] = "CreateAt";
11
+ UserReportSortColumns["firstName"] = "FirstName";
12
+ UserReportSortColumns["lastName"] = "LastName";
13
+ UserReportSortColumns["nickname"] = "Nickname";
14
+ })(UserReportSortColumns = exports.UserReportSortColumns || (exports.UserReportSortColumns = {}));
15
+ var ReportSortDirection;
16
+ (function (ReportSortDirection) {
17
+ ReportSortDirection["ascending"] = "asc";
18
+ ReportSortDirection["descending"] = "desc";
19
+ })(ReportSortDirection = exports.ReportSortDirection || (exports.ReportSortDirection = {}));
20
+ var ReportDuration;
21
+ (function (ReportDuration) {
22
+ ReportDuration["AllTime"] = "all_time";
23
+ ReportDuration["Last30Days"] = "last_30_days";
24
+ ReportDuration["PreviousMonth"] = "previous_month";
25
+ ReportDuration["Last6Months"] = "last_6_months";
26
+ })(ReportDuration = exports.ReportDuration || (exports.ReportDuration = {}));
27
+ var CursorPaginationDirection;
28
+ (function (CursorPaginationDirection) {
29
+ CursorPaginationDirection["prev"] = "prev";
30
+ CursorPaginationDirection["next"] = "next";
31
+ })(CursorPaginationDirection = exports.CursorPaginationDirection || (exports.CursorPaginationDirection = {}));
package/lib/requests.d.ts CHANGED
@@ -8,7 +8,6 @@ export type ChannelsRequestsStatuses = {
8
8
  getAllChannels: RequestStatusType;
9
9
  myChannels: RequestStatusType;
10
10
  createChannel: RequestStatusType;
11
- updateChannel: RequestStatusType;
12
11
  };
13
12
  export type GeneralRequestsStatuses = {
14
13
  websocket: RequestStatusType;
@@ -24,7 +23,6 @@ export type ThreadsRequestStatuses = {
24
23
  export type TeamsRequestsStatuses = {
25
24
  getMyTeams: RequestStatusType;
26
25
  getTeams: RequestStatusType;
27
- joinTeam: RequestStatusType;
28
26
  };
29
27
  export type UsersRequestsStatuses = {
30
28
  login: RequestStatusType;
package/lib/search.d.ts CHANGED
@@ -11,9 +11,6 @@ export type SearchState = {
11
11
  isSearchingTerm: boolean;
12
12
  isSearchGettingMore: boolean;
13
13
  isLimitedResults: number;
14
- recent: {
15
- [x: string]: Search[];
16
- };
17
14
  matches: {
18
15
  [x: string]: string[];
19
16
  };
package/lib/store.d.ts CHANGED
@@ -21,10 +21,12 @@ import { ThreadsState } from './threads';
21
21
  import { Typing } from './typing';
22
22
  import { UsersState } from './users';
23
23
  import { AppsState } from './apps';
24
+ import { LimitsState } from './limits';
24
25
  export type GlobalState = {
25
26
  entities: {
26
27
  general: GeneralState;
27
28
  users: UsersState;
29
+ limits: LimitsState;
28
30
  teams: TeamsState;
29
31
  channels: ChannelsState;
30
32
  posts: PostsState;
package/lib/teams.d.ts CHANGED
@@ -79,13 +79,19 @@ export type TeamStats = {
79
79
  total_member_count: number;
80
80
  active_member_count: number;
81
81
  };
82
- export type TeamSearchOpts = {
83
- page?: number;
84
- per_page?: number;
82
+ export type TeamSearchOpts = PagedTeamSearchOpts | NotPagedTeamSearchOpts;
83
+ export type PagedTeamSearchOpts = {
84
+ page: number;
85
+ per_page: number;
86
+ } & NotPagedTeamSearchOpts;
87
+ export type NotPagedTeamSearchOpts = {
85
88
  allow_open_invite?: boolean;
86
89
  group_constrained?: boolean;
87
90
  };
88
91
  export type TeamInviteWithError = {
89
92
  email: string;
90
- error: ServerError;
93
+ error: {
94
+ id: string;
95
+ message: string;
96
+ };
91
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "9.4.0",
3
+ "version": "9.6.0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"