@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.
Files changed (47) hide show
  1. package/lib/admin.d.ts +12 -12
  2. package/lib/apps.d.ts +31 -31
  3. package/lib/audits.d.ts +1 -1
  4. package/lib/autocomplete.d.ts +2 -2
  5. package/lib/boards.d.ts +2 -2
  6. package/lib/bots.d.ts +2 -2
  7. package/lib/channel_categories.d.ts +4 -4
  8. package/lib/channels.d.ts +19 -17
  9. package/lib/client4.d.ts +4 -4
  10. package/lib/cloud.d.ts +28 -20
  11. package/lib/compliance.d.ts +1 -1
  12. package/lib/config.d.ts +65 -52
  13. package/lib/data_retention.d.ts +7 -7
  14. package/lib/drafts.d.ts +1 -1
  15. package/lib/emojis.d.ts +7 -7
  16. package/lib/errors.d.ts +1 -1
  17. package/lib/files.d.ts +5 -5
  18. package/lib/general.d.ts +2 -2
  19. package/lib/groups.d.ts +22 -22
  20. package/lib/hosted_customer.d.ts +5 -5
  21. package/lib/integration_actions.d.ts +4 -4
  22. package/lib/integrations.d.ts +12 -12
  23. package/lib/jobs.d.ts +6 -6
  24. package/lib/marketplace.d.ts +1 -1
  25. package/lib/message_attachments.d.ts +2 -2
  26. package/lib/mfa.d.ts +1 -1
  27. package/lib/plugins.d.ts +14 -14
  28. package/lib/posts.d.ts +18 -18
  29. package/lib/preferences.d.ts +2 -2
  30. package/lib/product_notices.d.ts +2 -2
  31. package/lib/products.d.ts +2 -2
  32. package/lib/reactions.d.ts +1 -1
  33. package/lib/requests.d.ts +13 -13
  34. package/lib/roles.d.ts +1 -1
  35. package/lib/saml.d.ts +2 -2
  36. package/lib/schemes.d.ts +4 -4
  37. package/lib/search.d.ts +3 -3
  38. package/lib/sessions.d.ts +1 -1
  39. package/lib/setup.d.ts +1 -1
  40. package/lib/store.d.ts +1 -1
  41. package/lib/teams.d.ts +11 -11
  42. package/lib/terms_of_service.d.ts +1 -1
  43. package/lib/threads.d.ts +6 -6
  44. package/lib/typing.d.ts +1 -1
  45. package/lib/users.d.ts +11 -11
  46. package/lib/utilities.d.ts +8 -8
  47. 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 declare type TeamMembership = TeamUnread & {
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 declare type TeamMemberWithError = {
12
+ export type TeamMemberWithError = {
13
13
  member: TeamMembership;
14
14
  user_id: string;
15
15
  error: ServerError;
16
16
  };
17
- export declare type TeamType = 'O' | 'I';
18
- export declare type Team = {
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 declare type TeamsState = {
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 declare type TeamUnread = {
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 declare type GetTeamMembersOpts = {
69
+ export type GetTeamMembersOpts = {
70
70
  sort?: 'Username';
71
71
  exclude_deleted_users?: boolean;
72
72
  };
73
- export declare type TeamsWithCount = {
73
+ export type TeamsWithCount = {
74
74
  teams: Team[];
75
75
  total_count: number;
76
76
  };
77
- export declare type TeamStats = {
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 declare type TeamSearchOpts = {
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 declare type TeamInviteWithError = {
88
+ export type TeamInviteWithError = {
89
89
  email: string;
90
90
  error: ServerError;
91
91
  };
@@ -1,4 +1,4 @@
1
- export declare type TermsOfService = {
1
+ export type TermsOfService = {
2
2
  id: string;
3
3
  create_at: number;
4
4
  user_id: string;
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 declare type UserThread = {
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
- declare type SyntheticMissingKeys = 'unread_replies' | 'unread_mentions' | 'last_viewed_at';
32
- export declare type UserThreadSynthetic = Omit<UserThread, SyntheticMissingKeys> & {
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 declare type UserThreadWithPost = UserThread & {
36
+ export type UserThreadWithPost = UserThread & {
37
37
  post: Post;
38
38
  };
39
- export declare type UserThreadList = {
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 declare type ThreadsState = {
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
@@ -1,4 +1,4 @@
1
- export declare type Typing = {
1
+ export type Typing = {
2
2
  [x: string]: {
3
3
  [x: string]: number;
4
4
  };
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 declare type UserNotifyProps = {
7
+ export type UserNotifyProps = {
8
8
  desktop: 'default' | 'all' | 'mention' | 'none';
9
9
  desktop_sound: 'true' | 'false';
10
10
  calls_desktop_sound: 'true' | 'false';
@@ -25,7 +25,7 @@ export declare type UserNotifyProps = {
25
25
  auto_responder_active?: 'true' | 'false';
26
26
  auto_responder_message?: string;
27
27
  };
28
- export declare type UserProfile = {
28
+ export type UserProfile = {
29
29
  id: string;
30
30
  create_at: number;
31
31
  update_at: number;
@@ -54,10 +54,10 @@ export declare type UserProfile = {
54
54
  remote_id?: string;
55
55
  status?: string;
56
56
  };
57
- export declare type UserProfileWithLastViewAt = UserProfile & {
57
+ export type UserProfileWithLastViewAt = UserProfile & {
58
58
  last_viewed_at: number;
59
59
  };
60
- export declare type UsersState = {
60
+ export type UsersState = {
61
61
  currentUserId: string;
62
62
  isManualStatus: RelationOneToOne<UserProfile, boolean>;
63
63
  mySessions: Session[];
@@ -76,12 +76,12 @@ export declare type UsersState = {
76
76
  myUserAccessTokens: Record<string, UserAccessToken>;
77
77
  lastActivity: RelationOneToOne<UserProfile, number>;
78
78
  };
79
- export declare type UserTimezone = {
79
+ export type UserTimezone = {
80
80
  useAutomaticTimezone: boolean | string;
81
81
  automaticTimezone: string;
82
82
  manualTimezone: string;
83
83
  };
84
- export declare type UserStatus = {
84
+ export type UserStatus = {
85
85
  user_id: string;
86
86
  status: string;
87
87
  manual?: boolean;
@@ -99,23 +99,23 @@ export declare enum CustomStatusDuration {
99
99
  DATE_AND_TIME = "date_and_time",
100
100
  CUSTOM_DATE_TIME = "custom_date_time"
101
101
  }
102
- export declare type UserCustomStatus = {
102
+ export type UserCustomStatus = {
103
103
  emoji: string;
104
104
  text: string;
105
105
  duration: CustomStatusDuration;
106
106
  expires_at?: string;
107
107
  };
108
- export declare type UserAccessToken = {
108
+ export type UserAccessToken = {
109
109
  id: string;
110
110
  token?: string;
111
111
  user_id: string;
112
112
  description: string;
113
113
  is_active: boolean;
114
114
  };
115
- export declare type UsersStats = {
115
+ export type UsersStats = {
116
116
  total_users_count: number;
117
117
  };
118
- export declare type GetFilteredUsersStatsOpts = {
118
+ export type GetFilteredUsersStatsOpts = {
119
119
  in_team?: string;
120
120
  in_channel?: string;
121
121
  include_deleted?: boolean;
@@ -125,6 +125,6 @@ export declare type GetFilteredUsersStatsOpts = {
125
125
  channel_roles?: string[];
126
126
  team_roles?: string[];
127
127
  };
128
- export declare type AuthChangeResponse = {
128
+ export type AuthChangeResponse = {
129
129
  follow_link: string;
130
130
  };
@@ -1,33 +1,33 @@
1
- export declare type RelationOneToOne<E extends {
1
+ export type RelationOneToOne<E extends {
2
2
  id: string;
3
3
  }, T> = {
4
4
  [x in E['id']]: T;
5
5
  };
6
- export declare type RelationOneToMany<E1 extends {
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 declare type RelationOneToManyUnique<E1 extends {
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 declare type IDMappedObjects<E extends {
20
+ export type IDMappedObjects<E extends {
21
21
  id: string;
22
22
  }> = RelationOneToOne<E, E>;
23
- export declare type DeepPartial<T> = {
23
+ export type DeepPartial<T> = {
24
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 declare type ValueOf<T> = T[keyof T];
26
+ export type ValueOf<T> = T[keyof T];
27
27
  /**
28
28
  * Based on https://stackoverflow.com/a/49725198
29
29
  */
30
- export declare type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
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 declare type Intersection<T1, T2> = Omit<Omit<T1 & T2, keyof (Omit<T1, keyof (T2)>)>, keyof (Omit<T2, keyof (T1)>)>;
33
+ export type Intersection<T1, T2> = Omit<Omit<T1 & T2, keyof (Omit<T1, keyof (T2)>)>, keyof (Omit<T2, keyof (T1)>)>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "9.3.0",
3
+ "version": "9.4.0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"