oneentry 1.0.126 → 1.0.127

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 +30 -25
  4. package/dist/admins/adminsApi.js +30 -25
  5. package/dist/admins/adminsInterfaces.d.ts +45 -54
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
  7. package/dist/attribute-sets/attributeSetsApi.js +26 -27
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
  9. package/dist/auth-provider/authProviderApi.d.ts +132 -158
  10. package/dist/auth-provider/authProviderApi.js +131 -157
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +30 -25
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -1
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +41 -49
  19. package/dist/base/syncModules.js +49 -48
  20. package/dist/base/utils.d.ts +38 -7
  21. package/dist/blocks/blocksApi.d.ts +27 -36
  22. package/dist/blocks/blocksApi.js +27 -36
  23. package/dist/blocks/blocksInterfaces.d.ts +92 -97
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +16 -33
  27. package/dist/events/eventsApi.js +32 -46
  28. package/dist/events/eventsInterfaces.d.ts +42 -37
  29. package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
  30. package/dist/file-uploading/fileUploadingApi.js +44 -47
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
  32. package/dist/forms/formsApi.d.ts +15 -14
  33. package/dist/forms/formsApi.js +15 -14
  34. package/dist/forms/formsInterfaces.d.ts +36 -40
  35. package/dist/forms-data/formsDataApi.d.ts +40 -44
  36. package/dist/forms-data/formsDataApi.js +42 -44
  37. package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
  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 +6 -9
  41. package/dist/index.d.ts +12 -13
  42. package/dist/index.js +12 -13
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
  44. package/dist/integration-collections/integrationCollectionsApi.js +86 -102
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +14 -13
  49. package/dist/menus/menusApi.d.ts +9 -5
  50. package/dist/menus/menusApi.js +9 -5
  51. package/dist/menus/menusInterfaces.d.ts +43 -48
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +62 -70
  54. package/dist/orders/ordersApi.js +62 -71
  55. package/dist/orders/ordersInterfaces.d.ts +238 -203
  56. package/dist/pages/pagesApi.d.ts +67 -80
  57. package/dist/pages/pagesApi.js +71 -81
  58. package/dist/pages/pagesInterfaces.d.ts +164 -160
  59. package/dist/payments/paymentsApi.d.ts +24 -34
  60. package/dist/payments/paymentsApi.js +24 -38
  61. package/dist/payments/paymentsInterfaces.d.ts +82 -76
  62. package/dist/product-statuses/productStatusesApi.d.ts +13 -13
  63. package/dist/product-statuses/productStatusesApi.js +13 -13
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
  65. package/dist/products/productsApi.d.ts +246 -267
  66. package/dist/products/productsApi.js +247 -267
  67. package/dist/products/productsInterfaces.d.ts +333 -339
  68. package/dist/system/systemApi.d.ts +19 -21
  69. package/dist/system/systemApi.js +20 -21
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +13 -16
  72. package/dist/templates/templatesApi.js +13 -16
  73. package/dist/templates/templatesInterfaces.d.ts +30 -29
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
  75. package/dist/templates-preview/templatesPreviewApi.js +10 -11
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
  77. package/dist/users/usersApi.d.ts +36 -43
  78. package/dist/users/usersApi.js +36 -43
  79. package/dist/users/usersInterfaces.d.ts +92 -96
  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
@@ -2,52 +2,50 @@ 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
- *
16
- * @param {string} [langCode] - The language code for localization. Default: "en_US".
17
- * @param {number} [offset] - Optional offset for pagination. Default: 0.
18
- * @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.
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.
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
- *
26
- * @param {string} marker - The marker identifying the form. Example: "contact_form".
27
- * @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.
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.
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
- * @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
- }
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
+ }
51
49
  * @description This interface defines the structure of a form page.
52
50
  */
53
51
  interface IFromPages {
@@ -59,19 +57,17 @@ interface IFromPages {
59
57
  }
60
58
  /**
61
59
  * Represents the structure of a form entity.
62
- *
63
60
  * @interface IFormsEntity
64
- *
65
- * @property {number} id - The identifier of the object. Example: 12345.
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.
70
- * @property {number} position - The position of the object. Example: 1.
71
- * @property {string} identifier - The textual identifier for the record field. Example: "form_contact_us".
72
- * @property {string} processingType - Type of form processing. Example: "async".
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"}.
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"}.
75
71
  * @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
76
72
  */
77
73
  interface IFormsEntity {
@@ -4,76 +4,72 @@ 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
+ *
18
+ */
17
19
  constructor(state: StateModule);
18
20
  /**
19
21
  * Get all forms data.
20
- *
21
22
  * @handleName getFormsData
22
- *
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
- * @return {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
  */
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
- * @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
- }
51
- * @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.
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.
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
- * @param {string} marker - Marker of the form. Example: "contact_form".
63
- * @param {number} formModuleConfigId - Example: 12.
64
- * @param {object} [body] - Example:
65
- {
66
- "entityIdentifier": "test",
67
- "userIdentifier": "",
68
- "status": "",
69
- "dateFrom": "2025-08-11",
70
- "dateTo": ""
71
- }
72
- * @param {any} [isNested] - Example: 1.
73
- * @param {string} [langCode] - Language code. Default: "en_US".
74
- * @param {number} [offset] - Parameter for pagination. Default: 0.
75
- * @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.
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.
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
+ *
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
- * @param {string} [langCode] - Language code. Default: "en_US".
29
- * @param {number} [offset] - Parameter for pagination. Default: 0.
30
- * @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.
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.
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
- * @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
- }
59
- * @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.
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.
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,28 +115,27 @@ 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
- * @param {string} marker - Marker of the form. Example: "contact_form".
123
- * @param {number} formModuleConfigId - Example: 12.
124
- * @param {object} [body] - Example:
125
- {
126
- "entityIdentifier": "test",
127
- "userIdentifier": "",
128
- "status": "",
129
- "dateFrom": "2025-08-11",
130
- "dateTo": ""
131
- }
132
- * @param {any} [isNested] - Example: 1.
133
- * @param {string} [langCode] - Language code. Default: "en_US".
134
- * @param {number} [offset] - Parameter for pagination. Default: 0.
135
- * @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.
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.
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
  */
140
137
  async getFormsDataByMarker(marker, formModuleConfigId, body = {}, isNested = 1, langCode = this.state.lang, offset = 0, limit = 30) {
138
+ // ): Promise<IFormByMarkerDataEntity | IError> {
141
139
  const result = await this._fetchPost(`/marker/${marker}?formModuleConfigId=${formModuleConfigId}&isNested=${isNested}&langCode=${langCode}&offset=${offset}&limit=${limit}`, body);
142
140
  return this._dataPostProcess(result, langCode);
143
141
  }