oneentry 1.0.34 → 1.0.36

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.
@@ -16,7 +16,7 @@ class PageApi extends oneEntry_1.default {
16
16
  *
17
17
  * @returns Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
18
18
  */
19
- async getRootPages(langCode) {
19
+ async getRootPages(langCode = 'en_US') {
20
20
  const result = await this._fetchRequests(`/root?langCode=${this._LANGCODE_KEY}`, langCode);
21
21
  return result;
22
22
  }
@@ -31,7 +31,7 @@ class PageApi extends oneEntry_1.default {
31
31
  *
32
32
  * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
33
33
  */
34
- async getCatalogPages(langCode, limit = 30, offset = 0) {
34
+ async getCatalogPages(langCode = 'en_US', limit = 30, offset = 0) {
35
35
  const result = await this._fetchRequests(`/catalog?langCode=${this._LANGCODE_KEY}&limit=${limit}&offset=${offset}`, langCode);
36
36
  return result;
37
37
  }
@@ -42,7 +42,7 @@ class PageApi extends oneEntry_1.default {
42
42
  *
43
43
  * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
44
44
  */
45
- async getPages(langCode) {
45
+ async getPages(langCode = 'en_US') {
46
46
  const result = await this._fetchRequests(`?langCode=${this._LANGCODE_KEY}`, langCode);
47
47
  return result;
48
48
  }
@@ -55,7 +55,7 @@ class PageApi extends oneEntry_1.default {
55
55
  *
56
56
  * @returns Returns PageEntity object
57
57
  */
58
- async getPageById(id, langCode) {
58
+ async getPageById(id, langCode = 'en_US') {
59
59
  const result = await this._fetchRequests(`/${id}?langCode=${this._LANGCODE_KEY}`, langCode);
60
60
  return result;
61
61
  }
@@ -68,7 +68,7 @@ class PageApi extends oneEntry_1.default {
68
68
  *
69
69
  * @returns Returns PageEntity object
70
70
  */
71
- async getPageByUrl(url, langCode) {
71
+ async getPageByUrl(url, langCode = 'en_US') {
72
72
  const result = await this._fetchRequests(`/url/${url}?langCode=${this._LANGCODE_KEY}`, langCode);
73
73
  return result;
74
74
  }
@@ -81,7 +81,7 @@ class PageApi extends oneEntry_1.default {
81
81
  *
82
82
  * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
83
83
  */
84
- async getChildPagesByParentUrl(url, langCode) {
84
+ async getChildPagesByParentUrl(url, langCode = 'en_US') {
85
85
  const result = await this._fetchRequests(`/${url}/children?langCode=${this._LANGCODE_KEY}`, langCode);
86
86
  return result;
87
87
  }
@@ -94,7 +94,7 @@ class PageApi extends oneEntry_1.default {
94
94
  *
95
95
  * @returns Returns all forms as an array of PositionForm objects or an empty array [] (if there is no data) for the selected parent
96
96
  */
97
- async getFormsByPageUrl(url, langCode) {
97
+ async getFormsByPageUrl(url, langCode = 'en_US') {
98
98
  const result = await this._fetchRequests(`/${url}/forms?langCode=${this._LANGCODE_KEY}`, langCode);
99
99
  return result;
100
100
  }
@@ -107,7 +107,7 @@ class PageApi extends oneEntry_1.default {
107
107
  *
108
108
  * @returns Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
109
109
  */
110
- async getBlocksByPageUrl(url, langCode) {
110
+ async getBlocksByPageUrl(url, langCode = 'en_US') {
111
111
  const result = await this._fetchRequests(`/${url}/blocks?langCode=${this._LANGCODE_KEY}`, langCode);
112
112
  return result;
113
113
  }
@@ -131,7 +131,7 @@ class PageApi extends oneEntry_1.default {
131
131
  *
132
132
  * @returns Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
133
133
  */
134
- async searchPage(name, langCode) {
134
+ async searchPage(name, langCode = 'en_US') {
135
135
  const result = await this._fetchGet(`/quick/search?lang=${langCode}&name=${name}`);
136
136
  return result;
137
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,5 +12,8 @@
12
12
  "dependencies": {
13
13
  "jsdoc": "^4.0.2",
14
14
  "typescript": "^5.2.2"
15
+ },
16
+ "devDependencies": {
17
+ "@types/node": "^20.10.4"
15
18
  }
16
19
  }