@mattermost/types 11.4.0 → 11.5.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.
@@ -40,6 +40,10 @@ export type ChannelBookmarkPatch = {
40
40
  image_url?: string;
41
41
  emoji?: string;
42
42
  };
43
+ export type UpdateChannelBookmarkResponse = {
44
+ updated: ChannelBookmark;
45
+ deleted: ChannelBookmark;
46
+ };
43
47
  export type ChannelBookmarkWithFileInfo = ChannelBookmark & {
44
48
  file: FileInfo;
45
49
  };
package/lib/channels.d.ts CHANGED
@@ -51,6 +51,7 @@ export type Channel = {
51
51
  policy_enforced?: boolean;
52
52
  policy_is_active?: boolean;
53
53
  default_category_name?: string;
54
+ autotranslation?: boolean;
54
55
  };
55
56
  export type ServerChannel = Channel & {
56
57
  /**
@@ -101,6 +102,7 @@ export type ChannelMembership = {
101
102
  scheme_user: boolean;
102
103
  scheme_admin: boolean;
103
104
  post_root_id?: string;
105
+ autotranslation_disabled?: boolean;
104
106
  };
105
107
  export type ChannelUnread = {
106
108
  channel_id: string;
package/lib/cloud.d.ts CHANGED
@@ -163,10 +163,6 @@ export type TeamsUsage = {
163
163
  export type ValidBusinessEmail = {
164
164
  is_valid: boolean;
165
165
  };
166
- export interface NewsletterRequestBody {
167
- email: string;
168
- subscribed_content: string;
169
- }
170
166
  export declare const areShippingDetailsValid: (address: Address | null | undefined) => boolean;
171
167
  export type Feedback = {
172
168
  reason: string;
package/lib/config.d.ts CHANGED
@@ -229,6 +229,9 @@ export type ClientConfig = {
229
229
  EnableAttributeBasedAccessControl: string;
230
230
  EnableChannelScopeAccessControl: string;
231
231
  EnableUserManagedAttributes: string;
232
+ AutoTranslationLanguages: string;
233
+ EnableAutoTranslation: string;
234
+ RestrictDMAndGMAutotranslation: string;
232
235
  };
233
236
  export type License = {
234
237
  id: string;
@@ -316,6 +319,7 @@ export type ServiceSettings = {
316
319
  GoogleDeveloperKey: string;
317
320
  EnableOAuthServiceProvider: boolean;
318
321
  EnableDynamicClientRegistration: boolean;
322
+ DCRRedirectURIAllowlist: string[];
319
323
  EnableIncomingWebhooks: boolean;
320
324
  EnableOutgoingWebhooks: boolean;
321
325
  EnableOutgoingOAuthConnections: boolean;
@@ -717,16 +721,18 @@ export type LocalizationSettings = {
717
721
  };
718
722
  export type AutoTranslationSettings = {
719
723
  Enable: boolean;
720
- Provider: '' | 'libretranslate';
724
+ TargetLanguages: string[];
725
+ Workers: number;
726
+ Provider: '' | 'libretranslate' | 'agents';
721
727
  LibreTranslate: {
722
728
  URL: string;
723
729
  APIKey: string;
724
730
  };
725
- TimeoutsMs: {
726
- NewPost: number;
727
- Fetch: number;
728
- Notification: number;
731
+ Agents?: {
732
+ LLMServiceID: string;
729
733
  };
734
+ TimeoutMs: number;
735
+ RestrictDMAndGM: boolean;
730
736
  };
731
737
  export type SamlSettings = {
732
738
  Enable: boolean;
@@ -1041,12 +1047,6 @@ export type EnvironmentConfigSettings<T> = {
1041
1047
  export type EnvironmentConfig = {
1042
1048
  [P in keyof AdminConfig]: EnvironmentConfigSettings<AdminConfig[P]>;
1043
1049
  };
1044
- export type WarnMetricStatus = {
1045
- id: string;
1046
- limit: number;
1047
- acked: boolean;
1048
- store_status: string;
1049
- };
1050
1050
  export declare enum CollapsedThreads {
1051
1051
  DISABLED = "disabled",
1052
1052
  DEFAULT_ON = "default_on",
package/lib/errors.d.ts CHANGED
@@ -3,6 +3,7 @@ export type ServerError = {
3
3
  server_error_id?: string;
4
4
  stack?: string;
5
5
  message: string;
6
+ detailed_error?: string;
6
7
  status_code?: number;
7
8
  url?: string;
8
9
  };
@@ -1,7 +1,8 @@
1
1
  export type PostAction = {
2
2
  id?: string;
3
3
  type?: string;
4
- name?: string;
4
+ name: string;
5
+ tooltip?: string;
5
6
  disabled?: boolean;
6
7
  style?: string;
7
8
  data_source?: string;
@@ -20,6 +20,9 @@ function isPostAction(v) {
20
20
  if ('disabled' in v && typeof v.disabled !== 'boolean') {
21
21
  return false;
22
22
  }
23
+ if ('tooltip' in v && typeof v.tooltip !== 'string') {
24
+ return false;
25
+ }
23
26
  if ('style' in v && typeof v.style !== 'string') {
24
27
  return false;
25
28
  }
@@ -127,13 +127,14 @@ export type IntegrationsState = {
127
127
  commands: IDMappedObjects<Command>;
128
128
  dialogArguments?: DialogArgs;
129
129
  dialogTriggerId: string;
130
- dialog?: {
131
- url: string;
132
- dialog: Dialog;
133
- trigger_id: string;
134
- };
130
+ dialog?: OpenDialogRequest;
131
+ };
132
+ export type OpenDialogRequest = {
133
+ trigger_id: string;
134
+ url: string;
135
+ dialog: Dialog;
135
136
  };
136
- type Dialog = {
137
+ export type Dialog = {
137
138
  callback_id?: string;
138
139
  elements?: DialogElement[];
139
140
  title: string;
@@ -186,4 +187,3 @@ export type SubmitDialogResponse = {
186
187
  type?: string;
187
188
  form?: Dialog;
188
189
  };
189
- export {};
package/lib/posts.d.ts CHANGED
@@ -5,7 +5,7 @@ import type { Reaction } from './reactions';
5
5
  import type { TeamType } from './teams';
6
6
  import type { UserProfile } from './users';
7
7
  import { type RelationOneToOne, type RelationOneToMany, type IDMappedObjects } from './utilities';
8
- export type PostType = 'system_add_remove' | 'system_add_to_channel' | 'system_add_to_team' | 'system_channel_deleted' | 'system_channel_restored' | 'system_displayname_change' | 'system_convert_channel' | 'system_ephemeral' | 'system_header_change' | 'system_join_channel' | 'system_join_leave' | 'system_leave_channel' | 'system_purpose_change' | 'system_remove_from_channel' | 'system_combined_user_activity' | 'system_fake_parent_deleted' | 'system_generic' | 'reminder' | 'system_wrangler' | 'custom_spillage_report' | 'burn_on_read' | '';
8
+ export type PostType = 'system_add_remove' | 'system_add_to_channel' | 'system_add_to_team' | 'system_channel_deleted' | 'system_channel_restored' | 'system_displayname_change' | 'system_convert_channel' | 'system_ephemeral' | 'system_header_change' | 'system_join_channel' | 'system_join_leave' | 'system_leave_channel' | 'system_purpose_change' | 'system_remove_from_channel' | 'system_combined_user_activity' | 'system_fake_parent_deleted' | 'system_generic' | 'reminder' | 'system_wrangler' | 'custom_spillage_report' | 'system_autotranslation' | 'burn_on_read' | '';
9
9
  export type PostEmbedType = 'image' | 'link' | 'message_attachment' | 'opengraph' | 'permalink';
10
10
  export type PostEmbed = {
11
11
  type: PostEmbedType;
@@ -28,6 +28,13 @@ export type PostPriorityMetadata = {
28
28
  requested_ack?: boolean;
29
29
  persistent_notifications?: boolean;
30
30
  };
31
+ export type PostTranslation = {
32
+ object?: {
33
+ message: string;
34
+ };
35
+ state: 'ready' | 'skipped' | 'processing' | 'unavailable';
36
+ source_lang?: string;
37
+ };
31
38
  export type PostMetadata = {
32
39
  embeds: PostEmbed[];
33
40
  emojis: CustomEmoji[];
@@ -36,6 +43,7 @@ export type PostMetadata = {
36
43
  reactions?: Reaction[];
37
44
  priority?: PostPriorityMetadata;
38
45
  acknowledgements?: PostAcknowledgement[];
46
+ translations?: Record<string, PostTranslation>;
39
47
  expire_at?: number;
40
48
  recipients?: string[];
41
49
  };
@@ -48,6 +48,9 @@ export type UserPropertyField = PropertyField & {
48
48
  ldap?: string;
49
49
  saml?: string;
50
50
  managed?: string;
51
+ protected?: boolean;
52
+ source_plugin_id?: string;
53
+ access_mode?: '' | 'source_only' | 'shared_only';
51
54
  };
52
55
  };
53
56
  export type SelectPropertyField = PropertyField & {
package/lib/store.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { AdminState } from './admin';
2
+ import type { LLMService } from './agents';
2
3
  import type { AppsState } from './apps';
3
4
  import type { Bot } from './bots';
4
5
  import type { ChannelBookmarksState } from './channel_bookmarks';
@@ -49,6 +50,11 @@ export type GlobalState = {
49
50
  service_id: string;
50
51
  service_type: string;
51
52
  }>;
53
+ llmServices: LLMService[];
54
+ agentsStatus: {
55
+ available: boolean;
56
+ reason?: string;
57
+ };
52
58
  };
53
59
  bots: {
54
60
  accounts: Record<string, Bot>;
package/lib/users.d.ts CHANGED
@@ -70,7 +70,6 @@ export type UsersState = {
70
70
  profiles: IDMappedObjects<UserProfile>;
71
71
  profilesInTeam: RelationOneToManyUnique<Team, UserProfile>;
72
72
  profilesNotInTeam: RelationOneToManyUnique<Team, UserProfile>;
73
- profilesWithoutTeam: Set<string>;
74
73
  profilesInChannel: RelationOneToManyUnique<Channel, UserProfile>;
75
74
  profilesNotInChannel: RelationOneToManyUnique<Channel, UserProfile>;
76
75
  profilesInGroup: RelationOneToManyUnique<Group, UserProfile>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "11.4.0",
3
+ "version": "11.5.0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"