oneentry 1.0.9 → 1.0.12

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 (223) hide show
  1. package/README.md +103 -256
  2. package/dist/_cjs/admins/adminsApi.d.ts +14 -0
  3. package/dist/_cjs/admins/adminsApi.js +34 -0
  4. package/dist/_cjs/admins/adminsApi.js.map +1 -0
  5. package/dist/_cjs/admins/adminsInterfaces.d.ts +32 -0
  6. package/dist/_cjs/admins/adminsInterfaces.js +3 -0
  7. package/dist/_cjs/admins/adminsInterfaces.js.map +1 -0
  8. package/dist/_cjs/attribute-set/attributeSetApi.d.ts +24 -0
  9. package/dist/_cjs/attribute-set/attributeSetApi.js +49 -0
  10. package/dist/_cjs/attribute-set/attributeSetApi.js.map +1 -0
  11. package/dist/_cjs/attribute-set/attributeSetInterfaces.d.ts +23 -0
  12. package/dist/_cjs/attribute-set/attributeSetInterfaces.js +3 -0
  13. package/dist/_cjs/attribute-set/attributeSetInterfaces.js.map +1 -0
  14. package/dist/_cjs/base/oneEntry.d.ts +9 -0
  15. package/dist/_cjs/base/oneEntry.js +55 -0
  16. package/dist/_cjs/base/oneEntry.js.map +1 -0
  17. package/dist/_cjs/base/utils.d.ts +32 -0
  18. package/dist/_cjs/base/utils.js +32 -0
  19. package/dist/_cjs/base/utils.js.map +1 -0
  20. package/dist/_cjs/forms/formsApi.d.ts +26 -0
  21. package/dist/_cjs/forms/formsApi.js +56 -0
  22. package/dist/_cjs/forms/formsApi.js.map +1 -0
  23. package/dist/_cjs/forms/formsInterfaces.d.ts +28 -0
  24. package/dist/_cjs/forms/formsInterfaces.js +3 -0
  25. package/dist/_cjs/forms/formsInterfaces.js.map +1 -0
  26. package/dist/_cjs/formsData/formsDataApi.d.ts +41 -0
  27. package/dist/_cjs/formsData/formsDataApi.js +71 -0
  28. package/dist/_cjs/formsData/formsDataApi.js.map +1 -0
  29. package/dist/_cjs/formsData/formsDataInterfaces.d.ts +25 -0
  30. package/dist/_cjs/formsData/formsDataInterfaces.js +3 -0
  31. package/dist/_cjs/formsData/formsDataInterfaces.js.map +1 -0
  32. package/dist/_cjs/general-types/generalTypesApi.d.ts +14 -0
  33. package/dist/_cjs/general-types/generalTypesApi.js +34 -0
  34. package/dist/_cjs/general-types/generalTypesApi.js.map +1 -0
  35. package/dist/_cjs/general-types/generalTypesInterfaces.d.ts +9 -0
  36. package/dist/_cjs/general-types/generalTypesInterfaces.js +3 -0
  37. package/dist/_cjs/general-types/generalTypesInterfaces.js.map +1 -0
  38. package/dist/_cjs/index.d.ts +35 -0
  39. package/dist/_cjs/index.js +55 -0
  40. package/dist/_cjs/index.js.map +1 -0
  41. package/dist/_cjs/locales/localesApi.d.ts +14 -0
  42. package/dist/_cjs/locales/localesApi.js +34 -0
  43. package/dist/_cjs/locales/localesApi.js.map +1 -0
  44. package/dist/_cjs/locales/localesInterfaces.d.ts +15 -0
  45. package/dist/_cjs/locales/localesInterfaces.js +3 -0
  46. package/dist/_cjs/locales/localesInterfaces.js.map +1 -0
  47. package/dist/_cjs/markers/markersApi.d.ts +35 -0
  48. package/dist/_cjs/markers/markersApi.js +65 -0
  49. package/dist/_cjs/markers/markersApi.js.map +1 -0
  50. package/dist/_cjs/markers/markersInterfaces.d.ts +16 -0
  51. package/dist/_cjs/markers/markersInterfaces.js +3 -0
  52. package/dist/_cjs/markers/markersInterfaces.js.map +1 -0
  53. package/dist/_cjs/menus/menusApi.d.ts +16 -0
  54. package/dist/_cjs/menus/menusApi.js +36 -0
  55. package/dist/_cjs/menus/menusApi.js.map +1 -0
  56. package/dist/_cjs/menus/menusInterfaces.d.ts +18 -0
  57. package/dist/_cjs/menus/menusInterfaces.js +3 -0
  58. package/dist/_cjs/menus/menusInterfaces.js.map +1 -0
  59. package/dist/_cjs/modules/modulesApi.d.ts +14 -0
  60. package/dist/_cjs/modules/modulesApi.js +34 -0
  61. package/dist/_cjs/modules/modulesApi.js.map +1 -0
  62. package/dist/_cjs/modules/modulesInterfaces.d.ts +19 -0
  63. package/dist/_cjs/modules/modulesInterfaces.js +3 -0
  64. package/dist/_cjs/modules/modulesInterfaces.js.map +1 -0
  65. package/dist/_cjs/pages/pagesApi.d.ts +74 -0
  66. package/dist/_cjs/pages/pagesApi.js +137 -0
  67. package/dist/_cjs/pages/pagesApi.js.map +1 -0
  68. package/dist/_cjs/pages/pagesInterfaces.d.ts +39 -0
  69. package/dist/_cjs/pages/pagesInterfaces.js +3 -0
  70. package/dist/_cjs/pages/pagesInterfaces.js.map +1 -0
  71. package/dist/_cjs/product-statuses/productStatusesApi.d.ts +38 -0
  72. package/dist/_cjs/product-statuses/productStatusesApi.js +73 -0
  73. package/dist/_cjs/product-statuses/productStatusesApi.js.map +1 -0
  74. package/dist/_cjs/product-statuses/productStatusesInterfaces.d.ts +15 -0
  75. package/dist/_cjs/product-statuses/productStatusesInterfaces.js +3 -0
  76. package/dist/_cjs/product-statuses/productStatusesInterfaces.js.map +1 -0
  77. package/dist/_cjs/products/productsApi.d.ts +195 -0
  78. package/dist/_cjs/products/productsApi.js +295 -0
  79. package/dist/_cjs/products/productsApi.js.map +1 -0
  80. package/dist/_cjs/products/productsInterfaces.d.ts +83 -0
  81. package/dist/_cjs/products/productsInterfaces.js +3 -0
  82. package/dist/_cjs/products/productsInterfaces.js.map +1 -0
  83. package/dist/_cjs/templates/templatesApi.d.ts +32 -0
  84. package/dist/_cjs/templates/templatesApi.js +72 -0
  85. package/dist/_cjs/templates/templatesApi.js.map +1 -0
  86. package/dist/_cjs/templates/templatesInterfaces.d.ts +30 -0
  87. package/dist/_cjs/templates/templatesInterfaces.js +3 -0
  88. package/dist/_cjs/templates/templatesInterfaces.js.map +1 -0
  89. package/dist/_cjs/templates-preview/templatesPreviewApi.d.ts +30 -0
  90. package/dist/_cjs/templates-preview/templatesPreviewApi.js +60 -0
  91. package/dist/_cjs/templates-preview/templatesPreviewApi.js.map +1 -0
  92. package/dist/_cjs/templates-preview/templatesPreviewInterfaces.d.ts +27 -0
  93. package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js +3 -0
  94. package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js.map +1 -0
  95. package/dist/_esm/admins/adminsApi.d.ts +14 -0
  96. package/dist/_esm/admins/adminsApi.js +31 -0
  97. package/dist/_esm/admins/adminsApi.js.map +1 -0
  98. package/dist/_esm/admins/adminsInterfaces.d.ts +32 -0
  99. package/dist/_esm/admins/adminsInterfaces.js +2 -0
  100. package/dist/_esm/admins/adminsInterfaces.js.map +1 -0
  101. package/dist/_esm/attribute-set/attributeSetApi.d.ts +24 -0
  102. package/dist/_esm/attribute-set/attributeSetApi.js +46 -0
  103. package/dist/_esm/attribute-set/attributeSetApi.js.map +1 -0
  104. package/dist/_esm/attribute-set/attributeSetInterfaces.d.ts +23 -0
  105. package/dist/_esm/attribute-set/attributeSetInterfaces.js +2 -0
  106. package/dist/_esm/attribute-set/attributeSetInterfaces.js.map +1 -0
  107. package/dist/_esm/base/oneEntry.d.ts +9 -0
  108. package/dist/_esm/base/oneEntry.js +52 -0
  109. package/dist/_esm/base/oneEntry.js.map +1 -0
  110. package/dist/_esm/base/utils.d.ts +32 -0
  111. package/dist/_esm/base/utils.js +30 -0
  112. package/dist/_esm/base/utils.js.map +1 -0
  113. package/dist/_esm/forms/formsApi.d.ts +26 -0
  114. package/dist/_esm/forms/formsApi.js +53 -0
  115. package/dist/_esm/forms/formsApi.js.map +1 -0
  116. package/dist/_esm/forms/formsInterfaces.d.ts +28 -0
  117. package/dist/_esm/forms/formsInterfaces.js +2 -0
  118. package/dist/_esm/forms/formsInterfaces.js.map +1 -0
  119. package/dist/_esm/formsData/formsDataApi.d.ts +41 -0
  120. package/dist/_esm/formsData/formsDataApi.js +68 -0
  121. package/dist/_esm/formsData/formsDataApi.js.map +1 -0
  122. package/dist/_esm/formsData/formsDataInterfaces.d.ts +25 -0
  123. package/dist/_esm/formsData/formsDataInterfaces.js +2 -0
  124. package/dist/_esm/formsData/formsDataInterfaces.js.map +1 -0
  125. package/dist/_esm/general-types/generalTypesApi.d.ts +14 -0
  126. package/dist/_esm/general-types/generalTypesApi.js +31 -0
  127. package/dist/_esm/general-types/generalTypesApi.js.map +1 -0
  128. package/dist/_esm/general-types/generalTypesInterfaces.d.ts +9 -0
  129. package/dist/_esm/general-types/generalTypesInterfaces.js +2 -0
  130. package/dist/_esm/general-types/generalTypesInterfaces.js.map +1 -0
  131. package/dist/_esm/index.d.ts +35 -0
  132. package/dist/_esm/index.js +51 -0
  133. package/dist/_esm/index.js.map +1 -0
  134. package/dist/_esm/locales/localesApi.d.ts +14 -0
  135. package/dist/_esm/locales/localesApi.js +31 -0
  136. package/dist/_esm/locales/localesApi.js.map +1 -0
  137. package/dist/_esm/locales/localesInterfaces.d.ts +15 -0
  138. package/dist/_esm/locales/localesInterfaces.js +2 -0
  139. package/dist/_esm/locales/localesInterfaces.js.map +1 -0
  140. package/dist/_esm/markers/markersApi.d.ts +35 -0
  141. package/dist/_esm/markers/markersApi.js +62 -0
  142. package/dist/_esm/markers/markersApi.js.map +1 -0
  143. package/dist/_esm/markers/markersInterfaces.d.ts +16 -0
  144. package/dist/_esm/markers/markersInterfaces.js +2 -0
  145. package/dist/_esm/markers/markersInterfaces.js.map +1 -0
  146. package/dist/_esm/menus/menusApi.d.ts +16 -0
  147. package/dist/_esm/menus/menusApi.js +33 -0
  148. package/dist/_esm/menus/menusApi.js.map +1 -0
  149. package/dist/_esm/menus/menusInterfaces.d.ts +18 -0
  150. package/dist/_esm/menus/menusInterfaces.js +2 -0
  151. package/dist/_esm/menus/menusInterfaces.js.map +1 -0
  152. package/dist/_esm/modules/modulesApi.d.ts +14 -0
  153. package/dist/_esm/modules/modulesApi.js +31 -0
  154. package/dist/_esm/modules/modulesApi.js.map +1 -0
  155. package/dist/_esm/modules/modulesInterfaces.d.ts +19 -0
  156. package/dist/_esm/modules/modulesInterfaces.js +2 -0
  157. package/dist/_esm/modules/modulesInterfaces.js.map +1 -0
  158. package/dist/_esm/pages/pagesApi.d.ts +74 -0
  159. package/dist/_esm/pages/pagesApi.js +134 -0
  160. package/dist/_esm/pages/pagesApi.js.map +1 -0
  161. package/dist/_esm/pages/pagesInterfaces.d.ts +39 -0
  162. package/dist/_esm/pages/pagesInterfaces.js +2 -0
  163. package/dist/_esm/pages/pagesInterfaces.js.map +1 -0
  164. package/dist/_esm/product-statuses/productStatusesApi.d.ts +38 -0
  165. package/dist/_esm/product-statuses/productStatusesApi.js +70 -0
  166. package/dist/_esm/product-statuses/productStatusesApi.js.map +1 -0
  167. package/dist/_esm/product-statuses/productStatusesInterfaces.d.ts +15 -0
  168. package/dist/_esm/product-statuses/productStatusesInterfaces.js +2 -0
  169. package/dist/_esm/product-statuses/productStatusesInterfaces.js.map +1 -0
  170. package/dist/_esm/products/productsApi.d.ts +195 -0
  171. package/dist/_esm/products/productsApi.js +292 -0
  172. package/dist/_esm/products/productsApi.js.map +1 -0
  173. package/dist/_esm/products/productsInterfaces.d.ts +83 -0
  174. package/dist/_esm/products/productsInterfaces.js +2 -0
  175. package/dist/_esm/products/productsInterfaces.js.map +1 -0
  176. package/dist/_esm/templates/templatesApi.d.ts +32 -0
  177. package/dist/_esm/templates/templatesApi.js +69 -0
  178. package/dist/_esm/templates/templatesApi.js.map +1 -0
  179. package/dist/_esm/templates/templatesInterfaces.d.ts +30 -0
  180. package/dist/_esm/templates/templatesInterfaces.js +2 -0
  181. package/dist/_esm/templates/templatesInterfaces.js.map +1 -0
  182. package/dist/_esm/templates-preview/templatesPreviewApi.d.ts +30 -0
  183. package/dist/_esm/templates-preview/templatesPreviewApi.js +57 -0
  184. package/dist/_esm/templates-preview/templatesPreviewApi.js.map +1 -0
  185. package/dist/_esm/templates-preview/templatesPreviewInterfaces.d.ts +27 -0
  186. package/dist/_esm/templates-preview/templatesPreviewInterfaces.js +2 -0
  187. package/dist/_esm/templates-preview/templatesPreviewInterfaces.js.map +1 -0
  188. package/dist/_types/admins/adminsApi.d.ts +14 -0
  189. package/dist/_types/admins/adminsInterfaces.d.ts +32 -0
  190. package/dist/_types/attribute-set/attributeSetApi.d.ts +24 -0
  191. package/dist/_types/attribute-set/attributeSetInterfaces.d.ts +23 -0
  192. package/dist/_types/base/oneEntry.d.ts +9 -0
  193. package/dist/_types/base/utils.d.ts +32 -0
  194. package/dist/_types/forms/formsApi.d.ts +26 -0
  195. package/dist/_types/forms/formsInterfaces.d.ts +28 -0
  196. package/dist/_types/formsData/formsDataApi.d.ts +41 -0
  197. package/dist/_types/formsData/formsDataInterfaces.d.ts +25 -0
  198. package/dist/_types/general-types/generalTypesApi.d.ts +14 -0
  199. package/dist/_types/general-types/generalTypesInterfaces.d.ts +9 -0
  200. package/dist/_types/index.d.ts +35 -0
  201. package/dist/_types/locales/localesApi.d.ts +14 -0
  202. package/dist/_types/locales/localesInterfaces.d.ts +15 -0
  203. package/dist/_types/markers/markersApi.d.ts +35 -0
  204. package/dist/_types/markers/markersInterfaces.d.ts +16 -0
  205. package/dist/_types/menus/menusApi.d.ts +16 -0
  206. package/dist/_types/menus/menusInterfaces.d.ts +18 -0
  207. package/dist/_types/modules/modulesApi.d.ts +14 -0
  208. package/dist/_types/modules/modulesInterfaces.d.ts +19 -0
  209. package/dist/_types/pages/pagesApi.d.ts +74 -0
  210. package/dist/_types/pages/pagesInterfaces.d.ts +39 -0
  211. package/dist/_types/product-statuses/productStatusesApi.d.ts +38 -0
  212. package/dist/_types/product-statuses/productStatusesInterfaces.d.ts +15 -0
  213. package/dist/_types/products/productsApi.d.ts +195 -0
  214. package/dist/_types/products/productsInterfaces.d.ts +83 -0
  215. package/dist/_types/templates/templatesApi.d.ts +32 -0
  216. package/dist/_types/templates/templatesInterfaces.d.ts +30 -0
  217. package/dist/_types/templates-preview/templatesPreviewApi.d.ts +30 -0
  218. package/dist/_types/templates-preview/templatesPreviewInterfaces.d.ts +27 -0
  219. package/dist/products/productsApi.d.ts +6 -4
  220. package/dist/products/productsApi.js +28 -8
  221. package/dist/products/productsApi.js.map +1 -1
  222. package/dist/products/productsInterfaces.d.ts +14 -3
  223. package/package.json +3 -2
