oneentry 1.0.137 → 1.0.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admins/adminsApi.d.ts +2 -2
- package/dist/admins/adminsApi.js +2 -2
- package/dist/admins/adminsInterfaces.d.ts +1 -1
- package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/dist/attribute-sets/attributeSetsApi.js +8 -8
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +3 -3
- package/dist/auth-provider/authProviderApi.d.ts +33 -33
- package/dist/auth-provider/authProviderApi.js +33 -33
- package/dist/auth-provider/authProvidersInterfaces.d.ts +12 -62
- package/dist/base/asyncModules.js +4 -50
- package/dist/base/stateModule.d.ts +1 -0
- package/dist/base/stateModule.js +16 -15
- package/dist/base/syncModules.d.ts +6 -0
- package/dist/base/syncModules.js +48 -5
- package/dist/base/utils.d.ts +15 -8
- package/dist/blocks/blocksApi.d.ts +10 -10
- package/dist/blocks/blocksApi.js +10 -10
- package/dist/blocks/blocksInterfaces.d.ts +1 -0
- package/dist/events/eventsApi.d.ts +5 -5
- package/dist/events/eventsApi.js +5 -5
- package/dist/events/eventsInterfaces.d.ts +25 -15
- package/dist/file-uploading/fileUploadingApi.d.ts +6 -6
- package/dist/file-uploading/fileUploadingApi.js +6 -6
- package/dist/forms/formsApi.d.ts +4 -4
- package/dist/forms/formsApi.js +4 -4
- package/dist/forms/formsInterfaces.d.ts +1 -0
- package/dist/forms-data/formsDataApi.d.ts +10 -10
- package/dist/forms-data/formsDataApi.js +10 -10
- package/dist/forms-data/formsDataInterfaces.d.ts +24 -24
- package/dist/forms-data/formsDataSchemas.d.ts +36 -28
- package/dist/forms-data/formsDataSchemas.js +16 -13
- package/dist/general-types/generalTypesApi.d.ts +2 -2
- package/dist/general-types/generalTypesApi.js +2 -2
- package/dist/index.d.ts +23 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +17 -17
- package/dist/integration-collections/integrationCollectionsApi.js +17 -17
- package/dist/locales/localesApi.d.ts +2 -2
- package/dist/locales/localesApi.js +2 -2
- package/dist/menus/menusApi.d.ts +2 -2
- package/dist/menus/menusApi.js +2 -2
- package/dist/menus/menusInterfaces.d.ts +2 -2
- package/dist/orders/ordersApi.d.ts +12 -12
- package/dist/orders/ordersApi.js +12 -12
- package/dist/orders/ordersInterfaces.d.ts +2 -1
- package/dist/pages/pagesApi.d.ts +20 -20
- package/dist/pages/pagesApi.js +20 -20
- package/dist/pages/pagesInterfaces.d.ts +10 -7
- package/dist/payments/paymentsApi.d.ts +13 -13
- package/dist/payments/paymentsApi.js +12 -12
- package/dist/payments/paymentsInterfaces.d.ts +8 -2
- package/dist/payments/paymentsSchemas.d.ts +22 -6
- package/dist/payments/paymentsSchemas.js +6 -3
- package/dist/product-statuses/productStatusesApi.d.ts +6 -6
- package/dist/product-statuses/productStatusesApi.js +6 -6
- package/dist/products/productsApi.d.ts +29 -28
- package/dist/products/productsApi.js +31 -30
- package/dist/products/productsInterfaces.d.ts +26 -21
- package/dist/system/systemApi.d.ts +10 -10
- package/dist/system/systemApi.js +10 -10
- package/dist/templates/templatesApi.d.ts +6 -6
- package/dist/templates/templatesApi.js +6 -6
- package/dist/templates-preview/templatesPreviewApi.d.ts +3 -3
- package/dist/templates-preview/templatesPreviewApi.js +3 -3
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +1 -0
- package/dist/users/usersApi.d.ts +18 -18
- package/dist/users/usersApi.js +18 -18
- package/dist/users/usersInterfaces.d.ts +8 -10
- package/package.json +34 -11
- package/dist/config.d.ts +0 -21
- package/dist/config.js +0 -48
package/dist/forms/formsApi.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
26
26
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
27
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
28
28
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
29
|
-
* @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
|
|
30
|
-
* @throws {IError}
|
|
29
|
+
* @returns {Promise<IFormsEntity[] | IError>} Returns array for all objects of type FormEntity.
|
|
30
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
31
31
|
*/
|
|
32
32
|
getAllForms(langCode?: string, offset?: number, limit?: number): Promise<IFormsEntity[] | IError>;
|
|
33
33
|
/**
|
|
@@ -35,8 +35,8 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
35
35
|
* @handleName getFormByMarker
|
|
36
36
|
* @param {string} marker - Marker of form. Example: "contact_form".
|
|
37
37
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
38
|
-
* @returns {IFormsEntity} Returns object of type FormEntity.
|
|
39
|
-
* @throws {IError}
|
|
38
|
+
* @returns {Promise<IFormsEntity | IError>} Returns object of type FormEntity.
|
|
39
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
40
40
|
*/
|
|
41
41
|
getFormByMarker(marker: string, langCode?: string): Promise<IFormsEntity | IError>;
|
|
42
42
|
}
|
package/dist/forms/formsApi.js
CHANGED
|
@@ -30,8 +30,8 @@ class FormsApi extends asyncModules_1.default {
|
|
|
30
30
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
31
31
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
32
32
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
33
|
-
* @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
|
|
34
|
-
* @throws {IError}
|
|
33
|
+
* @returns {Promise<IFormsEntity[] | IError>} Returns array for all objects of type FormEntity.
|
|
34
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
35
35
|
*/
|
|
36
36
|
async getAllForms(langCode = this.state.lang, offset = 0, limit = 30) {
|
|
37
37
|
const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
@@ -44,8 +44,8 @@ class FormsApi extends asyncModules_1.default {
|
|
|
44
44
|
* @handleName getFormByMarker
|
|
45
45
|
* @param {string} marker - Marker of form. Example: "contact_form".
|
|
46
46
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
47
|
-
* @returns {IFormsEntity} Returns object of type FormEntity.
|
|
48
|
-
* @throws {IError}
|
|
47
|
+
* @returns {Promise<IFormsEntity | IError>} Returns object of type FormEntity.
|
|
48
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
49
49
|
*/
|
|
50
50
|
async getFormByMarker(marker, langCode = this.state.lang) {
|
|
51
51
|
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
@@ -77,6 +77,7 @@ interface IFromPages {
|
|
|
77
77
|
{
|
|
78
78
|
"key": "value"
|
|
79
79
|
}
|
|
80
|
+
* @property {Array<IFormConfig>} [moduleFormConfigs] - Module form configurations linked to the form.
|
|
80
81
|
* @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
|
|
81
82
|
*/
|
|
82
83
|
interface IFormsEntity {
|
|
@@ -54,8 +54,8 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
54
54
|
* @param {string} body.formData[].type - The type of the form field. Example: "string".
|
|
55
55
|
* @param {string} body.formData[].value - The value of the form field. Example: "Jack".
|
|
56
56
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
57
|
-
* @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
|
|
58
|
-
* @throws {IError}
|
|
57
|
+
* @returns {Promise<IPostFormResponse | IError>} Returns an object containing the created form data entry and message.
|
|
58
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
59
59
|
*/
|
|
60
60
|
postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
|
|
61
61
|
/**
|
|
@@ -77,30 +77,30 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
77
77
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
78
78
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
79
79
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
80
|
-
* @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
|
|
81
|
-
* @throws {IError}
|
|
80
|
+
* @returns {Promise<IFormsByMarkerDataEntity | IError>} Returns an object containing the form data or an error object if there was an issue.
|
|
81
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
82
82
|
*/
|
|
83
83
|
getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: object, isExtended?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsByMarkerDataEntity | IError>;
|
|
84
84
|
/**
|
|
85
|
-
* Update one object of form data by id.
|
|
85
|
+
* Update one object of form data by id. Requires user authentication.
|
|
86
86
|
* @handleName updateFormsDataByid
|
|
87
87
|
* @param {number} id - ID of the form data. Example: 1.
|
|
88
|
-
* @returns {IUpdateFormsData | IError} Returns an object containing the updated form data or an error object if there was an issue.
|
|
88
|
+
* @returns {Promise<IUpdateFormsData | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
89
89
|
*/
|
|
90
90
|
updateFormsDataByid(id: number, body?: object): Promise<IUpdateFormsData | IError>;
|
|
91
91
|
/**
|
|
92
|
-
* Update form data status by id.
|
|
92
|
+
* Update form data status by id. Requires user authentication.
|
|
93
93
|
* @handleName updateFormsDataStatusByid
|
|
94
94
|
* @param {number} id - ID of the form data. Example: 1.
|
|
95
95
|
* @param {object} body - Request body.
|
|
96
|
-
* @returns {boolean | IError} Returns an object containing the updated form data or an error object if there was an issue.
|
|
96
|
+
* @returns {Promise<boolean | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
97
97
|
*/
|
|
98
98
|
updateFormsDataStatusByid(id: number, body?: object): Promise<boolean | IError>;
|
|
99
99
|
/**
|
|
100
|
-
* Delete one object of form data by id.
|
|
100
|
+
* Delete one object of form data by id. Requires user authentication.
|
|
101
101
|
* @handleName deleteFormsDataByid
|
|
102
102
|
* @param {number} id - ID of the form data. Example: 1.
|
|
103
|
-
* @returns {boolean | IError} Returns an object containing the deleted form data or an error object if there was an issue.
|
|
103
|
+
* @returns {Promise<boolean | IError>} Returns an object containing the deleted form data or an error object if there was an issue.
|
|
104
104
|
*/
|
|
105
105
|
deleteFormsDataByid(id: number): Promise<boolean | IError>;
|
|
106
106
|
}
|
|
@@ -60,8 +60,8 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
60
60
|
* @param {string} body.formData[].type - The type of the form field. Example: "string".
|
|
61
61
|
* @param {string} body.formData[].value - The value of the form field. Example: "Jack".
|
|
62
62
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
63
|
-
* @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
|
|
64
|
-
* @throws {IError}
|
|
63
|
+
* @returns {Promise<IPostFormResponse | IError>} Returns an object containing the created form data entry and message.
|
|
64
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
65
65
|
*/
|
|
66
66
|
async postFormsData(body, langCode = this.state.lang) {
|
|
67
67
|
const formData = {};
|
|
@@ -143,8 +143,8 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
143
143
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
144
144
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
145
145
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
146
|
-
* @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
|
|
147
|
-
* @throws {IError}
|
|
146
|
+
* @returns {Promise<IFormsByMarkerDataEntity | IError>} Returns an object containing the form data or an error object if there was an issue.
|
|
147
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
148
148
|
*/
|
|
149
149
|
async getFormsDataByMarker(marker, formModuleConfigId, body = {}, isExtended = 0, langCode = this.state.lang, offset = 0, limit = 30) {
|
|
150
150
|
const result = await this._fetchPost(`/marker/${marker}?formModuleConfigId=${formModuleConfigId}&isExtended=${isExtended}&langCode=${langCode}&offset=${offset}&limit=${limit}`, body);
|
|
@@ -153,10 +153,10 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
153
153
|
return this._dataPostProcess(validated, langCode);
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
|
-
* Update one object of form data by id.
|
|
156
|
+
* Update one object of form data by id. Requires user authentication.
|
|
157
157
|
* @handleName updateFormsDataByid
|
|
158
158
|
* @param {number} id - ID of the form data. Example: 1.
|
|
159
|
-
* @returns {IUpdateFormsData | IError} Returns an object containing the updated form data or an error object if there was an issue.
|
|
159
|
+
* @returns {Promise<IUpdateFormsData | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
160
160
|
*/
|
|
161
161
|
async updateFormsDataByid(id, body = {}) {
|
|
162
162
|
const result = await this._fetchPut(`/${id}`, body);
|
|
@@ -165,21 +165,21 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
165
165
|
return validated;
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
|
-
* Update form data status by id.
|
|
168
|
+
* Update form data status by id. Requires user authentication.
|
|
169
169
|
* @handleName updateFormsDataStatusByid
|
|
170
170
|
* @param {number} id - ID of the form data. Example: 1.
|
|
171
171
|
* @param {object} body - Request body.
|
|
172
|
-
* @returns {boolean | IError} Returns an object containing the updated form data or an error object if there was an issue.
|
|
172
|
+
* @returns {Promise<boolean | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
173
173
|
*/
|
|
174
174
|
async updateFormsDataStatusByid(id, body = {}) {
|
|
175
175
|
const result = await this._fetchPut(`/${id}/update-status`, body);
|
|
176
176
|
return result;
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
|
-
* Delete one object of form data by id.
|
|
179
|
+
* Delete one object of form data by id. Requires user authentication.
|
|
180
180
|
* @handleName deleteFormsDataByid
|
|
181
181
|
* @param {number} id - ID of the form data. Example: 1.
|
|
182
|
-
* @returns {boolean | IError} Returns an object containing the deleted form data or an error object if there was an issue.
|
|
182
|
+
* @returns {Promise<boolean | IError>} Returns an object containing the deleted form data or an error object if there was an issue.
|
|
183
183
|
*/
|
|
184
184
|
async deleteFormsDataByid(id) {
|
|
185
185
|
const result = await this._fetchDelete(`/${id}`);
|
|
@@ -64,7 +64,7 @@ interface IFormsData {
|
|
|
64
64
|
"dateFrom": "2025-08-11",
|
|
65
65
|
"dateTo": ""
|
|
66
66
|
}
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {number} [isNested] - Flag for getting hierarchical data. Example: 1.
|
|
68
68
|
* @param {string} [langCode] - The language code for localization. Default: "en_US".
|
|
69
69
|
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
70
70
|
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
@@ -90,7 +90,7 @@ interface IFormsData {
|
|
|
90
90
|
}
|
|
91
91
|
]
|
|
92
92
|
* @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
|
|
93
|
-
* @property {string
|
|
93
|
+
* @property {string} [moduleIdentifier] - Module identifier. Example: "blog".
|
|
94
94
|
* @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
|
|
95
95
|
*/
|
|
96
96
|
interface IFormDataEntity {
|
|
@@ -148,27 +148,27 @@ interface IFormsDataEntity {
|
|
|
148
148
|
* @property {string} entityIdentifier - Text identifier (marker) of the entity. Example: "test".
|
|
149
149
|
* @property {boolean} isUserAdmin - Is user admin. Example: true.
|
|
150
150
|
* @property {number} formModuleConfigId - Form module config Id. Example: 2.
|
|
151
|
-
* @property {
|
|
151
|
+
* @property {string} [moduleIdentifier] - Module identifier. Example: "blog".
|
|
152
152
|
* @property {number} entityId - Form module config Id. Example: 2.
|
|
153
153
|
* @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
|
|
154
154
|
*/
|
|
155
155
|
interface IFormByMarkerDataEntity {
|
|
156
156
|
id: number;
|
|
157
|
-
parentId
|
|
157
|
+
parentId?: null | number;
|
|
158
158
|
formIdentifier: string;
|
|
159
|
-
depth
|
|
160
|
-
ip
|
|
161
|
-
fingerprint
|
|
162
|
-
status
|
|
163
|
-
userIdentifier
|
|
159
|
+
depth?: number;
|
|
160
|
+
ip?: string | null;
|
|
161
|
+
fingerprint?: string | null;
|
|
162
|
+
status?: string | null;
|
|
163
|
+
userIdentifier?: string | null;
|
|
164
164
|
formData: FormDataType[];
|
|
165
|
-
attributeSetIdentifier
|
|
165
|
+
attributeSetIdentifier?: string | null;
|
|
166
166
|
time: Date | string;
|
|
167
|
-
entityIdentifier
|
|
168
|
-
isUserAdmin
|
|
169
|
-
formModuleConfigId
|
|
170
|
-
moduleIdentifier
|
|
171
|
-
entityId
|
|
167
|
+
entityIdentifier?: string;
|
|
168
|
+
isUserAdmin?: boolean;
|
|
169
|
+
formModuleConfigId?: number;
|
|
170
|
+
moduleIdentifier?: string;
|
|
171
|
+
entityId?: number;
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
174
|
* Represents a collection of form data entities.
|
|
@@ -233,8 +233,8 @@ interface IFormsByMarkerDataEntity {
|
|
|
233
233
|
* @property {string} formData.entityIdentifier - The entity identifier. Example: "blog".
|
|
234
234
|
* @property {boolean} formData.isUserAdmin - Is user admin. Example: false.
|
|
235
235
|
* @property {number} formData.formModuleId - The form module identifier. Example: 2.
|
|
236
|
-
* @property {
|
|
237
|
-
* @property {
|
|
236
|
+
* @property {string | null} formData.userIdentifier - The user identifier. Example: null.
|
|
237
|
+
* @property {number | null} formData.parentId - The parent identifier. Example: null.
|
|
238
238
|
* @property {FormDataType[]} formData.formData - Form fields data.
|
|
239
239
|
* @example
|
|
240
240
|
[
|
|
@@ -256,8 +256,8 @@ interface IPostFormResponse {
|
|
|
256
256
|
fingerprint: string;
|
|
257
257
|
isUserAdmin: boolean;
|
|
258
258
|
formModuleId: number;
|
|
259
|
-
userIdentifier:
|
|
260
|
-
parentId:
|
|
259
|
+
userIdentifier: string | null;
|
|
260
|
+
parentId: number | null;
|
|
261
261
|
formData: FormDataType[];
|
|
262
262
|
};
|
|
263
263
|
}
|
|
@@ -270,8 +270,8 @@ interface IPostFormResponse {
|
|
|
270
270
|
* @property {FormDataType[]} formData - Form fields data.
|
|
271
271
|
* @property {string} userIdentifier - The user identifier. Example: null.
|
|
272
272
|
* @property {string} entityIdentifier - The entity identifier. Example: "blog".
|
|
273
|
-
* @property {
|
|
274
|
-
* @property {string} fingerprint - The fingerprint of the form. Example: null.
|
|
273
|
+
* @property {null | number} parentId - The parent identifier. Example: null.
|
|
274
|
+
* @property {null | string} fingerprint - The fingerprint of the form. Example: null.
|
|
275
275
|
* @property {boolean} isUserAdmin - Is user admin. Example: false.
|
|
276
276
|
* @property {number} formModuleId - The form module identifier. Example: 2.
|
|
277
277
|
*/
|
|
@@ -308,9 +308,9 @@ type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeTe
|
|
|
308
308
|
"value": "Jack"
|
|
309
309
|
}
|
|
310
310
|
]
|
|
311
|
-
* @property {string} formData[
|
|
312
|
-
* @property {string} formData[
|
|
313
|
-
* @property {string} formData[
|
|
311
|
+
* @property {string} formData[].marker - The marker identifying the form field. Example: "name".
|
|
312
|
+
* @property {string} formData[].type - The type of the form field. Example: "string".
|
|
313
|
+
* @property {string} formData[].value - The value of the form field. Example: "name".
|
|
314
314
|
* @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files.
|
|
315
315
|
* @example
|
|
316
316
|
{
|
|
@@ -16,25 +16,29 @@ export declare const FormDataTypeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const FormByMarkerDataEntitySchema: z.ZodObject<{
|
|
18
18
|
id: z.ZodNumber;
|
|
19
|
-
parentId: z.ZodNullable<z.ZodNumber
|
|
19
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
20
|
formIdentifier: z.ZodString;
|
|
21
|
-
depth: z.ZodNumber
|
|
22
|
-
ip: z.ZodNullable<z.ZodString
|
|
23
|
-
fingerprint: z.ZodNullable<z.ZodString
|
|
24
|
-
status: z.ZodNullable<z.ZodString
|
|
25
|
-
userIdentifier: z.ZodNullable<z.ZodString
|
|
26
|
-
formData: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
21
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
userIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
27
27
|
marker: z.ZodString;
|
|
28
28
|
type: z.ZodString;
|
|
29
29
|
value: z.ZodAny;
|
|
30
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]
|
|
31
|
-
|
|
30
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
31
|
+
marker: z.ZodString;
|
|
32
|
+
type: z.ZodString;
|
|
33
|
+
value: z.ZodAny;
|
|
34
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>>]>;
|
|
35
|
+
attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
36
|
time: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
33
|
-
entityIdentifier: z.ZodString
|
|
34
|
-
isUserAdmin: z.ZodBoolean
|
|
35
|
-
formModuleConfigId: z.ZodNumber
|
|
36
|
-
moduleIdentifier: z.ZodString
|
|
37
|
-
entityId: z.ZodNumber
|
|
37
|
+
entityIdentifier: z.ZodOptional<z.ZodString>;
|
|
38
|
+
isUserAdmin: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
formModuleConfigId: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
moduleIdentifier: z.ZodOptional<z.ZodString>;
|
|
41
|
+
entityId: z.ZodOptional<z.ZodNumber>;
|
|
38
42
|
}, z.core.$strip>;
|
|
39
43
|
/**
|
|
40
44
|
* Forms by marker data response schema
|
|
@@ -42,25 +46,29 @@ export declare const FormByMarkerDataEntitySchema: z.ZodObject<{
|
|
|
42
46
|
export declare const FormsByMarkerDataResponseSchema: z.ZodObject<{
|
|
43
47
|
items: z.ZodArray<z.ZodObject<{
|
|
44
48
|
id: z.ZodNumber;
|
|
45
|
-
parentId: z.ZodNullable<z.ZodNumber
|
|
49
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
46
50
|
formIdentifier: z.ZodString;
|
|
47
|
-
depth: z.ZodNumber
|
|
48
|
-
ip: z.ZodNullable<z.ZodString
|
|
49
|
-
fingerprint: z.ZodNullable<z.ZodString
|
|
50
|
-
status: z.ZodNullable<z.ZodString
|
|
51
|
-
userIdentifier: z.ZodNullable<z.ZodString
|
|
52
|
-
formData: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
51
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
userIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
53
57
|
marker: z.ZodString;
|
|
54
58
|
type: z.ZodString;
|
|
55
59
|
value: z.ZodAny;
|
|
56
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]
|
|
57
|
-
|
|
60
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
61
|
+
marker: z.ZodString;
|
|
62
|
+
type: z.ZodString;
|
|
63
|
+
value: z.ZodAny;
|
|
64
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>>]>;
|
|
65
|
+
attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
66
|
time: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
59
|
-
entityIdentifier: z.ZodString
|
|
60
|
-
isUserAdmin: z.ZodBoolean
|
|
61
|
-
formModuleConfigId: z.ZodNumber
|
|
62
|
-
moduleIdentifier: z.ZodString
|
|
63
|
-
entityId: z.ZodNumber
|
|
67
|
+
entityIdentifier: z.ZodOptional<z.ZodString>;
|
|
68
|
+
isUserAdmin: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
formModuleConfigId: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
moduleIdentifier: z.ZodOptional<z.ZodString>;
|
|
71
|
+
entityId: z.ZodOptional<z.ZodNumber>;
|
|
64
72
|
}, z.core.$strip>>;
|
|
65
73
|
total: z.ZodNumber;
|
|
66
74
|
}, z.core.$strip>;
|
|
@@ -22,21 +22,24 @@ exports.FormDataTypeSchema = zod_1.z.union([
|
|
|
22
22
|
*/
|
|
23
23
|
exports.FormByMarkerDataEntitySchema = zod_1.z.object({
|
|
24
24
|
id: zod_1.z.number(),
|
|
25
|
-
parentId: zod_1.z.number().
|
|
25
|
+
parentId: zod_1.z.number().nullish(),
|
|
26
26
|
formIdentifier: zod_1.z.string(),
|
|
27
|
-
depth: zod_1.z.number(),
|
|
28
|
-
ip: zod_1.z.string().
|
|
29
|
-
fingerprint: zod_1.z.string().
|
|
30
|
-
status: zod_1.z.string().
|
|
31
|
-
userIdentifier: zod_1.z.string().
|
|
32
|
-
formData: zod_1.z.
|
|
33
|
-
|
|
27
|
+
depth: zod_1.z.number().optional(),
|
|
28
|
+
ip: zod_1.z.string().nullish(),
|
|
29
|
+
fingerprint: zod_1.z.string().nullish(),
|
|
30
|
+
status: zod_1.z.string().nullish(),
|
|
31
|
+
userIdentifier: zod_1.z.string().nullish(),
|
|
32
|
+
formData: zod_1.z.union([
|
|
33
|
+
zod_1.z.array(exports.FormDataTypeSchema),
|
|
34
|
+
zod_1.z.record(zod_1.z.string(), zod_1.z.array(exports.FormDataTypeSchema)),
|
|
35
|
+
]),
|
|
36
|
+
attributeSetIdentifier: zod_1.z.string().nullish(),
|
|
34
37
|
time: zod_1.z.union([zod_1.z.date(), zod_1.z.string()]),
|
|
35
|
-
entityIdentifier: zod_1.z.string(),
|
|
36
|
-
isUserAdmin: zod_1.z.boolean(),
|
|
37
|
-
formModuleConfigId: zod_1.z.number(),
|
|
38
|
-
moduleIdentifier: zod_1.z.string(),
|
|
39
|
-
entityId: zod_1.z.number(),
|
|
38
|
+
entityIdentifier: zod_1.z.string().optional(),
|
|
39
|
+
isUserAdmin: zod_1.z.boolean().optional(),
|
|
40
|
+
formModuleConfigId: zod_1.z.number().optional(),
|
|
41
|
+
moduleIdentifier: zod_1.z.string().optional(),
|
|
42
|
+
entityId: zod_1.z.number().optional(),
|
|
40
43
|
});
|
|
41
44
|
/**
|
|
42
45
|
* Forms by marker data response schema
|
|
@@ -20,8 +20,8 @@ export default class GeneralTypesApi extends AsyncModules implements IGeneralTyp
|
|
|
20
20
|
/**
|
|
21
21
|
* Get all types.
|
|
22
22
|
* @handleName getAllTypes
|
|
23
|
-
* @returns {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
24
|
-
* @throws {IError}
|
|
23
|
+
* @returns {Promise<IGeneralTypesEntity[] | IError>} Returns an array of general types or an error object if there was an issue.
|
|
24
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
25
|
* @description This method retrieves all general types available in the system.
|
|
26
26
|
*/
|
|
27
27
|
getAllTypes(): Promise<IGeneralTypesEntity[] | IError>;
|
|
@@ -24,8 +24,8 @@ class GeneralTypesApi extends asyncModules_1.default {
|
|
|
24
24
|
/**
|
|
25
25
|
* Get all types.
|
|
26
26
|
* @handleName getAllTypes
|
|
27
|
-
* @returns {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
28
|
-
* @throws {IError}
|
|
27
|
+
* @returns {Promise<IGeneralTypesEntity[] | IError>} Returns an array of general types or an error object if there was an issue.
|
|
28
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
29
29
|
* @description This method retrieves all general types available in the system.
|
|
30
30
|
*/
|
|
31
31
|
async getAllTypes() {
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,29 @@ import UsersApi from './users/usersApi';
|
|
|
26
26
|
import WsApi from './web-socket/wsApi';
|
|
27
27
|
/**
|
|
28
28
|
* IDefineApi interface
|
|
29
|
-
* @interface
|
|
29
|
+
* @interface IDefineApi
|
|
30
|
+
* @property {AdminsApi} Admins - Admins API module.
|
|
31
|
+
* @property {AttributesSetsApi} AttributesSets - Attribute sets API module.
|
|
32
|
+
* @property {AuthProviderApi} AuthProvider - Auth provider API module.
|
|
33
|
+
* @property {BlocksApi} Blocks - Blocks API module.
|
|
34
|
+
* @property {EventsApi} Events - Events API module.
|
|
35
|
+
* @property {FileUploadingApi} FileUploading - File uploading API module.
|
|
36
|
+
* @property {FormsApi} Forms - Forms API module.
|
|
37
|
+
* @property {FormsDataApi} FormData - Form data API module.
|
|
38
|
+
* @property {GeneralTypesApi} GeneralTypes - General types API module.
|
|
39
|
+
* @property {IntegrationCollectionsApi} IntegrationCollections - Integration collections API module.
|
|
40
|
+
* @property {LocalesApi} Locales - Locales API module.
|
|
41
|
+
* @property {MenusApi} Menus - Menus API module.
|
|
42
|
+
* @property {OrdersApi} Orders - Orders API module.
|
|
43
|
+
* @property {PageApi} Pages - Pages API module.
|
|
44
|
+
* @property {PaymentsApi} Payments - Payments API module.
|
|
45
|
+
* @property {ProductApi} Products - Products API module.
|
|
46
|
+
* @property {ProductStatusesApi} ProductStatuses - Product statuses API module.
|
|
47
|
+
* @property {SystemApi} System - System API module.
|
|
48
|
+
* @property {TemplatesApi} Templates - Templates API module.
|
|
49
|
+
* @property {TemplatePreviewsApi} TemplatePreviews - Template previews API module.
|
|
50
|
+
* @property {UsersApi} Users - Users API module.
|
|
51
|
+
* @property {WsApi} WS - WebSocket API module.
|
|
30
52
|
*/
|
|
31
53
|
interface IDefineApi {
|
|
32
54
|
Admins: AdminsApi;
|
|
@@ -34,7 +34,7 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
34
34
|
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
35
35
|
* @param {string} [userQuery.entityType] - Entity type. Example: "orders".
|
|
36
36
|
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
37
|
-
* @returns {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
|
|
37
|
+
* @returns {Promise<ICollectionEntity[] | IError>} Returns an array of ICollection objects or an error object if there was an issue.
|
|
38
38
|
*/
|
|
39
39
|
getICollections(langCode?: string, userQuery?: {
|
|
40
40
|
limit: number;
|
|
@@ -47,8 +47,8 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
47
47
|
* @handleName getICollectionById
|
|
48
48
|
* @param {number} id - Collection id. Example: 1.
|
|
49
49
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
50
|
-
* @returns {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
|
|
51
|
-
* @throws {IError}
|
|
50
|
+
* @returns {Promise<ICollectionEntity | IError>} Returns an ICollection object or an error object if there was an issue.
|
|
51
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
52
52
|
*/
|
|
53
53
|
getICollectionById(id: number, langCode?: string): Promise<ICollectionEntity | IError>;
|
|
54
54
|
/**
|
|
@@ -68,8 +68,8 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
68
68
|
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
69
69
|
* @param {number} [userQuery.entityType] - Entity type. Example: "orders".
|
|
70
70
|
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
71
|
-
* @returns {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
72
|
-
* @throws {IError}
|
|
71
|
+
* @returns {Promise<ICollectionRowsResponce | IError>} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
72
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
73
73
|
* @description Get all records belonging to the collection by collection id.
|
|
74
74
|
*/
|
|
75
75
|
getICollectionRowsById(id: number, langCode?: string, userQuery?: {
|
|
@@ -82,12 +82,12 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
82
82
|
* Check for the existence of a text identifier (marker).
|
|
83
83
|
* @handleName validateICollectionMarker
|
|
84
84
|
* @param {string} marker - Collection marker. Example: "collection1".
|
|
85
|
-
* @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not.
|
|
85
|
+
* @returns {Promise<ICollectionIsValid | IError>} Returns an object with a boolean property `valid` indicating whether the marker is valid or not.
|
|
86
86
|
* @example
|
|
87
87
|
{
|
|
88
88
|
"valid": true
|
|
89
89
|
}
|
|
90
|
-
* @throws {IError}
|
|
90
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
91
91
|
* @description Check for the existence of a text identifier (marker).
|
|
92
92
|
*/
|
|
93
93
|
validateICollectionMarker(marker: string): Promise<ICollectionIsValid | IError>;
|
|
@@ -96,8 +96,8 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
96
96
|
* @handleName getICollectionRowsByMarker
|
|
97
97
|
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
98
98
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
99
|
-
* @returns {ICollectionRowsResponce} Returns CollectionRowEntity object.
|
|
100
|
-
* @throws {IError}
|
|
99
|
+
* @returns {Promise<ICollectionRowsResponce | IError>} Returns CollectionRowEntity object.
|
|
100
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
101
101
|
*/
|
|
102
102
|
getICollectionRowsByMarker(marker: string, langCode?: string): Promise<ICollectionRowsResponce | IError>;
|
|
103
103
|
/**
|
|
@@ -106,8 +106,8 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
106
106
|
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
107
107
|
* @param {number} id - Collection record identifier. Example: 1.
|
|
108
108
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
109
|
-
* @returns {ICollectionRow} Returns CollectionRowEntity object.
|
|
110
|
-
* @throws {IError}
|
|
109
|
+
* @returns {Promise<ICollectionRow | IError>} Returns CollectionRowEntity object.
|
|
110
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
111
111
|
*/
|
|
112
112
|
getICollectionRowByMarkerAndId(marker: string, id: number, langCode?: string): Promise<ICollectionRow | IError>;
|
|
113
113
|
/**
|
|
@@ -127,8 +127,8 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
127
127
|
]
|
|
128
128
|
}
|
|
129
129
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
130
|
-
* @returns {ICollectionRow} Returns object of type ICollectionRow.
|
|
131
|
-
* @throws {IError}
|
|
130
|
+
* @returns {Promise<ICollectionRow | IError>} Returns object of type ICollectionRow.
|
|
131
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
132
132
|
* @description Create a record in the collection.
|
|
133
133
|
*/
|
|
134
134
|
createICollectionRow(marker: string, body: ICollectionFormObject, langCode?: string): Promise<ICollectionRow | IError>;
|
|
@@ -152,8 +152,8 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
152
152
|
* @param {string} body.formIdentifier - Textual identifier of the form. Example: "collection-form".
|
|
153
153
|
* @param {any} body.formData - Object with the form data.
|
|
154
154
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
155
|
-
* @returns {ICollectionRow} Returns object of type ICollectionRow.
|
|
156
|
-
* @throws {IError}
|
|
155
|
+
* @returns {Promise<ICollectionRow | IError>} Returns object of type ICollectionRow.
|
|
156
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
157
157
|
* @description Edit a record in the collection.
|
|
158
158
|
*/
|
|
159
159
|
updateICollectionRow(marker: string, id: number, body: {
|
|
@@ -165,8 +165,8 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
165
165
|
* @handleName deleteICollectionRowByMarkerAndId
|
|
166
166
|
* @param {string} marker - text identifier of the collection Example: "collection1".
|
|
167
167
|
* @param {number} id - record identifier in the collection Example: 12.
|
|
168
|
-
* @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
169
|
-
* @throws {IError}
|
|
168
|
+
* @returns {Promise<boolean | IError>} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
169
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
170
170
|
* @description Deletion of collection record object
|
|
171
171
|
*/
|
|
172
172
|
deleteICollectionRowByMarkerAndId(marker: string, id: number): Promise<boolean | IError>;
|