@tryghost/admin-api-schema 2.17.0 → 3.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.
Files changed (76) hide show
  1. package/README.md +2 -3
  2. package/lib/admin-api-schema.js +12 -92
  3. package/lib/{canary → schemas}/README.md +1 -1
  4. package/lib/{v3 → schemas}/images-upload.json +2 -2
  5. package/lib/{v2 → schemas}/images.json +1 -1
  6. package/lib/{canary → schemas}/index.js +0 -0
  7. package/lib/{v3 → schemas}/labels-add.json +2 -2
  8. package/lib/{v3 → schemas}/labels-edit.json +2 -2
  9. package/lib/{v3 → schemas}/labels.json +1 -1
  10. package/lib/{canary → schemas}/media-upload.json +2 -2
  11. package/lib/{canary → schemas}/media.json +1 -1
  12. package/lib/{v3 → schemas}/members-add.json +2 -2
  13. package/lib/{canary → schemas}/members-edit.json +5 -5
  14. package/lib/{canary → schemas}/members-upload.json +1 -1
  15. package/lib/{canary → schemas}/members.json +1 -1
  16. package/lib/{v3 → schemas}/pages-add.json +2 -2
  17. package/lib/{v3 → schemas}/pages-edit.json +2 -2
  18. package/lib/{canary → schemas}/pages.json +1 -1
  19. package/lib/{v3 → schemas}/posts-add.json +2 -2
  20. package/lib/{v3 → schemas}/posts-edit.json +2 -2
  21. package/lib/{canary → schemas}/posts.json +1 -1
  22. package/lib/{canary → schemas}/products-add.json +2 -2
  23. package/lib/{canary → schemas}/products-edit.json +2 -2
  24. package/lib/{canary → schemas}/products.json +3 -3
  25. package/lib/{v3 → schemas}/snippets-add.json +2 -2
  26. package/lib/{v3 → schemas}/snippets-edit.json +2 -2
  27. package/lib/{v3 → schemas}/snippets.json +1 -1
  28. package/lib/{v3 → schemas}/tags-add.json +2 -2
  29. package/lib/{v2 → schemas}/tags-edit.json +2 -2
  30. package/lib/{v3 → schemas}/tags.json +1 -1
  31. package/lib/{canary → schemas}/tiers-add.json +2 -2
  32. package/lib/{canary → schemas}/tiers-edit.json +2 -2
  33. package/lib/{canary → schemas}/tiers.json +1 -1
  34. package/lib/{v3 → schemas}/webhooks-add.json +2 -2
  35. package/lib/{v3 → schemas}/webhooks-edit.json +1 -1
  36. package/lib/{v3 → schemas}/webhooks.json +1 -1
  37. package/package.json +2 -2
  38. package/lib/canary/images-upload.json +0 -7
  39. package/lib/canary/images.json +0 -23
  40. package/lib/canary/labels-add.json +0 -22
  41. package/lib/canary/labels-edit.json +0 -17
  42. package/lib/canary/labels.json +0 -39
  43. package/lib/canary/members-add.json +0 -21
  44. package/lib/canary/pages-add.json +0 -21
  45. package/lib/canary/pages-edit.json +0 -21
  46. package/lib/canary/posts-add.json +0 -21
  47. package/lib/canary/posts-edit.json +0 -21
  48. package/lib/canary/snippets-add.json +0 -22
  49. package/lib/canary/snippets-edit.json +0 -22
  50. package/lib/canary/snippets.json +0 -39
  51. package/lib/canary/tags-add.json +0 -22
  52. package/lib/canary/tags-edit.json +0 -17
  53. package/lib/canary/tags.json +0 -112
  54. package/lib/canary/webhooks-add.json +0 -21
  55. package/lib/canary/webhooks-edit.json +0 -74
  56. package/lib/canary/webhooks.json +0 -67
  57. package/lib/v2/README.md +0 -8
  58. package/lib/v2/images-upload.json +0 -7
  59. package/lib/v2/index.js +0 -9
  60. package/lib/v2/pages-add.json +0 -21
  61. package/lib/v2/pages-edit.json +0 -21
  62. package/lib/v2/pages.json +0 -250
  63. package/lib/v2/posts-add.json +0 -21
  64. package/lib/v2/posts-edit.json +0 -21
  65. package/lib/v2/posts.json +0 -250
  66. package/lib/v2/tags-add.json +0 -22
  67. package/lib/v2/tags.json +0 -69
  68. package/lib/v3/README.md +0 -8
  69. package/lib/v3/images.json +0 -23
  70. package/lib/v3/index.js +0 -18
  71. package/lib/v3/members-edit.json +0 -74
  72. package/lib/v3/members-upload.json +0 -48
  73. package/lib/v3/members.json +0 -109
  74. package/lib/v3/pages.json +0 -250
  75. package/lib/v3/posts.json +0 -263
  76. package/lib/v3/tags-edit.json +0 -17
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "images.v3",
4
- "title": "images",
5
- "description": "Base images definitions",
6
- "definitions": {
7
- "image": {
8
- "type": "object",
9
- "additionalProperties": false,
10
- "properties": {
11
- "purpose": {
12
- "type": "string",
13
- "enum": ["image", "profile_image", "icon"],
14
- "default": "image"
15
- },
16
- "ref": {
17
- "type": ["string", "null"],
18
- "maxLength": 2000
19
- }
20
- }
21
- }
22
- }
23
- }
package/lib/v3/index.js DELETED
@@ -1,18 +0,0 @@
1
- module.exports = [
2
- 'images-upload',
3
- 'labels-add',
4
- 'labels-edit',
5
- 'members-add',
6
- 'members-edit',
7
- 'members-upload',
8
- 'pages-add',
9
- 'pages-edit',
10
- 'posts-add',
11
- 'posts-edit',
12
- 'snippets-add',
13
- 'snippets-edit',
14
- 'tags-add',
15
- 'tags-edit',
16
- 'webhooks-add',
17
- 'webhooks-edit'
18
- ];
@@ -1,74 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "members.edit.v3",
4
- "title": "members.edit",
5
- "description": "Schema for members.edit",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "members": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": {
14
- "type": "object",
15
- "additionalProperties": false,
16
- "properties": {
17
- "name": {
18
- "type": "string",
19
- "maxLength": 191,
20
- "pattern": "^([^,]|$)"
21
- },
22
- "email": {
23
- "type": "string",
24
- "minLength": 1,
25
- "maxLength": 191,
26
- "pattern": "^([^,]|$)"
27
- },
28
- "note": {
29
- "type": "string",
30
- "minLength": 0,
31
- "maxLength": 2000
32
- },
33
- "subscribed": {
34
- "type": "boolean"
35
- },
36
- "comped": {
37
- "type": "boolean"
38
- },
39
- "id": {
40
- "strip": true
41
- },
42
- "labels": {
43
- "$ref": "members.v3#/definitions/member-labels"
44
- },
45
- "email_count": {
46
- "strip": true
47
- },
48
- "email_opened_count": {
49
- "strip": true
50
- },
51
- "email_open_rate": {
52
- "strip": true
53
- },
54
- "email_recipients": {
55
- "strip": true
56
- },
57
- "created_at": {
58
- "strip": true
59
- },
60
- "created_by": {
61
- "strip": true
62
- },
63
- "updated_at": {
64
- "strip": true
65
- },
66
- "updated_by": {
67
- "strip": true
68
- }
69
- }
70
- }
71
- }
72
- },
73
- "required": ["members"]
74
- }
@@ -1,48 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "members.upload.v3",
4
- "title": "members.upload",
5
- "description": "Schema for members.upload",
6
- "type": "array",
7
- "items": {
8
- "type": "object",
9
- "additionalProperties": true,
10
- "required": ["email"],
11
- "properties": {
12
- "name": {
13
- "type": ["string", "null"],
14
- "maxLength": 191,
15
- "pattern": "^([^,]|$)"
16
- },
17
- "email": {
18
- "type": "string",
19
- "minLength": 1,
20
- "maxLength": 191,
21
- "pattern": "^([^,]|$)"
22
- },
23
- "note": {
24
- "type": ["string", "null"],
25
- "minLength": 0,
26
- "maxLength": 2000
27
- },
28
- "subscribed": {
29
- "type": ["string", "null"],
30
- "enum": ["true", "false", "TRUE", "FALSE", "", null]
31
- },
32
- "labels": {
33
- "type": ["string", "null"]
34
- },
35
- "created_at": {
36
- "type": ["string", "null"],
37
- "format": "date-time"
38
- },
39
- "stripe_customer_id": {
40
- "type": ["string", "null"]
41
- },
42
- "complimentary_plan": {
43
- "type": ["string", "null"],
44
- "enum": ["true", "false", "TRUE", "FALSE", "", null]
45
- }
46
- }
47
- }
48
- }
@@ -1,109 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "members.v3",
4
- "title": "members",
5
- "description": "Base members definitions",
6
- "definitions": {
7
- "member": {
8
- "type": "object",
9
- "additionalProperties": false,
10
- "properties": {
11
- "name": {
12
- "type": "string",
13
- "maxLength": 191,
14
- "pattern": "^([^,]|$)"
15
- },
16
- "email": {
17
- "type": "string",
18
- "minLength": 1,
19
- "maxLength": 191,
20
- "pattern": "^([^,]|$)"
21
- },
22
- "avatar_image": {
23
- "strip": true
24
- },
25
- "note": {
26
- "type": "string",
27
- "minLength": 0,
28
- "maxLength": 2000
29
- },
30
- "subscribed": {
31
- "type": "boolean"
32
- },
33
- "comped": {
34
- "type": "boolean"
35
- },
36
- "stripe_customer_id": {
37
- "type": "string"
38
- },
39
- "id": {
40
- "strip": true
41
- },
42
- "labels": {
43
- "$ref": "#/definitions/member-labels"
44
- },
45
- "email_count": {
46
- "strip": true
47
- },
48
- "email_opened_count": {
49
- "strip": true
50
- },
51
- "email_open_rate": {
52
- "strip": true
53
- },
54
- "email_recipients": {
55
- "strip": true
56
- },
57
- "created_at": {
58
- "strip": true
59
- },
60
- "created_by": {
61
- "strip": true
62
- },
63
- "updated_at": {
64
- "strip": true
65
- },
66
- "updated_by": {
67
- "strip": true
68
- }
69
- }
70
- },
71
- "member-labels": {
72
- "description": "Labels of the member",
73
- "type": "array",
74
- "items": {
75
- "anyOf": [
76
- {
77
- "type": "object",
78
- "properties": {
79
- "id": {
80
- "type": "string",
81
- "maxLength": 24
82
- },
83
- "name": {
84
- "type": "string",
85
- "maxLength": 191
86
- },
87
- "slug": {
88
- "type": ["string", "null"],
89
- "maxLength": 191
90
- },
91
- "members": {
92
- "strip": true
93
- }
94
- },
95
- "anyOf": [
96
- { "required": ["id"] },
97
- { "required": ["name"] },
98
- { "required": ["slug"] }
99
- ]
100
- },
101
- {
102
- "type": "string",
103
- "maxLength": 191
104
- }
105
- ]
106
- }
107
- }
108
- }
109
- }
package/lib/v3/pages.json DELETED
@@ -1,250 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "pages.v3",
4
- "title": "pages",
5
- "description": "Base pages definitions",
6
- "definitions": {
7
- "page": {
8
- "type": "object",
9
- "additionalProperties": false,
10
- "properties": {
11
- "title": {
12
- "type": "string",
13
- "maxLength": 2000
14
- },
15
- "slug": {
16
- "type": "string",
17
- "maxLength": 191
18
- },
19
- "mobiledoc": {
20
- "type": ["string", "null"],
21
- "format": "json-string",
22
- "maxLength": 1000000000
23
- },
24
- "html": {
25
- "type": ["string", "null"],
26
- "maxLength": 1000000000
27
- },
28
- "feature_image": {
29
- "type": ["string", "null"],
30
- "format": "uri-reference",
31
- "maxLength": 2000
32
- },
33
- "featured": {
34
- "type": "boolean"
35
- },
36
- "status": {
37
- "type": "string",
38
- "enum": ["published", "draft", "scheduled"]
39
- },
40
- "locale": {
41
- "type": ["string", "null"],
42
- "maxLength": 6
43
- },
44
- "visibility": {
45
- "type": ["string", "null"]
46
- },
47
- "meta_title": {
48
- "type": ["string", "null"],
49
- "maxLength": 300
50
- },
51
- "meta_description": {
52
- "type": ["string", "null"],
53
- "maxLength": 500
54
- },
55
- "updated_at": {
56
- "type": ["string", "null"],
57
- "format": "date-time"
58
- },
59
- "published_at": {
60
- "type": ["string", "null"],
61
- "format": "date-time"
62
- },
63
- "custom_excerpt": {
64
- "type": ["string", "null"],
65
- "maxLength": 300
66
- },
67
- "codeinjection_head": {
68
- "type": ["string", "null"],
69
- "maxLength": 65535
70
- },
71
- "codeinjection_foot": {
72
- "type": ["string", "null"],
73
- "maxLength": 65535
74
- },
75
- "og_image": {
76
- "type": ["string", "null"],
77
- "format": "uri-reference",
78
- "maxLength": 2000
79
- },
80
- "og_title": {
81
- "type": ["string", "null"],
82
- "maxLength": 300
83
- },
84
- "og_description": {
85
- "type": ["string", "null"],
86
- "maxLength": 500
87
- },
88
- "twitter_image": {
89
- "type": ["string", "null"],
90
- "format": "uri-reference",
91
- "maxLength": 2000
92
- },
93
- "twitter_title": {
94
- "type": ["string", "null"],
95
- "maxLength": 300
96
- },
97
- "twitter_description": {
98
- "type": ["string", "null"],
99
- "maxLength": 500
100
- },
101
- "custom_template": {
102
- "type": ["string", "null"],
103
- "maxLength": 100
104
- },
105
- "canonical_url": {
106
- "type": ["string", "null"],
107
- "format": "uri-reference",
108
- "maxLength": 2000
109
- },
110
- "authors": {
111
- "$ref": "#/definitions/page-authors"
112
- },
113
- "tags": {
114
- "$ref": "#/definitions/page-tags"
115
- },
116
- "id": {
117
- "strip": true
118
- },
119
- "page": {
120
- "strip": true
121
- },
122
- "author": {
123
- "strip": true
124
- },
125
- "author_id": {
126
- "strip": true
127
- },
128
- "created_at": {
129
- "strip": true
130
- },
131
- "created_by": {
132
- "strip": true
133
- },
134
- "updated_by": {
135
- "strip": true
136
- },
137
- "published_by": {
138
- "strip": true
139
- },
140
- "url": {
141
- "strip": true
142
- },
143
- "primary_tag": {
144
- "strip": true
145
- },
146
- "primary_author": {
147
- "strip": true
148
- },
149
- "excerpt": {
150
- "strip": true
151
- },
152
- "plaintext": {
153
- "strip": true
154
- },
155
- "frontmatter": {
156
- "strip": true
157
- }
158
- }
159
- },
160
- "page-authors": {
161
- "description": "Authors of the page",
162
- "type": "array",
163
- "items": {
164
- "anyOf": [
165
- {
166
- "type": "object",
167
- "properties": {
168
- "id": {
169
- "type": "string",
170
- "maxLength": 24
171
- },
172
- "slug": {
173
- "type": "string",
174
- "maxLength": 191
175
- },
176
- "email": {
177
- "type": "string",
178
- "maxLength": 191
179
- },
180
- "roles": {
181
- "strip": true
182
- },
183
- "permissions": {
184
- "strip": true
185
- }
186
- },
187
- "anyOf": [
188
- { "required": ["id"] },
189
- { "required": ["slug"] },
190
- { "required": ["email"] }
191
- ]
192
- },
193
- {
194
- "type": "string",
195
- "maxLength": 191
196
- }
197
- ]
198
- }
199
- },
200
- "page-tags": {
201
- "description": "Tags of the page",
202
- "type": "array",
203
- "items": {
204
- "anyOf": [
205
- {
206
- "type": "object",
207
- "properties": {
208
- "id": {
209
- "type": "string",
210
- "maxLength": 24
211
- },
212
- "name": {
213
- "type": "string",
214
- "maxLength": 191
215
- },
216
- "slug": {
217
- "type": ["string", "null"],
218
- "maxLength": 191
219
- },
220
- "parent": {
221
- "strip": true
222
- },
223
- "parent_id": {
224
- "strip": true
225
- },
226
- "pages": {
227
- "strip": true
228
- }
229
- },
230
- "anyOf": [
231
- {
232
- "required": ["id"]
233
- },
234
- {
235
- "required": ["name"]
236
- },
237
- {
238
- "required": ["slug"]
239
- }
240
- ]
241
- },
242
- {
243
- "type": "string",
244
- "maxLength": 191
245
- }
246
- ]
247
- }
248
- }
249
- }
250
- }