@mattermost/types 9.2.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 +5 -4
- package/lib/cloud.d.ts +28 -20
- package/lib/compliance.d.ts +1 -1
- package/lib/config.d.ts +67 -54
- 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 +28 -17
- 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 +12 -11
- package/lib/utilities.d.ts +9 -9
- package/package.json +1 -1
package/lib/teams.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerError } from './errors';
|
|
2
2
|
import { UserProfile } from './users';
|
|
3
3
|
import { RelationOneToOne } from './utilities';
|
|
4
|
-
export
|
|
4
|
+
export type TeamMembership = TeamUnread & {
|
|
5
5
|
user_id: string;
|
|
6
6
|
roles: string;
|
|
7
7
|
delete_at: number;
|
|
@@ -9,13 +9,13 @@ export declare type TeamMembership = TeamUnread & {
|
|
|
9
9
|
scheme_guest: boolean;
|
|
10
10
|
scheme_user: boolean;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type TeamMemberWithError = {
|
|
13
13
|
member: TeamMembership;
|
|
14
14
|
user_id: string;
|
|
15
15
|
error: ServerError;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export type TeamType = 'O' | 'I';
|
|
18
|
+
export type Team = {
|
|
19
19
|
id: string;
|
|
20
20
|
create_at: number;
|
|
21
21
|
update_at: number;
|
|
@@ -33,7 +33,7 @@ export declare type Team = {
|
|
|
33
33
|
group_constrained: boolean;
|
|
34
34
|
policy_id?: string | null;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type TeamsState = {
|
|
37
37
|
currentTeamId: string;
|
|
38
38
|
teams: Record<string, Team>;
|
|
39
39
|
myMembers: Record<string, TeamMembership>;
|
|
@@ -42,7 +42,7 @@ export declare type TeamsState = {
|
|
|
42
42
|
groupsAssociatedToTeam: any;
|
|
43
43
|
totalCount: number;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type TeamUnread = {
|
|
46
46
|
team_id: string;
|
|
47
47
|
/** The number of unread mentions in channels on this team, not including DMs and GMs */
|
|
48
48
|
mention_count: number;
|
|
@@ -66,26 +66,26 @@ export declare type TeamUnread = {
|
|
|
66
66
|
thread_mention_count?: number;
|
|
67
67
|
thread_urgent_mention_count?: number;
|
|
68
68
|
};
|
|
69
|
-
export
|
|
69
|
+
export type GetTeamMembersOpts = {
|
|
70
70
|
sort?: 'Username';
|
|
71
71
|
exclude_deleted_users?: boolean;
|
|
72
72
|
};
|
|
73
|
-
export
|
|
73
|
+
export type TeamsWithCount = {
|
|
74
74
|
teams: Team[];
|
|
75
75
|
total_count: number;
|
|
76
76
|
};
|
|
77
|
-
export
|
|
77
|
+
export type TeamStats = {
|
|
78
78
|
team_id: string;
|
|
79
79
|
total_member_count: number;
|
|
80
80
|
active_member_count: number;
|
|
81
81
|
};
|
|
82
|
-
export
|
|
82
|
+
export type TeamSearchOpts = {
|
|
83
83
|
page?: number;
|
|
84
84
|
per_page?: number;
|
|
85
85
|
allow_open_invite?: boolean;
|
|
86
86
|
group_constrained?: boolean;
|
|
87
87
|
};
|
|
88
|
-
export
|
|
88
|
+
export type TeamInviteWithError = {
|
|
89
89
|
email: string;
|
|
90
90
|
error: ServerError;
|
|
91
91
|
};
|
package/lib/threads.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { IDMappedObjects, RelationOneToMany, RelationOneToOne } from './uti
|
|
|
6
6
|
export declare enum UserThreadType {
|
|
7
7
|
Synthetic = "S"
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type UserThread = {
|
|
10
10
|
id: string;
|
|
11
11
|
reply_count: number;
|
|
12
12
|
last_reply_at: number;
|
|
@@ -28,22 +28,22 @@ export declare type UserThread = {
|
|
|
28
28
|
user_id: UserProfile['id'];
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
export
|
|
31
|
+
type SyntheticMissingKeys = 'unread_replies' | 'unread_mentions' | 'last_viewed_at';
|
|
32
|
+
export type UserThreadSynthetic = Omit<UserThread, SyntheticMissingKeys> & {
|
|
33
33
|
type: UserThreadType.Synthetic;
|
|
34
34
|
};
|
|
35
35
|
export declare function threadIsSynthetic(thread: UserThread | UserThreadSynthetic): thread is UserThreadSynthetic;
|
|
36
|
-
export
|
|
36
|
+
export type UserThreadWithPost = UserThread & {
|
|
37
37
|
post: Post;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type UserThreadList = {
|
|
40
40
|
total: number;
|
|
41
41
|
total_unread_threads: number;
|
|
42
42
|
total_unread_mentions: number;
|
|
43
43
|
total_unread_urgent_mentions?: number;
|
|
44
44
|
threads: UserThreadWithPost[];
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type ThreadsState = {
|
|
47
47
|
threadsInTeam: RelationOneToMany<Team, UserThread>;
|
|
48
48
|
unreadThreadsInTeam: RelationOneToMany<Team, UserThread>;
|
|
49
49
|
threads: IDMappedObjects<UserThread>;
|
package/lib/typing.d.ts
CHANGED
package/lib/users.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Group } from './groups';
|
|
|
4
4
|
import { Session } from './sessions';
|
|
5
5
|
import { Team } from './teams';
|
|
6
6
|
import { IDMappedObjects, RelationOneToMany, RelationOneToManyUnique, RelationOneToOne } from './utilities';
|
|
7
|
-
export
|
|
7
|
+
export type UserNotifyProps = {
|
|
8
8
|
desktop: 'default' | 'all' | 'mention' | 'none';
|
|
9
9
|
desktop_sound: 'true' | 'false';
|
|
10
10
|
calls_desktop_sound: 'true' | 'false';
|
|
@@ -16,6 +16,7 @@ export declare type UserNotifyProps = {
|
|
|
16
16
|
first_name: 'true' | 'false';
|
|
17
17
|
channel: 'true' | 'false';
|
|
18
18
|
mention_keys: string;
|
|
19
|
+
highlight_keys: string;
|
|
19
20
|
desktop_notification_sound?: 'Bing' | 'Crackle' | 'Down' | 'Hello' | 'Ripple' | 'Upstairs';
|
|
20
21
|
calls_notification_sound?: 'Dynamic' | 'Calm' | 'Urgent' | 'Cheerful';
|
|
21
22
|
desktop_threads?: 'default' | 'all' | 'mention' | 'none';
|
|
@@ -24,7 +25,7 @@ export declare type UserNotifyProps = {
|
|
|
24
25
|
auto_responder_active?: 'true' | 'false';
|
|
25
26
|
auto_responder_message?: string;
|
|
26
27
|
};
|
|
27
|
-
export
|
|
28
|
+
export type UserProfile = {
|
|
28
29
|
id: string;
|
|
29
30
|
create_at: number;
|
|
30
31
|
update_at: number;
|
|
@@ -53,10 +54,10 @@ export declare type UserProfile = {
|
|
|
53
54
|
remote_id?: string;
|
|
54
55
|
status?: string;
|
|
55
56
|
};
|
|
56
|
-
export
|
|
57
|
+
export type UserProfileWithLastViewAt = UserProfile & {
|
|
57
58
|
last_viewed_at: number;
|
|
58
59
|
};
|
|
59
|
-
export
|
|
60
|
+
export type UsersState = {
|
|
60
61
|
currentUserId: string;
|
|
61
62
|
isManualStatus: RelationOneToOne<UserProfile, boolean>;
|
|
62
63
|
mySessions: Session[];
|
|
@@ -75,12 +76,12 @@ export declare type UsersState = {
|
|
|
75
76
|
myUserAccessTokens: Record<string, UserAccessToken>;
|
|
76
77
|
lastActivity: RelationOneToOne<UserProfile, number>;
|
|
77
78
|
};
|
|
78
|
-
export
|
|
79
|
+
export type UserTimezone = {
|
|
79
80
|
useAutomaticTimezone: boolean | string;
|
|
80
81
|
automaticTimezone: string;
|
|
81
82
|
manualTimezone: string;
|
|
82
83
|
};
|
|
83
|
-
export
|
|
84
|
+
export type UserStatus = {
|
|
84
85
|
user_id: string;
|
|
85
86
|
status: string;
|
|
86
87
|
manual?: boolean;
|
|
@@ -98,23 +99,23 @@ export declare enum CustomStatusDuration {
|
|
|
98
99
|
DATE_AND_TIME = "date_and_time",
|
|
99
100
|
CUSTOM_DATE_TIME = "custom_date_time"
|
|
100
101
|
}
|
|
101
|
-
export
|
|
102
|
+
export type UserCustomStatus = {
|
|
102
103
|
emoji: string;
|
|
103
104
|
text: string;
|
|
104
105
|
duration: CustomStatusDuration;
|
|
105
106
|
expires_at?: string;
|
|
106
107
|
};
|
|
107
|
-
export
|
|
108
|
+
export type UserAccessToken = {
|
|
108
109
|
id: string;
|
|
109
110
|
token?: string;
|
|
110
111
|
user_id: string;
|
|
111
112
|
description: string;
|
|
112
113
|
is_active: boolean;
|
|
113
114
|
};
|
|
114
|
-
export
|
|
115
|
+
export type UsersStats = {
|
|
115
116
|
total_users_count: number;
|
|
116
117
|
};
|
|
117
|
-
export
|
|
118
|
+
export type GetFilteredUsersStatsOpts = {
|
|
118
119
|
in_team?: string;
|
|
119
120
|
in_channel?: string;
|
|
120
121
|
include_deleted?: boolean;
|
|
@@ -124,6 +125,6 @@ export declare type GetFilteredUsersStatsOpts = {
|
|
|
124
125
|
channel_roles?: string[];
|
|
125
126
|
team_roles?: string[];
|
|
126
127
|
};
|
|
127
|
-
export
|
|
128
|
+
export type AuthChangeResponse = {
|
|
128
129
|
follow_link: string;
|
|
129
130
|
};
|
package/lib/utilities.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type RelationOneToOne<E extends {
|
|
2
2
|
id: string;
|
|
3
3
|
}, T> = {
|
|
4
4
|
[x in E['id']]: T;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type RelationOneToMany<E1 extends {
|
|
7
7
|
id: string;
|
|
8
8
|
}, E2 extends {
|
|
9
9
|
id: string;
|
|
10
10
|
}> = {
|
|
11
11
|
[x in E1['id']]: Array<E2['id']>;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type RelationOneToManyUnique<E1 extends {
|
|
14
14
|
id: string;
|
|
15
15
|
}, E2 extends {
|
|
16
16
|
id: string;
|
|
17
17
|
}> = {
|
|
18
18
|
[x in E1['id']]: Set<E2['id']>;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type IDMappedObjects<E extends {
|
|
21
21
|
id: string;
|
|
22
22
|
}> = RelationOneToOne<E, E>;
|
|
23
|
-
export
|
|
24
|
-
[
|
|
23
|
+
export type DeepPartial<T> = {
|
|
24
|
+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] extends object | undefined ? DeepPartial<T[K]> : T[K];
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type ValueOf<T> = T[keyof T];
|
|
27
27
|
/**
|
|
28
28
|
* Based on https://stackoverflow.com/a/49725198
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
31
31
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
32
32
|
}[Keys];
|
|
33
|
-
export
|
|
33
|
+
export type Intersection<T1, T2> = Omit<Omit<T1 & T2, keyof (Omit<T1, keyof (T2)>)>, keyof (Omit<T2, keyof (T1)>)>;
|