package/README.md CHANGED
@@ -24,7 +24,6 @@ Page,
24
24
  ProductStatus,
25
25
  Templates,
26
26
  TemplatesPreview,
27
- Markers,
28
27
  AttributeSet,
29
28
  Admins,
30
29
  GeneralTypes,
@@ -84,8 +83,8 @@ Example return:
84
83
  "permissions": {
85
84
  "menu.create": true
86
85
  },
87
- "selectedLanguage": "ru_RU",
88
- "selectedContentLanguage": "ru_RU",
86
+ "selectedLanguage": "en_US",
87
+ "selectedContentLanguage": "en_US",
89
88
  "selectedUITheme": "DARK"
90
89
  }
91
90
  ]
@@ -114,8 +113,8 @@ Example return:
114
113
  "identifier": "catalog",
115
114
  "typeId": 1,
116
115
  "localizeInfos": {
117
- "ru_RU": {
118
- "title": "Набор для страниц"
116
+ "en_US": {
117
+ "title": "Set for pages"
119
118
  }
120
119
  },
121
120
  "schema": {
@@ -124,10 +123,10 @@ Example return:
124
123
  "type": "string",
125
124
  "isPrice": false,
126
125
  "original": true,
127
- "identifier": "stroka",
126
+ "identifier": "string",
128
127
  "localizeInfos": {
129
- "ru_RU": {
130
- "title": "Строка"
128
+ "en_US": {
129
+ "title": "String"
131
130
  }
132
131
  }
133
132
  }
@@ -160,8 +159,8 @@ Example return:
160
159
  "identifier": "catalog",
161
160
  "typeId": 1,
162
161
  "localizeInfos": {
163
- "ru_RU": {
164
- "title": "Набор для страниц"
162
+ "en_US": {
163
+ "title": "Set for pages"
165
164
  }
166
165
  },
167
166
  "schema": {
@@ -170,10 +169,10 @@ Example return:
170
169
  "type": "string",
171
170
  "isPrice": false,
172
171
  "original": true,
173
- "identifier": "stroka",
172
+ "identifier": "string",
174
173
  "localizeInfos": {
175
- "ru_RU": {
176
- "title": "Строка"
174
+ "en_US": {
175
+ "title": "String"
177
176
  }
178
177
  }
179
178
  }
@@ -215,8 +214,8 @@ Example return:
215
214
  "attributeSetId": 0,
216
215
  "processingType": "email",
217
216
  "localizeInfos": {
218
- "ru_RU": {
219
- "title": "Моя форма",
217
+ "en_US": {
218
+ "title": "My form",
220
219
  "titleForSite": "",
221
220
  "successMessage": "",
222
221
  "unsuccessMessage": "",
@@ -265,8 +264,8 @@ Example return:
265
264
  "attributeSetId": 0,
266
265
  "processingType": "email",
267
266
  "localizeInfos": {
268
- "ru_RU": {
269
- "title": "Моя форма",
267
+ "en_US": {
268
+ "title": "My form",
270
269
  "titleForSite": "",
271
270
  "successMessage": "",
272
271
  "unsuccessMessage": "",
@@ -316,8 +315,8 @@ Example return:
316
315
  "attributeSetId": 0,
317
316
  "processingType": "email",
318
317
  "localizeInfos": {
319
- "ru_RU": {
320
- "title": "Моя форма",
318
+ "en_US": {
319
+ "title": "My form",
321
320
  "titleForSite": "",
322
321
  "successMessage": "",
323
322
  "unsuccessMessage": "",
@@ -365,9 +364,9 @@ Example return:
365
364
  "time": "2023-02-12 10:56",
366
365
  "formData": [
367
366
  {
368
- "marker": "naimenovanie_1",
369
- "value": "Наименование",
370
- "langCode": "ru_RU"
367
+ "marker": "name_1",
368
+ "value": "Name",
369
+ "langCode": "en_US"
371
370
  }
372
371
  ]
373
372
  }
@@ -391,9 +390,9 @@ Example return:
391
390
  "time": "2023-02-12 10:56",
392
391
  "formData": [
393
392
  {
394
- "marker": "naimenovanie_1",
395
- "value": "Наименование",
396
- "langCode": "ru_RU"
393
+ "marker": "name_1",
394
+ "value": "Name",
395
+ "langCode": "en_US"
397
396
  }
398
397
  ]
399
398
  }
@@ -418,9 +417,9 @@ Example return:
418
417
  "time": "2023-02-12 10:56",
419
418
  "formData": [
420
419
  {
421
- "marker": "naimenovanie_1",
422
- "value": "Наименование",
423
- "langCode": "ru_RU"
420
+ "marker": "name_1",
421
+ "value": "Name",
422
+ "langCode": "en_US"
424
423
  }
425
424
  ]
426
425
  }
@@ -467,8 +466,8 @@ Example return:
467
466
  [
468
467
  {
469
468
  "id": 1764,
470
- "shortCode": "ru",
471
- "code": "ru_RU",
469
+ "shortCode": "en",
470
+ "code": "en_US",
472
471
  "name": "Bengali",
473
472
  "nativeName": "বাংলা",
474
473
  "isActive": false,
@@ -477,84 +476,7 @@ Example return:
477
476
  }
478
477
  ]
479
478
  ```
480
- ## MarkersApi
481
-
482
- ```
483
- const { Markers } = defineOneEntry('your-url')
484
- ```
485
-
486
- ### getMarker
487
-
488
- ```
489
- const value = await Markers.getMarker('marker')
490
- ```
491
-
492
- > This method retrieves a single marker object based on its marker identifier (marker) from the API. It returns a Promise that resolves to the marker object of type MarkerEntity.
493
-
494
- Example return:
495
- ```
496
- {
497
- "id": 17,
498
- "updatedDate": "2023-09-23T12:30:08.153Z",
499
- "version": 10,
500
- "identifier": "catalog",
501
- "name": "string",
502
- "marker": "string",
503
- "localizeInfos": {
504
- "ru_RU": {
505
- "title": "Мой маркер"
506
- }
507
- }
508
- }
509
- ```
510
- ### getMarkers
511
-
512
- ```
513
- const value = await Markers.getMarkers({limit:20, offset:5})
514
- ```
515
-
516
- > This method retrieves all marker objects from the API. It accepts two optional parameters limit (default 30) and offset (default 0) that allow you to limit the selection of records and offset the records selection, respectively. It returns a Promise that resolves to an object of type ItemsWithTotal, where items is an array of MarkerEntity objects and total is the total number of markers found.
517
-
518
- Example return:
519
- ```
520
- {
521
- "id": 17,
522
- "updatedDate": "2023-09-23T12:31:19.409Z",
523
- "version": 10,
524
- "identifier": "catalog",
525
- "name": "string",
526
- "marker": "string",
527
- "localizeInfos": {
528
- "ru_RU": {
529
- "title": "Мой маркер"
530
- }
531
- }
532
- }
533
- ```
534
- ### getMarkersById
535
-
536
- ```
537
- const value = await Markers.getMarkersById(1)
538
- ```
539
-
540
- > This method retrieves a single marker object based on its identifier (id) from the API. It returns a Promise that resolves to the marker object of type MarkerEntity.
541
479
 
542
- Example return:
543
- ```
544
- {
545
- "id": 17,
546
- "updatedDate": "2023-09-23T12:32:47.591Z",
547
- "version": 10,
548
- "identifier": "catalog",
549
- "name": "string",
550
- "marker": "string",
551
- "localizeInfos": {
552
- "ru_RU": {
553
- "title": "Мой маркер"
554
- }
555
- }
556
- }
557
- ```
558
480
  ## MenusApi
559
481
 
560
482
  ```
@@ -576,8 +498,8 @@ Example return:
576
498
  "id": 1764,
577
499
  "identifier": "catalog",
578
500
  "localizeInfos": {
579
- "ru_RU": {
580
- "title": "Главное меню"
501
+ "en_US": {
502
+ "title": "Main menu"
581
503
  }
582
504
  },
583
505
  "pages": [
@@ -619,8 +541,8 @@ Example return:
619
541
  "isVisible": true,
620
542
  "type": null,
621
543
  "localizeInfos": {
622
- "ru_RU": {
623
- "title": "Каталог"
544
+ "en_US": {
545
+ "title": "Catalog"
624
546
  }
625
547
  },
626
548
  "icon": "mdi mdi-account-key",
@@ -667,10 +589,10 @@ Example return:
667
589
  "pageUrl": "string",
668
590
  "depth": 3,
669
591
  "localizeInfos": {
670
- "ru_RU": {
671
- "title": "Каталог",
672
- "content": "Контент для каталога",
673
- "menuTitle": "Каталог"
592
+ "en_US": {
593
+ "title": "Catalog",
594
+ "content": "Content from catalog",
595
+ "menuTitle": "Catalog"
674
596
  }
675
597
  },
676
598
  "isVisible": true,
@@ -719,10 +641,10 @@ Example return:
719
641
  "pageUrl": "string",
720
642
  "depth": 3,
721
643
  "localizeInfos": {
722
- "ru_RU": {
723
- "title": "Каталог",
724
- "content": "Контент для каталога",
725
- "menuTitle": "Каталог"
644
+ "en_US": {
645
+ "title": "Catalog",
646
+ "content": "Content from catalog",
647
+ "menuTitle": "Catalog"
726
648
  }
727
649
  },
728
650
  "isVisible": true,
@@ -770,10 +692,10 @@ Example return:
770
692
  "pageUrl": "string",
771
693
  "depth": 3,
772
694
  "localizeInfos": {
773
- "ru_RU": {
774
- "title": "Каталог",
775
- "content": "Контент для каталога",
776
- "menuTitle": "Каталог"
695
+ "en_US": {
696
+ "title": "Catalog",
697
+ "content": "Content for catalog",
698
+ "menuTitle": "Catalog"
777
699
  }
778
700
  },
779
701
  "isVisible": true,
@@ -815,10 +737,10 @@ const value = await Pages.getPageById(1, 'en_US')
815
737
  "pageUrl": "string",
816
738
  "depth": 3,
817
739
  "localizeInfos": {
818
- "ru_RU": {
819
- "title": "Каталог",
820
- "content": "Контент для каталога",
821
- "menuTitle": "Каталог"
740
+ "en_US": {
741
+ "title": "Catalog",
742
+ "content": "Content from catalog",
743
+ "menuTitle": "Catalog"
822
744
  }
823
745
  },
824
746
  "isVisible": true,
@@ -858,10 +780,10 @@ Example return:
858
780
  "pageUrl": "string",
859
781
  "depth": 3,
860
782
  "localizeInfos": {
861
- "ru_RU": {
862
- "title": "Каталог",
863
- "content": "Контент для каталога",
864
- "menuTitle": "Каталог"
783
+ "en_US": {
784
+ "title": "Catalog",
785
+ "content": "Content from catalog",
786
+ "menuTitle": "Catalog"
865
787
  }
866
788
  },
867
789
  "isVisible": true,
@@ -885,57 +807,7 @@ Example return:
885
807
  "products": 0
886
808
  }
887
809
  ```
888
- ### getChildPagesByParentUrl
889
-
890
- ```
891
- const value = await Pages.getChildPagesByParentUrl('shop', 'en_US')
892
- ```
893
810
 
894
- > This method retrieves child pages object with information as an array based on the parent page's URL (url). It returns a Promise that resolves to an array of ContentIndexedPageDto objects or an empty array [] if there is no data for the selected parent. Get required language parameter.
895
-
896
- Example return:
897
- ```
898
- [
899
- {
900
- "id": 1764,
901
- "parentId": null,
902
- "config": {
903
- "rowsPerPage": 1,
904
- "productsPerRow": 1
905
- },
906
- "pageUrl": "string",
907
- "depth": 3,
908
- "localizeInfos": {
909
- "ru_RU": {
910
- "title": "Каталог",
911
- "content": "Контент для каталога",
912
- "menuTitle": "Каталог"
913
- }
914
- },
915
- "isVisible": true,
916
- "isEditorDisabled": false,
917
- "products": 0,
918
- "attributeSetId": 7,
919
- "forms": [
920
- null
921
- ],
922
- "blocks": [
923
- null
924
- ],
925
- "templateIdentifier": "my-template",
926
- "attributeValues": {
927
- "en_US": {
928
- "marker": {
929
- "value": "",
930
- "type": "string"
931
- }
932
- }
933
- },
934
- "position": 192,
935
- "type": "forNewsPage"
936
- }
937
- ]
938
- ```
939
811
  ### getConfigPageByUrl
940
812
 
941
813
  ```
@@ -965,8 +837,8 @@ Example return:
965
837
  {
966
838
  "id": 1764,
967
839
  "localizeInfos": {
968
- "ru_RU": {
969
- "title": "Товар"
840
+ "en_US": {
841
+ "title": "Product"
970
842
  }
971
843
  },
972
844
  "isVisible": true,
@@ -1023,6 +895,22 @@ sortOrder: 'DESC',
1023
895
  sortKey: 'id'
1024
896
  }
1025
897
  ```
898
+ "conditionMarker" by which values are filtered (not set by default), possible values:
899
+ > 'in' - Contains,
900
+ >
901
+ > 'nin' - Does not contain,
902
+ >
903
+ > 'eq' - Equal,
904
+ >
905
+ > 'neq' - Not equal,
906
+ >
907
+ > 'mth' - Greater than,
908
+ >
909
+ > 'lth' - Less than,
910
+ >
911
+ > 'exs' - Exists,
912
+ >
913
+ > 'nexs' - Does not exist
1026
914
 
1027
915
  ### getProducts
1028
916
 
@@ -1037,8 +925,8 @@ Example return:
1037
925
  {
1038
926
  "id": 1764,
1039
927
  "localizeInfos": {
1040
- "ru_RU": {
1041
- "title": "Товар"
928
+ "en_US": {
929
+ "title": "Product"
1042
930
  }
1043
931
  },
1044
932
  "isVisible": true,
@@ -1086,8 +974,8 @@ Example return:
1086
974
  {
1087
975
  "id": 1764,
1088
976
  "localizeInfos": {
1089
- "ru_RU": {
1090
- "title": "Товар"
977
+ "en_US": {
978
+ "title": "Product"
1091
979
  }
1092
980
  },
1093
981
  "isVisible": true,
@@ -1135,8 +1023,8 @@ Example return:
1135
1023
  {
1136
1024
  "id": 1764,
1137
1025
  "localizeInfos": {
1138
- "ru_RU": {
1139
- "title": "Товар"
1026
+ "en_US": {
1027
+ "title": "Product"
1140
1028
  }
1141
1029
  },
1142
1030
  "isVisible": true,
@@ -1184,8 +1072,8 @@ Example return:
1184
1072
  {
1185
1073
  "id": 1764,
1186
1074
  "localizeInfos": {
1187
- "ru_RU": {
1188
- "title": "Товар"
1075
+ "en_US": {
1076
+ "title": "Product"
1189
1077
  }
1190
1078
  },
1191
1079
  "isVisible": true,
@@ -1233,8 +1121,8 @@ Example return:
1233
1121
  {
1234
1122
  "id": 1764,
1235
1123
  "localizeInfos": {
1236
- "ru_RU": {
1237
- "title": "Товар"
1124
+ "en_US": {
1125
+ "title": "Product"
1238
1126
  }
1239
1127
  },
1240
1128
  "isVisible": true,
@@ -1281,8 +1169,8 @@ Example return:
1281
1169
  {
1282
1170
  "id": 1764,
1283
1171
  "localizeInfos": {
1284
- "ru_RU": {
1285
- "title": "Товар"
1172
+ "en_US": {
1173
+ "title": "Product"
1286
1174
  }
1287
1175
  },
1288
1176
  "isVisible": true,
@@ -1347,8 +1235,8 @@ Example return:
1347
1235
  {
1348
1236
  "id": 1764,
1349
1237
  "localizeInfos": {
1350
- "ru_RU": {
1351
- "title": "Товар"
1238
+ "en_US": {
1239
+ "title": "Product"
1352
1240
  }
1353
1241
  },
1354
1242
  "isVisible": true,
@@ -1396,8 +1284,8 @@ Example return:
1396
1284
  {
1397
1285
  "id": 1764,
1398
1286
  "localizeInfos": {
1399
- "ru_RU": {
1400
- "title": "Товар"
1287
+ "en_US": {
1288
+ "title": "Product"
1401
1289
  }
1402
1290
  },
1403
1291
  "isVisible": true,
@@ -1474,8 +1362,8 @@ Example return:
1474
1362
  "version": 10,
1475
1363
  "identifier": "catalog",
1476
1364
  "localizeInfos": {
1477
- "ru_RU": {
1478
- "title": "Статус 1"
1365
+ "en_US": {
1366
+ "title": "Status 1"
1479
1367
  }
1480
1368
  }
1481
1369
  }
@@ -1497,8 +1385,8 @@ Example return:
1497
1385
  "version": 10,
1498
1386
  "identifier": "catalog",
1499
1387
  "localizeInfos": {
1500
- "ru_RU": {
1501
- "title": "Статус 1"
1388
+ "en_US": {
1389
+ "title": "Status 1"
1502
1390
  }
1503
1391
  }
1504
1392
  }
@@ -1519,8 +1407,8 @@ Example return:
1519
1407
  "version": 10,
1520
1408
  "identifier": "catalog",
1521
1409
  "localizeInfos": {
1522
- "ru_RU": {
1523
- "title": "Статус 1"
1410
+ "en_US": {
1411
+ "title": "Status 1"
1524
1412
  }
1525
1413
  }
1526
1414
  }
@@ -1543,47 +1431,6 @@ true
1543
1431
  const { Templates } = defineOneEntry('your-url')
1544
1432
  ```
1545
1433
 
1546
- ### getTemplates
1547
-
1548
- ```
1549
- const value = await Templates.getTemplates()
1550
- ```
1551
-
1552
- > This method retrieves all template objects of a specific type from the API. It returns a Promise that resolves to an array of template objects.
1553
-
1554
- Example return:
1555
- ```
1556
- [
1557
- {
1558
- "id": 1764,
1559
- "updatedDate": "2023-09-25T13:47:05.811Z",
1560
- "version": 10,
1561
- "identifier": "catalog",
1562
- "attributesSets": {
1563
- "string_id19": "",
1564
- "string_id18": ""
1565
- },
1566
- "attributeSetId": 0,
1567
- "generalType": {
1568
- "id": 4,
1569
- "type": "forCatalogPages"
1570
- },
1571
- "generalTypeId": 4,
1572
- "localizeInfos": {
1573
- "ru_RU": {
1574
- "title": "Шаблон страниц"
1575
- }
1576
- },
1577
- "position": {
1578
- "id": 12,
1579
- "objectId": 1,
1580
- "objectType": "module",
1581
- "position": "0|hzzzzz:"
1582
- },
1583
- "positionId": "0|hzzzzz:"
1584
- }
1585
- ]
1586
- ```
1587
1434
  ### getAllTemplates
1588
1435
 
1589
1436
  ```
@@ -1622,8 +1469,8 @@ Example return:
1622
1469
  },
1623
1470
  "generalTypeId": 4,
1624
1471
  "localizeInfos": {
1625
- "ru_RU": {
1626
- "title": "Шаблон страниц"
1472
+ "en_US": {
1473
+ "title": "Page template"
1627
1474
  }
1628
1475
  },
1629
1476
  "position": {
@@ -1662,8 +1509,8 @@ Example return:
1662
1509
  },
1663
1510
  "generalTypeId": 4,
1664
1511
  "localizeInfos": {
1665
- "ru_RU": {
1666
- "title": "Шаблон страниц"
1512
+ "en_US": {
1513
+ "title": "Page template"
1667
1514
  }
1668
1515
  },
1669
1516
  "position": {
@@ -1703,8 +1550,8 @@ Example return:
1703
1550
  },
1704
1551
  "attributeSetId": 0,
1705
1552
  "localizeInfos": {
1706
- "ru_RU": {
1707
- "title": "Шаблон страниц"
1553
+ "en_US": {
1554
+ "title": "Page tamplate"
1708
1555
  }
1709
1556
  },
1710
1557
  "position": {
@@ -1739,8 +1586,8 @@ Example return:
1739
1586
  },
1740
1587
  "attributeSetId": 0,
1741
1588
  "localizeInfos": {
1742
- "ru_RU": {
1743
- "title": "Шаблон страниц"
1589
+ "en_US": {
1590
+ "title": "Page template"
1744
1591
  }
1745
1592
  },
1746
1593
  "position": {
@@ -1774,8 +1621,8 @@ Example return:
1774
1621
  },
1775
1622
  "attributeSetId": 0,
1776
1623
  "localizeInfos": {
1777
- "ru_RU": {
1778
- "title": "Шаблон страниц"
1624
+ "en_US": {
1625
+ "title": "Page template"
1779
1626
  }
1780
1627
  },
1781
1628
  "position": {
@@ -0,0 +1,14 @@
1
+ import OneEntry from "../base/oneEntry";
2
+ import { IAdminEntity, IAdmins } from "./adminsInterfaces";
3
+ /**
4
+ * Controllers for working with users - admins
5
+ */
6
+ export default class AdminsApi extends OneEntry implements IAdmins {
7
+ constructor(url: string);
8
+ /**
9
+ * Get all user objects - admins.
10
+ *
11
+ * @returns Returns all AdminEntity user objects
12
+ */
13
+ getAdminsInfo(): Promise<IAdminEntity>;
14
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const oneEntry_1 = require("../base/oneEntry");
13
+ /**
14
+ * Controllers for working with users - admins
15
+ */
16
+ class AdminsApi extends oneEntry_1.default {
17
+ constructor(url) {
18
+ super(url);
19
+ this._url += '/api/content/admins';
20
+ }
21
+ /**
22
+ * Get all user objects - admins.
23
+ *
24
+ * @returns Returns all AdminEntity user objects
25
+ */
26
+ getAdminsInfo() {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ const result = yield this._fetchGet('');
29
+ return result;
30
+ });
31
+ }
32
+ }
33
+ exports.default = AdminsApi;
34
+ //# sourceMappingURL=adminsApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adminsApi.js","sourceRoot":"","sources":["../../../src/admins/adminsApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,SAAU,SAAQ,kBAAQ;IAC3C,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,qBAAqB,CAAA;IACtC,CAAC;IAED;;;;OAIG;IACU,aAAa;;YACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAfD,4BAeC"}