@mattermost/types 9.6.0 → 9.7.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.
package/lib/admin.d.ts CHANGED
@@ -52,8 +52,8 @@ export type AdminState = {
52
52
  userAccessTokens: Record<string, UserAccessToken>;
53
53
  clusterInfo: ClusterInfo[];
54
54
  samlCertStatus?: SamlCertificateStatus;
55
- analytics?: Record<string, number | AnalyticsRow[]>;
56
- teamAnalytics?: RelationOneToOne<Team, Record<string, number | AnalyticsRow[]>>;
55
+ analytics: AnalyticsState;
56
+ teamAnalytics: RelationOneToOne<Team, AnalyticsState>;
57
57
  userAccessTokensByUser?: RelationOneToOne<UserProfile, Record<string, UserAccessToken>>;
58
58
  plugins?: Record<string, PluginRedux>;
59
59
  pluginStatuses?: Record<string, PluginStatusRedux>;
@@ -62,6 +62,29 @@ export type AdminState = {
62
62
  dataRetentionCustomPoliciesCount: number;
63
63
  prevTrialLicense: ClientLicense;
64
64
  };
65
+ export type AnalyticsState = {
66
+ POST_PER_DAY?: AnalyticsRow[];
67
+ BOT_POST_PER_DAY?: AnalyticsRow[];
68
+ USERS_WITH_POSTS_PER_DAY?: AnalyticsRow[];
69
+ TOTAL_PUBLIC_CHANNELS?: number;
70
+ TOTAL_PRIVATE_GROUPS?: number;
71
+ TOTAL_POSTS?: number;
72
+ TOTAL_USERS?: number;
73
+ TOTAL_INACTIVE_USERS?: number;
74
+ TOTAL_TEAMS?: number;
75
+ TOTAL_WEBSOCKET_CONNECTIONS?: number;
76
+ TOTAL_MASTER_DB_CONNECTIONS?: number;
77
+ TOTAL_READ_DB_CONNECTIONS?: number;
78
+ DAILY_ACTIVE_USERS?: number;
79
+ MONTHLY_ACTIVE_USERS?: number;
80
+ TOTAL_FILE_POSTS?: number;
81
+ TOTAL_HASHTAG_POSTS?: number;
82
+ TOTAL_IHOOKS?: number;
83
+ TOTAL_OHOOKS?: number;
84
+ TOTAL_COMMANDS?: number;
85
+ TOTAL_SESSIONS?: number;
86
+ REGISTERED_USERS?: number;
87
+ };
65
88
  export type ClusterInfo = {
66
89
  id: string;
67
90
  version: string;
package/lib/admin.js CHANGED
@@ -10,4 +10,4 @@ var LogLevelEnum;
10
10
  LogLevelEnum["INFO"] = "info";
11
11
  LogLevelEnum["WARN"] = "warn";
12
12
  LogLevelEnum["ERROR"] = "error";
13
- })(LogLevelEnum = exports.LogLevelEnum || (exports.LogLevelEnum = {}));
13
+ })(LogLevelEnum || (exports.LogLevelEnum = LogLevelEnum = {}));
package/lib/apps.js CHANGED
@@ -11,11 +11,11 @@ var Permission;
11
11
  Permission["PermissionActAsAdmin"] = "act_as_admin";
12
12
  Permission["RemoteOAuth2"] = "remote_oauth2";
13
13
  Permission["RemoteWebhooks"] = "remote_webhooks";
14
- })(Permission = exports.Permission || (exports.Permission = {}));
14
+ })(Permission || (exports.Permission = Permission = {}));
15
15
  var Locations;
16
16
  (function (Locations) {
17
17
  Locations["PostMenu"] = "/post_menu";
18
18
  Locations["ChannelHeader"] = "/channel_header";
19
19
  Locations["Command"] = "/command";
20
20
  Locations["InPost"] = "/in_post";
21
- })(Locations = exports.Locations || (exports.Locations = {}));
21
+ })(Locations || (exports.Locations = Locations = {}));
@@ -5,7 +5,7 @@ import { IDMappedObjects, RelationOneToOne } from './utilities';
5
5
  export type ChannelCategoryType = 'favorites' | 'channels' | 'direct_messages' | 'custom';
