oneentry 1.0.126 → 1.0.128

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 (83) hide show
  1. package/README.md +0 -2
  2. package/configure.js +25 -18
  3. package/dist/admins/adminsApi.d.ts +18 -13
  4. package/dist/admins/adminsApi.js +18 -13
  5. package/dist/admins/adminsInterfaces.d.ts +16 -25
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +14 -15
  7. package/dist/attribute-sets/attributeSetsApi.js +14 -15
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +78 -84
  9. package/dist/auth-provider/authProviderApi.d.ts +53 -79
  10. package/dist/auth-provider/authProviderApi.js +52 -78
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +98 -94
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +39 -29
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -5
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +42 -50
  19. package/dist/base/syncModules.js +106 -58
  20. package/dist/base/utils.d.ts +33 -2
  21. package/dist/blocks/blocksApi.d.ts +9 -18
  22. package/dist/blocks/blocksApi.js +9 -18
  23. package/dist/blocks/blocksInterfaces.d.ts +41 -46
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +10 -27
  27. package/dist/events/eventsApi.js +26 -40
  28. package/dist/events/eventsInterfaces.d.ts +33 -28
  29. package/dist/file-uploading/fileUploadingApi.d.ts +12 -17
  30. package/dist/file-uploading/fileUploadingApi.js +14 -17
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +8 -19
  32. package/dist/forms/formsApi.d.ts +10 -9
  33. package/dist/forms/formsApi.js +10 -9
  34. package/dist/forms/formsInterfaces.d.ts +20 -12
  35. package/dist/forms-data/formsDataApi.d.ts +24 -28
  36. package/dist/forms-data/formsDataApi.js +25 -28
  37. package/dist/forms-data/formsDataInterfaces.d.ts +71 -71
  38. package/dist/general-types/generalTypesApi.d.ts +5 -5
  39. package/dist/general-types/generalTypesApi.js +5 -5
  40. package/dist/general-types/generalTypesInterfaces.d.ts +5 -8
  41. package/dist/index.d.ts +3 -4
  42. package/dist/index.js +3 -4
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +29 -47
  44. package/dist/integration-collections/integrationCollectionsApi.js +31 -51
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +62 -58
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +6 -5
  49. package/dist/menus/menusApi.d.ts +7 -3
  50. package/dist/menus/menusApi.js +7 -3
  51. package/dist/menus/menusInterfaces.d.ts +5 -10
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +17 -25
  54. package/dist/orders/ordersApi.js +17 -26
  55. package/dist/orders/ordersInterfaces.d.ts +94 -53
  56. package/dist/pages/pagesApi.d.ts +47 -60
  57. package/dist/pages/pagesApi.js +51 -61
  58. package/dist/pages/pagesInterfaces.d.ts +44 -48
  59. package/dist/payments/paymentsApi.d.ts +17 -27
  60. package/dist/payments/paymentsApi.js +17 -31
  61. package/dist/payments/paymentsInterfaces.d.ts +35 -29
  62. package/dist/product-statuses/productStatusesApi.d.ts +9 -9
  63. package/dist/product-statuses/productStatusesApi.js +9 -9
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +14 -12
  65. package/dist/products/productsApi.d.ts +23 -44
  66. package/dist/products/productsApi.js +24 -44
  67. package/dist/products/productsInterfaces.d.ts +51 -57
  68. package/dist/system/systemApi.d.ts +11 -13
  69. package/dist/system/systemApi.js +12 -13
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +8 -11
  72. package/dist/templates/templatesApi.js +8 -11
  73. package/dist/templates/templatesInterfaces.d.ts +13 -12
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +7 -8
  75. package/dist/templates-preview/templatesPreviewApi.js +7 -8
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +15 -18
  77. package/dist/users/usersApi.d.ts +13 -20
  78. package/dist/users/usersApi.js +13 -20
  79. package/dist/users/usersInterfaces.d.ts +26 -30
  80. package/dist/web-socket/wsApi.d.ts +5 -3
  81. package/dist/web-socket/wsApi.js +6 -3
  82. package/dist/web-socket/wsInterfaces.d.ts +7 -2
  83. package/package.json +16 -12
@@ -3,19 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* eslint-disable jsdoc/reject-any-type */
6
7
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
8
  // import { IFileEntity } from './fileUploadingInterfaces';
