@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
package/lib/plugins.d.ts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
type MessageDescriptor = {
|
|
2
|
+
id: string;
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
};
|
|
5
|
+
export type PluginManifest = {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
homepage_url?: string;
|
|
10
|
+
support_url?: string;
|
|
11
|
+
release_notes_url?: string;
|
|
12
|
+
icon_path?: string;
|
|
13
|
+
version: string;
|
|
14
|
+
min_server_version?: string;
|
|
15
|
+
translate?: boolean;
|
|
16
|
+
server?: PluginManifestServer;
|
|
17
|
+
backend?: PluginManifestServer;
|
|
18
|
+
webapp?: PluginManifestWebapp;
|
|
19
|
+
settings_schema?: PluginSettingsSchema;
|
|
20
|
+
props?: Record<string, any>;
|
|
21
|
+
};
|
|
22
|
+
export type PluginRedux = PluginManifest & {
|
|
23
|
+
active: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type PluginManifestServer = {
|
|
26
|
+
executables?: {
|
|
27
|
+
'linux-amd64'?: string;
|
|
28
|
+
'darwin-amd64'?: string;
|
|
29
|
+
'windows-amd64'?: string;
|
|
30
|
+
};
|
|
31
|
+
executable: string;
|
|
32
|
+
};
|
|
33
|
+
export type PluginManifestWebapp = {
|
|
34
|
+
bundle_path: string;
|
|
35
|
+
};
|
|
36
|
+
export type PluginSettingsSchema = {
|
|
37
|
+
header: string;
|
|
38
|
+
footer: string;
|
|
39
|
+
settings: PluginSetting[];
|
|
40
|
+
sections?: PluginSettingSection[];
|
|
41
|
+
};
|
|
42
|
+
export type PluginSettingSection = {
|
|
43
|
+
key: string;
|
|
44
|
+
title?: string;
|
|
45
|
+
subtitle?: string;
|
|
46
|
+
settings: PluginSetting[];
|
|
47
|
+
header?: string;
|
|
48
|
+
footer?: string;
|
|
49
|
+
custom?: boolean;
|
|
50
|
+
fallback?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export type PluginSetting = {
|
|
53
|
+
key: string;
|
|
54
|
+
display_name: string;
|
|
55
|
+
type: string;
|
|
56
|
+
help_text: string | MessageDescriptor;
|
|
57
|
+
regenerate_help_text?: string;
|
|
58
|
+
placeholder: string;
|
|
59
|
+
default: any;
|
|
60
|
+
options?: PluginSettingOption[];
|
|
61
|
+
hosting?: 'on-prem' | 'cloud';
|
|
62
|
+
};
|
|
63
|
+
export type PluginSettingOption = {
|
|
64
|
+
display_name: string;
|
|
65
|
+
value: string;
|
|
66
|
+
};
|
|
67
|
+
export type PluginsResponse = {
|
|
68
|
+
active: PluginManifest[];
|
|
69
|
+
inactive: PluginManifest[];
|
|
70
|
+
};
|
|
71
|
+
export type PluginStatus = {
|
|
72
|
+
plugin_id: string;
|
|
73
|
+
cluster_id: string;
|
|
74
|
+
plugin_path: string;
|
|
75
|
+
state: number;
|
|
76
|
+
name: string;
|
|
77
|
+
description: string;
|
|
78
|
+
version: string;
|
|
79
|
+
};
|
|
80
|
+
type PluginInstance = {
|
|
81
|
+
cluster_id: string;
|
|
82
|
+
version: string;
|
|
83
|
+
state: number;
|
|
84
|
+
};
|
|
85
|
+
export type PluginStatusRedux = {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
description: string;
|
|
89
|
+
version: string;
|
|
90
|
+
active: boolean;
|
|
91
|
+
state: number;
|
|
92
|
+
error?: string;
|
|
93
|
+
instances: PluginInstance[];
|
|
94
|
+
};
|
|
95
|
+
export type ClientPluginManifest = {
|
|
96
|
+
id: string;
|
|
97
|
+
min_server_version?: string;
|
|
98
|
+
version: string;
|
|
99
|
+
webapp: {
|
|
100
|
+
bundle_path: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export type MarketplaceLabel = {
|
|
104
|
+
name: string;
|
|
105
|
+
description?: string;
|
|
106
|
+
url?: string;
|
|
107
|
+
color?: string;
|
|
108
|
+
};
|
|
109
|
+
export declare enum HostingType {
|
|
110
|
+
OnPrem = "on-prem",
|
|
111
|
+
Cloud = "cloud"
|
|
112
|
+
}
|
|
113
|
+
export declare enum AuthorType {
|
|
114
|
+
Mattermost = "mattermost",
|
|
115
|
+
Partner = "partner",
|
|
116
|
+
Community = "community"
|
|
117
|
+
}
|
|
118
|
+
export declare enum ReleaseStage {
|
|
119
|
+
Production = "production",
|
|
120
|
+
Beta = "beta",
|
|
121
|
+
Experimental = "experimental"
|
|
122
|
+
}
|
|
123
|
+
export type MarketplacePlugin = {
|
|
124
|
+
homepage_url?: string;
|
|
125
|
+
icon_data?: string;
|
|
126
|
+
download_url?: string;
|
|
127
|
+
release_notes_url?: string;
|
|
128
|
+
labels?: MarketplaceLabel[];
|
|
129
|
+
hosting?: HostingType;
|
|
130
|
+
author_type: AuthorType;
|
|
131
|
+
release_stage: ReleaseStage;
|
|
132
|
+
enterprise: boolean;
|
|
133
|
+
manifest: PluginManifest;
|
|
134
|
+
installed_version?: string;
|
|
135
|
+
};
|
|
136
|
+
export {};
|
package/lib/posts.d.ts
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type { Channel, ChannelType } from './channels';
|
|
2
|
+
import type { CustomEmoji } from './emojis';
|
|
3
|
+
import type { FileInfo } from './files';
|
|
4
|
+
import type { Reaction } from './reactions';
|
|
5
|
+
import type { TeamType } from './teams';
|
|
6
|
+
import type { UserProfile } from './users';
|
|
7
|
+
import { type RelationOneToOne, type RelationOneToMany, type IDMappedObjects } from './utilities';
|
|
8
|
+
export type PostType = 'system_add_remove' | 'system_add_to_channel' | 'system_add_to_team' | 'system_channel_deleted' | 'system_channel_restored' | 'system_displayname_change' | 'system_convert_channel' | 'system_ephemeral' | 'system_header_change' | 'system_join_channel' | 'system_join_leave' | 'system_leave_channel' | 'system_purpose_change' | 'system_remove_from_channel' | 'system_combined_user_activity' | 'system_fake_parent_deleted' | 'system_generic' | 'reminder' | 'system_wrangler' | 'custom_spillage_report' | '';
|
|
9
|
+
export type PostEmbedType = 'image' | 'link' | 'message_attachment' | 'opengraph' | 'permalink';
|
|
10
|
+
export type PostEmbed = {
|
|
11
|
+
type: PostEmbedType;
|
|
12
|
+
url: string;
|
|
13
|
+
data?: OpenGraphMetadata | PostPreviewMetadata;
|
|
14
|
+
};
|
|
15
|
+
export type PostImage = {
|
|
16
|
+
format: string;
|
|
17
|
+
frameCount: number;
|
|
18
|
+
height: number;
|
|
19
|
+
width: number;
|
|
20
|
+
};
|
|
21
|
+
export type PostAcknowledgement = {
|
|
22
|
+
post_id: Post['id'];
|
|
23
|
+
user_id: UserProfile['id'];
|
|
24
|
+
acknowledged_at: number;
|
|
25
|
+
};
|
|
26
|
+
export type PostPriorityMetadata = {
|
|
27
|
+
priority: PostPriority | '';
|
|
28
|
+
requested_ack?: boolean;
|
|
29
|
+
persistent_notifications?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type PostMetadata = {
|
|
32
|
+
embeds: PostEmbed[];
|
|
33
|
+
emojis: CustomEmoji[];
|
|
34
|
+
files: FileInfo[];
|
|
35
|
+
images: Record<string, PostImage>;
|
|
36
|
+
reactions?: Reaction[];
|
|
37
|
+
priority?: PostPriorityMetadata;
|
|
38
|
+
acknowledgements?: PostAcknowledgement[];
|
|
39
|
+
};
|
|
40
|
+
export type Post = {
|
|
41
|
+
id: string;
|
|
42
|
+
create_at: number;
|
|
43
|
+
update_at: number;
|
|
44
|
+
edit_at: number;
|
|
45
|
+
delete_at: number;
|
|
46
|
+
is_pinned: boolean;
|
|
47
|
+
user_id: string;
|
|
48
|
+
channel_id: string;
|
|
49
|
+
root_id: string;
|
|
50
|
+
original_id: string;
|
|
51
|
+
message: string;
|
|
52
|
+
type: PostType;
|
|
53
|
+
props: Record<string, unknown>;
|
|
54
|
+
hashtags: string;
|
|
55
|
+
pending_post_id: string;
|
|
56
|
+
reply_count: number;
|
|
57
|
+
file_ids?: string[];
|
|
58
|
+
metadata: PostMetadata;
|
|
59
|
+
failed?: boolean;
|
|
60
|
+
user_activity_posts?: Post[];
|
|
61
|
+
state?: PostState;
|
|
62
|
+
filenames?: string[];
|
|
63
|
+
last_reply_at?: number;
|
|
64
|
+
participants?: any;
|
|
65
|
+
message_source?: string;
|
|
66
|
+
is_following?: boolean;
|
|
67
|
+
exists?: boolean;
|
|
68
|
+
remote_id?: string;
|
|
69
|
+
};
|
|
70
|
+
export type PostState = 'DELETED';
|
|
71
|
+
export declare enum PostPriority {
|
|
72
|
+
URGENT = "urgent",
|
|
73
|
+
IMPORTANT = "important"
|
|
74
|
+
}
|
|
75
|
+
export type PostList = {
|
|
76
|
+
order: Array<Post['id']>;
|
|
77
|
+
posts: Record<string, Post>;
|
|
78
|
+
next_post_id: string;
|
|
79
|
+
prev_post_id: string;
|
|
80
|
+
first_inaccessible_post_time: number;
|
|
81
|
+
};
|
|
82
|
+
export type PaginatedPostList = PostList & {
|
|
83
|
+
has_next: boolean;
|
|
84
|
+
};
|
|
85
|
+
export type PostSearchResults = PostList & {
|
|
86
|
+
matches: RelationOneToOne<Post, string[]>;
|
|
87
|
+
};
|
|
88
|
+
export type PostOrderBlock = {
|
|
89
|
+
order: string[];
|
|
90
|
+
recent?: boolean;
|
|
91
|
+
oldest?: boolean;
|
|
92
|
+
};
|
|
93
|
+
export type MessageHistory = {
|
|
94
|
+
messages: string[];
|
|
95
|
+
index: {
|
|
96
|
+
post: number;
|
|
97
|
+
comment: number;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export type PostsState = {
|
|
101
|
+
posts: IDMappedObjects<Post>;
|
|
102
|
+
postsReplies: {
|
|
103
|
+
[x in Post['id']]: number;
|
|
104
|
+
};
|
|
105
|
+
postsInChannel: Record<string, PostOrderBlock[]>;
|
|
106
|
+
postsInThread: RelationOneToMany<Post, Post>;
|
|
107
|
+
reactions: RelationOneToOne<Post, Record<string, Reaction>>;
|
|
108
|
+
openGraph: RelationOneToOne<Post, Record<string, OpenGraphMetadata>>;
|
|
109
|
+
pendingPostIds: string[];
|
|
110
|
+
postEditHistory: Post[];
|
|
111
|
+
currentFocusedPostId: string;
|
|
112
|
+
messagesHistory: MessageHistory;
|
|
113
|
+
limitedViews: {
|
|
114
|
+
channels: Record<Channel['id'], number>;
|
|
115
|
+
threads: Record<Post['root_id'], number>;
|
|
116
|
+
};
|
|
117
|
+
acknowledgements: RelationOneToOne<Post, Record<UserProfile['id'], number>>;
|
|
118
|
+
};
|
|
119
|
+
export declare type OpenGraphMetadataImage = {
|
|
120
|
+
secure_url?: string;
|
|
121
|
+
url: string;
|
|
122
|
+
type?: string;
|
|
123
|
+
height?: number;
|
|
124
|
+
width?: number;
|
|
125
|
+
};
|
|
126
|
+
export declare type OpenGraphMetadata = {
|
|
127
|
+
type?: string;
|
|
128
|
+
title?: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
site_name?: string;
|
|
131
|
+
url?: string;
|
|
132
|
+
images: OpenGraphMetadataImage[];
|
|
133
|
+
};
|
|
134
|
+
export declare type PostPreviewMetadata = {
|
|
135
|
+
post_id: string;
|
|
136
|
+
post?: Post;
|
|
137
|
+
channel_display_name: string;
|
|
138
|
+
team_name: string;
|
|
139
|
+
channel_type: ChannelType;
|
|
140
|
+
channel_id: string;
|
|
141
|
+
};
|
|
142
|
+
export declare type PostsUsageResponse = {
|
|
143
|
+
count: number;
|
|
144
|
+
};
|
|
145
|
+
export declare type FilesUsageResponse = {
|
|
146
|
+
bytes: number;
|
|
147
|
+
};
|
|
148
|
+
export declare type TeamsUsageResponse = {
|
|
149
|
+
active: number;
|
|
150
|
+
cloud_archived: number;
|
|
151
|
+
};
|
|
152
|
+
export type PostAnalytics = {
|
|
153
|
+
channel_id: string;
|
|
154
|
+
post_id: string;
|
|
155
|
+
user_actual_id: string;
|
|
156
|
+
root_id: string;
|
|
157
|
+
priority?: PostPriority | '';
|
|
158
|
+
requested_ack?: boolean;
|
|
159
|
+
persistent_notifications?: boolean;
|
|
160
|
+
};
|
|
161
|
+
export type ActivityEntry = {
|
|
162
|
+
postType: Post['type'];
|
|
163
|
+
actorId: string[];
|
|
164
|
+
userIds: string[];
|
|
165
|
+
usernames: string[];
|
|
166
|
+
};
|
|
167
|
+
export type PostInfo = {
|
|
168
|
+
channel_id: string;
|
|
169
|
+
channel_type: ChannelType;
|
|
170
|
+
channel_display_name: string;
|
|
171
|
+
has_joined_channel: boolean;
|
|
172
|
+
team_id: string;
|
|
173
|
+
team_type: TeamType;
|
|
174
|
+
team_display_name: string;
|
|
175
|
+
has_joined_team: boolean;
|
|
176
|
+
};
|
|
177
|
+
export type NotificationStatus = 'error' | 'not_sent' | 'unsupported' | 'success';
|
|
178
|
+
export type NotificationResult = {
|
|
179
|
+
status: NotificationStatus;
|
|
180
|
+
reason?: string;
|
|
181
|
+
data?: string;
|
|
182
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum Action {
|
|
2
|
+
URL = "url"
|
|
3
|
+
}
|
|
4
|
+
export type ProductNotice = {
|
|
5
|
+
/** Unique identifier for this notice. Can be a running number. Used for storing 'viewed' state on the server. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Notice title. Use {{Mattermost}} instead of plain text to support white-labeling. Text supports Markdown. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Notice content. Use {{Mattermost}} instead of plain text to support white-labeling. Text supports Markdown. */
|
|
10
|
+
description: string;
|
|
11
|
+
image?: string;
|
|
12
|
+
/** Optional override for the action button text (defaults to OK) */
|
|
13
|
+
actionText?: string;
|
|
14
|
+
/** Optional action to perform on action button click. (defaults to closing the notice) */
|
|
15
|
+
action?: Action;
|
|
16
|
+
/** Optional action parameter.
|
|
17
|
+
* Example: {"action": "url", actionParam: "/console/some-page"}
|
|
18
|
+
*/
|
|
19
|
+
actionParam?: string;
|
|
20
|
+
sysAdminOnly: boolean;
|
|
21
|
+
teamAdminOnly: boolean;
|
|
22
|
+
};
|
|
23
|
+
/** List of product notices. Order is important and is used to resolve priorities.
|
|
24
|
+
* Each notice will only be show if conditions are met.
|
|
25
|
+
*/
|
|
26
|
+
export type ProductNotices = ProductNotice[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - `null` - explicitly Channels
|
|
3
|
+
* - `string` - uuid - any other product
|
|
4
|
+
*/
|
|
5
|
+
export type ProductIdentifier = null | string;
|
|
6
|
+
/** @see {@link ProductIdentifier} */
|
|
7
|
+
export type ProductScope = ProductIdentifier | ProductIdentifier[];
|
|
8
|
+
export declare function isProductScope(v: unknown): v is ProductScope;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type FieldType = ('text' | 'select' | 'multiselect' | 'date' | 'user' | 'multiuser');
|
|
2
|
+
export type PropertyField = {
|
|
3
|
+
id: string;
|
|
4
|
+
group_id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: FieldType;
|
|
7
|
+
attrs?: {
|
|
8
|
+
subType?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
target_id?: string;
|
|
12
|
+
target_type?: string;
|
|
13
|
+
create_at: number;
|
|
14
|
+
update_at: number;
|
|
15
|
+
delete_at: number;
|
|
16
|
+
};
|
|
17
|
+
export type NameMappedPropertyFields = {
|
|
18
|
+
[key: PropertyField['name']]: PropertyField;
|
|
19
|
+
};
|
|
20
|
+
export type PropertyValue<T> = {
|
|
21
|
+
id: string;
|
|
22
|
+
target_id: string;
|
|
23
|
+
target_type: string;
|
|
24
|
+
group_id: string;
|
|
25
|
+
field_id: string;
|
|
26
|
+
value: T;
|
|
27
|
+
create_at: number;
|
|
28
|
+
update_at: number;
|
|
29
|
+
delete_at: number;
|
|
30
|
+
};
|
|
31
|
+
export type UserPropertyFieldType = 'text' | 'select' | 'multiselect';
|
|
32
|
+
export type UserPropertyFieldGroupID = 'custom_profile_attributes';
|
|
33
|
+
export type UserPropertyValueType = 'phone' | 'url' | '';
|
|
34
|
+
export type FieldVisibility = 'always' | 'hidden' | 'when_set';
|
|
35
|
+
export type FieldValueType = 'email' | 'url' | 'phone' | '';
|
|
36
|
+
export type PropertyFieldOption = {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
color?: string;
|
|
40
|
+
};
|
|
41
|
+
export type UserPropertyField = PropertyField & {
|
|
42
|
+
group_id: UserPropertyFieldGroupID;
|
|
43
|
+
attrs: {
|
|
44
|
+
sort_order: number;
|
|
45
|
+
visibility: FieldVisibility;
|
|
46
|
+
value_type: FieldValueType;
|
|
47
|
+
options?: PropertyFieldOption[];
|
|
48
|
+
ldap?: string;
|
|
49
|
+
saml?: string;
|
|
50
|
+
managed?: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export type SelectPropertyField = PropertyField & {
|
|
54
|
+
attrs?: {
|
|
55
|
+
editable?: boolean;
|
|
56
|
+
options?: PropertyFieldOption[];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const supportsOptions: (field: UserPropertyField) => boolean;
|
|
60
|
+
export type UserPropertyFieldPatch = Partial<Pick<UserPropertyField, 'name' | 'attrs' | 'type'>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type RemoteClusterInvite = {
|
|
2
|
+
remote_id: string;
|
|
3
|
+
remote_team_id: string;
|
|
4
|
+
site_url: string;
|
|
5
|
+
token: string;
|
|
6
|
+
};
|
|
7
|
+
export type RemoteClusterAcceptInvite = {
|
|
8
|
+
name: string;
|
|
9
|
+
display_name: string;
|
|
10
|
+
default_team_id: string;
|
|
11
|
+
invite: string;
|
|
12
|
+
password: string;
|
|
13
|
+
};
|
|
14
|
+
export type RemoteClusterPatch = Pick<RemoteCluster, 'display_name' | 'default_team_id'>;
|
|
15
|
+
export declare function isRemoteClusterPatch(x: Partial<RemoteClusterPatch>): x is RemoteClusterPatch;
|
|
16
|
+
export type RemoteCluster = {
|
|
17
|
+
remote_id: string;
|
|
18
|
+
remote_team_id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
display_name: string;
|
|
21
|
+
site_url: string;
|
|
22
|
+
create_at: number;
|
|
23
|
+
delete_at: number;
|
|
24
|
+
last_ping_at: number;
|
|
25
|
+
token?: string;
|
|
26
|
+
remote_token?: string;
|
|
27
|
+
topics: string;
|
|
28
|
+
creator_id: string;
|
|
29
|
+
plugin_id: string;
|
|
30
|
+
options: number;
|
|
31
|
+
default_team_id: string;
|
|
32
|
+
};
|
|
33
|
+
export type RemoteClusterWithPassword = RemoteCluster & {
|
|
34
|
+
password: string;
|
|
35
|
+
};
|
package/lib/reports.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { 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
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type RequestStatusOption = 'not_started' | 'started' | 'success' | 'failure' | 'cancelled';
|
|
2
|
+
export type RequestStatusType = {
|
|
3
|
+
status: RequestStatusOption;
|
|
4
|
+
error: null | Record<string, any>;
|
|
5
|
+
};
|
|
6
|
+
export type ChannelsRequestsStatuses = {
|
|
7
|
+
getChannels: RequestStatusType;
|
|
8
|
+
getAllChannels: RequestStatusType;
|
|
9
|
+
myChannels: RequestStatusType;
|
|
10
|
+
createChannel: RequestStatusType;
|
|
11
|
+
};
|
|
12
|
+
export type GeneralRequestsStatuses = {
|
|
13
|
+
websocket: RequestStatusType;
|
|
14
|
+
};
|
|
15
|
+
export type PostsRequestsStatuses = {
|
|
16
|
+
createPost: RequestStatusType;
|
|
17
|
+
editPost: RequestStatusType;
|
|
18
|
+
getPostThread: RequestStatusType;
|
|
19
|
+
};
|
|
20
|
+
export type ThreadsRequestStatuses = {
|
|
21
|
+
getThreads: RequestStatusType;
|
|
22
|
+
};
|
|
23
|
+
export type TeamsRequestsStatuses = {
|
|
24
|
+
getTeams: RequestStatusType;
|
|
25
|
+
};
|
|
26
|
+
export type UsersRequestsStatuses = {
|
|
27
|
+
login: RequestStatusType;
|
|
28
|
+
logout: RequestStatusType;
|
|
29
|
+
autocompleteUsers: RequestStatusType;
|
|
30
|
+
updateMe: RequestStatusType;
|
|
31
|
+
};
|
|
32
|
+
export type AdminRequestsStatuses = {
|
|
33
|
+
createCompliance: RequestStatusType;
|
|
34
|
+
};
|
|
35
|
+
export type EmojisRequestsStatuses = {
|
|
36
|
+
createCustomEmoji: RequestStatusType;
|
|
37
|
+
getCustomEmojis: RequestStatusType;
|
|
38
|
+
deleteCustomEmoji: RequestStatusType;
|
|
39
|
+
getCustomEmoji: RequestStatusType;
|
|
40
|
+
};
|
|
41
|
+
export type FilesRequestsStatuses = {
|
|
42
|
+
uploadFiles: RequestStatusType;
|
|
43
|
+
};
|
|
44
|
+
export type RolesRequestsStatuses = {
|
|
45
|
+
getRolesByNames: RequestStatusType;
|
|
46
|
+
getRoleByName: RequestStatusType;
|
|
47
|
+
getRole: RequestStatusType;
|
|
48
|
+
editRole: RequestStatusType;
|
|
49
|
+
};
|
|
50
|
+
export type SearchRequestsStatuses = {
|
|
51
|
+
flaggedPosts: RequestStatusType;
|
|
52
|
+
pinnedPosts: RequestStatusType;
|
|
53
|
+
};
|
package/lib/roles.d.ts
ADDED
package/lib/saml.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type SamlCertificateStatus = {
|
|
2
|
+
idp_certificate_file: string;
|
|
3
|
+
private_key_file: string;
|
|
4
|
+
public_certificate_file: string;
|
|
5
|
+
};
|
|
6
|
+
export type SamlMetadataResponse = {
|
|
7
|
+
idp_descriptor_url: string;
|
|
8
|
+
idp_url: string;
|
|
9
|
+
idp_public_certificate: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Draft } from './drafts';
|
|
2
|
+
import type { Post } from './posts';
|
|
3
|
+
export type ScheduledPostErrorCode = 'unknown' | 'channel_archived' | 'channel_not_found' | 'user_missing' | 'user_deleted' | 'no_channel_permission' | 'no_channel_member' | 'thread_deleted' | 'unable_to_send' | 'invalid_post';
|
|
4
|
+
export type SchedulingInfo = {
|
|
5
|
+
scheduled_at: number;
|
|
6
|
+
processed_at?: number;
|
|
7
|
+
error_code?: ScheduledPostErrorCode;
|
|
8
|
+
};
|
|
9
|
+
export type ScheduledPost = Omit<Draft, 'delete_at'> & SchedulingInfo & {
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
export type ScheduledPostsState = {
|
|
13
|
+
byId: {
|
|
14
|
+
[scheduledPostId: string]: ScheduledPost | undefined;
|
|
15
|
+
};
|
|
16
|
+
byTeamId: {
|
|
17
|
+
[teamId: string]: string[];
|
|
18
|
+
};
|
|
19
|
+
errorsByTeamId: {
|
|
20
|
+
[teamId: string]: string[];
|
|
21
|
+
};
|
|
22
|
+
byChannelOrThreadId: {
|
|
23
|
+
[channelId: string]: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare function scheduledPostFromPost(post: Post, schedulingInfo: SchedulingInfo): ScheduledPost;
|
|
27
|
+
export declare function scheduledPostToPost(scheduledPost: ScheduledPost): Post;
|
package/lib/schemes.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type SchemeScope = 'team' | 'channel';
|
|
2
|
+
export type Scheme = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
display_name: string;
|
|
7
|
+
create_at: number;
|
|
8
|
+
update_at: number;
|
|
9
|
+
delete_at: number;
|
|
10
|
+
scope: SchemeScope;
|
|
11
|
+
default_team_admin_role: string;
|
|
12
|
+
default_team_user_role: string;
|
|
13
|
+
default_team_guest_role: string;
|
|
14
|
+
default_channel_admin_role: string;
|
|
15
|
+
default_channel_user_role: string;
|
|
16
|
+
default_channel_guest_role: string;
|
|
17
|
+
default_playbook_admin_role: string;
|
|
18
|
+
default_playbook_member_role: string;
|
|
19
|
+
default_run_member_role: string;
|
|
20
|
+
};
|
|
21
|
+
export type SchemesState = {
|
|
22
|
+
schemes: {
|
|
23
|
+
[x: string]: Scheme;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type SchemePatch = {
|
|
27
|
+
name?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
};
|