oneentry 1.0.125 → 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 (86) 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 +77 -0
  36. package/dist/{formsData → forms-data}/formsDataApi.js +44 -42
  37. package/dist/forms-data/formsDataInterfaces.d.ts +462 -0
  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
  84. package/dist/formsData/formsDataApi.d.ts +0 -77
  85. package/dist/formsData/formsDataInterfaces.d.ts +0 -350
  86. /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
+ * @interface IFormsData
6
+ * @property {Function} getFormsData - Get all forms data.
7
+ * @property {Function} postFormsData - Find all product page objects with pagination and multiple filtering.
8
+ * @property {Function} getFormsDataByMarker - Get one object of form data by marker.
9
+ * @description This interface defines methods for retrieving and posting form data in the system.
10
+ */
11
+ interface IFormsData {
12
+ /**
13
+ * Retrieves all forms data.
14
+ * @handleName getFormsData
15
+ * @param {string} langCode - The language code for localization. Default: "en_US".
16
+ * @param {number} [offset] - Optional offset for pagination. Default: 0.
17
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
18
+ * @returns {IFormsDataEntity} A promise that resolves to a collection of form data entities or an error.
19
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
20
+ * @description This method retrieves all forms data.
21
+ */
22
+ getFormsData(langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
23
+ /**
24
+ * Creating an object of data save information by form
25
+ * @handleName postFormsData
26
+ * @param {IBodyPostFormData} body - Request body. Example:
27
+ {
28
+ "formIdentifier": "form",
29
+ "formData": [
30
+ {
31
+ "marker": "name",
32
+ "type": "string",
33
+ "value": "Jack"
34
+ }
35
+ ]
36
+ }
37
+ * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
38
+ * @param {FormDataType[]} body.formData - Example:
39
+ [
40
+ {
41
+ "marker": "name",
42
+ "type": "string",
43
+ "value": "Jack"
44
+ }
45
+ ]
46
+ * @param {string} body.formData.marker - The marker identifying the form field. Example: "name".
47
+ * @param {string} body.formData.type - The type of the form field. Example: "string".
48
+ * @param {string} body.formData.value - The value of the form field. Example: "Jack".
49
+ * @param {string} [langCode] - Language code. Default: "en_US".
50
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
51
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
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.
53
+ */
54
+ postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
55
+ /**
56
+ * Retrieves form data by its marker.
57
+ * @handleName getFormsDataByMarker
58
+ * @param {string} marker - The marker identifying the form data. Example: "contact_form_data".
59
+ * @param {number} formModuleConfigId - The form module configuration ID. Example: 4.
60
+ * @param {object} [body] - Request body. Default: {}. 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] - The language code for localization. Default: "en_US".
70
+ * @param {number} [offset] - Optional offset for pagination. Default: 0.
71
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
72
+ * @returns {IFormsByMarkerDataEntity} A promise that resolves to a form data entity or an error.
73
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
74
+ * @description This method retrieves form data by its marker.
75
+ */
76
+ getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: object, isNested?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
77
+ }
78
+ /**
79
+ * Represents the structure of a form data entity.
80
+ * @interface IFormDataEntity
81
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
82
+ * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
83
+ * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
84
+ * @property {FormDataType[]} formData - Form data. Example:
85
+ [
86
+ {
87
+ "marker": "name",
88
+ "type": "string",
89
+ "value": "Test"
90
+ }
91
+ ]
92
+ * @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
93
+ * @property {string | null} [actionMessage] - Action message for the form data. Example: "Form submitted successfully".
94
+ * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
95
+ */
96
+ interface IFormDataEntity {
97
+ id: number;
98
+ formIdentifier: string;
99
+ time: Date | string;
100
+ formData: FormDataType[];
101
+ attributeSetIdentifier?: string | null;
102
+ actionMessage?: string | null;
103
+ }
104
+ /**
105
+ * Represents a collection of form data entities.
106
+ * @interface IFormsDataEntity
107
+ * @property {IFormDataEntity[]} items - Array of form data objects. Example:
108
+ [
109
+ {
110
+ "id": 1,
111
+ "formIdentifier": "form",
112
+ "time": "2025-06-06T19:07:45.993Z",
113
+ "formData": {},
114
+ "attributeSetIdentifier": "form",
115
+ "actionMessage": "Action message string"
116
+ }
117
+ ]
118
+ * @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
119
+ * @property {number} total - Total number of found records. Example: 100.
120
+ */
121
+ interface IFormsDataEntity {
122
+ items: IFormDataEntity[];
123
+ total: number;
124
+ }
125
+ /**
126
+ * Represents the structure of a form data entity.
127
+ * @interface IFormByMarkerDataEntity
128
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
129
+ * @property {null | number} parentId - The unique identifier of the parent form page. Example: 123.
130
+ * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
131
+ * @property {number} depth - Example: 1.
132
+ * @property {string | null} [ip] - Ip. Example: '127.0.0.1'.
133
+ * @property {string | null} [status] - Status. Example: 'approved'.
134
+ * @property {string | null} [userIdentifier] - Text identifier (marker) of the user. Example: "admin".
135
+ * @property {FormDataType[]} formData - Form data. Example:
136
+ [
137
+ {
138
+ "marker": "name",
139
+ "type": "string",
140
+ "value": "Test"
141
+ }
142
+ ]
143
+ * @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
144
+ * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
145
+ * @property {string} [entityIdentifier] - Text identifier (marker) of the entity. Example: "test".
146
+ * @property {boolean} [isUserAdmin] - Is user admin. Example: true.
147
+ * @property {number} [formModuleConfigId] - Form module config Id. Example: 2.
148
+ * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
149
+ */
150
+ interface IFormByMarkerDataEntity {
151
+ id: number;
152
+ parentId: null | number;
153
+ formIdentifier: string;
154
+ depth: number;
155
+ ip?: string | null;
156
+ status?: string | null;
157
+ userIdentifier?: string | null;
158
+ formData: FormDataType[];
159
+ attributeSetIdentifier?: string | null;
160
+ time: Date | string;
161
+ entityIdentifier: string;
162
+ isUserAdmin: boolean;
163
+ formModuleConfigId: number;
164
+ }
165
+ /**
166
+ * Represents a collection of form data entities.
167
+ * @interface IFormsByMarkerDataEntity
168
+ * @property {IFormByMarkerDataEntity[]} items - Array of form data objects. Example:
169
+ [
170
+ {
171
+ "id": 42,
172
+ "parentId": null,
173
+ "formIdentifier": "test-form",
174
+ "depth": 0,
175
+ "ip": null,
176
+ "status": null,
177
+ "userIdentifier": null,
178
+ "formData": [
179
+ {
180
+ "marker": "name",
181
+ "type": "string",
182
+ "value": "Test"
183
+ }
184
+ ],
185
+ "attributeSetIdentifier": "form",
186
+ "time": "2025-03-03T15:51:17.458Z",
187
+ "entityIdentifier": "blog",
188
+ "isUserAdmin": false,
189
+ "formModuleConfigId": 2
190
+ }
191
+ ]
192
+ * @property {number} total - Total number of found records. Example: 100.
193
+ * @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
194
+ */
195
+ interface IFormsByMarkerDataEntity {
196
+ items: IFormByMarkerDataEntity[];
197
+ total: number;
198
+ }
199
+ /**
200
+ * Represents the structure of the response after posting form data.
201
+ * @interface IPostFormResponse
202
+ * @property {string} actionMessage - Action message for the form data. Example: "Form submitted successfully".
203
+ * @property {object} formData - Form data. Example:
204
+ * @property {number} formData.id - The unique identifier of the form page. Example: 12345.
205
+ * @property {string} formData.formIdentifier - The identifier of the form. Example: "contact_form".
206
+ * @property {string} formData.time - The time of the form submit. Example: "2023-10-01T12:00:00Z".
207
+ * @property {string} formData.entityIdentifier - The entity identifier. Example: "blog".
208
+ * @property {boolean} formData.isUserAdmin - Is user admin. Example: false.
209
+ * @property {number} formData.formModuleId - The form module identifier. Example: 2.
210
+ * @property {any} formData.parentId - The parent identifier. Example: null.
211
+ * @property {any} formData.userIdentifier - The user identifier. Example: null.
212
+ * @property {FormDataType[]} formData.formData - Form fields data. Example:
213
+ [
214
+ {
215
+ "marker": "name",
216
+ "type": "string",
217
+ "value": "Jack"
218
+ }
219
+ ]
220
+ */
221
+ interface IPostFormResponse {
222
+ actionMessage: string;
223
+ formData: {
224
+ id: number;
225
+ formIdentifier: string;
226
+ time: string;
227
+ entityIdentifier: string;
228
+ isUserAdmin: boolean;
229
+ formModuleId: number;
230
+ userIdentifier: any;
231
+ parentId: any;
232
+ formData: FormDataType[];
233
+ };
234
+ }
235
+ /**
236
+ * Contains an array of data form objects with the following values
237
+ */
238
+ type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, any>;
239
+ /**
240
+ * Represents the structure of the body for posting form data.
241
+ * @interface IBodyPostFormData
242
+ * @property {string} formIdentifier - Text identifier (marker) of the form. Example: "form".
243
+ * @property {number} formModuleConfigId - The unique identifier of the form module configuration. Example: 2.
244
+ * @property {string} moduleEntityIdentifier - Text identifier (marker) of the module entity. Example: "blog".
245
+ * @property {string | null} replayTo - Email to reply to. Example: "some@email.com".
246
+ * @property {string} status - Status of the form. Example: "sent".
247
+ * @property {FormDataType[]} formData - Array of form data objects. Example:
248
+ [
249
+ {
250
+ "marker": "name",
251
+ "type": "string",
252
+ "value": "Jack"
253
+ }
254
+ ]
255
+ * @property {string} formData[index].marker - The marker identifying the form field. Example: "name".
256
+ * @property {string} formData[index].type - The type of the form field. Example: "string".
257
+ * @property {string} formData[index].value - The value of the form field. Example: "name".
258
+ * @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files. Example:
259
+ {
260
+ "type": "page",
261
+ "entity": "editor",
262
+ "id": 3787
263
+ }
264
+ * @description This interface defines the structure of a form post object, including its identifiers, time, form data, and optional file query.
265
+ */
266
+ interface IBodyPostFormData {
267
+ formIdentifier: string;
268
+ formModuleConfigId: number;
269
+ moduleEntityIdentifier: string;
270
+ replayTo: string | null;
271
+ status: string;
272
+ formData: FormDataType[];
273
+ fileQuery?: IUploadingQuery;
274
+ }
275
+ /**
276
+ * Represents a form data entity with a simple value.
277
+ * @interface IBodyTypeStringNumberFloat
278
+ * @property {string} marker - marker name. Example: "some_marker".
279
+ * @property {string} type - Type value. "string" | "number" | "float". Example: "string".
280
+ * @property {string} value - Value of the form data entity, which can be a "string", "number", or "float". Example: "string".
281
+ * @description Represents a form data entity with a marker, type, and value.
282
+ */
283
+ interface IBodyTypeStringNumberFloat {
284
+ marker: string;
285
+ type: 'string' | 'number' | 'float';
286
+ value: string;
287
+ }
288
+ /**
289
+ * Represents a date/time form data entity.
290
+ * @interface IBodyTypeTimeDate
291
+ * @property {string} marker - marker name. Example: "ome_marker".
292
+ * @property {string} type - Type value. 'date' | 'dateTime' | 'time' Example: "date".
293
+ * @property {object} value - Date object. Contains fullDate, formattedValue, formatString. Example:
294
+ {
295
+ "fullDate": "2024-05-07T21:02:00.000Z",
296
+ "formattedValue": "08-05-2024 00:02",
297
+ "formatString": "DD-MM-YYYY HH:mm"
298
+ }
299
+ * @description Represents a date, dateTime, or time value in a structured format.
300
+ */
301
+ interface IBodyTypeTimeDate {
302
+ marker: string;
303
+ type: 'date' | 'dateTime' | 'time';
304
+ value: {
305
+ fullDate: string;
306
+ formattedValue: string;
307
+ formatString: string;
308
+ };
309
+ }
310
+ /**
311
+ * Represents a text form data entity.
312
+ * @interface IBodyTypeText
313
+ * @property {string} marker - marker name. Example: "some_marker".
314
+ * @property {string} type - Type value. Example: "text".
315
+ * @property {object} value - Text Object. Contains html as string, plain text and params. Example:
316
+ {
317
+ "htmlValue": "<p>Hello world</p>",
318
+ "plainValue": "",
319
+ "params": {
320
+ "isEditorDisabled": false,
321
+ "isImageCompressed": true
322
+ }
323
+ }
324
+ * @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings.
325
+ */
326
+ interface IBodyTypeText {
327
+ marker: string;
328
+ type: 'text';
329
+ value: {
330
+ htmlValue: string;
331
+ plainValue: string;
332
+ params: {
333
+ isEditorDisabled: boolean;
334
+ isImageCompressed: boolean;
335
+ };
336
+ };
337
+ }
338
+ /**
339
+ * Represents a text with header form data entity.
340
+ * @interface IBodyTypeTextWithHeader
341
+ * @property {string} marker - marker name. Example: "about".
342
+ * @property {string} type - Type value. Example: "textWithHeader".
343
+ * @property {object} value - Text Object. Contains html as string, header and params. Example:
344
+ {
345
+ "header": "Headline",
346
+ "htmlValue": "<p>Hello World</p>",
347
+ "plainValue": "",
348
+ "params": {
349
+ "isEditorDisabled": false,
350
+ "isImageCompressed": true
351
+ }
352
+ }
353
+ * @description Represents a text value with a header, HTML and plain text representations, along with parameters for editor and image compression settings.
354
+ */
355
+ interface IBodyTypeTextWithHeader {
356
+ marker: string;
357
+ type: 'textWithHeader';
358
+ value: {
359
+ header: string;
360
+ htmlValue: string;
361
+ plainValue: string;
362
+ params: {
363
+ isEditorDisabled: boolean;
364
+ isImageCompressed: boolean;
365
+ };
366
+ };
367
+ }
368
+ /**
369
+ * Represents an image or group of images form data entity.
370
+ * @interface IBodyTypeImageGroupOfImages
371
+ * @property {string} marker - marker name. Example: "avatar".
372
+ * @property {'image' | 'groupOfImage'} type - Type value. Example: "image".
373
+ * @property {object} value - Image Object. Contains image information. Example:
374
+ [
375
+ {
376
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
377
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
378
+ "size": 392585,
379
+ "previewLink": "",
380
+ "params": {
381
+ "isImageCompressed": true
382
+ }
383
+ }
384
+ ]
385
+ * @description Represents an image or a group of images with their details, including filename, download link, size, preview link, and parameters for image compression.
386
+ */
387
+ interface IBodyTypeImageGroupOfImages {
388
+ marker: string;
389
+ type: 'image' | 'groupOfImage';
390
+ value: {
391
+ filename: string;
392
+ downloadLink: string;
393
+ size: number;
394
+ previewLink: string;
395
+ params: {
396
+ isImageCompressed: boolean;
397
+ };
398
+ } | Array<{
399
+ filename: string;
400
+ downloadLink: string;
401
+ size: number;
402
+ previewLink: string;
403
+ params: {
404
+ isImageCompressed: boolean;
405
+ };
406
+ }>;
407
+ }
408
+ /**
409
+ * Represents a file form data entity.
410
+ * @interface IBodyTypeFile
411
+ * @property {string} marker - marker name. Example: "picture".
412
+ * @property {'file'} type - Type value. Example: "file".
413
+ * @property {object} value - File Object. Contains file information. Example:
414
+ [
415
+ {
416
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
417
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
418
+ "size": 392585
419
+ }
420
+ ]
421
+ * @description Represents a file with its details, including filename, download link, and size.
422
+ */
423
+ interface IBodyTypeFile {
424
+ marker: string;
425
+ type: 'file';
426
+ value: {
427
+ filename: string;
428
+ downloadLink: string;
429
+ size: number;
430
+ };
431
+ }
432
+ /**
433
+ * Represents a radio button or list selection form data entity.
434
+ * @interface IBodyTypeRadioButtonList
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, };
@@ -4,23 +4,23 @@ import type { IError } from '../base/utils';
4
4
  import type { IGeneralTypes, IGeneralTypesEntity } from './generalTypesInterfaces';
5
5
  /**
6
6
  * Controllers for working with types
7
- *
8
7
  * @handle /api/content/general-types
9
8
  * @class GeneralTypesApi
10
- * @extends AsyncModules
9
+ * @augments AsyncModules
11
10
  * @implements {IGeneralTypes}
12
11
  * @description This class provides methods to interact with general types, including retrieving all types.
13
12
  */
14
13
  export default class GeneralTypesApi extends AsyncModules implements IGeneralTypes {
15
14
  protected state: StateModule;
16
15
  protected _url: string;
16
+ /**
17
+ *
18
+ */
17
19
  constructor(state: StateModule);
18
20
  /**
19
21
  * Get all types.
20
- *
21
22
  * @handleName getAllTypes
22
- *
23
- * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
23
+ * @returns {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
24
24
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
25
25
  * @description This method retrieves all general types available in the system.
26
26
  */
@@ -6,24 +6,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
7
  /**
8
8
  * Controllers for working with types
9
- *
10
9
  * @handle /api/content/general-types
11
10
  * @class GeneralTypesApi
12
- * @extends AsyncModules
11
+ * @augments AsyncModules
13
12
  * @implements {IGeneralTypes}
14
13
  * @description This class provides methods to interact with general types, including retrieving all types.
15
14
  */
16
15
  class GeneralTypesApi extends asyncModules_1.default {
16
+ /**
17
+ *
18
+ */
17
19
  constructor(state) {
18
20
  super(state);
19
21
  this._url = state.url + '/api/content/general-types';
20
22
  }
21
23
  /**
22
24
  * Get all types.
23
- *
24
25
  * @handleName getAllTypes
25
- *
26
- * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
26
+ * @returns {IGeneralTypesEntity[]} Returns an array of general types 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 retrieves all general types available in the system.
29
29
  */
@@ -2,29 +2,26 @@ import type { BlockType } from 'blocks/blocksInterfaces';
2
2
  import type { IError } from '../base/utils';
3
3
  /**
4
4
  * Interface for retrieving all general types in the system.
5
- *
6
5
  * @interface IGeneralTypes
7
- *
8
- * @property {function} getAllTypes - Get all types.
6
+ * @property {Function} getAllTypes - Get all types.
9
7
  * @description This interface defines a method for retrieving all general types in the system.
10
8
  */
11
9
  interface IGeneralTypes {
12
10
  /**
13
11
  * Get all types.
14
- *
15
- * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
12
+ * @handleName getAllTypes
13
+ * @returns {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
16
14
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
15
+ * @description This method gets all types.
17
16
  */
18
17
  getAllTypes(): Promise<IGeneralTypesEntity[] | IError>;
19
18
  }
20
19
  /**
21
20
  * Represents a general type entity.
22
- *
23
21
  * @interface IGeneralTypesEntity
24
- *
25
- * @property {number} id - Type id. Example: 1.
26
- * @property {Types} type - Types enum. Example: "product", "category", "etc".
27
22
  * @description Represents a general type entity with an identifier and a type.
23
+ * @property {number} id - Type id. Example: 1.
24
+ * @property {Types} type - Types enum. Example: "product", "category", "etc".
28
25
  */
29
26
  interface IGeneralTypesEntity {
30
27
  id: number;
package/dist/index.d.ts CHANGED
@@ -54,19 +54,18 @@ interface IDefineApi {
54
54
  }
55
55
  /**
56
56
  * Define API.
57
- *
58
- * @function
59
- * @param {string} url - URl of your project.
60
- * @param {IConfig} config - Custom configuration settings
61
- * @param {string} [config.token] - Optional token parameter
62
- * @param {string} [config.langCode] - Optional langCode parameter
63
- * @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
64
- * @param {string} [config.auth] - An object with authorization settings.
65
- * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
66
- * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
67
- * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
68
- *
69
- * @return List of methods set.
57
+ * @function defineOneEntry
58
+ * @param {string} url - URl of your project.
59
+ * @param {IConfig} config - Custom configuration settings
60
+ * @param {string} [config.token] - Optional token parameter
61
+ * @param {string} [config.langCode] - Optional langCode parameter
62
+ * @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
63
+ * @param {string} [config.auth] - An object with authorization settings.
64
+ * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
65
+ * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
66
+ * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
67
+ * @returns {IDefineApi} List of methods set.
68
+ * @description Define API.
70
69
  */
71
70
  export declare function defineOneEntry(url: string, config: IConfig): IDefineApi;
72
71
  export {};
package/dist/index.js CHANGED
@@ -32,19 +32,18 @@ const usersApi_1 = __importDefault(require("./users/usersApi"));
32
32
  const wsApi_1 = __importDefault(require("./web-socket/wsApi"));
33
33
  /**
34
34
  * Define API.
35
- *
36
- * @function
37
- * @param {string} url - URl of your project.
38
- * @param {IConfig} config - Custom configuration settings
39
- * @param {string} [config.token] - Optional token parameter
40
- * @param {string} [config.langCode] - Optional langCode parameter
41
- * @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
42
- * @param {string} [config.auth] - An object with authorization settings.
43
- * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
44
- * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
45
- * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
46
- *
47
- * @return List of methods set.
35
+ * @function defineOneEntry
36
+ * @param {string} url - URl of your project.
37
+ * @param {IConfig} config - Custom configuration settings
38
+ * @param {string} [config.token] - Optional token parameter
39
+ * @param {string} [config.langCode] - Optional langCode parameter
40
+ * @param {boolean} [config.traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set this parameter to "false" to save traffic and decide for yourself what data you need.
41
+ * @param {string} [config.auth] - An object with authorization settings.
42
+ * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
43
+ * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
44
+ * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
45
+ * @returns {IDefineApi} List of methods set.
46
+ * @description Define API.
48
47
  */
49
48
  function defineOneEntry(url, config) {
50
49
  const stateModule = new stateModule_1.default(url.endsWith('/') ? url.slice(0, -1) : url, config);