oneentry 1.0.124 → 1.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -22
- package/dist/admins/adminsApi.d.ts +17 -4
- package/dist/admins/adminsApi.js +16 -3
- package/dist/admins/adminsInterfaces.d.ts +47 -26
- package/dist/attribute-sets/attributeSetsApi.d.ts +10 -18
- package/dist/attribute-sets/attributeSetsApi.js +9 -17
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +92 -44
- package/dist/auth-provider/authProviderApi.d.ts +146 -36
- package/dist/auth-provider/authProviderApi.js +163 -37
- package/dist/auth-provider/authProvidersInterfaces.d.ts +189 -40
- package/dist/base/asyncModules.d.ts +7 -1
- package/dist/base/asyncModules.js +127 -21
- package/dist/base/result.js +23 -0
- package/dist/base/syncModules.d.ts +4 -0
- package/dist/base/syncModules.js +19 -1
- package/dist/base/utils.d.ts +1 -1
- package/dist/blocks/blocksApi.d.ts +7 -17
- package/dist/blocks/blocksApi.js +7 -17
- package/dist/blocks/blocksInterfaces.d.ts +77 -32
- package/dist/events/eventsApi.d.ts +7 -8
- package/dist/events/eventsApi.js +12 -7
- package/dist/events/eventsInterfaces.d.ts +16 -11
- package/dist/file-uploading/fileUploadingApi.d.ts +22 -14
- package/dist/file-uploading/fileUploadingApi.js +20 -12
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +42 -18
- package/dist/forms/formsApi.d.ts +3 -7
- package/dist/forms/formsApi.js +2 -6
- package/dist/forms/formsInterfaces.d.ts +44 -28
- package/dist/{formsData → forms-data}/formsDataApi.d.ts +31 -15
- package/dist/{formsData → forms-data}/formsDataApi.js +30 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +462 -0
- package/dist/general-types/generalTypesApi.d.ts +1 -3
- package/dist/general-types/generalTypesApi.js +0 -2
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +74 -47
- package/dist/integration-collections/integrationCollectionsApi.js +64 -45
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +144 -63
- package/dist/locales/localesApi.d.ts +1 -2
- package/dist/locales/localesApi.js +1 -2
- package/dist/locales/localesInterfaces.d.ts +2 -4
- package/dist/menus/menusApi.d.ts +1 -3
- package/dist/menus/menusApi.js +1 -3
- package/dist/menus/menusInterfaces.d.ts +39 -13
- package/dist/orders/ordersApi.d.ts +36 -18
- package/dist/orders/ordersApi.js +40 -22
- package/dist/orders/ordersInterfaces.d.ts +163 -81
- package/dist/pages/pagesApi.d.ts +48 -48
- package/dist/pages/pagesApi.js +40 -45
- package/dist/pages/pagesInterfaces.d.ts +147 -98
- package/dist/payments/paymentsApi.d.ts +25 -45
- package/dist/payments/paymentsApi.js +27 -46
- package/dist/payments/paymentsInterfaces.d.ts +42 -60
- package/dist/product-statuses/productStatusesApi.d.ts +6 -12
- package/dist/product-statuses/productStatusesApi.js +5 -11
- package/dist/product-statuses/productStatusesInterfaces.d.ts +16 -15
- package/dist/products/productsApi.d.ts +256 -104
- package/dist/products/productsApi.js +263 -97
- package/dist/products/productsInterfaces.d.ts +343 -160
- package/dist/system/systemApi.d.ts +21 -10
- package/dist/system/systemApi.js +22 -8
- package/dist/system/systemInterfaces.d.ts +0 -1
- package/dist/templates/templatesApi.d.ts +6 -12
- package/dist/templates/templatesApi.js +4 -10
- package/dist/templates/templatesInterfaces.d.ts +20 -20
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -6
- package/dist/templates-preview/templatesPreviewApi.js +1 -5
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +50 -25
- package/dist/users/usersApi.d.ts +33 -13
- package/dist/users/usersApi.js +38 -15
- package/dist/users/usersInterfaces.d.ts +78 -27
- package/dist/web-socket/wsApi.d.ts +1 -5
- package/dist/web-socket/wsApi.js +1 -5
- package/dist/web-socket/wsInterfaces.d.ts +0 -1
- package/package.json +18 -16
- package/dist/formsData/formsDataInterfaces.d.ts +0 -267
- /package/dist/{formsData → forms-data}/formsDataInterfaces.js +0 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import type { IError } from '../base/utils';
|
|
2
|
+
import type { IUploadingQuery } from '../file-uploading/fileUploadingInterfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for retrieving and posting form data in the system.
|
|
5
|
+
*
|
|
6
|
+
* @interface IFormsData
|
|
7
|
+
*
|
|
8
|
+
* @property {function} getFormsData - Get all forms data.
|
|
9
|
+
* @property {function} postFormsData - Find all product page objects with pagination and multiple filtering.
|
|
10
|
+
* @property {function} getFormsDataByMarker - Get one object of form data by marker.
|
|
11
|
+
* @description This interface defines methods for retrieving and posting form data in the system.
|
|
12
|
+
*/
|
|
13
|
+
interface IFormsData {
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves all forms data.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} langCode - The language code for localization. Default: "en_US".
|
|
18
|
+
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
19
|
+
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
20
|
+
* @return {IFormsDataEntity} A promise that resolves to a collection of form data entities or an error.
|
|
21
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
22
|
+
*/
|
|
23
|
+
getFormsData(langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
24
|
+
/**
|
|
25
|
+
* Creating an object of data save information by form
|
|
26
|
+
*
|
|
27
|
+
* @handleName postFormsData
|
|
28
|
+
*
|
|
29
|
+
* @param {IBodyPostFormData} body - Request body. Example:
|
|
30
|
+
{
|
|
31
|
+
"formIdentifier": "form",
|
|
32
|
+
"formData": [
|
|
33
|
+
{
|
|
34
|
+
"marker": "name",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"value": "Jack"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
* @param {string} body.formIdentifier - The identifier for the form. Example: "form".
|
|
41
|
+
* @param {FormDataType[]} body.formData - Example:
|
|
42
|
+
[
|
|
43
|
+
{
|
|
44
|
+
"marker": "name",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"value": "Jack"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
* @param {string} body.formData.marker - The marker identifying the form field. Example: "name".
|
|
50
|
+
* @param {string} body.formData.type - The type of the form field. Example: "string".
|
|
51
|
+
* @param {string} body.formData.value - The value of the form field. Example: "Jack".
|
|
52
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
53
|
+
* @return {IPostFormResponse} Returns an object containing the created form data entry and message.
|
|
54
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
55
|
+
* @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.
|
|
56
|
+
*/
|
|
57
|
+
postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves form data by its marker.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} marker - The marker identifying the form data. Example: "contact_form_data".
|
|
62
|
+
* @param {number} formModuleConfigId - Example: 4.
|
|
63
|
+
* @param {object} [body] - Default: {}. Example:
|
|
64
|
+
{
|
|
65
|
+
"entityIdentifier": "test",
|
|
66
|
+
"userIdentifier": "",
|
|
67
|
+
"status": "",
|
|
68
|
+
"dateFrom": "2025-08-11",
|
|
69
|
+
"dateTo": ""
|
|
70
|
+
}
|
|
71
|
+
* @param {any} [isNested] - Flag for getting hierarchical data. Example: 1.
|
|
72
|
+
* @param {string} [langCode] - The language code for localization. Default: "en_US".
|
|
73
|
+
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
74
|
+
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
75
|
+
* @returns {IFormsDataEntity} A promise that resolves to a form data entity or an error.
|
|
76
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
77
|
+
*/
|
|
78
|
+
getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: object, isNested?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Represents the structure of a form data entity.
|
|
82
|
+
*
|
|
83
|
+
* @interface IFormDataEntity
|
|
84
|
+
*
|
|
85
|
+
* @property {number} id - The unique identifier of the form page. Example: 12345.
|
|
86
|
+
* @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
|
|
87
|
+
* @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
|
|
88
|
+
* @property {FormDataType[]} formData - Form data. Example:
|
|
89
|
+
[
|
|
90
|
+
{
|
|
91
|
+
"marker": "name",
|
|
92
|
+
"type": "string",
|
|
93
|
+
"value": "Test"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
* @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
|
|
97
|
+
* @property {string | null} [actionMessage] - Action message for the form data. Example: "Form submitted successfully".
|
|
98
|
+
* @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
|
|
99
|
+
*/
|
|
100
|
+
interface IFormDataEntity {
|
|
101
|
+
id: number;
|
|
102
|
+
formIdentifier: string;
|
|
103
|
+
time: Date | string;
|
|
104
|
+
formData: FormDataType[];
|
|
105
|
+
attributeSetIdentifier?: string | null;
|
|
106
|
+
actionMessage?: string | null;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Represents a collection of form data entities.
|
|
110
|
+
*
|
|
111
|
+
* @interface IFormsDataEntity
|
|
112
|
+
*
|
|
113
|
+
* @property {IFormDataEntity[]} items - Array of form data objects. Example:
|
|
114
|
+
[
|
|
115
|
+
{
|
|
116
|
+
"id": 1,
|
|
117
|
+
"formIdentifier": "form",
|
|
118
|
+
"time": "2025-06-06T19:07:45.993Z",
|
|
119
|
+
"formData": {},
|
|
120
|
+
"attributeSetIdentifier": "form",
|
|
121
|
+
"actionMessage": "Action message string"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
* @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
|
|
125
|
+
* @property {number} total - Total number of found records. Example: 100.
|
|
126
|
+
*/
|
|
127
|
+
interface IFormsDataEntity {
|
|
128
|
+
items: IFormDataEntity[];
|
|
129
|
+
total: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Represents the structure of a form data entity.
|
|
133
|
+
*
|
|
134
|
+
* @interface IFormByMarkerDataEntity
|
|
135
|
+
*
|
|
136
|
+
* @property {number} id - The unique identifier of the form page. Example: 12345.
|
|
137
|
+
* @property {null | number} parentId - The unique identifier of the parent form page. Example: 123.
|
|
138
|
+
* @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
|
|
139
|
+
* @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
|
|
140
|
+
* @property {number} depth - Example: 1.
|
|
141
|
+
* @property {FormDataType[]} formData - Form data. Example:
|
|
142
|
+
[
|
|
143
|
+
{
|
|
144
|
+
"marker": "name",
|
|
145
|
+
"type": "string",
|
|
146
|
+
"value": "Test"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
* @property {string | null} [actionMessage] - Action message for the form data. Example: "Form submitted successfully".
|
|
150
|
+
* @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
|
|
151
|
+
* @property {string | null} [ip] - Example: '127.0.0.1'.
|
|
152
|
+
* @property {string | null} [status] - Example: ''.
|
|
153
|
+
* @property {string | null} [userIdentifier] - Example: ''.
|
|
154
|
+
* @property {string} [entityIdentifier] - Example: 'blog'.
|
|
155
|
+
* @property {boolean} [isUserAdmin] - Example: false.
|
|
156
|
+
* @property {number} [formModuleConfigId] - Example: 2.
|
|
157
|
+
* @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
|
|
158
|
+
*/
|
|
159
|
+
interface IFormByMarkerDataEntity {
|
|
160
|
+
id: number;
|
|
161
|
+
parentId: null | number;
|
|
162
|
+
formIdentifier: string;
|
|
163
|
+
depth: number;
|
|
164
|
+
time: Date | string;
|
|
165
|
+
formData: FormDataType[];
|
|
166
|
+
actionMessage?: string | null;
|
|
167
|
+
attributeSetIdentifier?: string | null;
|
|
168
|
+
ip?: string | null;
|
|
169
|
+
status?: string | null;
|
|
170
|
+
userIdentifier?: string | null;
|
|
171
|
+
entityIdentifier: string;
|
|
172
|
+
isUserAdmin: boolean;
|
|
173
|
+
formModuleConfigId: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Represents a collection of form data entities.
|
|
177
|
+
*
|
|
178
|
+
* @interface IFormsByMarkerDataEntity
|
|
179
|
+
*
|
|
180
|
+
* @property {IFormByMarkerDataEntity[]} items - Array of form data objects. Example:
|
|
181
|
+
[
|
|
182
|
+
{
|
|
183
|
+
id: 42,
|
|
184
|
+
parentId: null,
|
|
185
|
+
formIdentifier: 'test-form',
|
|
186
|
+
depth: 0,
|
|
187
|
+
ip: null,
|
|
188
|
+
status: null,
|
|
189
|
+
userIdentifier: null,
|
|
190
|
+
formData: [{ marker: 'name', type: 'string', value: 'Test' }],
|
|
191
|
+
attributeSetIdentifier: 'form',
|
|
192
|
+
time: '2025-03-03T15:51:17.458Z',
|
|
193
|
+
entityIdentifier: 'blog',
|
|
194
|
+
isUserAdmin: false,
|
|
195
|
+
formModuleConfigId: 2
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
* @property {number} total - Total number of found records. Example: 100.
|
|
199
|
+
* @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
|
|
200
|
+
*/
|
|
201
|
+
interface IFormsByMarkerDataEntity {
|
|
202
|
+
items: IFormByMarkerDataEntity[];
|
|
203
|
+
total: number;
|
|
204
|
+
}
|
|
205
|
+
interface IPostFormResponse {
|
|
206
|
+
actionMessage: string;
|
|
207
|
+
formData: {
|
|
208
|
+
id: number;
|
|
209
|
+
formIdentifier: string;
|
|
210
|
+
time: string;
|
|
211
|
+
entityIdentifier: string;
|
|
212
|
+
isUserAdmin: boolean;
|
|
213
|
+
formModuleId: number;
|
|
214
|
+
userIdentifier: any;
|
|
215
|
+
parentId: any;
|
|
216
|
+
formData: FormDataType[];
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Contains an array of data form objects with the following values
|
|
221
|
+
*/
|
|
222
|
+
type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, any>;
|
|
223
|
+
/**
|
|
224
|
+
* Represents the structure of the body for posting form data.
|
|
225
|
+
*
|
|
226
|
+
* @interface IBodyPostFormData
|
|
227
|
+
*
|
|
228
|
+
* @property {string} formIdentifier - Text identifier (marker) of the form. Example: "form".
|
|
229
|
+
* @property {number} formModuleConfigId - Example: 2.
|
|
230
|
+
* @property {string} moduleEntityIdentifier - Example: "blog".
|
|
231
|
+
* @property {string | null} replayTo - Example: "".
|
|
232
|
+
* @property {string} status - Example: "sent".
|
|
233
|
+
* @property {FormDataType[]} formData - Array of form data objects. Example:
|
|
234
|
+
[
|
|
235
|
+
{
|
|
236
|
+
"marker": "name",
|
|
237
|
+
"type": "string",
|
|
238
|
+
"value": "Jack"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
* @property {string} formData[index].marker - The marker identifying the form field. Example: "name".
|
|
242
|
+
* @property {string} formData[index].type - The type of the form field. Example: "string".
|
|
243
|
+
* @property {string} formData[index].value - The value of the form field. Example: "name".
|
|
244
|
+
* @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files. Example:
|
|
245
|
+
{
|
|
246
|
+
"type": "page",
|
|
247
|
+
"entity": "editor",
|
|
248
|
+
"id": 3787
|
|
249
|
+
}
|
|
250
|
+
* @description This interface defines the structure of a form post object, including its identifiers, time, form data, and optional file query.
|
|
251
|
+
*/
|
|
252
|
+
interface IBodyPostFormData {
|
|
253
|
+
formIdentifier: string;
|
|
254
|
+
formModuleConfigId: number;
|
|
255
|
+
moduleEntityIdentifier: string;
|
|
256
|
+
replayTo: string | null;
|
|
257
|
+
status: string;
|
|
258
|
+
formData: FormDataType[];
|
|
259
|
+
fileQuery?: IUploadingQuery;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Represents a form data entity with a simple value.
|
|
263
|
+
*
|
|
264
|
+
* @interface IBodyTypeStringNumberFloat
|
|
265
|
+
*
|
|
266
|
+
* @property {string} marker - marker name. Example: "some_marker".
|
|
267
|
+
* @property {string} type - Type value. "string" | "number" | "float". Example: "string".
|
|
268
|
+
* @property {string} value - Value of the form data entity, which can be a "string", "number", or "float". Example: "string".
|
|
269
|
+
* @description Represents a form data entity with a marker, type, and value.
|
|
270
|
+
*/
|
|
271
|
+
interface IBodyTypeStringNumberFloat {
|
|
272
|
+
marker: string;
|
|
273
|
+
type: 'string' | 'number' | 'float';
|
|
274
|
+
value: string;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Represents a date/time form data entity.
|
|
278
|
+
*
|
|
279
|
+
* @interface IBodyTypeTimeDate
|
|
280
|
+
*
|
|
281
|
+
* @property {string} marker - marker name. Example: "ome_marker".
|
|
282
|
+
* @property {string} type - Type value. 'date' | 'dateTime' | 'time' Example: "date".
|
|
283
|
+
* @property {object} value - Date object. Contains fullDate, formattedValue, formatString. Example:
|
|
284
|
+
{
|
|
285
|
+
"fullDate": "2024-05-07T21:02:00.000Z",
|
|
286
|
+
"formattedValue": "08-05-2024 00:02",
|
|
287
|
+
"formatString": "DD-MM-YYYY HH:mm"
|
|
288
|
+
}
|
|
289
|
+
* @description Represents a date, dateTime, or time value in a structured format.
|
|
290
|
+
*/
|
|
291
|
+
interface IBodyTypeTimeDate {
|
|
292
|
+
marker: string;
|
|
293
|
+
type: 'date' | 'dateTime' | 'time';
|
|
294
|
+
value: {
|
|
295
|
+
fullDate: string;
|
|
296
|
+
formattedValue: string;
|
|
297
|
+
formatString: string;
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Represents a text form data entity.
|
|
302
|
+
*
|
|
303
|
+
* @interface IBodyTypeText
|
|
304
|
+
*
|
|
305
|
+
* @property {string} marker - marker name. Example: "some_marker".
|
|
306
|
+
* @property {string} type - Type value. Example: "text".
|
|
307
|
+
* @property {object} value - Text Object. Contains html as string, plain text and params. Example:
|
|
308
|
+
{
|
|
309
|
+
"htmlValue": "<p>Hello world</p>",
|
|
310
|
+
"plainValue": "",
|
|
311
|
+
"params": {
|
|
312
|
+
"isEditorDisabled": false,
|
|
313
|
+
"isImageCompressed": true
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
* @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings.
|
|
317
|
+
*/
|
|
318
|
+
interface IBodyTypeText {
|
|
319
|
+
marker: string;
|
|
320
|
+
type: 'text';
|
|
321
|
+
value: {
|
|
322
|
+
htmlValue: string;
|
|
323
|
+
plainValue: string;
|
|
324
|
+
params: {
|
|
325
|
+
isEditorDisabled: boolean;
|
|
326
|
+
isImageCompressed: boolean;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Represents a text with header form data entity.
|
|
332
|
+
*
|
|
333
|
+
* @interface IBodyTypeTextWithHeader
|
|
334
|
+
*
|
|
335
|
+
* @property {string} marker - marker name. Example: "about".
|
|
336
|
+
* @property {string} type - Type value. Example: "textWithHeader".
|
|
337
|
+
* @property {object} value - Text Object. Contains html as string, header and params. Example:
|
|
338
|
+
{
|
|
339
|
+
"header": "Headline",
|
|
340
|
+
"htmlValue": "<p>Hello World</p>",
|
|
341
|
+
"plainValue": "",
|
|
342
|
+
"params": {
|
|
343
|
+
"isEditorDisabled": false,
|
|
344
|
+
"isImageCompressed": true
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
* @description Represents a text value with a header, HTML and plain text representations, along with parameters for editor and image compression settings.
|
|
348
|
+
*/
|
|
349
|
+
interface IBodyTypeTextWithHeader {
|
|
350
|
+
marker: string;
|
|
351
|
+
type: 'textWithHeader';
|
|
352
|
+
value: {
|
|
353
|
+
header: string;
|
|
354
|
+
htmlValue: string;
|
|
355
|
+
plainValue: string;
|
|
356
|
+
params: {
|
|
357
|
+
isEditorDisabled: boolean;
|
|
358
|
+
isImageCompressed: boolean;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Represents an image or group of images form data entity.
|
|
364
|
+
*
|
|
365
|
+
* @interface IBodyTypeImageGroupOfImages
|
|
366
|
+
*
|
|
367
|
+
* @property {string} marker - marker name. Example: "avatar".
|
|
368
|
+
* @property {'image' | 'groupOfImage'} type - Type value. Example: "image".
|
|
369
|
+
* @property {object} value - Image Object. Contains image information. Example:
|
|
370
|
+
[
|
|
371
|
+
{
|
|
372
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
373
|
+
"downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
374
|
+
"size": 392585,
|
|
375
|
+
"previewLink": "",
|
|
376
|
+
"params": {
|
|
377
|
+
"isImageCompressed": true
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
* @description Represents an image or a group of images with their details, including filename, download link, size, preview link, and parameters for image compression.
|
|
382
|
+
*/
|
|
383
|
+
interface IBodyTypeImageGroupOfImages {
|
|
384
|
+
marker: string;
|
|
385
|
+
type: 'image' | 'groupOfImage';
|
|
386
|
+
value: {
|
|
387
|
+
filename: string;
|
|
388
|
+
downloadLink: string;
|
|
389
|
+
size: number;
|
|
390
|
+
previewLink: string;
|
|
391
|
+
params: {
|
|
392
|
+
isImageCompressed: boolean;
|
|
393
|
+
};
|
|
394
|
+
} | Array<{
|
|
395
|
+
filename: string;
|
|
396
|
+
downloadLink: string;
|
|
397
|
+
size: number;
|
|
398
|
+
previewLink: string;
|
|
399
|
+
params: {
|
|
400
|
+
isImageCompressed: boolean;
|
|
401
|
+
};
|
|
402
|
+
}>;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Represents a file form data entity.
|
|
406
|
+
*
|
|
407
|
+
* @interface IBodyTypeFile
|
|
408
|
+
*
|
|
409
|
+
* @property {string} marker - marker name. Example: "picture".
|
|
410
|
+
* @property {'file'} type - Type value. Example: "file".
|
|
411
|
+
* @property {object} value - File Object. Contains file information. Example:
|
|
412
|
+
[
|
|
413
|
+
{
|
|
414
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
415
|
+
"downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
416
|
+
"size": 392585
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
* @description Represents a file with its details, including filename, download link, and size.
|
|
420
|
+
*/
|
|
421
|
+
interface IBodyTypeFile {
|
|
422
|
+
marker: string;
|
|
423
|
+
type: 'file';
|
|
424
|
+
value: {
|
|
425
|
+
filename: string;
|
|
426
|
+
downloadLink: string;
|
|
427
|
+
size: number;
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Represents a radio button or list selection form data entity.
|
|
432
|
+
*
|
|
433
|
+
* @interface IBodyTypeRadioButtonList
|
|
434
|
+
*
|
|
435
|
+
* @property {string} marker - marker name. Example: "selector".
|
|
436
|
+
* @property {string} type - Type value. Example: 'list'.
|
|
437
|
+
* @property {array} value - Array of list or radioButton bojects. Example:
|
|
438
|
+
[
|
|
439
|
+
{
|
|
440
|
+
"title": "red",
|
|
441
|
+
"value": "1",
|
|
442
|
+
"extended": {
|
|
443
|
+
"value": "red",
|
|
444
|
+
"type": "string"
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
]
|
|
448
|
+
* @description Represents a list or radio button selection with multiple options, each containing a title, value, and extended information.
|
|
449
|
+
*/
|
|
450
|
+
interface IBodyTypeRadioButtonList {
|
|
451
|
+
marker: string;
|
|
452
|
+
type: 'list' | 'radioButton';
|
|
453
|
+
value: Array<{
|
|
454
|
+
title: string;
|
|
455
|
+
value: string;
|
|
456
|
+
extended: {
|
|
457
|
+
value: string;
|
|
458
|
+
type: string;
|
|
459
|
+
};
|
|
460
|
+
}>;
|
|
461
|
+
}
|
|
462
|
+
export type { FormDataType, IBodyPostFormData, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IFormByMarkerDataEntity, IFormDataEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IPostFormResponse, };
|
|
@@ -9,7 +9,6 @@ import type { IGeneralTypes, IGeneralTypesEntity } from './generalTypesInterface
|
|
|
9
9
|
* @class GeneralTypesApi
|
|
10
10
|
* @extends AsyncModules
|
|
11
11
|
* @implements {IGeneralTypes}
|
|
12
|
-
*
|
|
13
12
|
* @description This class provides methods to interact with general types, including retrieving all types.
|
|
14
13
|
*/
|
|
15
14
|
export default class GeneralTypesApi extends AsyncModules implements IGeneralTypes {
|
|
@@ -23,8 +22,7 @@ export default class GeneralTypesApi extends AsyncModules implements IGeneralTyp
|
|
|
23
22
|
*
|
|
24
23
|
* @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
25
24
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
26
|
-
*
|
|
27
25
|
* @description This method retrieves all general types available in the system.
|
|
28
26
|
*/
|
|
29
|
-
getAllTypes(): Promise<
|
|
27
|
+
getAllTypes(): Promise<IGeneralTypesEntity[] | IError>;
|
|
30
28
|
}
|
|
@@ -11,7 +11,6 @@ const asyncModules_1 = __importDefault(require("../base/asyncModules"));
|
|
|
11
11
|
* @class GeneralTypesApi
|
|
12
12
|
* @extends AsyncModules
|
|
13
13
|
* @implements {IGeneralTypes}
|
|
14
|
-
*
|
|
15
14
|
* @description This class provides methods to interact with general types, including retrieving all types.
|
|
16
15
|
*/
|
|
17
16
|
class GeneralTypesApi extends asyncModules_1.default {
|
|
@@ -26,7 +25,6 @@ class GeneralTypesApi extends asyncModules_1.default {
|
|
|
26
25
|
*
|
|
27
26
|
* @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
28
27
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
29
|
-
*
|
|
30
28
|
* @description This method retrieves all general types available in the system.
|
|
31
29
|
*/
|
|
32
30
|
async getAllTypes() {
|
|
@@ -6,7 +6,6 @@ import type { IError } from '../base/utils';
|
|
|
6
6
|
* @interface IGeneralTypes
|
|
7
7
|
*
|
|
8
8
|
* @property {function} getAllTypes - Get all types.
|
|
9
|
-
*
|
|
10
9
|
* @description This interface defines a method for retrieving all general types in the system.
|
|
11
10
|
*/
|
|
12
11
|
interface IGeneralTypes {
|
|
@@ -16,7 +15,7 @@ interface IGeneralTypes {
|
|
|
16
15
|
* @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
17
16
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
18
17
|
*/
|
|
19
|
-
getAllTypes(): Promise<
|
|
18
|
+
getAllTypes(): Promise<IGeneralTypesEntity[] | IError>;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Represents a general type entity.
|
|
@@ -24,8 +23,7 @@ interface IGeneralTypes {
|
|
|
24
23
|
* @interface IGeneralTypesEntity
|
|
25
24
|
*
|
|
26
25
|
* @property {number} id - Type id. Example: 1.
|
|
27
|
-
* @property {Types} type - Types enum. Example:
|
|
28
|
-
*
|
|
26
|
+
* @property {Types} type - Types enum. Example: "product", "category", "etc".
|
|
29
27
|
* @description Represents a general type entity with an identifier and a type.
|
|
30
28
|
*/
|
|
31
29
|
interface IGeneralTypesEntity {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import BlocksApi from './blocks/blocksApi';
|
|
|
9
9
|
import EventsApi from './events/eventsApi';
|
|
10
10
|
import FileUploadingApi from './file-uploading/fileUploadingApi';
|
|
11
11
|
import FormsApi from './forms/formsApi';
|
|
12
|
-
import FormsDataApi from './
|
|
12
|
+
import FormsDataApi from './forms-data/formsDataApi';
|
|
13
13
|
import GeneralTypesApi from './general-types/generalTypesApi';
|
|
14
14
|
import IntegrationCollectionsApi from './integration-collections/integrationCollectionsApi';
|
|
15
15
|
import LocalesApi from './locales/localesApi';
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const blocksApi_1 = __importDefault(require("./blocks/blocksApi"));
|
|
|
15
15
|
const eventsApi_1 = __importDefault(require("./events/eventsApi"));
|
|
16
16
|
const fileUploadingApi_1 = __importDefault(require("./file-uploading/fileUploadingApi"));
|
|
17
17
|
const formsApi_1 = __importDefault(require("./forms/formsApi"));
|
|
18
|
-
const formsDataApi_1 = __importDefault(require("./
|
|
18
|
+
const formsDataApi_1 = __importDefault(require("./forms-data/formsDataApi"));
|
|
19
19
|
const generalTypesApi_1 = __importDefault(require("./general-types/generalTypesApi"));
|
|
20
20
|
const integrationCollectionsApi_1 = __importDefault(require("./integration-collections/integrationCollectionsApi"));
|
|
21
21
|
const localesApi_1 = __importDefault(require("./locales/localesApi"));
|