@mattermost/types 10.8.0 → 10.9.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 +4 -1
- package/lib/channels.d.ts +4 -0
- package/lib/client4.d.ts +2 -0
- package/lib/config.d.ts +13 -0
- package/lib/jobs.d.ts +1 -1
- 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[];
|
package/lib/channels.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type Channel = {
|
|
|
48
48
|
props?: Record<string, any>;
|
|
49
49
|
policy_id?: string | null;
|
|
50
50
|
banner_info?: ChannelBanner;
|
|
51
|
+
policy_enforced?: boolean;
|
|
51
52
|
};
|
|
52
53
|
export type ServerChannel = Channel & {
|
|
53
54
|
/**
|
|
@@ -181,4 +182,7 @@ export type ChannelSearchOpts = {
|
|
|
181
182
|
deleted?: boolean;
|
|
182
183
|
page?: number;
|
|
183
184
|
per_page?: number;
|
|
185
|
+
access_control_policy_enforced?: boolean;
|
|
186
|
+
exclude_access_control_policy_enforced?: boolean;
|
|
187
|
+
parent_access_control_policy_id?: string;
|
|
184
188
|
};
|
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/config.d.ts
CHANGED
|
@@ -122,6 +122,7 @@ export type ClientConfig = {
|
|
|
122
122
|
FeatureFlagAppsEnabled: string;
|
|
123
123
|
FeatureFlagCallsEnabled: string;
|
|
124
124
|
FeatureFlagCustomProfileAttributes: string;
|
|
125
|
+
FeatureFlagAttributeBasedAccessControl: string;
|
|
125
126
|
FeatureFlagWebSocketEventScope: string;
|
|
126
127
|
ForgotPasswordLink: string;
|
|
127
128
|
GiphySdkKey: string;
|
|
@@ -165,6 +166,9 @@ export type ClientConfig = {
|
|
|
165
166
|
PostEditTimeLimit: string;
|
|
166
167
|
PrivacyPolicyLink: string;
|
|
167
168
|
ReportAProblemLink: string;
|
|
169
|
+
ReportAProblemType: string;
|
|
170
|
+
ReportAProblemMail: string;
|
|
171
|
+
AllowDownloadLogs: string;
|
|
168
172
|
RequireEmailVerification: string;
|
|
169
173
|
RestrictDirectMessage: string;
|
|
170
174
|
RunJobs: string;
|
|
@@ -469,6 +473,7 @@ export type ExperimentalAuditSettings = {
|
|
|
469
473
|
FileCompress: boolean;
|
|
470
474
|
FileMaxQueueSize: number;
|
|
471
475
|
AdvancedLoggingJSON: Record<string, any>;
|
|
476
|
+
Certificate: string;
|
|
472
477
|
};
|
|
473
478
|
export type NotificationLogSettings = {
|
|
474
479
|
EnableConsole: boolean;
|
|
@@ -602,6 +607,9 @@ export type SupportSettings = {
|
|
|
602
607
|
AboutLink: string;
|
|
603
608
|
HelpLink: string;
|
|
604
609
|
ReportAProblemLink: string;
|
|
610
|
+
ReportAProblemType: string;
|
|
611
|
+
ReportAProblemMail: string;
|
|
612
|
+
AllowDownloadLogs: boolean;
|
|
605
613
|
ForgotPasswordLink: string;
|
|
606
614
|
SupportEmail: string;
|
|
607
615
|
CustomTermsOfServiceEnabled: boolean;
|
|
@@ -916,6 +924,10 @@ export type ExportSettings = {
|
|
|
916
924
|
Directory: string;
|
|
917
925
|
RetentionDays: number;
|
|
918
926
|
};
|
|
927
|
+
export type AccessControlSettings = {
|
|
928
|
+
EnableAttributeBasedAccessControl: boolean;
|
|
929
|
+
EnableChannelScopeAccessControl: boolean;
|
|
930
|
+
};
|
|
919
931
|
export type AdminConfig = {
|
|
920
932
|
ServiceSettings: ServiceSettings;
|
|
921
933
|
TeamSettings: TeamSettings;
|
|
@@ -961,6 +973,7 @@ export type AdminConfig = {
|
|
|
961
973
|
ExportSettings: ExportSettings;
|
|
962
974
|
WranglerSettings: WranglerSettings;
|
|
963
975
|
ConnectedWorkspacesSettings: ConnectedWorkspacesSettings;
|
|
976
|
+
AccessControlSettings: AccessControlSettings;
|
|
964
977
|
};
|
|
965
978
|
export type ReplicaLagSetting = {
|
|
966
979
|
DataSource: 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;
|