oneentry 1.0.26 → 1.0.28
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.d.ts +2 -2
- package/dist/formsData/formsDataApi.js +11 -26
- 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.d.ts +1 -1
- package/dist/menus/menusApi.js +10 -14
- package/dist/menus/menusApi.js.map +1 -1
- package/dist/menus/menusInterfaces.d.ts +2 -0
- package/dist/pages/pagesApi.d.ts +9 -9
- package/dist/pages/pagesApi.js +36 -63
- 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.d.ts +22 -10
- package/dist/products/productsApi.js +83 -73
- package/dist/products/productsApi.js.map +1 -1
- package/dist/products/productsInterfaces.d.ts +5 -9
- 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/admins/adminsApi.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
|
/**
|
|
@@ -23,11 +14,9 @@ class AdminsApi extends oneEntry_1.default {
|
|
|
23
14
|
*
|
|
24
15
|
* @returns Returns all AdminEntity user objects
|
|
25
16
|
*/
|
|
26
|
-
getAdminsInfo() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
17
|
+
async getAdminsInfo() {
|
|
18
|
+
const result = await this._fetchGet('');
|
|
19
|
+
return result;
|
|
31
20
|
}
|
|
32
21
|
}
|
|
33
22
|
exports.default = AdminsApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adminsApi.js","sourceRoot":"","sources":["../../src/admins/adminsApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adminsApi.js","sourceRoot":"","sources":["../../src/admins/adminsApi.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;IAED;;;;OAIG;IACI,KAAK,CAAC,aAAa;QACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ;AAfD,4BAeC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IAttributeValues } from "../base/utils";
|
|
1
2
|
/**
|
|
2
3
|
* Represents a interface object of Admins Api.
|
|
3
4
|
*
|
|
@@ -25,43 +26,23 @@ interface IPosition {
|
|
|
25
26
|
isLocked?: boolean;
|
|
26
27
|
objectCategoryId?: number;
|
|
27
28
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Represents a position object.
|
|
30
|
-
*
|
|
31
|
-
* @interface
|
|
32
|
-
* @property {string} attr_name - Attributes with values used by the object.
|
|
33
|
-
*/
|
|
34
|
-
interface IAttributesSets {
|
|
35
|
-
[key: string]: string;
|
|
36
|
-
}
|
|
37
29
|
/**
|
|
38
30
|
* Represents an object with various properties.
|
|
39
31
|
*
|
|
40
32
|
* @interface
|
|
41
33
|
* @property {number} id - The identifier of the object.
|
|
42
|
-
* @property {string} updatedDate - The date of when the object was last updated.
|
|
43
|
-
* @property {number} version - The version number of the object.
|
|
44
34
|
* @property {string} identifier - The textual identifier for the record field.
|
|
45
|
-
* @property {
|
|
35
|
+
* @property {AttributeType} attributeValues - The attributes with values used by the object.
|
|
46
36
|
* @property {number} attributeSetId - The identifier of the attribute set being used.
|
|
47
|
-
* @property {
|
|
48
|
-
* @property {
|
|
49
|
-
* @property {number} restorePasswordCode - The code for password restoration.
|
|
50
|
-
* @property {IPosition} position - The position of the object.
|
|
51
|
-
* @property {number} positionId - The identifier of the position object.
|
|
52
|
-
* @property {Record<string, boolean>} permissions - The user's available permissions.
|
|
53
|
-
* @property {string} selectedLanguage - The selected language for the interface.
|
|
54
|
-
* @property {string} selectedContentLanguage - The selected language for content.
|
|
55
|
-
* @property {string} selectedUITheme - The selected theme for the interface.
|
|
37
|
+
* @property {boolean} isSync - Indication of page indexing.
|
|
38
|
+
* @property {number} position - The position of the object.
|
|
56
39
|
*/
|
|
57
40
|
interface IAdminEntity {
|
|
58
41
|
id: number;
|
|
59
42
|
identifier: string;
|
|
60
|
-
attributesSets: IAttributesSets;
|
|
61
|
-
isSync: boolean;
|
|
62
43
|
attributeSetId: number | null;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
position:
|
|
44
|
+
isSync: boolean;
|
|
45
|
+
attributeValues: IAttributeValues;
|
|
46
|
+
position: number;
|
|
66
47
|
}
|
|
67
48
|
export { IAdmins, IAdminEntity, IPosition };
|
package/dist/base/oneEntry.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
|
class OneEntry {
|
|
13
4
|
constructor(url, token) {
|
|
@@ -20,45 +11,39 @@ class OneEntry {
|
|
|
20
11
|
_getFullPath(path) {
|
|
21
12
|
return (this._url + path);
|
|
22
13
|
}
|
|
23
|
-
_fetchGet(path) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const result = yield response.json();
|
|
33
|
-
return result;
|
|
14
|
+
async _fetchGet(path) {
|
|
15
|
+
const response = await fetch(this._getFullPath(path), {
|
|
16
|
+
method: 'GET',
|
|
17
|
+
headers: {
|
|
18
|
+
'Content-Type': 'application/json',
|
|
19
|
+
'x-app-token': this._token,
|
|
20
|
+
}
|
|
34
21
|
});
|
|
22
|
+
const result = await response.json();
|
|
23
|
+
return result;
|
|
35
24
|
}
|
|
36
|
-
_fetchPost(path, data) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
body: JSON.stringify(data)
|
|
45
|
-
});
|
|
46
|
-
const result = yield response.json();
|
|
47
|
-
return result;
|
|
25
|
+
async _fetchPost(path, data) {
|
|
26
|
+
const response = await fetch(this._getFullPath(path), {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
headers: {
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
'x-app-token': this._token,
|
|
31
|
+
},
|
|
32
|
+
body: JSON.stringify(data)
|
|
48
33
|
});
|
|
34
|
+
const result = await response.json();
|
|
35
|
+
return result;
|
|
49
36
|
}
|
|
50
|
-
_fetchDelete(path) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
const result = yield response.json();
|
|
60
|
-
return result;
|
|
37
|
+
async _fetchDelete(path) {
|
|
38
|
+
const response = await fetch(this._getFullPath(path), {
|
|
39
|
+
method: 'DELETE',
|
|
40
|
+
headers: {
|
|
41
|
+
'Content-Type': 'application/json',
|
|
42
|
+
'x-app-token': this._token,
|
|
43
|
+
},
|
|
61
44
|
});
|
|
45
|
+
const result = await response.json();
|
|
46
|
+
return result;
|
|
62
47
|
}
|
|
63
48
|
_queryParamsToString(query) {
|
|
64
49
|
let result = '';
|
|
@@ -78,41 +63,39 @@ class OneEntry {
|
|
|
78
63
|
return str.slice(0, index) + lang + str.slice(index + this._LANGCODE_KEY.length);
|
|
79
64
|
}
|
|
80
65
|
}
|
|
81
|
-
_fetchRequests(url, lang) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return result;
|
|
90
|
-
}
|
|
91
|
-
return this._normalizeData(response);
|
|
66
|
+
async _fetchRequests(url, lang) {
|
|
67
|
+
const langCode = (typeof lang === 'string') ? [lang] : lang;
|
|
68
|
+
if (langCode.length === 1) {
|
|
69
|
+
const response = await this._fetchGet(this._parseLangFromString(url, langCode[0]));
|
|
70
|
+
if (response.hasOwnProperty('items') || Array.isArray(response)) {
|
|
71
|
+
let result = Array.isArray(response) ? response : response.items;
|
|
72
|
+
result = result.map(item => this._normalizeData(item));
|
|
73
|
+
return result;
|
|
92
74
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const baseData = dataList.splice(0, 1)[0];
|
|
101
|
-
dataList.map(item => {
|
|
102
|
-
if (Array.isArray(item)) {
|
|
103
|
-
item.map((subitem, index) => {
|
|
104
|
-
Object.assign(baseData[index].attributeValues, subitem.attributeValues);
|
|
105
|
-
Object.assign(baseData[index].localizeInfos, subitem.localizeInfos);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
Object.assign(baseData.attributeValues, item.attributeValues);
|
|
110
|
-
Object.assign(baseData.localizeInfos, item.localizeInfos);
|
|
111
|
-
}
|
|
75
|
+
return this._normalizeData(response);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
const dataList = [];
|
|
79
|
+
await Promise.all(langCode.map(async (lang) => {
|
|
80
|
+
await this._fetchGet(this._parseLangFromString(url, lang)).then((result) => {
|
|
81
|
+
result.hasOwnProperty('items') ? dataList.push(result.items) : dataList.push(result);
|
|
112
82
|
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
83
|
+
}));
|
|
84
|
+
const baseData = dataList.splice(0, 1)[0];
|
|
85
|
+
dataList.map(item => {
|
|
86
|
+
if (Array.isArray(item)) {
|
|
87
|
+
item.map((subitem, index) => {
|
|
88
|
+
Object.assign(baseData[index].attributeValues, subitem.attributeValues);
|
|
89
|
+
Object.assign(baseData[index].localizeInfos, subitem.localizeInfos);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
Object.assign(baseData.attributeValues, item.attributeValues);
|
|
94
|
+
Object.assign(baseData.localizeInfos, item.localizeInfos);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return baseData;
|
|
98
|
+
}
|
|
116
99
|
}
|
|
117
100
|
_normalizeData(data) {
|
|
118
101
|
const normalizeData = Object.assign({}, data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oneEntry.js","sourceRoot":"","sources":["../../src/base/oneEntry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oneEntry.js","sourceRoot":"","sources":["../../src/base/oneEntry.ts"],"names":[],"mappings":";;AAIA,MAA8B,QAAQ;IAKlC,YAAY,GAAU,EAAE,KAAa;QAF3B,kBAAa,GAAU,WAAW,CAAA;QAGxC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;QACf,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;SACtB;IACL,CAAC;IAES,YAAY,CAAC,IAAW;QAC9B,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;IAC7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H,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;oBAC7D,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;iBAC5D;YACL,CAAC,CAAC,CAAA;YAEF,OAAO,QAAQ,CAAA;SAClB;IACL,CAAC;IAGS,cAAc,CAAC,IAAQ;QAC7B,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;QAE7C,IAAI,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE;YACxC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;YAC7C,aAAa,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;SAC/D;QACD,IAAI,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE;YACtC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;YAC3C,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;SAC3D;QACD,OAAO,aAAa,CAAA;IACxB,CAAC;CACJ;AArID,2BAqIC"}
|
package/dist/base/utils.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
declare enum LanguageCode {
|
|
2
|
-
ru_RU = "ru_RU",
|
|
3
|
-
en_US = "en_US",
|
|
4
|
-
fr_FR = "fr_FR"
|
|
5
|
-
}
|
|
6
1
|
declare enum Types {
|
|
7
2
|
forCatalogProducts = "forCatalogProducts",
|
|
8
3
|
forBasketPage = "forBasketPage",
|
|
@@ -25,17 +20,25 @@ declare enum Types {
|
|
|
25
20
|
service = "service"
|
|
26
21
|
}
|
|
27
22
|
interface ILocalizeInfos {
|
|
28
|
-
[key: string]:
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
[key: string]: ILocalizeInfo;
|
|
24
|
+
}
|
|
25
|
+
interface ILocalizeInfo {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
interface IAttributeValues {
|
|
29
|
+
[key: string]: IAttributeValue;
|
|
30
|
+
}
|
|
31
|
+
interface IAttributeValue {
|
|
32
|
+
[key: string]: any;
|
|
31
33
|
}
|
|
34
|
+
type AttributeType = IAttributeValues | IAttributeValue;
|
|
32
35
|
interface IAttributeSetEntity {
|
|
33
36
|
id: number;
|
|
34
37
|
updatedDate: string;
|
|
35
38
|
version: number;
|
|
36
39
|
identifier: string;
|
|
37
40
|
typeId: number;
|
|
38
|
-
localizeInfos:
|
|
41
|
+
localizeInfos: LocalizeType;
|
|
39
42
|
schema: object;
|
|
40
43
|
position: {
|
|
41
44
|
id: number;
|
|
@@ -47,4 +50,5 @@ interface IAttributeSetEntity {
|
|
|
47
50
|
isVisible: boolean;
|
|
48
51
|
}
|
|
49
52
|
type LangType = string | Array<string>;
|
|
50
|
-
|
|
53
|
+
type LocalizeType = ILocalizeInfos | ILocalizeInfo;
|
|
54
|
+
export { LocalizeType, ILocalizeInfos, Types, IAttributeSetEntity, LangType, AttributeType, IAttributeValues };
|
package/dist/base/utils.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Types =
|
|
4
|
-
var LanguageCode;
|
|
5
|
-
(function (LanguageCode) {
|
|
6
|
-
LanguageCode["ru_RU"] = "ru_RU";
|
|
7
|
-
LanguageCode["en_US"] = "en_US";
|
|
8
|
-
LanguageCode["fr_FR"] = "fr_FR";
|
|
9
|
-
})(LanguageCode || (exports.LanguageCode = LanguageCode = {}));
|
|
3
|
+
exports.Types = void 0;
|
|
10
4
|
var Types;
|
|
11
5
|
(function (Types) {
|
|
12
6
|
Types["forCatalogProducts"] = "forCatalogProducts";
|
package/dist/base/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/base/utils.ts"],"names":[],"mappings":";;;AAAA,IAAK,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/base/utils.ts"],"names":[],"mappings":";;;AAAA,IAAK,KAoBJ;AApBD,WAAK,KAAK;IACN,kDAAyC,CAAA;IACzC,wCAA+B,CAAA;IAC/B,sCAA6B,CAAA;IAC7B,4CAAmC,CAAA;IACnC,gDAAuC,CAAA;IACvC,0CAAiC,CAAA;IACjC,0DAAiD,CAAA;IACjD,8DAAqD,CAAA;IACrD,4CAAmC,CAAA;IACnC,4BAAmB,CAAA;IACnB,sCAA6B,CAAA;IAC7B,oCAA2B,CAAA;IAC3B,sCAA6B,CAAA;IAC7B,0CAAiC,CAAA;IACjC,0CAAiC,CAAA;IACjC,sCAA6B,CAAA;IAC7B,sCAA6B,CAAA;IAC7B,gCAAuB,CAAA;IACvB,4BAAmB,CAAA;AACvB,CAAC,EApBI,KAAK,qBAAL,KAAK,QAoBT"}
|
|
@@ -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
|
/**
|
|
@@ -41,12 +32,10 @@ class FileUploadingApi extends oneEntry_1.default {
|
|
|
41
32
|
*
|
|
42
33
|
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
43
34
|
*/
|
|
44
|
-
upload(data, userQuery) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return result;
|
|
49
|
-
});
|
|
35
|
+
async upload(data, userQuery) {
|
|
36
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
37
|
+
const result = await this._fetchPost('?' + this._queryParamsToString(query), data);
|
|
38
|
+
return result;
|
|
50
39
|
}
|
|
51
40
|
/**
|
|
52
41
|
* Deletes a file from the cloud file storage.
|
|
@@ -60,12 +49,10 @@ class FileUploadingApi extends oneEntry_1.default {
|
|
|
60
49
|
*
|
|
61
50
|
* @returns Deletes a file from the cloud file storage
|
|
62
51
|
*/
|
|
63
|
-
delete(filename, userQuery) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return result;
|
|
68
|
-
});
|
|
52
|
+
async delete(filename, userQuery) {
|
|
53
|
+
const query = { ...this._defaultQuery, ...userQuery };
|
|
54
|
+
const result = await this._fetchDelete(`?filename=${filename}&` + this._queryParamsToString(query));
|
|
55
|
+
return result;
|
|
69
56
|
}
|
|
70
57
|
}
|
|
71
58
|
exports.default = FileUploadingApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileUploadingApi.js","sourceRoot":"","sources":["../../src/file-uploding/fileUploadingApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fileUploadingApi.js","sourceRoot":"","sources":["../../src/file-uploding/fileUploadingApi.ts"],"names":[],"mappings":";;AAAA,+CAAuC;AAGvC;;GAEG;AACH,MAAqB,gBAAiB,SAAQ,kBAAQ;IAClD,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QAIb,kBAAa,GAAmB;YACpC,IAAI,EAAC,IAAI;YACT,MAAM,EAAC,IAAI;YACX,EAAE,EAAC,IAAI;YACP,KAAK,EAAC,IAAI;YACV,MAAM,EAAC,IAAI;YACX,QAAQ,EAAC,IAAI;SAChB,CAAA;QAVG,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAA;IACrC,CAAC;IAWD;;;;;;;;;;;;;;OAcG;IACI,KAAK,CAAC,MAAM,CAAC,IAAU,EAAE,SAA0B;QACtD,MAAM,KAAK,GAAmB,EAAC,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,SAAS,EAAC,CAAA;QACnE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;QAElF,OAAO,MAAM,CAAA;IACjB,CAAC;IAGD;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,MAAM,CAAC,QAAe,EAAE,SAA0B;QAC3D,MAAM,KAAK,GAAmB,EAAC,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,SAAS,EAAC,CAAA;QACnE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,QAAQ,GAAG,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAA;QAEnG,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ;AAxDD,mCAwDC"}
|
package/dist/forms/formsApi.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
|
/**
|
|
@@ -23,22 +14,18 @@ class FormsApi extends oneEntry_1.default {
|
|
|
23
14
|
*
|
|
24
15
|
* @returns Returns array for all objects of type FormEntity
|
|
25
16
|
*/
|
|
26
|
-
getAllForms() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
17
|
+
async getAllForms() {
|
|
18
|
+
const result = await this._fetchGet('');
|
|
19
|
+
return result;
|
|
31
20
|
}
|
|
32
21
|
/**
|
|
33
22
|
* Get one form by form marker.
|
|
34
23
|
*
|
|
35
24
|
* @returns Returns object of type FormEntity
|
|
36
25
|
*/
|
|
37
|
-
getFormByMarker(marker) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return result;
|
|
41
|
-
});
|
|
26
|
+
async getFormByMarker(marker) {
|
|
27
|
+
const result = await this._fetchGet(`/marker/${marker}`);
|
|
28
|
+
return result;
|
|
42
29
|
}
|
|
43
30
|
}
|
|
44
31
|
exports.default = FormsApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formsApi.js","sourceRoot":"","sources":["../../src/forms/formsApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formsApi.js","sourceRoot":"","sources":["../../src/forms/formsApi.ts"],"names":[],"mappings":";;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,QAAS,SAAQ,kBAAQ;IAC1C,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAA;IACrC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,WAAW;QACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,CAAA;IACjB,CAAC;IAGD;;;;OAIG;IACI,KAAK,CAAC,eAAe,CAAC,MAAa;QACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;QACxD,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ;AA1BD,2BA0BC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ILocalizeInfos } from "../base/utils";
|
|
2
|
-
import { IAttributeSetEntity } from "../base/utils";
|
|
1
|
+
import { IAttributeValues, ILocalizeInfos } from "../base/utils";
|
|
3
2
|
/**
|
|
4
3
|
* Represents an interface object of Forms Api.
|
|
5
4
|
*
|
|
@@ -20,7 +19,7 @@ interface IForms {
|
|
|
20
19
|
* @property {string} processingType - Type of form processing.
|
|
21
20
|
* @property {ILocalizeInfos} localizeInfos - The name of the form, taking into account localization.
|
|
22
21
|
* @property {object} processingData - Form data.
|
|
23
|
-
* @property {
|
|
22
|
+
* @property {IAttributeValues} attributeValues - The attributes with values used by the object.
|
|
24
23
|
* @property {number} version - The version number of the object.
|
|
25
24
|
* @property {string} identifier - The textual identifier for the record field.
|
|
26
25
|
* @property {number} position - The position of the object.
|
|
@@ -31,7 +30,7 @@ interface IFormsEntity {
|
|
|
31
30
|
processingType: string;
|
|
32
31
|
localizeInfos: ILocalizeInfos;
|
|
33
32
|
processingData: object | string;
|
|
34
|
-
attributesValues:
|
|
33
|
+
attributesValues: IAttributeValues;
|
|
35
34
|
version: number;
|
|
36
35
|
identifier: string;
|
|
37
36
|
position: number;
|
|
@@ -8,7 +8,7 @@ export default class FormsDataApi extends OneEntry implements IFormsData {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get all forms data.
|
|
10
10
|
*
|
|
11
|
-
* @returns Returns array for all objects of
|
|
11
|
+
* @returns Returns array for all objects of FormData
|
|
12
12
|
*/
|
|
13
13
|
getFormsData(): Promise<Array<IFormsDataEntity>>;
|
|
14
14
|
/**
|
|
@@ -27,7 +27,7 @@ export default class FormsDataApi extends OneEntry implements IFormsData {
|
|
|
27
27
|
* ]
|
|
28
28
|
* }
|
|
29
29
|
*
|
|
30
|
-
* @returns - Returns created
|
|
30
|
+
* @returns - Returns created FormData objects.
|
|
31
31
|
*/
|
|
32
32
|
postFormsData(data: Array<IFormsPost>): Promise<IFormsDataEntity>;
|
|
33
33
|
/**
|
|
@@ -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
|
/**
|
|
@@ -21,13 +12,11 @@ class FormsDataApi extends oneEntry_1.default {
|
|
|
21
12
|
/**
|
|
22
13
|
* Get all forms data.
|
|
23
14
|
*
|
|
24
|
-
* @returns Returns array for all objects of
|
|
15
|
+
* @returns Returns array for all objects of FormData
|
|
25
16
|
*/
|
|
26
|
-
getFormsData() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
17
|
+
async getFormsData() {
|
|
18
|
+
const result = await this._fetchGet('');
|
|
19
|
+
return result;
|
|
31
20
|
}
|
|
32
21
|
/**
|
|
33
22
|
* Find all product page objects with pagination and multiple filtering.
|
|
@@ -45,13 +34,11 @@ class FormsDataApi extends oneEntry_1.default {
|
|
|
45
34
|
* ]
|
|
46
35
|
* }
|
|
47
36
|
*
|
|
48
|
-
* @returns - Returns created
|
|
37
|
+
* @returns - Returns created FormData objects.
|
|
49
38
|
*/
|
|
50
|
-
postFormsData(data) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return result;
|
|
54
|
-
});
|
|
39
|
+
async postFormsData(data) {
|
|
40
|
+
const result = await this._fetchPost('', data);
|
|
41
|
+
return result;
|
|
55
42
|
}
|
|
56
43
|
/**
|
|
57
44
|
* Get one object of form data by marker.
|
|
@@ -60,11 +47,9 @@ class FormsDataApi extends oneEntry_1.default {
|
|
|
60
47
|
*
|
|
61
48
|
* @returns Returns array of object FormDataEntity
|
|
62
49
|
*/
|
|
63
|
-
getFormsDataByMarker(marker) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return result;
|
|
67
|
-
});
|
|
50
|
+
async getFormsDataByMarker(marker) {
|
|
51
|
+
const result = await this._fetchGet(`/${marker}`);
|
|
52
|
+
return result;
|
|
68
53
|
}
|
|
69
54
|
}
|
|
70
55
|
exports.default = FormsDataApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formsDataApi.js","sourceRoot":"","sources":["../../src/formsData/formsDataApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formsDataApi.js","sourceRoot":"","sources":["../../src/formsData/formsDataApi.ts"],"names":[],"mappings":";;AAAA,+CAAuC;AAEvC;;GAEG;AACH,MAAqB,YAAa,SAAQ,kBAAQ;IAC9C,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,wBAAwB,CAAA;IACzC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,YAAY;QACrB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACI,KAAK,CAAC,aAAa,CAAC,IAAsB;QAC7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,EAAE,EAAC,IAAI,CAAC,CAAA;QAC7C,OAAO,MAAM,CAAA;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,oBAAoB,CAAC,MAAa;QAC3C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,CAAC,CAAA;QACjD,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ;AAlDD,+BAkDC"}
|
|
@@ -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 GeneralTypesApi extends oneEntry_1.default {
|
|
|
23
14
|
*
|
|
24
15
|
* @returns Returns all objects of type GeneralTypeEntity
|
|
25
16
|
*/
|
|
26
|
-
getAllTypes() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
17
|
+
async getAllTypes() {
|
|
18
|
+
const result = await this._fetchGet('');
|
|
19
|
+
return result;
|
|
31
20
|
}
|
|
32
21
|
}
|
|
33
22
|
exports.default = GeneralTypesApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneralTypesApi.js","sourceRoot":"","sources":["../../src/general-types/GeneralTypesApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GeneralTypesApi.js","sourceRoot":"","sources":["../../src/general-types/GeneralTypesApi.ts"],"names":[],"mappings":";;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,eAAgB,SAAQ,kBAAQ;IACjD,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,4BAA4B,CAAA;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,WAAW;QACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QACvC,OAAO,MAAM,CAAA;IACjB,CAAC;CAEJ;AAhBD,kCAgBC"}
|
|
@@ -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 LocalesApi extends oneEntry_1.default {
|
|
|
23
14
|
*
|
|
24
15
|
* @returns Returns an array of LocaleEntity objects
|
|
25
16
|
*/
|
|
26
|
-
getLocales() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
17
|
+
async getLocales() {
|
|
18
|
+
const result = await this._fetchGet('/active/all');
|
|
19
|
+
return result;
|
|
31
20
|
}
|
|
32
21
|
}
|
|
33
22
|
exports.default = LocalesApi;
|