6
6
  export declare enum CategorySorting {
7
7
  Alphabetical = "alpha",
8
- Default = "",
8
+ Default = "",// behaves the same as manual
9
9
  Recency = "recent",
10
10
  Manual = "manual"
11
11
  }
@@ -9,4 +9,4 @@ var CategorySorting;
9
9
  CategorySorting["Default"] = "";
10
10
  CategorySorting["Recency"] = "recent";
11
11
  CategorySorting["Manual"] = "manual";
12
- })(CategorySorting = exports.CategorySorting || (exports.CategorySorting = {}));
12
+ })(CategorySorting || (exports.CategorySorting = CategorySorting = {}));
package/lib/channels.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IDMappedObjects, RelationOneToMany, RelationOneToOne } from './utilities';
1
+ import { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
2
2
  import { Team } from './teams';
3
3
  export type ChannelType = 'O' | 'P' | 'D' | 'G' | 'threads';
4
4
  export type ChannelStats = {
@@ -112,7 +112,7 @@ export type ChannelUnread = {
112
112
  export type ChannelsState = {
113
113
  currentChannelId: string;
114
114
  channels: IDMappedObjects<Channel>;
115
- channelsInTeam: RelationOneToMany<Team, Channel>;
115
+ channelsInTeam: RelationOneToManyUnique<Team, Channel>;
116
116
  myMembers: RelationOneToOne<Channel, ChannelMembership>;
117
117
  roles: RelationOneToOne<Channel, Set<string>>;
118
118
  membersInChannel: RelationOneToOne<Channel, Record<string, ChannelMembership>>;
package/lib/client4.js CHANGED
@@ -9,4 +9,4 @@ var LogLevel;
9
9
  LogLevel["Warning"] = "WARNING";
10
10
  LogLevel["Info"] = "INFO";
11
11
  LogLevel["Debug"] = "DEBUG";
12
- })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
12
+ })(LogLevel || (exports.LogLevel = LogLevel = {}));
package/lib/config.d.ts CHANGED
@@ -116,6 +116,7 @@ export type ClientConfig = {
116
116
  FileLevel: string;
117
117
  FeatureFlagAppsEnabled: string;
118
118
  FeatureFlagCallsEnabled: string;
119
+ FeatureFlagWebSocketEventScope: string;
119
120
  ForgotPasswordLink: string;
120
121
  GiphySdkKey: string;
121
122
  GoogleDeveloperKey: string;
package/lib/config.js CHANGED
@@ -9,10 +9,10 @@ var CollapsedThreads;
9
9
  CollapsedThreads["DEFAULT_ON"] = "default_on";
10
10
  CollapsedThreads["DEFAULT_OFF"] = "default_off";
11
11
  CollapsedThreads["ALWAYS_ON"] = "always_on";
12
- })(CollapsedThreads = exports.CollapsedThreads || (exports.CollapsedThreads = {}));
12
+ })(CollapsedThreads || (exports.CollapsedThreads = CollapsedThreads = {}));
13
13
  var ServiceEnvironment;
14
14
  (function (ServiceEnvironment) {
15
15
  ServiceEnvironment["PRODUCTION"] = "production";
16
16
  ServiceEnvironment["TEST"] = "test";
17
17
  ServiceEnvironment["DEV"] = "dev";
18
- })(ServiceEnvironment = exports.ServiceEnvironment || (exports.ServiceEnvironment = {}));
18
+ })(ServiceEnvironment || (exports.ServiceEnvironment = ServiceEnvironment = {}));
package/lib/groups.js CHANGED
@@ -7,9 +7,9 @@ var SyncableType;
7
7
  (function (SyncableType) {
8
8
  SyncableType["Team"] = "team";
9
9
  SyncableType["Channel"] = "channel";
10
- })(SyncableType = exports.SyncableType || (exports.SyncableType = {}));
10
+ })(SyncableType || (exports.SyncableType = SyncableType = {}));
11
11
  var GroupSource;
