oneentry 1.0.23 → 1.0.25
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/README.md +65 -11
- package/dist/admins/adminsApi.d.ts +1 -1
- package/dist/admins/adminsApi.js +2 -2
- package/dist/admins/adminsApi.js.map +1 -1
- package/dist/base/oneEntry.d.ts +5 -2
- package/dist/base/oneEntry.js +21 -3
- package/dist/base/oneEntry.js.map +1 -1
- package/dist/file-uploding/fileUploadingApi.d.ts +38 -0
- package/dist/file-uploding/fileUploadingApi.js +72 -0
- package/dist/file-uploding/fileUploadingApi.js.map +1 -0
- package/dist/file-uploding/fileUploadingInterfaces.d.ts +19 -0
- package/dist/file-uploding/fileUploadingInterfaces.js +3 -0
- package/dist/file-uploding/fileUploadingInterfaces.js.map +1 -0
- package/dist/forms/formsApi.d.ts +1 -1
- package/dist/forms/formsApi.js +2 -2
- package/dist/forms/formsApi.js.map +1 -1
- package/dist/formsData/formsDataApi.d.ts +1 -1
- package/dist/formsData/formsDataApi.js +2 -2
- package/dist/formsData/formsDataApi.js.map +1 -1
- package/dist/general-types/GeneralTypesApi.d.ts +1 -1
- package/dist/general-types/GeneralTypesApi.js +2 -2
- package/dist/general-types/GeneralTypesApi.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/dist/locales/localesApi.d.ts +1 -1
- package/dist/locales/localesApi.js +2 -2
- package/dist/locales/localesApi.js.map +1 -1
- package/dist/menus/menusApi.d.ts +1 -1
- package/dist/menus/menusApi.js +2 -2
- package/dist/menus/menusApi.js.map +1 -1
- package/dist/modules/modulesApi.d.ts +1 -1
- package/dist/modules/modulesApi.js +2 -2
- package/dist/modules/modulesApi.js.map +1 -1
- package/dist/pages/pagesApi.d.ts +1 -1
- package/dist/pages/pagesApi.js +2 -2
- package/dist/pages/pagesApi.js.map +1 -1
- package/dist/product-statuses/productStatusesApi.d.ts +1 -1
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/product-statuses/productStatusesApi.js.map +1 -1
- package/dist/products/productsApi.d.ts +1 -1
- package/dist/products/productsApi.js +2 -2
- package/dist/products/productsApi.js.map +1 -1
- package/dist/system/systemApi.d.ts +10 -0
- package/dist/system/systemApi.js +35 -0
- package/dist/system/systemApi.js.map +1 -0
- package/dist/system/systemInterfaces.d.ts +5 -0
- package/dist/system/systemInterfaces.js +3 -0
- package/dist/system/systemInterfaces.js.map +1 -0
- package/dist/templates/templatesApi.d.ts +1 -1
- package/dist/templates/templatesApi.js +2 -2
- package/dist/templates/templatesApi.js.map +1 -1
- package/dist/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/dist/templates-preview/templatesPreviewApi.js +2 -2
- package/dist/templates-preview/templatesPreviewApi.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ const {
|
|
|
30
30
|
Admins,
|
|
31
31
|
Forms,
|
|
32
32
|
FormData,
|
|
33
|
+
FileUploading,
|
|
33
34
|
GeneralTypes,
|
|
34
35
|
Locales,
|
|
35
36
|
Menus,
|
|
@@ -38,15 +39,17 @@ const {
|
|
|
38
39
|
ProductStatuses,
|
|
39
40
|
Templates,
|
|
40
41
|
TemplatePreviews
|
|
41
|
-
} = defineOneEntry('your-url')
|
|
42
|
+
} = defineOneEntry('your-url', 'your-token')
|
|
42
43
|
```
|
|
43
44
|
>
|
|
44
45
|
>Or
|
|
45
46
|
>
|
|
46
47
|
```
|
|
47
|
-
const api = defineOneEntry('your-url')
|
|
48
|
+
const api = defineOneEntry('your-url', 'your-token')
|
|
48
49
|
```
|
|
49
50
|
|
|
51
|
+
>Pass your token to the function as a parameter to establish a secure connection.
|
|
52
|
+
|
|
50
53
|
## Admins
|
|
51
54
|
|
|
52
55
|
```
|
|
@@ -85,6 +88,52 @@ Example return:
|
|
|
85
88
|
]
|
|
86
89
|
```
|
|
87
90
|
|
|
91
|
+
## FileUploading
|
|
92
|
+
|
|
93
|
+
const { FileUploading } = defineOneEntry('your-url');
|
|
94
|
+
|
|
95
|
+
### upload
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
const query = {
|
|
99
|
+
type:"page",
|
|
100
|
+
entity:"editor",
|
|
101
|
+
id:3787,
|
|
102
|
+
width:0,
|
|
103
|
+
height:0,
|
|
104
|
+
compress:true,
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const value = await FileUploading.upload(data, query)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
> This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file".
|
|
111
|
+
|
|
112
|
+
Example return:
|
|
113
|
+
```
|
|
114
|
+
{
|
|
115
|
+
"filename": "string",
|
|
116
|
+
"downloadLink": "string",
|
|
117
|
+
"size": 0
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### delete
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
const query = {
|
|
125
|
+
type:"page",
|
|
126
|
+
entity:"editor",
|
|
127
|
+
id:3787
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
const value = await FileUploading.delete("file.png", query)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
> This void method delete a file from the cloud file storage.
|
|
135
|
+
|
|
136
|
+
|
|
88
137
|
## Forms
|
|
89
138
|
|
|
90
139
|
const { Forms } = defineOneEntry('your-url');
|
|
@@ -187,14 +236,19 @@ const value = await FormData.postFormsData(data)
|
|
|
187
236
|
Example body:
|
|
188
237
|
```
|
|
189
238
|
{
|
|
190
|
-
"formIdentifier": "
|
|
191
|
-
"formData":
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
239
|
+
"formIdentifier": "feedback",
|
|
240
|
+
"formData": {
|
|
241
|
+
"en_US": [
|
|
242
|
+
{
|
|
243
|
+
"marker": "name",
|
|
244
|
+
"value": "alex"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"marker": "phone",
|
|
248
|
+
"value": "111"
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
198
252
|
}
|
|
199
253
|
```
|
|
200
254
|
|
|
@@ -1453,7 +1507,7 @@ Example return:
|
|
|
1453
1507
|
### getTemplateByType
|
|
1454
1508
|
|
|
1455
1509
|
```
|
|
1456
|
-
const value = await Templates.
|
|
1510
|
+
const value = await Templates.getTemplateByType('forCatalogProducts')
|
|
1457
1511
|
```
|
|
1458
1512
|
|
|
1459
1513
|
> This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a template object.
|
|
@@ -4,7 +4,7 @@ import { IAdminEntity, IAdmins } from "./adminsInterfaces";
|
|
|
4
4
|
* Controllers for working with users - admins
|
|
5
5
|
*/
|
|
6
6
|
export default class AdminsApi extends OneEntry implements IAdmins {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Get all user objects - admins.
|
|
10
10
|
*
|
package/dist/admins/adminsApi.js
CHANGED
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with users - admins
|
|
15
15
|
*/
|
|
16
16
|
class AdminsApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/admins';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,aAAa;;YACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAfD,4BAeC"}
|
package/dist/base/oneEntry.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { IProductsQuery } from '../products/productsInterfaces';
|
|
2
2
|
import { LangType } from "./utils";
|
|
3
|
+
import { IUploadingQuery } from "../file-uploding/fileUploadingInterfaces";
|
|
3
4
|
export default abstract class OneEntry {
|
|
4
5
|
protected _url: string;
|
|
6
|
+
protected _token: string;
|
|
5
7
|
protected _LANGCODE_KEY: string;
|
|
6
|
-
constructor(url: string);
|
|
8
|
+
constructor(url: string, token?: string);
|
|
7
9
|
protected _getFullPath(path: string): string;
|
|
8
10
|
protected _fetchGet(path: string): Promise<any>;
|
|
9
11
|
protected _fetchPost(path: string, data: object): Promise<any>;
|
|
10
|
-
protected
|
|
12
|
+
protected _fetchDelete(path: string): Promise<any>;
|
|
13
|
+
protected _queryParamsToString(query: IProductsQuery | IUploadingQuery): string;
|
|
11
14
|
protected _parseLangFromString(str: string, lang: string): string;
|
|
12
15
|
protected _fetchRequests(url: string, lang: LangType): Promise<any>;
|
|
13
16
|
protected _normalizeData(data: any): any;
|
package/dist/base/oneEntry.js
CHANGED
|
@@ -10,9 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
class OneEntry {
|
|
13
|
-
constructor(url) {
|
|
13
|
+
constructor(url, token) {
|
|
14
14
|
this._LANGCODE_KEY = '$LANGCODE';
|
|
15
15
|
this._url = url;
|
|
16
|
+
if (token) {
|
|
17
|
+
this._token = token;
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
_getFullPath(path) {
|
|
18
21
|
return (this._url + path);
|
|
@@ -22,7 +25,8 @@ class OneEntry {
|
|
|
22
25
|
const response = yield fetch(this._getFullPath(path), {
|
|
23
26
|
method: 'GET',
|
|
24
27
|
headers: {
|
|
25
|
-
'Content-Type': 'application/json'
|
|
28
|
+
'Content-Type': 'application/json',
|
|
29
|
+
'x-app-token': this._token,
|
|
26
30
|
}
|
|
27
31
|
});
|
|
28
32
|
const result = yield response.json();
|
|
@@ -34,7 +38,8 @@ class OneEntry {
|
|
|
34
38
|
const response = yield fetch(this._getFullPath(path), {
|
|
35
39
|
method: 'POST',
|
|
36
40
|
headers: {
|
|
37
|
-
'Content-Type': 'application/json'
|
|
41
|
+
'Content-Type': 'application/json',
|
|
42
|
+
'x-app-token': this._token,
|
|
38
43
|
},
|
|
39
44
|
body: JSON.stringify(data)
|
|
40
45
|
});
|
|
@@ -42,6 +47,19 @@ class OneEntry {
|
|
|
42
47
|
return result;
|
|
43
48
|
});
|
|
44
49
|
}
|
|
50
|
+
_fetchDelete(path) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const response = yield fetch(this._getFullPath(path), {
|
|
53
|
+
method: 'DELETE',
|
|
54
|
+
headers: {
|
|
55
|
+
'Content-Type': 'application/json',
|
|
56
|
+
'x-app-token': this._token,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
const result = yield response.json();
|
|
60
|
+
return result;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
45
63
|
_queryParamsToString(query) {
|
|
46
64
|
let result = '';
|
|
47
65
|
for (let key in query) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oneEntry.js","sourceRoot":"","sources":["../../src/base/oneEntry.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AAA;SAC3D;QACD,OAAO,aAAa,CAAA;IACxB,CAAC;CACJ;AApID,2BAoIC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import OneEntry from '../base/oneEntry';
|
|
2
|
+
import { IUploadingQuery, IUploadingReturns, IFileUploading } from "./fileUploadingInterfaces";
|
|
3
|
+
/**
|
|
4
|
+
* Controllers for working with file uploading
|
|
5
|
+
*/
|
|
6
|
+
export default class FileUploadingApi extends OneEntry implements IFileUploading {
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
|
+
private _defaultQuery;
|
|
9
|
+
/**
|
|
10
|
+
* Upload file function.
|
|
11
|
+
*
|
|
12
|
+
* @param {Event} [data] Array of Express.Multer.File objects
|
|
13
|
+
*
|
|
14
|
+
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
15
|
+
* @param {string} [userQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
16
|
+
* @param {string} [userQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
17
|
+
* @param {number} [userQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
18
|
+
* @param {number} [userQuery.width] - Width parameter. Example : 0
|
|
19
|
+
* @param {number} [userQuery.height] - Height parameter. Example : 0
|
|
20
|
+
* @param {boolean} [userQuery.compress] - Flag of optimization (compression) for images. Example : true
|
|
21
|
+
*
|
|
22
|
+
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
23
|
+
*/
|
|
24
|
+
upload(data: Event, userQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
25
|
+
/**
|
|
26
|
+
* Deletes a file from the cloud file storage.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} [filename] File name. Example "file.png"
|
|
29
|
+
*
|
|
30
|
+
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
31
|
+
* @param {string} [userQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
32
|
+
* @param {string} [userQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
33
|
+
* @param {number} [userQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
34
|
+
*
|
|
35
|
+
* @returns Deletes a file from the cloud file storage
|
|
36
|
+
*/
|
|
37
|
+
delete(filename: string, userQuery?: IUploadingQuery): Promise<any>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const oneEntry_1 = require("../base/oneEntry");
|
|
13
|
+
/**
|
|
14
|
+
* Controllers for working with file uploading
|
|
15
|
+
*/
|
|
16
|
+
class FileUploadingApi extends oneEntry_1.default {
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
|
+
this._defaultQuery = {
|
|
20
|
+
type: null,
|
|
21
|
+
entity: null,
|
|
22
|
+
id: null,
|
|
23
|
+
width: null,
|
|
24
|
+
height: null,
|
|
25
|
+
compress: null,
|
|
26
|
+
};
|
|
27
|
+
this._url += '/api/content/files';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Upload file function.
|
|
31
|
+
*
|
|
32
|
+
* @param {Event} [data] Array of Express.Multer.File objects
|
|
33
|
+
*
|
|
34
|
+
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
35
|
+
* @param {string} [userQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
36
|
+
* @param {string} [userQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
37
|
+
* @param {number} [userQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
38
|
+
* @param {number} [userQuery.width] - Width parameter. Example : 0
|
|
39
|
+
* @param {number} [userQuery.height] - Height parameter. Example : 0
|
|
40
|
+
* @param {boolean} [userQuery.compress] - Flag of optimization (compression) for images. Example : true
|
|
41
|
+
*
|
|
42
|
+
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
43
|
+
*/
|
|
44
|
+
upload(data, userQuery) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const query = Object.assign(Object.assign({}, this._defaultQuery), userQuery);
|
|
47
|
+
const result = yield this._fetchPost('?' + this._queryParamsToString(query), data);
|
|
48
|
+
return result;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Deletes a file from the cloud file storage.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} [filename] File name. Example "file.png"
|
|
55
|
+
*
|
|
56
|
+
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
57
|
+
* @param {string} [userQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
58
|
+
* @param {string} [userQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
59
|
+
* @param {number} [userQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
60
|
+
*
|
|
61
|
+
* @returns Deletes a file from the cloud file storage
|
|
62
|
+
*/
|
|
63
|
+
delete(filename, userQuery) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const query = Object.assign(Object.assign({}, this._defaultQuery), userQuery);
|
|
66
|
+
const result = yield this._fetchDelete(`?filename=${filename}&` + this._queryParamsToString(query));
|
|
67
|
+
return result;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.default = FileUploadingApi;
|
|
72
|
+
//# sourceMappingURL=fileUploadingApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;IACU,MAAM,CAAC,IAAU,EAAE,SAA0B;;YACtD,MAAM,KAAK,mCAAuB,IAAI,CAAC,aAAa,GAAK,SAAS,CAAC,CAAA;YACnE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;YAElF,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAGD;;;;;;;;;;;OAWG;IACU,MAAM,CAAC,QAAe,EAAE,SAA0B;;YAC3D,MAAM,KAAK,mCAAuB,IAAI,CAAC,aAAa,GAAK,SAAS,CAAC,CAAA;YACnE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,QAAQ,GAAG,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAA;YAEnG,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAxDD,mCAwDC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface IFileUploading {
|
|
2
|
+
upload(data: Event, userQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
3
|
+
delete(filename: string, userQuery?: IUploadingQuery): Promise<any>;
|
|
4
|
+
}
|
|
5
|
+
interface IUploadingQuery {
|
|
6
|
+
type?: string | null;
|
|
7
|
+
entity?: string | null;
|
|
8
|
+
id?: number | null;
|
|
9
|
+
width?: number | null;
|
|
10
|
+
height?: string | null;
|
|
11
|
+
compress?: boolean | null;
|
|
12
|
+
[key: string]: string | number | boolean | null;
|
|
13
|
+
}
|
|
14
|
+
interface IUploadingReturns {
|
|
15
|
+
filename: string;
|
|
16
|
+
downloadLink: string;
|
|
17
|
+
size: number;
|
|
18
|
+
}
|
|
19
|
+
export { IUploadingQuery, IUploadingReturns, IFileUploading };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileUploadingInterfaces.js","sourceRoot":"","sources":["../../src/file-uploding/fileUploadingInterfaces.ts"],"names":[],"mappings":""}
|
package/dist/forms/formsApi.d.ts
CHANGED
package/dist/forms/formsApi.js
CHANGED
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for forms objects
|
|
15
15
|
*/
|
|
16
16
|
class FormsApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/forms';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,WAAW;;YACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAGD;;;;OAIG;IACU,eAAe,CAAC,MAAa;;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;YACxD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AA1BD,2BA0BC"}
|
|
@@ -4,7 +4,7 @@ import { IFormsPost, IFormsData, IFormsDataEntity } from './formsDataInterfaces'
|
|
|
4
4
|
* Controllers for working with form data
|
|
5
5
|
*/
|
|
6
6
|
export default class FormsDataApi extends OneEntry implements IFormsData {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Get all forms data.
|
|
10
10
|
*
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with form data
|
|
15
15
|
*/
|
|
16
16
|
class FormsDataApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/form-data';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,YAAY;;YACrB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;OAiBG;IACU,aAAa,CAAC,IAAsB;;YAC7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,EAAE,EAAC,IAAI,CAAC,CAAA;YAC7C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,oBAAoB,CAAC,MAAa;;YAC3C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,CAAC,CAAA;YACjD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAlDD,+BAkDC"}
|
|
@@ -4,7 +4,7 @@ import { IGeneralTypes, IGeneralTypesEntity } from "./generalTypesInterfaces";
|
|
|
4
4
|
* Controllers for working with types
|
|
5
5
|
*/
|
|
6
6
|
export default class GeneralTypesApi extends OneEntry implements IGeneralTypes {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Get all types.
|
|
10
10
|
*
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with types
|
|
15
15
|
*/
|
|
16
16
|
class GeneralTypesApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/general-types';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,WAAW;;YACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AAhBD,kCAgBC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,11 @@ import LocalesApi from "./locales/localesApi";
|
|
|
9
9
|
import MenusApi from "./menus/menusApi";
|
|
10
10
|
import FormsApi from "./forms/formsApi";
|
|
11
11
|
import FormsDataApi from "./formsData/formsDataApi";
|
|
12
|
+
import FileUploadingApi from "./file-uploding/fileUploadingApi";
|
|
13
|
+
import SystemApi from "./system/systemApi";
|
|
12
14
|
interface IDefineApi {
|
|
13
15
|
Admins: AdminsApi;
|
|
16
|
+
FileUploading: FileUploadingApi;
|
|
14
17
|
Forms: FormsApi;
|
|
15
18
|
FormData: FormsDataApi;
|
|
16
19
|
GeneralTypes: GeneralTypesApi;
|
|
@@ -19,6 +22,7 @@ interface IDefineApi {
|
|
|
19
22
|
Pages: PageApi;
|
|
20
23
|
Products: ProductApi;
|
|
21
24
|
ProductStatuses: ProductStatusesApi;
|
|
25
|
+
System: SystemApi;
|
|
22
26
|
Templates: TemplatesApi;
|
|
23
27
|
TemplatePreviews: TemplatesPreviewApi;
|
|
24
28
|
}
|
|
@@ -27,5 +31,5 @@ interface IDefineApi {
|
|
|
27
31
|
* @param {string} url - URl of your project.
|
|
28
32
|
* @returns {IDefineApi} - List of methods set.
|
|
29
33
|
*/
|
|
30
|
-
export declare function defineOneEntry(url: string): IDefineApi;
|
|
34
|
+
export declare function defineOneEntry(url: string, token?: string): IDefineApi;
|
|
31
35
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -12,25 +12,30 @@ const localesApi_1 = require("./locales/localesApi");
|
|
|
12
12
|
const menusApi_1 = require("./menus/menusApi");
|
|
13
13
|
const formsApi_1 = require("./forms/formsApi");
|
|
14
14
|
const formsDataApi_1 = require("./formsData/formsDataApi");
|
|
15
|
+
const fileUploadingApi_1 = require("./file-uploding/fileUploadingApi");
|
|
16
|
+
const systemApi_1 = require("./system/systemApi");
|
|
15
17
|
/**
|
|
16
18
|
* Define API.
|
|
17
19
|
* @param {string} url - URl of your project.
|
|
18
20
|
* @returns {IDefineApi} - List of methods set.
|
|
19
21
|
*/
|
|
20
|
-
function defineOneEntry(url) {
|
|
21
|
-
const Admins = new adminsApi_1.default(url);
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
22
|
+
function defineOneEntry(url, token) {
|
|
23
|
+
const Admins = new adminsApi_1.default(url, token);
|
|
24
|
+
const FileUploading = new fileUploadingApi_1.default(url, token);
|
|
25
|
+
const Forms = new formsApi_1.default(url, token);
|
|
26
|
+
const FormData = new formsDataApi_1.default(url, token);
|
|
27
|
+
const GeneralTypes = new GeneralTypesApi_1.default(url, token);
|
|
28
|
+
const Locales = new localesApi_1.default(url, token);
|
|
29
|
+
const Menus = new menusApi_1.default(url, token);
|
|
30
|
+
const Pages = new pagesApi_1.default(url, token);
|
|
31
|
+
const Products = new productsApi_1.default(url, token);
|
|
32
|
+
const ProductStatuses = new productStatusesApi_1.default(url, token);
|
|
33
|
+
const System = new systemApi_1.default(url, token);
|
|
34
|
+
const Templates = new templatesApi_1.default(url, token);
|
|
35
|
+
const TemplatePreviews = new templatesPreviewApi_1.default(url, token);
|
|
32
36
|
return {
|
|
33
37
|
Admins,
|
|
38
|
+
FileUploading,
|
|
34
39
|
Forms,
|
|
35
40
|
FormData,
|
|
36
41
|
GeneralTypes,
|
|
@@ -39,6 +44,7 @@ function defineOneEntry(url) {
|
|
|
39
44
|
Pages,
|
|
40
45
|
Products,
|
|
41
46
|
ProductStatuses,
|
|
47
|
+
System,
|
|
42
48
|
Templates,
|
|
43
49
|
TemplatePreviews
|
|
44
50
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA+C;AAC/C,+CAAuC;AACvC,8EAAuE;AACvE,2DAAoD;AACpD,iFAA0E;AAC1E,kDAA0C;AAC1C,qEAA6D;AAC7D,qDAA6C;AAC7C,+CAAwC;AACxC,+CAAwC;AACxC,2DAAoD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA+C;AAC/C,+CAAuC;AACvC,8EAAuE;AACvE,2DAAoD;AACpD,iFAA0E;AAC1E,kDAA0C;AAC1C,qEAA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QACL,QAAQ;QACR,eAAe;QACf,MAAM;QACN,SAAS;QACT,gBAAgB;KACnB,CAAA;AACL,CAAC;AA9BD,wCA8BC"}
|
|
@@ -4,7 +4,7 @@ import { ILocales, ILocalEntity } from "./localesInterfaces";
|
|
|
4
4
|
* Controllers for working with localizations (content language)
|
|
5
5
|
*/
|
|
6
6
|
export default class LocalesApi extends OneEntry implements ILocales {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Find all active language localization objects.
|
|
10
10
|
*
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with localizations (content language)
|
|
15
15
|
*/
|
|
16
16
|
class LocalesApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/locales';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localesApi.js","sourceRoot":"","sources":["../../src/locales/localesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,UAAW,SAAQ,kBAAQ;IAC5C,YAAY,GAAW;
|
|
1
|
+
{"version":3,"file":"localesApi.js","sourceRoot":"","sources":["../../src/locales/localesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,UAAW,SAAQ,kBAAQ;IAC5C,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,sBAAsB,CAAA;IACvC,CAAC;IAED;;;;OAIG;IACU,UAAU;;YACnB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;YAClD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AAhBD,6BAgBC"}
|
package/dist/menus/menusApi.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { IMenus, IMenusEntity } from "./menusInterfaces";
|
|
|
4
4
|
* Controllers for working with menu objects
|
|
5
5
|
*/
|
|
6
6
|
export default class MenusApi extends OneEntry implements IMenus {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Get pages includes in menu by marker.
|
|
10
10
|
*
|
package/dist/menus/menusApi.js
CHANGED
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with menu objects
|
|
15
15
|
*/
|
|
16
16
|
class MenusApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/menus';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,gBAAgB,CAAC,MAAa;;YACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;YACxD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AAlBD,2BAkBC"}
|
|
@@ -4,7 +4,7 @@ import { IModules, IModulesEntity } from "./modulesInterfaces";
|
|
|
4
4
|
* Controllers for working with application modules
|
|
5
5
|
*/
|
|
6
6
|
export default class ModulesApi extends OneEntry implements IModules {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Get all modules.
|
|
10
10
|
*
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with application modules
|
|
15
15
|
*/
|
|
16
16
|
class ModulesApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/modules';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modulesApi.js","sourceRoot":"","sources":["../../src/modules/modulesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,UAAW,SAAQ,kBAAQ;IAC5C,YAAY,GAAW;
|
|
1
|
+
{"version":3,"file":"modulesApi.js","sourceRoot":"","sources":["../../src/modules/modulesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,UAAW,SAAQ,kBAAQ;IAC5C,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,sBAAsB,CAAA;IACvC,CAAC;IAED;;;;OAIG;IACU,aAAa;;YACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AAhBD,6BAgBC"}
|
package/dist/pages/pagesApi.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { LangType } from "../base/utils";
|
|
|
5
5
|
* Controllers for working with page objects, including catalog pages
|
|
6
6
|
*/
|
|
7
7
|
export default class PageApi extends OneEntry implements IPageApi {
|
|
8
|
-
constructor(url: string);
|
|
8
|
+
constructor(url: string, token: string);
|
|
9
9
|
/**
|
|
10
10
|
* Get all top-level page objects.
|
|
11
11
|
*
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with page objects, including catalog pages
|
|
15
15
|
*/
|
|
16
16
|
class PageApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/pages';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,YAAY,CAAC,QAAiB;;YACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,kBAAkB,IAAI,CAAC,aAAa,EAAE,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AAE,QAAiB;;YACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,GAAG,mBAAmB,IAAI,CAAC,aAAa,EAAE,EAAC,QAAQ,CAAC,CAAA;YAEjG,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,kBAAkB,CAAC,GAAU;;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAA;YACrD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;OAQG;IACU,UAAU,CAAC,IAAW,EAAE,QAAe;;YAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,sBAAsB,QAAQ,SAAS,IAAI,EAAE,CAAC,CAAA;YAClF,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AAtID,0BAsIC"}
|
|
@@ -4,7 +4,7 @@ import { IProductStatusEntity, IProductStatuses } from "./productStatusesInterfa
|
|
|
4
4
|
* Controllers for working with product statuses
|
|
5
5
|
*/
|
|
6
6
|
export default class ProductStatusesApi extends OneEntry implements IProductStatuses {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Search for all product status objects.
|
|
10
10
|
*
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with product statuses
|
|
15
15
|
*/
|
|
16
16
|
class ProductStatusesApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/product-statuses';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,kBAAkB;;YAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,sBAAsB,CAAC,EAAS;;YACzC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAC7C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,yBAAyB,CAAC,MAAa;;YAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;YACxD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,cAAc,CAAC,MAAa;;YACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,sBAAsB,MAAM,EAAE,CAAC,CAAA;YACnE,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAnDD,qCAmDC"}
|
|
@@ -5,7 +5,7 @@ import { LangType } from "../base/utils";
|
|
|
5
5
|
* Controllers for working with product pages
|
|
6
6
|
*/
|
|
7
7
|
export default class ProductApi extends OneEntry implements IProductApi {
|
|
8
|
-
constructor(url: string);
|
|
8
|
+
constructor(url: string, token: string);
|
|
9
9
|
private _defaultQuery;
|
|
10
10
|
/**
|
|
11
11
|
* Search for all product page objects with pagination and filtering.
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with product pages
|
|
15
15
|
*/
|
|
16
16
|
class ProductApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._defaultQuery = {
|
|
20
20
|
offset: 0,
|
|
21
21
|
limit: 30,
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACU,WAAW,CAAC,WAAoB,OAAO,EAAE,SAA0B;;YAC5E,MAAM,KAAK,mCAAsB,IAAI,CAAC,aAAa,GAAK,SAAS,CAAC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AM,OAAO,CAAC,GAAG,CACb,cAAc,CAAC,GAAG,CAAC,CAAO,OAAsB,EAAE,EAAE;gBAChD,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;oBAClD,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;gBAC7B,CAAC,CAAC,CAAA;YACN,CAAC,CAAA,CAAC,CACL,CAAA;YACD,OAAO,YAAY,CAAA;QACvB,CAAC;KAAA;CACJ;AAxPD,6BAwPC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import OneEntry from "../base/oneEntry";
|
|
2
|
+
import { ISystem } from "./systemInterfaces";
|
|
3
|
+
/**
|
|
4
|
+
* Controllers for working with system - system
|
|
5
|
+
*/
|
|
6
|
+
export default class SystemApi extends OneEntry implements ISystem {
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
|
+
test404(): Promise<any>;
|
|
9
|
+
test500(): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const oneEntry_1 = require("../base/oneEntry");
|
|
13
|
+
/**
|
|
14
|
+
* Controllers for working with system - system
|
|
15
|
+
*/
|
|
16
|
+
class SystemApi extends oneEntry_1.default {
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
|
+
this._url += '/api/content/system';
|
|
20
|
+
}
|
|
21
|
+
test404() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const result = yield this._fetchGet('/test404');
|
|
24
|
+
return result;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
test500() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const result = yield this._fetchGet('/test500');
|
|
30
|
+
return result;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = SystemApi;
|
|
35
|
+
//# sourceMappingURL=systemApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;IAEY,OAAO;;YAChB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;YAC/C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAEY,OAAO;;YAChB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;YAC/C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAfD,4BAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemInterfaces.js","sourceRoot":"","sources":["../../src/system/systemInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -5,7 +5,7 @@ import { Types } from "../base/utils";
|
|
|
5
5
|
* Controllers for working with template objects
|
|
6
6
|
*/
|
|
7
7
|
export default class TemplatesPreviewApi extends OneEntry implements ITemplatesApi {
|
|
8
|
-
constructor(url: string);
|
|
8
|
+
constructor(url: string, token: string);
|
|
9
9
|
/**
|
|
10
10
|
* Get all template objects grouped by types.
|
|
11
11
|
*
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with template objects
|
|
15
15
|
*/
|
|
16
16
|
class TemplatesPreviewApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/templates';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templatesApi.js","sourceRoot":"","sources":["../../src/templates/templatesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAuC;AAIvC;;GAEG;AACH,MAAqB,mBAAoB,SAAQ,kBAAQ;IACrD,YAAY,GAAW;
|
|
1
|
+
{"version":3,"file":"templatesApi.js","sourceRoot":"","sources":["../../src/templates/templatesApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAuC;AAIvC;;GAEG;AACH,MAAqB,mBAAoB,SAAQ,kBAAQ;IACrD,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,wBAAwB,CAAA;IACzC,CAAC;IAED;;;;OAIG;IACU,eAAe;;YACxB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;YAC3C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,iBAAiB,CAAC,IAAU;;YACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,EAAE,CAAC,CAAA;YACpD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ;AA5BD,sCA4BC"}
|
|
@@ -4,7 +4,7 @@ import { ITemplatesPreview, ITemplatesPreviewEntity } from "./templatesPreviewIn
|
|
|
4
4
|
* Controllers for working with template objects for preview
|
|
5
5
|
*/
|
|
6
6
|
export default class PageApi extends OneEntry implements ITemplatesPreview {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
/**
|
|
9
9
|
* Get all template objects.
|
|
10
10
|
*
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with template objects for preview
|
|
15
15
|
*/
|
|
16
16
|
class PageApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._url += '/api/content/template-previews';
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templatesPreviewApi.js","sourceRoot":"","sources":["../../src/templates-preview/templatesPreviewApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,OAAQ,SAAQ,kBAAQ;IACzC,YAAY,GAAW;
|
|
1
|
+
{"version":3,"file":"templatesPreviewApi.js","sourceRoot":"","sources":["../../src/templates-preview/templatesPreviewApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,OAAQ,SAAQ,kBAAQ;IACzC,YAAY,GAAW,EAAE,KAAY;QACjC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,IAAI,gCAAgC,CAAA;IACjD,CAAC;IAED;;;;OAIG;IACU,mBAAmB;;YAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,uBAAuB,CAAC,EAAS;;YAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAC7C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,2BAA2B,CAAC,MAAa;;YAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;YACxD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAvCD,0BAuCC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oneentry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"/dist"
|
|
9
9
|
],
|
|
10
|
+
|
|
10
11
|
"author": "ONEENTRY PORTAL CO.",
|
|
11
12
|
"license": "ISC",
|
|
12
13
|
"dependencies": {
|
|
13
14
|
"jsdoc": "^4.0.2",
|
|
14
15
|
"typescript": "^5.2.2"
|
|
15
16
|
}
|
|
16
|
-
}
|
|
17
|
+
}
|