oneentry 1.0.107 → 1.0.109

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 (38) hide show
  1. package/README.md +2620 -794
  2. package/dist/attribute-sets/attributeSetsApi.d.ts +9 -12
  3. package/dist/attribute-sets/attributeSetsApi.js +12 -15
  4. package/dist/auth-provider/authProviderApi.d.ts +21 -23
  5. package/dist/auth-provider/authProviderApi.js +28 -30
  6. package/dist/auth-provider/authProvidersInterfaces.d.ts +1 -1
  7. package/dist/blocks/blocksApi.d.ts +6 -6
  8. package/dist/blocks/blocksApi.js +9 -8
  9. package/dist/events/eventsApi.d.ts +7 -7
  10. package/dist/events/eventsApi.js +11 -7
  11. package/dist/file-uploading/fileUploadingApi.d.ts +4 -4
  12. package/dist/file-uploading/fileUploadingApi.js +4 -4
  13. package/dist/forms/formsApi.d.ts +1 -1
  14. package/dist/forms/formsApi.js +1 -1
  15. package/dist/formsData/formsDataApi.d.ts +16 -12
  16. package/dist/formsData/formsDataApi.js +21 -17
  17. package/dist/integration-collections/integrationCollectionsApi.d.ts +2 -2
  18. package/dist/integration-collections/integrationCollectionsApi.js +2 -2
  19. package/dist/menus/menusApi.d.ts +1 -1
  20. package/dist/menus/menusApi.js +1 -1
  21. package/dist/orders/ordersApi.d.ts +43 -43
  22. package/dist/orders/ordersApi.js +60 -60
  23. package/dist/pages/pagesApi.d.ts +15 -15
  24. package/dist/pages/pagesApi.js +20 -20
  25. package/dist/payments/paymentsApi.d.ts +5 -5
  26. package/dist/payments/paymentsApi.js +5 -5
  27. package/dist/product-statuses/productStatusesApi.d.ts +7 -6
  28. package/dist/product-statuses/productStatusesApi.js +7 -6
  29. package/dist/products/productsApi.d.ts +19 -19
  30. package/dist/products/productsApi.js +18 -18
  31. package/dist/templates/templatesApi.d.ts +3 -3
  32. package/dist/templates/templatesApi.js +3 -3
  33. package/dist/templates-preview/templatesPreviewApi.d.ts +2 -2
  34. package/dist/templates-preview/templatesPreviewApi.js +2 -2
  35. package/dist/users/usersApi.d.ts +9 -9
  36. package/dist/users/usersApi.js +19 -19
  37. package/package.json +8 -9
  38. package/readme.js +103 -0
package/README.md CHANGED
@@ -26,27 +26,27 @@ To use the AsyncModules Headless CMS SDK in your project, import the defineOneEn
26
26
  import { defineOneEntry } from 'oneentry'
27
27
 
28
28
  const {
29
- Admins,
30
- AttributesSets,
31
- AuthProvider,
32
- Blocks,
33
- Events,
34
- Forms,
35
- FormData,
36
- FileUploading,
37
- GeneralTypes,
38
- IntegrationCollections,
39
- Locales,
40
- Menus,
41
- Orders,
42
- Pages,
43
- Products,
44
- ProductStatuses,
45
- System,
46
- Templates,
47
- TemplatePreviews,
48
- Users,
49
- WS
29
+ Admins,
30
+ AttributesSets,
31
+ AuthProvider,
32
+ Blocks,
33
+ Events,
34
+ Forms,
35
+ FormData,
36
+ FileUploading,
37
+ GeneralTypes,
38
+ IntegrationCollections,
39
+ Locales,
40
+ Menus,
41
+ Orders,
42
+ Pages,
43
+ Products,
44
+ ProductStatuses,
45
+ System,
46
+ Templates,
47
+ TemplatePreviews,
48
+ Users,
49
+ WS
50
50
  } = defineOneEntry('your-url');
51
51
  ```
52
52
 
@@ -136,14 +136,14 @@ const saveTokenFromLocalStorage = (token) => {
136
136
  }
137
137
 
138
138
  const api = defineOneEntry('your-url', {
139
- token: 'my-token',
140
- langCode:'my-langCode',
141
- auth: {
142
- customAuth: false,
143
- userToken: 'rerfesh.token',
144
- saveFunction: saveTokenFromLocalStorage
145
- }
146
- })
139
+ token: 'my-token',
140
+ langCode:'my-langCode',
141
+ auth: {
142
+ customAuth: false,
143
+ userToken: 'rerfesh.token',
144
+ saveFunction: saveTokenFromLocalStorage
145
+ }
146
+ });
147
147
  ```
148
148
 
149
149
  ### Errors
@@ -160,28 +160,28 @@ These functions receive an error object as an argument. You can process it yours
160
160
 
161
161
  ```js
162
162
  const api = defineOneEntry('your-url', {
163
- token: 'my-token',
164
- langCode:'my-langCode',
165
- errors: {
166
- isShell: false,
167
- customErrors: {
168
- 400: (error) => console.error(error.message),
169
- 404: (error) => console.error(error.message),
170
- 500: (error) => console.error(error.message)
171
- }
163
+ token: 'my-token',
164
+ langCode:'my-langCode',
165
+ errors: {
166
+ isShell: false,
167
+ customErrors: {
168
+ 400: (error) => console.error(error.message),
169
+ 404: (error) => console.error(error.message),
170
+ 500: (error) => console.error(error.message)
172
171
  }
173
- })
172
+ }
173
+ });
174
174
  ```
175
175
 
176
176
  Now you can use the following links to jump to specific entries:
177
177
 
