@tryghost/admin-api-schema 2.9.0 → 2.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.
- package/lib/canary/index.js +2 -0
- package/lib/canary/tiers-add.json +21 -0
- package/lib/canary/tiers-edit.json +21 -0
- package/lib/canary/tiers.json +135 -0
- package/package.json +3 -3
package/lib/canary/index.js
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "tiers.add.canary",
|
|
4
|
+
"title": "tiers.add",
|
|
5
|
+
"description": "Schema for tiers.add",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"tiers": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"minItems": 1,
|
|
12
|
+
"maxItems": 1,
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"allOf": [{ "$ref": "tiers.canary#/definitions/tier" }]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": ["tiers"]
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "tiers.edit.canary",
|
|
4
|
+
"title": "tiers.edit",
|
|
5
|
+
"description": "Schema for tiers.edit",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"tiers": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"minItems": 1,
|
|
12
|
+
"maxItems": 1,
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"allOf": [{ "$ref": "tiers.canary#/definitions/tier" }]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": ["tiers"]
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "tiers.canary",
|
|
4
|
+
"title": "tiers",
|
|
5
|
+
"description": "Base Tier definitions",
|
|
6
|
+
"definitions": {
|
|
7
|
+
"tier": {
|
|
8
|
+
"description": "A Ghost Tier",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"properties": {
|
|
12
|
+
"name": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"maxLength": 191
|
|
15
|
+
},
|
|
16
|
+
"description": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"maxLength": 191
|
|
19
|
+
},
|
|
20
|
+
"slug": {
|
|
21
|
+
"type": ["string", "null"],
|
|
22
|
+
"maxLength": 191
|
|
23
|
+
},
|
|
24
|
+
"welcome_page_url": {
|
|
25
|
+
"type": ["string", "null"],
|
|
26
|
+
"maxLength": 2000
|
|
27
|
+
},
|
|
28
|
+
"active": {
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"visibility": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["public", "none"]
|
|
34
|
+
},
|
|
35
|
+
"updated_at": {
|
|
36
|
+
"strip": true
|
|
37
|
+
},
|
|
38
|
+
"type": {
|
|
39
|
+
"strip": true
|
|
40
|
+
},
|
|
41
|
+
"created_at": {
|
|
42
|
+
"strip": true
|
|
43
|
+
},
|
|
44
|
+
"monthly_price": {
|
|
45
|
+
"$ref": "#/definitions/tier-price"
|
|
46
|
+
},
|
|
47
|
+
"yearly_price": {
|
|
48
|
+
"$ref": "#/definitions/tier-price"
|
|
49
|
+
},
|
|
50
|
+
"benefits": {
|
|
51
|
+
"type": ["array", "null"],
|
|
52
|
+
"items": {
|
|
53
|
+
"$ref": "#/definitions/tier-benefit"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"tier-price": {
|
|
59
|
+
"description": "A Stripe Price associated with a Tier",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"id": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"maxLength": 24
|
|
65
|
+
},
|
|
66
|
+
"stripe_product_id": {
|
|
67
|
+
"type": ["string", "null"],
|
|
68
|
+
"maxLength": 255
|
|
69
|
+
},
|
|
70
|
+
"stripe_price_id": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"maxLength": 255
|
|
73
|
+
},
|
|
74
|
+
"nickname": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"maxLength": 50
|
|
77
|
+
},
|
|
78
|
+
"currency": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"maxLength": 3
|
|
81
|
+
},
|
|
82
|
+
"amount": {
|
|
83
|
+
"type": "number"
|
|
84
|
+
},
|
|
85
|
+
"active": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": true
|
|
88
|
+
},
|
|
89
|
+
"type": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": ["recurring", "one_time"]
|
|
92
|
+
},
|
|
93
|
+
"interval": {
|
|
94
|
+
"type": ["string", "null"],
|
|
95
|
+
"enum": ["year", "month", "week", "day"]
|
|
96
|
+
},
|
|
97
|
+
"updated_at": {
|
|
98
|
+
"strip": true
|
|
99
|
+
},
|
|
100
|
+
"created_at": {
|
|
101
|
+
"strip": true
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"tier-benefit": {
|
|
106
|
+
"description": "A Benefit associated with a Tier",
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"id": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"maxLength": 24
|
|
112
|
+
},
|
|
113
|
+
"name": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"maxLength": 191
|
|
116
|
+
},
|
|
117
|
+
"slug": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"maxLength": 191
|
|
120
|
+
},
|
|
121
|
+
"updated_at": {
|
|
122
|
+
"strip": true
|
|
123
|
+
},
|
|
124
|
+
"created_at": {
|
|
125
|
+
"strip": true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"anyOf": [
|
|
129
|
+
{ "required": ["id"] },
|
|
130
|
+
{ "required": ["name"] },
|
|
131
|
+
{ "required": ["slug"] }
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/admin-api-schema",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"repository": "https://github.com/TryGhost/SDK/tree/master/packages/admin-api-schema",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "echo \"Implement me!\"",
|
|
10
|
-
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'",
|
|
10
|
+
"test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
|
|
11
11
|
"lint": "eslint . --ext .js --cache",
|
|
12
12
|
"posttest": "yarn lint"
|
|
13
13
|
},
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"@tryghost/errors": "^0.2.10",
|
|
28
28
|
"lodash": "^4.17.11"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "914bfb54d7e355b5788b84c13bfc894ed4defba4"
|
|
31
31
|
}
|