12
12
  (function (GroupSource) {
13
13
  GroupSource["Ldap"] = "ldap";
14
14
  GroupSource["Custom"] = "custom";
15
- })(GroupSource = exports.GroupSource || (exports.GroupSource = {}));
15
+ })(GroupSource || (exports.GroupSource = GroupSource = {}));
@@ -115,9 +115,23 @@ export type IntegrationsState = {
115
115
  appsBotIDs: string[];
116
116
  systemCommands: IDMappedObjects<Command>;
117
117
  commands: IDMappedObjects<Command>;
118
+ dialog?: {
119
+ url: string;
120
+ dialog: Dialog;
121
+ };
122
+ };
123
+ type Dialog = {
124
+ callback_id?: string;
125
+ elements?: DialogElement[];
126
+ title: string;
127
+ introduction_text?: string;
128
+ icon_url?: string;
129
+ submit_label?: string;
130
+ notify_on_cancel?: boolean;
131
+ state?: string;
118
132
  };
119
133
  export type DialogSubmission = {
120
- url: string;
134
+ url?: string;
121
135
  callback_id: string;
122
136
  state: string;
123
137
  user_id: string;
@@ -149,3 +163,4 @@ export type SubmitDialogResponse = {
149
163
  error?: string;
150
164
  errors?: Record<string, string>;
151
165
  };
166
+ export {};
@@ -7,16 +7,16 @@ var HostingType;
7
7
  (function (HostingType) {
8
8
  HostingType["OnPrem"] = "on-prem";
9
9
  HostingType["Cloud"] = "cloud";
10
- })(HostingType = exports.HostingType || (exports.HostingType = {}));
10
+ })(HostingType || (exports.HostingType = HostingType = {}));
11
11
  var AuthorType;
12
12
  (function (AuthorType) {
13
13
  AuthorType["Mattermost"] = "mattermost";
14
14
  AuthorType["Partner"] = "partner";
15
15
  AuthorType["Community"] = "community";
16
- })(AuthorType = exports.AuthorType || (exports.AuthorType = {}));
16
+ })(AuthorType || (exports.AuthorType = AuthorType = {}));
17
17
  var ReleaseStage;
18
18
  (function (ReleaseStage) {
19
19
  ReleaseStage["Production"] = "production";
20
20
  ReleaseStage["Beta"] = "beta";
21
21
  ReleaseStage["Experimental"] = "experimental";
22
- })(ReleaseStage = exports.ReleaseStage || (exports.ReleaseStage = {}));
22
+ })(ReleaseStage || (exports.ReleaseStage = ReleaseStage = {}));
package/lib/plugins.js CHANGED
@@ -7,16 +7,16 @@ var HostingType;
7
7
  (function (HostingType) {
8
8
  HostingType["OnPrem"] = "on-prem";
9
9
  HostingType["Cloud"] = "cloud";
10
- })(HostingType = exports.HostingType || (exports.HostingType = {}));
10
+ })(HostingType || (exports.HostingType = HostingType = {}));
11
11
  var AuthorType;
12
12
  (function (AuthorType) {
13
13
  AuthorType["Mattermost"] = "mattermost";
14
14
  AuthorType["Partner"] = "partner";
15
15
  AuthorType["Community"] = "community";
16
- })(AuthorType = exports.AuthorType || (exports.AuthorType = {}));
16
+ })(AuthorType || (exports.AuthorType = AuthorType = {}));
17
17
  var ReleaseStage;
