@mattermost/types 10.12.0 → 11.1.0-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.
Files changed (57) hide show
  1. package/lib/apps.js +46 -0
  2. package/lib/content_flagging.js +8 -0
  3. package/lib/properties.js +5 -0
  4. package/package.json +1 -1
  5. package/lib/access_control.d.ts +0 -71
  6. package/lib/admin.d.ts +0 -147
  7. package/lib/apps.d.ts +0 -187
  8. package/lib/audits.d.ts +0 -9
  9. package/lib/autocomplete.d.ts +0 -12
  10. package/lib/bots.d.ts +0 -15
  11. package/lib/channel_bookmarks.d.ts +0 -51
  12. package/lib/channel_categories.d.ts +0 -30
  13. package/lib/channels.d.ts +0 -189
  14. package/lib/client4.d.ts +0 -42
  15. package/lib/cloud.d.ts +0 -174
  16. package/lib/compliance.d.ts +0 -13
  17. package/lib/config.d.ts +0 -1054
  18. package/lib/content_flagging.d.ts +0 -2
  19. package/lib/data_retention.d.ts +0 -30
  20. package/lib/drafts.d.ts +0 -14
  21. package/lib/emojis.d.ts +0 -44
  22. package/lib/errors.d.ts +0 -8
  23. package/lib/files.d.ts +0 -41
  24. package/lib/general.d.ts +0 -16
  25. package/lib/groups.d.ts +0 -169
  26. package/lib/hosted_customer.d.ts +0 -7
  27. package/lib/integration_actions.d.ts +0 -20
  28. package/lib/integrations.d.ts +0 -177
  29. package/lib/jobs.d.ts +0 -23
  30. package/lib/limits.d.ts +0 -7
  31. package/lib/marketplace.d.ts +0 -42
  32. package/lib/message_attachments.d.ts +0 -24
  33. package/lib/mfa.d.ts +0 -4
  34. package/lib/plugins.d.ts +0 -136
  35. package/lib/posts.d.ts +0 -182
  36. package/lib/preferences.d.ts +0 -9
  37. package/lib/product_notices.d.ts +0 -26
  38. package/lib/products.d.ts +0 -8
  39. package/lib/properties.d.ts +0 -47
  40. package/lib/reactions.d.ts +0 -6
  41. package/lib/remote_clusters.d.ts +0 -35
  42. package/lib/reports.d.ts +0 -65
  43. package/lib/requests.d.ts +0 -53
  44. package/lib/roles.d.ts +0 -12
  45. package/lib/saml.d.ts +0 -10
  46. package/lib/schedule_post.d.ts +0 -27
  47. package/lib/schemes.d.ts +0 -29
  48. package/lib/search.d.ts +0 -25
  49. package/lib/sessions.d.ts +0 -15
  50. package/lib/setup.d.ts +0 -4
  51. package/lib/shared_channels.d.ts +0 -26
  52. package/lib/store.d.ts +0 -95
  53. package/lib/teams.d.ts +0 -98
  54. package/lib/terms_of_service.d.ts +0 -6
  55. package/lib/threads.d.ts +0 -63
  56. package/lib/typing.d.ts +0 -5
  57. package/lib/users.d.ts +0 -139
