@tryghost/admin-api-schema 2.15.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 +10 -4
  14. package/lib/{v3 → schemas}/members-upload.json +4 -1
  15. package/lib/{canary → schemas}/members.json +4 -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 +5 -2
  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 +3 -3
  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/members-upload.json +0 -48
  45. package/lib/canary/pages-add.json +0 -21
  46. package/lib/canary/pages-edit.json +0 -21
  47. package/lib/canary/posts-add.json +0 -21
  48. package/lib/canary/posts-edit.json +0 -21
  49. package/lib/canary/snippets-add.json +0 -22
  50. package/lib/canary/snippets-edit.json +0 -22
  51. package/lib/canary/snippets.json +0 -39
  52. package/lib/canary/tags-add.json +0 -22
  53. package/lib/canary/tags-edit.json +0 -17
  54. package/lib/canary/tags.json +0 -112
  55. package/lib/canary/webhooks-add.json +0 -21
  56. package/lib/canary/webhooks-edit.json +0 -74
  57. package/lib/canary/webhooks.json +0 -67
  58. package/lib/v2/README.md +0 -8
  59. package/lib/v2/images-upload.json +0 -7
  60. package/lib/v2/index.js +0 -9
  61. package/lib/v2/pages-add.json +0 -21
  62. package/lib/v2/pages-edit.json +0 -21
  63. package/lib/v2/pages.json +0 -250
  64. package/lib/v2/posts-add.json +0 -21
  65. package/lib/v2/posts-edit.json +0 -21
  66. package/lib/v2/posts.json +0 -250
  67. package/lib/v2/tags-add.json +0 -22
  68. package/lib/v2/tags.json +0 -69
  69. package/lib/v3/README.md +0 -8
  70. package/lib/v3/images.json +0 -23
  71. package/lib/v3/index.js +0 -18
  72. package/lib/v3/members-edit.json +0 -74
  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,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "tiers.canary",
3
+ "$id": "tiers",
4
4
  "title": "tiers",
5
5
  "description": "Base Tier definitions",
