@mattermost/types 10.8.0 → 10.10.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/access_control.d.ts +70 -0
- package/lib/access_control.js +4 -0
- package/lib/admin.d.ts +24 -1
- package/lib/channels.d.ts +5 -0
- package/lib/client4.d.ts +2 -0
- package/lib/cloud.d.ts +1 -0
- package/lib/config.d.ts +15 -0
- package/lib/general.d.ts +1 -0
- package/lib/integrations.d.ts +4 -0
- package/lib/jobs.d.ts +1 -1
- package/lib/shared_channels.d.ts +11 -0
- package/lib/store.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Type definition for access control attributes
|
|
60
|
+
*/
|
|
61
|
+
export type AccessControlAttributes = Record<string, string[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Interface for entities that can have access control
|
|
64
|
+
*/
|
|
65
|
+
export interface AccessControlled {
|
|
66
|
+
/**
|
|
67
|
+
* Whether access control is enforced for this entity
|
|
68
|
+
*/
|
|
69
|
+
access_control_enforced?: boolean;
|
|
70
|
+
}
|
package/lib/admin.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AccessControlPolicy } from './access_control';
|
|
1
2
|
import type { Audit } from './audits';
|
|
2
3
|
import type { Compliance } from './compliance';
|
|
3
4
|
import type { AdminConfig, ClientLicense, EnvironmentConfig } from './config';
|
|
@@ -7,7 +8,7 @@ import type { PluginRedux, PluginStatusRedux } from './plugins';
|
|
|
7
8
|
import type { SamlCertificateStatus, SamlMetadataResponse } from './saml';
|
|
8
9
|
import type { Team } from './teams';
|
|
9
10
|
import type { UserAccessToken, UserProfile } from './users';
|
|
10
|
-
import type { RelationOneToOne } from './utilities';
|
|
11
|
+
import type { RelationOneToOne, IDMappedObjects } from './utilities';
|
|
11
12
|
export declare enum LogLevelEnum {
|
|
12
13
|
SILLY = "silly",
|
|
13
14
|
DEBUG = "debug",
|
|
@@ -60,6 +61,8 @@ export type AdminState = {
|
|
|
60
61
|
dataRetentionCustomPolicies: DataRetentionCustomPolicies;
|
|
61
62
|
dataRetentionCustomPoliciesCount: number;
|
|
62
63
|
prevTrialLicense: ClientLicense;
|
|
64
|
+
accessControlPolicies: IDMappedObjects<AccessControlPolicy>;
|
|
65
|
+
channelsForAccessControlPolicy: Record<string, string[]>;
|
|
63
66
|
};
|
|
64
67
|
export type AnalyticsState = {
|
|
65
68
|
POST_PER_DAY?: AnalyticsRow[];
|
|
@@ -122,3 +125,23 @@ export type SupportPacketContent = {
|
|
|
122
125
|
selected: boolean;
|
|
123
126
|
mandatory: boolean;
|
|
124
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/channels.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export type Channel = {
|
|
|
48
48
|
props?: Record<string, any>;
|
|
49
49
|
policy_id?: string | null;
|
|
50
50
|
banner_info?: ChannelBanner;
|
|
51
|
+
policy_enforced?: boolean;
|
|
52
|
+
default_category_name?: string;
|
|
51
53
|
};
|
|
52
54
|
export type ServerChannel = Channel & {
|
|
53
55
|
/**
|
|
@@ -181,4 +183,7 @@ export type ChannelSearchOpts = {
|
|
|
181
183
|
deleted?: boolean;
|
|
182
184
|
page?: number;
|
|
183
185
|
per_page?: number;
|
|
186
|
+
access_control_policy_enforced?: boolean;
|
|
187
|
+
exclude_access_control_policy_enforced?: boolean;
|
|
188
|
+
parent_access_control_policy_id?: string;
|
|
184
189
|
};
|
package/lib/client4.d.ts
CHANGED
|
@@ -32,9 +32,11 @@ export type FetchPaginatedThreadOptions = {
|
|
|
32
32
|
fetchThreads?: boolean;
|
|
33
33
|
collapsedThreads?: boolean;
|
|
34
34
|
collapsedThreadsExtended?: boolean;
|
|
35
|
+
updatesOnly?: boolean;
|
|
35
36
|
direction?: 'up' | 'down';
|
|
36
37
|
fetchAll?: boolean;
|
|
37
38
|
perPage?: number;
|
|
38
39
|
fromCreateAt?: number;
|
|
40
|
+
fromUpdateAt?: number;
|
|
39
41
|
fromPost?: string;
|
|
40
42
|
};
|
package/lib/cloud.d.ts
CHANGED
package/lib/config.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ export type ClientConfig = {
|
|
|
109
109
|
EnableUserDeactivation: string;
|
|
110
110
|
EnableUserTypingMessages: string;
|
|
111
111
|
EnforceMultifactorAuthentication: string;
|
|
112
|
+
ExperimentalChannelCategorySorting: string;
|
|
112
113
|
ExperimentalClientSideCertCheck: string;
|
|
113
114
|
ExperimentalClientSideCertEnable: string;
|
|
114
115
|
ExperimentalEnableAuthenticationTransfer: string;
|
|
@@ -122,6 +123,7 @@ export type ClientConfig = {
|
|
|
122
123
|
FeatureFlagAppsEnabled: string;
|
|
123
124
|
FeatureFlagCallsEnabled: string;
|
|
124
125
|
FeatureFlagCustomProfileAttributes: string;
|
|
126
|
+
FeatureFlagAttributeBasedAccessControl: string;
|
|
125
127
|
FeatureFlagWebSocketEventScope: string;
|
|
126
128
|
ForgotPasswordLink: string;
|
|
127
129
|
GiphySdkKey: string;
|
|
@@ -165,6 +167,9 @@ export type ClientConfig = {
|
|
|
165
167
|
PostEditTimeLimit: string;
|
|
166
168
|
PrivacyPolicyLink: string;
|
|
167
169
|
ReportAProblemLink: string;
|
|
170
|
+
ReportAProblemType: string;
|
|
171
|
+
ReportAProblemMail: string;
|
|
172
|
+
AllowDownloadLogs: string;
|
|
168
173
|
RequireEmailVerification: string;
|
|
169
174
|
RestrictDirectMessage: string;
|
|
170
175
|
RunJobs: string;
|
|
@@ -469,6 +474,7 @@ export type ExperimentalAuditSettings = {
|
|
|
469
474
|
FileCompress: boolean;
|
|
470
475
|
FileMaxQueueSize: number;
|
|
471
476
|
AdvancedLoggingJSON: Record<string, any>;
|
|
477
|
+
Certificate: string;
|
|
472
478
|
};
|
|
473
479
|
export type NotificationLogSettings = {
|
|
474
480
|
EnableConsole: boolean;
|
|
@@ -602,6 +608,9 @@ export type SupportSettings = {
|
|
|
602
608
|
AboutLink: string;
|
|
603
609
|
HelpLink: string;
|
|
604
610
|
ReportAProblemLink: string;
|
|
611
|
+
ReportAProblemType: string;
|
|
612
|
+
ReportAProblemMail: string;
|
|
613
|
+
AllowDownloadLogs: boolean;
|
|
605
614
|
ForgotPasswordLink: string;
|
|
606
615
|
SupportEmail: string;
|
|
607
616
|
CustomTermsOfServiceEnabled: boolean;
|
|
@@ -778,6 +787,7 @@ export type ExperimentalSettings = {
|
|
|
778
787
|
DisableWakeUpReconnectHandler: boolean;
|
|
779
788
|
UsersStatusAndProfileFetchingPollIntervalMilliseconds: number;
|
|
780
789
|
YoutubeReferrerPolicy: boolean;
|
|
790
|
+
ExperimentalChannelCategorySorting: boolean;
|
|
781
791
|
};
|
|
782
792
|
export type AnalyticsSettings = {
|
|
783
793
|
MaxUsersForStatistics: number;
|
|
@@ -916,6 +926,10 @@ export type ExportSettings = {
|
|
|
916
926
|
Directory: string;
|
|
917
927
|
RetentionDays: number;
|
|
918
928
|
};
|
|
929
|
+
export type AccessControlSettings = {
|
|
930
|
+
EnableAttributeBasedAccessControl: boolean;
|
|
931
|
+
EnableChannelScopeAccessControl: boolean;
|
|
932
|
+
};
|
|
919
933
|
export type AdminConfig = {
|
|
920
934
|
ServiceSettings: ServiceSettings;
|
|
921
935
|
TeamSettings: TeamSettings;
|
|
@@ -961,6 +975,7 @@ export type AdminConfig = {
|
|
|
961
975
|
ExportSettings: ExportSettings;
|
|
962
976
|
WranglerSettings: WranglerSettings;
|
|
963
977
|
ConnectedWorkspacesSettings: ConnectedWorkspacesSettings;
|
|
978
|
+
AccessControlSettings: AccessControlSettings;
|
|
964
979
|
};
|
|
965
980
|
export type ReplicaLagSetting = {
|
|
966
981
|
DataSource: string;
|
package/lib/general.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type GeneralState = {
|
|
|
8
8
|
license: ClientLicense;
|
|
9
9
|
serverVersion: string;
|
|
10
10
|
customProfileAttributes: IDMappedObjects<UserPropertyField>;
|
|
11
|
+
cwsAvailability: 'pending' | 'available' | 'unavailable' | 'not_applicable';
|
|
11
12
|
};
|
|
12
13
|
export type SystemSetting = {
|
|
13
14
|
name: string;
|
package/lib/integrations.d.ts
CHANGED
|
@@ -60,6 +60,9 @@ export type CommandArgs = {
|
|
|
60
60
|
team_id?: string;
|
|
61
61
|
root_id?: string;
|
|
62
62
|
};
|
|
63
|
+
export type DialogArgs = {
|
|
64
|
+
channel_id: string;
|
|
65
|
+
};
|
|
63
66
|
export type CommandResponse = {
|
|
64
67
|
response_type: string;
|
|
65
68
|
text: string;
|
|
@@ -120,6 +123,7 @@ export type IntegrationsState = {
|
|
|
120
123
|
appsBotIDs: string[];
|
|
121
124
|
systemCommands: IDMappedObjects<Command>;
|
|
122
125
|
commands: IDMappedObjects<Command>;
|
|
126
|
+
dialogArguments?: DialogArgs;
|
|
123
127
|
dialogTriggerId: string;
|
|
124
128
|
dialog?: {
|
|
125
129
|
url: string;
|
package/lib/jobs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IDMappedObjects } from './utilities';
|
|
2
|
-
export type JobType = 'data_retention' | 'elasticsearch_post_indexing' | 'bleve_post_indexing' | 'ldap_sync' | 'message_export';
|
|
2
|
+
export type JobType = 'data_retention' | 'elasticsearch_post_indexing' | 'bleve_post_indexing' | 'ldap_sync' | 'message_export' | 'access_control_sync';
|
|
3
3
|
export type JobStatus = 'pending' | 'in_progress' | 'success' | 'error' | 'cancel_requested' | 'canceled' | 'warning';
|
|
4
4
|
export type Job = JobTypeBase & {
|
|
5
5
|
id: string;
|
package/lib/shared_channels.d.ts
CHANGED
|
@@ -13,3 +13,14 @@ export type SharedChannelRemote = {
|
|
|
13
13
|
last_post_create_at: number;
|
|
14
14
|
last_post_create_id: string;
|
|
15
15
|
};
|
|
16
|
+
export type RemoteClusterInfo = {
|
|
17
|
+
name: string;
|
|
18
|
+
display_name: string;
|
|
19
|
+
create_at: number;
|
|
20
|
+
delete_at: number;
|
|
21
|
+
last_ping_at: number;
|
|
22
|
+
};
|
|
23
|
+
export type SharedChannelsState = {
|
|
24
|
+
remotes: Record<string, RemoteClusterInfo[]>;
|
|
25
|
+
remotesByRemoteId: Record<string, RemoteClusterInfo>;
|
|
26
|
+
};
|
package/lib/store.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type { Role } from './roles';
|
|
|
20
20
|
import type { ScheduledPostsState } from './schedule_post';
|
|
21
21
|
import type { SchemesState } from './schemes';
|
|
22
22
|
import type { SearchState } from './search';
|
|
23
|
+
import type { RemoteClusterInfo } from './shared_channels';
|
|
23
24
|
import type { TeamsState } from './teams';
|
|
24
25
|
import type { ThreadsState } from './threads';
|
|
25
26
|
import type { Typing } from './typing';
|
|
@@ -68,6 +69,10 @@ export type GlobalState = {
|
|
|
68
69
|
hostedCustomer: HostedCustomerState;
|
|
69
70
|
usage: CloudUsage;
|
|
70
71
|
scheduledPosts: ScheduledPostsState;
|
|
72
|
+
sharedChannels?: {
|
|
73
|
+
remotes?: Record<string, RemoteClusterInfo[]>;
|
|
74
|
+
remotesByRemoteId?: Record<string, RemoteClusterInfo>;
|
|
75
|
+
};
|
|
71
76
|
};
|
|
72
77
|
errors: any[];
|
|
73
78
|
requests: {
|