@tryghost/content-api 1.9.8 → 1.10.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/cjs/content-api.js +12 -7
- package/es/content-api.js +1263 -92
- package/es/content-api.js.map +1 -1
- package/lib/content-api.js +5 -1
- package/package.json +7 -6
- package/umd/content-api.min.js +1 -1
- package/umd/content-api.min.js.map +1 -1
package/cjs/content-api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var axios = require('axios');
|
|
4
4
|
|
|
5
5
|
var name$1 = "@tryghost/content-api";
|
|
6
|
-
var version = "1.
|
|
6
|
+
var version = "1.10.0";
|
|
7
7
|
var repository = "https://github.com/TryGhost/SDK/tree/master/packages/content-api";
|
|
8
8
|
var author = "Ghost Foundation";
|
|
9
9
|
var license = "MIT";
|
|
@@ -32,18 +32,19 @@ var publishConfig = {
|
|
|
32
32
|
access: "public"
|
|
33
33
|
};
|
|
34
34
|
var devDependencies = {
|
|
35
|
-
"@babel/core": "7.
|
|
35
|
+
"@babel/core": "7.18.2",
|
|
36
36
|
"@babel/polyfill": "7.12.1",
|
|
37
|
-
"@babel/preset-env": "7.
|
|
37
|
+
"@babel/preset-env": "7.18.2",
|
|
38
38
|
"@rollup/plugin-json": "4.1.0",
|
|
39
39
|
c8: "7.11.3",
|
|
40
|
-
"core-js": "3.22.
|
|
40
|
+
"core-js": "3.22.7",
|
|
41
41
|
"eslint-plugin-ghost": "2.14.0",
|
|
42
42
|
mocha: "10.0.0",
|
|
43
|
-
rollup: "2.
|
|
43
|
+
rollup: "2.74.1",
|
|
44
44
|
"rollup-plugin-babel": "4.4.0",
|
|
45
45
|
"rollup-plugin-commonjs": "10.1.0",
|
|
46
46
|
"rollup-plugin-node-resolve": "5.2.0",
|
|
47
|
+
"rollup-plugin-polyfill-node": "^0.9.0",
|
|
47
48
|
"rollup-plugin-replace": "2.2.0",
|
|
48
49
|
"rollup-plugin-terser": "7.0.2",
|
|
49
50
|
should: "13.2.3",
|
|
@@ -52,7 +53,7 @@ var devDependencies = {
|
|
|
52
53
|
var dependencies = {
|
|
53
54
|
axios: "^0.27.0"
|
|
54
55
|
};
|
|
55
|
-
var gitHead = "
|
|
56
|
+
var gitHead = "f5a8a2c81a4afc3640f922ef221ea1b6ddfa216a";
|
|
56
57
|
var packageInfo = {
|
|
57
58
|
name: name$1,
|
|
58
59
|
version: version,
|
|
@@ -185,7 +186,7 @@ function GhostContentAPI({url, key, host, version, ghostPath = 'ghost', makeRequ
|
|
|
185
186
|
if (key && !/[0-9a-f]{26}/.test(key)) {
|
|
186
187
|
throw new Error(`${name} Config Invalid: 'key' ${key} must have 26 hex characters`);
|
|
187
188
|
}
|
|
188
|
-
const api = ['posts', 'authors', 'tags', 'pages', 'settings'].reduce((apiObject, resourceType) => {
|
|
189
|
+
const api = ['posts', 'authors', 'tags', 'pages', 'settings', 'tiers', 'newsletters', 'offers'].reduce((apiObject, resourceType) => {
|
|
189
190
|
function browse(options = {}, memberToken) {
|
|
190
191
|
return makeApiRequest(resourceType, options, null, memberToken);
|
|
191
192
|
}
|
|
@@ -207,7 +208,11 @@ function GhostContentAPI({url, key, host, version, ghostPath = 'ghost', makeRequ
|
|
|
207
208
|
});
|
|
208
209
|
}, {});
|
|
209
210
|
|
|
211
|
+
// Settings, tiers & newsletters only have browse methods, offers only has read
|
|
210
212
|
delete api.settings.read;
|
|
213
|
+
delete api.tiers.read;
|
|
214
|
+
delete api.newsletters.read;
|
|
215
|
+
delete api.offers.browse;
|
|
211
216
|
|
|
212
217
|
return api;
|
|
213
218
|
|