oneentry 1.0.127 → 1.0.130

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.
Files changed (73) hide show
  1. package/README.md +3 -0
  2. package/dist/admins/adminsApi.d.ts +20 -20
  3. package/dist/admins/adminsApi.js +20 -20
  4. package/dist/admins/adminsInterfaces.d.ts +43 -43
  5. package/dist/attribute-sets/attributeSetsApi.d.ts +16 -16
  6. package/dist/attribute-sets/attributeSetsApi.js +16 -16
  7. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +87 -85
  8. package/dist/auth-provider/authProviderApi.d.ts +127 -127
  9. package/dist/auth-provider/authProviderApi.js +127 -127
  10. package/dist/auth-provider/authProvidersInterfaces.d.ts +208 -202
  11. package/dist/base/asyncModules.d.ts +17 -17
  12. package/dist/base/asyncModules.js +39 -27
  13. package/dist/base/result.d.ts +11 -11
  14. package/dist/base/result.js +12 -16
  15. package/dist/base/stateModule.d.ts +6 -5
  16. package/dist/base/stateModule.js +15 -14
  17. package/dist/base/syncModules.d.ts +42 -37
  18. package/dist/base/syncModules.js +103 -49
  19. package/dist/base/utils.d.ts +45 -22
  20. package/dist/blocks/blocksApi.d.ts +24 -24
  21. package/dist/blocks/blocksApi.js +24 -24
  22. package/dist/blocks/blocksInterfaces.d.ts +85 -85
  23. package/dist/events/eventsApi.d.ts +11 -11
  24. package/dist/events/eventsApi.js +11 -11
  25. package/dist/events/eventsInterfaces.d.ts +23 -23
  26. package/dist/file-uploading/fileUploadingApi.d.ts +38 -38
  27. package/dist/file-uploading/fileUploadingApi.js +38 -38
  28. package/dist/file-uploading/fileUploadingInterfaces.d.ts +44 -44
  29. package/dist/forms/formsApi.d.ts +7 -7
  30. package/dist/forms/formsApi.js +7 -7
  31. package/dist/forms/formsInterfaces.d.ts +43 -31
  32. package/dist/forms-data/formsDataApi.d.ts +49 -37
  33. package/dist/forms-data/formsDataApi.js +49 -38
  34. package/dist/forms-data/formsDataInterfaces.d.ts +241 -219
  35. package/dist/general-types/generalTypesApi.d.ts +1 -1
  36. package/dist/general-types/generalTypesApi.js +1 -1
  37. package/dist/general-types/generalTypesInterfaces.d.ts +3 -3
  38. package/dist/index.d.ts +11 -10
  39. package/dist/index.js +11 -10
  40. package/dist/integration-collections/integrationCollectionsApi.d.ts +76 -80
  41. package/dist/integration-collections/integrationCollectionsApi.js +76 -80
  42. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +145 -149
  43. package/dist/locales/localesInterfaces.d.ts +8 -8
  44. package/dist/menus/menusApi.d.ts +3 -3
  45. package/dist/menus/menusApi.js +3 -3
  46. package/dist/menus/menusInterfaces.d.ts +39 -39
  47. package/dist/orders/ordersApi.d.ts +56 -56
  48. package/dist/orders/ordersApi.js +56 -56
  49. package/dist/orders/ordersInterfaces.d.ts +204 -198
  50. package/dist/pages/pagesApi.d.ts +60 -60
  51. package/dist/pages/pagesApi.js +60 -60
  52. package/dist/pages/pagesInterfaces.d.ts +133 -141
  53. package/dist/payments/paymentsApi.d.ts +15 -15
  54. package/dist/payments/paymentsApi.js +15 -15
  55. package/dist/payments/paymentsInterfaces.d.ts +58 -57
  56. package/dist/product-statuses/productStatusesApi.d.ts +7 -7
  57. package/dist/product-statuses/productStatusesApi.js +7 -7
  58. package/dist/product-statuses/productStatusesInterfaces.d.ts +21 -21
  59. package/dist/products/productsApi.d.ts +240 -240
  60. package/dist/products/productsApi.js +240 -240
  61. package/dist/products/productsInterfaces.d.ts +311 -311
  62. package/dist/system/systemApi.d.ts +10 -10
  63. package/dist/system/systemApi.js +10 -10
  64. package/dist/templates/templatesApi.d.ts +8 -8
  65. package/dist/templates/templatesApi.js +8 -8
  66. package/dist/templates/templatesInterfaces.d.ts +22 -22
  67. package/dist/templates-preview/templatesPreviewApi.d.ts +5 -5
  68. package/dist/templates-preview/templatesPreviewApi.js +5 -5
  69. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +54 -54
  70. package/dist/users/usersApi.d.ts +29 -29
  71. package/dist/users/usersApi.js +29 -29
  72. package/dist/users/usersInterfaces.d.ts +77 -77
  73. package/package.json +9 -8