package/lib/sessions.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import type { TeamMembership } from './teams';
2
- export type Session = {
3
- id: string;
4
- token: string;
5
- create_at: number;
6
- expires_at: number;
7
- last_activity_at: number;
8
- user_id: string;
9
- device_id: string;
10
- roles: string;
11
- is_oauth: boolean;
12
- props: Record<string, any>;
13
- team_members: TeamMembership[];
14
- local: boolean;
15
- };
package/lib/setup.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export type CompleteOnboardingRequest = {
2
- organization: string;
3
- install_plugins: string[];
4
- };
@@ -1,26 +0,0 @@
1
- export type SharedChannelRemote = {
2
- id: string;
3
- channel_id: string;
4
- creator_id: string;
5
- create_at: number;
6
- update_at: number;
7
- delete_at: number;
8
- is_invite_accepted: boolean;
9
- is_invite_confirmed: boolean;
10
- remote_id: string;
11
- last_post_update_at: number;
12
- last_post_id: string;
13
- last_post_create_at: number;
14
- last_post_create_id: string;
15
- };
16
- export type RemoteClusterInfo = {
17
- name: string;
18
- display_name: string;
19
- create_at: number;
20
- delete_at: number;
21
- last_ping_at: number;
22
- };
23
- export type SharedChannelsState = {
24
- remotes: Record<string, RemoteClusterInfo[]>;
25
- remotesByRemoteId: Record<string, RemoteClusterInfo>;
26
- };
package/lib/store.d.ts DELETED
@@ -1,95 +0,0 @@
1
- import type { AdminState } from './admin';
2
- import type { AppsState } from './apps';
3
- import type { Bot } from './bots';
4
- import type { ChannelBookmarksState } from './channel_bookmarks';
5
- import type { ChannelCategoriesState } from './channel_categories';
6
- import type { ChannelsState } from './channels';
7
- import type { CloudState, CloudUsage } from './cloud';
8
- import type { EmojisState } from './emojis';
9
- import type { FilesState } from './files';
10
- import type { GeneralState } from './general';
11
- import type { GroupsState } from './groups';
12
- import type { HostedCustomerState } from './hosted_customer';
13
- import type { IntegrationsState } from './integrations';
14
- import type { JobsState } from './jobs';
15
- import type { LimitsState } from './limits';
16
- import type { PostsState } from './posts';
17
- import type { PreferenceType } from './preferences';
18
- import type { AdminRequestsStatuses, ChannelsRequestsStatuses, FilesRequestsStatuses, GeneralRequestsStatuses, PostsRequestsStatuses, RolesRequestsStatuses, TeamsRequestsStatuses, UsersRequestsStatuses } from './requests';
19
- import type { Role } from './roles';
20
- import type { ScheduledPostsState } from './schedule_post';
21
- import type { SchemesState } from './schemes';
22
- import type { SearchState } from './search';
23
- import type { RemoteClusterInfo } from './shared_channels';
24
- import type { TeamsState } from './teams';
25
- import type { ThreadsState } from './threads';
26
- import type { Typing } from './typing';
27
- import type { UsersState } from './users';
28
- export type GlobalState = {
29
- entities: {
30
- general: GeneralState;
31
- users: UsersState;
32
- limits: LimitsState;
33
- teams: TeamsState;
34
- channels: ChannelsState;
35
- channelBookmarks: ChannelBookmarksState;
36
- posts: PostsState;
37
- threads: ThreadsState;
38
- bots: {
39
- accounts: Record<string, Bot>;
40
- };
41
- preferences: {
42
- myPreferences: {
43
- [x: string]: PreferenceType;
44
- };
45
- userPreferences: {
46
- [userID: string]: {
47
- [x: string]: PreferenceType;
48
- };
49
- };
50
- };
51
- admin: AdminState;
52
- jobs: JobsState;
53
- search: SearchState;
54
- integrations: IntegrationsState;
55
- files: FilesState;
56
- emojis: EmojisState;
57
- typing: Typing;
58
- roles: {
59
- roles: {
60
- [x: string]: Role;
61
- };
62
- pending: Set<string>;
63
- };
64
- schemes: SchemesState;
65
- groups: GroupsState;
66
- channelCategories: ChannelCategoriesState;
67
- apps: AppsState;
68
- cloud: CloudState;
69
- hostedCustomer: HostedCustomerState;
70
- usage: CloudUsage;
71
- scheduledPosts: ScheduledPostsState;
72
- sharedChannels?: {
73
- remotes?: Record<string, RemoteClusterInfo[]>;
74
- remotesByRemoteId?: Record<string, RemoteClusterInfo>;
75
- };
76
- };
77
- errors: any[];
78
- requests: {
79
- channels: ChannelsRequestsStatuses;
80
- general: GeneralRequestsStatuses;
81
- posts: PostsRequestsStatuses;
82
- teams: TeamsRequestsStatuses;
83
- users: UsersRequestsStatuses;
84
- admin: AdminRequestsStatuses;
85
- files: FilesRequestsStatuses;
86
- roles: RolesRequestsStatuses;
87
- };
88
- websocket: {
89
- connected: boolean;
90
- lastConnectAt: number;
91
- lastDisconnectAt: number;
92
- connectionId: string;
93
- serverHostname: string;
94
- };
95
- };
package/lib/teams.d.ts DELETED
@@ -1,98 +0,0 @@
1
- import type { ServerError } from './errors';
2
- import type { UserProfile } from './users';
3
- import type { RelationOneToOne } from './utilities';
4
- export type TeamMembership = TeamUnread & {
5
- user_id: string;
6
- roles: string;
7
- delete_at: number;
8
- scheme_admin: boolean;
9
- scheme_guest: boolean;
10
- scheme_user: boolean;
11
- };
12
- export type TeamMemberWithError = {
13
- member: TeamMembership;
14
- user_id: string;
15
- error: ServerError;
16
- };
17
- export type TeamType = 'O' | 'I';
18
- export type Team = {
19
- id: string;
20
- create_at: number;
21
- update_at: number;
22
- delete_at: number;
23
- display_name: string;
24
- name: string;
25
- description: string;
26
- email: string;
27
- type: TeamType;
28
- company_name: string;
29
- allowed_domains: string;
30
- invite_id: string;
31
- allow_open_invite: boolean;
32
- scheme_id: string;
33
- group_constrained: boolean;
34
- policy_id?: string | null;
35
- last_team_icon_update?: number;
36
- };
37
- export type TeamsState = {
38
- currentTeamId: string;
39
- teams: Record<string, Team>;
40
- myMembers: Record<string, TeamMembership>;
41
- membersInTeam: RelationOneToOne<Team, RelationOneToOne<UserProfile, TeamMembership>>;
42
- stats: RelationOneToOne<Team, TeamStats>;
43
- groupsAssociatedToTeam: any;
44
- totalCount: number;
45
- };
46
- export type TeamUnread = {
47
- team_id: string;
48
- /** The number of unread mentions in channels on this team, not including DMs and GMs */
49
- mention_count: number;
50
- /** The number of unread mentions in root posts in channels on this team, not including DMs and GMs */
51
- mention_count_root: number;
52
- /**
53
- * The number of unread posts in channels on this team, not including DMs and GMs
54
- *
55
- * @remarks Note that this differs from ChannelMembership.msg_count and ChannelUnread.msg_count since it tracks
56
- * unread posts instead of read posts.
57
- */
58
- msg_count: number;
59
- /**
60
- * The number of unread root posts in channels on this team, not including DMs and GMs
61
- *
62
- * @remarks Note that this differs from ChannelMember.msg_count_root and ChannelUnread.msg_count_root since it
63
- * tracks unread posts instead of read posts.
64
- */
65
- msg_count_root: number;
66
- thread_count?: number;
67
- thread_mention_count?: number;
68
- thread_urgent_mention_count?: number;
69
- };
70
- export type GetTeamMembersOpts = {
71
- sort?: 'Username';
72
- exclude_deleted_users?: boolean;
73
- };
74
- export type TeamsWithCount = {
75
- teams: Team[];
76
- total_count: number;
77
- };
78
- export type TeamStats = {
79
- team_id: string;
80
- total_member_count: number;
81
- active_member_count: number;
82
- };
83
- export type TeamSearchOpts = PagedTeamSearchOpts | NotPagedTeamSearchOpts;
84
- export type PagedTeamSearchOpts = {
85
- page: number;
86
- per_page: number;
87
- } & NotPagedTeamSearchOpts;
88
- export type NotPagedTeamSearchOpts = {
89
- allow_open_invite?: boolean;
90
- group_constrained?: boolean;
91
- };
92
- export type TeamInviteWithError = {
93
- email: string;
94
- error: {
95
- id: string;
96
- message: string;
97
- };
98
- };
@@ -1,6 +0,0 @@
1
- export type TermsOfService = {
2
- id: string;
3
- create_at: number;
4
- user_id: string;
5
- text: string;
6
- };
package/lib/threads.d.ts DELETED
@@ -1,63 +0,0 @@
1
- import type { Channel } from './channels';
2
- import type { Post } from './posts';
3
- import type { Team } from './teams';
4
- import type { UserProfile } from './users';
5
- import type { IDMappedObjects, RelationOneToMany, RelationOneToOne } from './utilities';
6
- export declare enum UserThreadType {
7
- Synthetic = "S"
8
- }
9
- export type UserThread = {
10
- id: string;
11
- reply_count: number;
12
- last_reply_at: number;
13
- last_viewed_at: number;
14
- participants: Array<{
15
- id: UserProfile['id'];
16
- } | UserProfile>;
17
- unread_replies: number;
18
- unread_mentions: number;
19
- is_following: boolean;
20
- is_urgent?: boolean;
21
- type?: UserThreadType;
22
- /**
23
- * only depend on channel_id and user_id for UserThread<>Channel/User mapping,
24
- * use normalized post store/selectors as those are kept up-to-date in the store
25
- */
26
- post: {
27
- channel_id: Channel['id'];
28
- user_id: UserProfile['id'];
29
- };
30
- };
31
- type SyntheticMissingKeys = 'unread_replies' | 'unread_mentions' | 'last_viewed_at';
32
- export type UserThreadSynthetic = Omit<UserThread, SyntheticMissingKeys> & {
33
- type: UserThreadType.Synthetic;
34
- };
35
- export declare function threadIsSynthetic(thread: UserThread | UserThreadSynthetic): thread is UserThreadSynthetic;
36
- export type UserThreadWithPost = UserThread & {
37
- post: Post;
38
- };
39
- export type UserThreadList = {
40
- total: number;
41
- total_unread_threads: number;
42
- total_unread_mentions: number;
43
- total_unread_urgent_mentions?: number;
44
- threads: UserThreadWithPost[];
45
- };
46
- export type ThreadsState = {
47
- threadsInTeam: RelationOneToMany<Team, UserThread>;
48
- unreadThreadsInTeam: RelationOneToMany<Team, UserThread>;
49
- threads: IDMappedObjects<UserThread>;
50
- counts: RelationOneToOne<Team, {
51
- total: number;
52
- total_unread_threads: number;
53
- total_unread_mentions: number;
54
- total_unread_urgent_mentions?: number;
55
- }>;
56
- countsIncludingDirect: RelationOneToOne<Team, {
57
- total: number;
58
- total_unread_threads: number;
59
- total_unread_mentions: number;
60
- total_unread_urgent_mentions?: number;
61
- }>;
62
- };
63
- export {};
package/lib/typing.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export type Typing = {
2
- [x: string]: {
3
- [x: string]: number;
4
- };
5
- };
package/lib/users.d.ts DELETED
@@ -1,139 +0,0 @@
1
- import type { Audit } from './audits';
2
- import type { Channel } from './channels';
3
- import type { Group } from './groups';
4
- import type { Session } from './sessions';
5
- import type { Team } from './teams';
6
- import type { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
7
- export type UserNotifyProps = {
8
- desktop: 'default' | 'all' | 'mention' | 'none';
9
- desktop_sound: 'default' | 'true' | 'false';
10
- calls_desktop_sound: 'true' | 'false';
11
- email: 'true' | 'false';
12
- mark_unread: 'all' | 'mention';
13
- push: 'default' | 'all' | 'mention' | 'none';
14
- push_status: 'ooo' | 'offline' | 'away' | 'dnd' | 'online';
15
- comments: 'never' | 'root' | 'any';
16
- first_name: 'true' | 'false';
17
- channel: 'true' | 'false';
18
- mention_keys: string;
19
- highlight_keys: string;
20
- desktop_notification_sound?: 'default' | 'Bing' | 'Crackle' | 'Down' | 'Hello' | 'Ripple' | 'Upstairs';
21
- calls_notification_sound?: 'Dynamic' | 'Calm' | 'Urgent' | 'Cheerful';
22
- desktop_threads?: 'default' | 'all' | 'mention' | 'none';
23
- email_threads?: 'default' | 'all' | 'mention' | 'none';
24
- push_threads?: 'default' | 'all' | 'mention' | 'none';
25
- auto_responder_active?: 'true' | 'false';
26
- auto_responder_message?: string;
27
- calls_mobile_sound?: 'true' | 'false' | '';
28
- calls_mobile_notification_sound?: 'Dynamic' | 'Calm' | 'Urgent' | 'Cheerful' | '';
29
- };
30
- export type UserProfile = {
31
- id: string;
32
- create_at: number;
33
- update_at: number;
34
- delete_at: number;
35
- username: string;
36
- password: string;
37
- auth_service: string;
38
- email: string;
39
- nickname: string;
40
- first_name: string;
41
- last_name: string;
42
- position: string;
43
- roles: string;
44
- props: Record<string, string>;
45
- notify_props: UserNotifyProps;
46
- last_password_update: number;
47
- last_picture_update: number;
48
- locale: string;
49
- timezone?: UserTimezone;
50
- mfa_active: boolean;
51
- last_activity_at: number;
52
- is_bot: boolean;
53
- bot_description: string;
54
- terms_of_service_id: string;
55
- terms_of_service_create_at: number;
56
- remote_id?: string;
57
- status?: string;
58
- custom_profile_attributes?: Record<string, string | string[]>;
59
- failed_attempts?: number;
60
- };
61
- export type UserProfileWithLastViewAt = UserProfile & {
62
- last_viewed_at: number;
63
- };
64
- export type UsersState = {
65
- currentUserId: string;
66
- isManualStatus: RelationOneToOne<UserProfile, boolean>;
67
- mySessions: Session[];
68
- myAudits: Audit[];
69
- profiles: IDMappedObjects<UserProfile>;
70
- profilesInTeam: RelationOneToManyUnique<Team, UserProfile>;
71
- profilesNotInTeam: RelationOneToManyUnique<Team, UserProfile>;
72
- profilesWithoutTeam: Set<string>;
73
- profilesInChannel: RelationOneToManyUnique<Channel, UserProfile>;
74
- profilesNotInChannel: RelationOneToManyUnique<Channel, UserProfile>;
75
- profilesInGroup: RelationOneToManyUnique<Group, UserProfile>;
76
- profilesNotInGroup: RelationOneToManyUnique<Group, UserProfile>;
77
- statuses: RelationOneToOne<UserProfile, string>;
78
- stats: Partial<UsersStats>;
79
- filteredStats: Partial<UsersStats>;
80
- myUserAccessTokens: Record<string, UserAccessToken>;
81
- lastActivity: RelationOneToOne<UserProfile, number>;
82
- dndEndTimes: RelationOneToOne<UserProfile, number>;
83
- };
84
- export type UserTimezone = {
85
- useAutomaticTimezone: boolean | string;
86
- automaticTimezone: string;
87
- manualTimezone: string;
88
- };
89
- export type UserStatus = {
90
- user_id: string;
91
- status: string;
92
- manual?: boolean;
93
- last_activity_at?: number;
94
- active_channel?: string;
95
- /**
96
- * The time when a user's timed DND status will expire. Unlike other timestamps in the app, this is in seconds
97
- * instead of milliseconds.
98
- */
99
- dnd_end_time?: number;
100
- };
101
- export declare enum CustomStatusDuration {
102
- DONT_CLEAR = "",
103
- THIRTY_MINUTES = "thirty_minutes",
104
- ONE_HOUR = "one_hour",
105
- FOUR_HOURS = "four_hours",
106
- TODAY = "today",
107
- THIS_WEEK = "this_week",
108
- DATE_AND_TIME = "date_and_time",
109
- CUSTOM_DATE_TIME = "custom_date_time"
110
- }
111
- export type UserCustomStatus = {
112
- emoji: string;
113
- text: string;
114
- duration: CustomStatusDuration;
115
- expires_at?: string;
116
- };
117
- export type UserAccessToken = {
118
- id: string;
119
- token?: string;
120
- user_id: string;
121
- description: string;
122
- is_active: boolean;
123
- };
124
- export type UsersStats = {
125
- total_users_count: number;
126
- };
127
- export type GetFilteredUsersStatsOpts = {
128
- in_team?: string;
129
- in_channel?: string;
130
- include_deleted?: boolean;
131
- include_bots?: boolean;
132
- include_remote_users?: boolean;
133
- roles?: string[];
134
- channel_roles?: string[];
135
- team_roles?: string[];
136
- };
137
- export type AuthChangeResponse = {
138
- follow_link: string;
139
- };