@tryghost/admin-api-schema 2.12.1 → 2.14.1

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/index.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./lib/admin-api-schema');
@@ -60,8 +60,8 @@ const list = ({version}) => {
60
60
  * @typedef {Object} ValidateOptions
61
61
  * @property {Object} options.data - data to validate
62
62
  * @property {'v2'|'v3'|'canary'} options.version - API version to data belongs to, e.g.: 'v2', 'canary'
63
- * @property {string} options.schema - name of the schema to validate against. Available schema names are returned by list() function
64
- * @property {string} options.definitions - name of the definition where schema belongs
63
+ * @property {string} [options.schema] - name of the schema to validate against. Available schema names are returned by list() function
64
+ * @property {string} [options.definition] - name of the definition where schema belongs
65
65
  */
66
66
 
67
67
  /**
@@ -45,6 +45,9 @@
45
45
  "products": {
46
46
  "$ref": "members.canary#/definitions/member-products"
47
47
  },
48
+ "newsletters": {
49
+ "$ref": "members.canary#/definitions/member-newsletters"
50
+ },
48
51
  "labels": {
49
52
  "$ref": "members.canary#/definitions/member-labels"
50
53
  },
@@ -48,6 +48,9 @@
48
48
  "products": {
49
49
  "$ref": "#/definitions/member-products"
50
50
  },
51
+ "newsletters": {
52
+ "$ref": "#/definitions/member-newsletters"
53
+ },
51
54
  "email_count": {
52
55
  "strip": true
53
56
  },
@@ -108,6 +111,35 @@
108
111
  ]
109
112
  }
110
113
  },
114
+ "member-newsletters": {
115
+ "description": "Newsletters of the member",
116
+ "type": "array",
117
+ "items": {
118
+ "anyOf": [
119
+ {
120
+ "type": "object",
121
+ "properties": {
122
+ "id": {
123
+ "type": "string",
124
+ "maxLength": 24
125
+ },
126
+ "name": {
127
+ "type": "string",
128
+ "maxLength": 191
129
+ }
130
+ },
131
+ "anyOf": [
132
+ { "required": ["id"] },
133
+ { "required": ["name"] }
134
+ ]
135
+ },
136
+ {
137
+ "type": "string",
138
+ "maxLength": 191
139
+ }
140
+ ]
141
+ }
142
+ },
111
143
  "member-labels": {
112
144
  "description": "Labels of the member",
113
145
  "type": "array",
@@ -190,6 +190,9 @@
190
190
  },
191
191
  "frontmatter": {
192
192
  "strip": true
193
+ },
194
+ "newsletter_id": {
195
+ "strip": true
193
196
  }
194
197
  }
195
198
  },
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@tryghost/admin-api-schema",
3
- "version": "2.12.1",
3
+ "version": "2.14.1",
4
4
  "repository": "https://github.com/TryGhost/SDK/tree/master/packages/admin-api-schema",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
7
- "main": "lib/index.js",
7
+ "main": "index.js",
8
8
  "scripts": {
9
9
  "dev": "echo \"Implement me!\"",
10
10
  "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
@@ -12,20 +12,21 @@
12
12
  "posttest": "yarn lint"
13
13
  },
14
14
  "files": [
15
- "lib/*"
15
+ "lib/*",
16
+ "index.js"
16
17
  ],
17
18
  "publishConfig": {
18
19
  "access": "public"
19
20
  },
20
21
  "devDependencies": {
21
- "c8": "7.11.0",
22
- "mocha": "7.2.0",
22
+ "c8": "7.11.2",
23
+ "mocha": "10.0.0",
23
24
  "should": "13.2.3",
24
- "sinon": "9.2.4"
25
+ "sinon": "13.0.2"
25
26
  },
26
27
  "dependencies": {
27
28
  "@tryghost/errors": "^1.0.0",
28
29
  "lodash": "^4.17.11"
29
30
  },
30
- "gitHead": "e6e87b23a1f73d037a0dcd46d0069b7efd29663b"
31
+ "gitHead": "0a30384f3d568a43bfe0cee5fcf7e21c17a17842"
31
32
  }