8
9
  /**
9
10
  * Controllers for working with file uploading
10
- *
11
11
  * @handle /api/content/files
12
12
  * @class FileUploadingApi
13
- * @extends AsyncModules
13
+ * @augments AsyncModules
14
14
  * @implements {IFileUploading}
15
- *
16
15
  * @description This class provides methods to upload and delete files in a cloud file storage, as well as retrieve files by parameters.
17
16
  */
18
17
  class FileUploadingApi extends asyncModules_1.default {
18
+ /**
19
+ *
20
+ */
19
21
  constructor(state) {
20
22
  super(state);
21
23
  this._defaultQuery = {
@@ -30,9 +32,7 @@ class FileUploadingApi extends asyncModules_1.default {
30
32
  }
31
33
  /**
32
34
  * Upload file function.
33
- *
34
35
  * @handleName upload
35
- *
36
36
  * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
37
37
  * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
38
38
  {
@@ -51,7 +51,7 @@ class FileUploadingApi extends asyncModules_1.default {
51
51
  * @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
52
52
  * @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
53
53
  * @param {any} [fileQuery.template] - preview template identifier. Example: 1.
54
- * @return {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
54
+ * @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
55
55
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
56
56
  * @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.
57
57
  */
@@ -64,10 +64,8 @@ class FileUploadingApi extends asyncModules_1.default {
64
64
  }
65
65
  /**
66
66
  * Deletes a file from the cloud file storage.
67
- *
68
67
  * @handleName delete
69
- *
70
- * @param {string} [filename] - File name. Example: "file.png".
68
+ * @param {string} filename - File name. Example: "file.png".
71
69
  * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
72
70
  {
73
71
  "type": "page",
@@ -79,7 +77,7 @@ class FileUploadingApi extends asyncModules_1.default {
79
77
  * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
80
78
  * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
81
79
  * @param {number} [fileQuery.template] - preview template identifier. Example: 1.
82
- * @return {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
80
+ * @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
83
81
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
84
82
  * @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.
85
83
  */
@@ -90,19 +88,18 @@ class FileUploadingApi extends asyncModules_1.default {
90
88
  }
91
89
  /**
92
90
  * Get file by parameters.
93
- *
94
91
  * @handleName getFile
95
- *
96
- * @param {number} [id] - Object identifier, from which the file is uploaded, determines the folder name in the storage. Example: 3787.
97
- * @param {string} [type] - Type, determines the folder name in the storage. Example: "page".
98
- * @param {string} [entity] - Entity name, from which the file is uploaded, determines the folder name in the storage. Example: "editor".
99
- * @param {string} [filename] - Filename. Example: "file.png".
92
+ * @param {number} id - Object identifier, from which the file is uploaded, determines the folder name in the storage. Example: 3787.
93
+ * @param {string} type - Type, determines the folder name in the storage. Example: "page".
94
+ * @param {string} entity - Entity name, from which the file is uploaded, determines the folder name in the storage. Example: "editor".
95
+ * @param {string} filename - Filename. Example: "file.png".
100
96
  * @param {string} [template] - Preview template identifier. Example: 1.
101
- * @return {any} Returns a promise that resolves to a Blob object containing the file data or an error object if there was an issue.
97
+ * @returns {any} Returns a promise that resolves to a Blob object containing the file data or an error object if there was an issue.
102
98
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
103
99
  * @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.
104
100
  */
105
101
  async getFile(id, type, entity, filename, template) {
102
+ // eslint-disable-next-line no-undef
106
103
  const response = await fetch(this._getFullPath(`?id=${id}&type=${type}&entity=${entity}${`&filename=${filename}`}${template ? `&template=${template}` : ''}`), {
107
104
  method: 'GET',
108
105
  headers: {
@@ -1,20 +1,16 @@
1
1
  import type { IError } from '../base/utils';
2
2
  /**
3
3
  * Interface for uploading, deleting, and retrieving files in the CMS.
4
- *
5
4
  * @interface IFileUploading
6
- *
7
- * @property {function} upload - Upload file from CMS.
8
- * @property {function} delete - Delete file from CMS.
9
- * @property {function} getFile - Get file by parameters.
5
+ * @property {Function} upload - Upload file from CMS.
6
+ * @property {Function} delete - Delete file from CMS.
7
+ * @property {Function} getFile - Get file by parameters.
10
8
  * @description This interface defines methods for uploading, deleting, and retrieving files in the CMS.
11
9
  */
12
10
  interface IFileUploading {
13
11
  /**
14
12
  * Upload file function.
15
- *
16
13
  * @handleName upload
17
- *
18
14
  * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
19
15
  * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
20
16
  {
@@ -33,16 +29,14 @@ interface IFileUploading {
33
29
  * @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
34
30
  * @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
35
31
  * @param {any} [fileQuery.template] - preview template identifier. Example: 1.
36
- * @return {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
32
+ * @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
37
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
38
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.
39
35
  */
40
36
  upload(file: File | Blob, fileQuery?: IUploadingQuery): Promise<IUploadingReturn[] | IError>;
41
37
  /**
42
38
  * Deletes a file from the cloud file storage.
43
- *
44
39
  * @handleName delete
45
- *
46
40
  * @param {string} [filename] - File name. Example: "file.png".
47
41
  * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
48
42
  {
@@ -55,28 +49,27 @@ interface IFileUploading {
55
49
  * @param {string} [fileQuery.entity] - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
56
50
  * @param {number} [fileQuery.id] - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
57
51
  * @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.
52
+ * @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
59
53
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
60
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.
61
55
  */
62
56
  delete(filename: string, fileQuery?: IUploadingQuery): Promise<any | IError>;
63
57
  /**
64
58
  * Retrieves a file by its parameters.
65
- *
59
+ * @handleName getFile
66
60
  * @param {number} id - The ID of the file entity. Example: 3787.
67
61
  * @param {string} type - The type of the file. Example: "page".
68
62
  * @param {string} entity - The entity associated with the file. Example: "editor".
69
63
  * @param {string} [filename] - Optional filename to retrieve. Example: "file.png".
70
- * @return {Blob} A promise that resolves to a Blob object or an error.
64
+ * @returns {Blob} A promise that resolves to a Blob object or an error.
71
65
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
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.
72
67
  */
73
68
  getFile(id: number, type: string, entity: string, filename?: string): Promise<any | IError>;
74
69
  }
75
70
  /**
76
71
  * Represents a file entity with a file object or string path.
77
- *
78
72
  * @interface IFileEntity
79
- *
80
73
  * @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".
81
74
  * @description Represents a file entity that may contain a file object or a path as a string.
82
75
  */
@@ -85,9 +78,7 @@ interface IFileEntity {
85
78
  }
86
79
  /**
87
80
  * Represents a query for uploading files, including type, entity, and optional parameters like width, height, and compression.
88
- *
89
81
  * @interface IUploadingQuery
90
- *
91
82
  * @property {string} type - Type, determines the folder name in the storage. Example: "page".
92
83
  * @property {string} entity - Entity name from which the file is uploaded, determines the folder name in the storage. Example: "editor".
93
84
  * @property {number} id - Identifier of the object from which the file is uploaded, determines the folder name in the storage. Example: 3787.
@@ -104,9 +95,7 @@ interface IUploadingQuery {
104
95
  }
105
96
  /**
106
97
  * Represents the return value of an uploading operation, including the filename, download link, and file size.
107
- *
108
98
  * @interface IUploadingReturn
109
- *
110
99
  * @property {string} filename - Filename with relative path. Example: "uploads/file.png".
111
100
  * @property {string} downloadLink - Link for downloading the file. Example: "https://example.com/uploads/file.png".
112
101
  * @property {number} size - Size of the file in bytes. Example: 1024.
@@ -4,38 +4,39 @@ import type { IError } from '../base/utils';
4
4
  import type { IForms, IFormsEntity } from './formsInterfaces';
5
5
  /**
6
6
  * Controllers for forms objects
7
- *
8
7
  * @class FormsApi
9
- * @extends AsyncModules
8
+ * @augments AsyncModules
10
9
  * @implements {IForms}
11
- *
12
10
  * @description This class provides methods to interact with forms, including retrieving all forms and getting a form by its marker.
13
11
  */
14
12
  export default class FormsApi extends AsyncModules implements IForms {
15
13
  protected state: StateModule;
16
14
  protected _url: string;
15
+ /**
16
+ * Initializes the FormsApi with the provided state module.
17
+ * @class
18
+ * @class FormsApi
19
+ * @param {StateModule} state - The state module containing configuration data.
20
+ * @description Constructor initializes the FormsApi with a given state.
21
+ */
17
22
  constructor(state: StateModule);
18
23
  /**
19
24
  * Get all forms.
20
- *
21
25
  * @handleName getAllForms
22
- *
23
26
  * @param {string} [langCode] - Language code. Default: "en_US".
24
27
  * @param {number} [offset] - Parameter for pagination. Default: 0.
25
28
  * @param {number} [limit] - Parameter for pagination. Default: 30.
26
- * @return {IFormsEntity[]} Returns array for all objects of type FormEntity.
29
+ * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
27
30
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
28
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.
29
32
  */
30
33
  getAllForms(langCode?: string, offset?: number, limit?: number): Promise<IFormsEntity[] | IError>;
31
34
  /**
32
35
  * Get one form by form marker.
33
- *
34
36
  * @handleName getFormByMarker
35
- *
36
37
  * @param {string} marker - Marker of form. Example: "contact_form".
37
38
  * @param {string} [langCode] - Language code. Default: "en_US".
38
- * @return {IFormsEntity} Returns object of type FormEntity.
39
+ * @returns {IFormsEntity} Returns object of type FormEntity.
39
40
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
40
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.
41
42
  */
@@ -6,27 +6,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
7
  /**
8
8
  * Controllers for forms objects
9
- *
10
9
  * @class FormsApi
11
- * @extends AsyncModules
10
+ * @augments AsyncModules
12
11
  * @implements {IForms}
13
- *
14
12
  * @description This class provides methods to interact with forms, including retrieving all forms and getting a form by its marker.
15
13
  */
16
14
  class FormsApi extends asyncModules_1.default {
15
+ /**
16
+ * Initializes the FormsApi with the provided state module.
17
+ * @class
18
+ * @class FormsApi
19
+ * @param {StateModule} state - The state module containing configuration data.
20
+ * @description Constructor initializes the FormsApi with a given state.
21
+ */
17
22
  constructor(state) {
18
23
  super(state);
19
24
  this._url = state.url + '/api/content/forms';
20
25
  }
21
26
  /**
22
27
  * Get all forms.
23
- *
24
28
  * @handleName getAllForms
25
- *
26
29
  * @param {string} [langCode] - Language code. Default: "en_US".
27
30
  * @param {number} [offset] - Parameter for pagination. Default: 0.
28
31
  * @param {number} [limit] - Parameter for pagination. Default: 30.
29
- * @return {IFormsEntity[]} Returns array for all objects of type FormEntity.
32
+ * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
30
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
31
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.
32
35
  */
@@ -36,12 +39,10 @@ class FormsApi extends asyncModules_1.default {
36
39
  }
37
40
  /**
38
41
  * Get one form by form marker.
39
- *
40
42
  * @handleName getFormByMarker
41
- *
42
43
  * @param {string} marker - Marker of form. Example: "contact_form".
43
44
  * @param {string} [langCode] - Language code. Default: "en_US".
44
- * @return {IFormsEntity} Returns object of type FormEntity.
45
+ * @returns {IFormsEntity} Returns object of type FormEntity.
45
46
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
46
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.
47
48
  */
@@ -2,39 +2,37 @@ import type { IPosition } from '../admins/adminsInterfaces';
2
2
  import type { IAttributes, IError, ILocalizeInfo } from '../base/utils';
3
3
  /**
4
4
  * Interface for retrieving forms in the system.
5
- *
6
5
  * @interface IForms
7
- *
8
- * @property {function} getAllForms - Get all forms in array.
9
- * @property {function} getFormByMarker - Get one form by form marker.
6
+ * @property {Function} getAllForms - Get all forms in array.
7
+ * @property {Function} getFormByMarker - Get one form by form marker.
10
8
  * @description This interface defines methods for retrieving forms in the system.
11
9
  */
12
10
  interface IForms {
13
11
  /**
14
12
  * Retrieves all forms in the system.
15
- *
13
+ * @handleName getAllForms
16
14
  * @param {string} [langCode] - The language code for localization. Default: "en_US".
17
15
  * @param {number} [offset] - Optional offset for pagination. Default: 0.
18
16
  * @param {number} [limit] - Optional limit for pagination. Default: 30.
19
- * @return {IFormsEntity[]} A promise that resolves to an array of form entities or an error.
17
+ * @returns {IFormsEntity[]} A promise that resolves to an array of form entities or an error.
20
18
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
19
+ * @description This method retrieves all forms in the system.
21
20
  */
22
21
  getAllForms(langCode: string, offset?: number, limit?: number): Promise<IFormsEntity[] | IError>;
23
22
  /**
24
23
  * Retrieves a form by its marker.
25
- *
24
+ * @handleName getFormByMarker
26
25
  * @param {string} marker - The marker identifying the form. Example: "contact_form".
27
26
  * @param {string} [langCode] - The language code for localization. Default: "en_US".
28
- * @return {IFormsEntity} A promise that resolves to a form entity or an error.
27
+ * @returns {IFormsEntity} A promise that resolves to a form entity or an error.
29
28
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
29
+ * @description This method retrieves a form by its marker.
30
30
  */
31
31
  getFormByMarker(marker: string, langCode: string): Promise<IFormsEntity | IError>;
32
32
  }
33
33
  /**
34
34
  * Represents the structure of a form page.
35
- *
36
35
  * @interface IFromPages
37
- *
38
36
  * @property {number} id - The unique identifier of the form page. Example: 123.
39
37
  * @property {number} pageId - The identifier of the page. Example: 12.
40
38
  * @property {number} formId - The identifier of the form. Example: 321.
@@ -59,9 +57,7 @@ interface IFromPages {
59
57
  }
60
58
  /**
61
59
  * Represents the structure of a form entity.
62
- *
63
60
  * @interface IFormsEntity
64
- *
65
61
  * @property {number} id - The identifier of the object. Example: 12345.
66
62
  * @property {number | null} attributeSetId - The identifier of the attribute set being used, or null if not applicable. Example: 1234.
67
63
  * @property {string | null} type - Form type. Example: "contact".
@@ -87,6 +83,18 @@ interface IFormsEntity {
87
83
  attributes: IAttributes[] | Record<string, any>;
88
84
  moduleFormConfigs?: Array<IFormConfig>;
89
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
+ */
90
98
  interface IFormConfig {
91
99
  id: number;
92
100
  moduleIdentifier: string;
@@ -4,64 +4,60 @@ import type { IError } from '../base/utils';
4
4
  import type { IBodyPostFormData, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IPostFormResponse } from './formsDataInterfaces';
5
5
  /**
6
6
  * Controllers for working with form data
7
- *
8
7
  * @handle /api/content/form-data
9
8
  * @class FormsDataApi
10
- * @extends AsyncModules
9
+ * @augments AsyncModules
11
10
  * @implements {IFormsData}
12
11
  * @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.
13
12
  */
14
13
  export default class FormsDataApi extends AsyncModules implements IFormsData {
15
14
  protected state: StateModule;
16
15
  protected _url: string;
16
+ /**
17
+ * Constructor for FormsDataApi class.
18
+ */
17
19
  constructor(state: StateModule);
18
20
  /**
19
21
  * Get all forms data.
20
- *
21
22
  * @handleName getFormsData
22
- *
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
- * @return {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
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
  */
30
30
  getFormsData(langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
31
31
  /**
32
32
  * Creating an object of data save information by form
33
- *
34
33
  * @handleName postFormsData
35
- *
36
34
  * @param {IBodyPostFormData} body - Request body. Example:
37
- {
38
- formIdentifier: 'test-form',
39
- formModuleConfigId: 2,
40
- moduleEntityIdentifier: 'blog',
41
- replayTo: null,
42
- status: 'sent',
43
- formData: [
44
- {
45
- marker: 'name',
46
- type: 'string',
47
- value: 'Test'
48
- }
49
- ]
50
- }
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
+ }
51
49
  * @param {string} [langCode] - Language code. Default: "en_US".
52
- * @return {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
50
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
53
51
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
54
52
  * @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
53
  */
56
54
  postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
57
55
  /**
58
56
  * Get one object of form data by marker.
59
- *
60
57
  * @handleName getFormsDataByMarker
61
- *
62
58
  * @param {string} marker - Marker of the form. Example: "contact_form".
63
- * @param {number} formModuleConfigId - Example: 12.
64
- * @param {object} [body] - Example:
59
+ * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
60
+ * @param {object} [body] - Request body. Example:
65
61
  {
66
62
  "entityIdentifier": "test",
67
63
  "userIdentifier": "",
@@ -69,11 +65,11 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
69
65
  "dateFrom": "2025-08-11",
70
66
  "dateTo": ""
71
67
  }
72
- * @param {any} [isNested] - Example: 1.
68
+ * @param {any} [isNested] - Flag for getting hierarchical data. Example: 1.
73
69
  * @param {string} [langCode] - Language code. Default: "en_US".
74
70
  * @param {number} [offset] - Parameter for pagination. Default: 0.
75
71
  * @param {number} [limit] - Parameter for pagination. Default: 30.
76
- * @return {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
72
+ * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
77
73
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
78
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.
79
75
  */
@@ -3,32 +3,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* eslint-disable jsdoc/reject-any-type */
6
7
  /* eslint-disable @typescript-eslint/no-explicit-any */
7
8
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
8
9
  const fileUploadingApi_1 = __importDefault(require("../file-uploading/fileUploadingApi"));
9
10
  /**
10
11
  * Controllers for working with form data
11
- *
12
12
  * @handle /api/content/form-data
13
13
  * @class FormsDataApi
14
- * @extends AsyncModules
14
+ * @augments AsyncModules
15
15
  * @implements {IFormsData}
16
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.
17
17
  */
18
18
  class FormsDataApi extends asyncModules_1.default {
19
+ /**
20
+ * Constructor for FormsDataApi class.
21
+ */
19
22
  constructor(state) {
20
23
  super(state);
21
24
  this._url = state.url + '/api/content/form-data';
22
25
  }
23
26
  /**
24
27
  * Get all forms data.
25
- *
26
28
  * @handleName getFormsData
27
- *
28
29
  * @param {string} [langCode] - Language code. Default: "en_US".
29
30
  * @param {number} [offset] - Parameter for pagination. Default: 0.
30
31
  * @param {number} [limit] - Parameter for pagination. Default: 30.
31
- * @return {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
32
+ * @returns {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
32
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
33
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.
34
35
  */
@@ -38,26 +39,24 @@ class FormsDataApi extends asyncModules_1.default {
38
39
  }
39
40
  /**
40
41
  * Creating an object of data save information by form
41
- *
42
42
  * @handleName postFormsData
43
- *
44
43
  * @param {IBodyPostFormData} body - Request body. Example:
45
- {
46
- formIdentifier: 'test-form',
47
- formModuleConfigId: 2,
48
- moduleEntityIdentifier: 'blog',
49
- replayTo: null,
50
- status: 'sent',
51
- formData: [
52
- {
53
- marker: 'name',
54
- type: 'string',
55
- value: 'Test'
56
- }
57
- ]
58
- }
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
+ }
59
58
  * @param {string} [langCode] - Language code. Default: "en_US".
60
- * @return {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
59
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
61
60
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
62
61
  * @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
62
  */
@@ -116,12 +115,10 @@ class FormsDataApi extends asyncModules_1.default {
116
115
  }
117
116
  /**
118
117
  * Get one object of form data by marker.
119
- *
120
118
  * @handleName getFormsDataByMarker
121
- *
122
119
  * @param {string} marker - Marker of the form. Example: "contact_form".
123
- * @param {number} formModuleConfigId - Example: 12.
124
- * @param {object} [body] - Example:
120
+ * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
121
+ * @param {object} [body] - Request body. Example:
125
122
  {
126
123
  "entityIdentifier": "test",
127
124
  "userIdentifier": "",
@@ -129,11 +126,11 @@ class FormsDataApi extends asyncModules_1.default {
129
126
  "dateFrom": "2025-08-11",
130
127
  "dateTo": ""
131
128
  }
132
- * @param {any} [isNested] - Example: 1.
129
+ * @param {any} [isNested] - Flag for getting hierarchical data. Example: 1.
133
130
  * @param {string} [langCode] - Language code. Default: "en_US".
134
131
  * @param {number} [offset] - Parameter for pagination. Default: 0.
135
132
  * @param {number} [limit] - Parameter for pagination. Default: 30.
136
- * @return {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
133
+ * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
137
134
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
138
135
  * @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.
139
136
  */