@mattermost/types 9.3.0 → 9.4.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 +12 -12
- package/lib/apps.d.ts +31 -31
- package/lib/audits.d.ts +1 -1
- package/lib/autocomplete.d.ts +2 -2
- package/lib/boards.d.ts +2 -2
- package/lib/bots.d.ts +2 -2
- package/lib/channel_categories.d.ts +4 -4
- package/lib/channels.d.ts +19 -17
- package/lib/client4.d.ts +4 -4
- package/lib/cloud.d.ts +28 -20
- package/lib/compliance.d.ts +1 -1
- package/lib/config.d.ts +65 -52
- package/lib/data_retention.d.ts +7 -7
- package/lib/drafts.d.ts +1 -1
- package/lib/emojis.d.ts +7 -7
- package/lib/errors.d.ts +1 -1
- package/lib/files.d.ts +5 -5
- package/lib/general.d.ts +2 -2
- package/lib/groups.d.ts +22 -22
- package/lib/hosted_customer.d.ts +5 -5
- package/lib/integration_actions.d.ts +4 -4
- package/lib/integrations.d.ts +12 -12
- package/lib/jobs.d.ts +6 -6
- package/lib/marketplace.d.ts +1 -1
- package/lib/message_attachments.d.ts +2 -2
- package/lib/mfa.d.ts +1 -1
- package/lib/plugins.d.ts +14 -14
- package/lib/posts.d.ts +18 -18
- package/lib/preferences.d.ts +2 -2
- package/lib/product_notices.d.ts +2 -2
- package/lib/products.d.ts +2 -2
- package/lib/reactions.d.ts +1 -1
- package/lib/requests.d.ts +13 -13
- package/lib/roles.d.ts +1 -1
- package/lib/saml.d.ts +2 -2
- package/lib/schemes.d.ts +4 -4
- package/lib/search.d.ts +3 -3
- package/lib/sessions.d.ts +1 -1
- package/lib/setup.d.ts +1 -1
- package/lib/store.d.ts +1 -1
- package/lib/teams.d.ts +11 -11
- package/lib/terms_of_service.d.ts +1 -1
- package/lib/threads.d.ts +6 -6
- package/lib/typing.d.ts +1 -1
- package/lib/users.d.ts +11 -11
- package/lib/utilities.d.ts +8 -8
- package/package.json +1 -1
package/lib/admin.d.ts
CHANGED
|
@@ -16,11 +16,11 @@ export declare enum LogLevelEnum {
|
|
|
16
16
|
WARN = "warn",
|
|
17
17
|
ERROR = "error"
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
19
|
+
export type LogServerNames = string[];
|
|
20
|
+
export type LogLevels = LogLevelEnum[];
|
|
21
|
+
export type LogDateFrom = string;
|
|
22
|
+
export type LogDateTo = string;
|
|
23
|
+
export type LogObject = {
|
|
24
24
|
caller: string;
|
|
25
25
|
job_id: string;
|
|
26
26
|
level: LogLevelEnum;
|
|
@@ -28,13 +28,13 @@ export declare type LogObject = {
|
|
|
28
28
|
timestamp: string;
|
|
29
29
|
worker: string;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type LogFilter = {
|
|
32
32
|
serverNames: LogServerNames;
|
|
33
33
|
logLevels: LogLevels;
|
|
34
34
|
dateFrom: LogDateFrom;
|
|
35
35
|
dateTo: LogDateTo;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type AdminState = {
|
|
38
38
|
logs: LogObject[];
|
|
39
39
|
plainLogs: string[];
|
|
40
40
|
audits: Record<string, Audit>;
|
|
@@ -56,7 +56,7 @@ export declare type AdminState = {
|
|
|
56
56
|
dataRetentionCustomPoliciesCount: number;
|
|
57
57
|
prevTrialLicense: ClientLicense;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type ClusterInfo = {
|
|
60
60
|
id: string;
|
|
61
61
|
version: string;
|
|
62
62
|
config_hash: string;
|
|
@@ -64,20 +64,20 @@ export declare type ClusterInfo = {
|
|
|
64
64
|
hostname: string;
|
|
65
65
|
schema_version: string;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type AnalyticsRow = {
|
|
68
68
|
name: string;
|
|
69
69
|
value: number;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type IndexedPluginAnalyticsRow = {
|
|
72
72
|
[key: string]: PluginAnalyticsRow;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type PluginAnalyticsRow = {
|
|
75
75
|
id: string;
|
|
76
76
|
name: React.ReactNode;
|
|
77
77
|
icon: string;
|
|
78
78
|
value: number;
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export type SchemaMigration = {
|
|
81
81
|
version: number;
|
|
82
82
|
name: string;
|
|
83
83
|
};
|
package/lib/apps.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare enum Locations {
|
|
|
13
13
|
Command = "/command",
|
|
14
14
|
InPost = "/in_post"
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type AppManifest = {
|
|
17
17
|
app_id: string;
|
|
18
18
|
version?: string;
|
|
19
19
|
homepage_url?: string;
|
|
@@ -23,23 +23,23 @@ export declare type AppManifest = {
|
|
|
23
23
|
requested_permissions?: Permission[];
|
|
24
24
|
requested_locations?: Locations[];
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type AppModalState = {
|
|
27
27
|
form: AppForm;
|
|
28
28
|
call: AppCallRequest;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type AppCommandFormMap = {
|
|
31
31
|
[location: string]: AppForm;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type BindingsInfo = {
|
|
34
34
|
bindings: AppBinding[];
|
|
35
35
|
forms: AppCommandFormMap;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type AppsState = {
|
|
38
38
|
main: BindingsInfo;
|
|
39
39
|
rhs: BindingsInfo;
|
|
40
40
|
pluginEnabled: boolean;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type AppBinding = {
|
|
43
43
|
app_id: string;
|
|
44
44
|
location?: string;
|
|
45
45
|
supported_product_ids?: ProductScope;
|
|
@@ -56,23 +56,23 @@ export declare type AppBinding = {
|
|
|
56
56
|
form?: AppForm;
|
|
57
57
|
submit?: AppCall;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type AppCallValues = {
|
|
60
60
|
[name: string]: any;
|
|
61
61
|
};
|
|
62
|
-
export
|
|
62
|
+
export type AppCall = {
|
|
63
63
|
path: string;
|
|
64
64
|
expand?: AppExpand;
|
|
65
65
|
state?: any;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type AppCallRequest = AppCall & {
|
|
68
68
|
context: AppContext;
|
|
69
69
|
values?: AppCallValues;
|
|
70
70
|
raw_command?: string;
|
|
71
71
|
selected_field?: string;
|
|
72
72
|
query?: string;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
75
|
-
export
|
|
74
|
+
export type AppCallResponseType = string;
|
|
75
|
+
export type AppCallResponse<Res = unknown> = {
|
|
76
76
|
type: AppCallResponseType;
|
|
77
77
|
text?: string;
|
|
78
78
|
data?: Res;
|
|
@@ -82,11 +82,11 @@ export declare type AppCallResponse<Res = unknown> = {
|
|
|
82
82
|
form?: AppForm;
|
|
83
83
|
app_metadata?: AppMetadataForClient;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type AppMetadataForClient = {
|
|
86
86
|
bot_user_id: string;
|
|
87
87
|
bot_username: string;
|
|
88
88
|
};
|
|
89
|
-
export
|
|
89
|
+
export type AppContext = {
|
|
90
90
|
app_id: string;
|
|
91
91
|
location?: string;
|
|
92
92
|
acting_user_id?: string;
|
|
@@ -99,11 +99,11 @@ export declare type AppContext = {
|
|
|
99
99
|
user_agent?: string;
|
|
100
100
|
track_as_submit?: boolean;
|
|
101
101
|
};
|
|
102
|
-
export
|
|
102
|
+
export type AppContextProps = {
|
|
103
103
|
[name: string]: string;
|
|
104
104
|
};
|
|
105
|
-
export
|
|
106
|
-
export
|
|
105
|
+
export type AppExpandLevel = '' | 'none' | 'summary' | '+summary' | 'all' | '+all' | 'id';
|
|
106
|
+
export type AppExpand = {
|
|
107
107
|
app?: AppExpandLevel;
|
|
108
108
|
acting_user?: AppExpandLevel;
|
|
109
109
|
acting_user_access_token?: AppExpandLevel;
|
|
@@ -117,7 +117,7 @@ export declare type AppExpand = {
|
|
|
117
117
|
user?: AppExpandLevel;
|
|
118
118
|
locale?: AppExpandLevel;
|
|
119
119
|
};
|
|
120
|
-
export
|
|
120
|
+
export type AppForm = {
|
|
121
121
|
title?: string;
|
|
122
122
|
header?: string;
|
|
123
123
|
footer?: string;
|
|
@@ -130,17 +130,17 @@ export declare type AppForm = {
|
|
|
130
130
|
submit?: AppCall;
|
|
131
131
|
depends_on?: string[];
|
|
132
132
|
};
|
|
133
|
-
export
|
|
134
|
-
export
|
|
133
|
+
export type AppFormValue = string | AppSelectOption | boolean | null;
|
|
134
|
+
export type AppFormValues = {
|
|
135
135
|
[name: string]: AppFormValue;
|
|
136
136
|
};
|
|
137
|
-
export
|
|
137
|
+
export type AppSelectOption = {
|
|
138
138
|
label: string;
|
|
139
139
|
value: string;
|
|
140
140
|
icon_data?: string;
|
|
141
141
|
};
|
|
142
|
-
export
|
|
143
|
-
export
|
|
142
|
+
export type AppFieldType = string;
|
|
143
|
+
export type AppField = {
|
|
144
144
|
name: string;
|
|
145
145
|
type: AppFieldType;
|
|
146
146
|
is_required?: boolean;
|
|
@@ -159,28 +159,28 @@ export declare type AppField = {
|
|
|
159
159
|
min_length?: number;
|
|
160
160
|
max_length?: number;
|
|
161
161
|
};
|
|
162
|
-
export
|
|
162
|
+
export type AutocompleteSuggestion = {
|
|
163
163
|
suggestion: string;
|
|
164
164
|
complete?: string;
|
|
165
165
|
description?: string;
|
|
166
166
|
hint?: string;
|
|
167
167
|
iconData?: string;
|
|
168
168
|
};
|
|
169
|
-
export
|
|
169
|
+
export type AutocompleteSuggestionWithComplete = AutocompleteSuggestion & {
|
|
170
170
|
complete: string;
|
|
171
171
|
};
|
|
172
|
-
export
|
|
173
|
-
export
|
|
172
|
+
export type AutocompleteElement = AppField;
|
|
173
|
+
export type AutocompleteStaticSelect = AutocompleteElement & {
|
|
174
174
|
options: AppSelectOption[];
|
|
175
175
|
};
|
|
176
|
-
export
|
|
177
|
-
export
|
|
178
|
-
export
|
|
179
|
-
export
|
|
176
|
+
export type AutocompleteDynamicSelect = AutocompleteElement;
|
|
177
|
+
export type AutocompleteUserSelect = AutocompleteElement;
|
|
178
|
+
export type AutocompleteChannelSelect = AutocompleteElement;
|
|
179
|
+
export type FormResponseData = {
|
|
180
180
|
errors?: {
|
|
181
181
|
[field: string]: string;
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
-
export
|
|
184
|
+
export type AppLookupResponse = {
|
|
185
185
|
items: AppSelectOption[];
|
|
186
186
|
};
|
package/lib/audits.d.ts
CHANGED
package/lib/autocomplete.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { UserProfile } from './users';
|
|
2
|
-
export
|
|
2
|
+
export type UserAutocomplete = {
|
|
3
3
|
users: UserProfile[];
|
|
4
4
|
out_of_channel?: UserProfile[];
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type AutocompleteSuggestion = {
|
|
7
7
|
Complete: string;
|
|
8
8
|
Suggestion: string;
|
|
9
9
|
Hint: string;
|
package/lib/boards.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const boardTypes: string[];
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type BoardTypes = typeof boardTypes[number];
|
|
3
|
+
type PropertyTypeEnum = 'text' | 'number' | 'select' | 'multiSelect' | 'date' | 'person' | 'file' | 'checkbox' | 'url' | 'email' | 'phone' | 'createdTime' | 'createdBy' | 'updatedTime' | 'updatedBy' | 'unknown';
|
|
4
4
|
interface IPropertyOption {
|
|
5
5
|
id: string;
|
|
6
6
|
value: string;
|
package/lib/bots.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Bot = {
|
|
2
2
|
user_id: string;
|
|
3
3
|
username: string;
|
|
4
4
|
display_name?: string;
|
|
@@ -8,7 +8,7 @@ export declare type Bot = {
|
|
|
8
8
|
update_at: number;
|
|
9
9
|
delete_at: number;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type BotPatch = {
|
|
12
12
|
username: string;
|
|
13
13
|
display_name: string;
|
|
14
14
|
description: string;
|
|
@@ -2,14 +2,14 @@ import { Channel } from './channels';
|
|
|
2
2
|
import { Team } from './teams';
|
|
3
3
|
import { UserProfile } from './users';
|
|
4
4
|
import { IDMappedObjects, RelationOneToOne } from './utilities';
|
|
5
|
-
export
|
|
5
|
+
export type ChannelCategoryType = 'favorites' | 'channels' | 'direct_messages' | 'custom';
|
|
6
6
|
export declare enum CategorySorting {
|
|
7
7
|
Alphabetical = "alpha",
|
|
8
8
|
Default = "",
|
|
9
9
|
Recency = "recent",
|
|
10
10
|
Manual = "manual"
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type ChannelCategory = {
|
|
13
13
|
id: string;
|
|
14
14
|
user_id: UserProfile['id'];
|
|
15
15
|
team_id: Team['id'];
|
|
@@ -20,11 +20,11 @@ export declare type ChannelCategory = {
|
|
|
20
20
|
muted: boolean;
|
|
21
21
|
collapsed: boolean;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type OrderedChannelCategories = {
|
|
24
24
|
categories: ChannelCategory[];
|
|
25
25
|
order: string[];
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type ChannelCategoriesState = {
|
|
28
28
|
byId: IDMappedObjects<ChannelCategory>;
|
|
29
29
|
orderByTeam: RelationOneToOne<Team, Array<ChannelCategory['id']>>;
|
|
30
30
|
};
|
package/lib/channels.d.ts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { IDMappedObjects, RelationOneToMany, RelationOneToOne } from './utilities';
|
|
2
2
|
import { Team } from './teams';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ChannelType = 'O' | 'P' | 'D' | 'G' | 'threads';
|
|
4
|
+
export type ChannelStats = {
|
|
5
5
|
channel_id: string;
|
|
6
6
|
member_count: number;
|
|
7
7
|
guest_count: number;
|
|
8
8
|
pinnedpost_count: number;
|
|
9
9
|
files_count: number;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type ChannelNotifyProps = {
|
|
12
|
+
desktop_threads: 'default' | 'all' | 'mention' | 'none';
|
|
12
13
|
desktop: 'default' | 'all' | 'mention' | 'none';
|
|
13
14
|
desktop_sound: 'on' | 'off';
|
|
14
15
|
desktop_notification_sound?: 'Bing' | 'Crackle' | 'Down' | 'Hello' | 'Ripple' | 'Upstairs';
|
|
15
16
|
email: 'default' | 'all' | 'mention' | 'none';
|
|
16
17
|
mark_unread: 'all' | 'mention';
|
|
17
18
|
push: 'default' | 'all' | 'mention' | 'none';
|
|
19
|
+
push_threads: 'default' | 'all' | 'mention' | 'none';
|
|
18
20
|
ignore_channel_mentions: 'default' | 'off' | 'on';
|
|
19
21
|
channel_auto_follow_threads: 'off' | 'on';
|
|
20
22
|
};
|
|
21
|
-
export
|
|
23
|
+
export type Channel = {
|
|
22
24
|
id: string;
|
|
23
25
|
create_at: number;
|
|
24
26
|
update_at: number;
|
|
@@ -40,7 +42,7 @@ export declare type Channel = {
|
|
|
40
42
|
props?: Record<string, any>;
|
|
41
43
|
policy_id?: string | null;
|
|
42
44
|
};
|
|
43
|
-
export
|
|
45
|
+
export type ServerChannel = Channel & {
|
|
44
46
|
/**
|
|
45
47
|
* The total number of posts in this channel, not including join/leave messages
|
|
46
48
|
*
|
|
@@ -54,22 +56,22 @@ export declare type ServerChannel = Channel & {
|
|
|
54
56
|
*/
|
|
55
57
|
total_msg_count_root: number;
|
|
56
58
|
};
|
|
57
|
-
export
|
|
59
|
+
export type ChannelMessageCount = {
|
|
58
60
|
/** The total number of posts in this channel, not including join/leave messages */
|
|
59
61
|
total: number;
|
|
60
62
|
/** The number of root posts in this channel, not including join/leave messages */
|
|
61
63
|
root: number;
|
|
62
64
|
};
|
|
63
|
-
export
|
|
65
|
+
export type ChannelWithTeamData = Channel & {
|
|
64
66
|
team_display_name: string;
|
|
65
67
|
team_name: string;
|
|
66
68
|
team_update_at: number;
|
|
67
69
|
};
|
|
68
|
-
export
|
|
70
|
+
export type ChannelsWithTotalCount = {
|
|
69
71
|
channels: ChannelWithTeamData[];
|
|
70
72
|
total_count: number;
|
|
71
73
|
};
|
|
72
|
-
export
|
|
74
|
+
export type ChannelMembership = {
|
|
73
75
|
channel_id: string;
|
|
74
76
|
user_id: string;
|
|
75
77
|
roles: string;
|
|
@@ -90,7 +92,7 @@ export declare type ChannelMembership = {
|
|
|
90
92
|
scheme_admin: boolean;
|
|
91
93
|
post_root_id?: string;
|
|
92
94
|
};
|
|
93
|
-
export
|
|
95
|
+
export type ChannelUnread = {
|
|
94
96
|
channel_id: string;
|
|
95
97
|
user_id: string;
|
|
96
98
|
team_id: string;
|
|
@@ -107,7 +109,7 @@ export declare type ChannelUnread = {
|
|
|
107
109
|
last_viewed_at: number;
|
|
108
110
|
deltaMsgs: number;
|
|
109
111
|
};
|
|
110
|
-
export
|
|
112
|
+
export type ChannelsState = {
|
|
111
113
|
currentChannelId: string;
|
|
112
114
|
channels: IDMappedObjects<Channel>;
|
|
113
115
|
channelsInTeam: RelationOneToMany<Team, Channel>;
|
|
@@ -123,7 +125,7 @@ export declare type ChannelsState = {
|
|
|
123
125
|
messageCounts: RelationOneToOne<Channel, ChannelMessageCount>;
|
|
124
126
|
channelsMemberCount: Record<string, number>;
|
|
125
127
|
};
|
|
126
|
-
export
|
|
128
|
+
export type ChannelModeration = {
|
|
127
129
|
name: string;
|
|
128
130
|
roles: {
|
|
129
131
|
guests?: {
|
|
@@ -140,24 +142,24 @@ export declare type ChannelModeration = {
|
|
|
140
142
|
};
|
|
141
143
|
};
|
|
142
144
|
};
|
|
143
|
-
export
|
|
145
|
+
export type ChannelModerationPatch = {
|
|
144
146
|
name: string;
|
|
145
147
|
roles: {
|
|
146
148
|
guests?: boolean;
|
|
147
149
|
members?: boolean;
|
|
148
150
|
};
|
|
149
151
|
};
|
|
150
|
-
export
|
|
152
|
+
export type ChannelMemberCountByGroup = {
|
|
151
153
|
group_id: string;
|
|
152
154
|
channel_member_count: number;
|
|
153
155
|
channel_member_timezones_count: number;
|
|
154
156
|
};
|
|
155
|
-
export
|
|
156
|
-
export
|
|
157
|
+
export type ChannelMemberCountsByGroup = Record<string, ChannelMemberCountByGroup>;
|
|
158
|
+
export type ChannelViewResponse = {
|
|
157
159
|
status: string;
|
|
158
160
|
last_viewed_at_times: RelationOneToOne<Channel, number>;
|
|
159
161
|
};
|
|
160
|
-
export
|
|
162
|
+
export type ChannelSearchOpts = {
|
|
161
163
|
nonAdminSearch?: boolean;
|
|
162
164
|
exclude_default_channels?: boolean;
|
|
163
165
|
not_associated_to_group?: string;
|
package/lib/client4.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ export declare enum LogLevel {
|
|
|
4
4
|
Info = "INFO",
|
|
5
5
|
Debug = "DEBUG"
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type ClientResponse<T> = {
|
|
8
8
|
response: Response;
|
|
9
9
|
headers: Map<string, string>;
|
|
10
10
|
data: T;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type Options = {
|
|
13
13
|
headers?: {
|
|
14
14
|
[x: string]: string;
|
|
15
15
|
};
|
|
@@ -19,10 +19,10 @@ export declare type Options = {
|
|
|
19
19
|
body?: any;
|
|
20
20
|
ignoreStatus?: boolean; /** If true, status codes > 300 are ignored and don't cause an error */
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type StatusOK = {
|
|
23
23
|
status: 'OK';
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type FetchPaginatedThreadOptions = {
|
|
26
26
|
fetchThreads?: boolean;
|
|
27
27
|
collapsedThreads?: boolean;
|
|
28
28
|
collapsedThreadsExtended?: boolean;
|
package/lib/cloud.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { AllowedIPRange } from './config';
|
|
1
2
|
import { ValueOf } from './utilities';
|
|
2
|
-
export
|
|
3
|
+
export type CloudState = {
|
|
3
4
|
subscription?: Subscription;
|
|
4
5
|
products?: Record<string, Product>;
|
|
5
6
|
customer?: CloudCustomer;
|
|
@@ -21,7 +22,12 @@ export declare type CloudState = {
|
|
|
21
22
|
progress: ValueOf<typeof SelfHostedSignupProgress>;
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
|
-
export
|
|
25
|
+
export type Installation = {
|
|
26
|
+
id: string;
|
|
27
|
+
state: string;
|
|
28
|
+
allowed_ip_ranges: AllowedIPRange[];
|
|
29
|
+
};
|
|
30
|
+
export type Subscription = {
|
|
25
31
|
id: string;
|
|
26
32
|
customer_id: string;
|
|
27
33
|
product_id: string;
|
|
@@ -37,8 +43,10 @@ export declare type Subscription = {
|
|
|
37
43
|
delinquent_since?: number;
|
|
38
44
|
compliance_blocked?: string;
|
|
39
45
|
billing_type?: string;
|
|
46
|
+
cancel_at?: number;
|
|
47
|
+
will_renew?: string;
|
|
40
48
|
};
|
|
41
|
-
export
|
|
49
|
+
export type Product = {
|
|
42
50
|
id: string;
|
|
43
51
|
name: string;
|
|
44
52
|
description: string;
|
|
@@ -50,7 +58,7 @@ export declare type Product = {
|
|
|
50
58
|
recurring_interval: string;
|
|
51
59
|
cross_sells_to: string;
|
|
52
60
|
};
|
|
53
|
-
export
|
|
61
|
+
export type AddOn = {
|
|
54
62
|
id: string;
|
|
55
63
|
name: string;
|
|
56
64
|
display_name: string;
|
|
@@ -71,9 +79,9 @@ export declare const SelfHostedSignupProgress: {
|
|
|
71
79
|
readonly PAID: "PAID";
|
|
72
80
|
readonly CREATED_LICENSE: "CREATED_LICENSE";
|
|
73
81
|
};
|
|
74
|
-
export
|
|
75
|
-
export
|
|
76
|
-
export
|
|
82
|
+
export type MetadataGatherWireTransferKeys = `${ValueOf<typeof TypePurchases>}_alt_payment_method`;
|
|
83
|
+
export type CustomerMetadataGatherWireTransfer = Partial<Record<MetadataGatherWireTransferKeys, string>>;
|
|
84
|
+
export type CloudCustomer = {
|
|
77
85
|
id: string;
|
|
78
86
|
creator_id: string;
|
|
79
87
|
create_at: number;
|
|
@@ -86,22 +94,22 @@ export declare type CloudCustomer = {
|
|
|
86
94
|
company_address: Address;
|
|
87
95
|
payment_method: PaymentMethod;
|
|
88
96
|
} & CustomerMetadataGatherWireTransfer;
|
|
89
|
-
export
|
|
97
|
+
export type LicenseSelfServeStatus = {
|
|
90
98
|
is_expandable?: boolean;
|
|
91
99
|
is_renewable?: boolean;
|
|
92
100
|
};
|
|
93
|
-
|
|
101
|
+
type RequestState = 'IDLE' | 'LOADING' | 'ERROR' | 'OK';
|
|
94
102
|
export interface LicenseSelfServeStatusReducer extends LicenseSelfServeStatus {
|
|
95
103
|
getRequestState: RequestState;
|
|
96
104
|
}
|
|
97
|
-
export
|
|
105
|
+
export type CloudCustomerPatch = {
|
|
98
106
|
email?: string;
|
|
99
107
|
name?: string;
|
|
100
108
|
num_employees?: number;
|
|
101
109
|
contact_first_name?: string;
|
|
102
110
|
contact_last_name?: string;
|
|
103
111
|
} & CustomerMetadataGatherWireTransfer;
|
|
104
|
-
export
|
|
112
|
+
export type Address = {
|
|
105
113
|
city: string;
|
|
106
114
|
country: string;
|
|
107
115
|
line1: string;
|
|
@@ -109,7 +117,7 @@ export declare type Address = {
|
|
|
109
117
|
postal_code: string;
|
|
110
118
|
state: string;
|
|
111
119
|
};
|
|
112
|
-
export
|
|
120
|
+
export type PaymentMethod = {
|
|
113
121
|
type: string;
|
|
114
122
|
last_four: string;
|
|
115
123
|
exp_month: number;
|
|
@@ -117,12 +125,12 @@ export declare type PaymentMethod = {
|
|
|
117
125
|
card_brand: string;
|
|
118
126
|
name: string;
|
|
119
127
|
};
|
|
120
|
-
export
|
|
128
|
+
export type NotifyAdminRequest = {
|
|
121
129
|
trial_notification: boolean;
|
|
122
130
|
required_plan: string;
|
|
123
131
|
required_feature: string;
|
|
124
132
|
};
|
|
125
|
-
export
|
|
133
|
+
export type Invoice = {
|
|
126
134
|
id: string;
|
|
127
135
|
number: string;
|
|
128
136
|
create_at: number;
|
|
@@ -142,7 +150,7 @@ export declare const InvoiceLineItemType: {
|
|
|
142
150
|
readonly OnPremise: "onpremise";
|
|
143
151
|
readonly Metered: "metered";
|
|
144
152
|
};
|
|
145
|
-
export
|
|
153
|
+
export type InvoiceLineItem = {
|
|
146
154
|
price_id: string;
|
|
147
155
|
total: number;
|
|
148
156
|
quantity: number;
|
|
@@ -151,7 +159,7 @@ export declare type InvoiceLineItem = {
|
|
|
151
159
|
type: typeof InvoiceLineItemType[keyof typeof InvoiceLineItemType];
|
|
152
160
|
metadata: Record<string, string>;
|
|
153
161
|
};
|
|
154
|
-
export
|
|
162
|
+
export type Limits = {
|
|
155
163
|
messages?: {
|
|
156
164
|
history?: number;
|
|
157
165
|
};
|
|
@@ -173,12 +181,12 @@ export interface CloudUsage {
|
|
|
173
181
|
};
|
|
174
182
|
teams: TeamsUsage;
|
|
175
183
|
}
|
|
176
|
-
export
|
|
184
|
+
export type TeamsUsage = {
|
|
177
185
|
active: number;
|
|
178
186
|
cloudArchived: number;
|
|
179
187
|
teamsLoaded: boolean;
|
|
180
188
|
};
|
|
181
|
-
export
|
|
189
|
+
export type ValidBusinessEmail = {
|
|
182
190
|
is_valid: boolean;
|
|
183
191
|
};
|
|
184
192
|
export interface CreateSubscriptionRequest {
|
|
@@ -192,11 +200,11 @@ export interface NewsletterRequestBody {
|
|
|
192
200
|
subscribed_content: string;
|
|
193
201
|
}
|
|
194
202
|
export declare const areShippingDetailsValid: (address: Address | null | undefined) => boolean;
|
|
195
|
-
export
|
|
203
|
+
export type Feedback = {
|
|
196
204
|
reason: string;
|
|
197
205
|
comments: string;
|
|
198
206
|
};
|
|
199
|
-
export
|
|
207
|
+
export type WorkspaceDeletionRequest = {
|
|
200
208
|
subscription_id: string;
|
|
201
209
|
delete_feedback: Feedback;
|
|
202
210
|
};
|
package/lib/compliance.d.ts
CHANGED