-
Notifications
You must be signed in to change notification settings - Fork 10
/
notices.schema.json
200 lines (200 loc) · 6.88 KB
/
notices.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{
"$ref": "#/definitions/ProductNotices",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Action": {
"description": "Possible actions to execute on button press",
"enum": [
"url"
],
"type": "string"
},
"Audience": {
"description": "User role, i.e. who will see the notice. Defaults to \"all\"",
"enum": [
"sysadmin",
"all"
],
"type": "string"
},
"ClientType": {
"description": "Client type. Defaults to \"all\"",
"enum": [
"desktop",
"web",
"mobile",
"mobile-android",
"mobile-ios",
"all"
],
"type": "string"
},
"Conditions": {
"additionalProperties": false,
"properties": {
"audience": {
"$ref": "#/definitions/Audience"
},
"clientType": {
"$ref": "#/definitions/ClientType",
"description": "Only show the notice on specific clients. Defaults to 'all'"
},
"desktopVersion": {
"description": "What desktop client versions does this notice apply to. \nFormat: semver ranges (https://devhints.io/semver) \nExample: [\">=1.2.3 < ~2.4.x\"]\nExample: [\"<v5.19\", \"v5.20-v5.22\"]",
"items": {
"type": "string"
},
"type": "array"
},
"displayDate": {
"description": "When to display the notice.\nExamples:\n\"2020-03-01T00:00:00Z\" - show on specified date\n\">= 2020-03-01T00:00:00Z\" - show after specified date\n\"< 2020-03-01T00:00:00Z\" - show before the specified date\n\"> 2020-03-01T00:00:00Z <= 2020-04-01T00:00:00Z\" - show only between the specified dates",
"type": "string"
},
"instanceType": {
"$ref": "#/definitions/InstanceType"
},
"mobileVersion": {
"description": "What mobile client versions does this notice apply to. \nFormat: semver ranges (https://devhints.io/semver) \nExample: [\">=1.2.3 < ~2.4.x\"]\nExample: [\"<v5.19\", \"v5.20-v5.22\"]",
"items": {
"type": "string"
},
"type": "array"
},
"numberOfPosts": {
"description": "Only show the notice when server has more than specified number of posts",
"type": "number"
},
"numberOfUsers": {
"description": "Only show the notice when server has more than specified number of users",
"type": "number"
},
"serverConfig": {
"description": "Map of mattermost server config paths and their values. Notice will be displayed only if the values match the target server config\nExample: serverConfig: { \"PluginSettings.Enable\": true, \"GuestAccountsSettings.Enable\": false }",
"type": "object"
},
"serverVersion": {
"description": "What server versions does this notice apply to. \nFormat: semver ranges (https://devhints.io/semver) \nExample: [\">=1.2.3 < ~2.4.x\"]\nExample: [\"<v5.19\", \"v5.20-v5.22\"]",
"items": {
"type": "string"
},
"type": "array"
},
"sku": {
"$ref": "#/definitions/SKU"
},
"userConfig": {
"description": "Map of user's settings and their values. Notice will be displayed only if the values match the viewing users' config\nExample: userConfig: { \"new_sidebar.disabled\": true }",
"type": "object"
},
"deprecating_dependency": {
"$ref": "#/definitions/Dependency"
}
},
"type": "object"
},
"InstanceType": {
"description": "Instance type. Defaults to \"both\"",
"enum": [
"cloud",
"onprem",
"both"
],
"type": "string"
},
"Message": {
"additionalProperties": false,
"properties": {
"action": {
"$ref": "#/definitions/Action",
"description": "Optional action to perform on action button click. (defaults to closing the notice)"
},
"actionParam": {
"description": "Optional action parameter. \nExample: {\"action\": \"url\", actionParam: \"/console/some-page\"}",
"type": "string"
},
"actionText": {
"description": "Optional override for the action button text (defaults to OK)",
"type": "string"
},
"description": {
"description": "Notice content. Use {{Mattermost}} instead of plain text to support white-labeling. Text supports Markdown.",
"type": "string"
},
"image": {
"type": "string"
},
"title": {
"description": "Notice title. Use {{Mattermost}} instead of plain text to support white-labeling. Text supports Markdown.",
"type": "string"
}
},
"required": [
"title",
"description"
],
"type": "object"
},
"ProductNotice": {
"additionalProperties": false,
"properties": {
"conditions": {
"$ref": "#/definitions/Conditions"
},
"id": {
"description": "Unique identifier for this notice. Can be a running number. Used for storing 'viewed' state on the server.",
"type": "string"
},
"localizedMessages": {
"additionalProperties": {
"$ref": "#/definitions/Message"
},
"description": "Notice message data, organized by locale.\nExample: \n\"localizedMessages\": { \n\"en-US\": { \"title\": \"English\", description: \"English description\"},\n\"fr-FR\": { \"title\": \"Frances\", description: \"French description\"}\n}",
"type": "object"
},
"repeatable": {
"description": "Configurable flag if the notice should reappear after it’s seen and dismissed",
"type": "boolean"
}
},
"required": [
"id",
"conditions",
"localizedMessages"
],
"type": "object"
},
"ProductNotices": {
"description": "List of product notices. Order is important and is used to resolve priorities.\nEach notice will only be show if conditions are met.",
"items": {
"$ref": "#/definitions/ProductNotice"
},
"type": "array"
},
"SKU": {
"description": "SKU. Defaults to \"all\"",
"enum": [
"team",
"e0",
"e10",
"e20",
"all"
],
"type": "string"
},
"Dependency": {
"description": "External dependency which is going to be deprecated.",
"additionalProperties": false,
"properties": {
"name": {
"description": "Name of the external dependency (e.g. mysql).",
"type": "string"
},
"minimum_version": {
"description": "Minimum version required for the external dependency. \nFormat: semver (https://devhints.io/semver)",
"type": "string"
}
},
"type": "object"
}
}
}