@mattermost/types 9.5.0 → 9.7.0-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 +31 -2
- package/lib/admin.js +1 -1
- package/lib/apps.js +2 -2
- package/lib/channel_categories.d.ts +1 -1
- package/lib/channel_categories.js +1 -1
- package/lib/channels.d.ts +2 -2
- package/lib/client4.d.ts +0 -22
- package/lib/client4.js +2 -8
- package/lib/config.d.ts +5 -0
- package/lib/config.js +2 -2
- package/lib/general.d.ts +1 -3
- package/lib/groups.js +2 -2
- package/lib/integrations.d.ts +31 -1
- package/lib/marketplace.js +3 -3
- package/lib/plugins.d.ts +5 -1
- package/lib/plugins.js +3 -3
- package/lib/posts.d.ts +1 -2
- package/lib/posts.js +1 -1
- package/lib/product_notices.js +1 -1
- package/lib/reports.d.ts +65 -0
- package/lib/reports.js +31 -0
- package/lib/requests.d.ts +0 -2
- package/lib/search.d.ts +0 -3
- package/lib/teams.d.ts +5 -1
- package/lib/threads.js +1 -1
- package/lib/users.d.ts +7 -14
- package/lib/users.js +1 -1
- package/lib/utilities.d.ts +1 -1
- package/package.json +7 -4
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[];
|
|
@@ -46,8 +52,8 @@ export type AdminState = {
|
|
|
46
52
|
userAccessTokens: Record<string, UserAccessToken>;
|
|
47
53
|
clusterInfo: ClusterInfo[];
|
|
48
54
|
samlCertStatus?: SamlCertificateStatus;
|
|
49
|
-
analytics
|
|
50
|
-
teamAnalytics
|
|
55
|
+
analytics: AnalyticsState;
|
|
56
|
+
teamAnalytics: RelationOneToOne<Team, AnalyticsState>;
|
|
51
57
|
userAccessTokensByUser?: RelationOneToOne<UserProfile, Record<string, UserAccessToken>>;
|
|
52
58
|
plugins?: Record<string, PluginRedux>;
|
|
53
59
|
pluginStatuses?: Record<string, PluginStatusRedux>;
|
|
@@ -56,6 +62,29 @@ export type AdminState = {
|
|
|
56
62
|
dataRetentionCustomPoliciesCount: number;
|
|
57
63
|
prevTrialLicense: ClientLicense;
|
|
58
64
|
};
|
|
65
|
+
export type AnalyticsState = {
|
|
66
|
+
POST_PER_DAY?: AnalyticsRow[];
|
|
67
|
+
BOT_POST_PER_DAY?: AnalyticsRow[];
|
|
68
|
+
USERS_WITH_POSTS_PER_DAY?: AnalyticsRow[];
|
|
69
|
+
TOTAL_PUBLIC_CHANNELS?: number;
|
|
70
|
+
TOTAL_PRIVATE_GROUPS?: number;
|
|
71
|
+
TOTAL_POSTS?: number;
|
|
72
|
+
TOTAL_USERS?: number;
|
|
73
|
+
TOTAL_INACTIVE_USERS?: number;
|
|
74
|
+
TOTAL_TEAMS?: number;
|
|
75
|
+
TOTAL_WEBSOCKET_CONNECTIONS?: number;
|
|
76
|
+
TOTAL_MASTER_DB_CONNECTIONS?: number;
|
|
77
|
+
TOTAL_READ_DB_CONNECTIONS?: number;
|
|
78
|
+
DAILY_ACTIVE_USERS?: number;
|
|
79
|
+
MONTHLY_ACTIVE_USERS?: number;
|
|
80
|
+
TOTAL_FILE_POSTS?: number;
|
|
81
|
+
TOTAL_HASHTAG_POSTS?: number;
|
|
82
|
+
TOTAL_IHOOKS?: number;
|
|
83
|
+
TOTAL_OHOOKS?: number;
|
|
84
|
+
TOTAL_COMMANDS?: number;
|
|
85
|
+
TOTAL_SESSIONS?: number;
|
|
86
|
+
REGISTERED_USERS?: number;
|
|
87
|
+
};
|
|
59
88
|
export type ClusterInfo = {
|
|
60
89
|
id: string;
|
|
61
90
|
version: string;
|
package/lib/admin.js
CHANGED
package/lib/apps.js
CHANGED
|
@@ -11,11 +11,11 @@ var Permission;
|
|
|
11
11
|
Permission["PermissionActAsAdmin"] = "act_as_admin";
|
|
12
12
|
Permission["RemoteOAuth2"] = "remote_oauth2";
|
|
13
13
|
Permission["RemoteWebhooks"] = "remote_webhooks";
|
|
14
|
-
})(Permission
|
|
14
|
+
})(Permission || (exports.Permission = Permission = {}));
|
|
15
15
|
var Locations;
|
|
16
16
|
(function (Locations) {
|
|
17
17
|
Locations["PostMenu"] = "/post_menu";
|
|
18
18
|
Locations["ChannelHeader"] = "/channel_header";
|
|
19
19
|
Locations["Command"] = "/command";
|
|
20
20
|
Locations["InPost"] = "/in_post";
|
|
21
|
-
})(Locations
|
|
21
|
+
})(Locations || (exports.Locations = Locations = {}));
|
|
@@ -5,7 +5,7 @@ import { IDMappedObjects, RelationOneToOne } from './utilities';
|
|
|
5
5
|
export type ChannelCategoryType = 'favorites' | 'channels' | 'direct_messages' | 'custom';
|
|
6
6
|
export declare enum CategorySorting {
|
|
7
7
|
Alphabetical = "alpha",
|
|
8
|
-
Default = ""
|
|
8
|
+
Default = "",// behaves the same as manual
|
|
9
9
|
Recency = "recent",
|
|
10
10
|
Manual = "manual"
|
|
11
11
|
}
|
|
@@ -9,4 +9,4 @@ var CategorySorting;
|
|
|
9
9
|
CategorySorting["Default"] = "";
|
|
10
10
|
CategorySorting["Recency"] = "recent";
|
|
11
11
|
CategorySorting["Manual"] = "manual";
|
|
12
|
-
})(CategorySorting
|
|
12
|
+
})(CategorySorting || (exports.CategorySorting = CategorySorting = {}));
|
package/lib/channels.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDMappedObjects,
|
|
1
|
+
import { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
|
|
2
2
|
import { Team } from './teams';
|
|
3
3
|
export type ChannelType = 'O' | 'P' | 'D' | 'G' | 'threads';
|
|
4
4
|
export type ChannelStats = {
|
|
@@ -112,7 +112,7 @@ export type ChannelUnread = {
|
|
|
112
112
|
export type ChannelsState = {
|
|
113
113
|
currentChannelId: string;
|
|
114
114
|
channels: IDMappedObjects<Channel>;
|
|
115
|
-
channelsInTeam:
|
|
115
|
+
channelsInTeam: RelationOneToManyUnique<Team, Channel>;
|
|
116
116
|
myMembers: RelationOneToOne<Channel, ChannelMembership>;
|
|
117
117
|
roles: RelationOneToOne<Channel, Set<string>>;
|
|
118
118
|
membersInChannel: RelationOneToOne<Channel, Record<string, ChannelMembership>>;
|
package/lib/client4.d.ts
CHANGED
|
@@ -32,25 +32,3 @@ export type FetchPaginatedThreadOptions = {
|
|
|
32
32
|
fromCreateAt?: number;
|
|
33
33
|
fromPost?: string;
|
|
34
34
|
};
|
|
35
|
-
export declare enum ReportDuration {
|
|
36
|
-
Last30Days = "last_30_days",
|
|
37
|
-
PreviousMonth = "previous_month",
|
|
38
|
-
Last6Months = "last_6_months"
|
|
39
|
-
}
|
|
40
|
-
export type UserReportFilter = {
|
|
41
|
-
role_filter?: string;
|
|
42
|
-
has_no_team?: boolean;
|
|
43
|
-
team_filter?: string;
|
|
44
|
-
hide_active?: boolean;
|
|
45
|
-
hide_inactive?: boolean;
|
|
46
|
-
searchTerm?: string;
|
|
47
|
-
};
|
|
48
|
-
export type UserReportOptions = UserReportFilter & {
|
|
49
|
-
sort_column: 'CreateAt' | 'Username' | 'FirstName' | 'LastName' | 'Nickname' | 'Email';
|
|
50
|
-
page_size: number;
|
|
51
|
-
sort_direction?: 'asc' | 'desc';
|
|
52
|
-
direction?: 'up' | 'down';
|
|
53
|
-
date_range?: ReportDuration;
|
|
54
|
-
from_column_value?: string;
|
|
55
|
-
from_id?: string;
|
|
56
|
-
};
|
package/lib/client4.js
CHANGED
|
@@ -2,17 +2,11 @@
|
|
|
2
2
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
3
3
|
// See LICENSE.txt for license information.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.LogLevel = void 0;
|
|
6
6
|
var LogLevel;
|
|
7
7
|
(function (LogLevel) {
|
|
8
8
|
LogLevel["Error"] = "ERROR";
|
|
9
9
|
LogLevel["Warning"] = "WARNING";
|
|
10
10
|
LogLevel["Info"] = "INFO";
|
|
11
11
|
LogLevel["Debug"] = "DEBUG";
|
|
12
|
-
})(LogLevel
|
|
13
|
-
var ReportDuration;
|
|
14
|
-
(function (ReportDuration) {
|
|
15
|
-
ReportDuration["Last30Days"] = "last_30_days";
|
|
16
|
-
ReportDuration["PreviousMonth"] = "previous_month";
|
|
17
|
-
ReportDuration["Last6Months"] = "last_6_months";
|
|
18
|
-
})(ReportDuration = exports.ReportDuration || (exports.ReportDuration = {}));
|
|
12
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
package/lib/config.d.ts
CHANGED
|
@@ -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;
|
|
@@ -114,6 +116,7 @@ export type ClientConfig = {
|
|
|
114
116
|
FileLevel: string;
|
|
115
117
|
FeatureFlagAppsEnabled: string;
|
|
116
118
|
FeatureFlagCallsEnabled: string;
|
|
119
|
+
FeatureFlagWebSocketEventScope: string;
|
|
117
120
|
ForgotPasswordLink: string;
|
|
118
121
|
GiphySdkKey: string;
|
|
119
122
|
GoogleDeveloperKey: string;
|
|
@@ -376,6 +379,7 @@ export type ServiceSettings = {
|
|
|
376
379
|
PersistentNotificationMaxRecipients: number;
|
|
377
380
|
UniqueEmojiReactionLimitPerPost: number;
|
|
378
381
|
RefreshPostStatsRunTime: string;
|
|
382
|
+
MaximumPayloadSizeBytes: number;
|
|
379
383
|
};
|
|
380
384
|
export type TeamSettings = {
|
|
381
385
|
SiteName: string;
|
|
@@ -440,6 +444,7 @@ export type LogSettings = {
|
|
|
440
444
|
EnableSentry: boolean;
|
|
441
445
|
AdvancedLoggingConfig: string;
|
|
442
446
|
AdvancedLoggingJSON: Record<string, any>;
|
|
447
|
+
MaxFieldSize: number;
|
|
443
448
|
};
|
|
444
449
|
export type ExperimentalAuditSettings = {
|
|
445
450
|
FileEnabled: boolean;
|
package/lib/config.js
CHANGED
|
@@ -9,10 +9,10 @@ var CollapsedThreads;
|
|
|
9
9
|
CollapsedThreads["DEFAULT_ON"] = "default_on";
|
|
10
10
|
CollapsedThreads["DEFAULT_OFF"] = "default_off";
|
|
11
11
|
CollapsedThreads["ALWAYS_ON"] = "always_on";
|
|
12
|
-
})(CollapsedThreads
|
|
12
|
+
})(CollapsedThreads || (exports.CollapsedThreads = CollapsedThreads = {}));
|
|
13
13
|
var ServiceEnvironment;
|
|
14
14
|
(function (ServiceEnvironment) {
|
|
15
15
|
ServiceEnvironment["PRODUCTION"] = "production";
|
|
16
16
|
ServiceEnvironment["TEST"] = "test";
|
|
17
17
|
ServiceEnvironment["DEV"] = "dev";
|
|
18
|
-
})(ServiceEnvironment
|
|
18
|
+
})(ServiceEnvironment || (exports.ServiceEnvironment = ServiceEnvironment = {}));
|
package/lib/general.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ClientConfig, ClientLicense
|
|
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;
|
package/lib/groups.js
CHANGED
|
@@ -7,9 +7,9 @@ var SyncableType;
|
|
|
7
7
|
(function (SyncableType) {
|
|
8
8
|
SyncableType["Team"] = "team";
|
|
9
9
|
SyncableType["Channel"] = "channel";
|
|
10
|
-
})(SyncableType
|
|
10
|
+
})(SyncableType || (exports.SyncableType = SyncableType = {}));
|
|
11
11
|
var GroupSource;
|
|
12
12
|
(function (GroupSource) {
|
|
13
13
|
GroupSource["Ldap"] = "ldap";
|
|
14
14
|
GroupSource["Custom"] = "custom";
|
|
15
|
-
})(GroupSource
|
|
15
|
+
})(GroupSource || (exports.GroupSource = GroupSource = {}));
|
package/lib/integrations.d.ts
CHANGED
|
@@ -92,17 +92,46 @@ 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>;
|
|
102
117
|
commands: IDMappedObjects<Command>;
|
|
118
|
+
dialog?: {
|
|
119
|
+
url: string;
|
|
120
|
+
dialog: Dialog;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
type Dialog = {
|
|
124
|
+
callback_id?: string;
|
|
125
|
+
elements?: DialogElement[];
|
|
126
|
+
title: string;
|
|
127
|
+
introduction_text?: string;
|
|
128
|
+
icon_url?: string;
|
|
129
|
+
submit_label?: string;
|
|
130
|
+
notify_on_cancel?: boolean;
|
|
131
|
+
state?: string;
|
|
103
132
|
};
|
|
104
133
|
export type DialogSubmission = {
|
|
105
|
-
url
|
|
134
|
+
url?: string;
|
|
106
135
|
callback_id: string;
|
|
107
136
|
state: string;
|
|
108
137
|
user_id: string;
|
|
@@ -134,3 +163,4 @@ export type SubmitDialogResponse = {
|
|
|
134
163
|
error?: string;
|
|
135
164
|
errors?: Record<string, string>;
|
|
136
165
|
};
|
|
166
|
+
export {};
|
package/lib/marketplace.js
CHANGED
|
@@ -7,16 +7,16 @@ var HostingType;
|
|
|
7
7
|
(function (HostingType) {
|
|
8
8
|
HostingType["OnPrem"] = "on-prem";
|
|
9
9
|
HostingType["Cloud"] = "cloud";
|
|
10
|
-
})(HostingType
|
|
10
|
+
})(HostingType || (exports.HostingType = HostingType = {}));
|
|
11
11
|
var AuthorType;
|
|
12
12
|
(function (AuthorType) {
|
|
13
13
|
AuthorType["Mattermost"] = "mattermost";
|
|
14
14
|
AuthorType["Partner"] = "partner";
|
|
15
15
|
AuthorType["Community"] = "community";
|
|
16
|
-
})(AuthorType
|
|
16
|
+
})(AuthorType || (exports.AuthorType = AuthorType = {}));
|
|
17
17
|
var ReleaseStage;
|
|
18
18
|
(function (ReleaseStage) {
|
|
19
19
|
ReleaseStage["Production"] = "production";
|
|
20
20
|
ReleaseStage["Beta"] = "beta";
|
|
21
21
|
ReleaseStage["Experimental"] = "experimental";
|
|
22
|
-
})(ReleaseStage
|
|
22
|
+
})(ReleaseStage || (exports.ReleaseStage = ReleaseStage = {}));
|
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/plugins.js
CHANGED
|
@@ -7,16 +7,16 @@ var HostingType;
|
|
|
7
7
|
(function (HostingType) {
|
|
8
8
|
HostingType["OnPrem"] = "on-prem";
|
|
9
9
|
HostingType["Cloud"] = "cloud";
|
|
10
|
-
})(HostingType
|
|
10
|
+
})(HostingType || (exports.HostingType = HostingType = {}));
|
|
11
11
|
var AuthorType;
|
|
12
12
|
(function (AuthorType) {
|
|
13
13
|
AuthorType["Mattermost"] = "mattermost";
|
|
14
14
|
AuthorType["Partner"] = "partner";
|
|
15
15
|
AuthorType["Community"] = "community";
|
|
16
|
-
})(AuthorType
|
|
16
|
+
})(AuthorType || (exports.AuthorType = AuthorType = {}));
|
|
17
17
|
var ReleaseStage;
|
|
18
18
|
(function (ReleaseStage) {
|
|
19
19
|
ReleaseStage["Production"] = "production";
|
|
20
20
|
ReleaseStage["Beta"] = "beta";
|
|
21
21
|
ReleaseStage["Experimental"] = "experimental";
|
|
22
|
-
})(ReleaseStage
|
|
22
|
+
})(ReleaseStage || (exports.ReleaseStage = ReleaseStage = {}));
|
package/lib/posts.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export type PostMetadata = {
|
|
|
33
33
|
emojis: CustomEmoji[];
|
|
34
34
|
files: FileInfo[];
|
|
35
35
|
images: Record<string, PostImage>;
|
|
36
|
-
reactions
|
|
36
|
+
reactions?: Reaction[];
|
|
37
37
|
priority?: PostPriorityMetadata;
|
|
38
38
|
acknowledgements?: PostAcknowledgement[];
|
|
39
39
|
};
|
|
@@ -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;
|
package/lib/posts.js
CHANGED
package/lib/product_notices.js
CHANGED
package/lib/reports.d.ts
ADDED
|
@@ -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 = UserReportSortColumns = {}));
|
|
15
|
+
var ReportSortDirection;
|
|
16
|
+
(function (ReportSortDirection) {
|
|
17
|
+
ReportSortDirection["ascending"] = "asc";
|
|
18
|
+
ReportSortDirection["descending"] = "desc";
|
|
19
|
+
})(ReportSortDirection || (exports.ReportSortDirection = 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 = ReportDuration = {}));
|
|
27
|
+
var CursorPaginationDirection;
|
|
28
|
+
(function (CursorPaginationDirection) {
|
|
29
|
+
CursorPaginationDirection["prev"] = "prev";
|
|
30
|
+
CursorPaginationDirection["next"] = "next";
|
|
31
|
+
})(CursorPaginationDirection || (exports.CursorPaginationDirection = 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
package/lib/teams.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export type Team = {
|
|
|
32
32
|
scheme_id: string;
|
|
33
33
|
group_constrained: boolean;
|
|
34
34
|
policy_id?: string | null;
|
|
35
|
+
last_team_icon_update?: number;
|
|
35
36
|
};
|
|
36
37
|
export type TeamsState = {
|
|
37
38
|
currentTeamId: string;
|
|
@@ -90,5 +91,8 @@ export type NotPagedTeamSearchOpts = {
|
|
|
90
91
|
};
|
|
91
92
|
export type TeamInviteWithError = {
|
|
92
93
|
email: string;
|
|
93
|
-
error:
|
|
94
|
+
error: {
|
|
95
|
+
id: string;
|
|
96
|
+
message: string;
|
|
97
|
+
};
|
|
94
98
|
};
|
package/lib/threads.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.threadIsSynthetic = exports.UserThreadType = void 0;
|
|
|
6
6
|
var UserThreadType;
|
|
7
7
|
(function (UserThreadType) {
|
|
8
8
|
UserThreadType["Synthetic"] = "S"; // derived from post
|
|
9
|
-
})(UserThreadType
|
|
9
|
+
})(UserThreadType || (exports.UserThreadType = UserThreadType = {}));
|
|
10
10
|
function threadIsSynthetic(thread) {
|
|
11
11
|
return thread.type === UserThreadType.Synthetic;
|
|
12
12
|
}
|
package/lib/users.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Channel } from './channels';
|
|
|
3
3
|
import { Group } from './groups';
|
|
4
4
|
import { Session } from './sessions';
|
|
5
5
|
import { Team } from './teams';
|
|
6
|
-
import { IDMappedObjects,
|
|
6
|
+
import { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
|
|
7
7
|
export type UserNotifyProps = {
|
|
8
8
|
desktop: 'default' | 'all' | 'mention' | 'none';
|
|
9
9
|
desktop_sound: 'true' | 'false';
|
|
@@ -63,16 +63,16 @@ export type UsersState = {
|
|
|
63
63
|
mySessions: Session[];
|
|
64
64
|
myAudits: Audit[];
|
|
65
65
|
profiles: IDMappedObjects<UserProfile>;
|
|
66
|
-
profilesInTeam:
|
|
67
|
-
profilesNotInTeam:
|
|
66
|
+
profilesInTeam: RelationOneToManyUnique<Team, UserProfile>;
|
|
67
|
+
profilesNotInTeam: RelationOneToManyUnique<Team, UserProfile>;
|
|
68
68
|
profilesWithoutTeam: Set<string>;
|
|
69
69
|
profilesInChannel: RelationOneToManyUnique<Channel, UserProfile>;
|
|
70
70
|
profilesNotInChannel: RelationOneToManyUnique<Channel, UserProfile>;
|
|
71
|
-
profilesInGroup:
|
|
72
|
-
profilesNotInGroup:
|
|
71
|
+
profilesInGroup: RelationOneToManyUnique<Group, UserProfile>;
|
|
72
|
+
profilesNotInGroup: RelationOneToManyUnique<Group, UserProfile>;
|
|
73
73
|
statuses: RelationOneToOne<UserProfile, string>;
|
|
74
|
-
stats:
|
|
75
|
-
filteredStats
|
|
74
|
+
stats: Partial<UsersStats>;
|
|
75
|
+
filteredStats: Partial<UsersStats>;
|
|
76
76
|
myUserAccessTokens: Record<string, UserAccessToken>;
|
|
77
77
|
lastActivity: RelationOneToOne<UserProfile, number>;
|
|
78
78
|
};
|
|
@@ -128,10 +128,3 @@ export type GetFilteredUsersStatsOpts = {
|
|
|
128
128
|
export type AuthChangeResponse = {
|
|
129
129
|
follow_link: string;
|
|
130
130
|
};
|
|
131
|
-
export type UserReport = UserProfile & {
|
|
132
|
-
last_login_at: number;
|
|
133
|
-
last_status_at?: number;
|
|
134
|
-
last_post_date?: number;
|
|
135
|
-
days_active?: number;
|
|
136
|
-
total_posts?: number;
|
|
137
|
-
};
|
package/lib/users.js
CHANGED
|
@@ -13,4 +13,4 @@ var CustomStatusDuration;
|
|
|
13
13
|
CustomStatusDuration["THIS_WEEK"] = "this_week";
|
|
14
14
|
CustomStatusDuration["DATE_AND_TIME"] = "date_and_time";
|
|
15
15
|
CustomStatusDuration["CUSTOM_DATE_TIME"] = "custom_date_time";
|
|
16
|
-
})(CustomStatusDuration
|
|
16
|
+
})(CustomStatusDuration || (exports.CustomStatusDuration = CustomStatusDuration = {}));
|
package/lib/utilities.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type IDMappedObjects<E extends {
|
|
|
21
21
|
id: string;
|
|
22
22
|
}> = RelationOneToOne<E, E>;
|
|
23
23
|
export type DeepPartial<T> = {
|
|
24
|
-
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] extends object | undefined ? DeepPartial<T[K]> : T[K];
|
|
24
|
+
[K in keyof T]?: T[K] extends Set<any> ? T[K] : T[K] extends Map<any, any> ? T[K] : T[K] extends object ? DeepPartial<T[K]> : T[K] extends object | undefined ? DeepPartial<T[K]> : T[K];
|
|
25
25
|
};
|
|
26
26
|
export type ValueOf<T> = T[keyof T];
|
|
27
27
|
/**
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mattermost/types",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0-0",
|
|
4
4
|
"description": "Shared type definitions used by the Mattermost web app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mattermost"
|
|
7
7
|
],
|
|
8
|
-
"homepage": "https://github.com/mattermost/mattermost
|
|
8
|
+
"homepage": "https://github.com/mattermost/mattermost/tree/master/webapp/platform/types#readme",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"files": [
|
|
11
11
|
"lib"
|
|
@@ -22,11 +22,14 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "github:mattermost/mattermost
|
|
25
|
+
"url": "github:mattermost/mattermost",
|
|
26
26
|
"directory": "webapp/platform/types"
|
|
27
27
|
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"typescript": "^5.0.0"
|
|
30
|
+
},
|
|
28
31
|
"peerDependencies": {
|
|
29
|
-
"typescript": "^4.3"
|
|
32
|
+
"typescript": "^4.3.0 || ^5.0.0"
|
|
30
33
|
},
|
|
31
34
|
"peerDependenciesMeta": {
|
|
32
35
|
"typescript": {
|