@contentstack/delivery-sdk 5.1.1 → 5.2.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/dist/legacy/query/contenttype-query.cjs +3 -24
- package/dist/legacy/query/contenttype-query.cjs.map +1 -1
- package/dist/legacy/query/contenttype-query.js +3 -24
- package/dist/legacy/query/contenttype-query.js.map +1 -1
- package/dist/modern/query/contenttype-query.cjs +3 -21
- package/dist/modern/query/contenttype-query.cjs.map +1 -1
- package/dist/modern/query/contenttype-query.d.ts +2 -20
- package/dist/modern/query/contenttype-query.d.ts.map +1 -1
- package/dist/modern/query/contenttype-query.js +3 -21
- package/dist/modern/query/contenttype-query.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var baseQuery = require('./base-query.cjs');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
-
class ContentTypeQuery {
|
|
5
|
+
class ContentTypeQuery extends baseQuery.BaseQuery {
|
|
9
6
|
constructor(client) {
|
|
10
|
-
|
|
11
|
-
__publicField(this, "_urlPath");
|
|
12
|
-
__publicField(this, "_queryParams", {});
|
|
7
|
+
super();
|
|
13
8
|
this._client = client;
|
|
14
9
|
this._urlPath = "/content_types";
|
|
15
10
|
}
|
|
@@ -29,22 +24,6 @@ class ContentTypeQuery {
|
|
|
29
24
|
this._queryParams.include_global_field_schema = "true";
|
|
30
25
|
return this;
|
|
31
26
|
}
|
|
32
|
-
/**
|
|
33
|
-
* @method find
|
|
34
|
-
* @memberof ContentTypeQuery
|
|
35
|
-
* @description Fetches all contentTypes of the stack
|
|
36
|
-
* @returns {Promise<FindResponse<T>>} Promise that resolves to the find response containing content types
|
|
37
|
-
* @example
|
|
38
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
39
|
-
*
|
|
40
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
41
|
-
* const contentTypeQuery = stack.contentType();
|
|
42
|
-
* const result = await contentTypeQuery.find();
|
|
43
|
-
*/
|
|
44
|
-
async find() {
|
|
45
|
-
const response = await core.getData(this._client, this._urlPath, { params: this._queryParams });
|
|
46
|
-
return response;
|
|
47
|
-
}
|
|
48
27
|
}
|
|
49
28
|
|
|
50
29
|
exports.ContentTypeQuery = ContentTypeQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contenttype-query.cjs","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"contenttype-query.cjs","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import { BaseQuery } from './base-query';\nimport { AxiosInstance } from '@contentstack/core';\n\nexport class ContentTypeQuery extends BaseQuery {\n constructor(client: AxiosInstance) {\n super();\n this._client = client;\n this._urlPath = '/content_types';\n }\n\n /**\n * @method includeGlobalFieldSchema\n * @memberof ContentTypeQuery\n * @description Includes the global field schema in the content type response\n * @returns {ContentTypeQuery}\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const contentTypeQuery = stack.contentType();\n * const result = await contentTypeQuery.includeGlobalFieldSchema().find();\n */\n includeGlobalFieldSchema(): this {\n this._queryParams.include_global_field_schema = 'true';\n\n return this;\n }\n}\n"],"names":["BaseQuery"],"mappings":";;;;AAGO,MAAM,yBAAyBA,mBAAU,CAAA;AAAA,EAC9C,YAAY,MAAuB,EAAA;AACjC,IAAM,KAAA,EAAA,CAAA;AACN,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,QAAW,GAAA,gBAAA,CAAA;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,wBAAiC,GAAA;AAC/B,IAAA,IAAA,CAAK,aAAa,2BAA8B,GAAA,MAAA,CAAA;AAEhD,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AACF;;;;"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseQuery } from './base-query.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
-
class ContentTypeQuery {
|
|
3
|
+
class ContentTypeQuery extends BaseQuery {
|
|
7
4
|
constructor(client) {
|
|
8
|
-
|
|
9
|
-
__publicField(this, "_urlPath");
|
|
10
|
-
__publicField(this, "_queryParams", {});
|
|
5
|
+
super();
|
|
11
6
|
this._client = client;
|
|
12
7
|
this._urlPath = "/content_types";
|
|
13
8
|
}
|
|
@@ -27,22 +22,6 @@ class ContentTypeQuery {
|
|
|
27
22
|
this._queryParams.include_global_field_schema = "true";
|
|
28
23
|
return this;
|
|
29
24
|
}
|
|
30
|
-
/**
|
|
31
|
-
* @method find
|
|
32
|
-
* @memberof ContentTypeQuery
|
|
33
|
-
* @description Fetches all contentTypes of the stack
|
|
34
|
-
* @returns {Promise<FindResponse<T>>} Promise that resolves to the find response containing content types
|
|
35
|
-
* @example
|
|
36
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
37
|
-
*
|
|
38
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
39
|
-
* const contentTypeQuery = stack.contentType();
|
|
40
|
-
* const result = await contentTypeQuery.find();
|
|
41
|
-
*/
|
|
42
|
-
async find() {
|
|
43
|
-
const response = await getData(this._client, this._urlPath, { params: this._queryParams });
|
|
44
|
-
return response;
|
|
45
|
-
}
|
|
46
25
|
}
|
|
47
26
|
|
|
48
27
|
export { ContentTypeQuery };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contenttype-query.js","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"contenttype-query.js","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import { BaseQuery } from './base-query';\nimport { AxiosInstance } from '@contentstack/core';\n\nexport class ContentTypeQuery extends BaseQuery {\n constructor(client: AxiosInstance) {\n super();\n this._client = client;\n this._urlPath = '/content_types';\n }\n\n /**\n * @method includeGlobalFieldSchema\n * @memberof ContentTypeQuery\n * @description Includes the global field schema in the content type response\n * @returns {ContentTypeQuery}\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const contentTypeQuery = stack.contentType();\n * const result = await contentTypeQuery.includeGlobalFieldSchema().find();\n */\n includeGlobalFieldSchema(): this {\n this._queryParams.include_global_field_schema = 'true';\n\n return this;\n }\n}\n"],"names":[],"mappings":";;AAGO,MAAM,yBAAyB,SAAU,CAAA;AAAA,EAC9C,YAAY,MAAuB,EAAA;AACjC,IAAM,KAAA,EAAA,CAAA;AACN,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,QAAW,GAAA,gBAAA,CAAA;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,wBAAiC,GAAA;AAC/B,IAAA,IAAA,CAAK,aAAa,2BAA8B,GAAA,MAAA,CAAA;AAEhD,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AACF;;;;"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var baseQuery = require('./base-query.cjs');
|
|
4
4
|
|
|
5
|
-
class ContentTypeQuery {
|
|
6
|
-
_client;
|
|
7
|
-
_urlPath;
|
|
8
|
-
_queryParams = {};
|
|
5
|
+
class ContentTypeQuery extends baseQuery.BaseQuery {
|
|
9
6
|
constructor(client) {
|
|
7
|
+
super();
|
|
10
8
|
this._client = client;
|
|
11
9
|
this._urlPath = "/content_types";
|
|
12
10
|
}
|
|
@@ -26,22 +24,6 @@ class ContentTypeQuery {
|
|
|
26
24
|
this._queryParams.include_global_field_schema = "true";
|
|
27
25
|
return this;
|
|
28
26
|
}
|
|
29
|
-
/**
|
|
30
|
-
* @method find
|
|
31
|
-
* @memberof ContentTypeQuery
|
|
32
|
-
* @description Fetches all contentTypes of the stack
|
|
33
|
-
* @returns {Promise<FindResponse<T>>} Promise that resolves to the find response containing content types
|
|
34
|
-
* @example
|
|
35
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
36
|
-
*
|
|
37
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
38
|
-
* const contentTypeQuery = stack.contentType();
|
|
39
|
-
* const result = await contentTypeQuery.find();
|
|
40
|
-
*/
|
|
41
|
-
async find() {
|
|
42
|
-
const response = await core.getData(this._client, this._urlPath, { params: this._queryParams });
|
|
43
|
-
return response;
|
|
44
|
-
}
|
|
45
27
|
}
|
|
46
28
|
|
|
47
29
|
exports.ContentTypeQuery = ContentTypeQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contenttype-query.cjs","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"contenttype-query.cjs","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import { BaseQuery } from './base-query';\nimport { AxiosInstance } from '@contentstack/core';\n\nexport class ContentTypeQuery extends BaseQuery {\n constructor(client: AxiosInstance) {\n super();\n this._client = client;\n this._urlPath = '/content_types';\n }\n\n /**\n * @method includeGlobalFieldSchema\n * @memberof ContentTypeQuery\n * @description Includes the global field schema in the content type response\n * @returns {ContentTypeQuery}\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const contentTypeQuery = stack.contentType();\n * const result = await contentTypeQuery.includeGlobalFieldSchema().find();\n */\n includeGlobalFieldSchema(): this {\n this._queryParams.include_global_field_schema = 'true';\n\n return this;\n }\n}\n"],"names":["BaseQuery"],"mappings":";;;;AAGO,MAAM,yBAAyBA,mBAAU,CAAA;AAAA,EAC9C,YAAY,MAAuB,EAAA;AACjC,IAAM,KAAA,EAAA,CAAA;AACN,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,QAAW,GAAA,gBAAA,CAAA;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,wBAAiC,GAAA;AAC/B,IAAA,IAAA,CAAK,aAAa,2BAA8B,GAAA,MAAA,CAAA;AAEhD,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AACF;;;;"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
+
import { BaseQuery } from './base-query';
|
|
1
2
|
import { AxiosInstance } from '@contentstack/core';
|
|
2
|
-
|
|
3
|
-
export declare class ContentTypeQuery {
|
|
4
|
-
private _client;
|
|
5
|
-
private _urlPath;
|
|
6
|
-
_queryParams: {
|
|
7
|
-
[key: string]: string | number;
|
|
8
|
-
};
|
|
3
|
+
export declare class ContentTypeQuery extends BaseQuery {
|
|
9
4
|
constructor(client: AxiosInstance);
|
|
10
5
|
/**
|
|
11
6
|
* @method includeGlobalFieldSchema
|
|
@@ -20,18 +15,5 @@ export declare class ContentTypeQuery {
|
|
|
20
15
|
* const result = await contentTypeQuery.includeGlobalFieldSchema().find();
|
|
21
16
|
*/
|
|
22
17
|
includeGlobalFieldSchema(): this;
|
|
23
|
-
/**
|
|
24
|
-
* @method find
|
|
25
|
-
* @memberof ContentTypeQuery
|
|
26
|
-
* @description Fetches all contentTypes of the stack
|
|
27
|
-
* @returns {Promise<FindResponse<T>>} Promise that resolves to the find response containing content types
|
|
28
|
-
* @example
|
|
29
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
30
|
-
*
|
|
31
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
32
|
-
* const contentTypeQuery = stack.contentType();
|
|
33
|
-
* const result = await contentTypeQuery.find();
|
|
34
|
-
*/
|
|
35
|
-
find<T>(): Promise<FindResponse<T>>;
|
|
36
18
|
}
|
|
37
19
|
//# sourceMappingURL=contenttype-query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contenttype-query.d.ts","sourceRoot":"","sources":["../../../src/query/contenttype-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"contenttype-query.d.ts","sourceRoot":"","sources":["../../../src/query/contenttype-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,gBAAiB,SAAQ,SAAS;gBACjC,MAAM,EAAE,aAAa;IAMjC;;;;;;;;;;;OAWG;IACH,wBAAwB,IAAI,IAAI;CAKjC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseQuery } from './base-query.js';
|
|
2
2
|
|
|
3
|
-
class ContentTypeQuery {
|
|
4
|
-
_client;
|
|
5
|
-
_urlPath;
|
|
6
|
-
_queryParams = {};
|
|
3
|
+
class ContentTypeQuery extends BaseQuery {
|
|
7
4
|
constructor(client) {
|
|
5
|
+
super();
|
|
8
6
|
this._client = client;
|
|
9
7
|
this._urlPath = "/content_types";
|
|
10
8
|
}
|
|
@@ -24,22 +22,6 @@ class ContentTypeQuery {
|
|
|
24
22
|
this._queryParams.include_global_field_schema = "true";
|
|
25
23
|
return this;
|
|
26
24
|
}
|
|
27
|
-
/**
|
|
28
|
-
* @method find
|
|
29
|
-
* @memberof ContentTypeQuery
|
|
30
|
-
* @description Fetches all contentTypes of the stack
|
|
31
|
-
* @returns {Promise<FindResponse<T>>} Promise that resolves to the find response containing content types
|
|
32
|
-
* @example
|
|
33
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
34
|
-
*
|
|
35
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
36
|
-
* const contentTypeQuery = stack.contentType();
|
|
37
|
-
* const result = await contentTypeQuery.find();
|
|
38
|
-
*/
|
|
39
|
-
async find() {
|
|
40
|
-
const response = await getData(this._client, this._urlPath, { params: this._queryParams });
|
|
41
|
-
return response;
|
|
42
|
-
}
|
|
43
25
|
}
|
|
44
26
|
|
|
45
27
|
export { ContentTypeQuery };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contenttype-query.js","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"contenttype-query.js","sources":["../../../src/query/contenttype-query.ts"],"sourcesContent":["import { BaseQuery } from './base-query';\nimport { AxiosInstance } from '@contentstack/core';\n\nexport class ContentTypeQuery extends BaseQuery {\n constructor(client: AxiosInstance) {\n super();\n this._client = client;\n this._urlPath = '/content_types';\n }\n\n /**\n * @method includeGlobalFieldSchema\n * @memberof ContentTypeQuery\n * @description Includes the global field schema in the content type response\n * @returns {ContentTypeQuery}\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const contentTypeQuery = stack.contentType();\n * const result = await contentTypeQuery.includeGlobalFieldSchema().find();\n */\n includeGlobalFieldSchema(): this {\n this._queryParams.include_global_field_schema = 'true';\n\n return this;\n }\n}\n"],"names":[],"mappings":";;AAGO,MAAM,yBAAyB,SAAU,CAAA;AAAA,EAC9C,YAAY,MAAuB,EAAA;AACjC,IAAM,KAAA,EAAA,CAAA;AACN,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,QAAW,GAAA,gBAAA,CAAA;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,wBAAiC,GAAA;AAC/B,IAAA,IAAA,CAAK,aAAa,2BAA8B,GAAA,MAAA,CAAA;AAEhD,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/delivery-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"prerelease": "npm run test:all && npm run validate:all"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@contentstack/core": "^1.3.
|
|
51
|
-
"@contentstack/utils": "^1.
|
|
52
|
-
"axios": "^1.
|
|
50
|
+
"@contentstack/core": "^1.3.11",
|
|
51
|
+
"@contentstack/utils": "^1.8.0",
|
|
52
|
+
"axios": "^1.15.0",
|
|
53
53
|
"humps": "^2.0.1"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"README.md"
|
|
59
59
|
],
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@playwright/test": "^1.
|
|
62
|
-
"@slack/bolt": "^4.
|
|
61
|
+
"@playwright/test": "^1.58.2",
|
|
62
|
+
"@slack/bolt": "^4.6.0",
|
|
63
63
|
"@types/humps": "^2.0.6",
|
|
64
64
|
"@types/jest": "^29.5.14",
|
|
65
65
|
"@types/node-localstorage": "^1.3.3",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"babel-jest": "^29.7.0",
|
|
68
68
|
"dotenv": "^16.6.1",
|
|
69
69
|
"@rollup/plugin-commonjs": "^27.0.0",
|
|
70
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
71
|
-
"@rollup/plugin-replace": "^5.0.
|
|
72
|
-
"rollup": "^3.
|
|
70
|
+
"@rollup/plugin-node-resolve": "^15.3.1",
|
|
71
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
72
|
+
"rollup": "^3.30.0",
|
|
73
73
|
"rollup-plugin-esbuild": "^5.0.0",
|
|
74
74
|
"http-server": "^14.1.1",
|
|
75
75
|
"husky": "^9.1.7",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"jest-html-reporter": "^3.10.2",
|
|
79
79
|
"jest-html-reporters": "^3.1.7",
|
|
80
80
|
"jest-junit": "^16.0.0",
|
|
81
|
-
"ts-jest": "^29.
|
|
82
|
-
"typescript": "~5.7.
|
|
81
|
+
"ts-jest": "^29.4.6",
|
|
82
|
+
"typescript": "~5.7.3",
|
|
83
83
|
"ts-node": "^10.9.2"
|
|
84
84
|
},
|
|
85
85
|
"homepage": "https://github.com/contentstack/contentstack-typescript"
|