@mattermost/types 10.7.0 → 10.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/channels.d.ts CHANGED
@@ -20,6 +20,12 @@ export type ChannelNotifyProps = {
20
20
  ignore_channel_mentions: 'default' | 'off' | 'on';
21
21
  channel_auto_follow_threads: 'off' | 'on';
22
22
  };
23
+ export type ChannelBanner = {
24
+ enabled?: boolean;
25
+ text?: string;
26
+ background_color?: string;
27
+ };
28
+ export declare function channelBannerEnabled(banner: ChannelBanner | undefined): boolean;
23
29
  export type Channel = {
24
30
  id: string;
25
31
  create_at: number;
@@ -41,6 +47,7 @@ export type Channel = {
41
47
  shared?: boolean;
42
48
  props?: Record<string, any>;
43
49
  policy_id?: string | null;
50
+ banner_info?: ChannelBanner;
44
51
  };
45
52
  export type ServerChannel = Channel & {
46
53
  /**
package/lib/channels.js CHANGED
@@ -2,3 +2,10 @@
2
2
  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
3
3
  // See LICENSE.txt for license information.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.channelBannerEnabled = channelBannerEnabled;
6
+ function channelBannerEnabled(banner) {
7
+ if (!banner) {
8
+ return false;
9
+ }
10
+ return Boolean(banner.enabled) && Boolean(banner.text) && Boolean(banner.background_color);
11
+ }
package/lib/config.d.ts CHANGED
@@ -59,6 +59,7 @@ export type ClientConfig = {
59
59
  EnableUserStatuses: string;
60
60
  EnableLastActiveTime: string;
61
61
  EnableTimedDND: string;
62
+ EnableCrossTeamSearch: 'true' | 'false';
62
63
  EnableCustomTermsOfService: string;
63
64
  EnableDeveloper: string;
64
65
  EnableDiagnostics: string;
@@ -343,6 +344,7 @@ export type ServiceSettings = {
343
344
  GiphySdkKey: string;
344
345
  PostEditTimeLimit: number;
345
346
  TimeBetweenUserTypingUpdatesMilliseconds: number;
347
+ EnableCrossTeamSearch: boolean;
346
348
  EnablePostSearch: boolean;
347
349
  EnableFileSearch: boolean;
348
350
  MinimumHashtagLength: number;
@@ -391,6 +393,8 @@ export type ServiceSettings = {
391
393
  EnableDesktopLandingPage: boolean;
392
394
  MaximumURLLength: number;
393
395
  ScheduledPosts: boolean;
396
+ EnableWebHubChannelIteration: boolean;
397
+ FrameAncestors: string;
394
398
  };
395
399
  export type TeamSettings = {
396
400
  SiteName: string;
@@ -736,6 +740,9 @@ export type NativeAppSettings = {
736
740
  AndroidAppDownloadLink: string;
737
741
  IosAppDownloadLink: string;
738
742
  MobileExternalBrowser: boolean;
743
+ MobileEnableBiometrics: boolean;
744
+ MobilePreventScreenCapture: boolean;
745
+ MobileJailbreakProtection: boolean;
739
746
  };
740
747
  export type ClusterSettings = {
741
748
  Enable: boolean;
@@ -756,6 +763,7 @@ export type MetricsSettings = {
756
763
  ListenAddress: string;
757
764
  EnableClientMetrics: boolean;
758
765
  EnableNotificationMetrics: boolean;
766
+ ClientSideUserIds: string[];
759
767
  };
760
768
  export type ExperimentalSettings = {
761
769
  ClientSideCertEnable: boolean;
@@ -779,6 +787,7 @@ export type CacheSettings = {
779
787
  RedisAddress: string;
780
788
  RedisPassword: string;
781
789
  RedisDB: number;
790
+ RedisCachePrefix: string;
782
791
  DisableClientCache: boolean;
783
792
  };
784
793
  export type ElasticsearchSettings = {
@@ -799,6 +808,7 @@ export type ElasticsearchSettings = {
799
808
  AggregatePostsAfterDays: number;
800
809
  PostsAggregatorJobStartTime: string;
801
810
  IndexPrefix: string;
811
+ GlobalSearchPrefix: string;
802
812
  LiveIndexingBatchSize: number;
803
813
  BatchSize: number;
804
814
  RequestTimeoutSeconds: number;
package/lib/groups.d.ts CHANGED
@@ -152,6 +152,12 @@ export type GroupSearchParams = GetGroupsParams & {
152
152
  include_timezones?: string;
153
153
  include_channel_member_count?: string;
154
154
  };
155
+ export type GroupMember = {
156
+ group_id: string;
157
+ user_id: string;
158
+ create_at: number;
159
+ deleted_at: number;
160
+ };
155
161
  export type GroupMembership = {
156
162
  user_id: string;
157
163
  roles: string;
@@ -1,8 +1,9 @@
1
+ export type FieldType = ('text' | 'select' | 'multiselect' | 'date' | 'user' | 'multiuser');
1
2
  export type PropertyField = {
2
3
  id: string;
3
4
  group_id: string;
4
5
  name: string;
5
- type: string;
6
+ type: FieldType;
6
7
  attrs?: {
7
8
  [key: string]: unknown;
8
9
  };
@@ -22,13 +23,25 @@ export type PropertyValue<T> = {
22
23
  update_at: number;
23
24
  delete_at: number;
24
25
  };
25
- export type UserPropertyFieldType = 'text';
26
+ export type UserPropertyFieldType = 'text' | 'select' | 'multiselect';
26
27
  export type UserPropertyFieldGroupID = 'custom_profile_attributes';
28
+ export type UserPropertyValueType = 'phone' | 'url' | '';
29
+ export type FieldVisibility = 'always' | 'hidden' | 'when_set';
30
+ export type FieldValueType = 'email' | 'url' | 'phone' | '';
31
+ export type PropertyFieldOption = {
32
+ id: string;
33
+ name: string;
34
+ color?: string;
35
+ };
27
36
  export type UserPropertyField = PropertyField & {
28
- type: UserPropertyFieldType;
29
37
  group_id: UserPropertyFieldGroupID;
30
- attrs?: {
31
- sort_order?: number;
38
+ attrs: {
39
+ sort_order: number;
40
+ visibility: FieldVisibility;
41
+ value_type: FieldValueType;
42
+ options?: PropertyFieldOption[];
43
+ ldap?: string;
44
+ saml?: string;
32
45
  };
33
46
  };
34
- export type UserPropertyFieldPatch = Partial<Pick<UserPropertyField, 'name' | 'attrs' | 'type' | 'attrs'>>;
47
+ export type UserPropertyFieldPatch = Partial<Pick<UserPropertyField, 'name' | 'attrs' | 'type'>>;
package/lib/users.d.ts CHANGED
@@ -55,8 +55,8 @@ export type UserProfile = {
55
55
  terms_of_service_create_at: number;
56
56
  remote_id?: string;
57
57
  status?: string;
58
+ custom_profile_attributes?: Record<string, string | string[]>;
58
59
  failed_attempts?: number;
59
- custom_profile_attributes?: Record<string, string>;
60
60
  };
61
61
  export type UserProfileWithLastViewAt = UserProfile & {
62
62
  last_viewed_at: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "10.7.0",
3
+ "version": "10.8.0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"