@mattermost/types 6.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/README.md +53 -0
- package/lib/admin.d.ts +50 -0
- package/lib/admin.js +4 -0
- package/lib/apps.d.ts +182 -0
- package/lib/apps.js +24 -0
- package/lib/audits.d.ts +9 -0
- package/lib/audits.js +4 -0
- package/lib/autocomplete.d.ts +12 -0
- package/lib/autocomplete.js +4 -0
- package/lib/bots.d.ts +15 -0
- package/lib/bots.js +4 -0
- package/lib/channel_categories.d.ts +30 -0
- package/lib/channel_categories.js +12 -0
- package/lib/channels.d.ts +165 -0
- package/lib/channels.js +4 -0
- package/lib/client4.d.ts +41 -0
- package/lib/client4.js +12 -0
- package/lib/cloud.d.ts +102 -0
- package/lib/cloud.js +12 -0
- package/lib/compliance.d.ts +13 -0
- package/lib/compliance.js +4 -0
- package/lib/config.d.ts +781 -0
- package/lib/config.js +11 -0
- package/lib/data_retention.d.ts +30 -0
- package/lib/data_retention.js +4 -0
- package/lib/emojis.d.ts +28 -0
- package/lib/emojis.js +4 -0
- package/lib/errors.d.ts +12 -0
- package/lib/errors.js +4 -0
- package/lib/files.d.ts +37 -0
- package/lib/files.js +4 -0
- package/lib/general.d.ts +26 -0
- package/lib/general.js +24 -0
- package/lib/groups.d.ts +132 -0
- package/lib/groups.js +4 -0
- package/lib/integration_actions.d.ts +24 -0
- package/lib/integration_actions.js +4 -0
- package/lib/integrations.d.ts +150 -0
- package/lib/integrations.js +4 -0
- package/lib/jobs.d.ts +23 -0
- package/lib/jobs.js +2 -0
- package/lib/marketplace.d.ts +43 -0
- package/lib/marketplace.js +22 -0
- package/lib/message_attachments.d.ts +25 -0
- package/lib/message_attachments.js +4 -0
- package/lib/mfa.d.ts +4 -0
- package/lib/mfa.js +4 -0
- package/lib/plugins.d.ts +119 -0
- package/lib/plugins.js +22 -0
- package/lib/posts.d.ts +126 -0
- package/lib/posts.js +4 -0
- package/lib/preferences.d.ts +9 -0
- package/lib/preferences.js +4 -0
- package/lib/product_notices.d.ts +26 -0
- package/lib/product_notices.js +9 -0
- package/lib/reactions.d.ts +6 -0
- package/lib/reactions.js +2 -0
- package/lib/requests.d.ts +102 -0
- package/lib/requests.js +4 -0
- package/lib/roles.d.ts +13 -0
- package/lib/roles.js +2 -0
- package/lib/saml.d.ts +10 -0
- package/lib/saml.js +4 -0
- package/lib/schemes.d.ts +29 -0
- package/lib/schemes.js +2 -0
- package/lib/search.d.ts +27 -0
- package/lib/search.js +4 -0
- package/lib/sessions.d.ts +15 -0
- package/lib/sessions.js +4 -0
- package/lib/setup.d.ts +3 -0
- package/lib/setup.js +4 -0
- package/lib/store.d.ts +76 -0
- package/lib/store.js +4 -0
- package/lib/teams.d.ts +90 -0
- package/lib/teams.js +4 -0
- package/lib/terms_of_service.d.ts +6 -0
- package/lib/terms_of_service.js +4 -0
- package/lib/themes.d.ts +34 -0
- package/lib/themes.js +4 -0
- package/lib/threads.d.ts +59 -0
- package/lib/threads.js +13 -0
- package/lib/typing.d.ts +5 -0
- package/lib/typing.js +2 -0
- package/lib/users.d.ts +134 -0
- package/lib/users.js +16 -0
- package/lib/utilities.d.ts +25 -0
- package/lib/utilities.js +4 -0
- package/lib/websocket.d.ts +17 -0
- package/lib/websocket.js +4 -0
- package/package.json +34 -0
package/lib/config.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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.CollapsedThreads = void 0;
|
|
6
|
+
var CollapsedThreads;
|
|
7
|
+
(function (CollapsedThreads) {
|
|
8
|
+
CollapsedThreads["DISABLED"] = "disabled";
|
|
9
|
+
CollapsedThreads["DEFAULT_ON"] = "default_on";
|
|
10
|
+
CollapsedThreads["DEFAULT_OFF"] = "default_off";
|
|
11
|
+
})(CollapsedThreads = exports.CollapsedThreads || (exports.CollapsedThreads = {}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare type DataRetentionCustomPolicy = {
|
|
2
|
+
id: string;
|
|
3
|
+
display_name: string;
|
|
4
|
+
post_duration: number;
|
|
5
|
+
team_count: number;
|
|
6
|
+
channel_count: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type CreateDataRetentionCustomPolicy = {
|
|
9
|
+
display_name: string;
|
|
10
|
+
post_duration: number;
|
|
11
|
+
channel_ids: string[];
|
|
12
|
+
team_ids: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare type PatchDataRetentionCustomPolicy = {
|
|
15
|
+
display_name: string;
|
|
16
|
+
post_duration: number;
|
|
17
|
+
};
|
|
18
|
+
export declare type PatchDataRetentionCustomPolicyTeams = {
|
|
19
|
+
team_ids: string[];
|
|
20
|
+
};
|
|
21
|
+
export declare type PatchDataRetentionCustomPolicyChannels = {
|
|
22
|
+
channel_ids: string[];
|
|
23
|
+
};
|
|
24
|
+
export declare type DataRetentionCustomPolicies = {
|
|
25
|
+
[x: string]: DataRetentionCustomPolicy;
|
|
26
|
+
};
|
|
27
|
+
export declare type GetDataRetentionCustomPoliciesRequest = {
|
|
28
|
+
policies: DataRetentionCustomPolicy[];
|
|
29
|
+
total_count: number;
|
|
30
|
+
};
|
package/lib/emojis.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare type EmojiCategory = 'recent' | 'searchResults' | 'smileys-emotion' | 'people-body' | 'animals-nature' | 'food-drink' | 'activities' | 'travel-places' | 'objects' | 'symbols' | 'flags' | 'custom';
|
|
2
|
+
export declare type CustomEmoji = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
category: 'custom';
|
|
6
|
+
create_at: number;
|
|
7
|
+
update_at: number;
|
|
8
|
+
delete_at: number;
|
|
9
|
+
creator_id: string;
|
|
10
|
+
};
|
|
11
|
+
export declare type SystemEmoji = {
|
|
12
|
+
name: string;
|
|
13
|
+
category: EmojiCategory;
|
|
14
|
+
image: string;
|
|
15
|
+
short_name: string;
|
|
16
|
+
short_names: string[];
|
|
17
|
+
batch: number;
|
|
18
|
+
skins?: string[];
|
|
19
|
+
skin_variations?: Record<string, Emoji>;
|
|
20
|
+
unified: string;
|
|
21
|
+
};
|
|
22
|
+
export declare type Emoji = SystemEmoji | CustomEmoji;
|
|
23
|
+
export declare type EmojisState = {
|
|
24
|
+
customEmoji: {
|
|
25
|
+
[x: string]: CustomEmoji;
|
|
26
|
+
};
|
|
27
|
+
nonExistentEmoji: Set<string>;
|
|
28
|
+
};
|
package/lib/emojis.js
ADDED
package/lib/errors.d.ts
ADDED
package/lib/errors.js
ADDED
package/lib/files.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare type FileInfo = {
|
|
2
|
+
id: string;
|
|
3
|
+
user_id: string;
|
|
4
|
+
create_at: number;
|
|
5
|
+
update_at: number;
|
|
6
|
+
delete_at: number;
|
|
7
|
+
name: string;
|
|
8
|
+
extension: string;
|
|
9
|
+
size: number;
|
|
10
|
+
mime_type: string;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
has_preview_image: boolean;
|
|
14
|
+
clientId: string;
|
|
15
|
+
post_id?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type FilesState = {
|
|
18
|
+
files: Record<string, FileInfo>;
|
|
19
|
+
filesFromSearch: Record<string, FileSearchResultItem>;
|
|
20
|
+
fileIdsByPostId: Record<string, string[]>;
|
|
21
|
+
filePublicLink?: {
|
|
22
|
+
link: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare type FileUploadResponse = {
|
|
26
|
+
file_infos: FileInfo[];
|
|
27
|
+
client_ids: string[];
|
|
28
|
+
};
|
|
29
|
+
export declare type FileSearchResultItem = FileInfo & {
|
|
30
|
+
channel_id: string;
|
|
31
|
+
};
|
|
32
|
+
export declare type FileSearchResults = {
|
|
33
|
+
order: Array<FileSearchResultItem['id']>;
|
|
34
|
+
file_infos: Map<string, FileSearchResultItem>;
|
|
35
|
+
next_file_info_id: string;
|
|
36
|
+
prev_file_info_id: string;
|
|
37
|
+
};
|
package/lib/files.js
ADDED
package/lib/general.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ClientConfig, ClientLicense, WarnMetricStatus } from './config';
|
|
2
|
+
export declare type GeneralState = {
|
|
3
|
+
appState: boolean;
|
|
4
|
+
credentials: any;
|
|
5
|
+
config: Partial<ClientConfig>;
|
|
6
|
+
dataRetentionPolicy: any;
|
|
7
|
+
deviceToken: string;
|
|
8
|
+
firstAdminVisitMarketplaceStatus: boolean;
|
|
9
|
+
firstAdminCompleteSetup: boolean;
|
|
10
|
+
license: ClientLicense;
|
|
11
|
+
serverVersion: string;
|
|
12
|
+
warnMetricsStatus: Record<string, WarnMetricStatus>;
|
|
13
|
+
};
|
|
14
|
+
export declare type SystemSetting = {
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
};
|
|
18
|
+
export declare enum LicenseSkus {
|
|
19
|
+
E10 = "E10",
|
|
20
|
+
E20 = "E20",
|
|
21
|
+
Starter = "starter",
|
|
22
|
+
Professional = "professional",
|
|
23
|
+
Enterprise = "enterprise"
|
|
24
|
+
}
|
|
25
|
+
export declare const isEnterpriseLicense: (license?: ClientLicense | undefined) => boolean;
|
|
26
|
+
export declare const isNonEnterpriseLicense: (license?: ClientLicense | undefined) => boolean;
|
package/lib/general.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
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.isNonEnterpriseLicense = exports.isEnterpriseLicense = exports.LicenseSkus = void 0;
|
|
6
|
+
var LicenseSkus;
|
|
7
|
+
(function (LicenseSkus) {
|
|
8
|
+
LicenseSkus["E10"] = "E10";
|
|
9
|
+
LicenseSkus["E20"] = "E20";
|
|
10
|
+
LicenseSkus["Starter"] = "starter";
|
|
11
|
+
LicenseSkus["Professional"] = "professional";
|
|
12
|
+
LicenseSkus["Enterprise"] = "enterprise";
|
|
13
|
+
})(LicenseSkus = exports.LicenseSkus || (exports.LicenseSkus = {}));
|
|
14
|
+
const isEnterpriseLicense = (license) => {
|
|
15
|
+
switch (license === null || license === void 0 ? void 0 : license.SkuShortName) {
|
|
16
|
+
case LicenseSkus.Enterprise:
|
|
17
|
+
case LicenseSkus.E20:
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
21
|
+
};
|
|
22
|
+
exports.isEnterpriseLicense = isEnterpriseLicense;
|
|
23
|
+
const isNonEnterpriseLicense = (license) => !exports.isEnterpriseLicense(license);
|
|
24
|
+
exports.isNonEnterpriseLicense = isNonEnterpriseLicense;
|
package/lib/groups.d.ts
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { UserProfile } from './users';
|
|
2
|
+
import { RelationOneToOne } from './utilities';
|
|
3
|
+
export declare type SyncableType = 'team' | 'channel';
|
|
4
|
+
export declare type SyncablePatch = {
|
|
5
|
+
scheme_admin: boolean;
|
|
6
|
+
auto_add: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare type GroupPatch = {
|
|
9
|
+
allow_reference: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type CustomGroupPatch = {
|
|
13
|
+
name: string;
|
|
14
|
+
display_name: string;
|
|
15
|
+
};
|
|
16
|
+
export declare type Group = {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
display_name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
source: string;
|
|
22
|
+
remote_id: string | null;
|
|
23
|
+
create_at: number;
|
|
24
|
+
update_at: number;
|
|
25
|
+
delete_at: number;
|
|
26
|
+
has_syncables: boolean;
|
|
27
|
+
member_count: number;
|
|
28
|
+
scheme_admin: boolean;
|
|
29
|
+
allow_reference: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare type GroupTeam = {
|
|
32
|
+
team_id: string;
|
|
33
|
+
team_display_name: string;
|
|
34
|
+
team_type?: string;
|
|
35
|
+
group_id?: string;
|
|
36
|
+
auto_add?: boolean;
|
|
37
|
+
scheme_admin?: boolean;
|
|
38
|
+
create_at?: number;
|
|
39
|
+
delete_at?: number;
|
|
40
|
+
update_at?: number;
|
|
41
|
+
};
|
|
42
|
+
export declare type GroupChannel = {
|
|
43
|
+
channel_id: string;
|
|
44
|
+
channel_display_name: string;
|
|
45
|
+
channel_type?: string;
|
|
46
|
+
team_id: string;
|
|
47
|
+
team_display_name: string;
|
|
48
|
+
team_type?: string;
|
|
49
|
+
group_id?: string;
|
|
50
|
+
auto_add?: boolean;
|
|
51
|
+
scheme_admin?: boolean;
|
|
52
|
+
create_at?: number;
|
|
53
|
+
delete_at?: number;
|
|
54
|
+
update_at?: number;
|
|
55
|
+
};
|
|
56
|
+
export declare type GroupSyncable = {
|
|
57
|
+
group_id: string;
|
|
58
|
+
auto_add: boolean;
|
|
59
|
+
scheme_admin: boolean;
|
|
60
|
+
create_at: number;
|
|
61
|
+
delete_at: number;
|
|
62
|
+
update_at: number;
|
|
63
|
+
type: 'Team' | 'Channel';
|
|
64
|
+
};
|
|
65
|
+
export declare type GroupSyncablesState = {
|
|
66
|
+
teams: GroupTeam[];
|
|
67
|
+
channels: GroupChannel[];
|
|
68
|
+
};
|
|
69
|
+
export declare type GroupsState = {
|
|
70
|
+
syncables: Record<string, GroupSyncablesState>;
|
|
71
|
+
stats: RelationOneToOne<Group, GroupStats>;
|
|
72
|
+
groups: Record<string, Group>;
|
|
73
|
+
myGroups: string[];
|
|
74
|
+
};
|
|
75
|
+
export declare type GroupStats = {
|
|
76
|
+
group_id: string;
|
|
77
|
+
total_member_count: number;
|
|
78
|
+
};
|
|
79
|
+
export declare type GroupSearchOpts = {
|
|
80
|
+
q: string;
|
|
81
|
+
is_linked?: boolean;
|
|
82
|
+
is_configured?: boolean;
|
|
83
|
+
};
|
|
84
|
+
export declare type MixedUnlinkedGroup = {
|
|
85
|
+
mattermost_group_id?: string;
|
|
86
|
+
name: string;
|
|
87
|
+
primary_key: string;
|
|
88
|
+
has_syncables?: boolean;
|
|
89
|
+
};
|
|
90
|
+
export declare type MixedUnlinkedGroupRedux = MixedUnlinkedGroup & {
|
|
91
|
+
failed?: boolean;
|
|
92
|
+
};
|
|
93
|
+
export declare type UserWithGroup = UserProfile & {
|
|
94
|
+
groups: Group[];
|
|
95
|
+
scheme_guest: boolean;
|
|
96
|
+
scheme_user: boolean;
|
|
97
|
+
scheme_admin: boolean;
|
|
98
|
+
};
|
|
99
|
+
export declare type GroupsWithCount = {
|
|
100
|
+
groups: Group[];
|
|
101
|
+
total_group_count: number;
|
|
102
|
+
channelID?: string;
|
|
103
|
+
teamID?: string;
|
|
104
|
+
};
|
|
105
|
+
export declare type UsersWithGroupsAndCount = {
|
|
106
|
+
users: UserWithGroup[];
|
|
107
|
+
total_count: number;
|
|
108
|
+
};
|
|
109
|
+
export declare type GroupCreateWithUserIds = {
|
|
110
|
+
name: string;
|
|
111
|
+
allow_reference: boolean;
|
|
112
|
+
display_name: string;
|
|
113
|
+
source: string;
|
|
114
|
+
user_ids: string[];
|
|
115
|
+
description?: string;
|
|
116
|
+
};
|
|
117
|
+
export declare type GroupSearachParams = {
|
|
118
|
+
q: string;
|
|
119
|
+
filter_allow_reference: boolean;
|
|
120
|
+
page: number;
|
|
121
|
+
per_page: number;
|
|
122
|
+
include_member_count: boolean;
|
|
123
|
+
user_id?: string;
|
|
124
|
+
};
|
|
125
|
+
export declare type GroupMembership = {
|
|
126
|
+
user_id: string;
|
|
127
|
+
roles: string;
|
|
128
|
+
};
|
|
129
|
+
export declare type GroupPermissions = {
|
|
130
|
+
can_delete: boolean;
|
|
131
|
+
can_manage_members: boolean;
|
|
132
|
+
};
|
package/lib/groups.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare type PostAction = {
|
|
2
|
+
id?: string;
|
|
3
|
+
type?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
style?: string;
|
|
7
|
+
data_source?: string;
|
|
8
|
+
options?: PostActionOption[];
|
|
9
|
+
default_option?: string;
|
|
10
|
+
integration?: PostActionIntegration;
|
|
11
|
+
cookie?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare type PostActionOption = {
|
|
14
|
+
text: string;
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type PostActionIntegration = {
|
|
18
|
+
url?: string;
|
|
19
|
+
context?: Record<string, any>;
|
|
20
|
+
};
|
|
21
|
+
export declare type PostActionResponse = {
|
|
22
|
+
status: string;
|
|
23
|
+
trigger_id: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { MessageAttachment } from './message_attachments';
|
|
2
|
+
import { IDMappedObjects } from './utilities';
|
|
3
|
+
export declare type IncomingWebhook = {
|
|
4
|
+
id: string;
|
|
5
|
+
create_at: number;
|
|
6
|
+
update_at: number;
|
|
7
|
+
delete_at: number;
|
|
8
|
+
user_id: string;
|
|
9
|
+
channel_id: string;
|
|
10
|
+
team_id: string;
|
|
11
|
+
display_name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
username: string;
|
|
14
|
+
icon_url: string;
|
|
15
|
+
channel_locked: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare type OutgoingWebhook = {
|
|
18
|
+
id: string;
|
|
19
|
+
token: string;
|
|
20
|
+
create_at: number;
|
|
21
|
+
update_at: number;
|
|
22
|
+
delete_at: number;
|
|
23
|
+
creator_id: string;
|
|
24
|
+
channel_id: string;
|
|
25
|
+
team_id: string;
|
|
26
|
+
trigger_words: string[];
|
|
27
|
+
trigger_when: number;
|
|
28
|
+
callback_urls: string[];
|
|
29
|
+
display_name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
content_type: string;
|
|
32
|
+
username: string;
|
|
33
|
+
icon_url: string;
|
|
34
|
+
};
|
|
35
|
+
export declare type Command = {
|
|
36
|
+
'id': string;
|
|
37
|
+
'token': string;
|
|
38
|
+
'create_at': number;
|
|
39
|
+
'update_at': number;
|
|
40
|
+
'delete_at': number;
|
|
41
|
+
'creator_id': string;
|
|
42
|
+
'team_id': string;
|
|
43
|
+
'trigger': string;
|
|
44
|
+
'method': 'P' | 'G' | '';
|
|
45
|
+
'username': string;
|
|
46
|
+
'icon_url': string;
|
|
47
|
+
'auto_complete': boolean;
|
|
48
|
+
'auto_complete_desc': string;
|
|
49
|
+
'auto_complete_hint': string;
|
|
50
|
+
'display_name': string;
|
|
51
|
+
'description': string;
|
|
52
|
+
'url': string;
|
|
53
|
+
};
|
|
54
|
+
export declare type CommandArgs = {
|
|
55
|
+
channel_id: string;
|
|
56
|
+
team_id?: string;
|
|
57
|
+
root_id?: string;
|
|
58
|
+
};
|
|
59
|
+
export declare type CommandResponse = {
|
|
60
|
+
response_type: string;
|
|
61
|
+
text: string;
|
|
62
|
+
username: string;
|
|
63
|
+
channel_id: SVGAnimatedString;
|
|
64
|
+
icon_url: string;
|
|
65
|
+
type: string;
|
|
66
|
+
props: Record<string, any>;
|
|
67
|
+
goto_location: string;
|
|
68
|
+
trigger_id: string;
|
|
69
|
+
skip_slack_parsing: boolean;
|
|
70
|
+
attachments: MessageAttachment[];
|
|
71
|
+
extra_responses: CommandResponse[];
|
|
72
|
+
};
|
|
73
|
+
export declare type AutocompleteSuggestion = {
|
|
74
|
+
Complete: string;
|
|
75
|
+
Suggestion: string;
|
|
76
|
+
Hint: string;
|
|
77
|
+
Description: string;
|
|
78
|
+
IconData: string;
|
|
79
|
+
};
|
|
80
|
+
export declare type CommandAutocompleteSuggestion = AutocompleteSuggestion;
|
|
81
|
+
export declare type OAuthApp = {
|
|
82
|
+
'id': string;
|
|
83
|
+
'creator_id': string;
|
|
84
|
+
'create_at': number;
|
|
85
|
+
'update_at': number;
|
|
86
|
+
'client_secret': string;
|
|
87
|
+
'name': string;
|
|
88
|
+
'description': string;
|
|
89
|
+
'icon_url': string;
|
|
90
|
+
'callback_urls': string[];
|
|
91
|
+
'homepage': string;
|
|
92
|
+
'is_trusted': boolean;
|
|
93
|
+
};
|
|
94
|
+
export declare type IntegrationsState = {
|
|
95
|
+
incomingHooks: IDMappedObjects<IncomingWebhook>;
|
|
96
|
+
outgoingHooks: IDMappedObjects<OutgoingWebhook>;
|
|
97
|
+
oauthApps: IDMappedObjects<OAuthApp>;
|
|
98
|
+
appsOAuthAppIDs: string[];
|
|
99
|
+
appsBotIDs: string[];
|
|
100
|
+
systemCommands: IDMappedObjects<Command>;
|
|
101
|
+
commands: IDMappedObjects<Command>;
|
|
102
|
+
};
|
|
103
|
+
export declare type InteractiveDialogConfig = {
|
|
104
|
+
app_id: string;
|
|
105
|
+
trigger_id: string;
|
|
106
|
+
url: string;
|
|
107
|
+
dialog: {
|
|
108
|
+
callback_id: string;
|
|
109
|
+
title: string;
|
|
110
|
+
introduction_text: string;
|
|
111
|
+
icon_url?: string;
|
|
112
|
+
elements: DialogElement[];
|
|
113
|
+
submit_label: string;
|
|
114
|
+
notify_on_cancel: boolean;
|
|
115
|
+
state: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export declare type DialogSubmission = {
|
|
119
|
+
url: string;
|
|
120
|
+
callback_id: string;
|
|
121
|
+
state: string;
|
|
122
|
+
user_id: string;
|
|
123
|
+
channel_id: string;
|
|
124
|
+
team_id: string;
|
|
125
|
+
submission: {
|
|
126
|
+
[x: string]: string;
|
|
127
|
+
};
|
|
128
|
+
cancelled: boolean;
|
|
129
|
+
};
|
|
130
|
+
export declare type DialogElement = {
|
|
131
|
+
display_name: string;
|
|
132
|
+
name: string;
|
|
133
|
+
type: string;
|
|
134
|
+
subtype: string;
|
|
135
|
+
default: string;
|
|
136
|
+
placeholder: string;
|
|
137
|
+
help_text: string;
|
|
138
|
+
optional: boolean;
|
|
139
|
+
min_length: number;
|
|
140
|
+
max_length: number;
|
|
141
|
+
data_source: string;
|
|
142
|
+
options: Array<{
|
|
143
|
+
text: string;
|
|
144
|
+
value: any;
|
|
145
|
+
}>;
|
|
146
|
+
};
|
|
147
|
+
export declare type SubmitDialogResponse = {
|
|
148
|
+
error?: string;
|
|
149
|
+
errors?: Record<string, string>;
|
|
150
|
+
};
|
package/lib/jobs.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IDMappedObjects } from './utilities';
|
|
2
|
+
export declare type JobType = 'data_retention' | 'elasticsearch_post_indexing' | 'ldap_sync' | 'message_export';
|
|
3
|
+
export declare type JobStatus = 'pending' | 'in_progress' | 'success' | 'error' | 'cancel_requested' | 'canceled' | 'warning';
|
|
4
|
+
export declare type Job = JobTypeBase & {
|
|
5
|
+
id: string;
|
|
6
|
+
priority: number;
|
|
7
|
+
create_at: number;
|
|
8
|
+
start_at: number;
|
|
9
|
+
last_activity_at: number;
|
|
10
|
+
status: JobStatus;
|
|
11
|
+
progress: number;
|
|
12
|
+
data: any;
|
|
13
|
+
};
|
|
14
|
+
export declare type JobsByType = {
|
|
15
|
+
[x in JobType]?: Job[];
|
|
16
|
+
};
|
|
17
|
+
export declare type JobsState = {
|
|
18
|
+
jobs: IDMappedObjects<Job>;
|
|
19
|
+
jobsByTypeList: JobsByType;
|
|
20
|
+
};
|
|
21
|
+
export declare type JobTypeBase = {
|
|
22
|
+
type: JobType;
|
|
23
|
+
};
|
package/lib/jobs.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PluginManifest } from './plugins';
|
|
2
|
+
import { AppManifest } from './apps';
|
|
3
|
+
export declare type MarketplaceLabel = {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare enum HostingType {
|
|
10
|
+
OnPrem = "on-prem",
|
|
11
|
+
Cloud = "cloud"
|
|
12
|
+
}
|
|
13
|
+
export declare enum AuthorType {
|
|
14
|
+
Mattermost = "mattermost",
|
|
15
|
+
Partner = "partner",
|
|
16
|
+
Community = "community"
|
|
17
|
+
}
|
|
18
|
+
export declare enum ReleaseStage {
|
|
19
|
+
Production = "production",
|
|
20
|
+
Beta = "beta",
|
|
21
|
+
Experimental = "experimental"
|
|
22
|
+
}
|
|
23
|
+
interface MarketplaceBaseItem {
|
|
24
|
+
labels?: MarketplaceLabel[];
|
|
25
|
+
hosting?: HostingType;
|
|
26
|
+
author_type: AuthorType;
|
|
27
|
+
release_stage: ReleaseStage;
|
|
28
|
+
enterprise: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface MarketplacePlugin extends MarketplaceBaseItem {
|
|
31
|
+
manifest: PluginManifest;
|
|
32
|
+
icon_data?: string;
|
|
33
|
+
homepage_url?: string;
|
|
34
|
+
download_url?: string;
|
|
35
|
+
release_notes_url?: string;
|
|
36
|
+
installed_version?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface MarketplaceApp extends MarketplaceBaseItem {
|
|
39
|
+
manifest: AppManifest;
|
|
40
|
+
installed: boolean;
|
|
41
|
+
icon_url?: string;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
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.ReleaseStage = exports.AuthorType = exports.HostingType = void 0;
|
|
6
|
+
var HostingType;
|
|
7
|
+
(function (HostingType) {
|
|
8
|
+
HostingType["OnPrem"] = "on-prem";
|
|
9
|
+
HostingType["Cloud"] = "cloud";
|
|
10
|
+
})(HostingType = exports.HostingType || (exports.HostingType = {}));
|
|
11
|
+
var AuthorType;
|
|
12
|
+
(function (AuthorType) {
|
|
13
|
+
AuthorType["Mattermost"] = "mattermost";
|
|
14
|
+
AuthorType["Partner"] = "partner";
|
|
15
|
+
AuthorType["Community"] = "community";
|
|
16
|
+
})(AuthorType = exports.AuthorType || (exports.AuthorType = {}));
|
|
17
|
+
var ReleaseStage;
|
|
18
|
+
(function (ReleaseStage) {
|
|
19
|
+
ReleaseStage["Production"] = "production";
|
|
20
|
+
ReleaseStage["Beta"] = "beta";
|
|
21
|
+
ReleaseStage["Experimental"] = "experimental";
|
|
22
|
+
})(ReleaseStage = exports.ReleaseStage || (exports.ReleaseStage = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PostAction } from './integration_actions';
|
|
2
|
+
export declare type MessageAttachment = {
|
|
3
|
+
id: number;
|
|
4
|
+
fallback: string;
|
|
5
|
+
color: string;
|
|
6
|
+
pretext: string;
|
|
7
|
+
author_name: string;
|
|
8
|
+
author_link: string;
|
|
9
|
+
author_icon: string;
|
|
10
|
+
title: string;
|
|
11
|
+
title_link: string;
|
|
12
|
+
text: string;
|
|
13
|
+
fields: MessageAttachmentField[];
|
|
14
|
+
image_url: string;
|
|
15
|
+
thumb_url: string;
|
|
16
|
+
footer: string;
|
|
17
|
+
footer_icon: string;
|
|
18
|
+
timestamp: number | string;
|
|
19
|
+
actions?: PostAction[];
|
|
20
|
+
};
|
|
21
|
+
export declare type MessageAttachmentField = {
|
|
22
|
+
title: string;
|
|
23
|
+
value: any;
|
|
24
|
+
short: boolean;
|
|
25
|
+
};
|
package/lib/mfa.d.ts
ADDED
package/lib/mfa.js
ADDED