@@ -11,25 +11,25 @@ interface IFileUploading {
11
11
  /**
12
12
  * Upload file function.
13
13
  * @handleName upload
14
- * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
15
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
16
- {
17
- "type": "page",
18
- "entity": "editor",
19
- "id": 3787,
20
- "width": 0,
21
- "height": 0,
22
- "compress": true,
23
- "template": 1
24
- }
25
- * @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
26
- * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
27
- * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
28
- * @param {number} [fileQuery.width] - Optional width parameter. Example: 0.
29
- * @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
30
- * @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
31
- * @param {any} [fileQuery.template] - preview template identifier. Example: 1.
32
- * @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
14
+ * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
15
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
16
+ {
17
+ "type": "page",
18
+ "entity": "editor",
19
+ "id": 3787,
20
+ "width": 0,
21
+ "height": 0,
22
+ "compress": true,
23
+ "template": 1
24
+ }
25
+ * @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
26
+ * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
27
+ * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
28
+ * @param {number} [fileQuery.width] - Optional width parameter. Example: 0.
29
+ * @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
30
+ * @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
31
+ * @param {any} [fileQuery.template] - preview template identifier. Example: 1.
32
+ * @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
33
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
34
  * @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.
35
35
  */
@@ -37,19 +37,19 @@ interface IFileUploading {
37
37
  /**
38
38
  * Deletes a file from the cloud file storage.
39
39
  * @handleName delete
40
- * @param {string} [filename] - File name. Example: "file.png".
41
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
42
- {
43
- "type": "page",
44
- "entity": "editor",
45
- "id": 3787,
46
- "template": 1
47
- }
48
- * @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
49
- * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
50
- * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
51
- * @param {number} [fileQuery.template] - preview template identifier. Example: 1.
52
- * @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
40
+ * @param {string} [filename] - File name. Example: "file.png".
41
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
42
+ {
43
+ "type": "page",
44
+ "entity": "editor",
45
+ "id": 3787,
46
+ "template": 1
47
+ }
48
+ * @param {string} [fileQuery.type] - Type, determines the folder name in the storage. Example: "page".
49
+ * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
50
+ * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
51
+ * @param {number} [fileQuery.template] - preview template identifier. Example: 1.
52
+ * @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
53
53
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
54
54
  * @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.
55
55
  */
@@ -57,11 +57,11 @@ interface IFileUploading {
57
57
  /**
58
58
  * Retrieves a file by its parameters.
59
59
  * @handleName getFile
60
- * @param {number} id - The ID of the file entity. Example: 3787.
61
- * @param {string} type - The type of the file. Example: "page".
62
- * @param {string} entity - The entity associated with the file. Example: "editor".
63
- * @param {string} [filename] - Optional filename to retrieve. Example: "file.png".
64
- * @returns {Blob} A promise that resolves to a Blob object or an error.
60
+ * @param {number} id - The ID of the file entity. Example: 3787.
61
+ * @param {string} type - The type of the file. Example: "page".
62
+ * @param {string} entity - The entity associated with the file. Example: "editor".
63
+ * @param {string} [filename] - Optional filename to retrieve. Example: "file.png".
64
+ * @returns {Blob} A promise that resolves to a Blob object or an error.
65
65
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
66
66
  * @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.
67
67
  */
@@ -79,11 +79,11 @@ interface IFileEntity {
79
79
  /**
80
80
  * Represents a query for uploading files, including type, entity, and optional parameters like width, height, and compression.
81
81
  * @interface IUploadingQuery
82
- * @property {string} type - Type, determines the folder name in the storage. Example: "page".
83
- * @property {string} entity - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
84
- * @property {number} id - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
85
- * @property {number} [width] - Width parameter. Example: 0.
86
- * @property {number} [height] - Height parameter. Example: 0.
82
+ * @property {string} type - Type, determines the folder name in the storage. Example: "page".
83
+ * @property {string} entity - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
84
+ * @property {number} id - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
85
+ * @property {number} [width] - Width parameter. Example: 0.
86
+ * @property {number} [height] - Height parameter. Example: 0.
87
87
  * @property {boolean} [compress] - Flag of optimization (compression) for images. Example: true.
88
88
  * @description Represents a query for uploading files, including type, entity, and optional parameters like width, height, and compression.
89
89
  */
@@ -96,9 +96,9 @@ interface IUploadingQuery {
96
96
  /**
97
97
  * Represents the return value of an uploading operation, including the filename, download link, and file size.
98
98
  * @interface IUploadingReturn
99
- * @property {string} filename - Filename with relative path. Example: "uploads/file.png".
99
+ * @property {string} filename - Filename with relative path. Example: "uploads/file.png".
100
100
  * @property {string} downloadLink - Link for downloading the file. Example: "https://example.com/uploads/file.png".
101
- * @property {number} size - Size of the file in bytes. Example: 1024.
101
+ * @property {number} size - Size of the file in bytes. Example: 1024.
102
102
  * @description Represents the return value of an uploading operation, including the filename, download link, and file size.
103
103
  */
104
104
  interface IUploadingReturn {
@@ -23,10 +23,10 @@ export default class FormsApi extends AsyncModules implements IForms {
23
23
  /**
24
24
  * Get all forms.
25
25
  * @handleName getAllForms
26
- * @param {string} [langCode] - Language code. Default: "en_US".
27
- * @param {number} [offset] - Parameter for pagination. Default: 0.
28
- * @param {number} [limit] - Parameter for pagination. Default: 30.
29
- * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
26
+ * @param {string} [langCode] - Language code. Default: "en_US".
27
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
28
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
29
+ * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
30
30
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
31
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.
32
32
  */
@@ -34,9 +34,9 @@ export default class FormsApi extends AsyncModules implements IForms {
34
34
  /**
35
35
  * Get one form by form marker.
36
36
  * @handleName getFormByMarker
37
- * @param {string} marker - Marker of form. Example: "contact_form".
38
- * @param {string} [langCode] - Language code. Default: "en_US".
39
- * @returns {IFormsEntity} Returns object of type FormEntity.
37
+ * @param {string} marker - Marker of form. Example: "contact_form".
38
+ * @param {string} [langCode] - Language code. Default: "en_US".
39
+ * @returns {IFormsEntity} Returns object of type FormEntity.
40
40
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
41
41
  * @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.
42
42
  */
@@ -26,10 +26,10 @@ class FormsApi extends asyncModules_1.default {
26
26
  /**
27
27
  * Get all forms.
28
28
  * @handleName getAllForms
29
- * @param {string} [langCode] - Language code. Default: "en_US".
30
- * @param {number} [offset] - Parameter for pagination. Default: 0.
31
- * @param {number} [limit] - Parameter for pagination. Default: 30.
32
- * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
29
+ * @param {string} [langCode] - Language code. Default: "en_US".
30
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
31
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
32
+ * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
33
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
34
  * @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.
35
35
  */
@@ -40,9 +40,9 @@ class FormsApi extends asyncModules_1.default {
40
40
  /**
41
41
  * Get one form by form marker.
42
42
  * @handleName getFormByMarker
43
- * @param {string} marker - Marker of form. Example: "contact_form".
44
- * @param {string} [langCode] - Language code. Default: "en_US".
45
- * @returns {IFormsEntity} Returns object of type FormEntity.
43
+ * @param {string} marker - Marker of form. Example: "contact_form".
44
+ * @param {string} [langCode] - Language code. Default: "en_US".
45
+ * @returns {IFormsEntity} Returns object of type FormEntity.
46
46
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
47
47
  * @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.
48
48
  */
@@ -3,7 +3,7 @@ import type { IAttributes, IError, ILocalizeInfo } from '../base/utils';
3
3
  /**
4
4
  * Interface for retrieving forms in the system.
5
5
  * @interface IForms
6
- * @property {Function} getAllForms - Get all forms in array.
6
+ * @property {Function} getAllForms - Get all forms in array.
7
7
  * @property {Function} getFormByMarker - Get one form by form marker.
8
8
  * @description This interface defines methods for retrieving forms in the system.
9
9
  */
@@ -11,10 +11,10 @@ interface IForms {
11
11
  /**
12
12
  * Retrieves all forms in the system.
13
13
  * @handleName getAllForms
14
- * @param {string} [langCode] - The language code for localization. Default: "en_US".
15
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
16
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
17
- * @returns {IFormsEntity[]} A promise that resolves to an array of form entities or an error.
14
+ * @param {string} [langCode] - The language code for localization. Default: "en_US".
15
+ * @param {number} [offset] - Optional offset for pagination. Default: 0.
16
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
17
+ * @returns {IFormsEntity[]} A promise that resolves to an array of form entities or an error.
18
18
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
19
19
  * @description This method retrieves all forms in the system.
20
20
  */
@@ -22,9 +22,9 @@ interface IForms {
22
22
  /**
23
23
  * Retrieves a form by its marker.
24
24
  * @handleName getFormByMarker
25
- * @param {string} marker - The marker identifying the form. Example: "contact_form".
26
- * @param {string} [langCode] - The language code for localization. Default: "en_US".
27
- * @returns {IFormsEntity} A promise that resolves to a form entity or an error.
25
+ * @param {string} marker - The marker identifying the form. Example: "contact_form".
26
+ * @param {string} [langCode] - The language code for localization. Default: "en_US".
27
+ * @returns {IFormsEntity} A promise that resolves to a form entity or an error.
28
28
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
29
29
  * @description This method retrieves a form by its marker.
30
30
  */
@@ -33,19 +33,19 @@ interface IForms {
33
33
  /**
34
34
  * Represents the structure of a form page.
35
35
  * @interface IFromPages
36
- * @property {number} id - The unique identifier of the form page. Example: 123.
37
- * @property {number} pageId - The identifier of the page. Example: 12.
38
- * @property {number} formId - The identifier of the form. Example: 321.
39
- * @property {number} positionId - The identifier of the position. Example: 1.
40
- * @property {IPosition} position - The position object. Example:
41
- {
42
- "id": 1,
43
- "position": 1,
44
- "objectId": 2,
45
- "objectType": "admin",
46
- "isLocked": false,
47
- "objectCategoryId": 1
48
- }
36
+ * @property {number} id - The unique identifier of the form page. Example: 123.
37
+ * @property {number} pageId - The identifier of the page. Example: 12.
38
+ * @property {number} formId - The identifier of the form. Example: 321.
39
+ * @property {number} positionId - The identifier of the position. Example: 1.
40
+ * @property {IPosition} position - The position object. Example:
41
+ {
42
+ "id": 1,
43
+ "position": 1,
44
+ "objectId": 2,
45
+ "objectType": "admin",
46
+ "isLocked": false,
47
+ "objectCategoryId": 1
48
+ }
49
49
  * @description This interface defines the structure of a form page.
50
50
  */
51
51
  interface IFromPages {
@@ -58,16 +58,16 @@ interface IFromPages {
58
58
  /**
59
59
  * Represents the structure of a form entity.
60
60
  * @interface IFormsEntity
61
- * @property {number} id - The identifier of the object. Example: 12345.
62
- * @property {number | null} attributeSetId - The identifier of the attribute set being used, or null if not applicable. Example: 1234.
63
- * @property {string | null} type - Form type. Example: "contact".
64
- * @property {ILocalizeInfo} localizeInfos - The name of the form, taking into account localization. Example: {"key": "value"}.
65
- * @property {number} version - The version number of the object. Example: 1.
66
- * @property {number} position - The position of the object. Example: 1.
67
- * @property {string} identifier - The textual identifier for the record field. Example: "form_contact_us".
68
- * @property {string} processingType - Type of form processing. Example: "async".
69
- * @property {number | null} templateId - The identifier of the template used by the form, or null if no template is used. Example: 6789.
70
- * @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"}.
61
+ * @property {number} id - The identifier of the object. Example: 12345.
62
+ * @property {number | null} attributeSetId - The identifier of the attribute set being used, or null if not applicable. Example: 1234.
63
+ * @property {string | null} type - Form type. Example: "contact".
64
+ * @property {ILocalizeInfo} localizeInfos - The name of the form, taking into account localization. Example: {"key": "value"}.
65
+ * @property {number} version - The version number of the object. Example: 1.
66
+ * @property {number} position - The position of the object. Example: 1.
67
+ * @property {string} identifier - The textual identifier for the record field. Example: "form_contact_us".
68
+ * @property {string} processingType - Type of form processing. Example: "async".
69
+ * @property {number | null} templateId - The identifier of the template used by the form, or null if no template is used. Example: 6789.
70
+ * @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"}.
71
71
  * @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
72
72
  */
73
73
  interface IFormsEntity {
@@ -83,6 +83,18 @@ interface IFormsEntity {
83
83
  attributes: IAttributes[] | Record<string, any>;
84
84
  moduleFormConfigs?: Array<IFormConfig>;
85
85
  }
86
+ /**
87
+ * Represents the structure of a form configuration.
88
+ * @interface IFormConfig
89
+ * @property {number} id - The identifier of the form configuration. Example: 123.
90
+ * @property {string} moduleIdentifier - The identifier of the module associated with the form configuration. Example: "module_identifier".
91
+ * @property {boolean} isGlobal - Indicates whether the form configuration is global. Example: true.
92
+ * @property {boolean} isClosed - Indicates whether the form configuration is closed. Example: true.
93
+ * @property {boolean} viewOnlyUserData - Indicates whether the form configuration allows viewing user data. Example: true.
94
+ * @property {boolean} commentOnlyUserData - Indicates whether the form configuration allows commenting on user data. Example: true.
95
+ * @property {string[]} entityIdentifiers - An array of entity identifiers associated with the form configuration. Example: ["entity_identifier_1", "entity_identifier_2"].
96
+ * @description This interface defines the structure of a form configuration, including its identifiers, module association, and entity identifiers.
97
+ */
86
98
  interface IFormConfig {
87
99
  id: number;
88
100
  moduleIdentifier: string;
@@ -14,16 +14,16 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
14
14
  protected state: StateModule;
15
15
  protected _url: string;
16
16
  /**
17
- *
17
+ * Constructor for FormsDataApi class.
18
18
  */
19
19
  constructor(state: StateModule);
20
20
  /**
21
21
  * Get all forms data.
22
22
  * @handleName getFormsData
23
- * @param {string} [langCode] - Language code. Default: "en_US".
24
- * @param {number} [offset] - Parameter for pagination. Default: 0.
25
- * @param {number} [limit] - Parameter for pagination. Default: 30.
26
- * @returns {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
23
+ * @param {string} [langCode] - Language code. Default: "en_US".
24
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
25
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
26
+ * @returns {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
27
27
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
28
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.
29
29
  */
@@ -31,23 +31,35 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
31
31
  /**
32
32
  * Creating an object of data save information by form
33
33
  * @handleName postFormsData
34
- * @param {IBodyPostFormData} body - Request body. Example:
35
- {
36
- "formIdentifier": "test-form",
37
- "formModuleConfigId": 2,
38
- "moduleEntityIdentifier": "blog",
39
- "replayTo": null,
40
- "status": "sent",
41
- "formData": [
42
- {
43
- "marker": "name",
44
- "type": "string",
45
- "value": "Test"
46
- }
47
- ]
48
- }
49
- * @param {string} [langCode] - Language code. Default: "en_US".
50
- * @returns {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
34
+ * @param {IBodyPostFormData} body - Request body. Example:
35
+ {
36
+ "formIdentifier": "test-form",
37
+ "formModuleConfigId": 2,
38
+ "moduleEntityIdentifier": "blog",
39
+ "replayTo": null,
40
+ "status": "sent",
41
+ "formData": [
42
+ {
43
+ "marker": "name",
44
+ "type": "string",
45
+ "value": "Test"
46
+ }
47
+ ]
48
+ }
49
+ * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
50
+ * @param {FormDataType[]} body.formData - Form data. Example:
51
+ [
52
+ {
53
+ "marker": "name",
54
+ "type": "string",
55
+ "value": "Jack"
56
+ }
57
+ ]
58
+ * @param {string} body.formData.marker - The marker identifying the form field. Example: "name".
59
+ * @param {string} body.formData.type - The type of the form field. Example: "string".
60
+ * @param {string} body.formData.value - The value of the form field. Example: "Jack".
61
+ * @param {string} [langCode] - Language code. Default: "en_US".
62
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
51
63
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
52
64
  * @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.
53
65
  */
@@ -55,21 +67,21 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
55
67
  /**
56
68
  * Get one object of form data by marker.
57
69
  * @handleName getFormsDataByMarker
58
- * @param {string} marker - Marker of the form. Example: "contact_form".
59
- * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
60
- * @param {object} [body] - Request body. Example:
61
- {
62
- "entityIdentifier": "test",
63
- "userIdentifier": "",
64
- "status": "",
65
- "dateFrom": "2025-08-11",
66
- "dateTo": ""
67
- }
68
- * @param {any} [isNested] - Flag for getting hierarchical data. Example: 1.
69
- * @param {string} [langCode] - Language code. Default: "en_US".
70
- * @param {number} [offset] - Parameter for pagination. Default: 0.
71
- * @param {number} [limit] - Parameter for pagination. Default: 30.
72
- * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
70
+ * @param {string} marker - Marker of the form. Example: "contact_form".
71
+ * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
72
+ * @param {object} [body] - Request body. Example:
73
+ {
74
+ "entityIdentifier": "test",
75
+ "userIdentifier": "",
76
+ "status": "",
77
+ "dateFrom": "2025-08-11",
78
+ "dateTo": ""
79
+ }
80
+ * @param {any} [isNested] - Flag for getting hierarchical data. Example: 1.
81
+ * @param {string} [langCode] - Language code. Default: "en_US".
82
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
83
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
84
+ * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
73
85
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
74
86
  * @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.
75
87
  */
@@ -17,7 +17,7 @@ const fileUploadingApi_1 = __importDefault(require("../file-uploading/fileUpload
17
17
  */
18
18
  class FormsDataApi extends asyncModules_1.default {
19
19
  /**
20
- *
20
+ * Constructor for FormsDataApi class.
21
21
  */
22
22
  constructor(state) {
23
23
  super(state);
@@ -26,10 +26,10 @@ class FormsDataApi extends asyncModules_1.default {
26
26
  /**
27
27
  * Get all forms data.
28
28
  * @handleName getFormsData
29
- * @param {string} [langCode] - Language code. Default: "en_US".
30
- * @param {number} [offset] - Parameter for pagination. Default: 0.
31
- * @param {number} [limit] - Parameter for pagination. Default: 30.
32
- * @returns {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
29
+ * @param {string} [langCode] - Language code. Default: "en_US".
30
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
31
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
32
+ * @returns {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
33
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
34
  * @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.
35
35
  */
@@ -40,23 +40,35 @@ class FormsDataApi extends asyncModules_1.default {
40
40
  /**
41
41
  * Creating an object of data save information by form
42
42
  * @handleName postFormsData
43
- * @param {IBodyPostFormData} body - Request body. Example:
44
- {
45
- "formIdentifier": "test-form",
46
- "formModuleConfigId": 2,
47
- "moduleEntityIdentifier": "blog",
48
- "replayTo": null,
49
- "status": "sent",
50
- "formData": [
51
- {
52
- "marker": "name",
53
- "type": "string",
54
- "value": "Test"
55
- }
56
- ]
57
- }
58
- * @param {string} [langCode] - Language code. Default: "en_US".
59
- * @returns {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
43
+ * @param {IBodyPostFormData} body - Request body. Example:
44
+ {
45
+ "formIdentifier": "test-form",
46
+ "formModuleConfigId": 2,
47
+ "moduleEntityIdentifier": "blog",
48
+ "replayTo": null,
49
+ "status": "sent",
50
+ "formData": [
51
+ {
52
+ "marker": "name",
53
+ "type": "string",
54
+ "value": "Test"
55
+ }
56
+ ]
57
+ }
58
+ * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
59
+ * @param {FormDataType[]} body.formData - Form data. Example:
60
+ [
61
+ {
62
+ "marker": "name",
63
+ "type": "string",
64
+ "value": "Jack"
65
+ }
66
+ ]
67
+ * @param {string} body.formData.marker - The marker identifying the form field. Example: "name".
68
+ * @param {string} body.formData.type - The type of the form field. Example: "string".
69
+ * @param {string} body.formData.value - The value of the form field. Example: "Jack".
70
+ * @param {string} [langCode] - Language code. Default: "en_US".
71
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
60
72
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
61
73
  * @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.
62
74
  */
@@ -116,26 +128,25 @@ class FormsDataApi extends asyncModules_1.default {
116
128
  /**
117
129
  * Get one object of form data by marker.
118
130
  * @handleName getFormsDataByMarker
119
- * @param {string} marker - Marker of the form. Example: "contact_form".
120
- * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
121
- * @param {object} [body] - Request body. Example:
122
- {
123
- "entityIdentifier": "test",
124
- "userIdentifier": "",
125
- "status": "",
126
- "dateFrom": "2025-08-11",
127
- "dateTo": ""
128
- }
129
- * @param {any} [isNested] - Flag for getting hierarchical data. Example: 1.
130
- * @param {string} [langCode] - Language code. Default: "en_US".
131
- * @param {number} [offset] - Parameter for pagination. Default: 0.
132
- * @param {number} [limit] - Parameter for pagination. Default: 30.
133
- * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
131
+ * @param {string} marker - Marker of the form. Example: "contact_form".
132
+ * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
133
+ * @param {object} [body] - Request body. Example:
134
+ {
135
+ "entityIdentifier": "test",
136
+ "userIdentifier": "",
137
+ "status": "",
138
+ "dateFrom": "2025-08-11",
139
+ "dateTo": ""
140
+ }
141
+ * @param {any} [isNested] - Flag for getting hierarchical data. Example: 1.
142
+ * @param {string} [langCode] - Language code. Default: "en_US".
143
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
144
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
145
+ * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
134
146
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
135
147
  * @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.
136
148
  */
137
149
  async getFormsDataByMarker(marker, formModuleConfigId, body = {}, isNested = 1, langCode = this.state.lang, offset = 0, limit = 30) {
138
- // ): Promise<IFormByMarkerDataEntity | IError> {
139
150
  const result = await this._fetchPost(`/marker/${marker}?formModuleConfigId=${formModuleConfigId}&isNested=${isNested}&langCode=${langCode}&offset=${offset}&limit=${limit}`, body);
140
151
  return this._dataPostProcess(result, langCode);
141
152
  }