oneentry 1.0.26 → 1.0.27
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/admins/adminsApi.js +3 -14
- package/dist/admins/adminsApi.js.map +1 -1
- package/dist/admins/adminsInterfaces.d.ts +7 -26
- package/dist/base/oneEntry.js +59 -76
- package/dist/base/oneEntry.js.map +1 -1
- package/dist/base/utils.d.ts +14 -10
- package/dist/base/utils.js +1 -7
- package/dist/base/utils.js.map +1 -1
- package/dist/file-uploding/fileUploadingApi.js +8 -21
- package/dist/file-uploding/fileUploadingApi.js.map +1 -1
- package/dist/forms/formsApi.js +6 -19
- package/dist/forms/formsApi.js.map +1 -1
- package/dist/forms/formsInterfaces.d.ts +3 -4
- package/dist/formsData/formsDataApi.js +9 -24
- package/dist/formsData/formsDataApi.js.map +1 -1
- package/dist/general-types/GeneralTypesApi.js +3 -14
- package/dist/general-types/GeneralTypesApi.js.map +1 -1
- package/dist/locales/localesApi.js +3 -14
- package/dist/locales/localesApi.js.map +1 -1
- package/dist/locales/localesInterfaces.d.ts +2 -3
- package/dist/menus/menusApi.js +3 -14
- package/dist/menus/menusApi.js.map +1 -1
- package/dist/pages/pagesApi.js +27 -54
- package/dist/pages/pagesApi.js.map +1 -1
- package/dist/pages/pagesInterfaces.d.ts +7 -7
- package/dist/product-statuses/productStatusesApi.js +12 -29
- package/dist/product-statuses/productStatusesApi.js.map +1 -1
- package/dist/product-statuses/productStatusesInterfaces.d.ts +1 -1
- package/dist/products/productsApi.js +59 -61
- package/dist/products/productsApi.js.map +1 -1
- package/dist/products/productsInterfaces.d.ts +3 -7
- package/dist/system/systemApi.js +6 -19
- package/dist/system/systemApi.js.map +1 -1
- package/dist/templates/templatesApi.js +6 -19
- package/dist/templates/templatesApi.js.map +1 -1
- package/dist/templates/templatesInterfaces.d.ts +5 -9
- package/dist/templates-preview/templatesPreviewApi.js +9 -24
- package/dist/templates-preview/templatesPreviewApi.js.map +1 -1
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +22 -11
- package/package.json +1 -1
package/dist/menus/menusApi.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const oneEntry_1 = require("../base/oneEntry");
|
|
13
4
|
/**
|
|
@@ -25,11 +16,9 @@ class MenusApi extends oneEntry_1.default {
|
|
|
25
16
|
*
|
|
26
17
|
* @returns Returns a single menu object as a ContentMenuDto object with included pages
|
|
27
18
|
*/
|
|
28
|
-
getMenusByMarker(marker) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return result;
|
|
32
|
-
});
|
|
19
|
+
async getMenusByMarker(marker) {
|
|
20
|
+
const result = await this._fetchGet(`/marker/${marker}`);
|
|
21
|
+
return result;
|
|
33
22
|
}
|
|
34
23
|
}
|
|
35
24
|
exports.default = MenusApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menusApi.js","sourceRoot":"","sources":["../../src/menus/menusApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menusApi.js","sourceRoot":"","sources":["../../src/menus/menusApi.ts"],"names":[],"mappings":";;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,QAAS,SAAQ,kBAAQ;IAC1C,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAC,KAAK,CAAC,CAAA;QAChB,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAA;IACrC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,gBAAgB,CAAC,MAAa;QACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;QACxD,OAAO,MAAM,CAAA;IACjB,CAAC;CAEJ;AAlBD,2BAkBC"}
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const oneEntry_1 = require("../base/oneEntry");
|
|
13
4
|
/**
|
|
@@ -25,11 +16,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
25
16
|
*
|
|
26
17
|
* @returns Returns all created pages without parents as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
|
|
27
18
|
*/
|
|
28
|
-
getRootPages(langCode) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return result;
|
|
32
|
-
});
|
|
19
|
+
async getRootPages(langCode) {
|
|
20
|
+
const result = await this._fetchRequests(`/root?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
21
|
+
return result;
|
|
33
22
|
}
|
|
34
23
|
/**
|
|
35
24
|
* Get all page objects with product information as an array.
|
|
@@ -42,11 +31,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
42
31
|
*
|
|
43
32
|
* @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
|
|
44
33
|
*/
|
|
45
|
-
getCatalogPages(langCode, limit = 30, offset = 0) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return result;
|
|
49
|
-
});
|
|
34
|
+
async getCatalogPages(langCode, limit = 30, offset = 0) {
|
|
35
|
+
const result = await this._fetchRequests(`/catalog?langCode=${this._LANGCODE_KEY}&limit=${limit}&offset=${offset}`, langCode);
|
|
36
|
+
return result;
|
|
50
37
|
}
|
|
51
38
|
/**
|
|
52
39
|
* Get all page objects with product information as an array.
|
|
@@ -55,11 +42,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
55
42
|
*
|
|
56
43
|
* @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
|
|
57
44
|
*/
|
|
58
|
-
getPages(langCode) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return result;
|
|
62
|
-
});
|
|
45
|
+
async getPages(langCode) {
|
|
46
|
+
const result = await this._fetchRequests(`?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
47
|
+
return result;
|
|
63
48
|
}
|
|
64
49
|
/**
|
|
65
50
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
@@ -70,11 +55,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
70
55
|
*
|
|
71
56
|
* @returns Returns page object (DTO depends on the type of page being returned)
|
|
72
57
|
*/
|
|
73
|
-
getPageById(id, langCode) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return result;
|
|
77
|
-
});
|
|
58
|
+
async getPageById(id, langCode) {
|
|
59
|
+
const result = await this._fetchRequests(`/${id}?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
60
|
+
return result;
|
|
78
61
|
}
|
|
79
62
|
/**
|
|
80
63
|
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
@@ -85,11 +68,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
85
68
|
*
|
|
86
69
|
* @returns Returns page object (DTO depends on the type of page being returned)
|
|
87
70
|
*/
|
|
88
|
-
getPageByUrl(url, langCode) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return result;
|
|
92
|
-
});
|
|
71
|
+
async getPageByUrl(url, langCode) {
|
|
72
|
+
const result = await this._fetchRequests(`/url/${url}?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
73
|
+
return result;
|
|
93
74
|
}
|
|
94
75
|
/**
|
|
95
76
|
* Get child pages object with information as an array.
|
|
@@ -100,11 +81,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
100
81
|
*
|
|
101
82
|
* @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent
|
|
102
83
|
*/
|
|
103
|
-
getChildPagesByParentUrl(url, langCode) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return result;
|
|
107
|
-
});
|
|
84
|
+
async getChildPagesByParentUrl(url, langCode) {
|
|
85
|
+
const result = await this._fetchRequests(`/${url}/children?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
86
|
+
return result;
|
|
108
87
|
}
|
|
109
88
|
/**
|
|
110
89
|
* Get all forms by page url.
|
|
@@ -115,11 +94,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
115
94
|
*
|
|
116
95
|
* @returns Returns all forms as an array of PositionFormDto objects or an empty array [] (if there is no data) for the selected parent
|
|
117
96
|
*/
|
|
118
|
-
getFormsByPageUrl(url, langCode) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return result;
|
|
122
|
-
});
|
|
97
|
+
async getFormsByPageUrl(url, langCode) {
|
|
98
|
+
const result = await this._fetchRequests(`/${url}/forms?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
99
|
+
return result;
|
|
123
100
|
}
|
|
124
101
|
/**
|
|
125
102
|
* Get settings for the page.
|
|
@@ -128,11 +105,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
128
105
|
*
|
|
129
106
|
* @returns Returns a ConfigPageDto object with page display settings
|
|
130
107
|
*/
|
|
131
|
-
getConfigPageByUrl(url) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return result;
|
|
135
|
-
});
|
|
108
|
+
async getConfigPageByUrl(url) {
|
|
109
|
+
const result = await this._fetchGet(`/${url}/config`);
|
|
110
|
+
return result;
|
|
136
111
|
}
|
|
137
112
|
/**
|
|
138
113
|
* Quick search for page objects with limited output.
|
|
@@ -143,11 +118,9 @@ class PageApi extends oneEntry_1.default {
|
|
|
143
118
|
*
|
|
144
119
|
* @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
|
|
145
120
|
*/
|
|
146
|
-
searchPage(name, langCode) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return result;
|
|
150
|
-
});
|
|
121
|
+
async searchPage(name, langCode) {
|
|
122
|
+
const result = await this._fetchGet(`/quick/search?lang=${langCode}&name=${name}`);
|
|
123
|
+
return result;
|
|
151
124
|
}
|
|
152
125
|
}
|
|
153
126
|
exports.default = PageApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagesApi.js","sourceRoot":"","sources":["../../src/pages/pagesApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagesApi.js","sourceRoot":"","sources":["../../src/pages/pagesApi.ts"],"names":[],"mappings":";;AAAA,+CAAwC;AAIxC;;GAEG;AACH,MAAqB,OAAQ,SAAQ,kBAAQ;IACzC,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAA;IACrC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,YAAY,CAAC,QAAiB;QACvC,MAAM,MAA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AAQ,CAAC,CAAA;QAEpG,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,iBAAiB,CAAC,GAAU,EAAE,QAAiB;QACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,GAAG,mBAAmB,IAAI,CAAC,aAAa,EAAE,EAAC,QAAQ,CAAC,CAAA;QAEjG,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,kBAAkB,CAAC,GAAU;QACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAA;QACrD,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,CAAC,IAAW,EAAE,QAAe;QAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,sBAAsB,QAAQ,SAAS,IAAI,EAAE,CAAC,CAAA;QAClF,OAAO,MAAM,CAAA;IACjB,CAAC;CAEJ;AAtID,0BAsIC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AttributeType, LangType, LocalizeType, Types } from "../base/utils";
|
|
2
2
|
import { IAttributeSetEntity } from "../base/utils";
|
|
3
3
|
import { IFormsEntity } from "../forms/formsInterfaces";
|
|
4
4
|
/**
|
|
@@ -69,7 +69,7 @@ interface IPositionForm {
|
|
|
69
69
|
attributesSets: IAttributeSetEntity;
|
|
70
70
|
attributeSetId: number;
|
|
71
71
|
processingType: string;
|
|
72
|
-
localizeInfos:
|
|
72
|
+
localizeInfos: LocalizeType;
|
|
73
73
|
processingData: object;
|
|
74
74
|
position: number;
|
|
75
75
|
positionId: number;
|
|
@@ -94,14 +94,15 @@ interface IPositionForm {
|
|
|
94
94
|
* @property {Array<[langCode:string]:object>} attributeValues - Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
|
|
95
95
|
* @property {number} position - Item number (for sorting).
|
|
96
96
|
* @property {Types} type - Page type.
|
|
97
|
+
* @property {number} childrenCount - Children count.
|
|
97
98
|
*/
|
|
98
99
|
interface IPagesEntity {
|
|
99
100
|
id: number;
|
|
100
|
-
parentId: number;
|
|
101
|
+
parentId: number | null;
|
|
101
102
|
config: Record<string, number>;
|
|
102
103
|
pageUrl: string;
|
|
103
104
|
depth: number;
|
|
104
|
-
localizeInfos:
|
|
105
|
+
localizeInfos: LocalizeType;
|
|
105
106
|
isVisible: boolean;
|
|
106
107
|
products: number;
|
|
107
108
|
attributeSetId: number;
|
|
@@ -115,10 +116,9 @@ interface IPagesEntity {
|
|
|
115
116
|
*
|
|
116
117
|
* @property {langCode.<object>}
|
|
117
118
|
*/
|
|
118
|
-
attributeValues:
|
|
119
|
-
[langCode: string]: object;
|
|
120
|
-
};
|
|
119
|
+
attributeValues: AttributeType;
|
|
121
120
|
position: number;
|
|
122
121
|
type: Types;
|
|
122
|
+
childrenCount: number;
|
|
123
123
|
}
|
|
124
124
|
export { IPageApi, IPageConfig, IPagesEntity, IPositionForm };
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const oneEntry_1 = require("../base/oneEntry");
|
|
13
4
|
/**
|
|
@@ -23,11 +14,9 @@ class ProductStatusesApi extends oneEntry_1.default {
|
|
|
23
14
|
*
|
|
24
15
|
* @returns Returns an array of product status objects
|
|
25
16
|
*/
|
|
26
|
-
getProductStatuses() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
17
|
+
async getProductStatuses() {
|
|
18
|
+
const result = await this._fetchGet('');
|
|
19
|
+
return result;
|
|
31
20
|
}
|
|
32
21
|
/**
|
|
33
22
|
* Search for a product status object by identifier.
|
|
@@ -36,11 +25,9 @@ class ProductStatusesApi extends oneEntry_1.default {
|
|
|
36
25
|
*
|
|
37
26
|
* @returns Returns a product status object
|
|
38
27
|
*/
|
|
39
|
-
getProductStatusesById(id) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return result;
|
|
43
|
-
});
|
|
28
|
+
async getProductStatusesById(id) {
|
|
29
|
+
const result = await this._fetchGet(`/${id}`);
|
|
30
|
+
return result;
|
|
44
31
|
}
|
|
45
32
|
/**
|
|
46
33
|
* Search for a product status object by its textual identifier (marker).
|
|
@@ -49,11 +36,9 @@ class ProductStatusesApi extends oneEntry_1.default {
|
|
|
49
36
|
*
|
|
50
37
|
* @returns Returns a product status object
|
|
51
38
|
*/
|
|
52
|
-
getProductsByStatusMarker(marker) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return result;
|
|
56
|
-
});
|
|
39
|
+
async getProductsByStatusMarker(marker) {
|
|
40
|
+
const result = await this._fetchGet(`/marker/${marker}`);
|
|
41
|
+
return result;
|
|
57
42
|
}
|
|
58
43
|
/**
|
|
59
44
|
* Check the existence of a textual identifier.
|
|
@@ -62,11 +47,9 @@ class ProductStatusesApi extends oneEntry_1.default {
|
|
|
62
47
|
*
|
|
63
48
|
* @returns Returns true if the textual identifier (marker) exists or false if it doesn't
|
|
64
49
|
*/
|
|
65
|
-
validateMarker(marker) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return result;
|
|
69
|
-
});
|
|
50
|
+
async validateMarker(marker) {
|
|
51
|
+
const result = await this._fetchGet(`/marker-validation/${marker}`);
|
|
52
|
+
return result;
|
|
70
53
|
}
|
|
71
54
|
}
|
|
72
55
|
exports.default = ProductStatusesApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productStatusesApi.js","sourceRoot":"","sources":["../../src/product-statuses/productStatusesApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"productStatusesApi.js","sourceRoot":"","sources":["../../src/product-statuses/productStatusesApi.ts"],"names":[],"mappings":";;AAAA,+CAAuC;AAGvC;;GAEG;AACH,MAAqB,kBAAmB,SAAQ,kBAAQ;IACpD,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,+BAA+B,CAAA;IAChD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,kBAAkB;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,sBAAsB,CAAC,EAAS;QACzC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QAC7C,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,yBAAyB,CAAC,MAAa;QAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;QACxD,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,cAAc,CAAC,MAAa;QACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,sBAAsB,MAAM,EAAE,CAAC,CAAA;QACnE,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ;AAnDD,qCAmDC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const oneEntry_1 = require("../base/oneEntry");
|
|
13
4
|
/**
|
|
@@ -53,12 +44,10 @@ class ProductApi extends oneEntry_1.default {
|
|
|
53
44
|
*
|
|
54
45
|
* @returns {Promise<IProductsEntity[]>} - List of products.
|
|
55
46
|
*/
|
|
56
|
-
getProducts(langCode = 'en_US', userQuery) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return result;
|
|
61
|
-
});
|
|
47
|
+
async getProducts(langCode = 'en_US', userQuery) {
|
|
48
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
49
|
+
const result = await this._fetchRequests(`?langCode=${this._LANGCODE_KEY}&` + this._queryParamsToString(query), langCode);
|
|
50
|
+
return result;
|
|
62
51
|
}
|
|
63
52
|
/**
|
|
64
53
|
* Search for all product page objects with pagination that do not have a category.
|
|
@@ -83,12 +72,10 @@ class ProductApi extends oneEntry_1.default {
|
|
|
83
72
|
*
|
|
84
73
|
* @returns {Promise<IProductsEntity[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
|
|
85
74
|
*/
|
|
86
|
-
getProductsEmptyPage(langCode = 'en_US', userQuery) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return result;
|
|
91
|
-
});
|
|
75
|
+
async getProductsEmptyPage(langCode = 'en_US', userQuery) {
|
|
76
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
77
|
+
const result = await this._fetchRequests(`/empty-page?langCode=${this._LANGCODE_KEY}&` + this._queryParamsToString(query), langCode);
|
|
78
|
+
return result;
|
|
92
79
|
}
|
|
93
80
|
/**
|
|
94
81
|
* Search for all product page objects with pagination for the selected category.
|
|
@@ -116,12 +103,10 @@ class ProductApi extends oneEntry_1.default {
|
|
|
116
103
|
*
|
|
117
104
|
* @returns {Promise<IProductsEntity[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
|
|
118
105
|
*/
|
|
119
|
-
getProductsPageById(id, langCode = 'en_US', userQuery) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return result;
|
|
124
|
-
});
|
|
106
|
+
async getProductsPageById(id, langCode = 'en_US', userQuery) {
|
|
107
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
108
|
+
const result = await this._fetchRequests(`/page/${id}?langCode=${this._LANGCODE_KEY}&` + this._queryParamsToString(query), langCode);
|
|
109
|
+
return result;
|
|
125
110
|
}
|
|
126
111
|
/**
|
|
127
112
|
* Search for all product page objects with pagination for the selected category (by its URL).
|
|
@@ -149,12 +134,10 @@ class ProductApi extends oneEntry_1.default {
|
|
|
149
134
|
*
|
|
150
135
|
* @returns {Promise<IProductsEntity[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
|
|
151
136
|
*/
|
|
152
|
-
getProductsPageByUrl(url, langCode = 'en_US', userQuery) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return result;
|
|
157
|
-
});
|
|
137
|
+
async getProductsPageByUrl(url, langCode = 'en_US', userQuery) {
|
|
138
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
139
|
+
const result = await this._fetchRequests(`/page/url/${url}?langCode=${this._LANGCODE_KEY}&` + this._queryParamsToString(query), langCode);
|
|
140
|
+
return result;
|
|
158
141
|
}
|
|
159
142
|
/**
|
|
160
143
|
* Find all related product page objects.
|
|
@@ -174,12 +157,10 @@ class ProductApi extends oneEntry_1.default {
|
|
|
174
157
|
*
|
|
175
158
|
* @returns {Promise<IProductsEntity[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
|
|
176
159
|
*/
|
|
177
|
-
getRelatedProductsById(id, langCode = 'en_US', userQuery) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return result;
|
|
182
|
-
});
|
|
160
|
+
async getRelatedProductsById(id, langCode = 'en_US', userQuery) {
|
|
161
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
162
|
+
const result = await this._fetchRequests(`/${id}/related?langCode=${this._LANGCODE_KEY}&` + this._queryParamsToString(query), langCode);
|
|
163
|
+
return result;
|
|
183
164
|
}
|
|
184
165
|
/**
|
|
185
166
|
* Retrieve one product object.
|
|
@@ -190,11 +171,9 @@ class ProductApi extends oneEntry_1.default {
|
|
|
190
171
|
*
|
|
191
172
|
* @returns {Promise<IProductsEntity>} - Returns ContentIndexedProductDto object for the product.
|
|
192
173
|
*/
|
|
193
|
-
getProductById(id, langCode = 'en_US') {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
return result;
|
|
197
|
-
});
|
|
174
|
+
async getProductById(id, langCode = 'en_US') {
|
|
175
|
+
const result = await this._fetchRequests(`/${id}?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
176
|
+
return result;
|
|
198
177
|
}
|
|
199
178
|
/**
|
|
200
179
|
* Find all product page objects with pagination and multiple filtering.
|
|
@@ -229,12 +208,33 @@ class ProductApi extends oneEntry_1.default {
|
|
|
229
208
|
*
|
|
230
209
|
* @returns {Promise<IProductsEntity[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
|
|
231
210
|
*/
|
|
232
|
-
filterProduct(data, langCode = 'en_US', userQuery) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
|
|
211
|
+
async filterProduct(data, langCode = 'en_US', userQuery) {
|
|
212
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
213
|
+
if (typeof langCode === 'string') {
|
|
214
|
+
const response = await this._fetchPost(`/conditions-filter?langCode=${langCode}&` + this._queryParamsToString(query), data);
|
|
215
|
+
const products = response.items;
|
|
216
|
+
const result = products.map(item => this._normalizeData(item));
|
|
217
|
+
return result;
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
const productList = [];
|
|
221
|
+
await Promise.all(langCode.map(async (lang) => {
|
|
222
|
+
const response = await this._fetchPost(`/conditions-filter?langCode=${lang}&` + this._queryParamsToString(query), data);
|
|
223
|
+
productList.push(response.items);
|
|
224
|
+
}));
|
|
225
|
+
const result = [];
|
|
226
|
+
productList.flat().forEach(product => {
|
|
227
|
+
if (!result.find(prod => prod.id === product.id)) {
|
|
228
|
+
result.push(product);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
const relatedProduct = result.find(prod => prod.id === product.id);
|
|
232
|
+
Object.assign(relatedProduct.attributeValues, product.attributeValues);
|
|
233
|
+
Object.assign(relatedProduct.localizeInfos, product.localizeInfos);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
return result;
|
|
237
|
+
}
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
240
|
* Quick search for product page objects with limited output.
|
|
@@ -245,17 +245,15 @@ class ProductApi extends oneEntry_1.default {
|
|
|
245
245
|
*
|
|
246
246
|
* @returns {Promise<IProductsEntity[]>} - Returns array of ContentIndexedProductDto object for the product.
|
|
247
247
|
*/
|
|
248
|
-
searchProduct(name, langCode = 'en_US') {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return productsList;
|
|
258
|
-
});
|
|
248
|
+
async searchProduct(name, langCode = 'en_US') {
|
|
249
|
+
const searchProducts = await this._fetchGet(`/quick/search?lang=${langCode}&name=${name}`);
|
|
250
|
+
const productsList = [];
|
|
251
|
+
await Promise.all(searchProducts.map(async (product) => {
|
|
252
|
+
await this.getProductById(product.id).then((result) => {
|
|
253
|
+
productsList.push(result);
|
|
254
|
+
});
|
|
255
|
+
}));
|
|
256
|
+
return productsList;
|
|
259
257
|
}
|
|
260
258
|
}
|
|
261
259
|
exports.default = ProductApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productsApi.js","sourceRoot":"","sources":["../../src/products/productsApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"productsApi.js","sourceRoot":"","sources":["../../src/products/productsApi.ts"],"names":[],"mappings":";;AACA,+CAAuC;AAGvC;;GAEG;AACH,MAAqB,UAAW,SAAQ,kBAAQ;IAC5C,YAAY,GAAU,EAAE,KAAY;QAChC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QAIb,kBAAa,GAAkB;YACnC,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,EAAE;YACT,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;YACpB,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE,IAAI;SAChB,CAAA;QAZG,IAAI,CAAC,IAAI,IAAI,uBAAuB,CAAA;IACxC,CAAC;IAaD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACI,KAAK,CAAC,WAAW,CAAC,WAAoB,OAAO,EAAE,SAA0B;QAC5E,MAAM,KAAK,GAAkB,EAAC,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,SAAS,EAAC,CAAA;QAClE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,IAAI,CAAC,aAAa,GAAG,GAAE,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAC,QAAQ,CAAC,CAAA;QAEvH,OAAO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cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,OAAsB,EAAE,EAAE;YAChD,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;gBAClD,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YAC7B,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CACL,CAAA;QACD,OAAO,YAAY,CAAA;IACvB,CAAC;CACJ;AAjRD,6BAiRC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AttributeType, LangType, LocalizeType } from "../base/utils";
|
|
2
2
|
/**
|
|
3
3
|
* Represents an interface object of Products Api.
|
|
4
4
|
*
|
|
@@ -99,7 +99,6 @@ interface IFilterParams {
|
|
|
99
99
|
* @property {Array<number>} relatedIds - Ids of related product pages.
|
|
100
100
|
* @property {object} productPages - ProductPageEntity objects associated with the product page.
|
|
101
101
|
* @property {number} attributeSetId - Set of attributes id.
|
|
102
|
-
* @property {number} version - Page modification version number.
|
|
103
102
|
* @property {boolean} isSync - Indication of page indexing.
|
|
104
103
|
* @property {number} price - The value of the product page price taken from the index.
|
|
105
104
|
* @property {string} templateIdentifier - User id of the linked template.
|
|
@@ -108,7 +107,7 @@ interface IFilterParams {
|
|
|
108
107
|
*/
|
|
109
108
|
interface IProductsEntity {
|
|
110
109
|
id: number;
|
|
111
|
-
localizeInfos:
|
|
110
|
+
localizeInfos: LocalizeType;
|
|
112
111
|
isVisible: boolean;
|
|
113
112
|
statusId: number | null;
|
|
114
113
|
relatedIds: number[];
|
|
@@ -118,7 +117,6 @@ interface IProductsEntity {
|
|
|
118
117
|
productId: number;
|
|
119
118
|
}[];
|
|
120
119
|
attributeSetId: number;
|
|
121
|
-
version: number;
|
|
122
120
|
isSync: number | boolean;
|
|
123
121
|
price: number;
|
|
124
122
|
templateIdentifier: string;
|
|
@@ -129,9 +127,7 @@ interface IProductsEntity {
|
|
|
129
127
|
*
|
|
130
128
|
* @property {langCode.<object>}
|
|
131
129
|
*/
|
|
132
|
-
attributeValues:
|
|
133
|
-
[langCode: string]: object;
|
|
134
|
-
};
|
|
130
|
+
attributeValues: AttributeType;
|
|
135
131
|
position: number;
|
|
136
132
|
}
|
|
137
133
|
export { IFilterParams, IProductsQuery, IProductApi, IProductsEntity };
|
package/dist/system/systemApi.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const oneEntry_1 = require("../base/oneEntry");
|
|
13
4
|
/**
|
|
@@ -18,17 +9,13 @@ class SystemApi extends oneEntry_1.default {
|
|
|
18
9
|
super(url, token);
|
|
19
10
|
this._url += '/api/content/system';
|
|
20
11
|
}
|
|
21
|
-
test404() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return result;
|
|
25
|
-
});
|
|
12
|
+
async test404() {
|
|
13
|
+
const result = await this._fetchGet('/test404');
|
|
14
|
+
return result;
|
|
26
15
|
}
|
|
27
|
-
test500() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return result;
|
|
31
|
-
});
|
|
16
|
+
async test500() {
|
|
17
|
+
const result = await this._fetchGet('/test500');
|
|
18
|
+
return result;
|
|
32
19
|
}
|
|
33
20
|
}
|
|
34
21
|
exports.default = SystemApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemApi.js","sourceRoot":"","sources":["../../src/system/systemApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"systemApi.js","sourceRoot":"","sources":["../../src/system/systemApi.ts"],"names":[],"mappings":";;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,SAAU,SAAQ,kBAAQ;IAC3C,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,qBAAqB,CAAA;IACtC,CAAC;IAEM,KAAK,CAAC,OAAO;QAChB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;QAC/C,OAAO,MAAM,CAAA;IACjB,CAAC;IAEM,KAAK,CAAC,OAAO;QAChB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;QAC/C,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ;AAfD,4BAeC"}
|