18
18
  (function (ReleaseStage) {
19
19
  ReleaseStage["Production"] = "production";
20
20
  ReleaseStage["Beta"] = "beta";
21
21
  ReleaseStage["Experimental"] = "experimental";
22
- })(ReleaseStage = exports.ReleaseStage || (exports.ReleaseStage = {}));
22
+ })(ReleaseStage || (exports.ReleaseStage = ReleaseStage = {}));
package/lib/posts.d.ts CHANGED
@@ -33,7 +33,7 @@ export type PostMetadata = {
33
33
  emojis: CustomEmoji[];
34
34
  files: FileInfo[];
35
35
  images: Record<string, PostImage>;
36
- reactions: Reaction[];
36
+ reactions?: Reaction[];
37
37
  priority?: PostPriorityMetadata;
38
38
  acknowledgements?: PostAcknowledgement[];
39
39
  };
package/lib/posts.js CHANGED
@@ -7,4 +7,4 @@ var PostPriority;
7
7
  (function (PostPriority) {
8
8
  PostPriority["URGENT"] = "urgent";
9
9
  PostPriority["IMPORTANT"] = "important";
10
- })(PostPriority = exports.PostPriority || (exports.PostPriority = {}));
10
+ })(PostPriority || (exports.PostPriority = PostPriority = {}));
@@ -6,4 +6,4 @@ exports.Action = void 0;
6
6
  var Action;
7
7
  (function (Action) {
8
8
  Action["URL"] = "url";
9
- })(Action = exports.Action || (exports.Action = {}));
9
+ })(Action || (exports.Action = Action = {}));
package/lib/reports.js CHANGED
@@ -11,21 +11,21 @@ var UserReportSortColumns;
11
11
  UserReportSortColumns["firstName"] = "FirstName";
12
12
  UserReportSortColumns["lastName"] = "LastName";
13
13
  UserReportSortColumns["nickname"] = "Nickname";
14
- })(UserReportSortColumns = exports.UserReportSortColumns || (exports.UserReportSortColumns = {}));
14
+ })(UserReportSortColumns || (exports.UserReportSortColumns = UserReportSortColumns = {}));
15
15
  var ReportSortDirection;
16
16
  (function (ReportSortDirection) {
17
17
  ReportSortDirection["ascending"] = "asc";
18
18
  ReportSortDirection["descending"] = "desc";
19
- })(ReportSortDirection = exports.ReportSortDirection || (exports.ReportSortDirection = {}));
19
+ })(ReportSortDirection || (exports.ReportSortDirection = ReportSortDirection = {}));
20
20
  var ReportDuration;
21
21
  (function (ReportDuration) {
22
22
  ReportDuration["AllTime"] = "all_time";
23
23
  ReportDuration["Last30Days"] = "last_30_days";
24
24
  ReportDuration["PreviousMonth"] = "previous_month";
25
25
  ReportDuration["Last6Months"] = "last_6_months";
26
- })(ReportDuration = exports.ReportDuration || (exports.ReportDuration = {}));
26
+ })(ReportDuration || (exports.ReportDuration = ReportDuration = {}));
27
27
  var CursorPaginationDirection;
28
28
  (function (CursorPaginationDirection) {
29
29
  CursorPaginationDirection["prev"] = "prev";
30
30
  CursorPaginationDirection["next"] = "next";
31
- })(CursorPaginationDirection = exports.CursorPaginationDirection || (exports.CursorPaginationDirection = {}));
31
+ })(CursorPaginationDirection || (exports.CursorPaginationDirection = CursorPaginationDirection = {}));
package/lib/teams.d.ts CHANGED
@@ -32,6 +32,7 @@ export type Team = {
32
32
  scheme_id: string;
33
33
  group_constrained: boolean;
34
34
  policy_id?: string | null;
35
+ last_team_icon_update?: number;
35
36
  };
36
37
  export type TeamsState = {
37
38
  currentTeamId: string;
package/lib/threads.js CHANGED
@@ -6,7 +6,7 @@ exports.threadIsSynthetic = exports.UserThreadType = void 0;
6
6
  var UserThreadType;
7
7
  (function (UserThreadType) {
8
8
  UserThreadType["Synthetic"] = "S"; // derived from post
9
- })(UserThreadType = exports.UserThreadType || (exports.UserThreadType = {}));
9
+ })(UserThreadType || (exports.UserThreadType = UserThreadType = {}));
10
10
  function threadIsSynthetic(thread) {
11
11
  return thread.type === UserThreadType.Synthetic;
12
12
  }