178
178
  - [Admins](#admins)
179
- - [AttributesSets](#attributessets)
179
+ - [AttributesSets](#attributesets)
180
180
  - [AuthProvider](#authprovider)
181
181
  - [Blocks](#blocks)
182
182
  - [Events](#events)
183
183
  - [Forms](#forms)
184
- - [FormData](#formdata)
184
+ - [FormData](#formsdata)
185
185
  - [FileUploading](#fileuploading)
186
186
  - [GeneralTypes](#generaltypes)
187
187
  - [IntegrationCollections](#integrationcollections)
@@ -224,7 +224,7 @@ const body = [
224
224
  ```
225
225
 
226
226
  ><details>
227
- ><summary>Schema: {body}</summary>
227
+ ><summary>Schema: (body)</summary>
228
228
  >
229
229
  >**attributeMarker:** string <br>
230
230
  >*text identifier attribute* <br>
@@ -248,7 +248,28 @@ const body = [
248
248
  const value = await Admins.getAdminsInfo([], 'en_US', 30, 0 )
249
249
  ```
250
250
 
251
- > This method retrieves user objects of type admin from the API. It returns a Promise that resolves to an array of AdminEntity objects.
251
+ ><details>
252
+ ><summary>Schema</summary>
253
+ >
254
+ >**body:** array <br>
255
+ >*array of filter objects FilterAdminsDto with search conditions*<br>
256
+ >example: [] <br>
257
+ >
258
+ >**langCode:** string <br>
259
+ >*language code* <br>
260
+ >example: en_US <br>
261
+ >
262
+ >**offset:** number <br>
263
+ >*parameter for pagination, default 0* <br>
264
+ >example: 0 <br>
265
+ >
266
+ >**limit** number <br>
267
+ >*parameter for pagination, default 30* <br>
268
+ >example: 30 <br>
269
+ >
270
+ ></details>
271
+
272
+ This method retrieves user objects of type admin from the API. It returns a Promise that resolves to an array of AdminEntity objects.
252
273
 
253
274
  Example return:
254
275
 
@@ -284,7 +305,7 @@ Example return:
284
305
  >
285
306
  >**attributeSetId:** number <br>
286
307
  >*Attribute set identifier* <br>
287
- >example: 7<br>
308
+ >example: 7 <br>
288
309
  >
289
310
  >**isSync** boolean <br>
290
311
  >*Page indexing flag (true or false)* <br>
@@ -302,19 +323,152 @@ Example return:
302
323
 
303
324
  ---
304
325
 
305
- ## <h2 id="attributessets"> AttributesSets </h2>
326
+ ## <h2 id="attributesets"> AttributesSets </h2>
306
327
 
307
328
  ```js
308
329
  const { AttributesSets } = defineOneEntry('your-url');
309
330
  ```
310
331
 
332
+ ### AttributesSets.getAttributes(langCode, offset, limit, typeId, sortBy)
333
+
334
+ ```js
335
+ const value = await AttributesSets.getAttributes()
336
+ ```
337
+
338
+ ><details>
339
+ ><summary>Schema</summary>
340
+ >
341
+ >**langCode:** string <br>
342
+ >*language code* <br>
343
+ >example: en_US <br>
344
+ >
345
+ >**offset:** number <br>
346
+ >*parameter offset of record selection, default - 0*<br>
347
+ >example: 0 <br>
348
+ >
349
+ >**limit:** number <br>
350
+ >*parameter limiting the selection of records, default - 30*<br>
351
+ >example: 30 <br>
352
+ >
353
+ >**typeId:** any <br>
354
+ >*identifier of the attribute set type*<br>
355
+ >example: null <br>
356
+ >
357
+ >**sortBy:** string <br>
358
+ >*sorting key*<br>
359
+ >example: id <br>
360
+ >
361
+ ></details>
362
+
363
+ This method return all attribute sets objects and total.
364
+
365
+ Example return:
366
+
367
+ ```json
368
+ {
369
+ "total": 100,
370
+ "items": [
371
+ {
372
+ "id": 1764,
373
+ "updatedDate": "2025-01-31T21:53:39.276Z",
374
+ "version": 10,
375
+ "identifier": "my-id",
376
+ "title": "Set for pages",
377
+ "schema": {
378
+ "attribute1": {
379
+ "id": 1,
380
+ "type": "string",
381
+ "isPrice": false,
382
+ "original": true,
383
+ "identifier": "stroka",
384
+ "localizeInfos": {
385
+ "en_US": {
386
+ "title": "String"
387
+ }
388
+ }
389
+ }
390
+ },
391
+ "isVisible": true,
392
+ "type": {
393
+ "id": 5,
394
+ "type": "forProducts"
395
+ },
396
+ "position": 1
397
+ }
398
+ ]
399
+ }
400
+ ```
401
+
402
+ ><details>
403
+ ><summary>Schema</summary>
404
+ >
405
+ >**total:** number <br>
406
+ >*Total number of found records* <br>
407
+ >example: 100 <br>
408
+ >
409
+ >**items:** ContentPositionAttributesSetDto <br>
410
+ >*ContentPositionAttributesSetDto* <br>
411
+ >
412
+ >**id:** number <br>
413
+ >*Object identifier* <br>
414
+ >example: 1764 <br>
415
+ >
416
+ >**updatedDate:** string($date-time) <br>
417
+ >*Object modification date* <br>
418
+ >example: '' <br>
419
+ >
420
+ >**version:** number <br>
421
+ >*Object modification version number* <br>
422
+ >example: 10 <br>
423
+ >
424
+ >**identifier:** string <br>
425
+ >*Text identifier for record field* <br>
426
+ >example: 'my-id' <br>
427
+ >
428
+ >**title:** string <br>
429
+ >*Attribute set name* <br>
430
+ >example: Set for pages <br>
431
+ >
432
+ >**schema:** Record<string, string> <br>
433
+ >*Schema JSON description (attributes used by the set) of the attribute set* <br>
434
+ >example: OrderedMap { "attribute1": OrderedMap { "id": 1, "type": "string", "isPrice": false, "original": true, "identifier": "stroka", "localizeInfos": OrderedMap { "en_US": OrderedMap { "title": "String" } } } } <br>
435
+ >
436
+ >**title:** string <br>
437
+ >*Attribute set name* <br>
438
+ >example: Set for pages <br>
439
+ >
440
+ >**isVisible:** boolean <br>
441
+ >*Visibility flag of the set* <br>
442
+ >
443
+ >**type:** object <br>
444
+ >*Object of set type* <br>
445
+ >
446
+ >**position:** number <br>
447
+ >*Position number* <br>
448
+ >example: 1 <br>
449
+ >
450
+ ></details>
451
+
311
452
  ### AttributesSets.getAttributesByMarker(marker, langCode)
312
453
 
313
454
  ```js
314
455
  const value = await AttributesSets.getAttributesByMarker('my-marker', 'en_US')
315
456
  ```
316
457
 
317
- > This method return all attributes with data from the attribute sets.
458
+ ><details>
459
+ ><summary>Schema</summary>
460
+ >
461
+ >**marker*:** string <br>
462
+ >*text identifier (marker) of the attribute set*<br>
463
+ >example: 'form' <br>
464
+ >
465
+ >**langCode:** string <br>
466
+ >*language code* <br>
467
+ >example: en_US <br>
468
+ >
469
+ ></details>
470
+
471
+ This method return all attributes with data from the attribute set
318
472
 
319
473
  Example return:
320
474
 
@@ -354,6 +508,14 @@ Example return:
354
508
  "type": null
355
509
  }
356
510
  }
511
+ ],
512
+ "settings": {},
513
+ "additionalFields": [
514
+ {
515
+ "type": "string",
516
+ "value": "Your Name",
517
+ "marker": "placeholder"
518
+ }
357
519
  ]
358
520
  }
359
521
  ]
@@ -385,8 +547,16 @@ Example return:
385
547
  >example: OrderedMap { "title": "My attribute" } <br>
386
548
  >
387
549
  >**listTitles** Record<string, any> <br>
388
- >*array of values (with extended data) for list and radioButton attributes* <br>
389
- >example: List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extendedValue": null, "extendedValueType": null }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extendedValue": null, "extendedValueType": null } ] <br>
550
+ >*array of values (with extended data) for attributes of type list and radioButton* <br>
551
+ >example: List [ OrderedMap { "title": "red", "value": 1, "position": 1, "extended": OrderedMap { "value": null, "type": null } }, OrderedMap { "title": "yellow", "value": 2, "position": 2, "extended": OrderedMap { "value": null, "type": null } } ] <br>
552
+ >
553
+ >**settings:** Record<string, any> <br>
554
+ >*additional attribute settings (optional)* <br>
555
+ >example: OrderedMap {} <br>
556
+ >
557
+ >**additionalFields:** Record<string, AttributeInSetDto> <br>
558
+ >*example: List [ OrderedMap { "type": "string", "value": "Your Name", "marker": "placeholder" } ]* <br>
559
+ >example: OrderedMap {} <br>
390
560
  >
391
561
  ></details>
392
562
 
@@ -396,7 +566,24 @@ Example return:
396
566
  const value = await AttributesSets.getSingleAttributeByMarkerSet('list1', 'list1', 'en_US')
397
567
  ```
398
568
 
399
- > This method return a single attribute with data from the attribute sets.
569
+ ><details>
570
+ ><summary>Schema</summary>
571
+ >
572
+ >**setMarker*:** number <br>
573
+ >*text identifier (marker) of the attribute set* <br>
574
+ >example: 'form'<br>
575
+ >
576
+ >**attributeMarker*:** string <br>
577
+ >*text identifier (marker) of the attribute in the set*<br>
578
+ >example: 'list1' <br>
579
+ >
580
+ >**langCode:** string <br>
581
+ >*language code* <br>
582
+ >example: en_US <br>
583
+ >
584
+ ></details>
585
+
586
+ This method return a single attribute with data from the attribute sets.
400
587
 
401
588
  Example return:
402
589
 
@@ -470,6 +657,98 @@ Example return:
470
657
 
471
658
  ---
472
659
 
660
+ ### AttributesSets.getAttributeSetByMarker(marker, langCode)
661
+
662
+ ```js
663
+ const value = await AttributesSets.getAttributeSetByMarker('my-marker', 'en_US')
664
+ ```
665
+
666
+ ><details>
667
+ ><summary>Schema</summary>
668
+ >
669
+ >**marker*:** string <br>
670
+ >*text identifier (marker) of the attribute set*<br>
671
+ >example: 'form' <br>
672
+ >
673
+ >**langCode:** string <br>
674
+ >*language code* <br>
675
+ >example: en_US <br>
676
+ >
677
+ ></details>
678
+
679
+ This method return one attribute with data from the attribute set
680
+
681
+ Example return:
682
+
683
+ ```json
684
+ {
685
+ "id": 1764,
686
+ "updatedDate": "2025-01-31T22:25:11.952Z",
687
+ "version": 10,
688
+ "identifier": "my-id",
689
+ "title": "Set for pages",
690
+ "schema": {
691
+ "attribute1": {
692
+ "id": 1,
693
+ "type": "string",
694
+ "isPrice": false,
695
+ "original": true,
696
+ "identifier": "stroka",
697
+ "localizeInfos": {
698
+ "en_US": {
699
+ "title": "String"
700
+ }
701
+ }
702
+ }
703
+ },
704
+ "isVisible": true,
705
+ "type": {
706
+ "id": 5,
707
+ "type": "forProducts"
708
+ },
709
+ "position": 1
710
+ }
711
+ ```
712
+
713
+ ><details>
714
+ ><summary>Schema</summary>
715
+ >
716
+ >**id:** number <br>
717
+ >*Object identifier* <br>
718
+ >example: 1764 <br>
719
+ >
720
+ >**updatedDate:** string($date-time) <br>
721
+ >*Object modification date* <br>
722
+ >example: <br>
723
+ >
724
+ >**version:** number <br>
725
+ >*Object modification version number* <br>
726
+ >example: 10 <br>
727
+ >
728
+ >**identifier*:** string <br>
729
+ >*Text identifier for record field* <br>
730
+ >example: 'my-id' <br>
731
+ >
732
+ >**title*:** string <br>
733
+ >*Attribute set name* <br>
734
+ >example: 'Set for pages' <br>
735
+ >
736
+ >**schema*:** Record<string, string> <br>
737
+ >*Schema JSON description (attributes used by the set) of the attribute set* <br>
738
+ >example: OrderedMap { "attribute1": OrderedMap { "id": 1, "type": "string", "isPrice": false, "original": true, "identifier": "stroka", "localizeInfos": OrderedMap { "en_US": OrderedMap { "title": "String" } } } } <br>
739
+ >
740
+ >**isVisible*:** boolean <br>
741
+ >*Visibility flag of the set* <br>
742
+ >
743
+ >**type*:** object <br>
744
+ >*Object of set type* <br>
745
+ >
746
+ >**position*:** number <br>
747
+ >*Position number* <br>
748
+ >example: 1 <br>
749
+ >
750
+ ></details>
751
+
473
752
  ## <h2 id="authprovider"> User Auth Provider </h2>
474
753
 
475
754
  ```js
@@ -478,9 +757,49 @@ const { AuthProvider } = defineOneEntry('your-url');
478
757
 
479
758
  ### AuthProvider.signUp(marker, body, langCode)
480
759
 
760
+ ><details>
761
+ ><summary>Schema</summary>
762
+ >
763
+ >**marker*:** string <br>
764
+ >*The text identifier of the authorization provider* <br>
765
+ >example: email <br>
766
+ >
767
+ >**body*:** ISignUpData <br>
768
+ >*Request body* <br>
769
+ >example: {
770
+ "formIdentifier": "reg",
771
+ "authData": [
772
+ {
773
+ "marker": "login",
774
+ "value": "example@oneentry.cloud"
775
+ },
776
+ {
777
+ "marker": "password",
778
+ "value": "12345"
779
+ }
780
+ ],
781
+ "formData": [
782
+ {
783
+ "marker": "last_name",
784
+ "type": "string",
785
+ "value": "Name"
786
+ }
787
+ ],
788
+ "notificationData": {
789
+ "email": "example@oneentry.cloud",
790
+ "phonePush": ["+99999999999"],
791
+ "phoneSMS": "+99999999999"
792
+ }
793
+ }
794
+ <br>
481
795
  >
482
- > Method accept the body as a parameter.
796
+ >**langCode:** string <br>
797
+ >*language code* <br>
798
+ >example: en_US <br>
483
799
  >
800
+ ></details>
801
+
802
+ Method accept the body as a parameter.
484
803
 
485
804
  Examples for body parameter with different types data:
486
805
 
@@ -957,7 +1276,7 @@ const value = await AuthProvider.signUp('email', body)
957
1276
  >*the text identifier of the authorization provider's form* <br>
958
1277
  >example: reg_form <br>
959
1278
  >
960
- >**authData:** FormAuthDataType <br>
1279
+ >**authData:** FormAuthDataType <br>
961
1280
  >*authorization data taken from the form linked to the authorization provider* <br>
962
1281
  >example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ] <br>
963
1282
  >
@@ -1039,7 +1358,7 @@ Example return:
1039
1358
  >*the text identifier of the authorization provider's form* <br>
1040
1359
  >example: reg_form <br>
1041
1360
  >
1042
- >**authData:** FormAuthDataType <br>
1361
+ >**authData:** FormAuthDataType <br>
1043
1362
  >*authorization data taken from the form linked to the authorization provider* <br>
1044
1363
  >example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ] <br>
1045
1364
  >
@@ -1052,10 +1371,27 @@ Example return:
1052
1371
  ### AuthProvider.generateCode(marker, userIdentifier, eventIdentifier)
1053
1372
 
1054
1373
  ```js
1055
- const value = await AuthProvider.generateCode('email', 'test@trer.com', 'auth')
1374
+ const value = await AuthProvider.generateCode('email', 'example@oneentry.cloud', 'auth')
1056
1375
  ```
1057
1376
 
1058
- > This method receives a code to activate the user. Code is returned through the corresponding user notification method
1377
+ ><details>
1378
+ ><summary>Schema</summary>
1379
+ >
1380
+ >**marker*:** array <br>
1381
+ >*The text identifier of the authorization provider*<br>
1382
+ >example: email <br>
1383
+ >
1384
+ >**userIdentifier*:** string <br>
1385
+ >*The text identifier of the user's object (user login)* <br>
1386
+ >example: example@oneentry.cloud <br>
1387
+ >
1388
+ >**eventIdentifier*:** string <br>
1389
+ >*Text identifier of the event object for which the code is generated* <br>
1390
+ >example: auth <br>
1391
+ >
1392
+ ></details>
1393
+
1394
+ This method receives a code to activate the user. Code is returned through the corresponding user notification method
1059
1395
 
1060
1396
  ### AuthProvider.checkCode(marker, userIdentifier, code)
1061
1397
 
@@ -1063,7 +1399,28 @@ const value = await AuthProvider.generateCode('email', 'test@trer.com', 'auth')
1063
1399
  const value = await AuthProvider.checkCode('email', 'example@oneentry.cloud', 'WTGC9E')
1064
1400
  ```
1065
1401
 
1066
- > This method checks the user's code. Returns true (if the code is correct) or false (if it is incorrect).
1402
+ ><details>
1403
+ ><summary>Schema</summary>
1404
+ >
1405
+ >**marker*:** string <br>
1406
+ >*The text identifier of the authorization provider.*<br>
1407
+ >example: email <br>
1408
+ >
1409
+ >**userIdentifier*:** string <br>
1410
+ >*The text identifier of the user's object (user login)* <br>
1411
+ >example: example@oneentry.cloud <br>
1412
+ >
1413
+ >**eventIdentifier*:** string <br>
1414
+ >*Text identifier of the event object for which the code is generated* <br>
1415
+ >example: auth <br>
1416
+ >
1417
+ >**code*:** string <br>
1418
+ >*Service code* <br>
1419
+ >example: WTGC9E <br>
1420
+ >
1421
+ ></details>
1422
+
1423
+ This method checks the user's code. Returns true (if the code is correct) or false (if it is incorrect).
1067
1424
 
1068
1425
  Example return:
1069
1426
 
@@ -1077,7 +1434,24 @@ true
1077
1434
  const value = await AuthProvider.activateUser('email', 'example@oneentry.cloud', 'WTGC9E')
1078
1435
  ```
1079
1436
 
1080
- > This method activates the user by code. If successful, it will return true.
1437
+ ><details>
1438
+ ><summary>Schema</summary>
1439
+ >
1440
+ >**marker*:** string <br>
1441
+ >*Textual identifier of the authentication provider* <br>
1442
+ >example: email <br>
1443
+ >
1444
+ >**userIdentifier*:** string <br>
1445
+ >*The text identifier of the user's object (user login)* <br>
1446
+ >example: example@oneentry.cloud <br>
1447
+ >
1448
+ >**code*:** string <br>
1449
+ >*Service code* <br>
1450
+ >example: WTGC9E <br>
1451
+ >
1452
+ ></details>
1453
+
1454
+ This method activates the user by code. If successful, it will return true.
1081
1455
 
1082
1456
  Example return:
1083
1457
 
@@ -1104,6 +1478,21 @@ const data = {
1104
1478
  const value = await AuthProvider.auth('email', data)
1105
1479
  ```
1106
1480
 
1481
+ ><details>
1482
+ ><summary>Schema</summary>
1483
+ >
1484
+ >**marker:** string <br>
1485
+ >*The text identifier of the authorization provider*<br>
1486
+ >example: email <br>
1487
+ >
1488
+ >**data:** IAuthPostBody <br>
1489
+ >*Array of objects contains auth information* <br>
1490
+ >example: { authData: [{marker: "login",value: "test"},{marker: "password",value: "12345"}]} <br>
1491
+ >
1492
+ ></details>
1493
+
1494
+ <br>
1495
+
1107
1496
  ><details>
1108
1497
  ><summary>Schema</summary>
1109
1498
  >
@@ -1112,7 +1501,8 @@ const value = await AuthProvider.auth('email', data)
1112
1501
  >example: List [ OrderedMap { "marker": "login", "value": "test" }, OrderedMap { "marker": "password", "value": "12345" } ] <br>
1113
1502
  >
1114
1503
  ></details>
1115
- > This method performs user authorization. Returns an object with a set of tokens.
1504
+
1505
+ This method performs user authorization. Returns an object with a set of tokens.
1116
1506
 
1117
1507
  Example return:
1118
1508
 
@@ -1152,13 +1542,26 @@ Example return:
1152
1542
  const value = await AuthProvider.refresh('email', '1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9')
1153
1543
  ```
1154
1544
 
1155
- > This method updates the user's token. Returns an object with a set of tokens.
1156
-
1157
- Example return:
1158
-
1159
- ```json
1160
- {
1161
- "userIdentifier": "example@oneentry.cloud",
1545
+ ><details>
1546
+ ><summary>Schema</summary>
1547
+ >
1548
+ >**marker*:** string <br>
1549
+ >*The text identifier of the authorization provider. Example - email* <br>
1550
+ >example: email <br>
1551
+ >
1552
+ >**token*:** string <br>
1553
+ >*Refresh token* <br>
1554
+ >example: 1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9 <br>
1555
+ >
1556
+ ></details>
1557
+
1558
+ This method updates the user's token. Returns an object with a set of tokens.
1559
+
1560
+ Example return:
1561
+
1562
+ ```json
1563
+ {
1564
+ "userIdentifier": "example@oneentry.cloud",
1162
1565
  "authProviderIdentifier": "email",
1163
1566
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJQb3N0bWFuUnVudGltZS83LjM3LjMiLCJpYXQiOjE3MTQ1NTc2NzAsImV4cCI6MTcxNDU2MTI3MH0.vm74Ha-S37462CAF3QiDpO9b0OhlJFNDMKq4eEyoaB8",
1164
1567
  "refreshToken": "1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9"
@@ -1192,7 +1595,20 @@ Example return:
1192
1595
  const value = await AuthProvider.logout('email', '1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9')
1193
1596
  ```
1194
1597
 
1195
- > This method performs a user logout. If successful, it will return true.
1598
+ ><details>
1599
+ ><summary>Schema</summary>
1600
+ >
1601
+ >**marker*:** string <br>
1602
+ >*The text identifier of the authorization provider* <br>
1603
+ >example: email <br>
1604
+ >
1605
+ >**token*:** string <br>
1606
+ >*Refresh token* <br>
1607
+ >example: 1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9 <br>
1608
+ >
1609
+ ></details>
1610
+
1611
+ This method performs a user logout. If successful, it will return true. This method requires user authorization.
1196
1612
 
1197
1613
  Example return:
1198
1614
 
@@ -1206,7 +1622,36 @@ true
1206
1622
  const value = await AuthProvider.changePassword('email', 'example@oneentry.cloud', 1, 'EW32RF', 654321, 654321)
1207
1623
  ```
1208
1624
 
1209
- > This method changes the password of an authorized user. If successful, it will return true.
1625
+ ><details>
1626
+ ><summary>Schema</summary>
1627
+ >
1628
+ >**marker*:** string <br>
1629
+ >*The text identifier of the authorization provider.*<br>
1630
+ >example: email <br>
1631
+ >
1632
+ >**userIdentifier*:** string <br>
1633
+ >*The text identifier of the user's object (user login)* <br>
1634
+ >example: example@oneentry.cloud <br>
1635
+ >
1636
+ >**type*:** number <br>
1637
+ >*Operation type (1 - for changing password, 2 - for recovery)* <br>
1638
+ >example: 1 <br>
1639
+ >
1640
+ >**code*:** string <br>
1641
+ >*Service code* <br>
1642
+ >example: EW32RF <br>
1643
+ >
1644
+ >**newPassword*:** string <br>
1645
+ >*New password* <br>
1646
+ >example: 654321 <br>
1647
+ >
1648
+ >**repeatPassword:** string <br>
1649
+ >*Optional variable contains repeat new password for validation* <br>
1650
+ >example: 654321 <br>
1651
+ >
1652
+ ></details>
1653
+
1654
+ This method changes the password of an authorized user. If successful, it will return true.
1210
1655
 
1211
1656
  Example return:
1212
1657
 
@@ -1220,7 +1665,26 @@ true
1220
1665
  const value = await AuthProvider.getAuthProviders()
1221
1666
  ```
1222
1667
 
1223
- > This method gets all the objects of the authorization providers.
1668
+ ><details>
1669
+ ><summary>Schema</summary>
1670
+ >
1671
+ >**langCode:** string <br>
1672
+ >*language code* <br>
1673
+ >example: en_US <br>
1674
+ >
1675
+ >**offset:** number <br>
1676
+ >*parameter for pagination, default 0* <br>
1677
+ >example: 0 <br>
1678
+ >
1679
+ >**limit:** number <br>
1680
+ >*parameter for pagination, default 30* <br>
1681
+ >example: 30 <br>
1682
+ >
1683
+ ></details>
1684
+
1685
+ <br>
1686
+
1687
+ This method gets all the objects of the authorization providers.
1224
1688
 
1225
1689
  Example return:
1226
1690
 
@@ -1291,7 +1755,20 @@ Example return:
1291
1755
  const value = await AuthProvider.getMarker('email')
1292
1756
  ```
1293
1757
 
1294
- > Getting a single token authorization provider object.
1758
+ ><details>
1759
+ ><summary>Schema</summary>
1760
+ >
1761
+ >**marker*:** string <br>
1762
+ >*The text identifier of the authorization provider* <br>
1763
+ >example: email <br>
1764
+ >
1765
+ >**langCode:** string <br>
1766
+ >*language code* <br>
1767
+ >example: en_US <br>
1768
+ >
1769
+ ></details>
1770
+
1771
+ Getting a single token authorization provider object.
1295
1772
 
1296
1773
  Example return:
1297
1774
 
@@ -1370,7 +1847,28 @@ const { Blocks } = defineOneEntry('your-url');
1370
1847
  const value = await Blocks.getBlocks('forTextBlock')
1371
1848
  ```
1372
1849
 
1373
- > This method return array of all blocks object. Available values of type : forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, forOrder, service
1850
+ ><details>
1851
+ ><summary>Schema</summary>
1852
+ >
1853
+ >**type*:** BlockType <br>
1854
+ >*Available values: forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, forOrder, service* <br>
1855
+ >example: forTextBlock <br>
1856
+ >
1857
+ >**langCode:** string <br>
1858
+ >*Language code* <br>
1859
+ >example: en_US <br>
1860
+ >
1861
+ >**offset:** number <br>
1862
+ >*Parameter for pagination. Default 0* <br>
1863
+ >example: 0 <br>
1864
+ >
1865
+ >**limit:** number <br>
1866
+ >*Parameter for pagination. Default 30* <br>
1867
+ >example: 30 <br>
1868
+ >
1869
+ ></details>
1870
+
1871
+ This method return array of all blocks object and total.
1374
1872
 
1375
1873
  Example return:
1376
1874
 
@@ -1455,7 +1953,28 @@ Example return:
1455
1953
  const value = await Blocks.getBlockByMarker('my-marker')
1456
1954
  ```
1457
1955
 
1458
- > This method return one blocks object by marker.
1956
+ ><details>
1957
+ ><summary>Schema</summary>
1958
+ >
1959
+ >**marker*:** string <br>
1960
+ >*Marker of Block* <br>
1961
+ >example: my-marker <br>
1962
+ >
1963
+ >**langCode:** string <br>
1964
+ >*Language code* <br>
1965
+ >example: en_US <br>
1966
+ >
1967
+ >**offset:** number <br>
1968
+ >*Parameter for pagination. Default 0* <br>
1969
+ >example: 0 <br>
1970
+ >
1971
+ >**limit:** number <br>
1972
+ >*Parameter for pagination. Default 30* <br>
1973
+ >example: 30 <br>
1974
+ >
1975
+ ></details>
1976
+
1977
+ This method return one blocks object by marker.
1459
1978
 
1460
1979
  Example return:
1461
1980
 
@@ -1584,10 +2103,23 @@ example: OrderedMap { "sliderDelay": 0, "sliderDelayType": "", "productConfig":
1584
2103
  ### Blocks.searchBlock(name, langCode)
1585
2104
 
1586
2105
  ```js
1587
- const value = await Blocks.searchBlock('my-marker', 'en_US')
2106
+ const value = await Blocks.searchBlock('my-marker')
1588
2107
  ```
1589
2108
 
1590
- > Quick search for block objects with limited output.
2109
+ ><details>
2110
+ ><summary>Schema</summary>
2111
+ >
2112
+ >**marker*:** string <br>
2113
+ >*Block identifier* <br>
2114
+ >example: my-marker <br>
2115
+ >
2116
+ >**langCode:** string <br>
2117
+ >*Language code* <br>
2118
+ >example: en_US <br>
2119
+ >
2120
+ ></details>
2121
+
2122
+ Quick search for block objects with limited output.
1591
2123
 
1592
2124
  Example return:
1593
2125
 
@@ -1612,10 +2144,23 @@ const { Events } = defineOneEntry('your-url');
1612
2144
  ### Events.getAllSubscriptions(offset, limit)
1613
2145
 
1614
2146
  ```js
1615
- const value = await Events.getAllSubscriptions('test_event', 1, 1)
2147
+ const value = await Events.getAllSubscriptions(0, 30)
1616
2148
  ```
1617
2149
 
1618
- > This method return all subscriptions to product.
2150
+ ><details>
2151
+ ><summary>Schema</summary>
2152
+ >
2153
+ >**offset:** number <br>
2154
+ >*Pagination parameter, default is 0* <br>
2155
+ >example: 0 <br>
2156
+ >
2157
+ >**limit:** number <br>
2158
+ >*Pagination parameter, default is 30* <br>
2159
+ >example: 30 <br>
2160
+ >
2161
+ ></details>
2162
+
2163
+ This method return all subscriptions to product.
1619
2164
 
1620
2165
  Example return:
1621
2166
 
@@ -1651,15 +2196,57 @@ Example return:
1651
2196
  const value = await Events.subscribeByMarker('test_event', 1, 1)
1652
2197
  ```
1653
2198
 
1654
- > This method unsubscribes to the product event. Returns nothing if the unsubscription was successful.
2199
+ ><details>
2200
+ ><summary>Schema</summary>
2201
+ >
2202
+ >**marker*:** string <br>
2203
+ >*Event marker* <br>
2204
+ >example: test_event <br>
2205
+ >
2206
+ >**productId*:** string <br>
2207
+ >*Product id* <br>
2208
+ >example: 14 <br>
2209
+ >
2210
+ >**langCode:** string <br>
2211
+ >*Language code* <br>
2212
+ >example: en_US <br>
2213
+ >
2214
+ >**threshold:** number <br>
2215
+ >*Threshold value for comparing numerical value* <br>
2216
+ >example: 0 <br>
2217
+ >
2218
+ ></details>
2219
+
2220
+ This method subscribes to the product event. Returns nothing if the subscription was successful. This method requires user authorization.
1655
2221
 
1656
2222
  ### Events.unsubscribeByMarker(marker, userId, productId)
1657
2223
 
1658
2224
  ```js
1659
- const value = await Events.subscribeByMarker('test_event', 1, 1)
2225
+ const value = await Events.unsubscribeByMarker('test_event', 1, 1)
1660
2226
  ```
1661
2227
 
1662
- > This method subscribes to the product event. Returns nothing if the subscription was successful.
2228
+ ><details>
2229
+ ><summary>Schema</summary>
2230
+ >
2231
+ >**marker*:** string <br>
2232
+ >*Event marker* <br>
2233
+ >example: test_event <br>
2234
+ >
2235
+ >**productId*:** string <br>
2236
+ >*Product id* <br>
2237
+ >example: 14 <br>
2238
+ >
2239
+ >**langCode:** string <br>
2240
+ >*Language code* <br>
2241
+ >example: en_US <br>
2242
+ >
2243
+ >**threshold:** number <br>
2244
+ >*Threshold value for comparing numerical value* <br>
2245
+ >example: 0 <br>
2246
+ >
2247
+ ></details>
2248
+
2249
+ This method unsubscribes to the product event. Returns nothing if the unsubscription was successful.
1663
2250
 
1664
2251
  ---
1665
2252
 
@@ -1673,19 +2260,59 @@ const { FileUploading } = defineOneEntry('your-url');
1673
2260
 
1674
2261
  ```js
1675
2262
  const query = {
1676
- type:"page",
1677
- entity:"editor",
1678
- id:3787,
1679
- width:0,
1680
- height:0,
1681
- compress:true,
1682
- }
2263
+ type:"page",
2264
+ entity:"editor",
2265
+ id:3787,
2266
+ width:0,
2267
+ height:0,
2268
+ compress:true,
2269
+ }
1683
2270
 
1684
2271
  const value = await FileUploading.upload(data, query)
1685
2272
  ```
1686
2273
 
1687
- > This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file".
1688
- > Data is file object (or array), learn more - [File Object](https://developer.mozilla.org/en-US/docs/Web/API/File)
2274
+ ><details>
2275
+ ><summary>Schema</summary>
2276
+ >
2277
+ >**data*:** File <br>
2278
+ >*File objects. Get data as File from your unput as e.target.files[0]*<br>
2279
+ >example: <br>
2280
+ >
2281
+ >**fileQuery:** IUploadingQuery <br>
2282
+ >*Optional set query parameters.*<br>
2283
+ >example: <br>
2284
+ >
2285
+ >**fileQuery.type:** string <br>
2286
+ >*Type, determines the folder name in the storage* <br>
2287
+ >example: page <br>
2288
+ >
2289
+ >**fileQuery.entity:** string <br>
2290
+ >*Entity name from which the file is uploaded, determines the folder name in the storage* <br>
2291
+ >example: editor <br>
2292
+ >
2293
+ >**fileQuery.id** number <br>
2294
+ >*Identifier of the object from which the file is uploaded, determines the folder name in the storage* <br>
2295
+ >example: 3787 <br>
2296
+ >
2297
+ >**fileQuery.width** number <br>
2298
+ >*Optional width parameter.* <br>
2299
+ >example: 0 <br>
2300
+ >
2301
+ >**fileQuery.height** number <br>
2302
+ >*Optional height parameter* <br>
2303
+ >example: 0 <br>
2304
+ >
2305
+ >**fileQuery.compress** boolean <br>
2306
+ >*Optional flag of optimization (compression) for images* <br>
2307
+ >example: true <br>
2308
+ >
2309
+ ></details>
2310
+
2311
+ This method uploads a file to a cloud file storage. Pass to the date the value obtained from input type "file".
2312
+
2313
+ <br>
2314
+
2315
+ Data is file object (or array), learn more - [File Object](https://developer.mozilla.org/en-US/docs/Web/API/File)
1689
2316
 
1690
2317
  Example return:
1691
2318
 
@@ -1717,16 +2344,40 @@ Example return:
1717
2344
 
1718
2345
  ```js
1719
2346
  const query = {
1720
- type:"page",
1721
- entity:"editor",
1722
- id:3787
1723
- }
1724
-
2347
+ type:"page",
2348
+ entity:"editor",
2349
+ id:3787
2350
+ }
1725
2351
 
1726
2352
  const value = await FileUploading.delete("file.png", query)
1727
2353
  ```
1728
2354
 
1729
- > This void method delete a file from the cloud file storage.
2355
+ ><details>
2356
+ ><summary>Schema</summary>
2357
+ >
2358
+ >**filename:** string <br>
2359
+ >*File name.*<br>
2360
+ >example: file.png <br>
2361
+ >
2362
+ >**fileQuery:** IUploadingQuery <br>
2363
+ >*Optional set query parameters*<br>
2364
+ >example: <br>
2365
+ >
2366
+ >**fileQuery.type:** string <br>
2367
+ >*Type, determines the folder name in the storage* <br>
2368
+ >example: page <br>
2369
+ >
2370
+ >**fileQuery.entity:** string <br>
2371
+ >*Entity name from which the file is uploaded, determines the folder name in the storage* <br>
2372
+ >example: editor <br>
2373
+ >
2374
+ >**fileQuery.id** number <br>
2375
+ >*Identifier of the object from which the file is uploaded, determines the folder name in the storage* <br>
2376
+ >example: 3787 <br>
2377
+ >
2378
+ ></details>
2379
+
2380
+ This void method delete a file from the cloud file storage.
1730
2381
 
1731
2382
  ### FileUploading.getFile(id, type, entity, filename)
1732
2383
 
@@ -1734,7 +2385,28 @@ const value = await FileUploading.delete("file.png", query)
1734
2385
  const value = await FileUploading.getFile(123, 'page', 'editor', 'file.png')
1735
2386
  ```
1736
2387
 
1737
- > This method return file object by parameters.
2388
+ ><details>
2389
+ ><summary>Schema</summary>
2390
+ >
2391
+ >**id:** number <br>
2392
+ >*Object identifier, from which the file is uploaded, determines the folder name in the storage*<br>
2393
+ >example: 123 <br>
2394
+ >
2395
+ >**type:** string <br>
2396
+ >*Type, determines the folder name in the storage* <br>
2397
+ >example: page <br>
2398
+ >
2399
+ >**entity:** string <br>
2400
+ >*entity name, from which the file is uploaded, determines the folder name in the storage* <br>
2401
+ >example: editor <br>
2402
+ >
2403
+ >**filename:** string <br>
2404
+ >*Filename* <br>
2405
+ >example: file.png <br>
2406
+ >
2407
+ ></details>
2408
+
2409
+ This method return file object by parameters.
1738
2410
 
1739
2411
  Example return:
1740
2412
 
@@ -1755,10 +2427,27 @@ const { Forms } = defineOneEntry('your-url');
1755
2427
  ### Forms.getAllForms(langCode, offset, limit)
1756
2428
 
1757
2429
  ```js
1758
- const value = await Forms.getAllForms('en_US', 0, 30)
2430
+ const value = await Forms.getAllForms()
1759
2431
  ```
1760
2432
 
1761
- > This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.
2433
+ ><details>
2434
+ ><summary>Schema</summary>
2435
+ >
2436
+ >**langCode** string <br>
2437
+ >*Language code. Default "en_US"* <br>
2438
+ >example: en_US <br>
2439
+ >
2440
+ >**offset** number <br>
2441
+ >*Parameter for pagination. Default 0* <br>
2442
+ >example: 0 <br>
2443
+ >
2444
+ >**limit** number <br>
2445
+ >*Parameter for pagination. Default 30* <br>
2446
+ >example: 30 <br>
2447
+ >
2448
+ ></details>
2449
+
2450
+ This method retrieves all form objects from the API. It returns a Promise that resolves to an array of FormEntity objects.
1762
2451
 
1763
2452
  Example return:
1764
2453
 
@@ -1863,10 +2552,23 @@ Example return:
1863
2552
  ### Forms.getFormByMarker(marker, langCode)
1864
2553
 
1865
2554
  ```js
1866
- const value = await Forms.getFormByMarker('My form', 'en_US')
2555
+ const value = await Forms.getFormByMarker('my-form')
1867
2556
  ```
1868
2557
 
1869
- > This method retrieves a single form object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a FormEntity object.
2558
+ ><details>
2559
+ ><summary>Schema</summary>
2560
+ >
2561
+ >**marker*:** string <br>
2562
+ >*Marker of form* <br>
2563
+ >example: my-form <br>
2564
+ >
2565
+ >**langCode:** string <br>
2566
+ >*Language code. Default "en_US"* <br>
2567
+ >example: en_US <br>
2568
+ >
2569
+ ></details>
2570
+
2571
+ This method retrieves a single form object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a FormEntity object.
1870
2572
 
1871
2573
  Example return:
1872
2574
 
@@ -1968,7 +2670,7 @@ Example return:
1968
2670
 
1969
2671
  ---
1970
2672
 
1971
- ## <h2 id="formdata"> FormData </h2>
2673
+ ## <h2 id="formsdata"> FormData </h2>
1972
2674
 
1973
2675
  ```js
1974
2676
  const { FormData } = defineOneEntry('your-url');
@@ -1982,10 +2684,10 @@ Example with a simple type attribute "string", "number", "float"
1982
2684
 
1983
2685
  ```json
1984
2686
  {
1985
- "marker": "last_name",
1986
- "type": "string",
1987
- "value": "Username"
1988
- }
2687
+ "marker": "last_name",
2688
+ "type": "string",
2689
+ "value": "Username"
2690
+ }
1989
2691
  ```
1990
2692
 
1991
2693
  ---
@@ -2149,60 +2851,61 @@ Example with attribute type "entity" (nested list)
2149
2851
  }
2150
2852
  ```
2151
2853
 
2152
- ### FormData.postFormsData(data, langCode)
2854
+ ---
2153
2855
 
2154
- ```js
2155
- const body = {
2156
- formIdentifier: 'test',
2157
- formData: {
2158
- marker: 'test',
2159
- value: 'Test',
2160
- "type": "string"
2161
- },
2162
- }
2856
+ ### FormData.getFormsData(langCode, offset, limit)
2163
2857
 
2164
- const value = await FormData.postFormsData(body)
2858
+ ```js
2859
+ const value = await FormData.getFormsData()
2165
2860
  ```
2166
2861
 
2167
2862
  ><details>
2168
- ><summary >Schema</summary>
2863
+ ><summary>Schema</summary>
2169
2864
  >
2170
- >**id:** number <br>
2171
- >*object identifier* <br>
2172
- >example: 1764 <br>
2865
+ >**langCode:** string <br>
2866
+ >*Language code. Default "en_US"* <br>
2867
+ >example: <br>
2173
2868
  >
2174
- >**formIdentifier:** string <br>
2175
- >*text identifier of form object (marker)* <br>
2176
- >example: my-form <br>
2869
+ >**offset:** number <br>
2870
+ >*Parameter for pagination. Default 0* <br>
2871
+ >example: 0 <br>
2177
2872
  >
2178
- >**time:** Date <br>
2179
- >*form change date and time* <br>
2180
- >example: 2023-02-12 10:56<br>
2873
+ >**limit:** number <br>
2874
+ >*Parameter for pagination. Default 30* <br>
2875
+ >example: 30 <br>
2181
2876
  >
2182
- >**formData:** <br>
2183
- >*Data submitted by the form* <br>
2184
- >example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "type": "string", "value": "Name" } ] }<br>
2185
2877
  ></details>
2186
- > This method retrieves all form data objects from the API. It returns a Promise that resolves to an array of objects of type CreateFormData. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
2878
+
2879
+ This method creates form data objects by sending a request to the API. It accepts an array of objects of type IFormsPost as the request body to provide the necessary form data. It returns a Promise that resolves to the created CreateFormDataDto objects.
2187
2880
 
2188
2881
  Example return:
2189
2882
 
2190
2883
  ```json
2191
2884
  {
2192
- "id": 1764,
2193
- "formIdentifier": "my-form",
2194
- "time": "2023-02-12 10:56",
2195
- "formData": {
2196
- "marker": "name_1",
2197
- "value": "Name",
2198
- "type": "string"
2199
- }
2885
+ "total": 1,
2886
+ "items": [
2887
+ {
2888
+ "id": 1764,
2889
+ "formIdentifier": "my-form",
2890
+ "time": "2023-02-12 10:56",
2891
+ "formData": {
2892
+ "marker": "name_1",
2893
+ "value": "Name",
2894
+ "type": "string"
2895
+ },
2896
+ "attributeSetIdentifier": "test-form"
2897
+ }
2898
+ ]
2200
2899
  }
2201
2900
  ```
2202
2901
 
2203
2902
  ><details>
2204
2903
  ><summary >Schema</summary>
2205
2904
  >
2905
+ >**total:** number <br>
2906
+ >*total number of found records* <br>
2907
+ >example: 100 <br>
2908
+ >
2206
2909
  >**id:** number <br>
2207
2910
  >*object identifier* <br>
2208
2911
  >example: 1764 <br>
@@ -2219,44 +2922,72 @@ Example return:
2219
2922
  >*Data submitted by the form* <br>
2220
2923
  >example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
2221
2924
  >
2222
- ></details>
2925
+ >**attributeSetIdentifier:** string <br>
2926
+ >*text identifier (marker) of the used attribute set* <br>
2927
+ >example: test-form <br>
2928
+ >
2929
+ ></details>
2223
2930
 
2224
- ### FormData.getFormsData(langCode, offset, limit)
2931
+ ### FormData.postFormsData(data, langCode)
2225
2932
 
2226
2933
  ```js
2227
- const value = await FormData.getFormsData('en_US', 0, 30)
2934
+ const body = {
2935
+ "formIdentifier": "reg",
2936
+ "formData": {
2937
+ "en_US": [
2938
+ {
2939
+ "marker": "last_name",
2940
+ "type": "string",
2941
+ "value": "Федор Иванов"
2942
+ }
2943
+ ]
2944
+ }
2945
+ }
2946
+
2947
+ const value = await FormData.postFormsData(body)
2228
2948
  ```
2229
2949
 
2230
- > This method creates form data objects by sending a request to the API. It accepts an array of objects of type IFormsPost as the request body to provide the necessary form data. It returns a Promise that resolves to the created CreateFormDataDto objects.
2950
+ ><details>
2951
+ ><summary >Schema (body)</summary>
2952
+ >
2953
+ <!-- >**id:** number <br>
2954
+ >*Data object identifier* <br>
2955
+ >example: 1764 <br>
2956
+ >
2957
+ >**time:** Date <br>
2958
+ >*Form modification date and time* <br>
2959
+ >example: 2023-02-12 10:56 <br> -->
2960
+ >
2961
+ >**formIdentifier:** string <br>
2962
+ >*Text identifier of the form object (marker)* <br>
2963
+ >example: my-form <br>
2964
+ >
2965
+ >**formData:** FormDataLangType <br>
2966
+ >*Data submitted by the form* <br>
2967
+ >example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "type": "string", "value": "Name" } ] } <br>
2968
+ >
2969
+ ></details>
2970
+
2971
+ This method Returns a created FormDataEntity object. If you want to change the language, just pass it with the second argument
2231
2972
 
2232
2973
  Example return:
2233
2974
 
2234
2975
  ```json
2235
2976
  {
2236
- "total": 1,
2237
- "items": [
2238
- {
2239
- "id": 1764,
2240
- "formIdentifier": "my-form",
2241
- "time": "2023-02-12 10:56",
2242
- "formData": {
2243
- "marker": "name_1",
2244
- "value": "Name",
2245
- "type": "string"
2246
- },
2247
- "attributeSetIdentifier": "test-form"
2248
- }
2249
- ]
2977
+ "id": 1764,
2978
+ "formIdentifier": "my-form",
2979
+ "time": "2023-02-12 10:56",
2980
+ "formData": {
2981
+ "marker": "name_1",
2982
+ "value": "Name",
2983
+ "type": "string"
2984
+ }
2250
2985
  }
2251
2986
  ```
2252
2987
 
2253
2988
  ><details>
2254
2989
  ><summary >Schema</summary>
2255
2990
  >
2256
- >**total:** number <br>
2257
- >*total number of found records* <br>
2258
- >example: 100 <br>
2259
- >
2260
2991
  >**id:** number <br>
2261
2992
  >*object identifier* <br>
2262
2993
  >example: 1764 <br>
@@ -2273,25 +3004,42 @@ Example return:
2273
3004
  >*Data submitted by the form* <br>
2274
3005
  >example: OrderedMap { "en_US": List [ OrderedMap { "marker": "naimenovanie_1", "value": "Name" } ] } <br>
2275
3006
  >
2276
- >**attributeSetIdentifier:** string <br>
2277
- >*text identifier (marker) of the used attribute set* <br>
2278
- >example: test-form <br>
2279
- >
2280
3007
  ></details>
2281
3008
 
2282
3009
  ### FormData.getFormsDataByMarker(marker, langCode, offset, limit)
2283
3010
 
2284
3011
  ```js
2285
- const value = await FormData.getFormsDataByMarker('my-marker', 'en_US', 0, 30)
3012
+ const value = await FormData.getFormsDataByMarker('my-marker')
2286
3013
  ```
2287
3014
 
2288
- > This method retrieves a specific form data object by its marker from the API. It accepts a marker parameter as the marker of the form data. It returns a Promise that resolves to an array of objects of type FormDataEntity.
3015
+ ><details>
3016
+ ><summary>Schema</summary>
3017
+ >
3018
+ >**marker*:** string <br>
3019
+ >*Marker of form* <br>
3020
+ >example: my-marker <br>
3021
+ >
3022
+ >**langCode:** string <br>
3023
+ >*Language code. Default "en_US"* <br>
3024
+ >example: en_US <br>
3025
+ >
3026
+ >**offset:** number <br>
3027
+ >*Parameter for pagination. Default 0"* <br>
3028
+ >example: 0 <br>
3029
+ >
3030
+ >**limit:** number <br>
3031
+ >*Parameter for pagination. Default 30"* <br>
3032
+ >example: 30 <br>
3033
+ >
3034
+ ></details>
3035
+
3036
+ This method retrieves a specific form data object by its marker from the API. It accepts a marker parameter as the marker of the form data. It returns a Promise that resolves to an array of objects of type FormDataEntity.
2289
3037
 
2290
3038
  Example return:
2291
3039
 
2292
3040
  ```json
2293
3041
  {
2294
- "total": 1,
3042
+ "total": 10,
2295
3043
  "items": [
2296
3044
  {
2297
3045
  "id": 1764,
@@ -2352,7 +3100,7 @@ const { GeneralTypes } = defineOneEntry('your-url');
2352
3100
  const value = await GeneralTypes.getAllTypes()
2353
3101
  ```
2354
3102
 
2355
- > This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.
3103
+ This method retrieves all objects of type GeneralTypeEntity from the API. It returns a Promise that resolves to an array of GeneralTypeEntity objects.
2356
3104
 
2357
3105
  Example return:
2358
3106
 
@@ -2388,13 +3136,33 @@ Example return:
2388
3136
  const { IntegrationCollections } = defineOneEntry('your-url');
2389
3137
  ```
2390
3138
 
2391
- ### IntegrationCollections.getICollections()
3139
+ ### IntegrationCollections.getICollections(langCode, userQuery)
2392
3140
 
2393
3141
  ```js
2394
3142
  const result = await IntegrationCollections.getICollections();
2395
3143
  ```
2396
3144
 
2397
- > Get all collections.
3145
+ ><details>
3146
+ ><summary>Schema</summary>
3147
+ >
3148
+ >**langCode:** string <br>
3149
+ >*Language code* <br>
3150
+ >example: en_US <br>
3151
+ >
3152
+ >**userQuery:** object <br>
3153
+ >*Optional set query parameters* <br>
3154
+ >
3155
+ >**userQuery.limit:** number <br>
3156
+ >*Optional parameter for pagination, default is 0* <br>
3157
+ >example: 0 <br>
3158
+ >
3159
+ >**userQuery.offset:** number <br>
3160
+ >*Optional parameter for pagination, default is 30* <br>
3161
+ >example: 30 <br>
3162
+ >
3163
+ ></details>
3164
+
3165
+ Get all collections.
2398
3166
 
2399
3167
  Example return:
2400
3168
 
@@ -2453,7 +3221,20 @@ Example return:
2453
3221
  const result = await IntegrationCollections.getICollectionById(1);
2454
3222
  ```
2455
3223
 
2456
- > Get collection by id.
3224
+ ><details>
3225
+ ><summary>Schema</summary>
3226
+ >
3227
+ >**id*:** number <br>
3228
+ >*Collection id* <br>
3229
+ >example: 10 <br>
3230
+ >
3231
+ >**langCode:** string <br>
3232
+ >*Language code* <br>
3233
+ >example: en_US <br>
3234
+ >
3235
+ ></details>
3236
+
3237
+ Get collection by id.
2457
3238
 
2458
3239
  Example return:
2459
3240
 
@@ -2510,7 +3291,31 @@ Example return:
2510
3291
  const result = await IntegrationCollections.getICollectionRowsById(1);
2511
3292
  ```
2512
3293
 
2513
- > Get all records belonging to the collection by collection id.
3294
+ ><details>
3295
+ ><summary>Schema</summary>
3296
+ >
3297
+ >**id*:** number <br>
3298
+ >*Collection id* <br>
3299
+ >example: 10 <br>
3300
+ >
3301
+ >**langCode:** string <br>
3302
+ >*Language code* <br>
3303
+ >example: en_US <br>
3304
+ >
3305
+ >**userQuery:** any <br>
3306
+ >*Optional set query parameters* <br>
3307
+ >
3308
+ >**userQuery.offset:** number <br>
3309
+ >*Optional parameter for pagination, default is 0* <br>
3310
+ >example: 0 <br>
3311
+ >
3312
+ >**userQuery.limit:** number <br>
3313
+ >*Optional parameter for pagination, default is 30* <br>
3314
+ >example: 30 <br>
3315
+ >
3316
+ ></details>
3317
+
3318
+ Get all records belonging to the collection by collection id.
2514
3319
 
2515
3320
  Example return:
2516
3321
 
@@ -2579,7 +3384,16 @@ Example return:
2579
3384
  const result = await IntegrationCollections.validateICollectionMarker('test_collection');
2580
3385
  ```
2581
3386
 
2582
- > Check for the existence of a text identifier (marker)
3387
+ ><details>
3388
+ ><summary>Schema</summary>
3389
+ >
3390
+ >**marker*:** string <br>
3391
+ >*Collection marker* <br>
3392
+ >example: test_collection <br>
3393
+ >
3394
+ ></details>
3395
+
3396
+ Check for the existence of a text identifier (marker)
2583
3397
 
2584
3398
  Example return:
2585
3399
 
@@ -2604,7 +3418,24 @@ Example return:
2604
3418
  const result = await IntegrationCollections.getICollectionRowByMarkerAndId('test_collection', 1);
2605
3419
  ```
2606
3420
 
2607
- > Getting one record from the collection.
3421
+ ><details>
3422
+ ><summary>Schema</summary>
3423
+ >
3424
+ >**marker*:** string <br>
3425
+ >*Collection text identifier* <br>
3426
+ >example: test_collection <br>
3427
+ >
3428
+ >**id*:** number <br>
3429
+ >*Collection record identifier* <br>
3430
+ >example: 1 <br>
3431
+ >
3432
+ >**langCode:** string <br>
3433
+ >*Language code* <br>
3434
+ >example: en_US <br>
3435
+ >
3436
+ ></details>
3437
+
3438
+ Getting one record from the collection.
2608
3439
 
2609
3440
  Example return:
2610
3441
 
@@ -2672,7 +3503,35 @@ const body = {
2672
3503
  const result = await IntegrationCollections.createICollectionRow('test_collection', body);
2673
3504
  ```
2674
3505
 
2675
- > Create a record in the collection
3506
+ ><details>
3507
+ ><summary>Schema</summary>
3508
+ >
3509
+ >**marker*:** string <br>
3510
+ >*Collection text identifier* <br>
3511
+ >example: collection1 <br>
3512
+ >
3513
+ >**body*:** ICollectionFormObject <br>
3514
+ >*Object for creating a record* <br>
3515
+ >example: {
3516
+ "formIdentifier": "collection-form",
3517
+ "formData": {
3518
+ "en_US": [
3519
+ {
3520
+ "marker": "naimenovanie_1",
3521
+ "type": "string",
3522
+ "value": "Наименование"
3523
+ }
3524
+ ]
3525
+ }
3526
+ } <br>
3527
+ >
3528
+ >**langCode:** string <br>
3529
+ >*Language code* <br>
3530
+ >example: en_US <br>
3531
+ >
3532
+ ></details>
3533
+
3534
+ Create a record in the collection
2676
3535
 
2677
3536
  Example return:
2678
3537
 
@@ -2722,7 +3581,39 @@ const body = {
2722
3581
  const result = await IntegrationCollections.updateICollectionRow('test_collection', body);
2723
3582
  ```
2724
3583
 
2725
- > Edit a record in the collection
3584
+ ><details>
3585
+ ><summary>Schema</summary>
3586
+ >
3587
+ >**marker:** string <br>
3588
+ >*text identifier of the collection* <br>
3589
+ >example: test_collection <br>
3590
+ >
3591
+ >**id:** number <br>
3592
+ >*row id* <br>
3593
+ >example: 10 <br>
3594
+ >
3595
+ >**body:** object <br>
3596
+ >*Object UpdateCollectionRowDto for updating a record in the collection* <br>
3597
+ >example: {
3598
+ "formIdentifier": "collection-form",
3599
+ "formData": {
3600
+ "en_US": [
3601
+ {
3602
+ "marker": "naimenovanie_1",
3603
+ "type": "string",
3604
+ "value": "Наименование"
3605
+ }
3606
+ ]
3607
+ }
3608
+ } <br>
3609
+ >
3610
+ >**langCode:** string <br>
3611
+ >*language code* <br>
3612
+ >example: <br>
3613
+ >
3614
+ ></details>
3615
+
3616
+ Edit a record in the collection
2726
3617
 
2727
3618
  Example return:
2728
3619
 
@@ -2757,12 +3648,25 @@ Example return:
2757
3648
  ### IntegrationCollections.deleteICollectionRowByMarker(id, marker)
2758
3649
 
2759
3650
  ```js
2760
- const result = await IntegrationCollections.deleteCollectionRowByMarker(1, 'test_collection');
3651
+ const result = await IntegrationCollections.deleteICollectionRowByMarkerAndId('test_collection', 1);
2761
3652
  ```
2762
3653
 
2763
- > Deletion of collection record object
3654
+ ><details>
3655
+ ><summary>Schema</summary>
3656
+ >
3657
+ >**marker*:** string <br>
3658
+ >*text identifier of the collection* <br>
3659
+ >example: test_collection <br>
3660
+ >
3661
+ >**id:** number <br>
3662
+ >*record identifier in the collection* <br>
3663
+ >example: 12 <br>
3664
+ >
3665
+ ></details>
3666
+
3667
+ Deletion of collection record object
2764
3668
 
2765
- > Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
3669
+ Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
2766
3670
 
2767
3671
  ---
2768
3672
 
@@ -2778,22 +3682,22 @@ const { Locales } = defineOneEntry('your-url');
2778
3682
  const value = await Locales.getLocales()
2779
3683
  ```
2780
3684
 
2781
- > This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
3685
+ This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
2782
3686
 
2783
3687
  Example return:
2784
3688
 
2785
3689
  ```json
2786
3690
  [
2787
- {
2788
- "id": 1764,
2789
- "shortCode": "en",
2790
- "code": "en_US",
2791
- "name": "Bengali",
2792
- "nativeName": "বাংলা",
2793
- "isActive": false,
2794
- "image": "🇦🇨",
2795
- "position": 1
2796
- }
3691
+ {
3692
+ "id": 1764,
3693
+ "shortCode": "en",
3694
+ "code": "en_US",
3695
+ "name": "Bengali",
3696
+ "nativeName": "বাংলা",
3697
+ "isActive": false,
3698
+ "image": "🇦🇨",
3699
+ "position": 1
3700
+ }
2797
3701
  ]
2798
3702
  ```
2799
3703
 
@@ -2848,7 +3752,20 @@ const { Menus } = defineOneEntry('your-url')
2848
3752
  const value = await Menus.getMenusByMarker('my-marker')
2849
3753
  ```
2850
3754
 
2851
- > This method retrieves a single menu object based on its marker (marker) from the API. It returns a Promise that resolves to a single menu object as a ContentMenuDto object with included pages.
3755
+ ><details>
3756
+ ><summary>Schema</summary>
3757
+ >
3758
+ >**marker*:** string <br>
3759
+ >*Menu marker* <br>
3760
+ >example: my-marker <br>
3761
+ >
3762
+ >**langCode:** string <br>
3763
+ >*Language code* <br>
3764
+ >example: en_US <br>
3765
+ >
3766
+ ></details>
3767
+
3768
+ This method retrieves a single menu object based on its marker (marker) from the API. It returns a Promise that resolves to a single menu object as a ContentMenuDto object with included pages.
2852
3769
 
2853
3770
  Example return:
2854
3771
 
@@ -2904,36 +3821,54 @@ Example return:
2904
3821
  const { Orders } = defineOneEntry('your-url');
2905
3822
  ```
2906
3823
 
2907
- ### Orders.getOrderByMarker(marker, langCode)
3824
+ ### Orders.getAllOrdersStorage(langCode, offset, limit)
2908
3825
 
2909
3826
  ```js
2910
- const value = await Orders.getOrderByMarker('my-order')
3827
+ const value = await Orders.getAllOrdersStorage()
2911
3828
  ```
2912
3829
 
2913
- > This method retrieves one order storage object by marker.
3830
+ ><details>
3831
+ ><summary>Schema</summary>
3832
+ >
3833
+ >**langCode:** number <br>
3834
+ >*Optional language field* <br>
3835
+ >example: en_US <br>
3836
+ >
3837
+ >**offset:** number <br>
3838
+ >*Optional parameter for pagination, default is 0* <br>
3839
+ >example: 0 <br>
3840
+ >
3841
+ >**limit:** number <br>
3842
+ >*Optional parameter for pagination, default is 30* <br>
3843
+ >example: 30 <br>
3844
+ >
3845
+ ></details>
3846
+
3847
+ This method getting all the order storage objects. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
2914
3848
 
2915
3849
  Example return:
2916
3850
 
2917
3851
  ```json
2918
- {
2919
- "id": 2,
2920
- "localizeInfos": {
2921
- "title": "My order"
2922
- },
2923
- "position": 1,
2924
- "identifier": "my_order",
2925
- "formIdentifier": "orderForm",
2926
- "generalTypeId": 21,
2927
- "paymentAccountIdentifiers": [
2928
- {
2929
- "identifier": "cash"
2930
- }
2931
- ]
2932
- }
3852
+ [
3853
+ {
3854
+ "id": 1764,
3855
+ "localizeInfos": {
3856
+ "title": "Order 1"
3857
+ },
3858
+ "identifier": "catalog",
3859
+ "generalTypeId": 4,
3860
+ "formIdentifier": "catalog-form",
3861
+ "paymentAccountIdentifiers": [
3862
+ {
3863
+ "identifier": "p1"
3864
+ }
3865
+ ]
3866
+ }
3867
+ ]
2933
3868
  ```
2934
3869
 
2935
3870
  ><details>
2936
- ><summary>Schema</summary>
3871
+ ><summary >Schema</summary>
2937
3872
  >
2938
3873
  >**id:** number <br>
2939
3874
  >*object identifier* <br>
@@ -2961,112 +3896,105 @@ Example return:
2961
3896
  >
2962
3897
  ></details>
2963
3898
 
3899
+ ---
2964
3900
 
2965
- ### Orders.createOrder(marker, data, langCode)
3901
+ ### Orders.getAllOrdersByMarker(marker, langCode, offset, limit)
2966
3902
 
2967
3903
  ```js
2968
- const body = {
2969
- "formIdentifier": "orderForm",
2970
- "paymentAccountIdentifier": "cash",
2971
- "formData": {
2972
- "marker": "order_name",
2973
- "value": "Ivan",
2974
- "type": "string"
2975
- },
2976
- "products": [
2977
- {
2978
- "productId": 2,
2979
- "quantity": 2
2980
- }
2981
- ]
2982
- }
2983
-
2984
- const value = await Orders.createOrder('my-order', body)
3904
+ const value = await Orders.getAllOrdersByMarker('my-order')
2985
3905
  ```
2986
3906
 
2987
3907
  ><details>
2988
3908
  ><summary>Schema</summary>
2989
3909
  >
2990
- >**formIdentifier:** string <br>
2991
- >*text identifier of the form object linked to the order storage* <br>
2992
- >example: bars <br>
2993
- >
2994
- >**paymentAccountIdentifier:** string <br>
2995
- >*text identifier of the payment object linked to the order storage* <br>
2996
- >example: payment1 <br>
2997
- >
2998
- >**statusIdentifier** string <br>
2999
- >*text identifier of the order status object (if not specified, the default status will be assigned)* <br>
3000
- >example: inprogress<br>
3001
- >
3002
- >**formData** FormDataType <br>
3003
- >*data submitted by the form linked to the order store* <br>
3004
- >example: [{ "marker": "name_1", "value": "Name" } ] <br>
3910
+ >**marker*:** string <br>
3911
+ >*Textual identifier of the order storage object* <br>
3912
+ >example: my-order <br>
3005
3913
  >
3006
- >**products** Record<string, string | any>[] <br>
3007
- >*array of products added to order* <br>
3914
+ >**langCode:** string <br>
3915
+ >*Optional language field* <br>
3916
+ >example: en_US <br>
3008
3917
  >
3009
- >**productId** number <br>
3010
- >*product identifier* <br>
3011
- >example: 12.00 <br>
3918
+ >**offset:** number <br>
3919
+ >*Offset parameter. Default 0* <br>
3920
+ >example: 0 <br>
3012
3921
  >
3013
- >**quantity** number <br>
3014
- >*quantity of the product* <br>
3015
- >example: 1<br>
3922
+ >**limit:** number <br>
3923
+ >*Limit parameter. Default 30* <br>
3924
+ >example: 30 <br>
3016
3925
  >
3017
3926
  ></details>
3018
3927
 
3019
- > This method retrieves one order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
3928
+ This method getting all order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
3020
3929
 
3021
3930
  Example return:
3931
+
3022
3932
  ```json
3023
3933
  {
3024
- "formIdentifier": "bars",
3025
- "paymentAccountIdentifier": "payment1",
3026
- "statusIdentifier": "inprogress",
3027
- "formData": [
3028
- {
3029
- "marker": "naimenovanie_1",
3030
- "type": "string",
3031
- "value": "Name"
3032
- }
3033
- ],
3034
- "products": [
3035
- {
3036
- "productId": 1,
3037
- "quantity": 2
3038
- },
3934
+ "total": 100,
3935
+ "items": [
3039
3936
  {
3040
- "productId": 2,
3041
- "quantity": 3
3937
+ "id": 1764,
3938
+ "statusIdentifier": "inprogress",
3939
+ "formIdentifier": "order-form",
3940
+ "formData": [
3941
+ {
3942
+ "marker": "name_1",
3943
+ "type": "string",
3944
+ "value": "Name"
3945
+ }
3946
+ ],
3947
+ "products": [
3948
+ {
3949
+ "id": 1,
3950
+ "title": "Laminate Floorwood Maxima, 9811 Oak Mistral",
3951
+ "sku": null,
3952
+ "price": "1.00",
3953
+ "quantity": 10,
3954
+ "previewImage": [
3955
+ {
3956
+ "filename": "files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
3957
+ "downloadLink": "http://my-site.zone/files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
3958
+ "size": 296391,
3959
+ "previewLink": ""
3960
+ }
3961
+ ]
3962
+ }
3963
+ ],
3964
+ "totalSum": "12.00",
3965
+ "currency": "USD",
3966
+ "createdDate": "2023-01-01 12:12",
3967
+ "paymentAccountIdentifier": "payment-1",
3968
+ "paymentAccountLocalizeInfos": {"title": "Account 1"
3969
+ },
3970
+ "isHistory": true
3042
3971
  }
3043
- ],
3044
- "createdDate": "2024-06-21T09:42:54.848Z",
3045
- "currency": "USD",
3046
- "totalSum": 345
3972
+ ]
3973
+
3047
3974
  }
3048
3975
  ```
3049
3976
 
3050
3977
  ><details>
3051
- ><summary>Schema</summary>
3978
+ ><summary >Schema</summary>
3979
+ >
3980
+ >**total:** number <br>
3981
+ >*total number of found records* <br>
3982
+ >example: 100 <br>
3052
3983
  >
3053
- >**statusIdentifier:** string <br>
3984
+ >**statusIdentifier:** string <br>
3054
3985
  >*text identifier of the order status* <br>
3055
3986
  >example: inprogress <br>
3056
3987
  >
3057
- >**formIdentifier:** string <br>
3988
+ >**formIdentifier:** string <br>
3058
3989
  >*text identifier of the form status* <br>
3059
3990
  >example: order-form <br>
3060
3991
  >
3061
- >**paymentAccountIdentifier** string <br>
3062
- >*text identifier of the order payment* <br>
3063
- >example: payment-1 <br>
3064
3992
  >
3065
3993
  >**formData** FormDataType <br>
3066
3994
  >*data submitted by the form linked to the order store* <br>
3067
3995
  >example: [{ "marker": "name_1", "value": "Name" } ] <br>
3068
3996
  >
3069
- >**products** Record<string, string | any>[] <br>
3997
+ >**products** Record<string, string | any>[] <br>
3070
3998
  >*array of products added to order* <br>
3071
3999
  >
3072
4000
  >**totalSum** string <br>
@@ -3081,140 +4009,121 @@ Example return:
3081
4009
  >*date when the order was created* <br>
3082
4010
  >example: 2023-01-01 12:12 <br>
3083
4011
  >
4012
+ >**price** number <br>
4013
+ >*price of the product per unit (at the time of ordering)* <br>
4014
+ >example: 20.00 <br>
4015
+ >
4016
+ >**paymentAccountIdentifier** string <br>
4017
+ >*textual identifier for the order payment* <br>
4018
+ >example: payment-1 <br>
4019
+ >
4020
+ >**paymentAccountLocalizeInfos** CommonLocalizeInfos <br>
4021
+ >*payment account name considering localization* <br>
4022
+ >example: { "title": "Account 1" } <br>
4023
+ >
4024
+ >**isHistory** boolean <br>
4025
+ >*indicates that the order has been saved in the order history* <br>
4026
+ >example: true <br>
4027
+ >
3084
4028
  ></details>
3085
4029
 
3086
-
3087
- ### Orders.updateOrderByMarkerAndId(marker, data, langCode)
4030
+ ### Orders.getOrderByMarker(marker, langCode)
3088
4031
 
3089
4032
  ```js
3090
- const body = {
3091
- "formIdentifier": "orderForm",
3092
- "paymentAccountIdentifier": "cash",
3093
- "formData": {
3094
- "marker": "order_name",
3095
- "value": "Ivan",
3096
- "type": "string"
3097
- },
3098
- "products": [
3099
- {
3100
- "productId": 2,
3101
- "quantity": 2
3102
- }
3103
- ]
3104
- }
3105
-
3106
- const value = await Orders.updateOrderByMarkerAndId('my-order', body)
4033
+ const value = await Orders.getOrderByMarker('my-order')
3107
4034
  ```
3108
4035
 
3109
4036
  ><details>
3110
4037
  ><summary>Schema</summary>
3111
4038
  >
3112
- >**formIdentifier:** string <br>
3113
- >*text identifier of the form object linked to the order storage* <br>
3114
- >example: bars <br>
3115
- >
3116
- >**paymentAccountIdentifier:** string <br>
3117
- >*text identifier of the payment object linked to the order storage* <br>
3118
- >example: payment1 <br>
3119
- >
3120
- >**statusIdentifier** string <br>
3121
- >*text identifier of the order status object (if not specified, the default status will be assigned)* <br>
3122
- >example: inprogress<br>
3123
- >
3124
- >**formData** FormDataType <br>
3125
- >*data submitted by the form linked to the order store* <br>
3126
- >example: [{ "marker": "name_1", "value": "Name" } ] <br>
3127
- >
3128
- >**products** Record<string, string | any>[] <br>
3129
- >*array of products added to order* <br>
3130
- >
3131
- >**productId** number <br>
3132
- >*product identifier* <br>
3133
- >example: 12.00 <br>
4039
+ >**marker*:** string <br>
4040
+ >*The text identifier of the order storage object* <br>
4041
+ >example: my-order <br>
3134
4042
  >
3135
- >**quantity** number <br>
3136
- >*quantity of the product* <br>
3137
- >example: 1<br>
4043
+ >**langCode:** string <br>
4044
+ >*Optional language field* <br>
4045
+ >example: en_US <br>
3138
4046
  >
3139
4047
  ></details>
3140
4048
 
3141
- > This method update one order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
4049
+ This method retrieves one order storage object by marker.
3142
4050
 
3143
4051
  Example return:
4052
+
3144
4053
  ```json
3145
4054
  {
3146
- "formIdentifier": "bars",
3147
- "paymentAccountIdentifier": "payment1",
3148
- "statusIdentifier": "inprogress",
3149
- "formData": [
3150
- {
3151
- "marker": "naimenovanie_1",
3152
- "type": "string",
3153
- "value": "Name"
3154
- }
3155
- ],
3156
- "products": [
3157
- {
3158
- "productId": 1,
3159
- "quantity": 2
3160
- },
4055
+ "id": 2,
4056
+ "localizeInfos": {
4057
+ "title": "My order"
4058
+ },
4059
+ "position": 1,
4060
+ "identifier": "my_order",
4061
+ "formIdentifier": "orderForm",
4062
+ "generalTypeId": 21,
4063
+ "paymentAccountIdentifiers": [
3161
4064
  {
3162
- "productId": 2,
3163
- "quantity": 3
4065
+ "identifier": "cash"
3164
4066
  }
3165
- ],
3166
- "createdDate": "2024-06-21T09:42:54.848Z",
3167
- "currency": "USD",
3168
- "totalSum": 345
4067
+ ]
3169
4068
  }
3170
4069
  ```
3171
4070
 
3172
4071
  ><details>
3173
- ><summary >Schema</summary>
3174
- >
3175
- >**statusIdentifier:** string <br>
3176
- >*text identifier of the order status* <br>
3177
- >example: inprogress <br>
3178
- >
3179
- >**formIdentifier:** string <br>
3180
- >*text identifier of the form status* <br>
3181
- >example: order-form <br>
4072
+ ><summary>Schema</summary>
3182
4073
  >
3183
- >**paymentAccountIdentifier** string <br>
3184
- >*text identifier of the order payment* <br>
3185
- >example: payment-1 <br>
4074
+ >**id:** number <br>
4075
+ >*object identifier* <br>
4076
+ >example: 1764 <br>
3186
4077
  >
3187
- >**formData** FormDataType <br>
3188
- >*data submitted by the form linked to the order store* <br>
3189
- >example: [{ "marker": "name_1", "value": "Name" } ] <br>
4078
+ >**localizeInfos:** Record<string, any> <br>
4079
+ >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
4080
+ >example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
3190
4081
  >
3191
- >**products** Record<string, string | any>[] <br>
3192
- >*array of products added to order* <br>
4082
+ >**identifier** string <br>
4083
+ >*textual identifier for the record field* <br>
4084
+ >example: catalog <br>
3193
4085
  >
3194
- >**totalSum** string <br>
3195
- >*total order amount* <br>
3196
- >example: 12.00 <br>
4086
+ >**generalTypeId** number <br>
4087
+ >*type identifier* <br>
4088
+ >example: 4 <br>
3197
4089
  >
3198
- >**currency** string <br>
3199
- >*currency used to pay for the order* <br>
3200
- >example: USD <br>
4090
+ >**formIdentifier** string <br>
4091
+ >*textual identifier for the form used by the order storage* <br>
4092
+ >example: catalog-form <br>
3201
4093
  >
3202
- >**createdDate** string <br>
3203
- >*date when the order was created* <br>
3204
- >example: 2023-01-01 12:12 <br>
4094
+ >**paymentAccountIdentifiers** Array<{identifier:string} <br>
4095
+ >*array of textual identifiers of payment accounts used by the order storage* <br>
4096
+ >example: [{ "identifier": "p1" }] <br>
3205
4097
  >
3206
4098
  ></details>
3207
4099
 
3208
-
3209
4100
  ### Orders.getOrderByMarkerAndId(marker, id, langCode)
3210
4101
 
3211
4102
  ```js
3212
4103
  const value = await Orders.getOrderByMarkerAndId('my-order', 1764)
3213
4104
  ```
3214
4105
 
3215
- > This method retrieves one order storage object by marker and id.
4106
+ ><details>
4107
+ ><summary>Schema</summary>
4108
+ >
4109
+ >**marker*:** string <br>
4110
+ >*The text identifier of the order storage object* <br>
4111
+ >example: my-order <br>
4112
+ >
4113
+ >**id*:** number <br>
4114
+ >*ID of the order object* <br>
4115
+ >example: 1764 <br>
4116
+ >
4117
+ >**langCode:** string <br>
4118
+ >*Optional language field* <br>
4119
+ >example: en_US <br>
4120
+ >
4121
+ ></details>
4122
+
4123
+ This method retrieves one order storage object by marker and id.
3216
4124
 
3217
4125
  Example return:
4126
+
3218
4127
  ```json
3219
4128
  {
3220
4129
  "id": 1764,
@@ -3264,163 +4173,298 @@ Example return:
3264
4173
  >*object identifier* <br>
3265
4174
  >example: 1764 <br>
3266
4175
  >
3267
- >**localizeInfos:** Record<string, any> <br>
3268
- >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
3269
- >example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
4176
+ >**localizeInfos:** Record<string, any> <br>
4177
+ >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
4178
+ >example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
4179
+ >
4180
+ >**identifier** string <br>
4181
+ >*textual identifier for the record field* <br>
4182
+ >example: catalog <br>
4183
+ >
4184
+ >**generalTypeId** number <br>
4185
+ >*type identifier* <br>
4186
+ >example: 4 <br>
4187
+ >
4188
+ >**formIdentifier** string <br>
4189
+ >*textual identifier for the form used by the order storage* <br>
4190
+ >example: catalog-form <br>
4191
+ >
4192
+ >**paymentAccountIdentifiers** Array<{identifier:string} <br>
4193
+ >*array of textual identifiers of payment accounts used by the order storage* <br>
4194
+ >example: [{ "identifier": "p1" }] <br>
4195
+ >
4196
+ ></details>
4197
+
4198
+ ### Orders.createOrder(marker, body, langCode)
4199
+
4200
+ ```js
4201
+ const body = {
4202
+ "formIdentifier": "orderForm",
4203
+ "paymentAccountIdentifier": "cash",
4204
+ "formData": {
4205
+ "marker": "order_name",
4206
+ "value": "Ivan",
4207
+ "type": "string"
4208
+ },
4209
+ "products": [
4210
+ {
4211
+ "productId": 2,
4212
+ "quantity": 2
4213
+ }
4214
+ ]
4215
+ }
4216
+
4217
+ const value = await Orders.createOrder('my-order', body)
4218
+ ```
4219
+
4220
+ ><details>
4221
+ ><summary>Schema</summary>
4222
+ >
4223
+ >**marker*:** string <br>
4224
+ >*Textual identifier of the order storage object* <br>
4225
+ >example: my-order <br>
4226
+ >
4227
+ >**body*:** IOrderData <br>
4228
+ >*Object for creating an order* <br>
4229
+ >example: {} <br>
4230
+ >
4231
+ >**langCode:** String <br>
4232
+ >*Optional language field* <br>
4233
+ >example: en_US <br>
4234
+ >
4235
+ ></details>
4236
+
4237
+ <br>
4238
+
4239
+ ><details>
4240
+ ><summary>Schema (body)</summary>
4241
+ >
4242
+ >**formIdentifier:** string <br>
4243
+ >*text identifier of the form object linked to the order storage* <br>
4244
+ >example: bars <br>
4245
+ >
4246
+ >**paymentAccountIdentifier:** string <br>
4247
+ >*text identifier of the payment object linked to the order storage* <br>
4248
+ >example: payment1 <br>
4249
+ >
4250
+ >**statusIdentifier:** string <br>
4251
+ >*text identifier of the order status object (if not specified, the default status will be assigned)* <br>
4252
+ >example: inprogress<br>
4253
+ >
4254
+ >**formData:** FormDataType <br>
4255
+ >*data submitted by the form linked to the order store* <br>
4256
+ >example: [{ "marker": "name_1", "value": "Name" } ] <br>
4257
+ >
4258
+ >**products** Record<string, string | any>[] <br>
4259
+ >*array of products added to order* <br>
4260
+ >
4261
+ >**productId:** number <br>
4262
+ >*product identifier* <br>
4263
+ >example: 12 <br>
4264
+ >
4265
+ >**quantity:** number <br>
4266
+ >*quantity of the product* <br>
4267
+ >example: 1 <br>
4268
+ >
4269
+ ></details>
4270
+
4271
+ This method retrieves one order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
4272
+
4273
+ Example return:
4274
+
4275
+ ```json
4276
+ {
4277
+ "formIdentifier": "bars",
4278
+ "paymentAccountIdentifier": "payment1",
4279
+ "statusIdentifier": "inprogress",
4280
+ "formData": [
4281
+ {
4282
+ "marker": "naimenovanie_1",
4283
+ "type": "string",
4284
+ "value": "Name"
4285
+ }
4286
+ ],
4287
+ "products": [
4288
+ {
4289
+ "productId": 1,
4290
+ "quantity": 2
4291
+ },
4292
+ {
4293
+ "productId": 2,
4294
+ "quantity": 3
4295
+ }
4296
+ ],
4297
+ "createdDate": "2024-06-21T09:42:54.848Z",
4298
+ "currency": "USD",
4299
+ "totalSum": 345
4300
+ }
4301
+ ```
4302
+
4303
+ ><details>
4304
+ ><summary>Schema</summary>
4305
+ >
4306
+ >**statusIdentifier:** string <br>
4307
+ >*text identifier of the order status* <br>
4308
+ >example: inprogress <br>
4309
+ >
4310
+ >**formIdentifier:** string <br>
4311
+ >*text identifier of the form status* <br>
4312
+ >example: order-form <br>
4313
+ >
4314
+ >**paymentAccountIdentifier** string <br>
4315
+ >*text identifier of the order payment* <br>
4316
+ >example: payment-1 <br>
4317
+ >
4318
+ >**formData** FormDataType <br>
4319
+ >*data submitted by the form linked to the order store* <br>
4320
+ >example: [{ "marker": "name_1", "value": "Name" } ] <br>
3270
4321
  >
3271
- >**identifier** string <br>
3272
- >*textual identifier for the record field* <br>
3273
- >example: catalog <br>
4322
+ >**products** Record<string, string | any>[] <br>
4323
+ >*array of products added to order* <br>
3274
4324
  >
3275
- >**generalTypeId** number <br>
3276
- >*type identifier* <br>
3277
- >example: 4 <br>
4325
+ >**totalSum** string <br>
4326
+ >*total order amount* <br>
4327
+ >example: 12.00 <br>
3278
4328
  >
3279
- >**formIdentifier** string <br>
3280
- >*textual identifier for the form used by the order storage* <br>
3281
- >example: catalog-form <br>
4329
+ >**currency** string <br>
4330
+ >*currency used to pay for the order* <br>
4331
+ >example: USD <br>
3282
4332
  >
3283
- >**paymentAccountIdentifiers** Array<{identifier:string} <br>
3284
- >*array of textual identifiers of payment accounts used by the order storage* <br>
3285
- >example: [{ "identifier": "p1" }] <br>
4333
+ >**createdDate** string <br>
4334
+ >*date when the order was created* <br>
4335
+ >example: 2023-01-01 12:12 <br>
3286
4336
  >
3287
4337
  ></details>
3288
4338
 
3289
-
3290
- ### Orders.getAllOrdersStorage(langCode, offset, limit)
4339
+ ### Orders.updateOrderByMarkerAndId(marker, body, langCode)
3291
4340
 
3292
4341
  ```js
3293
- const value = await Orders.getAllOrdersStorage()
4342
+ const body = {
4343
+ "formIdentifier": "orderForm",
4344
+ "paymentAccountIdentifier": "cash",
4345
+ "formData": {
4346
+ "marker": "order_name",
4347
+ "value": "Ivan",
4348
+ "type": "string"
4349
+ },
4350
+ "products": [
4351
+ {
4352
+ "productId": 2,
4353
+ "quantity": 2
4354
+ }
4355
+ ]
4356
+ }
4357
+
4358
+ const value = await Orders.updateOrderByMarkerAndId('my-order', 1, body)
3294
4359
  ```
3295
4360
 
3296
- > This method getting all the order storage objects. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
4361
+ ><details>
4362
+ ><summary>Schema</summary>
4363
+ >
4364
+ >**marker*:** string <br>
4365
+ >*The text identifier of the order storage object* <br>
4366
+ >example: my-order <br>
4367
+ >
4368
+ >**id*:** number <br>
4369
+ >*ID of the order object* <br>
4370
+ >example: 1 <br>
4371
+ >
4372
+ >**data*:** IOrderData <br>
4373
+ >*Object for updating an order* <br>
4374
+ >example: {} <br>
4375
+ >
4376
+ >**langCode:** string <br>
4377
+ >*Optional language field* <br>
4378
+ >example: en_US <br>
4379
+ >
4380
+ ></details>
3297
4381
 
3298
- Example return:
3299
- ```json
3300
- [
3301
- {
3302
- "id": 1764,
3303
- "localizeInfos": {
3304
- "title": "Order 1"
3305
- },
3306
- "identifier": "catalog",
3307
- "generalTypeId": 4,
3308
- "formIdentifier": "catalog-form",
3309
- "paymentAccountIdentifiers": [
3310
- {
3311
- "identifier": "p1"
3312
- }
3313
- ]
3314
- }
3315
- ]
3316
- ```
4382
+ <br>
3317
4383
 
3318
4384
  ><details>
3319
- ><summary >Schema</summary>
4385
+ ><summary>Schema (body)</summary>
3320
4386
  >
3321
- >**id:** number <br>
3322
- >*object identifier* <br>
3323
- >example: 1764 <br>
4387
+ >**formIdentifier:** string <br>
4388
+ >*text identifier of the form object linked to the order storage* <br>
4389
+ >example: bars <br>
3324
4390
  >
3325
- >**localizeInfos:** Record<string, any> <br>
3326
- >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
3327
- >example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
4391
+ >**paymentAccountIdentifier:** string <br>
4392
+ >*text identifier of the payment object linked to the order storage* <br>
4393
+ >example: payment1 <br>
3328
4394
  >
3329
- >**identifier** string <br>
3330
- >*textual identifier for the record field* <br>
3331
- >example: catalog <br>
4395
+ >**statusIdentifier** string <br>
4396
+ >*text identifier of the order status object (if not specified, the default status will be assigned)* <br>
4397
+ >example: inprogress<br>
3332
4398
  >
3333
- >**generalTypeId** number <br>
3334
- >*type identifier* <br>
3335
- >example: 4 <br>
4399
+ >**formData** FormDataType <br>
4400
+ >*data submitted by the form linked to the order store* <br>
4401
+ >example: [{ "marker": "name_1", "value": "Name" } ] <br>
3336
4402
  >
3337
- >**formIdentifier** string <br>
3338
- >*textual identifier for the form used by the order storage* <br>
3339
- >example: catalog-form <br>
4403
+ >**products** Record<string, string | any>[] <br>
4404
+ >*array of products added to order* <br>
3340
4405
  >
3341
- >**paymentAccountIdentifiers** Array<{identifier:string} <br>
3342
- >*array of textual identifiers of payment accounts used by the order storage* <br>
3343
- >example: [{ "identifier": "p1" }] <br>
4406
+ >**productId** number <br>
4407
+ >*product identifier* <br>
4408
+ >example: 12.00 <br>
4409
+ >
4410
+ >**quantity** number <br>
4411
+ >*quantity of the product* <br>
4412
+ >example: 1<br>
3344
4413
  >
3345
4414
  ></details>
3346
4415
 
3347
-
3348
- ### Orders.getAllOrdersByMarker(marker, langCode, offset, limit)
3349
-
3350
- ```js
3351
- const value = await Orders.getAllOrdersByMarker('my-order')
3352
- ```
3353
-
3354
- > This method getting all order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
4416
+ This method update one order storage object by marker. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument
3355
4417
 
3356
4418
  Example return:
3357
4419
 
3358
4420
  ```json
3359
4421
  {
3360
- "total": 100,
3361
- "items": [
4422
+ "formIdentifier": "bars",
4423
+ "paymentAccountIdentifier": "payment1",
4424
+ "statusIdentifier": "inprogress",
4425
+ "formData": [
4426
+ {
4427
+ "marker": "naimenovanie_1",
4428
+ "type": "string",
4429
+ "value": "Name"
4430
+ }
4431
+ ],
4432
+ "products": [
3362
4433
  {
3363
- "id": 1764,
3364
- "statusIdentifier": "inprogress",
3365
- "formIdentifier": "order-form",
3366
- "formData": [
3367
- {
3368
- "marker": "name_1",
3369
- "type": "string",
3370
- "value": "Name"
3371
- }
3372
- ],
3373
- "products": [
3374
- {
3375
- "id": 1,
3376
- "title": "Laminate Floorwood Maxima, 9811 Oak Mistral",
3377
- "sku": null,
3378
- "price": "1.00",
3379
- "quantity": 10,
3380
- "previewImage": [
3381
- {
3382
- "filename": "files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
3383
- "downloadLink": "http://my-site.zone/files/project/page/36/image/20240322_77c83b02-4c82-4bea-80eb-3763c469b00e.jpg",
3384
- "size": 296391,
3385
- "previewLink": ""
3386
- }
3387
- ]
3388
- }
3389
- ],
3390
- "totalSum": "12.00",
3391
- "currency": "USD",
3392
- "createdDate": "2023-01-01 12:12",
3393
- "paymentAccountIdentifier": "payment-1",
3394
- "paymentAccountLocalizeInfos": {"title": "Account 1"
3395
- },
3396
- "isHistory": true
4434
+ "productId": 1,
4435
+ "quantity": 2
4436
+ },
4437
+ {
4438
+ "productId": 2,
4439
+ "quantity": 3
3397
4440
  }
3398
- ]
3399
-
4441
+ ],
4442
+ "createdDate": "2024-06-21T09:42:54.848Z",
4443
+ "currency": "USD",
4444
+ "totalSum": 345
3400
4445
  }
3401
4446
  ```
3402
4447
 
3403
4448
  ><details>
3404
4449
  ><summary >Schema</summary>
3405
4450
  >
3406
- >**total:** number <br>
3407
- >*total number of found records* <br>
3408
- >example: 100 <br>
3409
- >
3410
- >**statusIdentifier:** string <br>
4451
+ >**statusIdentifier:** string <br>
3411
4452
  >*text identifier of the order status* <br>
3412
4453
  >example: inprogress <br>
3413
4454
  >
3414
- >**formIdentifier:** string <br>
4455
+ >**formIdentifier:** string <br>
3415
4456
  >*text identifier of the form status* <br>
3416
4457
  >example: order-form <br>
3417
4458
  >
4459
+ >**paymentAccountIdentifier** string <br>
4460
+ >*text identifier of the order payment* <br>
4461
+ >example: payment-1 <br>
3418
4462
  >
3419
4463
  >**formData** FormDataType <br>
3420
4464
  >*data submitted by the form linked to the order store* <br>
3421
4465
  >example: [{ "marker": "name_1", "value": "Name" } ] <br>
3422
4466
  >
3423
- >**products** Record<string, string | any>[] <br>
4467
+ >**products** Record<string, string | any>[] <br>
3424
4468
  >*array of products added to order* <br>
3425
4469
  >
3426
4470
  >**totalSum** string <br>
@@ -3435,27 +4479,10 @@ Example return:
3435
4479
  >*date when the order was created* <br>
3436
4480
  >example: 2023-01-01 12:12 <br>
3437
4481
  >
3438
- >**price** number <br>
3439
- >*price of the product per unit (at the time of ordering)* <br>
3440
- >example: 20.00 <br>
3441
- >
3442
- >**paymentAccountIdentifier** string <br>
3443
- >*textual identifier for the order payment* <br>
3444
- >example: payment-1 <br>
3445
- >
3446
- >**paymentAccountLocalizeInfos** CommonLocalizeInfos <br>
3447
- >*payment account name considering localization* <br>
3448
- >example: { "title": "Account 1" } <br>
3449
- >
3450
- >**isHistory** boolean <br>
3451
- >*indicates that the order has been saved in the order history* <br>
3452
- >example: true <br>
3453
- >
3454
4482
  ></details>
3455
4483
 
3456
4484
  ---
3457
4485
 
3458
-
3459
4486
  ## <h2 id="pages"> Pages </h2>
3460
4487
 
3461
4488
  ```js
@@ -3465,10 +4492,19 @@ const { Pages } = defineOneEntry('your-url');
3465
4492
  ### Pages.getRootPages(langCode)
3466
4493
 
3467
4494
  ```js
3468
- const value = await Pages.getRootPages('en_US')
4495
+ const value = await Pages.getRootPages()
3469
4496
  ```
3470
4497
 
3471
- > This method retrieves all top-level page objects from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.
4498
+ ><details>
4499
+ ><summary>Schema</summary>
4500
+ >
4501
+ >**langCode:** string <br>
4502
+ >*lang code* <br>
4503
+ >example: en_US <br>
4504
+ >
4505
+ ></details>
4506
+
4507
+ This method retrieves all top-level page objects from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.
3472
4508
 
3473
4509
  Example return:
3474
4510
 
@@ -3580,14 +4616,22 @@ Example return:
3580
4616
  >
3581
4617
  ></details>
3582
4618
 
3583
-
3584
4619
  ### Pages.getPages(langCode)
3585
4620
 
3586
4621
  ```js
3587
- const value = await Pages.getPages('en_US')
4622
+ const value = await Pages.getPages();
3588
4623
  ```
3589
4624
 
3590
- > This method retrieves all created pages as an array from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.
4625
+ ><details>
4626
+ ><summary>Schema</summary>
4627
+ >
4628
+ >**langCode:** string <br>
4629
+ >*lang code* <br>
4630
+ >example: en_US <br>
4631
+ >
4632
+ ></details>
4633
+
4634
+ This method retrieves all created pages as an array from the API. It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data. Get required language parameter.
3591
4635
 
3592
4636
  Example return:
3593
4637
 
@@ -3702,10 +4746,23 @@ Example return:
3702
4746
  ### Pages.getPageById(id, langCode)
3703
4747
 
3704
4748
  ```js
3705
- const value = await Pages.getPageById(1, 'en_US')
4749
+ const value = await Pages.getPageById(1);
3706
4750
  ```
3707
4751
 
3708
- > This method retrieves a single page object based on its identifier (id) from the API. It returns a Promise that resolves to the page object, with the specific DTO depending on the type of page being returned. Get required language parameter.
4752
+ ><details>
4753
+ ><summary>Schema</summary>
4754
+ >
4755
+ >**id*:** <br>
4756
+ >*Page object identifier* <br>
4757
+ >example: 1 <br>
4758
+ >
4759
+ >**langCode:** <br>
4760
+ >*lang code* <br>
4761
+ >example: en_US <br>
4762
+ >
4763
+ ></details>
4764
+
4765
+ This method retrieves a single page object based on its identifier (id) from the API. It returns a Promise that resolves to the page object, with the specific DTO depending on the type of page being returned. Get required language parameter.
3709
4766
 
3710
4767
  Example return:
3711
4768
 
@@ -3803,10 +4860,23 @@ Example return:
3803
4860
  ### Pages.getPageByUrl(url, langCode)
3804
4861
 
3805
4862
  ```js
3806
- const value = await Pages.getPageByUrl('shop', 'en_US')
4863
+ const value = await Pages.getPageByUrl('shop');
3807
4864
  ```
3808
4865
 
3809
- > This method retrieves a single page object based on its URL (url) from the API. It returns a Promise that resolves to the page object, with the specific DTO depending on the type of page being returned. Get required language parameter.
4866
+ ><details>
4867
+ ><summary>Schema</summary>
4868
+ >
4869
+ >**url*:** string <br>
4870
+ >*Page URL* <br>
4871
+ >example: shop <br>
4872
+ >
4873
+ >**langCode:** string <br>
4874
+ >*lang code* <br>
4875
+ >example: en_US <br>
4876
+ >
4877
+ ></details>
4878
+
4879
+ This method retrieves a single page object based on its URL (url) from the API. It returns a Promise that resolves to the page object, with the specific DTO depending on the type of page being returned. Get required language parameter.
3810
4880
 
3811
4881
  Example return:
3812
4882
 
@@ -3898,10 +4968,23 @@ Example return:
3898
4968
  ### Pages.getChildPagesByParentUrl(url, langCode)
3899
4969
 
3900
4970
  ```js
3901
- const value = await Pages.getChildPagesByParentUrl('shop', 'en_US')
4971
+ const value = await Pages.getChildPagesByParentUrl('shop');
3902
4972
  ```
3903
4973
 
3904
- > Getting child pages with information about products in the form of an array. Returns all created pages as an array of AdminIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent.
4974
+ ><details>
4975
+ ><summary>Schema</summary>
4976
+ >
4977
+ >**url*:** string <br>
4978
+ >*Parent page URL* <br>
4979
+ >example: shop <br>
4980
+ >
4981
+ >**langCode:** string <br>
4982
+ >*Required parameter lang code* <br>
4983
+ >example: en_US <br>
4984
+ >
4985
+ ></details>
4986
+
4987
+ Getting child pages with information about products in the form of an array. Returns all created pages as an array of AdminIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent.
3905
4988
 
3906
4989
  Example return:
3907
4990
 
@@ -4007,14 +5090,26 @@ Example return:
4007
5090
  >
4008
5091
  ></details>
4009
5092
 
4010
-
4011
5093
  ### Pages.getBlocksByPageUrl(url, langCode)
4012
5094
 
4013
5095
  ```js
4014
- const value = await Pages.getFormsByPageUrl('shop', 'en_US')
5096
+ const value = await Pages.getFormsByPageUrl('shop');
4015
5097
  ```
4016
5098
 
4017
- > Get PositionBlock objects for a related form by url. Returns an array of PositionBlock objects.
5099
+ ><details>
5100
+ ><summary>Schema</summary>
5101
+ >
5102
+ >**url*:** string <br>
5103
+ >*Page URL* <br>
5104
+ >example: shop <br>
5105
+ >
5106
+ >**langCode:** string <br>
5107
+ >*lang code* <br>
5108
+ >example: en_US <br>
5109
+ >
5110
+ ></details>
5111
+
5112
+ Get PositionBlock objects for a related form by url. Returns an array of PositionBlock objects.
4018
5113
 
4019
5114
  Example return:
4020
5115
 
@@ -4093,10 +5188,23 @@ Example return:
4093
5188
  ### Pages.getFormsByPageUrl(url, langCode)
4094
5189
 
4095
5190
  ```js
4096
- const value = await Pages.getFormsByPageUrl('shop', 'en_US')
5191
+ const value = await Pages.getFormsByPageUrl('shop')
4097
5192
  ```
4098
5193
 
4099
- > Get PositionForm objects for a related form by url. Returns an array of PositionForm objects.
5194
+ ><details>
5195
+ ><summary>Schema</summary>
5196
+ >
5197
+ >**url*:** string <br>
5198
+ >*Page URL* <br>
5199
+ >example: shop <br>
5200
+ >
5201
+ >**langCode:** string <br>
5202
+ >*lang code* <br>
5203
+ >example: en_US <br>
5204
+ >
5205
+ ></details>
5206
+
5207
+ Get PositionForm objects for a related form by url. Returns an array of PositionForm objects.
4100
5208
 
4101
5209
  Example return:
4102
5210
 
@@ -4193,14 +5301,22 @@ Example return:
4193
5301
  >
4194
5302
  ></details>
4195
5303
 
4196
-
4197
5304
  ### Pages.getConfigPageByUrl(url)
4198
5305
 
4199
5306
  ```js
4200
5307
  const value = await Pages.getConfigPageByUrl('shop')
4201
5308
  ```
4202
5309
 
4203
- > This method retrieves the settings for a specific page based on its URL (url). It returns a Promise that resolves to a ConfigPageDto object with page display settings.
5310
+ ><details>
5311
+ ><summary>Schema</summary>
5312
+ >
5313
+ >**url*:** string <br>
5314
+ >*Page URL* <br>
5315
+ >example: shop <br>
5316
+ >
5317
+ ></details>
5318
+
5319
+ This method retrieves the settings for a specific page based on its URL (url). It returns a Promise that resolves to a ConfigPageDto object with page display settings.
4204
5320
 
4205
5321
  Example return:
4206
5322
 
@@ -4224,14 +5340,26 @@ Example return:
4224
5340
  >
4225
5341
  ></details>
4226
5342
 
4227
-
4228
5343
  ### Pages.searchPage(name, langCode)
4229
5344
 
4230
5345
  ```js
4231
- const value = await Pages.searchPage('cup', 'en_US')
5346
+ const value = await Pages.searchPage('cup')
4232
5347
  ```
4233
5348
 
4234
- > This method performs a quick search for page objects based on a text query (name). It returns a Promise that resolves to a ContentIndexedPageDto objects or an empty array []. Get required language parameter.
5349
+ ><details>
5350
+ ><summary>Schema</summary>
5351
+ >
5352
+ >**name*:** string <br>
5353
+ >*Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account)* <br>
5354
+ >example: cup <br>
5355
+ >
5356
+ >**langCode:** string <br>
5357
+ >*lang code* <br>
5358
+ >example: en_US <br>
5359
+ >
5360
+ ></details>
5361
+
5362
+ This method performs a quick search for page objects based on a text query (name). It returns a Promise that resolves to a ContentIndexedPageDto objects or an empty array []. Get required language parameter.
4235
5363
 
4236
5364
  Example return:
4237
5365
 
@@ -4271,7 +5399,6 @@ Example return:
4271
5399
 
4272
5400
  ---
4273
5401
 
4274
-
4275
5402
  ## <h2 id="payments"> Payments </h2>
4276
5403
 
4277
5404
  ```js
@@ -4284,7 +5411,20 @@ const { Payments } = defineOneEntry('your-url');
4284
5411
  const value = await Payments.getSessions()
4285
5412
  ```
4286
5413
 
4287
- > This method get list of a payment session. It returns a Promise that resolves to a payment session object.
5414
+ ><details>
5415
+ ><summary>Schema</summary>
5416
+ >
5417
+ >**offset:** number <br>
5418
+ >*Optional parameter for pagination, default is 0* <br>
5419
+ >example: 0 <br>
5420
+ >
5421
+ >**limit:** number <br>
5422
+ >*Optional parameter for pagination, default is 30* <br>
5423
+ >example: 30 <br>
5424
+ >
5425
+ ></details>
5426
+
5427
+ This method get list of a payment session. It returns a Promise that resolves to a payment session object.
4288
5428
 
4289
5429
  Example return:
4290
5430
 
@@ -4309,33 +5449,33 @@ Example return:
4309
5449
  ><details>
4310
5450
  ><summary>Schema</summary>
4311
5451
  >
4312
- >**id:** number <br>
5452
+ >**id:** number <br>
4313
5453
  >*object identifier* <br>
4314
5454
  >example: 1764 <br>
4315
5455
  >
4316
5456
  >**updatedDate:** string <br>
4317
5457
  >*object modification date* <br>
4318
5458
  >
4319
- >**version:** number <br>
5459
+ >**version:** number <br>
4320
5460
  >*object modification version number* <br>
4321
5461
  >example: 10 <br>
4322
5462
  >
4323
- >**identifier:** string <br>
5463
+ >**identifier:** string <br>
4324
5464
  >*text identifier for the record field* <br>
4325
5465
  >example: catalog <br>
4326
5466
  >
4327
- >**type:** string <br>
5467
+ >**type:** string <br>
4328
5468
  >*type may be 'session' or 'intent'* <br>
4329
5469
  >example: session <br>
4330
5470
  >
4331
- >**lineItems:** array <br>
5471
+ >**lineItems:** array <br>
4332
5472
  >*list of items* <br>
4333
5473
  >
4334
- >**orderId:** number <br>
5474
+ >**orderId:** number <br>
4335
5475
  >*order identifier* <br>
4336
5476
  >example: 1 <br>
4337
5477
  >
4338
- >**paymentAccountId:** number <br>
5478
+ >**paymentAccountId:** number <br>
4339
5479
  >*payment account object identifier* <br>
4340
5480
  >example: 1 <br>
4341
5481
  >
@@ -4351,35 +5491,43 @@ Example return:
4351
5491
  >*payment link* <br>
4352
5492
  >example: https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M <br>
4353
5493
  >
4354
- >**successUrl:** string <br>
5494
+ >**successUrl:** string <br>
4355
5495
  >*redirect link after successful payment* <br>
4356
5496
  >example: https://example.com/success <br>
4357
5497
  >
4358
- >**cancelUrl** string <br>
5498
+ >**cancelUrl** string <br>
4359
5499
  >*redirect link after payment cancellation* <br>
4360
5500
  >example: https://example.com/cancel <br>
4361
5501
  >
4362
- >**intent** string <br>
5502
+ >**intent** string <br>
4363
5503
  >example: { "amount": 1, "currency": "usd" } <br>
4364
5504
  >
4365
- >**intentId** number <br>
5505
+ >**intentId** number <br>
4366
5506
  >*intent object identifier* <br>
4367
5507
  >example: 1 <br>
4368
5508
  >
4369
- >**clientSecret** string <br>
5509
+ >**clientSecret** string <br>
4370
5510
  >*client secret key* <br>
4371
5511
  >example: pi_3Oyz2kQWzXG1R23w144qG7o4_secret_OeScuCwTpHmyOM1atbm7pWJw2 <br>
4372
5512
  >
4373
5513
  ></details>
4374
5514
 
4375
-
4376
5515
  ### Payments.getSessionById(id)
4377
5516
 
4378
5517
  ```js
4379
5518
  const value = await Payments.getSessionById(1764)
4380
5519
  ```
4381
5520
 
4382
- > This method get a single payment session object by its identifier. It returns a Promise that resolves to a payment session object.
5521
+ ><details>
5522
+ ><summary>Schema</summary>
5523
+ >
5524
+ >**id*:** number <br>
5525
+ >*Identifier of the retrieved payment session object* <br>
5526
+ >example: 12 <br>
5527
+ >
5528
+ ></details>
5529
+
5530
+ This method get a single payment session object by its identifier. It returns a Promise that resolves to a payment session object.
4383
5531
 
4384
5532
  Example return:
4385
5533
 
@@ -4399,33 +5547,33 @@ Example return:
4399
5547
  ><details>
4400
5548
  ><summary>Schema</summary>
4401
5549
  >
4402
- >**id:** number <br>
5550
+ >**id:** number <br>
4403
5551
  >*object identifier* <br>
4404
5552
  >example: 1764 <br>
4405
5553
  >
4406
5554
  >**updatedDate:** string <br>
4407
5555
  >*object modification date* <br>
4408
5556
  >
4409
- >**version:** number <br>
5557
+ >**version:** number <br>
4410
5558
  >*object modification version number* <br>
4411
5559
  >example: 10 <br>
4412
5560
  >
4413
- >**identifier:** string <br>
5561
+ >**identifier:** string <br>
4414
5562
  >*text identifier for the record field* <br>
4415
5563
  >example: catalog <br>
4416
5564
  >
4417
- >**type:** string <br>
5565
+ >**type:** string <br>
4418
5566
  >*type may be 'session' or 'intent'* <br>
4419
5567
  >example: session <br>
4420
5568
  >
4421
- >**lineItems:** array <br>
5569
+ >**lineItems:** array <br>
4422
5570
  >*list of items* <br>
4423
5571
  >
4424
- >**orderId:** number <br>
5572
+ >**orderId:** number <br>
4425
5573
  >*order identifier* <br>
4426
5574
  >example: 1 <br>
4427
5575
  >
4428
- >**paymentAccountId:** number <br>
5576
+ >**paymentAccountId:** number <br>
4429
5577
  >*payment account object identifier* <br>
4430
5578
  >example: 1 <br>
4431
5579
  >
@@ -4441,35 +5589,51 @@ Example return:
4441
5589
  >*payment link* <br>
4442
5590
  >example: https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M <br>
4443
5591
  >
4444
- >**successUrl:** string <br>
5592
+ >**successUrl:** string <br>
4445
5593
  >*redirect link after successful payment* <br>
4446
5594
  >example: https://example.com/success <br>
4447
5595
  >
4448
- >**cancelUrl** string <br>
5596
+ >**cancelUrl:** string <br>
4449
5597
  >*redirect link after payment cancellation* <br>
4450
5598
  >example: https://example.com/cancel <br>
4451
5599
  >
4452
- >**intent** string <br>
4453
- >example: { "amount": 1, "currency": "usd" } <br>
5600
+ >**intent:** string <br>
5601
+ >example: { "amount": 1, "currency": "usd" } <br>
4454
5602
  >
4455
- >**intentId** number <br>
5603
+ >**intentId:** number <br>
4456
5604
  >*intent object identifier* <br>
4457
5605
  >example: 1 <br>
4458
5606
  >
4459
- >**clientSecret** string <br>
5607
+ >**clientSecret:** string <br>
4460
5608
  >*client secret key* <br>
4461
5609
  >example: pi_3Oyz2kQWzXG1R23w144qG7o4_secret_OeScuCwTpHmyOM1atbm7pWJw2 <br>
4462
5610
  >
4463
5611
  ></details>
4464
5612
 
4465
-
4466
5613
  ### Payments.createSession(orderId, type, automaticTaxEnabled)
4467
5614
 
4468
5615
  ```js
4469
5616
  const value = await Payments.createSession(1, 'session')
4470
5617
  ```
4471
5618
 
4472
- > This method creation of a payment session. It returns a Promise that resolves to a payment session object.
5619
+ ><details>
5620
+ ><summary>Schema</summary>
5621
+ >
5622
+ >**orderId*:** number <br>
5623
+ >*Order identifier* <br>
5624
+ >example: 1 <br>
5625
+ >
5626
+ >**type*:** 'session' | 'intent' <br>
5627
+ >*Session type* <br>
5628
+ >example: session <br>
5629
+ >
5630
+ >**automaticTaxEnabled:** boolean <br>
5631
+ >*Automatic calculation of the tax rate* <br>
5632
+ >example: false <br>
5633
+ >
5634
+ ></details>
5635
+
5636
+ This method creation of a payment session. It returns a Promise that resolves to a payment session object.
4473
5637
 
4474
5638
  Example return:
4475
5639
 
@@ -4486,33 +5650,33 @@ Example return:
4486
5650
  ><details>
4487
5651
  ><summary >Schema</summary>
4488
5652
  >
4489
- >**id:** number <br>
5653
+ >**id:** number <br>
4490
5654
  >*object identifier* <br>
4491
5655
  >example: 1764 <br>
4492
5656
  >
4493
5657
  >**updatedDate:** string <br>
4494
5658
  >*object modification date* <br>
4495
5659
  >
4496
- >**version:** number <br>
5660
+ >**version:** number <br>
4497
5661
  >*object modification version number* <br>
4498
5662
  >example: 10 <br>
4499
5663
  >
4500
- >**identifier:** string <br>
5664
+ >**identifier:** string <br>
4501
5665
  >*text identifier for the record field* <br>
4502
5666
  >example: catalog <br>
4503
5667
  >
4504
- >**type:** string <br>
5668
+ >**type:** string <br>
4505
5669
  >*type may be 'session' or 'intent'* <br>
4506
5670
  >example: session <br>
4507
5671
  >
4508
- >**lineItems:** array <br>
5672
+ >**lineItems:** array <br>
4509
5673
  >*list of items* <br>
4510
5674
  >
4511
- >**orderId:** number <br>
5675
+ >**orderId:** number <br>
4512
5676
  >*order identifier* <br>
4513
5677
  >example: 1 <br>
4514
5678
  >
4515
- >**paymentAccountId:** number <br>
5679
+ >**paymentAccountId:** number <br>
4516
5680
  >*payment account object identifier* <br>
4517
5681
  >example: 1 <br>
4518
5682
  >
@@ -4528,35 +5692,34 @@ Example return:
4528
5692
  >*payment link* <br>
4529
5693
  >example: https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M <br>
4530
5694
  >
4531
- >**successUrl:** string <br>
5695
+ >**successUrl:** string <br>
4532
5696
  >*redirect link after successful payment* <br>
4533
5697
  >example: https://example.com/success <br>
4534
5698
  >
4535
- >**cancelUrl** string <br>
5699
+ >**cancelUrl:** string <br>
4536
5700
  >*redirect link after payment cancellation* <br>
4537
5701
  >example: https://example.com/cancel <br>
4538
5702
  >
4539
- >**intent** string <br>
5703
+ >**intent:** string <br>
4540
5704
  >example: { "amount": 1, "currency": "usd" } <br>
4541
5705
  >
4542
- >**intentId** number <br>
5706
+ >**intentId:** number <br>
4543
5707
  >*intent object identifier* <br>
4544
- >example: 1 <br>
5708
+ >example: 1 <br>
4545
5709
  >
4546
- >**clientSecret** string <br>
5710
+ >**clientSecret:** string <br>
4547
5711
  >*client secret key* <br>
4548
5712
  >example: pi_3Oyz2kQWzXG1R23w144qG7o4_secret_OeScuCwTpHmyOM1atbm7pWJw2 <br>
4549
5713
  >
4550
5714
  ></details>
4551
5715
 
4552
-
4553
5716
  ### Payments.getConnected()
4554
5717
 
4555
5718
  ```js
4556
5719
  const value = await Payments.getConnected()
4557
5720
  ```
4558
5721
 
4559
- > This method get payment settings. It returns a Promise that resolves to a payment connection object.
5722
+ This method get payment settings. It returns a Promise that resolves to a payment connection object.
4560
5723
 
4561
5724
  Example return:
4562
5725
 
@@ -4570,15 +5733,15 @@ Example return:
4570
5733
  ><details>
4571
5734
  ><summary>Schema</summary>
4572
5735
  >
4573
- >**stripeAccountId:** string <br>
5736
+ >**stripeAccountId:** string <br>
4574
5737
  >*Identifier of connected Stripe account* <br>
4575
5738
  >example: acct_1OtRiIHTHOaLRCAa <br>
4576
5739
  >
4577
- >**stripePublishableKey:** string <br>
5740
+ >**stripePublishableKey:** string <br>
4578
5741
  >*Stripe Connect public key* <br>
4579
5742
  >example: pk_51OOvk2HPDnVW5KWJwZfiYAlTLAytYqYYKYjGkxm6PqDD4BATCwuRDGgVYXNCqnvwrewgtDVaGyju5VfClW3GrxxT005KnY7MS3 <br>
4580
5743
  >
4581
- >**paypalAccountId:** string <br>
5744
+ >**paypalAccountId:** string <br>
4582
5745
  >*Identifier of connected Paypal account* <br>
4583
5746
  >example: 4Q0BANTF5BE7N <br>
4584
5747
  >
@@ -4590,7 +5753,7 @@ Example return:
4590
5753
  const value = await Payments.getAccounts()
4591
5754
  ```
4592
5755
 
4593
- > This method get payment account as an array. It returns a Promise that resolves to a payment account object.
5756
+ This method get payment account as an array. It returns a Promise that resolves to a payment account object.
4594
5757
 
4595
5758
  Example return:
4596
5759
 
@@ -4611,42 +5774,51 @@ Example return:
4611
5774
  ><details>
4612
5775
  ><summary >Schema</summary>
4613
5776
  >
4614
- >**id:** number <br>
5777
+ >**id:** number <br>
4615
5778
  >*object identifier* <br>
4616
5779
  >example: 1764 <br>
4617
5780
  >
4618
- >**updatedDate:** string <br>
5781
+ >**updatedDate:** string <br>
4619
5782
  >*object modification date* <br>
4620
5783
  >
4621
- >**version:** number <br>
5784
+ >**version:** number <br>
4622
5785
  >*object modification version number* <br>
4623
5786
  >example: 10 <br>
4624
5787
  >
4625
- >**identifier:** string <br>
5788
+ >**identifier:** string <br>
4626
5789
  >*text identifier for the recording field* <br>
4627
5790
  >example: catalog <br>
4628
5791
  >
4629
- >**localizeInfos:** Record<string, any> <br>
5792
+ >**localizeInfos:** Record<string, any> <br>
4630
5793
  >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
4631
5794
  >example: OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } <br>
4632
5795
  >
4633
- >**type:** string <br>
5796
+ >**type:** string <br>
4634
5797
  >*type may be 'stripe', 'paypal' or 'custom'* <br>
4635
5798
  >example: stripe <br>
4636
5799
  >
4637
- >**isVisible:** boolean <br>
5800
+ >**isVisible:** boolean <br>
4638
5801
  >*visibility indicator of the payment account* <br>
4639
5802
  >example: true <br>
4640
5803
  >
4641
5804
  ></details>
4642
5805
 
4643
- ### Payments.getAccountById()
5806
+ ### Payments.getAccountById(id)
4644
5807
 
4645
5808
  ```js
4646
5809
  const value = await Payments.getAccountById(1764)
4647
5810
  ```
4648
5811
 
4649
- > This method get a single payment account object by its identifier. It returns a Promise that resolves to a payment account object.
5812
+ ><details>
5813
+ ><summary>Schema</summary>
5814
+ >
5815
+ >**id*:** number <br>
5816
+ >*Identifier of the retrieved payment account object* <br>
5817
+ >example: 1764 <br>
5818
+ >
5819
+ ></details>
5820
+
5821
+ This method get a single payment account object by its identifier. It returns a Promise that resolves to a payment account object.
4650
5822
 
4651
5823
  Example return:
4652
5824
 
@@ -4665,47 +5837,45 @@ Example return:
4665
5837
  ><details>
4666
5838
  ><summary >Schema</summary>
4667
5839
  >
4668
- >**id:** number <br>
5840
+ >**id:** number <br>
4669
5841
  >*object identifier* <br>
4670
5842
  >example: 1764 <br>
4671
5843
  >
4672
- >**updatedDate:** string <br>
5844
+ >**updatedDate:** string <br>
4673
5845
  >*object modification date* <br>
4674
5846
  >
4675
- >**version:** number <br>
5847
+ >**version:** number <br>
4676
5848
  >*object modification version number* <br>
4677
5849
  >example: 10 <br>
4678
5850
  >
4679
- >**identifier:** string <br>
5851
+ >**identifier:** string <br>
4680
5852
  >*text identifier for the recording field* <br>
4681
5853
  >example: catalog <br>
4682
5854
  >
4683
- >**localizeInfos:** Record<string, any> <br>
5855
+ >**localizeInfos:** Record<string, any> <br>
4684
5856
  >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
4685
5857
  >example: OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } <br>
4686
5858
  >
4687
- >**type:** string <br>
5859
+ >**type:** string <br>
4688
5860
  >*type may be 'stripe', 'paypal' or 'custom'* <br>
4689
5861
  >example: stripe <br>
4690
5862
  >
4691
- >**isVisible:** boolean <br>
5863
+ >**isVisible:** boolean <br>
4692
5864
  >*visibility indicator of the payment account* <br>
4693
5865
  >example: true <br>
4694
5866
  >
4695
5867
  ></details>
4696
5868
 
4697
-
4698
5869
  ### Payments.webhookStripe()
4699
5870
 
4700
5871
  ```js
4701
5872
  const value = await Payments.webhookStripe()
4702
5873
  ```
4703
5874
 
4704
- > This method use webhook for Stripe. Returns true (in case of successful execution) or false (in case of unsuccessful execution).
5875
+ This method use webhook for Stripe. Returns true (in case of successful execution) or false (in case of unsuccessful execution).
4705
5876
 
4706
5877
  ---
4707
5878
 
4708
-
4709
5879
  ## <h2 id="products"> Products </h2>
4710
5880
 
4711
5881
  ```js
@@ -4732,7 +5902,7 @@ const userQuery = {
4732
5902
  >*pagination parameter, default 0* <br>
4733
5903
  >example: 0 <br>
4734
5904
  >
4735
- >**limit:** number <br>
5905
+ >**limit:** number <br>
4736
5906
  >*pagination parameter, default 30* <br>
4737
5907
  >example: 30 <br>
4738
5908
  >
@@ -4747,6 +5917,7 @@ const userQuery = {
4747
5917
  ></details>
4748
5918
 
4749
5919
  "conditionMarker" by which values are filtered (not set by default), possible values:
5920
+
4750
5921
  > 'in' - Contains,<br>
4751
5922
  > 'nin' - Does not contain,<br>
4752
5923
  > 'eq' - Equal,<br>
@@ -4760,27 +5931,27 @@ const userQuery = {
4760
5931
 
4761
5932
  ```js
4762
5933
  const body = [
4763
- {
4764
- "attributeMarker": "price",
4765
- "conditionMarker": "mth",
4766
- "statusMarker": "waiting",
4767
- "conditionValue": 1,
4768
- "pageUrls": [
4769
- "23-laminat-floorwood-maxima"
4770
- ],
4771
- "isNested": false,
4772
- "title": ""
4773
- },
4774
- {
4775
- "attributeMarker": "price",
4776
- "conditionMarker": "lth",
4777
- "conditionValue": 3,
4778
- "pageUrls": [
4779
- "23-laminat-floorwood-maxima"
4780
- ],
4781
- "isNested": false,
4782
- "title": ""
4783
- }
5934
+ {
5935
+ "attributeMarker": "price",
5936
+ "conditionMarker": "mth",
5937
+ "statusMarker": "waiting",
5938
+ "conditionValue": 1,
5939
+ "pageUrls": [
5940
+ "23-laminat-floorwood-maxima"
5941
+ ],
5942
+ "isNested": false,
5943
+ "title": ""
5944
+ },
5945
+ {
5946
+ "attributeMarker": "price",
5947
+ "conditionMarker": "lth",
5948
+ "conditionValue": 3,
5949
+ "pageUrls": [
5950
+ "23-laminat-floorwood-maxima"
5951
+ ],
5952
+ "isNested": false,
5953
+ "title": ""
5954
+ }
4784
5955
  ]
4785
5956
 
4786
5957
  const value = await Products.getProducts(body)
@@ -4789,11 +5960,65 @@ const value = await Products.getProducts(body)
4789
5960
  ><details>
4790
5961
  ><summary>Schema</summary>
4791
5962
  >
4792
- >**attributeMarker:** string <br>
5963
+ >**body*:** IFilterParams[] <br>
5964
+ >*Request body. Default [].* <br>
5965
+ >example: [] <br>
5966
+ >
5967
+ >**langCode:** string <br>
5968
+ >*Language code parameter. Default "en_US"* <br>
5969
+ >example: en_US <br>
5970
+ >
5971
+ >**userQuery:** IProductsQuery <br>
5972
+ >*Optional set query parameters.* <br>
5973
+ >
5974
+ >**userQuery.offset:** number <br>
5975
+ >*Optional parameter for pagination, default is 0* <br>
5976
+ >example: 0 <br>
5977
+ >
5978
+ >**userQuery.limit:** number <br>
5979
+ >*Optional parameter for pagination, default is 30* <br>
5980
+ >example: 30 <br>
5981
+ >
5982
+ >**userQuery.sortOrder:** string <br>
5983
+ >*Optional sorting order DESC | ASC* <br>
5984
+ >example: DESC <br>
5985
+ >
5986
+ >**userQuery.sortKey:** string <br>
5987
+ >*Optional field to sort by (id, title, date, price, position, status)* <br>
5988
+ >example: id <br>
5989
+ >
5990
+ >**userQuery.statusId:** number <br>
5991
+ >*Optional parameter - search by status id* <br>
5992
+ >example: 1 <br>
5993
+ >
5994
+ >**userQuery.statusMarker:** string <br>
5995
+ >*Optional identifier of the product page status* <br>
5996
+ >example: waiting <br>
5997
+ >
5998
+ >**userQuery.conditionValue:** string <br>
5999
+ >*Optional value that is being searched* <br>
6000
+ >example: 3 <br>
6001
+ >
6002
+ >**userQuery.conditionMarker:** string <br>
6003
+ >*Optional identifier of the filter condition by which values are filtered* <br>
6004
+ >example: mth <br>
6005
+ >
6006
+ >**userQuery.attributeMarker:** string <br>
6007
+ >*Optional text identifier of the indexed attribute by which values are filtered* <br>
6008
+ >example: price <br>
6009
+ >
6010
+ ></details>
6011
+
6012
+ <br>
6013
+
6014
+ ><details>
6015
+ ><summary>Schema (body)</summary>
6016
+ >
6017
+ >**attributeMarker:** string <br>
4793
6018
  >*textual identifier of the attribute* <br>
4794
6019
  >example: price <br>
4795
6020
  >
4796
- >**conditionMarker:** string <br>
6021
+ >**conditionMarker:** string <br>
4797
6022
  >*textual identifier of the condition* <br>
4798
6023
  >example: in <br>
4799
6024
  >
@@ -4818,7 +6043,7 @@ const value = await Products.getProducts(body)
4818
6043
  >
4819
6044
  ></details>
4820
6045
 
4821
- > This method searches for all products objects with pagination that do not have a category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
6046
+ This method searches for all products objects with pagination that do not have a category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
4822
6047
 
4823
6048
  Example return:
4824
6049
 
@@ -4950,14 +6175,57 @@ Example return:
4950
6175
  >
4951
6176
  ></details>
4952
6177
 
4953
-
4954
6178
  ### Products.getProductsEmptyPage(langCode, userQuery)
4955
6179
 
4956
6180
  ```js
4957
6181
  const value = await Products.getProductsEmptyPage('en_US', userQuery)
4958
6182
  ```
4959
6183
 
4960
- > This method searches for product page objects with pagination that do not have a category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
6184
+ ><details>
6185
+ ><summary>Schema</summary>
6186
+ >
6187
+ >**langCode:** string <br>
6188
+ >*Language code parameter. Default "en_US"* <br>
6189
+ >example: en_US <br>
6190
+ >
6191
+ >**userQuery:** IProductsQuery <br>
6192
+ >*Optional set query parameters.* <br>
6193
+ >
6194
+ >**userQuery.offset:** number <br>
6195
+ >*Optional parameter for pagination, default is 0* <br>
6196
+ >example: 0 <br>
6197
+ >
6198
+ >**userQuery.limit:** number <br>
6199
+ >*Optional parameter for pagination, default is 30* <br>
6200
+ >example: 30 <br>
6201
+ >
6202
+ >**userQuery.statusMarker:** string <br>
6203
+ >*Optional identifier of the product page status* <br>
6204
+ >example: waiting <br>
6205
+ >
6206
+ >**userQuery.conditionValue:** string <br>
6207
+ >*Optional value that is being searched* <br>
6208
+ >example: 1 <br>
6209
+ >
6210
+ >**userQuery.conditionMarker:** string <br>
6211
+ >*Optional identifier of the filter condition by which values are filtered* <br>
6212
+ >example: lth <br>
6213
+ >
6214
+ >**userQuery.attributeMarker:** string <br>
6215
+ >*Optional text identifier of the indexed attribute by which values are filtered* <br>
6216
+ >example: price <br>
6217
+ >
6218
+ >**userQuery.sortOrder:** string <br>
6219
+ >*Optional sorting order DESC | ASC* <br>
6220
+ >example: DESC <br>
6221
+ >
6222
+ >**userQuery.sortKey:** string <br>
6223
+ >*Optional field to sort by (id, title, date, price, position, status)* <br>
6224
+ >example: id <br>
6225
+ >
6226
+ ></details>
6227
+
6228
+ This method searches for product page objects with pagination that do not have a category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
4961
6229
 
4962
6230
  Example return:
4963
6231
 
@@ -5068,93 +6336,146 @@ Example return:
5068
6336
  >*status identifiers of the product page (can be null)* <br>
5069
6337
  >example: 1 <br>
5070
6338
  >
5071
- >**sku:** string <br>
5072
- >*product SKU value taken from the index* <br>
6339
+ >**sku:** string <br>
6340
+ >*product SKU value taken from the index* <br>
6341
+ >example: 1 <br>
6342
+ >
6343
+ >**relatedIds:** array <br>
6344
+ >*identifiers of related product pages* <br>
6345
+ >example: List [ 1, 2, 3 ] <br>
6346
+ >
6347
+ >**price:** number <br>
6348
+ >*price value of the product page taken from the index* <br>
6349
+ >example: 0 <br>
6350
+ >
6351
+ >**templateIdentifier** string <br>
6352
+ >*custom identifier of the associated template* <br>
6353
+ >example: my-template <br>
6354
+ >
6355
+ >**shortDescTemplateIdentifier** string <br>
6356
+ >*custom identifier of the associated template for short description* <br>
6357
+ >example: my-template-short <br>
6358
+ >
6359
+ ></details>
6360
+
6361
+ ### Products.getProductsByPageId(id, body, langCode, userQuery)
6362
+
6363
+ ```js
6364
+ const body = [
6365
+ {
6366
+ "attributeMarker": "price",
6367
+ "conditionMarker": "mth",
6368
+ "statusMarker": "waiting",
6369
+ "conditionValue": 1,
6370
+ "pageUrls": [
6371
+ "23-laminat-floorwood-maxima"
6372
+ ],
6373
+ "isNested": false,
6374
+ "title": ""
6375
+ },
6376
+ {
6377
+ "attributeMarker": "price",
6378
+ "conditionMarker": "lth",
6379
+ "conditionValue": 3,
6380
+ "pageUrls": [
6381
+ "23-laminat-floorwood-maxima"
6382
+ ],
6383
+ "isNested": false,
6384
+ "title": ""
6385
+ }
6386
+ ];
6387
+
6388
+ const value = await Products.getProductsByPageId(1764, body);
6389
+ ```
6390
+
6391
+ ><details>
6392
+ ><summary>Schema</summary>
6393
+ >
6394
+ >**id*:** number <br>
6395
+ >*Page id* <br>
6396
+ >example: 1 <br>
6397
+ >
6398
+ >**body:** IFilterParams[] <br>
6399
+ >*Request body* <br>
6400
+ >example: [] <br>
6401
+ >
6402
+ >**langCode:** string <br>
6403
+ >*Language code parameter. Default "en_US"* <br>
6404
+ >example: en_US <br>
6405
+ >
6406
+ >**userQuery:** IProductsQuery <br>
6407
+ >*Optional set query parameters.* <br>
6408
+ >example: {} <br>
6409
+ >
6410
+ >**userQuery.offset:** number <br>
6411
+ >*Optional parameter for pagination, default is 0* <br>
6412
+ >example: 0 <br>
6413
+ >
6414
+ >**userQuery.limit:** number <br>
6415
+ >*Optional parameter for pagination, default is 30* <br>
6416
+ >example: 30 <br>
6417
+ >
6418
+ >**userQuery.statusMarker:** string <br>
6419
+ >*Optional identifier of the product page status* <br>
6420
+ >example: waiting <br>
6421
+ >
6422
+ >**userQuery.conditionValue:** string <br>
6423
+ >*Optional value that is being searched* <br>
5073
6424
  >example: 1 <br>
5074
6425
  >
5075
- >**relatedIds:** array <br>
5076
- >*identifiers of related product pages* <br>
5077
- >example: List [ 1, 2, 3 ] <br>
6426
+ >**userQuery.conditionMarker:** string <br>
6427
+ >*Optional identifier of the filter condition by which values are filtered* <br>
6428
+ >example: mth <br>
5078
6429
  >
5079
- >**price:** number <br>
5080
- >*price value of the product page taken from the index* <br>
5081
- >example: 0 <br>
6430
+ >**userQuery.attributeMarker:** string <br>
6431
+ >*Optional text identifier of the indexed attribute by which values are filtered* <br>
6432
+ >example: price <br>
5082
6433
  >
5083
- >**templateIdentifier** string <br>
5084
- >*custom identifier of the associated template* <br>
5085
- >example: my-template <br>
6434
+ >**userQuery.sortOrder:** string <br>
6435
+ >*Optional sorting order DESC | ASC* <br>
6436
+ >example: DESC <br>
5086
6437
  >
5087
- >**shortDescTemplateIdentifier** string <br>
5088
- >*custom identifier of the associated template for short description* <br>
5089
- >example: my-template-short <br>
6438
+ >**userQuery.sortKey:** string <br>
6439
+ >*Optional field to sort by (id, title, date, price, position, status)* <br>
6440
+ >example: id <br>
5090
6441
  >
5091
6442
  ></details>
5092
6443
 
5093
-
5094
- ### Products.getProductsByPageId(id, body, langCode, userQuery)
5095
-
5096
- ```js
5097
- const body = [
5098
- {
5099
- "attributeMarker": "price",
5100
- "conditionMarker": "mth",
5101
- "statusMarker": "waiting",
5102
- "conditionValue": 1,
5103
- "pageUrls": [
5104
- "23-laminat-floorwood-maxima"
5105
- ],
5106
- "isNested": false,
5107
- "title": ""
5108
- },
5109
- {
5110
- "attributeMarker": "price",
5111
- "conditionMarker": "lth",
5112
- "conditionValue": 3,
5113
- "pageUrls": [
5114
- "23-laminat-floorwood-maxima"
5115
- ],
5116
- "isNested": false,
5117
- "title": ""
5118
- }
5119
- ]
5120
-
5121
- const value = await Products.getProductsByPageId(1764, body)
5122
- ```
6444
+ <br>
5123
6445
 
5124
6446
  ><details>
5125
- ><summary>Schema</summary>
6447
+ ><summary>Schema (body)</summary>
5126
6448
  >
5127
- >**attributeMarker:** string <br>
6449
+ >**attributeMarker:** string <br>
5128
6450
  >*textual identifier of the attribute* <br>
5129
6451
  >example: price <br>
5130
6452
  >
5131
- >**conditionMarker:** string <br>
6453
+ >**conditionMarker:** string <br>
5132
6454
  >*textual identifier of the condition* <br>
5133
6455
  >example: in <br>
5134
6456
  >
5135
- >**statusMarker:** string <br>
6457
+ >**statusMarker:** string <br>
5136
6458
  >*textual identifier of the product page status (default not set)* <br>
5137
6459
  >example: status_1<br>
5138
6460
  >
5139
- >**conditionValue:** number <br>
6461
+ >**conditionValue:** number <br>
5140
6462
  >*condition value* <br>
5141
6463
  >example: 1 <br>
5142
6464
  >
5143
- >**pageUrls:** Array<string> <br>
6465
+ >**pageUrls:** Array<string> <br>
5144
6466
  >*unique part of the page URL (after the last "/")* <br>
5145
6467
  >
5146
- >**title:** string <br>
6468
+ >**title:** string <br>
5147
6469
  >*example: Iphone 17 Pro* <br>
5148
6470
  >product name <br>
5149
6471
  >
5150
- >**isNested:** boolean <br>
6472
+ >**isNested:** boolean <br>
5151
6473
  >*search indicator for all nested categories (pageUrls)* <br>
5152
6474
  >example: false <br>
5153
6475
  >
5154
6476
  ></details>
5155
6477
 
5156
-
5157
- > This method searches for all products objects with pagination for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
6478
+ This method searches for all products objects with pagination for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
5158
6479
 
5159
6480
  Example return:
5160
6481
 
@@ -5290,14 +6611,64 @@ Example return:
5290
6611
  >
5291
6612
  ></details>
5292
6613
 
5293
-
5294
6614
  ### Products.getProductsPriceByPageUrl(url, userQuery)
5295
6615
 
5296
6616
  ```js
6617
+
5297
6618
  const value = await Products.getProductsPriceByPageUrl('catalog')
5298
6619
  ```
5299
6620
 
5300
- > This method searches for information about products and prices for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
6621
+ ><details>
6622
+ ><summary>Schema</summary>
6623
+ >
6624
+ >**url*:** string <br>
6625
+ >*Page url* <br>
6626
+ >example: catalog <br>
6627
+ >
6628
+ >**langCode:** string <br>
6629
+ >*Language code parameter. Default "en_US"* <br>
6630
+ >example: en_US <br>
6631
+ >
6632
+ >**userQuery:** IProductsQuery <br>
6633
+ >*Optional set query parameters* <br>
6634
+ >
6635
+ >**userQuery.offset:** number <br>
6636
+ >*Optional parameter for pagination, default is 0* <br>
6637
+ >example: 0 <br>
6638
+ >
6639
+ >**userQuery.limit:** number <br>
6640
+ >*Optional parameter for pagination, default is 30* <br>
6641
+ >example: 30 <br>
6642
+ >
6643
+ >**userQuery.statusMarker:** string <br>
6644
+ >*Optional identifier of the product page status* <br>
6645
+ >example: waiting <br>
6646
+ >
6647
+ >**userQuery.conditionValue:** string <br>
6648
+ >*Optional value that is being searched* <br>
6649
+ >example: 1 <br>
6650
+ >
6651
+ >**userQuery.conditionMarker:** string <br>
6652
+ >*Optional identifier of the filter condition by which values are filtered* <br>
6653
+ >example: mth <br>
6654
+ >
6655
+ >**userQuery.attributeMarker:** string <br>
6656
+ >*Optional text identifier of the indexed attribute by which values are filtered* <br>
6657
+ >example: price <br>
6658
+ >
6659
+ >**userQuery.sortOrder:** string <br>
6660
+ >*Optional sorting order DESC | ASC* <br>
6661
+ >example: DESC <br>
6662
+ >
6663
+ >**userQuery.sortKey:** string <br>
6664
+ >*Optional field to sort by (id, title, date, price, position, status)* <br>
6665
+ >example: id <br>
6666
+ >
6667
+ ></details>
6668
+
6669
+ <br>
6670
+
6671
+ This method searches for information about products and prices for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
5301
6672
 
5302
6673
  Example return:
5303
6674
 
@@ -5330,7 +6701,6 @@ Example return:
5330
6701
  >
5331
6702
  ></details>
5332
6703
 
5333
-
5334
6704
  ### Products.getProductsByPageUrl(url, body, langCode, userQuery)
5335
6705
 
5336
6706
  ```js
@@ -5364,6 +6734,60 @@ const value = await Products.getProductsByPageUrl('catalog', body)
5364
6734
  ><details>
5365
6735
  ><summary>Schema</summary>
5366
6736
  >
6737
+ >**url*:** string <br>
6738
+ >*Page url* <br>
6739
+ >example: catalog <br>
6740
+ >
6741
+ >**body*:** IFilterParams[] <br>
6742
+ >*Request body* <br>
6743
+ >example: [] <br>
6744
+ >
6745
+ >**langCode:** string <br>
6746
+ >*Language code parameter. Default "en_US"* <br>
6747
+ >example: en_US <br>
6748
+ >
6749
+ >**userQuery:** IProductsQuery <br>
6750
+ >*Optional set query parameters.* <br>
6751
+ >
6752
+ >**userQuery.offset:** number <br>
6753
+ >*Optional parameter for pagination, default is 0* <br>
6754
+ >example: 0 <br>
6755
+ >
6756
+ >**userQuery.limit:** number <br>
6757
+ >*Optional parameter for pagination, default is 30* <br>
6758
+ >example: 30 <br>
6759
+ >
6760
+ >**userQuery.statusMarker:** string <br>
6761
+ >*Optional identifier of the product page status* <br>
6762
+ >example: waiting <br>
6763
+ >
6764
+ >**userQuery.conditionValue:** string <br>
6765
+ >*Optional value that is being searched* <br>
6766
+ >example: 1 <br>
6767
+ >
6768
+ >**userQuery.conditionMarker:** string <br>
6769
+ >*Optional identifier of the filter condition by which values are filtered* <br>
6770
+ >example: mth <br>
6771
+ >
6772
+ >**userQuery.attributeMarker:** string <br>
6773
+ >*Optional text identifier of the indexed attribute by which values are filtered* <br>
6774
+ >example: price <br>
6775
+ >
6776
+ >**userQuery.sortOrder:** string <br>
6777
+ >*Optional sorting order DESC | ASC* <br>
6778
+ >example: DESC <br>
6779
+ >
6780
+ >**userQuery.sortKey:** string <br>
6781
+ >*Optional field to sort by (id, title, date, price, position, status)* <br>
6782
+ >example: id <br>
6783
+ >
6784
+ ></details>
6785
+
6786
+ <br>
6787
+
6788
+ ><details>
6789
+ ><summary>Schema (body)</summary>
6790
+ >
5367
6791
  >**attributeMarker:** string <br>
5368
6792
  >*textual identifier of the attribute* <br>
5369
6793
  >example: price <br>
@@ -5393,7 +6817,7 @@ const value = await Products.getProductsByPageUrl('catalog', body)
5393
6817
  >
5394
6818
  ></details>
5395
6819
 
5396
- > This method searches for all products objects with pagination for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
6820
+ This method searches for all products objects with pagination for the selected category, based on the provided query parameters (userQuery). It returns a Promise that resolves to an array of items, where each item is a ContentIndexedProductDto object.
5397
6821
 
5398
6822
  Example return:
5399
6823
 
@@ -5531,10 +6955,43 @@ Example return:
5531
6955
  ### Products.getRelatedProductsById(id, langCode, userQuery)
5532
6956
 
5533
6957
  ```js
5534
- const value = await Products.getRelatedProductsById(1, 'en_US', {offset: 1, limit: 20})
6958
+ const value = await Products.getRelatedProductsById(1)
5535
6959
  ```
5536
6960
 
5537
- > This method retrieves all related product page objects for a specific product based on its identifier (id) from the API. It accepts an optional userQuery parameter for additional query parameters such as offset, limit, sortOrder, and sortKey. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
6961
+ ><details>
6962
+ ><summary>Schema</summary>
6963
+ >
6964
+ >**id*:** number <br>
6965
+ >*Product page identifier for which to find relationship* <br>
6966
+ >example: <br>
6967
+ >
6968
+ >**langCode:** string <br>
6969
+ >*Language code parameter. Default "en_US"* <br>
6970
+ >example: en_US <br>
6971
+ >
6972
+ >**userQuery:** IProductsQuery <br>
6973
+ >*Optional set query parameters* <br>
6974
+ >example: [] <br>
6975
+ >
6976
+ >**userQuery.offset:** number <br>
6977
+ >*Optional parameter for pagination, default is 0* <br>
6978
+ >example: 0 <br>
6979
+ >
6980
+ >**userQuery.limit:** number <br>
6981
+ >*Optional parameter for pagination, default is 30* <br>
6982
+ >example: 30 <br>
6983
+ >
6984
+ >**userQuery.sortOrder:** string <br>
6985
+ >*Optional sorting order DESC | ASC* <br>
6986
+ >example: DESC <br>
6987
+ >
6988
+ >**userQuery.sortKey:** string <br>
6989
+ >*Optional field to sort by (id, title, date, price, position, status)* <br>
6990
+ >example: id <br>
6991
+ >
6992
+ ></details>
6993
+
6994
+ This method retrieves all related product page objects for a specific product based on its identifier (id) from the API. It accepts an optional userQuery parameter for additional query parameters such as offset, limit, sortOrder, and sortKey. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
5538
6995
 
5539
6996
  Example return:
5540
6997
 
@@ -5670,14 +7127,199 @@ Example return:
5670
7127
  >
5671
7128
  ></details>
5672
7129
 
7130
+ ### Products.getProductsByIds(ids, langCode, userQuery)
7131
+
7132
+ ```js
7133
+ const value = await Products.getProductsByIds('1, 5, 8', 'en_US')
7134
+ ```
7135
+
7136
+ ><details>
7137
+ ><summary>Schema</summary>
7138
+ >
7139
+ >**ids*:** string <br>
7140
+ >*Product page identifiers for which to find relationships* <br>
7141
+ >example: 1,3,5,15 <br>
7142
+ >
7143
+ >**langCode:** string <br>
7144
+ >*Language code parameter. Default "en_US"* <br>
7145
+ >example: en_US <br>
7146
+ >
7147
+ >**userQuery:** IProductsQuery <br>
7148
+ >*Optional set query parameters* <br>
7149
+ >example: [] <br>
7150
+ >
7151
+ >**userQuery.offset:** number <br>
7152
+ >*Optional parameter for pagination, default is 0* <br>
7153
+ >example: 0 <br>
7154
+ >
7155
+ >**userQuery.limit:** number <br>
7156
+ >*Optional parameter for pagination, default is 30* <br>
7157
+ >example: 30 <br>
7158
+ >
7159
+ >**userQuery.sortOrder:** string <br>
7160
+ >*Optional sorting order DESC | ASC* <br>
7161
+ >example: DESC <br>
7162
+ >
7163
+ >**userQuery.sortKey:** string <br>
7164
+ >*Optional field to sort by (id, title, date, price, position, status)* <br>
7165
+ >example: id <br>
7166
+ >
7167
+ ></details>
7168
+
7169
+ This method retrieves a products objects based on its identifiers (ids) from the API. It returns a Promise that resolves to a IProductsEntity objects for the product.
7170
+
7171
+ Example return:
7172
+
7173
+ ```json
7174
+ [
7175
+ {
7176
+ "id": 1764,
7177
+ "localizeInfos": {
7178
+ "en_US": {
7179
+ "title": "Product"
7180
+ }
7181
+ },
7182
+ "isVisible": true,
7183
+ "isSync": true,
7184
+ "price": 0,
7185
+ "additional": {
7186
+ "prices": {
7187
+ "min": 0,
7188
+ "max": 100
7189
+ }
7190
+ },
7191
+ "blocks": [
7192
+ null
7193
+ ],
7194
+ "sku": "0-123",
7195
+ "productPages": [
7196
+ {
7197
+ "id": 8997,
7198
+ "pageId": 1176,
7199
+ "productId": 8872
7200
+ }
7201
+ ],
7202
+ "statusLocalizeInfos": {
7203
+ "en_US": {
7204
+ "title": "Product"
7205
+ }
7206
+ },
7207
+ "templateIdentifier": "my-template",
7208
+ "shortDescTemplateIdentifier": "my-template-short",
7209
+ "attributeValues": {
7210
+ "en_US": {
7211
+ "marker": {
7212
+ "value": "",
7213
+ "type": "string",
7214
+ "position": 1,
7215
+ "isProductPreview": false,
7216
+ "isIcon": false,
7217
+ "attributeFields": {
7218
+ "marker": {
7219
+ "type": "string",
7220
+ "value": "test"
7221
+ }
7222
+ }
7223
+ }
7224
+ }
7225
+ },
7226
+ "attributeSetIdentifier": "my-set",
7227
+ "statusIdentifier": "my-status",
7228
+ "position": 1
7229
+ }
7230
+ ]
7231
+ ```
7232
+
7233
+ ><details>
7234
+ ><summary >Schema</summary>
7235
+ >
7236
+ >**id:** number <br>
7237
+ >*object identifier* <br>
7238
+ >example: 1764 <br>
7239
+ >
7240
+ >**localizeInfos:** Record<string, any> <br>
7241
+ >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
7242
+ >example: OrderedMap { "en_US": OrderedMap { "title": "Catalog", "plainContent": "Content for catalog", "htmlContent": "<b>Content for catalog</b>", "menuTitle": "Catalog" } } <br>
7243
+ >
7244
+ >**isVisible:** boolean <br>
7245
+ >*Page visibility flag* <br>
7246
+ >example: true <br>
7247
+ >
7248
+ >**isSync:** boolean <br>
7249
+ >*indicator of page indexing (true or false)* <br>
7250
+ >example: false <br>
7251
+ >
7252
+ >**price:** number <br>
7253
+ >*price value of the product page taken from the index* <br>
7254
+ >example: 0 <br>
7255
+ >
7256
+ >**additional:** Record<string, any> <br>
7257
+ >*additional value from the index* <br>
7258
+ >example: OrderedMap { "prices": OrderedMap { "min": 0, "max": 100 } } <br>
7259
+ >
7260
+ >**blocks:** array <br>
7261
+ >*product blocks* <br>
7262
+ >example: ['product_block'] <br>
7263
+ >
7264
+ >**sku:** string <br>
7265
+ >*product SKU value taken from the index* <br>
7266
+ >example: 1 <br>
7267
+ >
7268
+ >**productPages:** array <br>
7269
+ >*ProductPageEntity objects linked to the product page (optional)* <br>
7270
+ >example: List [ OrderedMap { "id": 8997, "pageId": 1176, "productId": 8872 } ] <br>
7271
+ >
7272
+ >**statusLocalizeInfos:** CommonLocalizeInfos <br>
7273
+ >*json description of the item status object, taking into account the language* <br>
7274
+ >example: { "title": "Product" } <br>
7275
+ >
7276
+ >**templateIdentifier:** string <br>
7277
+ >*custom identifier of the associated template* <br>
7278
+ >example: my-template <br>
7279
+ >
7280
+ >**shortDescTemplateIdentifier** string <br>
7281
+ >*custom identifier of the associated template for short description* <br>
7282
+ >example: my-template-short <br>
7283
+ >
7284
+ >**attributeValues:** Record<string, string> <br>
7285
+ >*Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)* <br>
7286
+ >example: OrderedMap { "en_US": OrderedMap { "marker": OrderedMap { "value": "", "type": "string" } } } <br>
7287
+ >
7288
+ >**attributeSetIdentifier:** string <br>
7289
+ >*textual identifier of the attribute set used* <br>
7290
+ >example: 'my-set' <br>
7291
+ >
7292
+ >**statusIdentifier:** string <br>
7293
+ >*textual identifier of the product status* <br>
7294
+ >example: 'my-status' <br>
7295
+ >
7296
+ >**position:** number <br>
7297
+ >*position number (for sorting)* <br>
7298
+ >example: 1 <br>
7299
+ >
7300
+ ></details>
7301
+
5673
7302
 
5674
7303
  ### Products.getProductById(id, langCode)
5675
7304
 
5676
7305
  ```js
5677
- const value = await Products.getProductById(1, 'en_US')
7306
+ const value = await Products.getProductById(1)
5678
7307
  ```
5679
7308
 
5680
- > This method retrieves a single product object based on its identifier (id) from the API. It returns a Promise that resolves to a ContentIndexedProductDto object for the product.
7309
+ ><details>
7310
+ ><summary>Schema</summary>
7311
+ >
7312
+ >**id*:** Product id <br>
7313
+ >* Product id* <br>
7314
+ >example: 1 <br>
7315
+ >
7316
+ >**langCode:** <br>
7317
+ >*Language code parameter. Default "en_US"* <br>
7318
+ >example: en_US <br>
7319
+ >
7320
+ ></details>
7321
+
7322
+ This method retrieves a single product object based on its identifier (id) from the API. It returns a Promise that resolves to a ContentIndexedProductDto object for the product.
5681
7323
 
5682
7324
  Example return:
5683
7325
 
@@ -5749,7 +7391,7 @@ Example return:
5749
7391
  >
5750
7392
  >**statusLocalizeInfos:** CommonLocalizeInfos <br>
5751
7393
  >*json description of the item status object, taking into account the language* <br>
5752
- >example: { "title": "Product" <br>
7394
+ >example: { "title": "Product" } <br>
5753
7395
  >
5754
7396
  >**localizeInfos:** Record<string, any> <br>
5755
7397
  >*json description of the main page data object taking into account the language "en_US" (for example)* <br>
@@ -5809,14 +7451,22 @@ Example return:
5809
7451
  >
5810
7452
  ></details>
5811
7453
 
5812
-
5813
7454
  ### Products.getProductBlockById(id)
5814
7455
 
5815
7456
  ```js
5816
7457
  const value = await Products.getProductBlockById(1764)
5817
7458
  ```
5818
7459
 
5819
- > This method Getting a product block object by product id.
7460
+ ><details>
7461
+ ><summary>Schema</summary>
7462
+ >
7463
+ >**id*:** number <br>
7464
+ >*Product id* <br>
7465
+ >example: 1764 <br>
7466
+ >
7467
+ ></details>
7468
+
7469
+ This method Getting a product block object by product id.
5820
7470
 
5821
7471
  Example return:
5822
7472
 
@@ -5902,15 +7552,26 @@ Example return:
5902
7552
  >
5903
7553
  ></details>
5904
7554
 
5905
-
5906
-
5907
7555
  ### Products.searchProduct(name, langCode)
5908
7556
 
5909
7557
  ```js
5910
- const value = await Products.searchProduct('cup', 'en_US')
7558
+ const value = await Products.searchProduct('cup')
5911
7559
  ```
5912
7560
 
5913
- > This method performs a quick search for product page objects based on a text query name. The search is performed on the title field of the localizeInfos object, taking the specified lang language code into consideration. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
7561
+ ><details>
7562
+ ><summary>Schema</summary>
7563
+ >
7564
+ >**name*:** string <br>
7565
+ >*Text to search product page objects (search is based on the title field of the localizeInfos object with language consideration)* <br>
7566
+ >example: cup <br>
7567
+ >
7568
+ >**langCode:** string <br>
7569
+ >*Language code. Default "en_US"* <br>
7570
+ >example: en_US <br>
7571
+ >
7572
+ ></details>
7573
+
7574
+ This method performs a quick search for product page objects based on a text query name. The search is performed on the title field of the localizeInfos object, taking the specified lang language code into consideration. It returns a Promise that resolves to an array of ContentIndexedProductDto objects.
5914
7575
 
5915
7576
  Example return:
5916
7577
 
@@ -6044,21 +7705,28 @@ Example return:
6044
7705
 
6045
7706
  ---
6046
7707
 
6047
-
6048
7708
  ## <h2 id="productstatuses"> ProductStatuses </h2>
6049
7709
 
6050
-
6051
7710
  ```js
6052
7711
  const { ProductStatuses } = defineOneEntry('your-url');
6053
7712
  ```
6054
7713
 
6055
- ### ProductStatuses.getProductStatuses()
7714
+ ### ProductStatuses.getProductStatuses(langCode)
6056
7715
 
6057
7716
  ```js
6058
7717
  const value = await ProductStatuses.getProductStatuses()
6059
7718
  ```
6060
7719
 
6061
- > This method searches for all product status objects from the API. It returns a Promise that resolves to an array of product status objects.
7720
+ ><details>
7721
+ ><summary>Schema</summary>
7722
+ >
7723
+ >**langCode:** string <br>
7724
+ >*language code* <br>
7725
+ >example: en_US <br>
7726
+ >
7727
+ ></details>
7728
+
7729
+ This method searches for all product status objects from the API. It returns a Promise that resolves to an array of product status objects.
6062
7730
 
6063
7731
  Example return:
6064
7732
 
@@ -6097,14 +7765,26 @@ Example return:
6097
7765
  >
6098
7766
  ></details>
6099
7767
 
6100
-
6101
- ### ProductStatuses.getProductStatusesById(id)
7768
+ ### ProductStatuses.getProductStatusesById(id, langCode)
6102
7769
 
6103
7770
  ```js
6104
7771
  const value = await ProductStatuses.getProductStatusesById(1)
6105
7772
  ```
6106
7773
 
6107
- > This method searches for a product status object based on its identifier (id) from the API. It returns a Promise that resolves to a product status object.
7774
+ ><details>
7775
+ ><summary>Schema</summary>
7776
+ >
7777
+ >**id*:** number <br>
7778
+ >*Status id* <br>
7779
+ >example: 1 <br>
7780
+ >
7781
+ >**langCode:** string <br>
7782
+ >*language code* <br>
7783
+ >example: en_US <br>
7784
+ >
7785
+ ></details>
7786
+
7787
+ This method searches for a product status object based on its identifier (id) from the API. It returns a Promise that resolves to a product status object.
6108
7788
 
6109
7789
  Example return:
6110
7790
 
@@ -6141,13 +7821,26 @@ Example return:
6141
7821
  >
6142
7822
  ></details>
6143
7823
 
6144
- ### ProductStatuses.getProductsByStatusMarker(marker)
7824
+ ### ProductStatuses.getProductsByStatusMarker(marker, langCode)
6145
7825
 
6146
7826
  ```js
6147
7827
  const value = await ProductStatuses.getProductsByStatusMarker('my-marker')
6148
7828
  ```
6149
7829
 
6150
- > This method searches for a product status object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a product status object.
7830
+ ><details>
7831
+ ><summary>Schema</summary>
7832
+ >
7833
+ >**marker*:** string <br>
7834
+ >*Product marker* <br>
7835
+ >example: my-marker <br>
7836
+ >
7837
+ >**langCode:** string <br>
7838
+ >*language code* <br>
7839
+ >example: en_US <br>
7840
+ >
7841
+ ></details>
7842
+
7843
+ This method searches for a product status object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a product status object.
6151
7844
 
6152
7845
  Example return:
6153
7846
 
@@ -6190,7 +7883,16 @@ Example return:
6190
7883
  const value = await ProductStatuses.validateMarker('marker')
6191
7884
  ```
6192
7885
 
6193
- > This method checks the existence of a textual identifier (marker). It takes a marker parameter as input, representing the product marker to validate. It returns a Promise that resolves to true if the textual identifier (marker) exists or false if it doesn't.
7886
+ ><details>
7887
+ ><summary>Schema</summary>
7888
+ >
7889
+ >**marker*:** string <br>
7890
+ >*Product marker* <br>
7891
+ >example: marker <br>
7892
+ >
7893
+ ></details>
7894
+
7895
+ This method checks the existence of a textual identifier (marker). It takes a marker parameter as input, representing the product marker to validate. It returns a Promise that resolves to true if the textual identifier (marker) exists or false if it doesn't.
6194
7896
 
6195
7897
  Example return:
6196
7898
 
@@ -6200,10 +7902,8 @@ true
6200
7902
 
6201
7903
  ---
6202
7904
 
6203
-
6204
7905
  ## <h2 id="system"> System </h2>
6205
7906
 
6206
-
6207
7907
  ```js
6208
7908
  const { System } = defineOneEntry('your-url');
6209
7909
  ```
@@ -6224,10 +7924,10 @@ const value = await System.test500()
6224
7924
 
6225
7925
  > This method allows you to redirect to the error page.
6226
7926
 
7927
+ ---
6227
7928
 
6228
7929
  ## <h2 id="templates"> Templates </h2>
6229
7930
 
6230
-
6231
7931
  ```js
6232
7932
  const { Templates } = defineOneEntry('your-url');
6233
7933
  ```
@@ -6238,7 +7938,16 @@ const { Templates } = defineOneEntry('your-url');
6238
7938
  const value = await Templates.getAllTemplates()
6239
7939
  ```
6240
7940
 
6241
- > This method retrieves all template objects grouped by types from the API. It returns a Promise that resolves to an object GroupedTemplatesObject, which contains an array of template objects.
7941
+ ><details>
7942
+ ><summary>Schema</summary>
7943
+ >
7944
+ >**langCode:** string <br>
7945
+ >*Optional parameter language code* <br>
7946
+ >example: <br>
7947
+ >
7948
+ ></details>
7949
+
7950
+ This method retrieves all template objects grouped by types from the API. It returns a Promise that resolves to an object GroupedTemplatesObject, which contains an array of template objects.
6242
7951
 
6243
7952
  Example return:
6244
7953
 
@@ -6279,24 +7988,24 @@ Example return:
6279
7988
  ><details>
6280
7989
  ><summary>Schema</summary>
6281
7990
  >
6282
- >**id:** number <br>
7991
+ >**id:** number <br>
6283
7992
  >*object identifier* <br>
6284
7993
  >example: 1764 <br>
6285
7994
  >
6286
7995
  >
6287
- >**version** number <br>
7996
+ >**version** number <br>
6288
7997
  >*object's version number of modification* <br>
6289
7998
  >example: 10 <br>
6290
7999
  >
6291
- >**identifier:** string <br>
8000
+ >**identifier:** string <br>
6292
8001
  >*textual identifier for a field in the record* <br>
6293
8002
  >example: catalog <br>
6294
8003
  >
6295
- >**generalTypeId:** number <br>
8004
+ >**generalTypeId:** number <br>
6296
8005
  >*type identifier* <br>
6297
8006
  >example: 4 <br>
6298
8007
  >
6299
- >**title:** string<br>
8008
+ >**title:** string<br>
6300
8009
  >*template name* <br>
6301
8010
  >example: page template <br>
6302
8011
  >
@@ -6304,7 +8013,7 @@ Example return:
6304
8013
  >*position number* <br>
6305
8014
  >example: 0 <br>
6306
8015
  >
6307
- >**generalTypeName** string <br>
8016
+ >**generalTypeName** string <br>
6308
8017
  >*example: forProductPreview* <br>
6309
8018
  >general type name <br>
6310
8019
  >
@@ -6316,7 +8025,20 @@ Example return:
6316
8025
  const value = await Templates.getTemplateByType('forCatalogProducts')
6317
8026
  ```
6318
8027
 
6319
- > This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a template object.
8028
+ ><details>
8029
+ ><summary>Schema</summary>
8030
+ >
8031
+ >**type*:** Types <br>
8032
+ >*Product marker* <br>
8033
+ >example: forCatalogProducts <br>
8034
+ >
8035
+ >**langCode:** string <br>
8036
+ >*Optional parameter language code* <br>
8037
+ >example: en_US <br>
8038
+ >
8039
+ ></details>
8040
+
8041
+ This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a template object.
6320
8042
 
6321
8043
  Example return:
6322
8044
 
@@ -6353,25 +8075,23 @@ Example return:
6353
8075
  ><details>
6354
8076
  ><summary >Schema</summary>
6355
8077
  >
6356
- >
6357
- >**id:** number <br>
8078
+ >**id:** number <br>
6358
8079
  >*object identifier* <br>
6359
8080
  >example: 1764 <br>
6360
8081
  >
6361
- >
6362
- >**version** number <br>
8082
+ >**version** number <br>
6363
8083
  >*object's version number of modification* <br>
6364
8084
  >example: 10 <br>
6365
8085
  >
6366
- >**identifier:** string <br>
8086
+ >**identifier:** string <br>
6367
8087
  >*textual identifier for a field in the record* <br>
6368
8088
  >example: catalog <br>
6369
8089
  >
6370
- >**generalTypeId:** number <br>
8090
+ >**generalTypeId:** number <br>
6371
8091
  >*type identifier* <br>
6372
8092
  >example: 4 <br>
6373
8093
  >
6374
- >**title:** string<br>
8094
+ >**title:** string<br>
6375
8095
  >*template name* <br>
6376
8096
  >example: page template <br>
6377
8097
  >
@@ -6385,14 +8105,26 @@ Example return:
6385
8105
  >
6386
8106
  ></details>
6387
8107
 
6388
-
6389
8108
  ### Templates.getTemplateById(id, langCode)
6390
8109
 
6391
8110
  ```js
6392
8111
  const value = await Templates.getTemplateById(1)
6393
8112
  ```
6394
8113
 
6395
- > This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a template object.
8114
+ ><details>
8115
+ ><summary>Schema</summary>
8116
+ >
8117
+ >**id*:** number <br>
8118
+ >*Template id* <br>
8119
+ >example: 1 <br>
8120
+ >
8121
+ >**langCode:** string <br>
8122
+ >*Optional parameter language code* <br>
8123
+ >example: en_US <br>
8124
+ >
8125
+ ></details>
8126
+
8127
+ This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a template object.
6396
8128
 
6397
8129
  Example return:
6398
8130
 
@@ -6427,23 +8159,23 @@ Example return:
6427
8159
  ><details>
6428
8160
  ><summary >Schema</summary>
6429
8161
  >
6430
- >**id:** number <br>
8162
+ >**id:** number <br>
6431
8163
  >*object identifier* <br>
6432
8164
  >example: 1764 <br>
6433
8165
  >
6434
- >**version** number <br>
8166
+ >**version** number <br>
6435
8167
  >*object's version number of modification* <br>
6436
8168
  >example: 10 <br>
6437
8169
  >
6438
- >**identifier:** string <br>
8170
+ >**identifier:** string <br>
6439
8171
  >*textual identifier for a field in the record* <br>
6440
8172
  >example: catalog <br>
6441
8173
  >
6442
- >**generalTypeId:** number <br>
8174
+ >**generalTypeId:** number <br>
6443
8175
  >*type identifier* <br>
6444
8176
  >example: 4 <br>
6445
8177
  >
6446
- >**title:** string<br>
8178
+ >**title:** string<br>
6447
8179
  >*template name* <br>
6448
8180
  >example: page template <br>
6449
8181
  >
@@ -6452,20 +8184,32 @@ Example return:
6452
8184
  >example: 0 <br>
6453
8185
  >
6454
8186
  >
6455
- >**generalTypeName** string <br>
8187
+ >**generalTypeName** string <br>
6456
8188
  >*example: forProductPreview* <br>
6457
8189
  >general type name <br>
6458
8190
  >
6459
8191
  ></details>
6460
8192
 
6461
-
6462
8193
  ### Templates.getTemplateByMarker(marker, langCode)
6463
8194
 
6464
8195
  ```js
6465
8196
  const value = await Templates.getTemplateByMarker('my-marker')
6466
8197
  ```
6467
8198
 
6468
- > This method retrieves a single template object based on its identifier (marker) from the API. It returns a Promise that resolves to a template object.
8199
+ ><details>
8200
+ ><summary>Schema</summary>
8201
+ >
8202
+ >**marker*:** number <br>
8203
+ >*Template marker* <br>
8204
+ >example: my-marker <br>
8205
+ >
8206
+ >**langCode:** string <br>
8207
+ >*Optional parameter language code* <br>
8208
+ >example: en_US <br>
8209
+ >
8210
+ ></details>
8211
+
8212
+ This method retrieves a single template object based on its identifier (marker) from the API. It returns a Promise that resolves to a template object.
6469
8213
 
6470
8214
  Example return:
6471
8215
 
@@ -6500,23 +8244,23 @@ Example return:
6500
8244
  ><details>
6501
8245
  ><summary >Schema</summary>
6502
8246
  >
6503
- >**id:** number <br>
8247
+ >**id:** number <br>
6504
8248
  >*object identifier* <br>
6505
8249
  >example: 1764 <br>
6506
8250
  >
6507
- >**version** number <br>
8251
+ >**version** number <br>
6508
8252
  >*object's version number of modification* <br>
6509
8253
  >example: 10 <br>
6510
8254
  >
6511
- >**identifier:** string <br>
8255
+ >**identifier:** string <br>
6512
8256
  >*textual identifier for a field in the record* <br>
6513
8257
  >example: catalog <br>
6514
8258
  >
6515
- >**generalTypeId:** number <br>
8259
+ >**generalTypeId:** number <br>
6516
8260
  >*type identifier* <br>
6517
8261
  >example: 4 <br>
6518
8262
  >
6519
- >**title:** string<br>
8263
+ >**title:** string<br>
6520
8264
  >*template name* <br>
6521
8265
  >example: page template <br>
6522
8266
  >
@@ -6524,20 +8268,16 @@ Example return:
6524
8268
  >*position number* <br>
6525
8269
  >example: 0 <br>
6526
8270
  >
6527
- >
6528
- >**generalTypeName** string <br>
8271
+ >**generalTypeName** string <br>
6529
8272
  >*example: forProductPreview* <br>
6530
8273
  >general type name <br>
6531
8274
  >
6532
8275
  ></details>
6533
8276
 
6534
-
6535
8277
  ---
6536
8278
 
6537
-
6538
8279
  ## <h2 id="templatepreviews"> TemplatePreviews </h2>
6539
8280
 
6540
-
6541
8281
  ```js
6542
8282
  const { TemplatePreviews } = defineOneEntry('your-url');
6543
8283
  ```
@@ -6548,7 +8288,16 @@ const { TemplatePreviews } = defineOneEntry('your-url');
6548
8288
  const value = await TemplatePreviews.getTemplatePreviews()
6549
8289
  ```
6550
8290
 
6551
- > This method retrieves all template objects from the API. It returns a Promise that resolves to an array of TemplatePreviewsEntity template objects.
8291
+ ><details>
8292
+ ><summary>Schema</summary>
8293
+ >
8294
+ >**langCode:** string <br>
8295
+ >*Optional parameter language code* <br>
8296
+ >example: en_US <br>
8297
+ >
8298
+ ></details>
8299
+
8300
+ This method retrieves all template objects from the API. It returns a Promise that resolves to an array of TemplatePreviewsEntity template objects.
6552
8301
 
6553
8302
  Example return:
6554
8303
 
@@ -6635,14 +8384,26 @@ Example return:
6635
8384
  >
6636
8385
  ></details>
6637
8386
 
6638
-
6639
8387
  ### TemplatePreviews.getTemplatesPreviewById(id, langCode)
6640
8388
 
6641
8389
  ```js
6642
8390
  const value = await TemplatePreviews.getTemplatePreviewById(1764)
6643
8391
  ```
6644
8392
 
6645
- > This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a TemplatePreviewsEntity object.
8393
+ ><details>
8394
+ ><summary>Schema</summary>
8395
+ >
8396
+ >**id*:** number <br>
8397
+ >*Product marker* <br>
8398
+ >example: 1764 <br>
8399
+ >
8400
+ >**langCode:** string <br>
8401
+ >*Optional parameter language code* <br>
8402
+ >example: en_US <br>
8403
+ >
8404
+ ></details>
8405
+
8406
+ This method retrieves a single template object based on its identifier (id) from the API. It returns a Promise that resolves to a TemplatePreviewsEntity object.
6646
8407
 
6647
8408
  Example return:
6648
8409
 
@@ -6727,14 +8488,26 @@ Example return:
6727
8488
  >
6728
8489
  ></details>
6729
8490
 
6730
-
6731
8491
  ### TemplatePreviews.getTemplatesPreviewByMarker(marker, langCode)
6732
8492
 
6733
8493
  ```js
6734
8494
  const value = await TemplatePreviews.getTemplatePreviewByMarker('my-marker')
6735
8495
  ```
6736
8496
 
6737
- > This method retrieves a single template object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a TemplatePreviewsEntity object.
8497
+ ><details>
8498
+ ><summary>Schema</summary>
8499
+ >
8500
+ >**marker*:** string <br>
8501
+ >*Product marker* <br>
8502
+ >example: my-marker <br>
8503
+ >
8504
+ >**langCode:** string <br>
8505
+ >*Optional parameter language code* <br>
8506
+ >example: en_US <br>
8507
+ >
8508
+ ></details>
8509
+
8510
+ This method retrieves a single template object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a TemplatePreviewsEntity object.
6738
8511
 
6739
8512
  Example return:
6740
8513
 
@@ -6819,7 +8592,6 @@ Example return:
6819
8592
 
6820
8593
  ---
6821
8594
 
6822
-
6823
8595
  ## <h2 id="users"> Users </h2>
6824
8596
 
6825
8597
  You can store the data necessary for your application to work in a state object. When changing the user, add the necessary data to the state. When the user's data is subsequently received, it will contain a state object.
@@ -6863,8 +8635,6 @@ const value = await Users.getUser()
6863
8635
  console.log(value.state.orderCount) // 1
6864
8636
  ```
6865
8637
 
6866
-
6867
-
6868
8638
  ```js
6869
8639
  const { Users } = defineOneEntry('your-url');
6870
8640
  ```
@@ -6875,7 +8645,16 @@ const { Users } = defineOneEntry('your-url');
6875
8645
  const value = await Users.getUser()
6876
8646
  ```
6877
8647
 
6878
- > This method sends a request to get the data of an authorized user. Returns the authorized user's data object.
8648
+ ><details>
8649
+ ><summary>Schema</summary>
8650
+ >
8651
+ >**langCode:** string <br>
8652
+ >*lang code* <br>
8653
+ >example: en_US <br>
8654
+ >
8655
+ ></details>
8656
+
8657
+ This method sends a request to get the data of an authorized user. Returns the authorized user's data object.
6879
8658
 
6880
8659
  Example return:
6881
8660
 
@@ -6897,19 +8676,19 @@ Example return:
6897
8676
  ><details>
6898
8677
  ><summary>Schema</summary>
6899
8678
  >
6900
- >**id:** number <br>
8679
+ >**id:** number <br>
6901
8680
  >*object identifier* <br>
6902
8681
  >example: 1764 <br>
6903
8682
  >
6904
- >**identifier:** string <br>
8683
+ >**identifier:** string <br>
6905
8684
  >*textual identifier for a field in the record* <br>
6906
8685
  >example: catalog <br>
6907
8686
  >
6908
- >**formIdentifier** string <br>
8687
+ >**formIdentifier** string <br>
6909
8688
  >*the text identifier of the form linked to the authorization provider* <br>
6910
8689
  >example: , regForm <br>
6911
8690
  >
6912
- >**authProviderIdentifier:** string <br>
8691
+ >**authProviderIdentifier:** string <br>
6913
8692
  >*the text ID of the authorization provider* <br>
6914
8693
  >example: email <br>
6915
8694
  >
@@ -6919,46 +8698,60 @@ Example return:
6919
8698
  >
6920
8699
  ></details>
6921
8700
 
6922
-
6923
- ### Users.updateUser(langCode)
8701
+ ### Users.updateUser(body, langCode)
6924
8702
 
6925
8703
  ```js
6926
- const data = {
6927
- "formIdentifier": "reg",
6928
- "authData": [
6929
- {
6930
- "marker": "password",
6931
- "value": "12345"
6932
- }
6933
- ],
6934
- "formData": [
6935
- {
6936
- "marker": "last_name",
6937
- "type": "string",
6938
- "value": "Username"
6939
- }
6940
- ],
6941
- "notificationData": {
6942
- "email": "example@oneentry.cloud",
6943
- "phonePush": ["+99999999999"],
6944
- "phoneSMS": "+99999999999"
6945
- },
6946
- "state": {
6947
- "orderCount": 1
8704
+ const body = {
8705
+ "formIdentifier": "reg",
8706
+ "authData": [
8707
+ {
8708
+ "marker": "password",
8709
+ "value": "12345"
8710
+ }
8711
+ ],
8712
+ "formData": [
8713
+ {
8714
+ "marker": "last_name",
8715
+ "type": "string",
8716
+ "value": "Username"
6948
8717
  }
8718
+ ],
8719
+ "notificationData": {
8720
+ "email": "example@oneentry.cloud",
8721
+ "phonePush": ["+99999999999"],
8722
+ "phoneSMS": "+99999999999"
8723
+ },
8724
+ "state": {
8725
+ "orderCount": 1
8726
+ }
6949
8727
  }
6950
8728
 
6951
- const value = await Users.updateUser(data, langCode)
8729
+ const value = await Users.updateUser(body)
6952
8730
  ```
6953
8731
 
6954
8732
  ><details>
6955
- ><summary >Schema</summary>
8733
+ ><summary>Schema</summary>
6956
8734
  >
6957
- >**formIdentifier** string <br>
8735
+ >**body*:** object <br>
8736
+ >*Request body* <br>
8737
+ >example: {} <br>
8738
+ >
8739
+ >**langCode:** string <br>
8740
+ >*Optional language field* <br>
8741
+ >example: en_US <br>
8742
+ >
8743
+ ></details>
8744
+
8745
+ <br>
8746
+
8747
+ ><details>
8748
+ ><summary >Schema (body)</summary>
8749
+ >
8750
+ >**formIdentifier** string <br>
6958
8751
  >*the text identifier of the form linked to the authorization provider* <br>
6959
8752
  >example: , regForm <br>
6960
8753
  >
6961
- >**formData:** FormDataLangType <br>
8754
+ >**formData:** FormDataLangType <br>
6962
8755
  >*the data of the form linked to the authorization provider* <br>
6963
8756
  >example: OrderedMap { "en_US": List [ OrderedMap { "marker": "first-name", "value": "First name" }, OrderedMap { "marker": "last-name", "value": "Second name" } ] } <br>
6964
8757
  >
@@ -6968,11 +8761,11 @@ const value = await Users.updateUser(data, langCode)
6968
8761
  >
6969
8762
  >**notificationData** UserNotificationDataType <br>
6970
8763
  >*Data for notifying the user* <br>
6971
- >example: OrderedMap { "email": "example@oneentry.cloud", "phonePush": "", "phoneSMS": "+9999999999" } <br>
8764
+ >example: OrderedMap { "email": "<example@oneentry.cloud>", "phonePush": "", "phoneSMS": "+9999999999" } <br>
6972
8765
  >
6973
8766
  ></details>
6974
8767
 
6975
- > This method updates the authorized user's data object. Returns true (in case of successful update) or false (in case of unsuccessful update).
8768
+ This method updates the authorized user's data object. Returns true (in case of successful update) or false (in case of unsuccessful update).
6976
8769
 
6977
8770
  Example return:
6978
8771
 
@@ -6980,6 +8773,24 @@ Example return:
6980
8773
  true
6981
8774
  ```
6982
8775
 
8776
+ ### Users.deleteUser(body, langCode)
8777
+
8778
+ ```js
8779
+ const value = await Users.deleteUser(body)
8780
+ ```
8781
+
8782
+ ><details>
8783
+ ><summary>Schema</summary>
8784
+ >
8785
+ >**body*:** object <br>
8786
+ >*Request body* <br>
8787
+ >example: [] <br>
8788
+ >
8789
+ >**langCode:** string <br>
8790
+ >*Optional language field* <br>
8791
+ >example: en_US <br>
8792
+ >
8793
+ ></details>
6983
8794
 
6984
8795
  ### Users.addFCMToken(token)
6985
8796
 
@@ -6987,7 +8798,16 @@ true
6987
8798
  const value = await Users.addFCMToken('my-token')
6988
8799
  ```
6989
8800
 
6990
- > This method adds FCM token for sending Push notifications. Return true in case of successful token update.
8801
+ ><details>
8802
+ ><summary>Schema</summary>
8803
+ >
8804
+ >**token*:** string <br>
8805
+ >*Cloud messaging token* <br>
8806
+ >example: xxxx-xxxxx-xxxxx <br>
8807
+ >
8808
+ ></details>
8809
+
8810
+ This method adds FCM token for sending Push notifications. Return true in case of successful token update.
6991
8811
 
6992
8812
  Example return:
6993
8813
 
@@ -7001,7 +8821,16 @@ true
7001
8821
  const value = await Users.deleteFCMToken('my-token')
7002
8822
  ```
7003
8823
 
7004
- > This method delete FCM token for sending Push notifications. Return true in case of successful token deletion.
8824
+ ><details>
8825
+ ><summary>Schema</summary>
8826
+ >
8827
+ >**token*:** string <br>
8828
+ >*Cloud messaging token* <br>
8829
+ >example: xxxx-xxxxx-xxxxx <br>
8830
+ >
8831
+ ></details>
8832
+
8833
+ This method delete FCM token for sending Push notifications. Return true in case of successful token deletion.
7005
8834
 
7006
8835
  Example return:
7007
8836
 
@@ -7009,6 +8838,7 @@ Example return:
7009
8838
  true
7010
8839
  ```
7011
8840
 
8841
+ ---
7012
8842
 
7013
8843
  ## <h2 id="ws"> WebSocket </h2>
7014
8844
 
@@ -7034,7 +8864,7 @@ The "attributes" field always contains event attributes (the "events" field), an
7034
8864
 
7035
8865
  The attribute value is stored in the format *key - marker*, *value - {type, identifier, value}*.
7036
8866
 
7037
- Example:
8867
+ Example:
7038
8868
 
7039
8869
  ```json
7040
8870
  {
@@ -7049,22 +8879,19 @@ Example:
7049
8879
  }
7050
8880
  ```
7051
8881
 
7052
-
7053
-
7054
8882
  ><details>
7055
8883
  ><summary >Schema</summary>
7056
8884
  >
7057
- >**message** string <br>
8885
+ >**message** string <br>
7058
8886
  >*Text message* <br>
7059
8887
  >example: Message <br>
7060
8888
  >
7061
- >**attributes:** Record<string, any> <br>
8889
+ >**attributes:** Record<string, any> <br>
7062
8890
  >*Сontains event attributes* <br>
7063
- >example: { { "company": { "identifier": "company", "type": "string", "value": "OneEntry" } }<br>
8891
+ >example: { { "company": { "identifier": "company", "type": "string", "value": "OneEntry" } }}<br>
7064
8892
  >
7065
8893
  ></details>
7066
8894
 
7067
-
7068
8895
  Product Example:
7069
8896
 
7070
8897
  ```json
@@ -7091,44 +8918,43 @@ Product Example:
7091
8918
  }
7092
8919
  ```
7093
8920
 
7094
-
7095
8921
  User Example:
7096
8922
 
7097
8923
  ```json
7098
8924
  {
7099
8925
  "user": {
7100
- "notificationData": {...},
7101
- "attributes": {...}
8926
+ "notificationData": {},
8927
+ "attributes": {}
7102
8928
  },
7103
8929
  "order": {
7104
8930
  "id": 1,
7105
- "attributes": {...}
8931
+ "attributes": {}
7106
8932
  }
7107
8933
  }
7108
8934
  ```
7109
8935
 
7110
-
7111
8936
  Order Example:
7112
8937
 
7113
8938
  ```json
7114
8939
  {
7115
8940
  "user": {
7116
- "notificationData": {...},
7117
- "attributes": {...}
8941
+ "notificationData": {},
8942
+ "attributes": {}
7118
8943
  },
7119
8944
  "order": {
7120
8945
  "id": 1,
7121
- "attributes": {...}
8946
+ "attributes": {}
7122
8947
  }
7123
8948
  }
7124
8949
  ```
7125
8950
 
7126
-
7127
8951
  Form Example:
7128
8952
 
7129
8953
  ```json
7130
8954
  {
7131
8955
  "email": "string",
7132
- "formData": {...}
8956
+ "formData": {}
7133
8957
  }
7134
8958
  ```
8959
+
8960
+ ---