oneentry 1.0.28 → 1.0.30
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 +291 -212
- package/dist/admins/adminsApi.d.ts +5 -1
- package/dist/admins/adminsApi.js +6 -3
- package/dist/admins/adminsInterfaces.d.ts +3 -3
- package/dist/admins/adminsInterfaces.js +0 -1
- package/dist/base/oneEntry.js +0 -1
- package/dist/base/utils.d.ts +15 -1
- package/dist/base/utils.js +0 -1
- package/dist/blocks/blocksApi.d.ts +27 -0
- package/dist/blocks/blocksApi.js +38 -0
- package/dist/blocks/blocksInterfaces.d.ts +38 -0
- package/dist/blocks/blocksInterfaces.js +2 -0
- package/dist/file-uploding/fileUploadingApi.d.ts +26 -14
- package/dist/file-uploding/fileUploadingApi.js +30 -16
- package/dist/file-uploding/fileUploadingInterfaces.d.ts +29 -3
- package/dist/file-uploding/fileUploadingInterfaces.js +0 -1
- package/dist/forms/formsApi.d.ts +9 -2
- package/dist/forms/formsApi.js +11 -5
- package/dist/forms/formsInterfaces.d.ts +9 -9
- package/dist/forms/formsInterfaces.js +0 -1
- package/dist/formsData/formsDataApi.d.ts +9 -2
- package/dist/formsData/formsDataApi.js +11 -5
- package/dist/formsData/formsDataInterfaces.d.ts +4 -2
- package/dist/formsData/formsDataInterfaces.js +0 -1
- package/dist/general-types/GeneralTypesApi.js +0 -1
- package/dist/general-types/generalTypesInterfaces.js +0 -1
- package/dist/index.js +0 -1
- package/dist/locales/localesApi.js +0 -1
- package/dist/locales/localesInterfaces.js +0 -1
- package/dist/menus/menusApi.js +0 -1
- package/dist/menus/menusInterfaces.js +0 -1
- package/dist/pages/pagesApi.js +0 -1
- package/dist/pages/pagesInterfaces.d.ts +16 -26
- package/dist/pages/pagesInterfaces.js +0 -1
- package/dist/product-statuses/productStatusesApi.js +0 -1
- package/dist/product-statuses/productStatusesInterfaces.js +0 -1
- package/dist/products/productsApi.js +0 -1
- package/dist/products/productsInterfaces.d.ts +0 -6
- package/dist/products/productsInterfaces.js +0 -1
- package/dist/system/systemApi.js +0 -1
- package/dist/system/systemInterfaces.js +0 -1
- package/dist/templates/templatesApi.js +0 -1
- package/dist/templates/templatesInterfaces.d.ts +5 -2
- package/dist/templates/templatesInterfaces.js +0 -1
- package/dist/templates-preview/templatesPreviewApi.js +0 -1
- package/dist/templates-preview/templatesPreviewInterfaces.js +0 -1
- package/package.json +1 -1
|
@@ -8,7 +8,11 @@ export default class AdminsApi extends OneEntry implements IAdmins {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get all user objects - admins.
|
|
10
10
|
*
|
|
11
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
12
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
13
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
14
|
+
*
|
|
11
15
|
* @returns Returns all AdminEntity user objects
|
|
12
16
|
*/
|
|
13
|
-
getAdminsInfo(): Promise<Array<IAdminEntity>>;
|
|
17
|
+
getAdminsInfo(langCode?: string, offset?: number, limit?: number): Promise<Array<IAdminEntity>>;
|
|
14
18
|
}
|
package/dist/admins/adminsApi.js
CHANGED
|
@@ -12,12 +12,15 @@ class AdminsApi extends oneEntry_1.default {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get all user objects - admins.
|
|
14
14
|
*
|
|
15
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
16
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
17
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
18
|
+
*
|
|
15
19
|
* @returns Returns all AdminEntity user objects
|
|
16
20
|
*/
|
|
17
|
-
async getAdminsInfo() {
|
|
18
|
-
const result = await this._fetchGet(
|
|
21
|
+
async getAdminsInfo(langCode = 'en_US', offset = 0, limit = 30) {
|
|
22
|
+
const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
19
23
|
return result;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
exports.default = AdminsApi;
|
|
23
|
-
//# sourceMappingURL=adminsApi.js.map
|
|
@@ -5,7 +5,7 @@ import { IAttributeValues } from "../base/utils";
|
|
|
5
5
|
* @property {function} getAdminsInfo - Get all user objects - admins.
|
|
6
6
|
*/
|
|
7
7
|
interface IAdmins {
|
|
8
|
-
getAdminsInfo(): Promise<Array<IAdminEntity>>;
|
|
8
|
+
getAdminsInfo(langCode: string, offset?: number, limit?: number): Promise<Array<IAdminEntity>>;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Represents a position object.
|
|
@@ -38,11 +38,11 @@ interface IPosition {
|
|
|
38
38
|
* @property {number} position - The position of the object.
|
|
39
39
|
*/
|
|
40
40
|
interface IAdminEntity {
|
|
41
|
+
attributeSetId: number | null;
|
|
42
|
+
attributeValues: IAttributeValues;
|
|
41
43
|
id: number;
|
|
42
44
|
identifier: string;
|
|
43
|
-
attributeSetId: number | null;
|
|
44
45
|
isSync: boolean;
|
|
45
|
-
attributeValues: IAttributeValues;
|
|
46
46
|
position: number;
|
|
47
47
|
}
|
|
48
48
|
export { IAdmins, IAdminEntity, IPosition };
|
package/dist/base/oneEntry.js
CHANGED
package/dist/base/utils.d.ts
CHANGED
|
@@ -19,6 +19,20 @@ declare enum Types {
|
|
|
19
19
|
forSlider = "forSlider",
|
|
20
20
|
service = "service"
|
|
21
21
|
}
|
|
22
|
+
interface IAttributes {
|
|
23
|
+
listTitles: Array<{
|
|
24
|
+
title: string;
|
|
25
|
+
value: number | string | null;
|
|
26
|
+
position: number;
|
|
27
|
+
extendedValue: number | string | null;
|
|
28
|
+
extendedValueType: number | string | null;
|
|
29
|
+
}>;
|
|
30
|
+
localizeInfos: ILocalizeInfo;
|
|
31
|
+
marker: string;
|
|
32
|
+
position: number;
|
|
33
|
+
type: string;
|
|
34
|
+
validators: object;
|
|
35
|
+
}
|
|
22
36
|
interface ILocalizeInfos {
|
|
23
37
|
[key: string]: ILocalizeInfo;
|
|
24
38
|
}
|
|
@@ -51,4 +65,4 @@ interface IAttributeSetEntity {
|
|
|
51
65
|
}
|
|
52
66
|
type LangType = string | Array<string>;
|
|
53
67
|
type LocalizeType = ILocalizeInfos | ILocalizeInfo;
|
|
54
|
-
export { LocalizeType, ILocalizeInfos, Types, IAttributeSetEntity, LangType, AttributeType, IAttributeValues };
|
|
68
|
+
export { LocalizeType, ILocalizeInfos, Types, IAttributeSetEntity, LangType, AttributeType, IAttributeValues, IAttributes };
|
package/dist/base/utils.js
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import OneEntry from "../base/oneEntry";
|
|
2
|
+
import { IBlocks, IBlocksEntity } from "./blocksInterfaces";
|
|
3
|
+
/**
|
|
4
|
+
* Controllers for working with blocks
|
|
5
|
+
*/
|
|
6
|
+
export default class BlocksApi extends OneEntry implements IBlocks {
|
|
7
|
+
constructor(url: string, token: string);
|
|
8
|
+
/**
|
|
9
|
+
* Get blocks by parameters.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
12
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
13
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
14
|
+
*
|
|
15
|
+
* @returns Return array of BlocksEntity object.
|
|
16
|
+
*/
|
|
17
|
+
getBlocks(langCode?: string, offset?: number, limit?: number): Promise<Array<IBlocksEntity>>;
|
|
18
|
+
/**
|
|
19
|
+
* Get block by marker.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} [marker] - Marker of Block.
|
|
22
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
23
|
+
*
|
|
24
|
+
* @returns Return BlocksEntity object.
|
|
25
|
+
*/
|
|
26
|
+
getBlockByMarker(marker: string, langCode?: string): Promise<IBlocksEntity>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const oneEntry_1 = require("../base/oneEntry");
|
|
4
|
+
/**
|
|
5
|
+
* Controllers for working with blocks
|
|
6
|
+
*/
|
|
7
|
+
class BlocksApi extends oneEntry_1.default {
|
|
8
|
+
constructor(url, token) {
|
|
9
|
+
super(url, token);
|
|
10
|
+
this._url += '/api/content/blocks';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get blocks by parameters.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
16
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
17
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
18
|
+
*
|
|
19
|
+
* @returns Return array of BlocksEntity object.
|
|
20
|
+
*/
|
|
21
|
+
async getBlocks(langCode = 'en_US', offset = 0, limit = 30) {
|
|
22
|
+
const result = await this._fetchGet(`&langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get block by marker.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} [marker] - Marker of Block.
|
|
29
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
30
|
+
*
|
|
31
|
+
* @returns Return BlocksEntity object.
|
|
32
|
+
*/
|
|
33
|
+
async getBlockByMarker(marker, langCode = 'en_US') {
|
|
34
|
+
const result = await this._fetchGet(`/marker/${marker}&langCode=${langCode}`);
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = BlocksApi;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IAttributeValues, ILocalizeInfos } from "../base/utils";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a interface object of Blocks Api.
|
|
4
|
+
*
|
|
5
|
+
* @property {function} getBlocks - Get all Blocks objects.
|
|
6
|
+
* @property {function} getBlockByMarker - Get Block object by marker.
|
|
7
|
+
*/
|
|
8
|
+
interface IBlocks {
|
|
9
|
+
getBlocks(langCode: string, offset?: number, limit?: number): Promise<Array<IBlocksEntity>>;
|
|
10
|
+
getBlockByMarker(marker: string, langCode: string): Promise<IBlocksEntity>;
|
|
11
|
+
}
|
|
12
|
+
interface IBlocksEntity {
|
|
13
|
+
id: number;
|
|
14
|
+
attributeSetId: number;
|
|
15
|
+
localizeInfos: ILocalizeInfos;
|
|
16
|
+
customSettings: ICustomSetting;
|
|
17
|
+
version: number;
|
|
18
|
+
identifier: string;
|
|
19
|
+
position: number;
|
|
20
|
+
attributeValues: IAttributeValues;
|
|
21
|
+
type: string;
|
|
22
|
+
templateIdentifier: string | null;
|
|
23
|
+
}
|
|
24
|
+
interface ICustomSetting {
|
|
25
|
+
sliderDelay: number;
|
|
26
|
+
sliderDelayType: string;
|
|
27
|
+
productQuantity: number;
|
|
28
|
+
productSortType: string;
|
|
29
|
+
productSortOrder: string;
|
|
30
|
+
productCountElementsPerRow: number;
|
|
31
|
+
similarProductRules: Array<{
|
|
32
|
+
property: string;
|
|
33
|
+
includes: string;
|
|
34
|
+
keywords: string;
|
|
35
|
+
strict: string;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
export { IBlocks, IBlocksEntity };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import OneEntry from '../base/oneEntry';
|
|
2
|
-
import { IUploadingQuery, IUploadingReturns, IFileUploading } from "./fileUploadingInterfaces";
|
|
2
|
+
import { IUploadingQuery, IUploadingReturns, IFileUploading, IFileEntity } from "./fileUploadingInterfaces";
|
|
3
3
|
/**
|
|
4
4
|
* Controllers for working with file uploading
|
|
5
5
|
*/
|
|
@@ -11,28 +11,40 @@ export default class FileUploadingApi extends OneEntry implements IFileUploading
|
|
|
11
11
|
*
|
|
12
12
|
* @param {Event} [data] Array of Express.Multer.File objects
|
|
13
13
|
*
|
|
14
|
-
* @param {IUploadingQuery} [
|
|
15
|
-
* @param {string} [
|
|
16
|
-
* @param {string} [
|
|
17
|
-
* @param {number} [
|
|
18
|
-
* @param {number} [
|
|
19
|
-
* @param {number} [
|
|
20
|
-
* @param {boolean} [
|
|
14
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
|
|
15
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
16
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
17
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
18
|
+
* @param {number} [fileQuery.width] - Optional width parameter. Example : 0
|
|
19
|
+
* @param {number} [fileQuery.height] - Optional height parameter. Example : 0
|
|
20
|
+
* @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example : true
|
|
21
21
|
*
|
|
22
22
|
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
23
23
|
*/
|
|
24
|
-
upload(data: Event,
|
|
24
|
+
upload(data: Event, fileQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
25
25
|
/**
|
|
26
26
|
* Deletes a file from the cloud file storage.
|
|
27
27
|
*
|
|
28
28
|
* @param {string} [filename] File name. Example "file.png"
|
|
29
29
|
*
|
|
30
|
-
* @param {IUploadingQuery} [
|
|
31
|
-
* @param {string} [
|
|
32
|
-
* @param {string} [
|
|
33
|
-
* @param {number} [
|
|
30
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
|
|
31
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
32
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
33
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
34
34
|
*
|
|
35
35
|
* @returns Deletes a file from the cloud file storage
|
|
36
36
|
*/
|
|
37
|
-
delete(filename: string,
|
|
37
|
+
delete(filename: string, fileQuery?: IUploadingQuery): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* Get file by parameters.
|
|
40
|
+
*
|
|
41
|
+
* @param {number} [id] Object identifier, from which the file is uploaded, determines the folder name in the storage
|
|
42
|
+
*
|
|
43
|
+
* @param {string} [type] - Type, determines the folder name in the storage
|
|
44
|
+
* @param {string} [entity] - entity name, from which the file is uploaded, determines the folder name in the storage
|
|
45
|
+
* @param {string} [filename] - Filename. Example "file.png"
|
|
46
|
+
*
|
|
47
|
+
* @returns Return file as File object
|
|
48
|
+
*/
|
|
49
|
+
getFile(id: number, type: string, entity: string, filename?: string): Promise<IFileEntity>;
|
|
38
50
|
}
|
|
@@ -22,18 +22,18 @@ class FileUploadingApi extends oneEntry_1.default {
|
|
|
22
22
|
*
|
|
23
23
|
* @param {Event} [data] Array of Express.Multer.File objects
|
|
24
24
|
*
|
|
25
|
-
* @param {IUploadingQuery} [
|
|
26
|
-
* @param {string} [
|
|
27
|
-
* @param {string} [
|
|
28
|
-
* @param {number} [
|
|
29
|
-
* @param {number} [
|
|
30
|
-
* @param {number} [
|
|
31
|
-
* @param {boolean} [
|
|
25
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
|
|
26
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
27
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
28
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
29
|
+
* @param {number} [fileQuery.width] - Optional width parameter. Example : 0
|
|
30
|
+
* @param {number} [fileQuery.height] - Optional height parameter. Example : 0
|
|
31
|
+
* @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example : true
|
|
32
32
|
*
|
|
33
33
|
* @returns Uploads a file to an Amazon S3-compatible cloud file storage
|
|
34
34
|
*/
|
|
35
|
-
async upload(data,
|
|
36
|
-
const query = { ...this._defaultQuery, ...
|
|
35
|
+
async upload(data, fileQuery) {
|
|
36
|
+
const query = { ...this._defaultQuery, ...fileQuery };
|
|
37
37
|
const result = await this._fetchPost('?' + this._queryParamsToString(query), data);
|
|
38
38
|
return result;
|
|
39
39
|
}
|
|
@@ -42,18 +42,32 @@ class FileUploadingApi extends oneEntry_1.default {
|
|
|
42
42
|
*
|
|
43
43
|
* @param {string} [filename] File name. Example "file.png"
|
|
44
44
|
*
|
|
45
|
-
* @param {IUploadingQuery} [
|
|
46
|
-
* @param {string} [
|
|
47
|
-
* @param {string} [
|
|
48
|
-
* @param {number} [
|
|
45
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
|
|
46
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example : "page"
|
|
47
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example : "editor"
|
|
48
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example : 3787
|
|
49
49
|
*
|
|
50
50
|
* @returns Deletes a file from the cloud file storage
|
|
51
51
|
*/
|
|
52
|
-
async delete(filename,
|
|
53
|
-
const query = { ...this._defaultQuery, ...
|
|
52
|
+
async delete(filename, fileQuery) {
|
|
53
|
+
const query = { ...this._defaultQuery, ...fileQuery };
|
|
54
54
|
const result = await this._fetchDelete(`?filename=${filename}&` + this._queryParamsToString(query));
|
|
55
55
|
return result;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Get file by parameters.
|
|
59
|
+
*
|
|
60
|
+
* @param {number} [id] Object identifier, from which the file is uploaded, determines the folder name in the storage
|
|
61
|
+
*
|
|
62
|
+
* @param {string} [type] - Type, determines the folder name in the storage
|
|
63
|
+
* @param {string} [entity] - entity name, from which the file is uploaded, determines the folder name in the storage
|
|
64
|
+
* @param {string} [filename] - Filename. Example "file.png"
|
|
65
|
+
*
|
|
66
|
+
* @returns Return file as File object
|
|
67
|
+
*/
|
|
68
|
+
async getFile(id, type, entity, filename) {
|
|
69
|
+
const result = await this._fetchGet(`?id=${id}&type=${type}&entity=${entity}${filename ? `&filename=${filename}` : ''}`);
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
57
72
|
}
|
|
58
73
|
exports.default = FileUploadingApi;
|
|
59
|
-
//# sourceMappingURL=fileUploadingApi.js.map
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a interface object of File Uploading Api.
|
|
3
|
+
*
|
|
4
|
+
* @property {function} upload - Upload file from CMS.
|
|
5
|
+
* @property {function} delete - Delete file from CMS.
|
|
6
|
+
* @property {function} getFile - Get file by parameters.
|
|
7
|
+
*/
|
|
1
8
|
interface IFileUploading {
|
|
2
|
-
upload(data: Event,
|
|
3
|
-
delete(filename: string,
|
|
9
|
+
upload(data: Event, fileQuery?: IUploadingQuery): Promise<IUploadingReturns>;
|
|
10
|
+
delete(filename: string, fileQuery?: IUploadingQuery): Promise<any>;
|
|
11
|
+
getFile(id: number, type: string, entity: string, filename?: string): Promise<IFileEntity>;
|
|
4
12
|
}
|
|
13
|
+
interface IFileEntity {
|
|
14
|
+
file: File | string | null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @interface
|
|
18
|
+
* @property {string} type - Type, determines the folder name in the storage.
|
|
19
|
+
* @property {string} entity - Entity name from which the file is uploaded, determines the folder name in the storage.
|
|
20
|
+
* @property {number} id - Identifier of the object from which the file is uploaded, determines the folder name in the storage.
|
|
21
|
+
* @property {number} [width] - Width parameter.
|
|
22
|
+
* @property {number} [height] - Height parameter.
|
|
23
|
+
* @property {boolean} [compress] - Flag of optimization (compression) for images.
|
|
24
|
+
*/
|
|
5
25
|
interface IUploadingQuery {
|
|
6
26
|
type?: string | null;
|
|
7
27
|
entity?: string | null;
|
|
@@ -11,9 +31,15 @@ interface IUploadingQuery {
|
|
|
11
31
|
compress?: boolean | null;
|
|
12
32
|
[key: string]: string | number | boolean | null;
|
|
13
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @interface
|
|
36
|
+
* @property {string} filename - Filename with relative path.
|
|
37
|
+
* @property {string} downloadLink - Link for downloading the file.
|
|
38
|
+
* @property {number} size - Size of the file in bytes.
|
|
39
|
+
*/
|
|
14
40
|
interface IUploadingReturns {
|
|
15
41
|
filename: string;
|
|
16
42
|
downloadLink: string;
|
|
17
43
|
size: number;
|
|
18
44
|
}
|
|
19
|
-
export { IUploadingQuery, IUploadingReturns, IFileUploading };
|
|
45
|
+
export { IUploadingQuery, IUploadingReturns, IFileUploading, IFileEntity };
|
package/dist/forms/formsApi.d.ts
CHANGED
|
@@ -8,13 +8,20 @@ export default class FormsApi extends OneEntry implements IForms {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get all forms.
|
|
10
10
|
*
|
|
11
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
12
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
13
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
14
|
+
*
|
|
11
15
|
* @returns Returns array for all objects of type FormEntity
|
|
12
16
|
*/
|
|
13
|
-
getAllForms(): Promise<Array<IFormsEntity>>;
|
|
17
|
+
getAllForms(langCode?: string, offset?: number, limit?: number): Promise<Array<IFormsEntity>>;
|
|
14
18
|
/**
|
|
15
19
|
* Get one form by form marker.
|
|
16
20
|
*
|
|
21
|
+
* @param {string} [marker] - Marker of form.
|
|
22
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
23
|
+
*
|
|
17
24
|
* @returns Returns object of type FormEntity
|
|
18
25
|
*/
|
|
19
|
-
getFormByMarker(marker: string): Promise<IFormsEntity>;
|
|
26
|
+
getFormByMarker(marker: string, langCode?: string): Promise<IFormsEntity>;
|
|
20
27
|
}
|
package/dist/forms/formsApi.js
CHANGED
|
@@ -12,21 +12,27 @@ class FormsApi extends oneEntry_1.default {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get all forms.
|
|
14
14
|
*
|
|
15
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
16
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
17
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
18
|
+
*
|
|
15
19
|
* @returns Returns array for all objects of type FormEntity
|
|
16
20
|
*/
|
|
17
|
-
async getAllForms() {
|
|
18
|
-
const result = await this._fetchGet(
|
|
21
|
+
async getAllForms(langCode = 'en_US', offset = 0, limit = 30) {
|
|
22
|
+
const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
19
23
|
return result;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Get one form by form marker.
|
|
23
27
|
*
|
|
28
|
+
* @param {string} [marker] - Marker of form.
|
|
29
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
30
|
+
*
|
|
24
31
|
* @returns Returns object of type FormEntity
|
|
25
32
|
*/
|
|
26
|
-
async getFormByMarker(marker) {
|
|
27
|
-
const result = await this._fetchGet(`/marker/${marker}`);
|
|
33
|
+
async getFormByMarker(marker, langCode = 'en_US') {
|
|
34
|
+
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
28
35
|
return result;
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
38
|
exports.default = FormsApi;
|
|
32
|
-
//# sourceMappingURL=formsApi.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAttributes, ILocalizeInfos } from "../base/utils";
|
|
2
2
|
/**
|
|
3
3
|
* Represents an interface object of Forms Api.
|
|
4
4
|
*
|
|
@@ -7,8 +7,8 @@ import { IAttributeValues, ILocalizeInfos } from "../base/utils";
|
|
|
7
7
|
* @property {function} getFormByMarker - Get one form by form marker.
|
|
8
8
|
*/
|
|
9
9
|
interface IForms {
|
|
10
|
-
getAllForms(): Promise<Array<IFormsEntity>>;
|
|
11
|
-
getFormByMarker(marker: string): Promise<IFormsEntity>;
|
|
10
|
+
getAllForms(langCode: string, offset?: number, limit?: number): Promise<Array<IFormsEntity>>;
|
|
11
|
+
getFormByMarker(marker: string, langCode: string): Promise<IFormsEntity>;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Represents an object with various properties.
|
|
@@ -19,20 +19,20 @@ interface IForms {
|
|
|
19
19
|
* @property {string} processingType - Type of form processing.
|
|
20
20
|
* @property {ILocalizeInfos} localizeInfos - The name of the form, taking into account localization.
|
|
21
21
|
* @property {object} processingData - Form data.
|
|
22
|
-
* @property {
|
|
22
|
+
* @property {IAttributes} attribute - Array of attribute values from the used attribute set for displaying the form (taking into account the specified language)
|
|
23
23
|
* @property {number} version - The version number of the object.
|
|
24
24
|
* @property {string} identifier - The textual identifier for the record field.
|
|
25
25
|
* @property {number} position - The position of the object.
|
|
26
26
|
*/
|
|
27
27
|
interface IFormsEntity {
|
|
28
|
-
id: number;
|
|
29
28
|
attributeSetId: number;
|
|
30
|
-
|
|
29
|
+
attributes: IAttributes;
|
|
30
|
+
id: number;
|
|
31
|
+
identifier: string;
|
|
31
32
|
localizeInfos: ILocalizeInfos;
|
|
33
|
+
position: number;
|
|
32
34
|
processingData: object | string;
|
|
33
|
-
|
|
35
|
+
processingType: string;
|
|
34
36
|
version: number;
|
|
35
|
-
identifier: string;
|
|
36
|
-
position: number;
|
|
37
37
|
}
|
|
38
38
|
export { IForms, IFormsEntity };
|
|
@@ -8,9 +8,13 @@ export default class FormsDataApi extends OneEntry implements IFormsData {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get all forms data.
|
|
10
10
|
*
|
|
11
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
12
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
13
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
14
|
+
*
|
|
11
15
|
* @returns Returns array for all objects of FormData
|
|
12
16
|
*/
|
|
13
|
-
getFormsData(): Promise<Array<IFormsDataEntity>>;
|
|
17
|
+
getFormsData(langCode?: string, offset?: number, limit?: number): Promise<Array<IFormsDataEntity>>;
|
|
14
18
|
/**
|
|
15
19
|
* Find all product page objects with pagination and multiple filtering.
|
|
16
20
|
*
|
|
@@ -34,8 +38,11 @@ export default class FormsDataApi extends OneEntry implements IFormsData {
|
|
|
34
38
|
* Get one object of form data by marker.
|
|
35
39
|
*
|
|
36
40
|
* @param {string} [marker] - Marker of the form data
|
|
41
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
42
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
43
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
37
44
|
*
|
|
38
45
|
* @returns Returns array of object FormDataEntity
|
|
39
46
|
*/
|
|
40
|
-
getFormsDataByMarker(marker: string): Promise<Array<IFormsDataEntity>>;
|
|
47
|
+
getFormsDataByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<Array<IFormsDataEntity>>;
|
|
41
48
|
}
|
|
@@ -12,10 +12,14 @@ class FormsDataApi extends oneEntry_1.default {
|
|
|
12
12
|
/**
|
|
13
13
|
* Get all forms data.
|
|
14
14
|
*
|
|
15
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
16
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
17
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
18
|
+
*
|
|
15
19
|
* @returns Returns array for all objects of FormData
|
|
16
20
|
*/
|
|
17
|
-
async getFormsData() {
|
|
18
|
-
const result = await this._fetchGet(
|
|
21
|
+
async getFormsData(langCode = 'en_US', offset = 0, limit = 30) {
|
|
22
|
+
const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
19
23
|
return result;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
@@ -44,13 +48,15 @@ class FormsDataApi extends oneEntry_1.default {
|
|
|
44
48
|
* Get one object of form data by marker.
|
|
45
49
|
*
|
|
46
50
|
* @param {string} [marker] - Marker of the form data
|
|
51
|
+
* @param {string} [langCode] - Language code. Default "en_US"
|
|
52
|
+
* @param {number} [offset] - Parameter for pagination. Default 0
|
|
53
|
+
* @param {number} [limit] - Parameter for pagination. Default 30
|
|
47
54
|
*
|
|
48
55
|
* @returns Returns array of object FormDataEntity
|
|
49
56
|
*/
|
|
50
|
-
async getFormsDataByMarker(marker) {
|
|
51
|
-
const result = await this._fetchGet(`/${marker}`);
|
|
57
|
+
async getFormsDataByMarker(marker, langCode = 'en_US', offset = 0, limit = 30) {
|
|
58
|
+
const result = await this._fetchGet(`/${marker}?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
52
59
|
return result;
|
|
53
60
|
}
|
|
54
61
|
}
|
|
55
62
|
exports.default = FormsDataApi;
|
|
56
|
-
//# sourceMappingURL=formsDataApi.js.map
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @property {function} getFormsDataByMarker - Get one object of form data by marker.
|
|
9
9
|
*/
|
|
10
10
|
interface IFormsData {
|
|
11
|
-
getFormsData(): Promise<Array<IFormsDataEntity>>;
|
|
11
|
+
getFormsData(langCode: string, offset?: number, limit?: number): Promise<Array<IFormsDataEntity>>;
|
|
12
12
|
postFormsData(data: Array<IFormsPost>): Promise<IFormsDataEntity>;
|
|
13
|
-
getFormsDataByMarker(marker: string): Promise<Array<IFormsDataEntity>>;
|
|
13
|
+
getFormsDataByMarker(marker: string, langCode: string, offset?: number, limit?: number): Promise<Array<IFormsDataEntity>>;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Represents a form data.
|
|
@@ -20,12 +20,14 @@ interface IFormsData {
|
|
|
20
20
|
* @property {string} formIdentifier - The identifier of the page.
|
|
21
21
|
* @property {Date | string} time - The identifier of the form.
|
|
22
22
|
* @property {IFormData} formData - The identifier of the position.
|
|
23
|
+
* @property {string} attributeSetIdentifier - Text identifier (marker) of the used attribute set.
|
|
23
24
|
*/
|
|
24
25
|
interface IFormsDataEntity {
|
|
25
26
|
id: number;
|
|
26
27
|
formIdentifier: string;
|
|
27
28
|
time: Date | string;
|
|
28
29
|
formData: IFormData;
|
|
30
|
+
attributeSetIdentifier: string;
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* Form data get by langcode identifier
|
package/dist/index.js
CHANGED
package/dist/menus/menusApi.js
CHANGED
package/dist/pages/pagesApi.js
CHANGED