package/lib/users.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Channel } from './channels';
3
3
  import { Group } from './groups';
4
4
  import { Session } from './sessions';
5
5
  import { Team } from './teams';
6
- import { IDMappedObjects, RelationOneToMany, RelationOneToManyUnique, RelationOneToOne } from './utilities';
6
+ import { IDMappedObjects, RelationOneToManyUnique, RelationOneToOne } from './utilities';
7
7
  export type UserNotifyProps = {
8
8
  desktop: 'default' | 'all' | 'mention' | 'none';
9
9
  desktop_sound: 'true' | 'false';
@@ -63,16 +63,16 @@ export type UsersState = {
63
63
  mySessions: Session[];
64
64
  myAudits: Audit[];
65
65
  profiles: IDMappedObjects<UserProfile>;
66
- profilesInTeam: RelationOneToMany<Team, UserProfile>;
67
- profilesNotInTeam: RelationOneToMany<Team, UserProfile>;
66
+ profilesInTeam: RelationOneToManyUnique<Team, UserProfile>;
67
+ profilesNotInTeam: RelationOneToManyUnique<Team, UserProfile>;
68
68
  profilesWithoutTeam: Set<string>;
69
69
  profilesInChannel: RelationOneToManyUnique<Channel, UserProfile>;
70
70
  profilesNotInChannel: RelationOneToManyUnique<Channel, UserProfile>;
71
- profilesInGroup: RelationOneToMany<Group, UserProfile>;
72
- profilesNotInGroup: RelationOneToMany<Group, UserProfile>;
71
+ profilesInGroup: RelationOneToManyUnique<Group, UserProfile>;
72
+ profilesNotInGroup: RelationOneToManyUnique<Group, UserProfile>;
73
73
  statuses: RelationOneToOne<UserProfile, string>;
74
- stats: RelationOneToOne<UserProfile, UsersStats>;
75
- filteredStats?: UsersStats;
74
+ stats: Partial<UsersStats>;
75
+ filteredStats: Partial<UsersStats>;
76
76
  myUserAccessTokens: Record<string, UserAccessToken>;
77
77
  lastActivity: RelationOneToOne<UserProfile, number>;
78
78
  };
package/lib/users.js CHANGED
@@ -13,4 +13,4 @@ var CustomStatusDuration;
13
13
  CustomStatusDuration["THIS_WEEK"] = "this_week";
14
14
  CustomStatusDuration["DATE_AND_TIME"] = "date_and_time";
15
15
  CustomStatusDuration["CUSTOM_DATE_TIME"] = "custom_date_time";
16
- })(CustomStatusDuration = exports.CustomStatusDuration || (exports.CustomStatusDuration = {}));
16
+ })(CustomStatusDuration || (exports.CustomStatusDuration = CustomStatusDuration = {}));
@@ -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 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,11 +1,11 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "9.6.0",
3
+ "version": "9.7.0-0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"
7
7
  ],
8
- "homepage": "https://github.com/mattermost/mattermost-server/tree/master/webapp/platform/types#readme",
8
+ "homepage": "https://github.com/mattermost/mattermost/tree/master/webapp/platform/types#readme",
9
9
  "license": "MIT",
10
10
  "files": [
11
11
  "lib"
@@ -22,11 +22,14 @@
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "github:mattermost/mattermost-server",
25
+ "url": "github:mattermost/mattermost",
26
26
  "directory": "webapp/platform/types"
27
27
  },
28
+ "devDependencies": {
29
+ "typescript": "^5.0.0"
30
+ },
28
31
  "peerDependencies": {
29
- "typescript": "^4.3"
32
+ "typescript": "^4.3.0 || ^5.0.0"
30
33
  },
31
34
  "peerDependenciesMeta": {
32
35
  "typescript": {