@mattermost/types 9.7.0 → 9.8.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 CHANGED
@@ -1,14 +1,14 @@
1
1
  /// <reference types="react" />
2
- import { Audit } from './audits';
3
- import { Compliance } from './compliance';
4
- import { AdminConfig, ClientLicense, EnvironmentConfig } from './config';
5
- import { DataRetentionCustomPolicies } from './data_retention';
6
- import { MixedUnlinkedGroupRedux } from './groups';
7
- import { PluginRedux, PluginStatusRedux } from './plugins';
8
- import { SamlCertificateStatus, SamlMetadataResponse } from './saml';
9
- import { Team } from './teams';
10
- import { UserAccessToken, UserProfile } from './users';
11
- import { RelationOneToOne } from './utilities';
2
+ import type { Audit } from './audits';
3
+ import type { Compliance } from './compliance';
4
+ import type { AdminConfig, ClientLicense, EnvironmentConfig } from './config';
5
+ import type { DataRetentionCustomPolicies } from './data_retention';
6
+ import type { MixedUnlinkedGroupRedux } from './groups';
7
+ import type { PluginRedux, PluginStatusRedux } from './plugins';
8
+ import type { SamlCertificateStatus, SamlMetadataResponse } from './saml';
9
+ import type { Team } from './teams';
10
+ import type { UserAccessToken, UserProfile } from './users';
11
+ import type { RelationOneToOne } from './utilities';
12
12
  export declare enum LogLevelEnum {
13
13
  SILLY = "silly",
14
14
  DEBUG = "debug",
@@ -110,3 +110,10 @@ export type SchemaMigration = {
110
110
  version: number;
111
111
  name: string;
112
112
  };
113
+ export type SupportPacketContent = {
114
+ id: string;
115
+ translation_id?: string;
116
+ label: string;
117
+ selected: boolean;
118
+ mandatory: boolean;
119
+ };
package/lib/apps.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProductScope } from './products';
1
+ import type { ProductScope } from './products';
2
2
  export declare enum Permission {
3
3
  UserJoinedChannelNotification = "user_joined_channel_notification",
4
4
  ActAsBot = "act_as_bot",
@@ -1,4 +1,4 @@
1
- import { UserProfile } from './users';
1
+ import type { UserProfile } from './users';
2
2
  export type UserAutocomplete = {
3
3
  users: UserProfile[];
4
4
  out_of_channel?: UserProfile[];
@@ -1,7 +1,7 @@
1
- import { Channel } from './channels';
2
- import { Team } from './teams';
3
- import { UserProfile } from './users';
4
- import { IDMappedObjects, RelationOneToOne } from './utilities';
1
+ import type { Channel } from './channels';
2
+ import type { Team } from './teams';
3
+ import type { UserProfile } from './users';
4
+ import type { IDMappedObjects, RelationOneToOne } from './utilities';
5
5
  export type ChannelCategoryType = 'favorites' | 'channels' | 'direct_messages' | 'custom';
6
6
  export declare enum CategorySorting {
7
7
  Alphabetical = "alpha",
package/lib/channels.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
2
- import { Team } from './teams';
1
+ import type { Team } from './teams';
2
+ import type { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
3
3
  export type ChannelType = 'O' | 'P' | 'D' | 'G' | 'threads';
4
4
  export type ChannelStats = {
5
5
  channel_id: string;
package/lib/cloud.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { AllowedIPRange } from './config';
2
- import { ValueOf } from './utilities';
1
+ import type { AllowedIPRange } from './config';
2
+ import type { ValueOf } from './utilities';
3
3
  export type CloudState = {
4
4
  subscription?: Subscription;
5
5
  products?: Record<string, Product>;
package/lib/config.d.ts CHANGED
@@ -293,6 +293,7 @@ export type ServiceSettings = {
293
293
  EnableOAuthServiceProvider: boolean;
294
294
  EnableIncomingWebhooks: boolean;
295
295
  EnableOutgoingWebhooks: boolean;
296
+ EnableOutgoingOAuthConnections: boolean;
296
297
  EnableCommands: boolean;
297
298
  OutgoingIntegrationRequestsTimeout: number;
298
299
  EnablePostUsernameOverride: boolean;
@@ -729,10 +730,6 @@ export type ClusterSettings = {
729
730
  EnableExperimentalGossipEncryption: boolean;
730
731
  ReadOnlyConfig: boolean;
731
732
  GossipPort: number;
732
- StreamingPort: number;
733
- MaxIdleConns: number;
734
- MaxIdleConnsPerHost: number;
735
- IdleConnTimeoutMilliseconds: number;
736
733
  };
737
734
  export type MetricsSettings = {
738
735
  Enable: boolean;
@@ -744,7 +741,6 @@ export type ExperimentalSettings = {
744
741
  ClientSideCertCheck: string;
745
742
  LinkMetadataTimeoutMilliseconds: number;
746
743
  RestrictSystemAdmin: boolean;
747
- UseNewSAMLLibrary: boolean;
748
744
  EnableSharedChannels: boolean;
749
745
  EnableRemoteClusterService: boolean;
750
746
  DisableAppBar: boolean;
@@ -825,7 +821,7 @@ export type JobSettings = {
825
821
  CleanupJobsThresholdDays: number;
826
822
  CleanupConfigThresholdDays: number;
827
823
  };
828
- export type ProductSettings = {};
824
+ export type ProductSettings = Record<string, never>;
829
825
  export type PluginSettings = {
830
826
  Enable: boolean;
831
827
  EnableUploads: boolean;
@@ -866,6 +862,7 @@ export type CloudSettings = {
866
862
  CWSURL: string;
867
863
  CWSAPIURL: string;
868
864
  CWSMock: boolean;
865
+ Disable: boolean;
869
866
  };
870
867
  export type FeatureFlags = Record<string, string | boolean>;
871
868
  export type ImportSettings = {
package/lib/drafts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PostMetadata, PostPriorityMetadata } from './posts';
1
+ import type { PostMetadata, PostPriorityMetadata } from './posts';
2
2
  export type Draft = {
3
3
  create_at: number;
4
4
  update_at: number;
package/lib/general.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ClientConfig, ClientLicense } from './config';
1
+ import type { ClientConfig, ClientLicense } from './config';
2
2
  export type GeneralState = {
3
3
  config: Partial<ClientConfig>;
4
4
  firstAdminVisitMarketplaceStatus: boolean;
package/lib/groups.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { UserProfile } from './users';
2
- import { RelationOneToOne } from './utilities';
1
+ import type { UserProfile } from './users';
2
+ import type { RelationOneToOne } from './utilities';
3
3
  export declare enum SyncableType {
4
4
  Team = "team",
5
5
  Channel = "channel"
@@ -1,5 +1,5 @@
1
1
  import type { Address, Product, Invoice } from './cloud';
2
- import { ValueOf } from './utilities';
2
+ import type { ValueOf } from './utilities';
3
3
  export declare const SelfHostedSignupProgress: {
4
4
  readonly START: "START";
5
5
  readonly CREATED_CUSTOMER: "CREATED_CUSTOMER";
@@ -1,5 +1,5 @@
1
- import { MessageAttachment } from './message_attachments';
2
- import { IDMappedObjects } from './utilities';
1
+ import type { MessageAttachment } from './message_attachments';
2
+ import type { IDMappedObjects } from './utilities';
3
3
  export type IncomingWebhook = {
4
4
  id: string;
5
5
  create_at: number;
package/lib/jobs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IDMappedObjects } from './utilities';
1
+ import type { IDMappedObjects } from './utilities';
2
2
  export type JobType = 'data_retention' | 'elasticsearch_post_indexing' | 'bleve_post_indexing' | 'ldap_sync' | 'message_export';
3
3
  export type JobStatus = 'pending' | 'in_progress' | 'success' | 'error' | 'cancel_requested' | 'canceled' | 'warning';
4
4
  export type Job = JobTypeBase & {
package/lib/limits.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export type LimitsState = {
2
- usersLimits: UsersLimits;
2
+ serverLimits: ServerLimits;
3
3
  };
4
- export type UsersLimits = {
4
+ export type ServerLimits = {
5
5
  activeUserCount: number;
6
6
  maxUsersLimit: number;
7
+ maxPostLimit: number;
8
+ postCount: number;
7
9
  };
@@ -1,5 +1,5 @@
1
- import { PluginManifest } from './plugins';
2
- import { AppManifest } from './apps';
1
+ import type { AppManifest } from './apps';
2
+ import type { PluginManifest } from './plugins';
3
3
  export type MarketplaceLabel = {
4
4
  name: string;
5
5
  description?: string;
@@ -1,4 +1,4 @@
1
- import { PostAction } from './integration_actions';
1
+ import type { PostAction } from './integration_actions';
2
2
  export type MessageAttachment = {
3
3
  id: number;
4
4
  fallback: string;
package/lib/posts.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { Channel, ChannelType } from './channels';
2
- import { CustomEmoji } from './emojis';
3
- import { FileInfo } from './files';
4
- import { Reaction } from './reactions';
5
- import { TeamType } from './teams';
6
- import { UserProfile } from './users';
7
- import { RelationOneToOne, RelationOneToMany, IDMappedObjects } from './utilities';
1
+ import type { Channel, ChannelType } from './channels';
2
+ import type { CustomEmoji } from './emojis';
3
+ import type { FileInfo } from './files';
4
+ import type { Reaction } from './reactions';
5
+ import type { TeamType } from './teams';
6
+ import type { UserProfile } from './users';
7
+ import type { RelationOneToOne, RelationOneToMany, IDMappedObjects } from './utilities';
8
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' | '';
9
9
  export type PostEmbedType = 'image' | 'link' | 'message_attachment' | 'opengraph' | 'permalink';
10
10
  export type PostEmbed = {
@@ -173,3 +173,9 @@ export type PostInfo = {
173
173
  team_display_name: string;
174
174
  has_joined_team: boolean;
175
175
  };
176
+ export type NotificationStatus = 'error' | 'not_sent' | 'unsupported' | 'success';
177
+ export type NotificationResult = {
178
+ status: NotificationStatus;
179
+ reason?: string;
180
+ data?: string;
181
+ };
package/lib/reports.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { UserProfile } from './users';
1
+ import type { UserProfile } from './users';
2
2
  export declare enum UserReportSortColumns {
3
3
  username = "Username",
4
4
  email = "Email",
package/lib/sessions.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TeamMembership } from './teams';
1
+ import type { TeamMembership } from './teams';
2
2
  export type Session = {
3
3
  id: string;
4
4
  token: string;
package/lib/store.d.ts CHANGED
@@ -1,27 +1,27 @@
1
- import { AdminState } from './admin';
2
- import { Bot } from './bots';
3
- import { ChannelsState } from './channels';
4
- import { ChannelCategoriesState } from './channel_categories';
5
- import { CloudState, CloudUsage } from './cloud';
6
- import { HostedCustomerState } from './hosted_customer';
7
- import { EmojisState } from './emojis';
8
- import { FilesState } from './files';
9
- import { GeneralState } from './general';
10
- import { GroupsState } from './groups';
11
- import { IntegrationsState } from './integrations';
12
- import { JobsState } from './jobs';
13
- import { PostsState } from './posts';
14
- import { PreferenceType } from './preferences';
15
- import { AdminRequestsStatuses, ChannelsRequestsStatuses, FilesRequestsStatuses, GeneralRequestsStatuses, PostsRequestsStatuses, RolesRequestsStatuses, TeamsRequestsStatuses, UsersRequestsStatuses } from './requests';
16
- import { Role } from './roles';
17
- import { SchemesState } from './schemes';
18
- import { SearchState } from './search';
19
- import { TeamsState } from './teams';
20
- import { ThreadsState } from './threads';
21
- import { Typing } from './typing';
22
- import { UsersState } from './users';
23
- import { AppsState } from './apps';
24
- import { LimitsState } from './limits';
1
+ import type { AdminState } from './admin';
2
+ import type { AppsState } from './apps';
3
+ import type { Bot } from './bots';
4
+ import type { ChannelCategoriesState } from './channel_categories';
5
+ import type { ChannelsState } from './channels';
6
+ import type { CloudState, CloudUsage } from './cloud';
7
+ import type { EmojisState } from './emojis';
8
+ import type { FilesState } from './files';
9
+ import type { GeneralState } from './general';
10
+ import type { GroupsState } from './groups';
11
+ import type { HostedCustomerState } from './hosted_customer';
12
+ import type { IntegrationsState } from './integrations';
13
+ import type { JobsState } from './jobs';
14
+ import type { LimitsState } from './limits';
15
+ import type { PostsState } from './posts';
16
+ import type { PreferenceType } from './preferences';
17
+ import type { AdminRequestsStatuses, ChannelsRequestsStatuses, FilesRequestsStatuses, GeneralRequestsStatuses, PostsRequestsStatuses, RolesRequestsStatuses, TeamsRequestsStatuses, UsersRequestsStatuses } from './requests';
18
+ import type { Role } from './roles';
19
+ import type { SchemesState } from './schemes';
20
+ import type { SearchState } from './search';
21
+ import type { TeamsState } from './teams';
22
+ import type { ThreadsState } from './threads';
23
+ import type { Typing } from './typing';
24
+ import type { UsersState } from './users';
25
25
  export type GlobalState = {
26
26
  entities: {
27
27
  general: GeneralState;
package/lib/teams.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ServerError } from './errors';
2
- import { UserProfile } from './users';
3
- import { RelationOneToOne } from './utilities';
1
+ import type { ServerError } from './errors';
2
+ import type { UserProfile } from './users';
3
+ import type { RelationOneToOne } from './utilities';
4
4
  export type TeamMembership = TeamUnread & {
5
5
  user_id: string;
6
6
  roles: string;
package/lib/threads.d.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import type { Channel } from './channels';
1
2
  import type { Post } from './posts';
2
3
  import type { Team } from './teams';
3
- import type { Channel } from './channels';
4
4
  import type { UserProfile } from './users';
5
5
  import type { IDMappedObjects, RelationOneToMany, RelationOneToOne } from './utilities';
6
6
  export declare enum UserThreadType {
package/lib/users.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { Audit } from './audits';
2
- import { Channel } from './channels';
3
- import { Group } from './groups';
4
- import { Session } from './sessions';
5
- import { Team } from './teams';
6
- import { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
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
7
  export type UserNotifyProps = {
8
8
  desktop: 'default' | 'all' | 'mention' | 'none';
9
9
  desktop_sound: 'true' | 'false';
@@ -75,6 +75,7 @@ export type UsersState = {
75
75
  filteredStats: Partial<UsersStats>;
76
76
  myUserAccessTokens: Record<string, UserAccessToken>;
77
77
  lastActivity: RelationOneToOne<UserProfile, number>;
78
+ dndEndTimes: RelationOneToOne<UserProfile, number>;
78
79
  };
79
80
  export type UserTimezone = {
80
81
  useAutomaticTimezone: boolean | string;
@@ -21,7 +21,7 @@ export type IDMappedObjects<E extends {
21
21
  id: string;
22
22
  }> = RelationOneToOne<E, E>;
23
23
  export type DeepPartial<T> = {
24
- [K in keyof T]?: T[K] extends Set<any> ? T[K] : T[K] extends Map<any, any> ? T[K] : T[K] extends object ? DeepPartial<T[K]> : T[K] extends object | undefined ? DeepPartial<T[K]> : T[K];
24
+ [K in keyof T]?: (T[K] extends Set<any> ? T[K] : T[K] extends Map<any, any> ? T[K] : T[K] extends object ? DeepPartial<T[K]> : T[K] extends object | undefined ? DeepPartial<T[K]> : T[K]);
25
25
  };
26
26
  export type ValueOf<T> = T[keyof T];
27
27
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "9.7.0",
3
+ "version": "9.8.0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"
@@ -38,7 +38,8 @@
38
38
  },
39
39
  "scripts": {
40
40
  "build": "tsc --build --verbose",
41
+ "check": "eslint --ext .js,.jsx,.tsx,.ts ./src --quiet",
41
42
  "run": "tsc --watch --preserveWatchOutput",
42
- "clean": "rm -rf tsconfig.tsbuildinfo ./lib"
43
+ "clean": "rm -rf lib *.tsbuildinfo"
43
44
  }
44
45
  }