oneentry 1.0.124 → 1.0.125
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 +24 -22
- package/dist/admins/adminsApi.d.ts +17 -4
- package/dist/admins/adminsApi.js +16 -3
- package/dist/admins/adminsInterfaces.d.ts +47 -26
- package/dist/attribute-sets/attributeSetsApi.d.ts +10 -18
- package/dist/attribute-sets/attributeSetsApi.js +9 -17
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +92 -44
- package/dist/auth-provider/authProviderApi.d.ts +146 -36
- package/dist/auth-provider/authProviderApi.js +163 -37
- package/dist/auth-provider/authProvidersInterfaces.d.ts +189 -40
- package/dist/base/asyncModules.d.ts +7 -1
- package/dist/base/asyncModules.js +127 -21
- package/dist/base/result.js +23 -0
- package/dist/base/syncModules.d.ts +4 -0
- package/dist/base/syncModules.js +19 -1
- package/dist/base/utils.d.ts +1 -1
- package/dist/blocks/blocksApi.d.ts +7 -17
- package/dist/blocks/blocksApi.js +7 -17
- package/dist/blocks/blocksInterfaces.d.ts +77 -32
- package/dist/events/eventsApi.d.ts +7 -8
- package/dist/events/eventsApi.js +12 -7
- package/dist/events/eventsInterfaces.d.ts +16 -11
- package/dist/file-uploading/fileUploadingApi.d.ts +22 -14
- package/dist/file-uploading/fileUploadingApi.js +20 -12
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +42 -18
- package/dist/forms/formsApi.d.ts +3 -7
- package/dist/forms/formsApi.js +2 -6
- package/dist/forms/formsInterfaces.d.ts +44 -28
- package/dist/formsData/formsDataApi.d.ts +21 -9
- package/dist/formsData/formsDataApi.js +21 -9
- package/dist/formsData/formsDataInterfaces.d.ts +128 -45
- package/dist/general-types/generalTypesApi.d.ts +1 -3
- package/dist/general-types/generalTypesApi.js +0 -2
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +74 -47
- package/dist/integration-collections/integrationCollectionsApi.js +64 -45
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +144 -63
- package/dist/locales/localesApi.d.ts +1 -2
- package/dist/locales/localesApi.js +1 -2
- package/dist/locales/localesInterfaces.d.ts +2 -4
- package/dist/menus/menusApi.d.ts +1 -3
- package/dist/menus/menusApi.js +1 -3
- package/dist/menus/menusInterfaces.d.ts +39 -13
- package/dist/orders/ordersApi.d.ts +36 -18
- package/dist/orders/ordersApi.js +40 -22
- package/dist/orders/ordersInterfaces.d.ts +163 -81
- package/dist/pages/pagesApi.d.ts +48 -48
- package/dist/pages/pagesApi.js +40 -45
- package/dist/pages/pagesInterfaces.d.ts +147 -98
- package/dist/payments/paymentsApi.d.ts +25 -45
- package/dist/payments/paymentsApi.js +27 -46
- package/dist/payments/paymentsInterfaces.d.ts +42 -60
- package/dist/product-statuses/productStatusesApi.d.ts +6 -12
- package/dist/product-statuses/productStatusesApi.js +5 -11
- package/dist/product-statuses/productStatusesInterfaces.d.ts +16 -15
- package/dist/products/productsApi.d.ts +256 -104
- package/dist/products/productsApi.js +263 -97
- package/dist/products/productsInterfaces.d.ts +343 -160
- package/dist/system/systemApi.d.ts +21 -10
- package/dist/system/systemApi.js +22 -8
- package/dist/system/systemInterfaces.d.ts +0 -1
- package/dist/templates/templatesApi.d.ts +6 -12
- package/dist/templates/templatesApi.js +4 -10
- package/dist/templates/templatesInterfaces.d.ts +20 -20
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -6
- package/dist/templates-preview/templatesPreviewApi.js +1 -5
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +50 -25
- package/dist/users/usersApi.d.ts +33 -13
- package/dist/users/usersApi.js +38 -15
- package/dist/users/usersInterfaces.d.ts +78 -27
- package/dist/web-socket/wsApi.d.ts +1 -5
- package/dist/web-socket/wsApi.js +1 -5
- package/dist/web-socket/wsInterfaces.d.ts +0 -1
- package/package.json +18 -16
|
@@ -7,28 +7,57 @@ import type { IError } from '../base/utils';
|
|
|
7
7
|
* @property {function} upload - Upload file from CMS.
|
|
8
8
|
* @property {function} delete - Delete file from CMS.
|
|
9
9
|
* @property {function} getFile - Get file by parameters.
|
|
10
|
-
*
|
|
11
10
|
* @description This interface defines methods for uploading, deleting, and retrieving files in the CMS.
|
|
12
11
|
*/
|
|
13
12
|
interface IFileUploading {
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
14
|
+
* Upload file function.
|
|
16
15
|
*
|
|
17
|
-
* @
|
|
18
|
-
* @param {IUploadingQuery} [fileQuery] - Optional query parameters for the upload. Example: { type: 'page', entity: 'editor', id: 3787, width: 0, height: 0, compress: true, template: 1 }.
|
|
16
|
+
* @handleName upload
|
|
19
17
|
*
|
|
20
|
-
* @
|
|
18
|
+
* @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
|
|
19
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
|
|
20
|
+
{
|
|
21
|
+
"type": "page",
|
|
22
|
+
"entity": "editor",
|
|
23
|
+
"id": 3787,
|
|
24
|
+
"width": 0,
|
|
25
|
+
"height": 0,
|
|
26
|
+
"compress": true,
|
|
27
|
+
"template": 1
|
|
28
|
+
}
|
|
29
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
|
|
30
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
31
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
|
|
32
|
+
* @param {number} [fileQuery.width] - Optional width parameter. Example: 0.
|
|
33
|
+
* @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
|
|
34
|
+
* @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
|
|
35
|
+
* @param {any} [fileQuery.template] - preview template identifier. Example: 1.
|
|
36
|
+
* @return {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
|
|
21
37
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
38
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
22
39
|
*/
|
|
23
|
-
upload(
|
|
40
|
+
upload(file: File | Blob, fileQuery?: IUploadingQuery): Promise<IUploadingReturn[] | IError>;
|
|
24
41
|
/**
|
|
25
|
-
* Deletes a file from the
|
|
42
|
+
* Deletes a file from the cloud file storage.
|
|
26
43
|
*
|
|
27
|
-
* @
|
|
28
|
-
* @param {IUploadingQuery} [fileQuery] - Optional query parameters for the deletion. Example: { type: 'page', entity: 'editor', id: 3787, template: 1 }.
|
|
44
|
+
* @handleName delete
|
|
29
45
|
*
|
|
30
|
-
* @
|
|
46
|
+
* @param {string} [filename] - File name. Example: "file.png".
|
|
47
|
+
* @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
|
|
48
|
+
{
|
|
49
|
+
"type": "page",
|
|
50
|
+
"entity": "editor",
|
|
51
|
+
"id": 3787,
|
|
52
|
+
"template": 1
|
|
53
|
+
}
|
|
54
|
+
* @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
|
|
55
|
+
* @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
|
|
56
|
+
* @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
|
|
57
|
+
* @param {number} [fileQuery.template] - preview template identifier. Example: 1.
|
|
58
|
+
* @return {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
|
|
31
59
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
60
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
32
61
|
*/
|
|
33
62
|
delete(filename: string, fileQuery?: IUploadingQuery): Promise<any | IError>;
|
|
34
63
|
/**
|
|
@@ -38,8 +67,7 @@ interface IFileUploading {
|
|
|
38
67
|
* @param {string} type - The type of the file. Example: "page".
|
|
39
68
|
* @param {string} entity - The entity associated with the file. Example: "editor".
|
|
40
69
|
* @param {string} [filename] - Optional filename to retrieve. Example: "file.png".
|
|
41
|
-
*
|
|
42
|
-
* @returns {Blob} A promise that resolves to a Blob object or an error.
|
|
70
|
+
* @return {Blob} A promise that resolves to a Blob object or an error.
|
|
43
71
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
44
72
|
*/
|
|
45
73
|
getFile(id: number, type: string, entity: string, filename?: string): Promise<any | IError>;
|
|
@@ -49,8 +77,7 @@ interface IFileUploading {
|
|
|
49
77
|
*
|
|
50
78
|
* @interface IFileEntity
|
|
51
79
|
*
|
|
52
|
-
* @property {File | string | null} file - File object or string representing the file path. Example: new File(["content"], "file.png", { type: "image/png" }) or "/path/to/file.png".
|
|
53
|
-
*
|
|
80
|
+
* @property {File | string | null} file - File object or string representing the file path. Example: new File(["content"], "file.png", { "type": "image/png" }) or "/path/to/file.png".
|
|
54
81
|
* @description Represents a file entity that may contain a file object or a path as a string.
|
|
55
82
|
*/
|
|
56
83
|
interface IFileEntity {
|
|
@@ -67,7 +94,6 @@ interface IFileEntity {
|
|
|
67
94
|
* @property {number} [width] - Width parameter. Example: 0.
|
|
68
95
|
* @property {number} [height] - Height parameter. Example: 0.
|
|
69
96
|
* @property {boolean} [compress] - Flag of optimization (compression) for images. Example: true.
|
|
70
|
-
*
|
|
71
97
|
* @description Represents a query for uploading files, including type, entity, and optional parameters like width, height, and compression.
|
|
72
98
|
*/
|
|
73
99
|
interface IUploadingQuery {
|
|
@@ -84,7 +110,6 @@ interface IUploadingQuery {
|
|
|
84
110
|
* @property {string} filename - Filename with relative path. Example: "uploads/file.png".
|
|
85
111
|
* @property {string} downloadLink - Link for downloading the file. Example: "https://example.com/uploads/file.png".
|
|
86
112
|
* @property {number} size - Size of the file in bytes. Example: 1024.
|
|
87
|
-
*
|
|
88
113
|
* @description Represents the return value of an uploading operation, including the filename, download link, and file size.
|
|
89
114
|
*/
|
|
90
115
|
interface IUploadingReturn {
|
|
@@ -92,5 +117,4 @@ interface IUploadingReturn {
|
|
|
92
117
|
downloadLink: string;
|
|
93
118
|
size: number;
|
|
94
119
|
}
|
|
95
|
-
type
|
|
96
|
-
export type { IFileEntity, IFileUploading, IUploadingQuery, IUploadingReturns };
|
|
120
|
+
export type { IFileEntity, IFileUploading, IUploadingQuery, IUploadingReturn };
|
package/dist/forms/formsApi.d.ts
CHANGED
|
@@ -23,13 +23,11 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
23
23
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
24
24
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
25
25
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
26
|
-
*
|
|
27
|
-
* @return {IFormsEntity} Returns array for all objects of type FormEntity.
|
|
26
|
+
* @return {IFormsEntity[]} Returns array for all objects of type FormEntity.
|
|
28
27
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
29
|
-
*
|
|
30
28
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
31
29
|
*/
|
|
32
|
-
getAllForms(langCode?: string, offset?: number, limit?: number): Promise<
|
|
30
|
+
getAllForms(langCode?: string, offset?: number, limit?: number): Promise<IFormsEntity[] | IError>;
|
|
33
31
|
/**
|
|
34
32
|
* Get one form by form marker.
|
|
35
33
|
*
|
|
@@ -37,10 +35,8 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
37
35
|
*
|
|
38
36
|
* @param {string} marker - Marker of form. Example: "contact_form".
|
|
39
37
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
40
|
-
*
|
|
41
|
-
* @return - Returns object of type FormEntity.
|
|
38
|
+
* @return {IFormsEntity} Returns object of type FormEntity.
|
|
42
39
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
43
|
-
*
|
|
44
40
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
45
41
|
*/
|
|
46
42
|
getFormByMarker(marker: string, langCode?: string): Promise<IFormsEntity | IError>;
|
package/dist/forms/formsApi.js
CHANGED
|
@@ -26,10 +26,8 @@ class FormsApi extends asyncModules_1.default {
|
|
|
26
26
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
27
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
28
28
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
29
|
-
*
|
|
30
|
-
* @return {IFormsEntity} Returns array for all objects of type FormEntity.
|
|
29
|
+
* @return {IFormsEntity[]} Returns array for all objects of type FormEntity.
|
|
31
30
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
32
|
-
*
|
|
33
31
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
34
32
|
*/
|
|
35
33
|
async getAllForms(langCode = this.state.lang, offset = 0, limit = 30) {
|
|
@@ -43,10 +41,8 @@ class FormsApi extends asyncModules_1.default {
|
|
|
43
41
|
*
|
|
44
42
|
* @param {string} marker - Marker of form. Example: "contact_form".
|
|
45
43
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
46
|
-
*
|
|
47
|
-
* @return - Returns object of type FormEntity.
|
|
44
|
+
* @return {IFormsEntity} Returns object of type FormEntity.
|
|
48
45
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
49
|
-
*
|
|
50
46
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
51
47
|
*/
|
|
52
48
|
async getFormByMarker(marker, langCode = this.state.lang) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IPosition } from '../admins/adminsInterfaces';
|
|
2
|
-
import type { IAttributes, IError } from '../base/utils';
|
|
2
|
+
import type { IAttributes, IError, ILocalizeInfo } from '../base/utils';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for retrieving forms in the system.
|
|
5
5
|
*
|
|
@@ -7,7 +7,6 @@ import type { IAttributes, IError } from '../base/utils';
|
|
|
7
7
|
*
|
|
8
8
|
* @property {function} getAllForms - Get all forms in array.
|
|
9
9
|
* @property {function} getFormByMarker - Get one form by form marker.
|
|
10
|
-
*
|
|
11
10
|
* @description This interface defines methods for retrieving forms in the system.
|
|
12
11
|
*/
|
|
13
12
|
interface IForms {
|
|
@@ -17,17 +16,15 @@ interface IForms {
|
|
|
17
16
|
* @param {string} [langCode] - The language code for localization. Default: "en_US".
|
|
18
17
|
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
19
18
|
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
20
|
-
*
|
|
21
|
-
* @return {IFormsEntity} A promise that resolves to an array of form entities or an error.
|
|
19
|
+
* @return {IFormsEntity[]} A promise that resolves to an array of form entities or an error.
|
|
22
20
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
23
21
|
*/
|
|
24
|
-
getAllForms(langCode: string, offset?: number, limit?: number): Promise<
|
|
22
|
+
getAllForms(langCode: string, offset?: number, limit?: number): Promise<IFormsEntity[] | IError>;
|
|
25
23
|
/**
|
|
26
24
|
* Retrieves a form by its marker.
|
|
27
25
|
*
|
|
28
26
|
* @param {string} marker - The marker identifying the form. Example: "contact_form".
|
|
29
27
|
* @param {string} [langCode] - The language code for localization. Default: "en_US".
|
|
30
|
-
*
|
|
31
28
|
* @return {IFormsEntity} A promise that resolves to a form entity or an error.
|
|
32
29
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
33
30
|
*/
|
|
@@ -38,12 +35,19 @@ interface IForms {
|
|
|
38
35
|
*
|
|
39
36
|
* @interface IFromPages
|
|
40
37
|
*
|
|
41
|
-
* @property {number} id - The unique identifier of the form page. Example: .
|
|
42
|
-
* @property {number} pageId - The identifier of the page. Example: .
|
|
43
|
-
* @property {number} formId - The identifier of the form. Example: .
|
|
44
|
-
* @property {number} positionId - The identifier of the position. Example: .
|
|
45
|
-
* @property {IPosition} position - The position object. Example:
|
|
46
|
-
|
|
38
|
+
* @property {number} id - The unique identifier of the form page. Example: 123.
|
|
39
|
+
* @property {number} pageId - The identifier of the page. Example: 12.
|
|
40
|
+
* @property {number} formId - The identifier of the form. Example: 321.
|
|
41
|
+
* @property {number} positionId - The identifier of the position. Example: 1.
|
|
42
|
+
* @property {IPosition} position - The position object. Example:
|
|
43
|
+
{
|
|
44
|
+
"id": 1,
|
|
45
|
+
"position": 1,
|
|
46
|
+
"objectId": 2,
|
|
47
|
+
"objectType": "admin",
|
|
48
|
+
"isLocked": false,
|
|
49
|
+
"objectCategoryId": 1
|
|
50
|
+
}
|
|
47
51
|
* @description This interface defines the structure of a form page.
|
|
48
52
|
*/
|
|
49
53
|
interface IFromPages {
|
|
@@ -58,29 +62,41 @@ interface IFromPages {
|
|
|
58
62
|
*
|
|
59
63
|
* @interface IFormsEntity
|
|
60
64
|
*
|
|
61
|
-
* @property {number | null} attributeSetId - The identifier of the attribute set being used, or null if not applicable. Example: 1234.
|
|
62
|
-
* @property {Array<IAttributes> | Record<string, any>} attributes - The attributes of the form, which can be an array of attribute objects or a record of key-value pairs. Example: .
|
|
63
65
|
* @property {number} id - The identifier of the object. Example: 12345.
|
|
64
|
-
* @property {
|
|
65
|
-
* @property {
|
|
66
|
-
* @property {
|
|
66
|
+
* @property {number | null} attributeSetId - The identifier of the attribute set being used, or null if not applicable. Example: 1234.
|
|
67
|
+
* @property {string | null} type - Form type. Example: "contact".
|
|
68
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the form, taking into account localization. Example: {"key": "value"}.
|
|
69
|
+
* @property {number} version - The version number of the object. Example: 1.
|
|
67
70
|
* @property {number} position - The position of the object. Example: 1.
|
|
68
|
-
* @property {string}
|
|
71
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "form_contact_us".
|
|
69
72
|
* @property {string} processingType - Type of form processing. Example: "async".
|
|
70
|
-
* @property {number}
|
|
71
|
-
*
|
|
73
|
+
* @property {number | null} templateId - The identifier of the template used by the form, or null if no template is used. Example: 6789.
|
|
74
|
+
* @property {IAttributes[] | Record<string, any>} attributes - The attributes of the form, which can be an array of attribute objects or a record of key-value pairs. Example: {"key": "value"}.
|
|
72
75
|
* @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
|
|
73
76
|
*/
|
|
74
77
|
interface IFormsEntity {
|
|
75
|
-
attributeSetId: number | null;
|
|
76
|
-
attributes: Array<IAttributes> | Record<string, any>;
|
|
77
78
|
id: number;
|
|
78
|
-
|
|
79
|
-
localizeInfos: Record<string, any>;
|
|
80
|
-
templateId: number | null;
|
|
81
|
-
position: number;
|
|
79
|
+
attributeSetId: number | null;
|
|
82
80
|
type: string | null;
|
|
83
|
-
|
|
81
|
+
localizeInfos: ILocalizeInfo;
|
|
84
82
|
version: number;
|
|
83
|
+
position: number;
|
|
84
|
+
identifier: string;
|
|
85
|
+
processingType: string;
|
|
86
|
+
templateId: number | null;
|
|
87
|
+
attributes: IAttributes[] | Record<string, any>;
|
|
88
|
+
moduleFormConfigs?: Array<IFormConfig>;
|
|
89
|
+
}
|
|
90
|
+
interface IFormConfig {
|
|
91
|
+
id: number;
|
|
92
|
+
moduleIdentifier: string;
|
|
93
|
+
isGlobal: boolean;
|
|
94
|
+
isClosed: boolean;
|
|
95
|
+
viewOnlyUserData: boolean;
|
|
96
|
+
commentOnlyUserData: boolean;
|
|
97
|
+
entityIdentifiers: {
|
|
98
|
+
id: string;
|
|
99
|
+
isNested: boolean;
|
|
100
|
+
}[];
|
|
85
101
|
}
|
|
86
|
-
export type { IForms, IFormsEntity, IFromPages };
|
|
102
|
+
export type { IFormConfig, IForms, IFormsEntity, IFromPages };
|
|
@@ -9,7 +9,6 @@ import type { IFormDataEntity, IFormsData, IFormsDataEntity, IFormsPost } from '
|
|
|
9
9
|
* @class FormsDataApi
|
|
10
10
|
* @extends AsyncModules
|
|
11
11
|
* @implements {IFormsData}
|
|
12
|
-
*
|
|
13
12
|
* @description This class provides methods to interact with form data, including retrieving all forms data, creating new form data entries, and fetching form data by marker.
|
|
14
13
|
*/
|
|
15
14
|
export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
@@ -24,10 +23,8 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
24
23
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
25
24
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
26
25
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
27
|
-
*
|
|
28
26
|
* @return {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
|
|
29
27
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
30
|
-
*
|
|
31
28
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
32
29
|
*/
|
|
33
30
|
getFormsData(langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
@@ -36,14 +33,31 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
36
33
|
*
|
|
37
34
|
* @handleName postFormsData
|
|
38
35
|
*
|
|
39
|
-
* @param {object} body - Request body.
|
|
36
|
+
* @param {object} body - Request body. Example:
|
|
37
|
+
{
|
|
38
|
+
"formIdentifier": "file",
|
|
39
|
+
"formData": [
|
|
40
|
+
{
|
|
41
|
+
"marker": "name",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"value": "filesArray"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"marker": "file",
|
|
47
|
+
"type": "file",
|
|
48
|
+
"value": filesArray,
|
|
49
|
+
"fileQuery": {
|
|
50
|
+
"type": "page",
|
|
51
|
+
"entity": "editor",
|
|
52
|
+
"id": 3492,
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
40
57
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
41
|
-
*
|
|
42
58
|
* @return {IFormDataEntity} Returns an object containing the created form data entry or an error object if there was an issue.
|
|
43
59
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
44
|
-
*
|
|
45
60
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
46
|
-
*
|
|
47
61
|
*/
|
|
48
62
|
postFormsData(body: IFormsPost, langCode?: string): Promise<IFormDataEntity | IError>;
|
|
49
63
|
/**
|
|
@@ -55,10 +69,8 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
55
69
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
56
70
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
57
71
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
58
|
-
*
|
|
59
72
|
* @return {IFormsDataEntity} Returns an object containing the form data or an error object if there was an issue.
|
|
60
73
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
61
|
-
*
|
|
62
74
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
63
75
|
*/
|
|
64
76
|
getFormsDataByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
@@ -13,7 +13,6 @@ const fileUploadingApi_1 = __importDefault(require("../file-uploading/fileUpload
|
|
|
13
13
|
* @class FormsDataApi
|
|
14
14
|
* @extends AsyncModules
|
|
15
15
|
* @implements {IFormsData}
|
|
16
|
-
*
|
|
17
16
|
* @description This class provides methods to interact with form data, including retrieving all forms data, creating new form data entries, and fetching form data by marker.
|
|
18
17
|
*/
|
|
19
18
|
class FormsDataApi extends asyncModules_1.default {
|
|
@@ -29,10 +28,8 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
29
28
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
30
29
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
31
30
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
32
|
-
*
|
|
33
31
|
* @return {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
|
|
34
32
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
35
|
-
*
|
|
36
33
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
37
34
|
*/
|
|
38
35
|
async getFormsData(langCode = this.state.lang, offset = 0, limit = 30) {
|
|
@@ -44,14 +41,31 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
44
41
|
*
|
|
45
42
|
* @handleName postFormsData
|
|
46
43
|
*
|
|
47
|
-
* @param {object} body - Request body.
|
|
44
|
+
* @param {object} body - Request body. Example:
|
|
45
|
+
{
|
|
46
|
+
"formIdentifier": "file",
|
|
47
|
+
"formData": [
|
|
48
|
+
{
|
|
49
|
+
"marker": "name",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"value": "filesArray"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"marker": "file",
|
|
55
|
+
"type": "file",
|
|
56
|
+
"value": filesArray,
|
|
57
|
+
"fileQuery": {
|
|
58
|
+
"type": "page",
|
|
59
|
+
"entity": "editor",
|
|
60
|
+
"id": 3492,
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
48
65
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
49
|
-
*
|
|
50
66
|
* @return {IFormDataEntity} Returns an object containing the created form data entry or an error object if there was an issue.
|
|
51
67
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
52
|
-
*
|
|
53
68
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
54
|
-
*
|
|
55
69
|
*/
|
|
56
70
|
async postFormsData(body, langCode = this.state.lang) {
|
|
57
71
|
const formData = {};
|
|
@@ -115,10 +129,8 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
115
129
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
116
130
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
117
131
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
118
|
-
*
|
|
119
132
|
* @return {IFormsDataEntity} Returns an object containing the form data or an error object if there was an issue.
|
|
120
133
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
121
|
-
*
|
|
122
134
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
123
135
|
*/
|
|
124
136
|
async getFormsDataByMarker(marker, langCode = this.state.lang, offset = 0, limit = 30) {
|