@mattermost/types 10.11.0 → 10.12.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.
@@ -54,6 +54,7 @@ export type AccessControlVisualASTNode = {
54
54
  operator: string;
55
55
  value: any;
56
56
  value_type: number;
57
+ attribute_type: string;
57
58
  };
58
59
  /**
59
60
  * Type definition for access control attributes
@@ -1,7 +1,7 @@
1
1
  export type PostAction = {
2
- id: string;
2
+ id?: string;
3
3
  type?: string;
4
- name: string;
4
+ name?: string;
5
5
  disabled?: boolean;
6
6
  style?: string;
7
7
  data_source?: string;
@@ -8,16 +8,10 @@ function isPostAction(v) {
8
8
  if (typeof v !== 'object' || !v) {
9
9
  return false;
10
10
  }
11
- if (!('id' in v)) {
11
+ if ('id' in v && typeof v.id !== 'string') {
12
12
  return false;
13
13
  }
14
- if (typeof v.id !== 'string') {
15
- return false;
16
- }
17
- if (!('name' in v)) {
18
- return false;
19
- }
20
- if (typeof v.name !== 'string') {
14
+ if ('name' in v && typeof v.name !== 'string') {
21
15
  return false;
22
16
  }
23
17
  if ('type' in v && typeof v.type !== 'string') {
@@ -18,7 +18,7 @@ export type MessageAttachment = {
18
18
  };
19
19
  export declare function isMessageAttachmentArray(v: unknown): v is MessageAttachment[];
20
20
  export type MessageAttachmentField = {
21
- title: string;
22
- value: any;
21
+ title?: string;
22
+ value?: unknown;
23
23
  short?: boolean;
24
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattermost/types",
3
- "version": "10.11.0",
3
+ "version": "10.12.0",
4
4
  "description": "Shared type definitions used by the Mattermost web app",
5
5
  "keywords": [
6
6
  "mattermost"