@mattermost/types 10.0.0 → 10.2.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/channels.d.ts +3 -2
- package/lib/client4.d.ts +4 -0
- package/lib/config.d.ts +24 -7
- package/lib/posts.d.ts +1 -0
- package/lib/remote_clusters.d.ts +35 -0
- package/lib/remote_clusters.js +10 -0
- package/lib/requests.d.ts +0 -1
- package/lib/shared_channels.d.ts +15 -0
- package/lib/shared_channels.js +4 -0
- package/lib/users.d.ts +2 -2
- package/lib/utilities.d.ts +1 -0
- package/package.json +1 -1
package/lib/channels.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export type ChannelStats = {
|
|
|
11
11
|
export type ChannelNotifyProps = {
|
|
12
12
|
desktop_threads: 'default' | 'all' | 'mention' | 'none';
|
|
13
13
|
desktop: 'default' | 'all' | 'mention' | 'none';
|
|
14
|
-
desktop_sound: 'on' | 'off';
|
|
15
|
-
desktop_notification_sound?: 'Bing' | 'Crackle' | 'Down' | 'Hello' | 'Ripple' | 'Upstairs';
|
|
14
|
+
desktop_sound: 'default' | 'on' | 'off';
|
|
15
|
+
desktop_notification_sound?: 'default' | 'Bing' | 'Crackle' | 'Down' | 'Hello' | 'Ripple' | 'Upstairs';
|
|
16
16
|
email: 'default' | 'all' | 'mention' | 'none';
|
|
17
17
|
mark_unread: 'all' | 'mention';
|
|
18
18
|
push: 'default' | 'all' | 'mention' | 'none';
|
|
@@ -170,6 +170,7 @@ export type ChannelSearchOpts = {
|
|
|
170
170
|
private?: boolean;
|
|
171
171
|
include_deleted?: boolean;
|
|
172
172
|
include_search_by_id?: boolean;
|
|
173
|
+
exclude_remote?: boolean;
|
|
173
174
|
deleted?: boolean;
|
|
174
175
|
page?: number;
|
|
175
176
|
per_page?: number;
|
package/lib/client4.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ export type Options = {
|
|
|
19
19
|
body?: any;
|
|
20
20
|
signal?: RequestInit['signal'];
|
|
21
21
|
ignoreStatus?: boolean; /** If true, status codes > 300 are ignored and don't cause an error */
|
|
22
|
+
duplex?: 'half'; /** Optional, but required for node clients. Must be 'half' for half-duplex fetch; 'full' is reserved for future use. See https://fetch.spec.whatwg.org/#dom-requestinit-duplex */
|
|
23
|
+
};
|
|
24
|
+
export type OptsSignalExt = {
|
|
25
|
+
signal?: AbortSignal;
|
|
22
26
|
};
|
|
23
27
|
export type StatusOK = {
|
|
24
28
|
status: 'OK';
|
package/lib/config.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type ClientConfig = {
|
|
|
8
8
|
AndroidLatestVersion: string;
|
|
9
9
|
AndroidMinVersion: string;
|
|
10
10
|
AppDownloadLink: string;
|
|
11
|
+
AppsPluginEnabled: string;
|
|
11
12
|
AsymmetricSigningPublicKey: string;
|
|
12
13
|
AvailableLocales: string;
|
|
13
14
|
BannerColor: string;
|
|
@@ -60,6 +61,7 @@ export type ClientConfig = {
|
|
|
60
61
|
EnableCustomTermsOfService: string;
|
|
61
62
|
EnableDeveloper: string;
|
|
62
63
|
EnableDiagnostics: string;
|
|
64
|
+
EnableDesktopLandingPage: 'true' | 'false';
|
|
63
65
|
EnableEmailBatching: string;
|
|
64
66
|
EnableEmailInvitations: string;
|
|
65
67
|
EnableEmojiPicker: string;
|
|
@@ -207,6 +209,7 @@ export type ClientConfig = {
|
|
|
207
209
|
ServiceEnvironment: string;
|
|
208
210
|
UniqueEmojiReactionLimitPerPost: string;
|
|
209
211
|
UsersStatusAndProfileFetchingPollIntervalMilliseconds: string;
|
|
212
|
+
YoutubeReferrerPolicy: 'true' | 'false';
|
|
210
213
|
};
|
|
211
214
|
export type License = {
|
|
212
215
|
id: string;
|
|
@@ -373,7 +376,6 @@ export type ServiceSettings = {
|
|
|
373
376
|
DebugSplit: boolean;
|
|
374
377
|
ManagedResourcePaths: string;
|
|
375
378
|
EnableCustomGroups: boolean;
|
|
376
|
-
SelfHostedPurchase: boolean;
|
|
377
379
|
AllowSyncedDrafts: boolean;
|
|
378
380
|
AllowPersistentNotifications: boolean;
|
|
379
381
|
AllowPersistentNotificationsForGuests: boolean;
|
|
@@ -383,6 +385,8 @@ export type ServiceSettings = {
|
|
|
383
385
|
UniqueEmojiReactionLimitPerPost: number;
|
|
384
386
|
RefreshPostStatsRunTime: string;
|
|
385
387
|
MaximumPayloadSizeBytes: number;
|
|
388
|
+
EnableAPIPostDeletion: boolean;
|
|
389
|
+
MaximumURLLength: number;
|
|
386
390
|
};
|
|
387
391
|
export type TeamSettings = {
|
|
388
392
|
SiteName: string;
|
|
@@ -445,7 +449,6 @@ export type LogSettings = {
|
|
|
445
449
|
EnableDiagnostics: boolean;
|
|
446
450
|
VerboseDiagnostics: boolean;
|
|
447
451
|
EnableSentry: boolean;
|
|
448
|
-
AdvancedLoggingConfig: string;
|
|
449
452
|
AdvancedLoggingJSON: Record<string, any>;
|
|
450
453
|
MaxFieldSize: number;
|
|
451
454
|
};
|
|
@@ -457,7 +460,6 @@ export type ExperimentalAuditSettings = {
|
|
|
457
460
|
FileMaxBackups: number;
|
|
458
461
|
FileCompress: boolean;
|
|
459
462
|
FileMaxQueueSize: number;
|
|
460
|
-
AdvancedLoggingConfig: string;
|
|
461
463
|
AdvancedLoggingJSON: Record<string, any>;
|
|
462
464
|
};
|
|
463
465
|
export type NotificationLogSettings = {
|
|
@@ -469,7 +471,6 @@ export type NotificationLogSettings = {
|
|
|
469
471
|
FileLevel: string;
|
|
470
472
|
FileJson: boolean;
|
|
471
473
|
FileLocation: string;
|
|
472
|
-
AdvancedLoggingConfig: string;
|
|
473
474
|
AdvancedLoggingJSON: Record<string, any>;
|
|
474
475
|
};
|
|
475
476
|
export type PasswordSettings = {
|
|
@@ -489,6 +490,12 @@ export type WranglerSettings = {
|
|
|
489
490
|
MoveThreadFromDirectMessageChannelEnable: boolean;
|
|
490
491
|
MoveThreadFromGroupMessageChannelEnable: boolean;
|
|
491
492
|
};
|
|
493
|
+
export type ConnectedWorkspacesSettings = {
|
|
494
|
+
EnableSharedChannels: boolean;
|
|
495
|
+
EnableRemoteClusterService: boolean;
|
|
496
|
+
DisableSharedChannelsStatusSync: boolean;
|
|
497
|
+
MaxPostsPerSync: number;
|
|
498
|
+
};
|
|
492
499
|
export type FileSettings = {
|
|
493
500
|
EnableFileAttachments: boolean;
|
|
494
501
|
EnableMobileUpload: boolean;
|
|
@@ -667,7 +674,6 @@ export type LdapSettings = {
|
|
|
667
674
|
LoginButtonColor: string;
|
|
668
675
|
LoginButtonBorderColor: string;
|
|
669
676
|
LoginButtonTextColor: string;
|
|
670
|
-
Trace: boolean;
|
|
671
677
|
};
|
|
672
678
|
export type ComplianceSettings = {
|
|
673
679
|
Enable: boolean;
|
|
@@ -739,6 +745,8 @@ export type MetricsSettings = {
|
|
|
739
745
|
Enable: boolean;
|
|
740
746
|
BlockProfileRate: number;
|
|
741
747
|
ListenAddress: string;
|
|
748
|
+
EnableClientMetrics: boolean;
|
|
749
|
+
EnableNotificationMetrics: boolean;
|
|
742
750
|
};
|
|
743
751
|
export type ExperimentalSettings = {
|
|
744
752
|
ClientSideCertEnable: boolean;
|
|
@@ -750,10 +758,19 @@ export type ExperimentalSettings = {
|
|
|
750
758
|
DisableAppBar: boolean;
|
|
751
759
|
DisableRefetchingOnBrowserFocus: boolean;
|
|
752
760
|
DelayChannelAutocomplete: boolean;
|
|
761
|
+
DisableWakeUpReconnectHandler: boolean;
|
|
762
|
+
UsersStatusAndProfileFetchingPollIntervalMilliseconds: number;
|
|
763
|
+
YoutubeReferrerPolicy: boolean;
|
|
753
764
|
};
|
|
754
765
|
export type AnalyticsSettings = {
|
|
755
766
|
MaxUsersForStatistics: number;
|
|
756
767
|
};
|
|
768
|
+
export type CacheSettings = {
|
|
769
|
+
CacheType: string;
|
|
770
|
+
RedisAddress: string;
|
|
771
|
+
RedisPassword: string;
|
|
772
|
+
RedisDB: number;
|
|
773
|
+
};
|
|
757
774
|
export type ElasticsearchSettings = {
|
|
758
775
|
ConnectionURL: string;
|
|
759
776
|
Backend: string;
|
|
@@ -826,7 +843,6 @@ export type JobSettings = {
|
|
|
826
843
|
CleanupJobsThresholdDays: number;
|
|
827
844
|
CleanupConfigThresholdDays: number;
|
|
828
845
|
};
|
|
829
|
-
export type ProductSettings = Record<string, never>;
|
|
830
846
|
export type PluginSettings = {
|
|
831
847
|
Enable: boolean;
|
|
832
848
|
EnableUploads: boolean;
|
|
@@ -907,12 +923,12 @@ export type AdminConfig = {
|
|
|
907
923
|
MetricsSettings: MetricsSettings;
|
|
908
924
|
ExperimentalSettings: ExperimentalSettings;
|
|
909
925
|
AnalyticsSettings: AnalyticsSettings;
|
|
926
|
+
CacheSettings: CacheSettings;
|
|
910
927
|
ElasticsearchSettings: ElasticsearchSettings;
|
|
911
928
|
BleveSettings: BleveSettings;
|
|
912
929
|
DataRetentionSettings: DataRetentionSettings;
|
|
913
930
|
MessageExportSettings: MessageExportSettings;
|
|
914
931
|
JobSettings: JobSettings;
|
|
915
|
-
ProductSettings: ProductSettings;
|
|
916
932
|
PluginSettings: PluginSettings;
|
|
917
933
|
DisplaySettings: DisplaySettings;
|
|
918
934
|
GuestAccountsSettings: GuestAccountsSettings;
|
|
@@ -922,6 +938,7 @@ export type AdminConfig = {
|
|
|
922
938
|
ImportSettings: ImportSettings;
|
|
923
939
|
ExportSettings: ExportSettings;
|
|
924
940
|
WranglerSettings: WranglerSettings;
|
|
941
|
+
ConnectedWorkspacesSettings: ConnectedWorkspacesSettings;
|
|
925
942
|
};
|
|
926
943
|
export type ReplicaLagSetting = {
|
|
927
944
|
DataSource: string;
|
package/lib/posts.d.ts
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type RemoteClusterInvite = {
|
|
2
|
+
remote_id: string;
|
|
3
|
+
remote_team_id: string;
|
|
4
|
+
site_url: string;
|
|
5
|
+
token: string;
|
|
6
|
+
};
|
|
7
|
+
export type RemoteClusterAcceptInvite = {
|
|
8
|
+
name: string;
|
|
9
|
+
display_name: string;
|
|
10
|
+
default_team_id: string;
|
|
11
|
+
invite: string;
|
|
12
|
+
password: string;
|
|
13
|
+
};
|
|
14
|
+
export type RemoteClusterPatch = Pick<RemoteCluster, 'display_name' | 'default_team_id'>;
|
|
15
|
+
export declare function isRemoteClusterPatch(x: Partial<RemoteClusterPatch>): x is RemoteClusterPatch;
|
|
16
|
+
export type RemoteCluster = {
|
|
17
|
+
remote_id: string;
|
|
18
|
+
remote_team_id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
display_name: string;
|
|
21
|
+
site_url: string;
|
|
22
|
+
create_at: number;
|
|
23
|
+
delete_at: number;
|
|
24
|
+
last_ping_at: number;
|
|
25
|
+
token?: string;
|
|
26
|
+
remote_token?: string;
|
|
27
|
+
topics: string;
|
|
28
|
+
creator_id: string;
|
|
29
|
+
plugin_id: string;
|
|
30
|
+
options: number;
|
|
31
|
+
default_team_id: string;
|
|
32
|
+
};
|
|
33
|
+
export type RemoteClusterWithPassword = RemoteCluster & {
|
|
34
|
+
password: string;
|
|
35
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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.isRemoteClusterPatch = void 0;
|
|
6
|
+
function isRemoteClusterPatch(x) {
|
|
7
|
+
return ((x.display_name !== undefined && x.display_name !== '') ||
|
|
8
|
+
x.default_team_id !== undefined);
|
|
9
|
+
}
|
|
10
|
+
exports.isRemoteClusterPatch = isRemoteClusterPatch;
|
package/lib/requests.d.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type SharedChannelRemote = {
|
|
2
|
+
id: string;
|
|
3
|
+
channel_id: string;
|
|
4
|
+
creator_id: string;
|
|
5
|
+
create_at: number;
|
|
6
|
+
update_at: number;
|
|
7
|
+
delete_at: number;
|
|
8
|
+
is_invite_accepted: boolean;
|
|
9
|
+
is_invite_confirmed: boolean;
|
|
10
|
+
remote_id: string;
|
|
11
|
+
last_post_update_at: number;
|
|
12
|
+
last_post_id: string;
|
|
13
|
+
last_post_create_at: number;
|
|
14
|
+
last_post_create_id: string;
|
|
15
|
+
};
|
package/lib/users.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { Team } from './teams';
|
|
|
6
6
|
import type { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
|
|
7
7
|
export type UserNotifyProps = {
|
|
8
8
|
desktop: 'default' | 'all' | 'mention' | 'none';
|
|
9
|
-
desktop_sound: 'true' | 'false';
|
|
9
|
+
desktop_sound: 'default' | 'true' | 'false';
|
|
10
10
|
calls_desktop_sound: 'true' | 'false';
|
|
11
11
|
email: 'true' | 'false';
|
|
12
12
|
mark_unread: 'all' | 'mention';
|
|
@@ -17,7 +17,7 @@ export type UserNotifyProps = {
|
|
|
17
17
|
channel: 'true' | 'false';
|
|
18
18
|
mention_keys: string;
|
|
19
19
|
highlight_keys: string;
|
|
20
|
-
desktop_notification_sound?: 'Bing' | 'Crackle' | 'Down' | 'Hello' | 'Ripple' | 'Upstairs';
|
|
20
|
+
desktop_notification_sound?: 'default' | 'Bing' | 'Crackle' | 'Down' | 'Hello' | 'Ripple' | 'Upstairs';
|
|
21
21
|
calls_notification_sound?: 'Dynamic' | 'Calm' | 'Urgent' | 'Cheerful';
|
|
22
22
|
desktop_threads?: 'default' | 'all' | 'mention' | 'none';
|
|
23
23
|
email_threads?: 'default' | 'all' | 'mention' | 'none';
|
package/lib/utilities.d.ts
CHANGED
|
@@ -31,3 +31,4 @@ export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<
|
|
|
31
31
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
32
32
|
}[Keys];
|
|
33
33
|
export type Intersection<T1, T2> = Omit<Omit<T1 & T2, keyof (Omit<T1, keyof (T2)>)>, keyof (Omit<T2, keyof (T1)>)>;
|
|
34
|
+
export type PartialExcept<T extends Record<string, unknown>, TKeysNotPartial extends keyof T> = Partial<T> & Pick<T, TKeysNotPartial>;
|