6
6
  "definitions": {
@@ -9,12 +9,15 @@
9
9
  "type": "object",
10
10
  "additionalProperties": false,
11
11
  "properties": {
12
+ "id": {
13
+ "strip": true
14
+ },
12
15
  "name": {
13
16
  "type": "string",
14
17
  "maxLength": 191
15
18
  },
16
19
  "description": {
17
- "type": "string",
20
+ "type": ["string", "null"],
18
21
  "maxLength": 191
19
22
  },
20
23
  "slug": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "webhooks.add.v3",
3
+ "$id": "webhooks.add",
4
4
  "title": "webhooks.add",
5
5
  "description": "Schema for webhooks.add",
6
6
  "type": "object",
@@ -12,7 +12,7 @@
12
12
  "maxItems": 1,
13
13
  "items": {
14
14
  "type": "object",
15
- "allOf": [{ "$ref": "webhooks.v3#/definitions/webhook" }],
15
+ "allOf": [{ "$ref": "webhooks#/definitions/webhook" }],
16
16
  "required": ["event", "target_url"]
17
17
  }
18
18
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "webhooks.edit.v3",
3
+ "$id": "webhooks.edit",
4
4
  "title": "webhooks.edit",
5
5
  "description": "Schema for webhooks.edit",
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "webhooks.v3",
3
+ "$id": "webhooks",
4
4
  "title": "webhooks",
5
5
  "description": "Base webhooks definitions",
6
6
  "definitions": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/admin-api-schema",
3
- "version": "2.15.0",
3
+ "version": "3.0.0",
4
4
  "repository": "https://github.com/TryGhost/SDK/tree/master/packages/admin-api-schema",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "c8": "7.11.2",
23
23
  "mocha": "10.0.0",
24
24
  "should": "13.2.3",
25
- "sinon": "13.0.2"
25
+ "sinon": "14.0.0"
26
26
  },
27
27
  "dependencies": {
28
28
  "@tryghost/errors": "^1.0.0",
29
29
  "lodash": "^4.17.11"
30
30
  },
31
- "gitHead": "1b8c08ab41c317f79bff2b1be65fab6ee638d9d5"
31
+ "gitHead": "460d932f6ebbe80fb3513f937db65925a7874ae0"
32
32
  }
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "images.upload.canary",
4
- "title": "images.upload",
5
- "description": "Schema for images.upload",
6
- "$ref": "images.canary#/definitions/image"
7
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "images.canary",
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
- }
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "labels.add.canary",
4
- "title": "labels.add",
5
- "description": "Schema for labels.add",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "labels": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "additionalProperties": false,
14
- "items": {
15
- "type": "object",
16
- "allOf": [{ "$ref": "labels.canary#/definitions/label" }],
17
- "required": ["name"]
18
- }
19
- }
20
- },
21
- "required": ["labels"]
22
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "labels.edit.canary",
4
- "title": "labels.edit",
5
- "description": "Schema for labels.edit",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "labels": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": { "$ref": "labels.canary#/definitions/label" }
14
- }
15
- },
16
- "required": ["labels"]
17
- }
@@ -1,39 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "labels.canary",
4
- "title": "labels",
5
- "description": "Base labels definitions",
6
- "definitions": {
7
- "label": {
8
- "type": "object",
9
- "additionalProperties": false,
10
- "properties": {
11
- "name": {
12
- "type": "string",
13
- "minLength": 1,
14
- "maxLength": 191,
15
- "pattern": "^([^,]|$)"
16
- },
17
- "slug": {
18
- "type": ["string", "null"],
19
- "maxLength": 191
20
- },
21
- "id": {
22
- "strip": true
23
- },
24
- "created_at": {
25
- "strip": true
26
- },
27
- "created_by": {
28
- "strip": true
29
- },
30
- "updated_at": {
31
- "strip": true
32
- },
33
- "updated_by": {
34
- "strip": true
35
- }
36
- }
37
- }
38
- }
39
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "members.add.canary",
4
- "title": "members.add",
5
- "description": "Schema for members.add",
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
- "allOf": [{ "$ref": "members.canary#/definitions/member" }],
16
- "required": ["email"]
17
- }
18
- }
19
- },
20
- "required": ["members"]
21
- }
@@ -1,48 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "members.upload.canary",
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,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "pages.add.canary",
4
- "title": "pages.add",
5
- "description": "Schema for pages.add",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "pages": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": {
14
- "type": "object",
15
- "allOf": [{ "$ref": "pages.canary#/definitions/page" }],
16
- "required": ["title"]
17
- }
18
- }
19
- },
20
- "required": ["pages"]
21
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "pages.edit.canary",
4
- "title": "pages.edit",
5
- "description": "Schema for pages.edit",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "pages": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": {
14
- "type": "object",
15
- "allOf": [{ "$ref": "pages.canary#/definitions/page" }],
16
- "required": ["updated_at"]
17
- }
18
- }
19
- },
20
- "required": ["pages"]
21
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "posts.add.canary",
4
- "title": "posts.add",
5
- "description": "Schema for posts.add",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "posts": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": {
14
- "type": "object",
15
- "allOf": [{ "$ref": "posts.canary#/definitions/post" }],
16
- "required": ["title"]
17
- }
18
- }
19
- },
20
- "required": ["posts"]
21
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "posts.edit.canary",
4
- "title": "posts.edit",
5
- "description": "Schema for posts.edit",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "posts": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": {
14
- "type": "object",
15
- "allOf": [{ "$ref": "posts.canary#/definitions/post" }],
16
- "required": ["updated_at"]
17
- }
18
- }
19
- },
20
- "required": ["posts"]
21
- }
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "snippets.add.canary",
4
- "title": "snippets.add",
5
- "description": "Schema for snippets.add",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "snippets": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "additionalProperties": false,
14
- "items": {
15
- "type": "object",
16
- "allOf": [{ "$ref": "snippets.canary#/definitions/snippet" }],
17
- "required": ["name", "mobiledoc"]
18
- }
19
- }
20
- },
21
- "required": ["snippets"]
22
- }
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "snippets.edit.canary",
4
- "title": "snippets.edit",
5
- "description": "Schema for snippets.edit",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "snippets": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "additionalProperties": false,
14
- "items": {
15
- "type": "object",
16
- "allOf": [{ "$ref": "snippets.canary#/definitions/snippet" }],
17
- "required": ["name", "mobiledoc"]
18
- }
19
- }
20
- },
21
- "required": ["snippets"]
22
- }
@@ -1,39 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "snippets.canary",
4
- "title": "snippets",
5
- "description": "Base snippets definitions",
6
- "definitions": {
7
- "snippet": {
8
- "type": "object",
9
- "additionalProperties": false,
10
- "properties": {
11
- "name": {
12
- "type": "string",
13
- "minLength": 1,
14
- "maxLength": 191
15
- },
16
- "mobiledoc": {
17
- "type": "string",
18
- "format": "json-string",
19
- "maxLength": 1000000000
20
- },
21
- "id": {
22
- "strip": true
23
- },
24
- "created_at": {
25
- "strip": true
26
- },
27
- "created_by": {
28
- "strip": true
29
- },
30
- "updated_at": {
31
- "strip": true
32
- },
33
- "updated_by": {
34
- "strip": true
35
- }
36
- }
37
- }
38
- }
39
- }
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "tags.add.canary",
4
- "title": "tags.add",
5
- "description": "Schema for tags.add",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "tags": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "additionalProperties": false,
14
- "items": {
15
- "type": "object",
16
- "allOf": [{ "$ref": "tags.canary#/definitions/tag" }],
17
- "required": ["name"]
18
- }
19
- }
20
- },
21
- "required": ["tags"]
22
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "tags.edit.canary",
4
- "title": "tags.edit",
5
- "description": "Schema for tags.edit",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "tags": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": { "$ref": "tags.canary#/definitions/tag" }
14
- }
15
- },
16
- "required": ["tags"]
17
- }
@@ -1,112 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "tags.canary",
4
- "title": "tags",
5
- "description": "Base tags definitions",
6
- "definitions": {
7
- "tag": {
8
- "type": "object",
9
- "additionalProperties": false,
10
- "properties": {
11
- "name": {
12
- "type": "string",
13
- "minLength": 1,
14
- "maxLength": 191,
15
- "pattern": "^([^,]|$)"
16
- },
17
- "slug": {
18
- "type": ["string", "null"],
19
- "maxLength": 191
20
- },
21
- "description": {
22
- "type": ["string", "null"],
23
- "maxLength": 500
24
- },
25
- "feature_image": {
26
- "type": ["string", "null"],
27
- "format": "uri-reference",
28
- "maxLength": 2000
29
- },
30
- "visibility": {
31
- "type": "string",
32
- "enum": ["public", "internal"]
33
- },
34
- "meta_title": {
35
- "type": ["string", "null"],
36
- "maxLength": 300
37
- },
38
- "meta_description": {
39
- "type": ["string", "null"],
40
- "maxLength": 500
41
- },
42
- "og_image": {
43
- "type": ["string", "null"],
44
- "format": "uri-reference",
45
- "maxLength": 2000
46
- },
47
- "og_title": {
48
- "type": ["string", "null"],
49
- "maxLength": 300
50
- },
51
- "og_description": {
52
- "type": ["string", "null"],
53
- "maxLength": 500
54
- },
55
- "twitter_image": {
56
- "type": ["string", "null"],
57
- "format": "uri-reference",
58
- "maxLength": 2000
59
- },
60
- "twitter_title": {
61
- "type": ["string", "null"],
62
- "maxLength": 300
63
- },
64
- "twitter_description": {
65
- "type": ["string", "null"],
66
- "maxLength": 500
67
- },
68
- "codeinjection_head": {
69
- "type": ["string", "null"],
70
- "maxLength": 65535
71
- },
72
- "codeinjection_foot": {
73
- "type": ["string", "null"],
74
- "maxLength": 65535
75
- },
76
- "canonical_url": {
77
- "type": ["string", "null"],
78
- "format": "uri-reference",
79
- "maxLength": 2000
80
- },
81
- "accent_color": {
82
- "type": ["string", "null"],
83
- "maxLength": 50
84
- },
85
- "id": {
86
- "strip": true
87
- },
88
- "parent": {
89
- "strip": true
90
- },
91
- "parent_id": {
92
- "strip": true
93
- },
94
- "created_at": {
95
- "strip": true
96
- },
97
- "created_by": {
98
- "strip": true
99
- },
100
- "updated_at": {
101
- "strip": true
102
- },
103
- "updated_by": {
104
- "strip": true
105
- },
106
- "url": {
107
- "strip": true
108
- }
109
- }
110
- }
111
- }
112
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "webhooks.add.canary",
4
- "title": "webhooks.add",
5
- "description": "Schema for webhooks.add",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "properties": {
9
- "webhooks": {
10
- "type": "array",
11
- "minItems": 1,
12
- "maxItems": 1,
13
- "items": {
14
- "type": "object",
15
- "allOf": [{ "$ref": "webhooks.canary#/definitions/webhook" }],
16
- "required": ["event", "target_url"]
17
- }
18
- }
19
- },
20
- "required": ["webhooks"]
21
- }