@mattermost/types 10.11.0 → 11.0.4
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/access_control.d.ts +1 -0
- package/lib/apps.d.ts +2 -1
- package/lib/apps.js +6 -0
- package/lib/cloud.d.ts +13 -0
- package/lib/config.d.ts +10 -29
- package/lib/content_flagging.d.ts +4 -0
- package/lib/integration_actions.d.ts +2 -2
- package/lib/integration_actions.js +2 -8
- package/lib/integrations.d.ts +3 -1
- package/lib/limits.d.ts +3 -0
- package/lib/message_attachments.d.ts +2 -2
- package/lib/posts.d.ts +1 -1
- package/lib/properties.d.ts +9 -0
- package/lib/search.d.ts +4 -0
- package/lib/store.d.ts +4 -0
- package/lib/teams.d.ts +1 -0
- package/lib/users.d.ts +1 -0
- package/package.json +1 -1
package/lib/access_control.d.ts
CHANGED
package/lib/apps.d.ts
CHANGED
|
@@ -123,6 +123,7 @@ export type AppForm = {
|
|
|
123
123
|
header?: string;
|
|
124
124
|
footer?: string;
|
|
125
125
|
icon?: string;
|
|
126
|
+
submit_label?: string;
|
|
126
127
|
submit_buttons?: string;
|
|
127
128
|
cancel_button?: boolean;
|
|
128
129
|
submit_on_cancel?: boolean;
|
|
@@ -131,7 +132,7 @@ export type AppForm = {
|
|
|
131
132
|
submit?: AppCall;
|
|
132
133
|
depends_on?: string[];
|
|
133
134
|
};
|
|
134
|
-
export type AppFormValue = string | AppSelectOption | boolean | null;
|
|
135
|
+
export type AppFormValue = string | AppSelectOption | AppSelectOption[] | boolean | null;
|
|
135
136
|
export type AppFormValues = {
|
|
136
137
|
[name: string]: AppFormValue;
|
|
137
138
|
};
|
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) {
|
package/lib/cloud.d.ts
CHANGED
|
@@ -172,3 +172,16 @@ export type Feedback = {
|
|
|
172
172
|
reason: string;
|
|
173
173
|
comments: string;
|
|
174
174
|
};
|
|
175
|
+
export type MessageDescriptor = {
|
|
176
|
+
id: string;
|
|
177
|
+
defaultMessage: string;
|
|
178
|
+
values?: Record<string, any>;
|
|
179
|
+
};
|
|
180
|
+
export type PreviewModalContentData = {
|
|
181
|
+
skuLabel: MessageDescriptor;
|
|
182
|
+
title: MessageDescriptor;
|
|
183
|
+
subtitle: MessageDescriptor;
|
|
184
|
+
videoUrl: string;
|
|
185
|
+
videoPoster?: string;
|
|
186
|
+
useCase: string;
|
|
187
|
+
};
|
package/lib/config.d.ts
CHANGED
|
@@ -111,21 +111,20 @@ export type ClientConfig = {
|
|
|
111
111
|
EnableUserTypingMessages: string;
|
|
112
112
|
EnforceMultifactorAuthentication: string;
|
|
113
113
|
ExperimentalChannelCategorySorting: string;
|
|
114
|
-
ExperimentalClientSideCertCheck: string;
|
|
115
|
-
ExperimentalClientSideCertEnable: string;
|
|
116
114
|
ExperimentalEnableAuthenticationTransfer: string;
|
|
117
115
|
ExperimentalEnableAutomaticReplies: string;
|
|
118
116
|
ExperimentalEnableDefaultChannelLeaveJoinMessages: string;
|
|
119
117
|
ExperimentalEnablePostMetadata: string;
|
|
120
118
|
ExperimentalGroupUnreadChannels: string;
|
|
121
119
|
ExperimentalPrimaryTeam: string;
|
|
122
|
-
ExperimentalViewArchivedChannels: string;
|
|
123
120
|
FileLevel: string;
|
|
124
121
|
FeatureFlagAppsEnabled: string;
|
|
125
122
|
FeatureFlagCallsEnabled: string;
|
|
126
123
|
FeatureFlagCustomProfileAttributes: string;
|
|
127
124
|
FeatureFlagAttributeBasedAccessControl: string;
|
|
128
125
|
FeatureFlagWebSocketEventScope: string;
|
|
126
|
+
FeatureFlagInteractiveDialogAppsForm: string;
|
|
127
|
+
FeatureFlagContentFlagging: string;
|
|
129
128
|
ForgotPasswordLink: string;
|
|
130
129
|
GiphySdkKey: string;
|
|
131
130
|
GoogleDeveloperKey: string;
|
|
@@ -221,6 +220,10 @@ export type ClientConfig = {
|
|
|
221
220
|
YoutubeReferrerPolicy: 'true' | 'false';
|
|
222
221
|
ScheduledPosts: string;
|
|
223
222
|
DeleteAccountLink: string;
|
|
223
|
+
ContentFlaggingEnabled: 'true' | 'false';
|
|
224
|
+
EnableAttributeBasedAccessControl: string;
|
|
225
|
+
EnableChannelScopeAccessControl: string;
|
|
226
|
+
EnableUserManagedAttributes: string;
|
|
224
227
|
};
|
|
225
228
|
export type License = {
|
|
226
229
|
id: string;
|
|
@@ -421,7 +424,6 @@ export type TeamSettings = {
|
|
|
421
424
|
MaxNotificationsPerChannel: number;
|
|
422
425
|
EnableConfirmNotificationsToChannel: boolean;
|
|
423
426
|
TeammateNameDisplay: string;
|
|
424
|
-
ExperimentalViewArchivedChannels: boolean;
|
|
425
427
|
ExperimentalEnableAutomaticReplies: boolean;
|
|
426
428
|
LockTeammateNameDisplay: boolean;
|
|
427
429
|
ExperimentalPrimaryTeam: string;
|
|
@@ -463,7 +465,6 @@ export type LogSettings = {
|
|
|
463
465
|
FileLocation: string;
|
|
464
466
|
EnableWebhookDebugging: boolean;
|
|
465
467
|
EnableDiagnostics: boolean;
|
|
466
|
-
VerboseDiagnostics: boolean;
|
|
467
468
|
EnableSentry: boolean;
|
|
468
469
|
AdvancedLoggingJSON: Record<string, any>;
|
|
469
470
|
MaxFieldSize: number;
|
|
@@ -479,17 +480,6 @@ export type ExperimentalAuditSettings = {
|
|
|
479
480
|
AdvancedLoggingJSON: Record<string, any>;
|
|
480
481
|
Certificate: string;
|
|
481
482
|
};
|
|
482
|
-
export type NotificationLogSettings = {
|
|
483
|
-
EnableConsole: boolean;
|
|
484
|
-
ConsoleLevel: string;
|
|
485
|
-
ConsoleJson: boolean;
|
|
486
|
-
EnableColor: boolean;
|
|
487
|
-
EnableFile: boolean;
|
|
488
|
-
FileLevel: string;
|
|
489
|
-
FileJson: boolean;
|
|
490
|
-
FileLocation: string;
|
|
491
|
-
AdvancedLoggingJSON: Record<string, any>;
|
|
492
|
-
};
|
|
493
483
|
export type PasswordSettings = {
|
|
494
484
|
MinimumLength: number;
|
|
495
485
|
Lowercase: boolean;
|
|
@@ -784,8 +774,6 @@ export type MetricsSettings = {
|
|
|
784
774
|
ClientSideUserIds: string[];
|
|
785
775
|
};
|
|
786
776
|
export type ExperimentalSettings = {
|
|
787
|
-
ClientSideCertEnable: boolean;
|
|
788
|
-
ClientSideCertCheck: string;
|
|
789
777
|
LinkMetadataTimeoutMilliseconds: number;
|
|
790
778
|
RestrictSystemAdmin: boolean;
|
|
791
779
|
EnableSharedChannels: boolean;
|
|
@@ -838,13 +826,6 @@ export type ElasticsearchSettings = {
|
|
|
838
826
|
Trace: string;
|
|
839
827
|
IgnoredPurgeIndexes: string;
|
|
840
828
|
};
|
|
841
|
-
export type BleveSettings = {
|
|
842
|
-
IndexDir: string;
|
|
843
|
-
EnableIndexing: boolean;
|
|
844
|
-
EnableSearching: boolean;
|
|
845
|
-
EnableAutocomplete: boolean;
|
|
846
|
-
BatchSize: number;
|
|
847
|
-
};
|
|
848
829
|
export type DataRetentionSettings = {
|
|
849
830
|
EnableMessageDeletion: boolean;
|
|
850
831
|
EnableFileDeletion: boolean;
|
|
@@ -926,6 +907,7 @@ export type CloudSettings = {
|
|
|
926
907
|
CWSAPIURL: string;
|
|
927
908
|
CWSMock: boolean;
|
|
928
909
|
Disable: boolean;
|
|
910
|
+
PreviewModalBucketURL: string;
|
|
929
911
|
};
|
|
930
912
|
export type FeatureFlags = Record<string, string | boolean>;
|
|
931
913
|
export type ImportSettings = {
|
|
@@ -942,9 +924,7 @@ export type AccessControlSettings = {
|
|
|
942
924
|
EnableUserManagedAttributes: boolean;
|
|
943
925
|
};
|
|
944
926
|
export type ContentFlaggingNotificationSettings = {
|
|
945
|
-
ReviewerSettings: ContentFlaggingReviewerSetting;
|
|
946
927
|
EventTargetMapping: Record<ContentFlaggingEvent, NotificationTarget[]>;
|
|
947
|
-
AdditionalSettings: ContentFlaggingAdditionalSettings;
|
|
948
928
|
};
|
|
949
929
|
export type TeamReviewerSetting = {
|
|
950
930
|
Enabled: boolean;
|
|
@@ -964,7 +944,10 @@ export type ContentFlaggingAdditionalSettings = {
|
|
|
964
944
|
HideFlaggedContent: boolean;
|
|
965
945
|
};
|
|
966
946
|
export type ContentFlaggingSettings = {
|
|
947
|
+
EnableContentFlagging: boolean;
|
|
967
948
|
NotificationSettings: ContentFlaggingNotificationSettings;
|
|
949
|
+
ReviewerSettings: ContentFlaggingReviewerSetting;
|
|
950
|
+
AdditionalSettings: ContentFlaggingAdditionalSettings;
|
|
968
951
|
};
|
|
969
952
|
export type AdminConfig = {
|
|
970
953
|
ServiceSettings: ServiceSettings;
|
|
@@ -973,7 +956,6 @@ export type AdminConfig = {
|
|
|
973
956
|
SqlSettings: SqlSettings;
|
|
974
957
|
LogSettings: LogSettings;
|
|
975
958
|
ExperimentalAuditSettings: ExperimentalAuditSettings;
|
|
976
|
-
NotificationLogSettings: NotificationLogSettings;
|
|
977
959
|
PasswordSettings: PasswordSettings;
|
|
978
960
|
FileSettings: FileSettings;
|
|
979
961
|
EmailSettings: EmailSettings;
|
|
@@ -997,7 +979,6 @@ export type AdminConfig = {
|
|
|
997
979
|
AnalyticsSettings: AnalyticsSettings;
|
|
998
980
|
CacheSettings: CacheSettings;
|
|
999
981
|
ElasticsearchSettings: ElasticsearchSettings;
|
|
1000
|
-
BleveSettings: BleveSettings;
|
|
1001
982
|
DataRetentionSettings: DataRetentionSettings;
|
|
1002
983
|
MessageExportSettings: MessageExportSettings;
|
|
1003
984
|
JobSettings: JobSettings;
|
|
@@ -8,16 +8,10 @@ function isPostAction(v) {
|
|
|
8
8
|
if (typeof v !== 'object' || !v) {
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
11
|
-
if (
|
|
11
|
+
if ('id' in v && typeof v.id !== 'string') {
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
|
-
if (typeof v.
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
if (!('name' in v)) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
if (typeof v.name !== 'string') {
|
|
14
|
+
if ('name' in v && typeof v.name !== 'string') {
|
|
21
15
|
return false;
|
|
22
16
|
}
|
|
23
17
|
if ('type' in v && typeof v.type !== 'string') {
|
package/lib/integrations.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ export type DialogSubmission = {
|
|
|
149
149
|
channel_id: string;
|
|
150
150
|
team_id: string;
|
|
151
151
|
submission: {
|
|
152
|
-
[x: string]: string;
|
|
152
|
+
[x: string]: string | string[];
|
|
153
153
|
};
|
|
154
154
|
cancelled: boolean;
|
|
155
155
|
};
|
|
@@ -165,6 +165,8 @@ export type DialogElement = {
|
|
|
165
165
|
min_length: number;
|
|
166
166
|
max_length: number;
|
|
167
167
|
data_source: string;
|
|
168
|
+
data_source_url?: string;
|
|
169
|
+
multiselect?: boolean;
|
|
168
170
|
options: Array<{
|
|
169
171
|
text: string;
|
|
170
172
|
value: any;
|
package/lib/limits.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type MessageAttachment = {
|
|
|
18
18
|
};
|
|
19
19
|
export declare function isMessageAttachmentArray(v: unknown): v is MessageAttachment[];
|
|
20
20
|
export type MessageAttachmentField = {
|
|
21
|
-
title
|
|
22
|
-
value
|
|
21
|
+
title?: string;
|
|
22
|
+
value?: unknown;
|
|
23
23
|
short?: boolean;
|
|
24
24
|
};
|
package/lib/posts.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Reaction } from './reactions';
|
|
|
5
5
|
import type { TeamType } from './teams';
|
|
6
6
|
import type { UserProfile } from './users';
|
|
7
7
|
import { type RelationOneToOne, type RelationOneToMany, type 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' | 'system_wrangler' | '';
|
|
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' | 'custom_spillage_report' | '';
|
|
9
9
|
export type PostEmbedType = 'image' | 'link' | 'message_attachment' | 'opengraph' | 'permalink';
|
|
10
10
|
export type PostEmbed = {
|
|
11
11
|
type: PostEmbedType;
|
package/lib/properties.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type PropertyField = {
|
|
|
5
5
|
name: string;
|
|
6
6
|
type: FieldType;
|
|
7
7
|
attrs?: {
|
|
8
|
+
subType?: string;
|
|
8
9
|
[key: string]: unknown;
|
|
9
10
|
};
|
|
10
11
|
target_id?: string;
|
|
@@ -18,6 +19,7 @@ export type PropertyValue<T> = {
|
|
|
18
19
|
target_id: string;
|
|
19
20
|
target_type: string;
|
|
20
21
|
group_id: string;
|
|
22
|
+
field_id: string;
|
|
21
23
|
value: T;
|
|
22
24
|
create_at: number;
|
|
23
25
|
update_at: number;
|
|
@@ -42,6 +44,13 @@ export type UserPropertyField = PropertyField & {
|
|
|
42
44
|
options?: PropertyFieldOption[];
|
|
43
45
|
ldap?: string;
|
|
44
46
|
saml?: string;
|
|
47
|
+
managed?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type SelectPropertyField = PropertyField & {
|
|
51
|
+
attrs?: {
|
|
52
|
+
editable?: boolean;
|
|
53
|
+
options?: PropertyFieldOption[];
|
|
45
54
|
};
|
|
46
55
|
};
|
|
47
56
|
export type UserPropertyFieldPatch = Partial<Pick<UserPropertyField, 'name' | 'attrs' | 'type'>>;
|
package/lib/search.d.ts
CHANGED
package/lib/store.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { ChannelBookmarksState } from './channel_bookmarks';
|
|
|
5
5
|
import type { ChannelCategoriesState } from './channel_categories';
|
|
6
6
|
import type { ChannelsState } from './channels';
|
|
7
7
|
import type { CloudState, CloudUsage } from './cloud';
|
|
8
|
+
import type { ContentFlaggingConfig } from './content_flagging';
|
|
8
9
|
import type { EmojisState } from './emojis';
|
|
9
10
|
import type { FilesState } from './files';
|
|
10
11
|
import type { GeneralState } from './general';
|
|
@@ -73,6 +74,9 @@ export type GlobalState = {
|
|
|
73
74
|
remotes?: Record<string, RemoteClusterInfo[]>;
|
|
74
75
|
remotesByRemoteId?: Record<string, RemoteClusterInfo>;
|
|
75
76
|
};
|
|
77
|
+
contentFlagging: {
|
|
78
|
+
settings?: ContentFlaggingConfig;
|
|
79
|
+
};
|
|
76
80
|
};
|
|
77
81
|
errors: any[];
|
|
78
82
|
requests: {
|
package/lib/teams.d.ts
CHANGED
package/lib/users.d.ts
CHANGED