@mattermost/types 11.1.0-0 → 11.1.0-1
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 +71 -0
- package/lib/admin.d.ts +147 -0
- package/lib/apps.d.ts +191 -0
- package/lib/audits.d.ts +9 -0
- package/lib/autocomplete.d.ts +12 -0
- package/lib/bots.d.ts +15 -0
- package/lib/channel_bookmarks.d.ts +51 -0
- package/lib/channel_categories.d.ts +30 -0
- package/lib/channels.d.ts +190 -0
- package/lib/client4.d.ts +42 -0
- package/lib/cloud.d.ts +187 -0
- package/lib/compliance.d.ts +13 -0
- package/lib/config.d.ts +1035 -0
- package/lib/content_flagging.d.ts +24 -0
- package/lib/data_retention.d.ts +30 -0
- package/lib/drafts.d.ts +14 -0
- package/lib/emojis.d.ts +44 -0
- package/lib/errors.d.ts +8 -0
- package/lib/files.d.ts +41 -0
- package/lib/general.d.ts +16 -0
- package/lib/groups.d.ts +169 -0
- package/lib/hosted_customer.d.ts +7 -0
- package/lib/integration_actions.d.ts +20 -0
- package/lib/integrations.d.ts +187 -0
- package/lib/jobs.d.ts +23 -0
- package/lib/limits.d.ts +10 -0
- package/lib/marketplace.d.ts +42 -0
- package/lib/message_attachments.d.ts +24 -0
- package/lib/mfa.d.ts +4 -0
- package/lib/plugins.d.ts +136 -0
- package/lib/posts.d.ts +182 -0
- package/lib/preferences.d.ts +9 -0
- package/lib/product_notices.d.ts +26 -0
- package/lib/products.d.ts +8 -0
- package/lib/properties.d.ts +60 -0
- package/lib/reactions.d.ts +6 -0
- package/lib/remote_clusters.d.ts +35 -0
- package/lib/reports.d.ts +65 -0
- package/lib/requests.d.ts +53 -0
- package/lib/roles.d.ts +12 -0
- package/lib/saml.d.ts +10 -0
- package/lib/schedule_post.d.ts +27 -0
- package/lib/schemes.d.ts +29 -0
- package/lib/search.d.ts +29 -0
- package/lib/sessions.d.ts +15 -0
- package/lib/setup.d.ts +4 -0
- package/lib/shared_channels.d.ts +26 -0
- package/lib/store.d.ts +97 -0
- package/lib/teams.d.ts +99 -0
- package/lib/terms_of_service.d.ts +6 -0
- package/lib/threads.d.ts +63 -0
- package/lib/typing.d.ts +5 -0
- package/lib/users.d.ts +140 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Post } from './posts';
|
|
2
|
+
import type { NameMappedPropertyFields, PropertyValue } from './properties';
|
|
3
|
+
export type ContentFlaggingEvent = 'flagged' | 'assigned' | 'removed' | 'dismissed';
|
|
4
|
+
export type NotificationTarget = 'reviewers' | 'author' | 'reporter';
|
|
5
|
+
export type ContentFlaggingConfig = {
|
|
6
|
+
reasons: string[];
|
|
7
|
+
reporter_comment_required: boolean;
|
|
8
|
+
reviewer_comment_required: boolean;
|
|
9
|
+
notify_reporter_on_dismissal?: boolean;
|
|
10
|
+
notify_reporter_on_removal?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type ContentFlaggingState = {
|
|
13
|
+
settings?: ContentFlaggingConfig;
|
|
14
|
+
fields?: NameMappedPropertyFields;
|
|
15
|
+
postValues?: {
|
|
16
|
+
[key: Post['id']]: Array<PropertyValue<unknown>>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare enum ContentFlaggingStatus {
|
|
20
|
+
Pending = "Pending",
|
|
21
|
+
Assigned = "Assigned",
|
|
22
|
+
Removed = "Removed",
|
|
23
|
+
Retained = "Retained"
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type DataRetentionCustomPolicy = {
|
|
2
|
+
id: string;
|
|
3
|
+
display_name: string;
|
|
4
|
+
post_duration: number;
|
|
5
|
+
team_count: number;
|
|
6
|
+
channel_count: number;
|
|
7
|
+
};
|
|
8
|
+
export type CreateDataRetentionCustomPolicy = {
|
|
9
|
+
display_name: string;
|
|
10
|
+
post_duration: number;
|
|
11
|
+
channel_ids: string[];
|
|
12
|
+
team_ids: string[];
|
|
13
|
+
};
|
|
14
|
+
export type PatchDataRetentionCustomPolicy = {
|
|
15
|
+
display_name: string;
|
|
16
|
+
post_duration: number;
|
|
17
|
+
};
|
|
18
|
+
export type PatchDataRetentionCustomPolicyTeams = {
|
|
19
|
+
team_ids: string[];
|
|
20
|
+
};
|
|
21
|
+
export type PatchDataRetentionCustomPolicyChannels = {
|
|
22
|
+
channel_ids: string[];
|
|
23
|
+
};
|
|
24
|
+
export type DataRetentionCustomPolicies = {
|
|
25
|
+
[x: string]: DataRetentionCustomPolicy;
|
|
26
|
+
};
|
|
27
|
+
export type GetDataRetentionCustomPoliciesRequest = {
|
|
28
|
+
policies: DataRetentionCustomPolicy[];
|
|
29
|
+
total_count: number;
|
|
30
|
+
};
|
package/lib/drafts.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PostMetadata, PostPriorityMetadata } from './posts';
|
|
2
|
+
export type Draft = {
|
|
3
|
+
create_at: number;
|
|
4
|
+
update_at: number;
|
|
5
|
+
delete_at: number;
|
|
6
|
+
user_id: string;
|
|
7
|
+
channel_id: string;
|
|
8
|
+
root_id: string;
|
|
9
|
+
message: string;
|
|
10
|
+
props: Record<string, any>;
|
|
11
|
+
file_ids?: string[];
|
|
12
|
+
metadata?: PostMetadata;
|
|
13
|
+
priority?: PostPriorityMetadata;
|
|
14
|
+
};
|
package/lib/emojis.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type EmojiCategory = 'recent' | 'searchResults' | 'smileys-emotion' | 'people-body' | 'animals-nature' | 'food-drink' | 'activities' | 'travel-places' | 'objects' | 'symbols' | 'flags' | 'custom';
|
|
2
|
+
export 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 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, SystemEmojiVariation>;
|
|
20
|
+
unified: string;
|
|
21
|
+
};
|
|
22
|
+
export type SystemEmojiVariation = {
|
|
23
|
+
unified: string;
|
|
24
|
+
non_qualified: null;
|
|
25
|
+
image: string;
|
|
26
|
+
sheet_x: number;
|
|
27
|
+
sheet_y: number;
|
|
28
|
+
added_in: string;
|
|
29
|
+
has_img_apple: boolean;
|
|
30
|
+
has_img_google: boolean;
|
|
31
|
+
has_img_twitter: boolean;
|
|
32
|
+
has_img_facebook: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type Emoji = SystemEmoji | CustomEmoji;
|
|
35
|
+
export type EmojisState = {
|
|
36
|
+
customEmoji: {
|
|
37
|
+
[x: string]: CustomEmoji;
|
|
38
|
+
};
|
|
39
|
+
nonExistentEmoji: Set<string>;
|
|
40
|
+
};
|
|
41
|
+
export type RecentEmojiData = {
|
|
42
|
+
name: string;
|
|
43
|
+
usageCount: number;
|
|
44
|
+
};
|
package/lib/errors.d.ts
ADDED
package/lib/files.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type FileInfo = {
|
|
2
|
+
id: string;
|
|
3
|
+
user_id: string;
|
|
4
|
+
channel_id: string;
|
|
5
|
+
create_at: number;
|
|
6
|
+
update_at: number;
|
|
7
|
+
delete_at: number;
|
|
8
|
+
name: string;
|
|
9
|
+
extension: string;
|
|
10
|
+
size: number;
|
|
11
|
+
mime_type: string;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
has_preview_image: boolean;
|
|
15
|
+
clientId: string;
|
|
16
|
+
post_id?: string;
|
|
17
|
+
mini_preview?: string;
|
|
18
|
+
archived: boolean;
|
|
19
|
+
link?: string;
|
|
20
|
+
};
|
|
21
|
+
export type FilesState = {
|
|
22
|
+
files: Record<string, FileInfo>;
|
|
23
|
+
filesFromSearch: Record<string, FileSearchResultItem>;
|
|
24
|
+
fileIdsByPostId: Record<string, string[]>;
|
|
25
|
+
filePublicLink?: {
|
|
26
|
+
link: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type FileUploadResponse = {
|
|
30
|
+
file_infos: FileInfo[];
|
|
31
|
+
client_ids: string[];
|
|
32
|
+
};
|
|
33
|
+
export type FileSearchResultItem = FileInfo & {
|
|
34
|
+
channel_id: string;
|
|
35
|
+
};
|
|
36
|
+
export type FileSearchResults = {
|
|
37
|
+
order: Array<FileSearchResultItem['id']>;
|
|
38
|
+
file_infos: Map<string, FileSearchResultItem>;
|
|
39
|
+
next_file_info_id: string;
|
|
40
|
+
prev_file_info_id: string;
|
|
41
|
+
};
|
package/lib/general.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ClientConfig, ClientLicense } from './config';
|
|
2
|
+
import type { UserPropertyField } from './properties';
|
|
3
|
+
import type { IDMappedObjects } from './utilities';
|
|
4
|
+
export type GeneralState = {
|
|
5
|
+
config: Partial<ClientConfig>;
|
|
6
|
+
firstAdminVisitMarketplaceStatus: boolean;
|
|
7
|
+
firstAdminCompleteSetup: boolean;
|
|
8
|
+
license: ClientLicense;
|
|
9
|
+
serverVersion: string;
|
|
10
|
+
customProfileAttributes: IDMappedObjects<UserPropertyField>;
|
|
11
|
+
cwsAvailability: 'pending' | 'available' | 'unavailable' | 'not_applicable';
|
|
12
|
+
};
|
|
13
|
+
export type SystemSetting = {
|
|
14
|
+
name: string;
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
package/lib/groups.d.ts
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { UserProfile } from './users';
|
|
2
|
+
import type { RelationOneToOne } from './utilities';
|
|
3
|
+
export declare enum SyncableType {
|
|
4
|
+
Team = "team",
|
|
5
|
+
Channel = "channel"
|
|
6
|
+
}
|
|
7
|
+
export type SyncablePatch = {
|
|
8
|
+
scheme_admin: boolean;
|
|
9
|
+
auto_add: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type GroupPatch = {
|
|
12
|
+
allow_reference: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
};
|
|
15
|
+
export type CustomGroupPatch = {
|
|
16
|
+
name: string;
|
|
17
|
+
display_name: string;
|
|
18
|
+
};
|
|
19
|
+
export type Group = {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
display_name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
source: string;
|
|
25
|
+
remote_id: string | null;
|
|
26
|
+
create_at: number;
|
|
27
|
+
update_at: number;
|
|
28
|
+
delete_at: number;
|
|
29
|
+
has_syncables: boolean;
|
|
30
|
+
member_count: number;
|
|
31
|
+
scheme_admin: boolean;
|
|
32
|
+
allow_reference: boolean;
|
|
33
|
+
channel_member_count?: number;
|
|
34
|
+
channel_member_timezones_count?: number;
|
|
35
|
+
member_ids?: string[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Main sources for groups
|
|
39
|
+
*/
|
|
40
|
+
export declare enum GroupSource {
|
|
41
|
+
Ldap = "ldap",
|
|
42
|
+
Custom = "custom"
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Special prefixes that can be added to group sources when they come from plugins
|
|
46
|
+
* Used for identifying plugin-created groups by checking if source starts with this prefix
|
|
47
|
+
*/
|
|
48
|
+
export declare enum PluginGroupSourcePrefix {
|
|
49
|
+
Plugin = "plugin_"
|
|
50
|
+
}
|
|
51
|
+
export type GroupTeam = {
|
|
52
|
+
team_id: string;
|
|
53
|
+
team_display_name: string;
|
|
54
|
+
team_type?: string;
|
|
55
|
+
group_id?: string;
|
|
56
|
+
auto_add?: boolean;
|
|
57
|
+
scheme_admin?: boolean;
|
|
58
|
+
create_at?: number;
|
|
59
|
+
delete_at?: number;
|
|
60
|
+
update_at?: number;
|
|
61
|
+
};
|
|
62
|
+
export type GroupChannel = {
|
|
63
|
+
channel_id: string;
|
|
64
|
+
channel_display_name: string;
|
|
65
|
+
channel_type?: string;
|
|
66
|
+
team_id: string;
|
|
67
|
+
team_display_name: string;
|
|
68
|
+
team_type?: string;
|
|
69
|
+
group_id?: string;
|
|
70
|
+
auto_add?: boolean;
|
|
71
|
+
scheme_admin?: boolean;
|
|
72
|
+
create_at?: number;
|
|
73
|
+
delete_at?: number;
|
|
74
|
+
update_at?: number;
|
|
75
|
+
};
|
|
76
|
+
export type GroupSyncable = {
|
|
77
|
+
group_id: string;
|
|
78
|
+
auto_add: boolean;
|
|
79
|
+
scheme_admin: boolean;
|
|
80
|
+
create_at: number;
|
|
81
|
+
delete_at: number;
|
|
82
|
+
update_at: number;
|
|
83
|
+
type: 'Team' | 'Channel';
|
|
84
|
+
};
|
|
85
|
+
export type GroupSyncablesState = {
|
|
86
|
+
teams: GroupTeam[];
|
|
87
|
+
channels: GroupChannel[];
|
|
88
|
+
};
|
|
89
|
+
export type GroupsState = {
|
|
90
|
+
syncables: Record<string, GroupSyncablesState>;
|
|
91
|
+
stats: RelationOneToOne<Group, GroupStats>;
|
|
92
|
+
groups: Record<string, Group>;
|
|
93
|
+
myGroups: string[];
|
|
94
|
+
};
|
|
95
|
+
export type GroupStats = {
|
|
96
|
+
group_id: string;
|
|
97
|
+
total_member_count: number;
|
|
98
|
+
};
|
|
99
|
+
export type GroupSearchOpts = {
|
|
100
|
+
q: string;
|
|
101
|
+
is_linked?: boolean;
|
|
102
|
+
is_configured?: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type MixedUnlinkedGroup = {
|
|
105
|
+
mattermost_group_id?: string;
|
|
106
|
+
name: string;
|
|
107
|
+
primary_key: string;
|
|
108
|
+
has_syncables?: boolean;
|
|
109
|
+
};
|
|
110
|
+
export type MixedUnlinkedGroupRedux = MixedUnlinkedGroup & {
|
|
111
|
+
failed?: boolean;
|
|
112
|
+
};
|
|
113
|
+
export type UserWithGroup = UserProfile & {
|
|
114
|
+
groups: Group[];
|
|
115
|
+
scheme_guest: boolean;
|
|
116
|
+
scheme_user: boolean;
|
|
117
|
+
scheme_admin: boolean;
|
|
118
|
+
};
|
|
119
|
+
export type GroupsWithCount = {
|
|
120
|
+
groups: Group[];
|
|
121
|
+
total_group_count: number;
|
|
122
|
+
channelID?: string;
|
|
123
|
+
teamID?: string;
|
|
124
|
+
};
|
|
125
|
+
export type UsersWithGroupsAndCount = {
|
|
126
|
+
users: UserWithGroup[];
|
|
127
|
+
total_count: number;
|
|
128
|
+
};
|
|
129
|
+
export type GroupCreateWithUserIds = {
|
|
130
|
+
name: string;
|
|
131
|
+
allow_reference: boolean;
|
|
132
|
+
display_name: string;
|
|
133
|
+
source: string;
|
|
134
|
+
user_ids: string[];
|
|
135
|
+
description?: string;
|
|
136
|
+
};
|
|
137
|
+
export type GetGroupsParams = {
|
|
138
|
+
filter_allow_reference?: boolean;
|
|
139
|
+
page?: number;
|
|
140
|
+
per_page?: number;
|
|
141
|
+
include_member_count?: boolean;
|
|
142
|
+
include_archived?: boolean;
|
|
143
|
+
filter_archived?: boolean;
|
|
144
|
+
include_member_ids?: boolean;
|
|
145
|
+
};
|
|
146
|
+
export type GetGroupsForUserParams = GetGroupsParams & {
|
|
147
|
+
filter_has_member: string;
|
|
148
|
+
};
|
|
149
|
+
export type GroupSearchParams = GetGroupsParams & {
|
|
150
|
+
q: string;
|
|
151
|
+
filter_has_member?: string;
|
|
152
|
+
include_timezones?: string;
|
|
153
|
+
include_channel_member_count?: string;
|
|
154
|
+
};
|
|
155
|
+
export type GroupMember = {
|
|
156
|
+
group_id: string;
|
|
157
|
+
user_id: string;
|
|
158
|
+
create_at: number;
|
|
159
|
+
deleted_at: number;
|
|
160
|
+
};
|
|
161
|
+
export type GroupMembership = {
|
|
162
|
+
user_id: string;
|
|
163
|
+
roles: string;
|
|
164
|
+
};
|
|
165
|
+
export type GroupPermissions = {
|
|
166
|
+
can_delete: boolean;
|
|
167
|
+
can_manage_members: boolean;
|
|
168
|
+
can_restore: boolean;
|
|
169
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export 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
|
+
cookie?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function isPostAction(v: unknown): v is PostAction;
|
|
13
|
+
export type PostActionOption = {
|
|
14
|
+
text: string;
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
17
|
+
export type PostActionResponse = {
|
|
18
|
+
status: string;
|
|
19
|
+
trigger_id: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { MessageAttachment } from './message_attachments';
|
|
2
|
+
import type { IDMappedObjects } from './utilities';
|
|
3
|
+
export 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 type IncomingWebhooksWithCount = {
|
|
18
|
+
incoming_webhooks: IncomingWebhook[];
|
|
19
|
+
total_count: number;
|
|
20
|
+
};
|
|
21
|
+
export type OutgoingWebhook = {
|
|
22
|
+
id: string;
|
|
23
|
+
token: string;
|
|
24
|
+
create_at: number;
|
|
25
|
+
update_at: number;
|
|
26
|
+
delete_at: number;
|
|
27
|
+
creator_id: string;
|
|
28
|
+
channel_id: string;
|
|
29
|
+
team_id: string;
|
|
30
|
+
trigger_words: string[];
|
|
31
|
+
trigger_when: number;
|
|
32
|
+
callback_urls: string[];
|
|
33
|
+
display_name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
content_type: string;
|
|
36
|
+
username: string;
|
|
37
|
+
icon_url: string;
|
|
38
|
+
};
|
|
39
|
+
export type Command = {
|
|
40
|
+
'id': string;
|
|
41
|
+
'token': string;
|
|
42
|
+
'create_at': number;
|
|
43
|
+
'update_at': number;
|
|
44
|
+
'delete_at': number;
|
|
45
|
+
'creator_id': string;
|
|
46
|
+
'team_id': string;
|
|
47
|
+
'trigger': string;
|
|
48
|
+
'method': 'P' | 'G' | '';
|
|
49
|
+
'username': string;
|
|
50
|
+
'icon_url': string;
|
|
51
|
+
'auto_complete': boolean;
|
|
52
|
+
'auto_complete_desc': string;
|
|
53
|
+
'auto_complete_hint': string;
|
|
54
|
+
'display_name': string;
|
|
55
|
+
'description': string;
|
|
56
|
+
'url': string;
|
|
57
|
+
};
|
|
58
|
+
export type CommandArgs = {
|
|
59
|
+
channel_id: string;
|
|
60
|
+
team_id?: string;
|
|
61
|
+
root_id?: string;
|
|
62
|
+
};
|
|
63
|
+
export type DialogArgs = {
|
|
64
|
+
channel_id: string;
|
|
65
|
+
};
|
|
66
|
+
export type CommandResponse = {
|
|
67
|
+
response_type: string;
|
|
68
|
+
text: string;
|
|
69
|
+
username: string;
|
|
70
|
+
channel_id: SVGAnimatedString;
|
|
71
|
+
icon_url: string;
|
|
72
|
+
type: string;
|
|
73
|
+
props: Record<string, any>;
|
|
74
|
+
goto_location: string;
|
|
75
|
+
trigger_id: string;
|
|
76
|
+
skip_slack_parsing: boolean;
|
|
77
|
+
attachments: MessageAttachment[];
|
|
78
|
+
extra_responses: CommandResponse[];
|
|
79
|
+
};
|
|
80
|
+
export type AutocompleteSuggestion = {
|
|
81
|
+
Complete: string;
|
|
82
|
+
Suggestion: string;
|
|
83
|
+
Hint: string;
|
|
84
|
+
Description: string;
|
|
85
|
+
IconData: string;
|
|
86
|
+
type?: string;
|
|
87
|
+
};
|
|
88
|
+
export type CommandAutocompleteSuggestion = AutocompleteSuggestion;
|
|
89
|
+
export type OAuthApp = {
|
|
90
|
+
'id': string;
|
|
91
|
+
'creator_id': string;
|
|
92
|
+
'create_at': number;
|
|
93
|
+
'update_at': number;
|
|
94
|
+
'client_secret': string;
|
|
95
|
+
'name': string;
|
|
96
|
+
'description': string;
|
|
97
|
+
'icon_url': string;
|
|
98
|
+
'callback_urls': string[];
|
|
99
|
+
'homepage': string;
|
|
100
|
+
'is_trusted': boolean;
|
|
101
|
+
};
|
|
102
|
+
export type OutgoingOAuthConnection = {
|
|
103
|
+
'id': string;
|
|
104
|
+
'name': string;
|
|
105
|
+
'creator_id': string;
|
|
106
|
+
'create_at': number;
|
|
107
|
+
'update_at': number;
|
|
108
|
+
'client_id': string;
|
|
109
|
+
'client_secret'?: string;
|
|
110
|
+
'credentials_username'?: string;
|
|
111
|
+
'credentials_password'?: string;
|
|
112
|
+
'oauth_token_url': string;
|
|
113
|
+
'grant_type': 'client_credentials' | 'password';
|
|
114
|
+
'audiences': string[];
|
|
115
|
+
};
|
|
116
|
+
export type IntegrationsState = {
|
|
117
|
+
incomingHooks: IDMappedObjects<IncomingWebhook>;
|
|
118
|
+
incomingHooksTotalCount: number;
|
|
119
|
+
outgoingHooks: IDMappedObjects<OutgoingWebhook>;
|
|
120
|
+
oauthApps: IDMappedObjects<OAuthApp>;
|
|
121
|
+
outgoingOAuthConnections: IDMappedObjects<OutgoingOAuthConnection>;
|
|
122
|
+
appsOAuthAppIDs: string[];
|
|
123
|
+
appsBotIDs: string[];
|
|
124
|
+
systemCommands: IDMappedObjects<Command>;
|
|
125
|
+
commands: IDMappedObjects<Command>;
|
|
126
|
+
dialogArguments?: DialogArgs;
|
|
127
|
+
dialogTriggerId: string;
|
|
128
|
+
dialog?: {
|
|
129
|
+
url: string;
|
|
130
|
+
dialog: Dialog;
|
|
131
|
+
trigger_id: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
type Dialog = {
|
|
135
|
+
callback_id?: string;
|
|
136
|
+
elements?: DialogElement[];
|
|
137
|
+
title: string;
|
|
138
|
+
introduction_text?: string;
|
|
139
|
+
icon_url?: string;
|
|
140
|
+
submit_label?: string;
|
|
141
|
+
notify_on_cancel?: boolean;
|
|
142
|
+
state?: string;
|
|
143
|
+
source_url?: string;
|
|
144
|
+
};
|
|
145
|
+
export type DialogSubmission = {
|
|
146
|
+
url?: string;
|
|
147
|
+
callback_id: string;
|
|
148
|
+
state: string;
|
|
149
|
+
user_id: string;
|
|
150
|
+
channel_id: string;
|
|
151
|
+
team_id: string;
|
|
152
|
+
submission: {
|
|
153
|
+
[x: string]: string | string[];
|
|
154
|
+
};
|
|
155
|
+
cancelled: boolean;
|
|
156
|
+
type?: string;
|
|
157
|
+
};
|
|
158
|
+
export type DialogElement = {
|
|
159
|
+
display_name: string;
|
|
160
|
+
name: string;
|
|
161
|
+
type: string;
|
|
162
|
+
subtype: string;
|
|
163
|
+
default: string;
|
|
164
|
+
placeholder: string;
|
|
165
|
+
help_text: string;
|
|
166
|
+
optional: boolean;
|
|
167
|
+
min_length: number;
|
|
168
|
+
max_length: number;
|
|
169
|
+
data_source: string;
|
|
170
|
+
data_source_url?: string;
|
|
171
|
+
multiselect?: boolean;
|
|
172
|
+
options: Array<{
|
|
173
|
+
text: string;
|
|
174
|
+
value: any;
|
|
175
|
+
}>;
|
|
176
|
+
refresh?: boolean;
|
|
177
|
+
min_date?: string;
|
|
178
|
+
max_date?: string;
|
|
179
|
+
time_interval?: number;
|
|
180
|
+
};
|
|
181
|
+
export type SubmitDialogResponse = {
|
|
182
|
+
error?: string;
|
|
183
|
+
errors?: Record<string, string>;
|
|
184
|
+
type?: string;
|
|
185
|
+
form?: Dialog;
|
|
186
|
+
};
|
|
187
|
+
export {};
|
package/lib/jobs.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IDMappedObjects } from './utilities';
|
|
2
|
+
export type JobType = 'data_retention' | 'elasticsearch_post_indexing' | 'bleve_post_indexing' | 'ldap_sync' | 'message_export' | 'access_control_sync';
|
|
3
|
+
export type JobStatus = 'pending' | 'in_progress' | 'success' | 'error' | 'cancel_requested' | 'canceled' | 'warning';
|
|
4
|
+
export 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 type JobsByType = {
|
|
15
|
+
[x in JobType]?: Job[];
|
|
16
|
+
};
|
|
17
|
+
export type JobsState = {
|
|
18
|
+
jobs: IDMappedObjects<Job>;
|
|
19
|
+
jobsByTypeList: JobsByType;
|
|
20
|
+
};
|
|
21
|
+
export type JobTypeBase = {
|
|
22
|
+
type: JobType;
|
|
23
|
+
};
|
package/lib/limits.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { AppManifest } from './apps';
|
|
2
|
+
import type { PluginManifest } from './plugins';
|
|
3
|
+
export type MarketplaceLabel = {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare enum HostingType {
|
|
9
|
+
OnPrem = "on-prem",
|
|
10
|
+
Cloud = "cloud"
|
|
11
|
+
}
|
|
12
|
+
export declare enum AuthorType {
|
|
13
|
+
Mattermost = "mattermost",
|
|
14
|
+
Partner = "partner",
|
|
15
|
+
Community = "community"
|
|
16
|
+
}
|
|
17
|
+
export declare enum ReleaseStage {
|
|
18
|
+
Production = "production",
|
|
19
|
+
Beta = "beta",
|
|
20
|
+
Experimental = "experimental"
|
|
21
|
+
}
|
|
22
|
+
interface MarketplaceBaseItem {
|
|
23
|
+
labels?: MarketplaceLabel[];
|
|
24
|
+
hosting?: HostingType;
|
|
25
|
+
author_type: AuthorType;
|
|
26
|
+
release_stage: ReleaseStage;
|
|
27
|
+
enterprise: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface MarketplacePlugin extends MarketplaceBaseItem {
|
|
30
|
+
manifest: PluginManifest;
|
|
31
|
+
icon_data?: string;
|
|
32
|
+
homepage_url?: string;
|
|
33
|
+
download_url?: string;
|
|
34
|
+
release_notes_url?: string;
|
|
35
|
+
installed_version?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface MarketplaceApp extends MarketplaceBaseItem {
|
|
38
|
+
manifest: AppManifest;
|
|
39
|
+
installed: boolean;
|
|
40
|
+
icon_url?: string;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type PostAction } from './integration_actions';
|
|
2
|
+
export type MessageAttachment = {
|
|
3
|
+
fallback?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
pretext?: string;
|
|
6
|
+
author_name?: string;
|
|
7
|
+
author_link?: string;
|
|
8
|
+
author_icon?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
title_link?: string;
|
|
11
|
+
text?: string;
|
|
12
|
+
fields?: MessageAttachmentField[] | null;
|
|
13
|
+
image_url?: string;
|
|
14
|
+
thumb_url?: string;
|
|
15
|
+
footer?: string;
|
|
16
|
+
footer_icon?: string;
|
|
17
|
+
actions?: PostAction[];
|
|
18
|
+
};
|
|
19
|
+
export declare function isMessageAttachmentArray(v: unknown): v is MessageAttachment[];
|
|
20
|
+
export type MessageAttachmentField = {
|
|
21
|
+
title?: string;
|
|
22
|
+
value?: unknown;
|
|
23
|
+
short?: boolean;
|
|
24
|
+
};
|
package/lib/mfa.d.ts
ADDED