@mattermost/types 7.0.0 → 7.1.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 +0 -2
- package/lib/boards.d.ts +6 -0
- package/lib/boards.js +2 -0
- package/lib/client4.d.ts +10 -0
- package/lib/cloud.d.ts +33 -2
- package/lib/config.d.ts +2 -2
- package/lib/emojis.d.ts +17 -1
- package/lib/insights.d.ts +57 -1
- package/lib/insights.js +2 -0
- package/lib/posts.d.ts +15 -1
- package/lib/store.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
This package contains shared type definitions used by [the Mattermost web app](https://github.com/mattermost/mattermost-webapp) and related projects.
|
|
4
4
|
|
|
5
|
-
**It is currently a work in progress and contains internal types that will be removed in a followup release.**
|
|
6
|
-
|
|
7
5
|
## Usage
|
|
8
6
|
|
|
9
7
|
For technologies that support [subpath exports](https://nodejs.org/api/packages.html#subpath-exports), such as Node.js, Webpack, and Babel, you can import these types directly from individual files.
|
package/lib/boards.d.ts
ADDED
package/lib/boards.js
ADDED
package/lib/client4.d.ts
CHANGED
|
@@ -21,3 +21,13 @@ export declare type Options = {
|
|
|
21
21
|
export declare type StatusOK = {
|
|
22
22
|
status: 'OK';
|
|
23
23
|
};
|
|
24
|
+
export declare type FetchPaginatedThreadOptions = {
|
|
25
|
+
fetchThreads?: boolean;
|
|
26
|
+
collapsedThreads?: boolean;
|
|
27
|
+
collapsedThreadsExtended?: boolean;
|
|
28
|
+
direction?: 'up' | 'down';
|
|
29
|
+
fetchAll?: boolean;
|
|
30
|
+
perPage?: number;
|
|
31
|
+
fromCreateAt?: number;
|
|
32
|
+
fromPost?: string;
|
|
33
|
+
};
|
package/lib/cloud.d.ts
CHANGED
|
@@ -8,7 +8,13 @@ export declare type CloudState = {
|
|
|
8
8
|
limits: Limits;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
export declare type Subscription = {
|
|
11
|
+
export declare type Subscription = SubscriptionBase & {
|
|
12
|
+
is_legacy_cloud_paid_tier?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare type SubscriptionResponse = SubscriptionBase & {
|
|
15
|
+
is_paid_tier: string;
|
|
16
|
+
};
|
|
17
|
+
declare type SubscriptionBase = {
|
|
12
18
|
id: string;
|
|
13
19
|
customer_id: string;
|
|
14
20
|
product_id: string;
|
|
@@ -17,7 +23,6 @@ export declare type Subscription = {
|
|
|
17
23
|
end_at: number;
|
|
18
24
|
create_at: number;
|
|
19
25
|
seats: number;
|
|
20
|
-
is_paid_tier: string;
|
|
21
26
|
last_invoice?: Invoice;
|
|
22
27
|
trial_end_at: number;
|
|
23
28
|
is_free_trial: string;
|
|
@@ -122,3 +127,29 @@ export declare type Limits = {
|
|
|
122
127
|
views?: number;
|
|
123
128
|
};
|
|
124
129
|
};
|
|
130
|
+
export interface CloudUsage {
|
|
131
|
+
files: {
|
|
132
|
+
totalStorage: number;
|
|
133
|
+
totalStorageLoaded: boolean;
|
|
134
|
+
};
|
|
135
|
+
messages: {
|
|
136
|
+
history: number;
|
|
137
|
+
historyLoaded: boolean;
|
|
138
|
+
};
|
|
139
|
+
boards: {
|
|
140
|
+
cards: number;
|
|
141
|
+
cardsLoaded: boolean;
|
|
142
|
+
};
|
|
143
|
+
teams: TeamsUsage;
|
|
144
|
+
integrations: IntegrationsUsage;
|
|
145
|
+
}
|
|
146
|
+
export interface IntegrationsUsage {
|
|
147
|
+
enabled: number;
|
|
148
|
+
enabledLoaded: boolean;
|
|
149
|
+
}
|
|
150
|
+
export declare type TeamsUsage = {
|
|
151
|
+
active: number;
|
|
152
|
+
cloudArchived: number;
|
|
153
|
+
teamsLoaded: boolean;
|
|
154
|
+
};
|
|
155
|
+
export {};
|
package/lib/config.d.ts
CHANGED
|
@@ -103,7 +103,6 @@ export declare type ClientConfig = {
|
|
|
103
103
|
ExperimentalDataPrefetch: string;
|
|
104
104
|
ExperimentalEnableAuthenticationTransfer: string;
|
|
105
105
|
ExperimentalEnableAutomaticReplies: string;
|
|
106
|
-
ExperimentalEnableClickToReply: string;
|
|
107
106
|
ExperimentalEnableDefaultChannelLeaveJoinMessages: string;
|
|
108
107
|
ExperimentalEnablePostMetadata: string;
|
|
109
108
|
ExperimentalGroupUnreadChannels: string;
|
|
@@ -120,6 +119,7 @@ export declare type ClientConfig = {
|
|
|
120
119
|
IosAppDownloadLink: string;
|
|
121
120
|
IosLatestVersion: string;
|
|
122
121
|
IosMinVersion: string;
|
|
122
|
+
InsightsEnabled: string;
|
|
123
123
|
InstallationDate: string;
|
|
124
124
|
IsDefaultMarketplace: string;
|
|
125
125
|
LdapFirstNameAttributeSet: string;
|
|
@@ -180,6 +180,7 @@ export declare type ClientConfig = {
|
|
|
180
180
|
WebsocketURL: string;
|
|
181
181
|
ExperimentalSharedChannels: string;
|
|
182
182
|
EnableAppBar: string;
|
|
183
|
+
EnableComplianceExport: string;
|
|
183
184
|
};
|
|
184
185
|
export declare type License = {
|
|
185
186
|
id: string;
|
|
@@ -629,7 +630,6 @@ export declare type MetricsSettings = {
|
|
|
629
630
|
export declare type ExperimentalSettings = {
|
|
630
631
|
ClientSideCertEnable: boolean;
|
|
631
632
|
ClientSideCertCheck: string;
|
|
632
|
-
EnableClickToReply: boolean;
|
|
633
633
|
LinkMetadataTimeoutMilliseconds: number;
|
|
634
634
|
RestrictSystemAdmin: boolean;
|
|
635
635
|
UseNewSAMLLibrary: boolean;
|
package/lib/emojis.d.ts
CHANGED
|
@@ -16,9 +16,21 @@ export declare type SystemEmoji = {
|
|
|
16
16
|
short_names: string[];
|
|
17
17
|
batch: number;
|
|
18
18
|
skins?: string[];
|
|
19
|
-
skin_variations?: Record<string,
|
|
19
|
+
skin_variations?: Record<string, SystemEmojiVariation>;
|
|
20
20
|
unified: string;
|
|
21
21
|
};
|
|
22
|
+
export declare 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
|
+
};
|
|
22
34
|
export declare type Emoji = SystemEmoji | CustomEmoji;
|
|
23
35
|
export declare type EmojisState = {
|
|
24
36
|
customEmoji: {
|
|
@@ -26,3 +38,7 @@ export declare type EmojisState = {
|
|
|
26
38
|
};
|
|
27
39
|
nonExistentEmoji: Set<string>;
|
|
28
40
|
};
|
|
41
|
+
export declare type RecentEmojiData = {
|
|
42
|
+
name: string;
|
|
43
|
+
usageCount: number;
|
|
44
|
+
};
|
package/lib/insights.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { ChannelType } from './channels';
|
|
2
|
+
import { Post } from './posts';
|
|
1
3
|
export declare enum InsightsWidgetTypes {
|
|
2
4
|
TOP_CHANNELS = "TOP_CHANNELS",
|
|
3
|
-
TOP_REACTIONS = "TOP_REACTIONS"
|
|
5
|
+
TOP_REACTIONS = "TOP_REACTIONS",
|
|
6
|
+
TOP_THREADS = "TOP_THREADS",
|
|
7
|
+
TOP_BOARDS = "TOP_BOARDS"
|
|
4
8
|
}
|
|
5
9
|
export declare enum CardSizes {
|
|
6
10
|
large = "lg",
|
|
@@ -23,7 +27,59 @@ export declare type TopReactionResponse = {
|
|
|
23
27
|
items: TopReaction[];
|
|
24
28
|
timeFrame?: TimeFrame;
|
|
25
29
|
};
|
|
30
|
+
export declare type TopChannel = {
|
|
31
|
+
id: string;
|
|
32
|
+
type: ChannelType;
|
|
33
|
+
display_name: string;
|
|
34
|
+
name: string;
|
|
35
|
+
team_id: string;
|
|
36
|
+
message_count: number;
|
|
37
|
+
};
|
|
38
|
+
export declare type TopChannelGraphData = Record<string, Record<string, number>>;
|
|
39
|
+
export declare type TopChannelResponse = {
|
|
40
|
+
has_next: boolean;
|
|
41
|
+
items: TopChannel[];
|
|
42
|
+
daily_channel_post_counts: TopChannelGraphData;
|
|
43
|
+
};
|
|
26
44
|
export declare type InsightsState = {
|
|
27
45
|
topReactions: Record<string, Record<TimeFrame, Record<string, TopReaction>>>;
|
|
28
46
|
myTopReactions: Record<string, Record<TimeFrame, Record<string, TopReaction>>>;
|
|
29
47
|
};
|
|
48
|
+
export declare type TopChannelActionResult = {
|
|
49
|
+
data?: TopChannelResponse;
|
|
50
|
+
error?: any;
|
|
51
|
+
};
|
|
52
|
+
export declare type TopThread = {
|
|
53
|
+
channel_id: string;
|
|
54
|
+
channel_display_name: string;
|
|
55
|
+
channel_name: string;
|
|
56
|
+
participants: string[];
|
|
57
|
+
user_information: {
|
|
58
|
+
id: string;
|
|
59
|
+
first_name: string;
|
|
60
|
+
last_name: string;
|
|
61
|
+
last_picture_update: number;
|
|
62
|
+
};
|
|
63
|
+
post: Post;
|
|
64
|
+
};
|
|
65
|
+
export declare type TopThreadResponse = {
|
|
66
|
+
has_next: boolean;
|
|
67
|
+
items: TopThread[];
|
|
68
|
+
};
|
|
69
|
+
export declare type TopThreadActionResult = {
|
|
70
|
+
data?: TopThreadResponse;
|
|
71
|
+
error?: any;
|
|
72
|
+
};
|
|
73
|
+
export declare type TopBoard = {
|
|
74
|
+
boardID: string;
|
|
75
|
+
icon: string;
|
|
76
|
+
title: string;
|
|
77
|
+
activityCount: number;
|
|
78
|
+
activeUsers: string;
|
|
79
|
+
createdBy: string;
|
|
80
|
+
workspaceID: string;
|
|
81
|
+
};
|
|
82
|
+
export declare type TopBoardResponse = {
|
|
83
|
+
has_next: boolean;
|
|
84
|
+
items: TopBoard[];
|
|
85
|
+
};
|
package/lib/insights.js
CHANGED
|
@@ -7,6 +7,8 @@ var InsightsWidgetTypes;
|
|
|
7
7
|
(function (InsightsWidgetTypes) {
|
|
8
8
|
InsightsWidgetTypes["TOP_CHANNELS"] = "TOP_CHANNELS";
|
|
9
9
|
InsightsWidgetTypes["TOP_REACTIONS"] = "TOP_REACTIONS";
|
|
10
|
+
InsightsWidgetTypes["TOP_THREADS"] = "TOP_THREADS";
|
|
11
|
+
InsightsWidgetTypes["TOP_BOARDS"] = "TOP_BOARDS";
|
|
10
12
|
})(InsightsWidgetTypes = exports.InsightsWidgetTypes || (exports.InsightsWidgetTypes = {}));
|
|
11
13
|
var CardSizes;
|
|
12
14
|
(function (CardSizes) {
|
package/lib/posts.d.ts
CHANGED
|
@@ -54,10 +54,13 @@ export declare type Post = {
|
|
|
54
54
|
};
|
|
55
55
|
export declare type PostList = {
|
|
56
56
|
order: Array<Post['id']>;
|
|
57
|
-
posts:
|
|
57
|
+
posts: Record<string, Post>;
|
|
58
58
|
next_post_id: string;
|
|
59
59
|
prev_post_id: string;
|
|
60
60
|
};
|
|
61
|
+
export declare type PaginatedPostList = PostList & {
|
|
62
|
+
has_next: boolean;
|
|
63
|
+
};
|
|
61
64
|
export declare type PostSearchResults = PostList & {
|
|
62
65
|
matches: RelationOneToOne<Post, string[]>;
|
|
63
66
|
};
|
|
@@ -91,6 +94,7 @@ export declare type PostsState = {
|
|
|
91
94
|
export declare type OpenGraphMetadataImage = {
|
|
92
95
|
secure_url?: string;
|
|
93
96
|
url: string;
|
|
97
|
+
type?: string;
|
|
94
98
|
height?: number;
|
|
95
99
|
width?: number;
|
|
96
100
|
};
|
|
@@ -110,3 +114,13 @@ export declare type PostPreviewMetadata = {
|
|
|
110
114
|
channel_type: ChannelType;
|
|
111
115
|
channel_id: string;
|
|
112
116
|
};
|
|
117
|
+
export declare type PostsUsageResponse = {
|
|
118
|
+
count: number;
|
|
119
|
+
};
|
|
120
|
+
export declare type FilesUsageResponse = {
|
|
121
|
+
bytes: number;
|
|
122
|
+
};
|
|
123
|
+
export declare type TeamsUsageResponse = {
|
|
124
|
+
active: number;
|
|
125
|
+
cloud_archived: number;
|
|
126
|
+
};
|
package/lib/store.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AdminState } from './admin';
|
|
|
2
2
|
import { Bot } from './bots';
|
|
3
3
|
import { ChannelsState } from './channels';
|
|
4
4
|
import { ChannelCategoriesState } from './channel_categories';
|
|
5
|
-
import { CloudState } from './cloud';
|
|
5
|
+
import { CloudState, CloudUsage } from './cloud';
|
|
6
6
|
import { EmojisState } from './emojis';
|
|
7
7
|
import { FilesState } from './files';
|
|
8
8
|
import { GeneralState } from './general';
|
|
@@ -56,6 +56,7 @@ export declare type GlobalState = {
|
|
|
56
56
|
channelCategories: ChannelCategoriesState;
|
|
57
57
|
apps: AppsState;
|
|
58
58
|
cloud: CloudState;
|
|
59
|
+
usage: CloudUsage;
|
|
59
60
|
insights: InsightsState;
|
|
60
61
|
};
|
|
61
62
|
errors: any[];
|