oneentry 1.0.24 → 1.0.26
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 +508 -495
- 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 +2 -1
- package/dist/base/oneEntry.js +10 -4
- package/dist/base/oneEntry.js.map +1 -1
- package/dist/file-uploding/fileUploadingApi.d.ts +14 -28
- package/dist/file-uploding/fileUploadingApi.js +13 -27
- package/dist/file-uploding/fileUploadingApi.js.map +1 -1
- package/dist/file-uploding/fileUploadingInterfaces.d.ts +2 -10
- 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 +3 -3
- package/dist/formsData/formsDataApi.js +4 -4
- 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 +1 -1
- package/dist/index.js +14 -14
- 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 +3 -3
- 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 +5 -5
- package/dist/products/productsApi.js +7 -7
- package/dist/products/productsApi.js.map +1 -1
- package/dist/products/productsInterfaces.d.ts +2 -2
- package/dist/system/systemApi.d.ts +1 -1
- package/dist/system/systemApi.js +2 -2
- package/dist/system/systemApi.js.map +1 -1
- 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 +1 -1
|
@@ -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
|
@@ -3,8 +3,9 @@ import { LangType } from "./utils";
|
|
|
3
3
|
import { IUploadingQuery } from "../file-uploding/fileUploadingInterfaces";
|
|
4
4
|
export default abstract class OneEntry {
|
|
5
5
|
protected _url: string;
|
|
6
|
+
protected _token: string;
|
|
6
7
|
protected _LANGCODE_KEY: string;
|
|
7
|
-
constructor(url: string);
|
|
8
|
+
constructor(url: string, token?: string);
|
|
8
9
|
protected _getFullPath(path: string): string;
|
|
9
10
|
protected _fetchGet(path: string): Promise<any>;
|
|
10
11
|
protected _fetchPost(path: string, data: object): Promise<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
|
});
|
|
@@ -47,7 +52,8 @@ class OneEntry {
|
|
|
47
52
|
const response = yield fetch(this._getFullPath(path), {
|
|
48
53
|
method: 'DELETE',
|
|
49
54
|
headers: {
|
|
50
|
-
'Content-Type': 'application/json'
|
|
55
|
+
'Content-Type': 'application/json',
|
|
56
|
+
'x-app-token': this._token,
|
|
51
57
|
},
|
|
52
58
|
});
|
|
53
59
|
const result = yield response.json();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oneEntry.js","sourceRoot":"","sources":["../../src/base/oneEntry.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,MAA8B,QAAQ;
|
|
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;IAC7B,CAAC;IAEe,SAAS,CAAC,IAAW;;YACjC,M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,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;wBAC7D,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;qBAC5D;gBACL,CAAC,CAAC,CAAA;gBAEF,OAAO,QAAQ,CAAA;aAClB;QACL,CAAC;KAAA;IAES,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;AApID,2BAoIC"}
|
|
@@ -1,52 +1,38 @@
|
|
|
1
1
|
import OneEntry from '../base/oneEntry';
|
|
2
|
-
import {
|
|
2
|
+
import { IUploadingQuery, IUploadingReturns, IFileUploading } from "./fileUploadingInterfaces";
|
|
3
3
|
/**
|
|
4
4
|
* Controllers for working with file uploading
|
|
5
5
|
*/
|
|
6
6
|
export default class FileUploadingApi extends OneEntry implements IFileUploading {
|
|
7
|
-
constructor(url: string);
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
8
|
private _defaultQuery;
|
|
9
9
|
/**
|
|
10
10
|
* Upload file function.
|
|
11
11
|
*
|
|
12
|
-
* @param {
|
|
13
|
-
* @example
|
|
14
|
-
* [
|
|
15
|
-
* {
|
|
16
|
-
* "fieldname": "file",
|
|
17
|
-
* "originalname": "myFile.pdf",
|
|
18
|
-
* "mimetype": "application/pdf",
|
|
19
|
-
* "size": 234,
|
|
20
|
-
* "filename": "myFile.pdf",
|
|
21
|
-
* "path": "/myFile.pdf"
|
|
22
|
-
* }
|
|
23
|
-
* ]
|
|
12
|
+
* @param {Event} [data] Array of Express.Multer.File objects
|
|
24
13
|
*
|
|
25
14
|
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
26
|
-
* @param {string} [
|
|
27
|
-
* @param {string} [
|
|
28
|
-
* @param {number} [
|
|
29
|
-
* @param {number} [
|
|
30
|
-
* @param {number} [
|
|
31
|
-
* @param {
|
|
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
|
|
32
21
|
*
|
|
33
22
|
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
34
23
|
*/
|
|
35
|
-
upload(data:
|
|
24
|
+
upload(data: Event, userQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
36
25
|
/**
|
|
37
26
|
* Deletes a file from the cloud file storage.
|
|
38
27
|
*
|
|
39
28
|
* @param {string} [filename] File name. Example "file.png"
|
|
40
29
|
*
|
|
41
30
|
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
42
|
-
* @param {string} [
|
|
43
|
-
* @param {string} [
|
|
44
|
-
* @param {number} [
|
|
45
|
-
* @param {number} [data.width] - Width parameter. Example : 0
|
|
46
|
-
* @param {number} [data.height] - Height parameter. Example : 0
|
|
47
|
-
* @param {number} [data.compress] - Flag of optimization (compression) for images. Example : true
|
|
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
|
|
48
34
|
*
|
|
49
|
-
* @returns
|
|
35
|
+
* @returns Deletes a file from the cloud file storage
|
|
50
36
|
*/
|
|
51
37
|
delete(filename: string, userQuery?: IUploadingQuery): Promise<any>;
|
|
52
38
|
}
|
|
@@ -14,8 +14,8 @@ const oneEntry_1 = require("../base/oneEntry");
|
|
|
14
14
|
* Controllers for working with file uploading
|
|
15
15
|
*/
|
|
16
16
|
class FileUploadingApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
17
|
+
constructor(url, token) {
|
|
18
|
+
super(url, token);
|
|
19
19
|
this._defaultQuery = {
|
|
20
20
|
type: null,
|
|
21
21
|
entity: null,
|
|
@@ -29,26 +29,15 @@ class FileUploadingApi extends oneEntry_1.default {
|
|
|
29
29
|
/**
|
|
30
30
|
* Upload file function.
|
|
31
31
|
*
|
|
32
|
-
* @param {
|
|
33
|
-
* @example
|
|
34
|
-
* [
|
|
35
|
-
* {
|
|
36
|
-
* "fieldname": "file",
|
|
37
|
-
* "originalname": "myFile.pdf",
|
|
38
|
-
* "mimetype": "application/pdf",
|
|
39
|
-
* "size": 234,
|
|
40
|
-
* "filename": "myFile.pdf",
|
|
41
|
-
* "path": "/myFile.pdf"
|
|
42
|
-
* }
|
|
43
|
-
* ]
|
|
32
|
+
* @param {Event} [data] Array of Express.Multer.File objects
|
|
44
33
|
*
|
|
45
34
|
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
46
|
-
* @param {string} [
|
|
47
|
-
* @param {string} [
|
|
48
|
-
* @param {number} [
|
|
49
|
-
* @param {number} [
|
|
50
|
-
* @param {number} [
|
|
51
|
-
* @param {
|
|
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
|
|
52
41
|
*
|
|
53
42
|
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
54
43
|
*/
|
|
@@ -65,14 +54,11 @@ class FileUploadingApi extends oneEntry_1.default {
|
|
|
65
54
|
* @param {string} [filename] File name. Example "file.png"
|
|
66
55
|
*
|
|
67
56
|
* @param {IUploadingQuery} [userQuery] - Optional set query parameters.
|
|
68
|
-
* @param {string} [
|
|
69
|
-
* @param {string} [
|
|
70
|
-
* @param {number} [
|
|
71
|
-
* @param {number} [data.width] - Width parameter. Example : 0
|
|
72
|
-
* @param {number} [data.height] - Height parameter. Example : 0
|
|
73
|
-
* @param {number} [data.compress] - Flag of optimization (compression) for images. Example : true
|
|
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
|
|
74
60
|
*
|
|
75
|
-
* @returns
|
|
61
|
+
* @returns Deletes a file from the cloud file storage
|
|
76
62
|
*/
|
|
77
63
|
delete(filename, userQuery) {
|
|
78
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +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;
|
|
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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface IFileUploading {
|
|
2
|
-
upload(data:
|
|
2
|
+
upload(data: Event, userQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
3
3
|
delete(filename: string, userQuery?: IUploadingQuery): Promise<any>;
|
|
4
4
|
}
|
|
5
5
|
interface IUploadingQuery {
|
|
@@ -16,12 +16,4 @@ interface IUploadingReturns {
|
|
|
16
16
|
downloadLink: string;
|
|
17
17
|
size: number;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
fieldname: string;
|
|
21
|
-
originalname: string;
|
|
22
|
-
mimetype: string;
|
|
23
|
-
size: number;
|
|
24
|
-
filename: string;
|
|
25
|
-
path: string;
|
|
26
|
-
}
|
|
27
|
-
export { IUploadingQuery, IUploadingData, IUploadingReturns, IFileUploading };
|
|
19
|
+
export { IUploadingQuery, IUploadingReturns, IFileUploading };
|
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
|
*
|
|
@@ -20,9 +20,9 @@ export default class FormsDataApi extends OneEntry implements IFormsData {
|
|
|
20
20
|
* "formIdentifier": "my-form",
|
|
21
21
|
* "formData": [
|
|
22
22
|
* {
|
|
23
|
-
* "marker": "
|
|
23
|
+
* "marker": "name_1",
|
|
24
24
|
* "value": "Name",
|
|
25
|
-
* "langCode": "
|
|
25
|
+
* "langCode": "en_US"
|
|
26
26
|
* }
|
|
27
27
|
* ]
|
|
28
28
|
* }
|
|
@@ -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
|
/**
|
|
@@ -38,9 +38,9 @@ class FormsDataApi extends oneEntry_1.default {
|
|
|
38
38
|
* "formIdentifier": "my-form",
|
|
39
39
|
* "formData": [
|
|
40
40
|
* {
|
|
41
|
-
* "marker": "
|
|
41
|
+
* "marker": "name_1",
|
|
42
42
|
* "value": "Name",
|
|
43
|
-
* "langCode": "
|
|
43
|
+
* "langCode": "en_US"
|
|
44
44
|
* }
|
|
45
45
|
* ]
|
|
46
46
|
* }
|
|
@@ -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
|
@@ -31,5 +31,5 @@ interface IDefineApi {
|
|
|
31
31
|
* @param {string} url - URl of your project.
|
|
32
32
|
* @returns {IDefineApi} - List of methods set.
|
|
33
33
|
*/
|
|
34
|
-
export declare function defineOneEntry(url: string): IDefineApi;
|
|
34
|
+
export declare function defineOneEntry(url: string, token?: string): IDefineApi;
|
|
35
35
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -19,20 +19,20 @@ const systemApi_1 = require("./system/systemApi");
|
|
|
19
19
|
* @param {string} url - URl of your project.
|
|
20
20
|
* @returns {IDefineApi} - List of methods set.
|
|
21
21
|
*/
|
|
22
|
-
function defineOneEntry(url) {
|
|
23
|
-
const Admins = new adminsApi_1.default(url);
|
|
24
|
-
const FileUploading = new fileUploadingApi_1.default(url);
|
|
25
|
-
const Forms = new formsApi_1.default(url);
|
|
26
|
-
const FormData = new formsDataApi_1.default(url);
|
|
27
|
-
const GeneralTypes = new GeneralTypesApi_1.default(url);
|
|
28
|
-
const Locales = new localesApi_1.default(url);
|
|
29
|
-
const Menus = new menusApi_1.default(url);
|
|
30
|
-
const Pages = new pagesApi_1.default(url);
|
|
31
|
-
const Products = new productsApi_1.default(url);
|
|
32
|
-
const ProductStatuses = new productStatusesApi_1.default(url);
|
|
33
|
-
const System = new systemApi_1.default(url);
|
|
34
|
-
const Templates = new templatesApi_1.default(url);
|
|
35
|
-
const TemplatePreviews = new templatesPreviewApi_1.default(url);
|
|
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);
|
|
36
36
|
return {
|
|
37
37
|
Admins,
|
|
38
38
|
FileUploading,
|
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;AACpD,uEAAgE;AAChE,kDAA2C;AAkB3C;;;;GAIG;AACH,SAAgB,cAAc,CAAC,GAAU;
|
|
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;AACpD,uEAAgE;AAChE,kDAA2C;AAkB3C;;;;GAIG;AACH,SAAgB,cAAc,CAAC,GAAU,EAAE,KAAa;IACpD,MAAM,MAAM,GAAc,IAAI,mBAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACnD,MAAM,aAAa,GAAqB,IAAI,0BAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACxE,MAAM,KAAK,GAAa,IAAI,kBAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAChD,MAAM,QAAQ,GAAiB,IAAI,sBAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC3D,MAAM,YAAY,GAAqB,IAAI,yBAAe,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACtE,MAAM,OAAO,GAAe,IAAI,oBAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACtD,MAAM,KAAK,GAAa,IAAI,kBAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAChD,MAAM,KAAK,GAAW,IAAI,kBAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC7C,MAAM,QAAQ,GAAc,IAAI,qBAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACtD,MAAM,eAAe,GAAsB,IAAI,4BAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC7E,MAAM,MAAM,GAAc,IAAI,mBAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACnD,MAAM,SAAS,GAAiB,IAAI,sBAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC5D,MAAM,gBAAgB,GAAwB,IAAI,6BAAmB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAEjF,OAAO;QACH,MAAM;QACN,aAAa;QACb,KAAK;QACL,QAAQ;QACR,YAAY;QACZ,OAAO;QACP,KAAK;QACL,KAAK;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
|
/**
|
|
@@ -72,7 +72,7 @@ class PageApi extends oneEntry_1.default {
|
|
|
72
72
|
*/
|
|
73
73
|
getPageById(id, langCode) {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
const result = yield this._fetchRequests(
|
|
75
|
+
const result = yield this._fetchRequests(`/${id}?langCode=${this._LANGCODE_KEY}`, langCode);
|
|
76
76
|
return result;
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -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,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AED;;;;;;;;OAQG;IACU,iBAAiB,CAAC,GAAU,EAAE,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"}
|