oneentry 1.0.75 → 1.0.76

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 (279) hide show
  1. package/README.md +1 -10
  2. package/dist/auth-provider/authProviderApi.d.ts +2 -2
  3. package/dist/auth-provider/authProvidersInterfaces.d.ts +2 -6
  4. package/dist/base/asyncModules.js +3 -14
  5. package/dist/base/stateModule.d.ts +2 -0
  6. package/dist/base/stateModule.js +19 -0
  7. package/package.json +1 -1
  8. package/dist/_cjs/admins/adminsApi.d.ts +0 -14
  9. package/dist/_cjs/admins/adminsApi.js +0 -34
  10. package/dist/_cjs/admins/adminsApi.js.map +0 -1
  11. package/dist/_cjs/admins/adminsInterfaces.d.ts +0 -32
  12. package/dist/_cjs/admins/adminsInterfaces.js +0 -3
  13. package/dist/_cjs/admins/adminsInterfaces.js.map +0 -1
  14. package/dist/_cjs/attribute-set/attributeSetApi.d.ts +0 -24
  15. package/dist/_cjs/attribute-set/attributeSetApi.js +0 -49
  16. package/dist/_cjs/attribute-set/attributeSetApi.js.map +0 -1
  17. package/dist/_cjs/attribute-set/attributeSetInterfaces.d.ts +0 -23
  18. package/dist/_cjs/attribute-set/attributeSetInterfaces.js +0 -3
  19. package/dist/_cjs/attribute-set/attributeSetInterfaces.js.map +0 -1
  20. package/dist/_cjs/base/oneEntry.d.ts +0 -9
  21. package/dist/_cjs/base/oneEntry.js +0 -55
  22. package/dist/_cjs/base/oneEntry.js.map +0 -1
  23. package/dist/_cjs/base/utils.d.ts +0 -32
  24. package/dist/_cjs/base/utils.js +0 -32
  25. package/dist/_cjs/base/utils.js.map +0 -1
  26. package/dist/_cjs/forms/formsApi.d.ts +0 -26
  27. package/dist/_cjs/forms/formsApi.js +0 -56
  28. package/dist/_cjs/forms/formsApi.js.map +0 -1
  29. package/dist/_cjs/forms/formsInterfaces.d.ts +0 -28
  30. package/dist/_cjs/forms/formsInterfaces.js +0 -3
  31. package/dist/_cjs/forms/formsInterfaces.js.map +0 -1
  32. package/dist/_cjs/formsData/formsDataApi.d.ts +0 -41
  33. package/dist/_cjs/formsData/formsDataApi.js +0 -71
  34. package/dist/_cjs/formsData/formsDataApi.js.map +0 -1
  35. package/dist/_cjs/formsData/formsDataInterfaces.d.ts +0 -25
  36. package/dist/_cjs/formsData/formsDataInterfaces.js +0 -3
  37. package/dist/_cjs/formsData/formsDataInterfaces.js.map +0 -1
  38. package/dist/_cjs/general-types/generalTypesApi.d.ts +0 -14
  39. package/dist/_cjs/general-types/generalTypesApi.js +0 -34
  40. package/dist/_cjs/general-types/generalTypesApi.js.map +0 -1
  41. package/dist/_cjs/general-types/generalTypesInterfaces.d.ts +0 -9
  42. package/dist/_cjs/general-types/generalTypesInterfaces.js +0 -3
  43. package/dist/_cjs/general-types/generalTypesInterfaces.js.map +0 -1
  44. package/dist/_cjs/index.d.ts +0 -35
  45. package/dist/_cjs/index.js +0 -55
  46. package/dist/_cjs/index.js.map +0 -1
  47. package/dist/_cjs/locales/localesApi.d.ts +0 -14
  48. package/dist/_cjs/locales/localesApi.js +0 -34
  49. package/dist/_cjs/locales/localesApi.js.map +0 -1
  50. package/dist/_cjs/locales/localesInterfaces.d.ts +0 -15
  51. package/dist/_cjs/locales/localesInterfaces.js +0 -3
  52. package/dist/_cjs/locales/localesInterfaces.js.map +0 -1
  53. package/dist/_cjs/markers/markersApi.d.ts +0 -35
  54. package/dist/_cjs/markers/markersApi.js +0 -65
  55. package/dist/_cjs/markers/markersApi.js.map +0 -1
  56. package/dist/_cjs/markers/markersInterfaces.d.ts +0 -16
  57. package/dist/_cjs/markers/markersInterfaces.js +0 -3
  58. package/dist/_cjs/markers/markersInterfaces.js.map +0 -1
  59. package/dist/_cjs/menus/menusApi.d.ts +0 -16
  60. package/dist/_cjs/menus/menusApi.js +0 -36
  61. package/dist/_cjs/menus/menusApi.js.map +0 -1
  62. package/dist/_cjs/menus/menusInterfaces.d.ts +0 -18
  63. package/dist/_cjs/menus/menusInterfaces.js +0 -3
  64. package/dist/_cjs/menus/menusInterfaces.js.map +0 -1
  65. package/dist/_cjs/modules/modulesApi.d.ts +0 -14
  66. package/dist/_cjs/modules/modulesApi.js +0 -34
  67. package/dist/_cjs/modules/modulesApi.js.map +0 -1
  68. package/dist/_cjs/modules/modulesInterfaces.d.ts +0 -19
  69. package/dist/_cjs/modules/modulesInterfaces.js +0 -3
  70. package/dist/_cjs/modules/modulesInterfaces.js.map +0 -1
  71. package/dist/_cjs/pages/pagesApi.d.ts +0 -74
  72. package/dist/_cjs/pages/pagesApi.js +0 -137
  73. package/dist/_cjs/pages/pagesApi.js.map +0 -1
  74. package/dist/_cjs/pages/pagesInterfaces.d.ts +0 -39
  75. package/dist/_cjs/pages/pagesInterfaces.js +0 -3
  76. package/dist/_cjs/pages/pagesInterfaces.js.map +0 -1
  77. package/dist/_cjs/product-statuses/productStatusesApi.d.ts +0 -38
  78. package/dist/_cjs/product-statuses/productStatusesApi.js +0 -73
  79. package/dist/_cjs/product-statuses/productStatusesApi.js.map +0 -1
  80. package/dist/_cjs/product-statuses/productStatusesInterfaces.d.ts +0 -15
  81. package/dist/_cjs/product-statuses/productStatusesInterfaces.js +0 -3
  82. package/dist/_cjs/product-statuses/productStatusesInterfaces.js.map +0 -1
  83. package/dist/_cjs/products/productsApi.d.ts +0 -195
  84. package/dist/_cjs/products/productsApi.js +0 -295
  85. package/dist/_cjs/products/productsApi.js.map +0 -1
  86. package/dist/_cjs/products/productsInterfaces.d.ts +0 -83
  87. package/dist/_cjs/products/productsInterfaces.js +0 -3
  88. package/dist/_cjs/products/productsInterfaces.js.map +0 -1
  89. package/dist/_cjs/templates/templatesApi.d.ts +0 -32
  90. package/dist/_cjs/templates/templatesApi.js +0 -72
  91. package/dist/_cjs/templates/templatesApi.js.map +0 -1
  92. package/dist/_cjs/templates/templatesInterfaces.d.ts +0 -30
  93. package/dist/_cjs/templates/templatesInterfaces.js +0 -3
  94. package/dist/_cjs/templates/templatesInterfaces.js.map +0 -1
  95. package/dist/_cjs/templates-preview/templatesPreviewApi.d.ts +0 -30
  96. package/dist/_cjs/templates-preview/templatesPreviewApi.js +0 -60
  97. package/dist/_cjs/templates-preview/templatesPreviewApi.js.map +0 -1
  98. package/dist/_cjs/templates-preview/templatesPreviewInterfaces.d.ts +0 -27
  99. package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js +0 -3
  100. package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js.map +0 -1
  101. package/dist/_esm/admins/adminsApi.d.ts +0 -14
  102. package/dist/_esm/admins/adminsApi.js +0 -31
  103. package/dist/_esm/admins/adminsApi.js.map +0 -1
  104. package/dist/_esm/admins/adminsInterfaces.d.ts +0 -32
  105. package/dist/_esm/admins/adminsInterfaces.js +0 -2
  106. package/dist/_esm/admins/adminsInterfaces.js.map +0 -1
  107. package/dist/_esm/attribute-set/attributeSetApi.d.ts +0 -24
  108. package/dist/_esm/attribute-set/attributeSetApi.js +0 -46
  109. package/dist/_esm/attribute-set/attributeSetApi.js.map +0 -1
  110. package/dist/_esm/attribute-set/attributeSetInterfaces.d.ts +0 -23
  111. package/dist/_esm/attribute-set/attributeSetInterfaces.js +0 -2
  112. package/dist/_esm/attribute-set/attributeSetInterfaces.js.map +0 -1
  113. package/dist/_esm/base/oneEntry.d.ts +0 -9
  114. package/dist/_esm/base/oneEntry.js +0 -52
  115. package/dist/_esm/base/oneEntry.js.map +0 -1
  116. package/dist/_esm/base/utils.d.ts +0 -32
  117. package/dist/_esm/base/utils.js +0 -30
  118. package/dist/_esm/base/utils.js.map +0 -1
  119. package/dist/_esm/forms/formsApi.d.ts +0 -26
  120. package/dist/_esm/forms/formsApi.js +0 -53
  121. package/dist/_esm/forms/formsApi.js.map +0 -1
  122. package/dist/_esm/forms/formsInterfaces.d.ts +0 -28
  123. package/dist/_esm/forms/formsInterfaces.js +0 -2
  124. package/dist/_esm/forms/formsInterfaces.js.map +0 -1
  125. package/dist/_esm/formsData/formsDataApi.d.ts +0 -41
  126. package/dist/_esm/formsData/formsDataApi.js +0 -68
  127. package/dist/_esm/formsData/formsDataApi.js.map +0 -1
  128. package/dist/_esm/formsData/formsDataInterfaces.d.ts +0 -25
  129. package/dist/_esm/formsData/formsDataInterfaces.js +0 -2
  130. package/dist/_esm/formsData/formsDataInterfaces.js.map +0 -1
  131. package/dist/_esm/general-types/generalTypesApi.d.ts +0 -14
  132. package/dist/_esm/general-types/generalTypesApi.js +0 -31
  133. package/dist/_esm/general-types/generalTypesApi.js.map +0 -1
  134. package/dist/_esm/general-types/generalTypesInterfaces.d.ts +0 -9
  135. package/dist/_esm/general-types/generalTypesInterfaces.js +0 -2
  136. package/dist/_esm/general-types/generalTypesInterfaces.js.map +0 -1
  137. package/dist/_esm/index.d.ts +0 -35
  138. package/dist/_esm/index.js +0 -51
  139. package/dist/_esm/index.js.map +0 -1
  140. package/dist/_esm/locales/localesApi.d.ts +0 -14
  141. package/dist/_esm/locales/localesApi.js +0 -31
  142. package/dist/_esm/locales/localesApi.js.map +0 -1
  143. package/dist/_esm/locales/localesInterfaces.d.ts +0 -15
  144. package/dist/_esm/locales/localesInterfaces.js +0 -2
  145. package/dist/_esm/locales/localesInterfaces.js.map +0 -1
  146. package/dist/_esm/markers/markersApi.d.ts +0 -35
  147. package/dist/_esm/markers/markersApi.js +0 -62
  148. package/dist/_esm/markers/markersApi.js.map +0 -1
  149. package/dist/_esm/markers/markersInterfaces.d.ts +0 -16
  150. package/dist/_esm/markers/markersInterfaces.js +0 -2
  151. package/dist/_esm/markers/markersInterfaces.js.map +0 -1
  152. package/dist/_esm/menus/menusApi.d.ts +0 -16
  153. package/dist/_esm/menus/menusApi.js +0 -33
  154. package/dist/_esm/menus/menusApi.js.map +0 -1
  155. package/dist/_esm/menus/menusInterfaces.d.ts +0 -18
  156. package/dist/_esm/menus/menusInterfaces.js +0 -2
  157. package/dist/_esm/menus/menusInterfaces.js.map +0 -1
  158. package/dist/_esm/modules/modulesApi.d.ts +0 -14
  159. package/dist/_esm/modules/modulesApi.js +0 -31
  160. package/dist/_esm/modules/modulesApi.js.map +0 -1
  161. package/dist/_esm/modules/modulesInterfaces.d.ts +0 -19
  162. package/dist/_esm/modules/modulesInterfaces.js +0 -2
  163. package/dist/_esm/modules/modulesInterfaces.js.map +0 -1
  164. package/dist/_esm/pages/pagesApi.d.ts +0 -74
  165. package/dist/_esm/pages/pagesApi.js +0 -134
  166. package/dist/_esm/pages/pagesApi.js.map +0 -1
  167. package/dist/_esm/pages/pagesInterfaces.d.ts +0 -39
  168. package/dist/_esm/pages/pagesInterfaces.js +0 -2
  169. package/dist/_esm/pages/pagesInterfaces.js.map +0 -1
  170. package/dist/_esm/product-statuses/productStatusesApi.d.ts +0 -38
  171. package/dist/_esm/product-statuses/productStatusesApi.js +0 -70
  172. package/dist/_esm/product-statuses/productStatusesApi.js.map +0 -1
  173. package/dist/_esm/product-statuses/productStatusesInterfaces.d.ts +0 -15
  174. package/dist/_esm/product-statuses/productStatusesInterfaces.js +0 -2
  175. package/dist/_esm/product-statuses/productStatusesInterfaces.js.map +0 -1
  176. package/dist/_esm/products/productsApi.d.ts +0 -195
  177. package/dist/_esm/products/productsApi.js +0 -292
  178. package/dist/_esm/products/productsApi.js.map +0 -1
  179. package/dist/_esm/products/productsInterfaces.d.ts +0 -83
  180. package/dist/_esm/products/productsInterfaces.js +0 -2
  181. package/dist/_esm/products/productsInterfaces.js.map +0 -1
  182. package/dist/_esm/templates/templatesApi.d.ts +0 -32
  183. package/dist/_esm/templates/templatesApi.js +0 -69
  184. package/dist/_esm/templates/templatesApi.js.map +0 -1
  185. package/dist/_esm/templates/templatesInterfaces.d.ts +0 -30
  186. package/dist/_esm/templates/templatesInterfaces.js +0 -2
  187. package/dist/_esm/templates/templatesInterfaces.js.map +0 -1
  188. package/dist/_esm/templates-preview/templatesPreviewApi.d.ts +0 -30
  189. package/dist/_esm/templates-preview/templatesPreviewApi.js +0 -57
  190. package/dist/_esm/templates-preview/templatesPreviewApi.js.map +0 -1
  191. package/dist/_esm/templates-preview/templatesPreviewInterfaces.d.ts +0 -27
  192. package/dist/_esm/templates-preview/templatesPreviewInterfaces.js +0 -2
  193. package/dist/_esm/templates-preview/templatesPreviewInterfaces.js.map +0 -1
  194. package/dist/_types/admins/adminsApi.d.ts +0 -14
  195. package/dist/_types/admins/adminsInterfaces.d.ts +0 -32
  196. package/dist/_types/attribute-set/attributeSetApi.d.ts +0 -24
  197. package/dist/_types/attribute-set/attributeSetInterfaces.d.ts +0 -23
  198. package/dist/_types/base/oneEntry.d.ts +0 -9
  199. package/dist/_types/base/utils.d.ts +0 -32
  200. package/dist/_types/forms/formsApi.d.ts +0 -26
  201. package/dist/_types/forms/formsInterfaces.d.ts +0 -28
  202. package/dist/_types/formsData/formsDataApi.d.ts +0 -41
  203. package/dist/_types/formsData/formsDataInterfaces.d.ts +0 -25
  204. package/dist/_types/general-types/generalTypesApi.d.ts +0 -14
  205. package/dist/_types/general-types/generalTypesInterfaces.d.ts +0 -9
  206. package/dist/_types/index.d.ts +0 -35
  207. package/dist/_types/locales/localesApi.d.ts +0 -14
  208. package/dist/_types/locales/localesInterfaces.d.ts +0 -15
  209. package/dist/_types/markers/markersApi.d.ts +0 -35
  210. package/dist/_types/markers/markersInterfaces.d.ts +0 -16
  211. package/dist/_types/menus/menusApi.d.ts +0 -16
  212. package/dist/_types/menus/menusInterfaces.d.ts +0 -18
  213. package/dist/_types/modules/modulesApi.d.ts +0 -14
  214. package/dist/_types/modules/modulesInterfaces.d.ts +0 -19
  215. package/dist/_types/pages/pagesApi.d.ts +0 -74
  216. package/dist/_types/pages/pagesInterfaces.d.ts +0 -39
  217. package/dist/_types/product-statuses/productStatusesApi.d.ts +0 -38
  218. package/dist/_types/product-statuses/productStatusesInterfaces.d.ts +0 -15
  219. package/dist/_types/products/productsApi.d.ts +0 -195
  220. package/dist/_types/products/productsInterfaces.d.ts +0 -83
  221. package/dist/_types/templates/templatesApi.d.ts +0 -32
  222. package/dist/_types/templates/templatesInterfaces.d.ts +0 -30
  223. package/dist/_types/templates-preview/templatesPreviewApi.d.ts +0 -30
  224. package/dist/_types/templates-preview/templatesPreviewInterfaces.d.ts +0 -27
  225. package/dist/admins/adminsApi.js.map +0 -1
  226. package/dist/admins/adminsInterfaces.js.map +0 -1
  227. package/dist/attribute-set/AttributeSetApi.d.ts +0 -24
  228. package/dist/attribute-set/AttributeSetApi.js +0 -49
  229. package/dist/attribute-set/AttributeSetApi.js.map +0 -1
  230. package/dist/attribute-set/attributeSetInterfaces.d.ts +0 -23
  231. package/dist/attribute-set/attributeSetInterfaces.js +0 -3
  232. package/dist/attribute-set/attributeSetInterfaces.js.map +0 -1
  233. package/dist/base/attributes.d.ts +0 -6
  234. package/dist/base/attributes.js +0 -6
  235. package/dist/base/modules.d.ts +0 -14
  236. package/dist/base/modules.js +0 -173
  237. package/dist/base/oneEntry.d.ts +0 -0
  238. package/dist/base/oneEntry.js +0 -74
  239. package/dist/base/oneEntry.js.map +0 -1
  240. package/dist/base/utils.js.map +0 -1
  241. package/dist/file-uploding/fileUploadingApi.js.map +0 -1
  242. package/dist/file-uploding/fileUploadingInterfaces.js.map +0 -1
  243. package/dist/forms/formsApi.js.map +0 -1
  244. package/dist/forms/formsInterfaces.js.map +0 -1
  245. package/dist/formsData/formsDataApi.js.map +0 -1
  246. package/dist/formsData/formsDataInterfaces.js.map +0 -1
  247. package/dist/general-types/GeneralTypesApi.d.ts +0 -15
  248. package/dist/general-types/GeneralTypesApi.js +0 -22
  249. package/dist/general-types/GeneralTypesApi.js.map +0 -1
  250. package/dist/general-types/generalTypesInterfaces.js.map +0 -1
  251. package/dist/index.js.map +0 -1
  252. package/dist/locales/localesApi.js.map +0 -1
  253. package/dist/locales/localesInterfaces.js.map +0 -1
  254. package/dist/markers/markersApi.d.ts +0 -37
  255. package/dist/markers/markersApi.js +0 -50
  256. package/dist/markers/markersApi.js.map +0 -1
  257. package/dist/markers/markersInterfaces.d.ts +0 -37
  258. package/dist/markers/markersInterfaces.js +0 -2
  259. package/dist/markers/markersInterfaces.js.map +0 -1
  260. package/dist/menus/menusApi.js.map +0 -1
  261. package/dist/menus/menusInterfaces.js.map +0 -1
  262. package/dist/modules/modulesApi.d.ts +0 -14
  263. package/dist/modules/modulesApi.js +0 -34
  264. package/dist/modules/modulesApi.js.map +0 -1
  265. package/dist/modules/modulesInterfaces.d.ts +0 -19
  266. package/dist/modules/modulesInterfaces.js +0 -3
  267. package/dist/modules/modulesInterfaces.js.map +0 -1
  268. package/dist/pages/pagesApi.js.map +0 -1
  269. package/dist/pages/pagesInterfaces.js.map +0 -1
  270. package/dist/product-statuses/productStatusesApi.js.map +0 -1
  271. package/dist/product-statuses/productStatusesInterfaces.js.map +0 -1
  272. package/dist/products/productsApi.js.map +0 -1
  273. package/dist/products/productsInterfaces.js.map +0 -1
  274. package/dist/system/systemApi.js.map +0 -1
  275. package/dist/system/systemInterfaces.js.map +0 -1
  276. package/dist/templates/templatesApi.js.map +0 -1
  277. package/dist/templates/templatesInterfaces.js.map +0 -1
  278. package/dist/templates-preview/templatesPreviewApi.js.map +0 -1
  279. package/dist/templates-preview/templatesPreviewInterfaces.js.map +0 -1
@@ -1,134 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import OneEntry from "../base/oneEntry";
11
- /**
12
- * Controllers for working with page objects, including catalog pages
13
- */
14
- export default class PageApi extends OneEntry {
15
- constructor(url) {
16
- super(url);
17
- this._url += '/api/content/pages';
18
- }
19
- /**
20
- * Get all top-level page objects.
21
- *
22
- * @param {string} [langCode] Required parameter lang code
23
- *
24
- * @returns Returns all created pages without parents as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
25
- */
26
- getRootPages(langCode) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- const result = yield this._fetchGet(`/root?langCode=${langCode}`);
29
- return result;
30
- });
31
- }
32
- /**
33
- * Get all page objects with product information as an array.
34
- *
35
- * @param {string} [langCode] Required parameter lang code
36
- *
37
- * @param {number} [limit] - Optional parameter for pagination, default is 30
38
- *
39
- * @param {number} [offset] - Optional parameter for pagination, default is 0
40
- *
41
- * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
42
- */
43
- getCatalogPages(langCode, limit = 30, offset = 0) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- const result = yield this._fetchGet(`/catalog?langCode=${langCode}&limit=${limit}&offset=${offset}`);
46
- return result;
47
- });
48
- }
49
- /**
50
- * Get all page objects with product information as an array.
51
- *
52
- * @param {string} [langCode] Required parameter lang code
53
- *
54
- * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
55
- */
56
- getPages(langCode) {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- const result = yield this._fetchGet(`?langCode=${langCode}`);
59
- return result;
60
- });
61
- }
62
- /**
63
- * Get page object with information about forms, blocks, menus, linked to the page.
64
- *
65
- * @param {string} [langCode] Required parameter lang code
66
- *
67
- * @param {number} [id] - Page object identifier
68
- *
69
- * @returns Returns page object (DTO depends on the type of page being returned)
70
- */
71
- getPageById(id, langCode) {
72
- return __awaiter(this, void 0, void 0, function* () {
73
- const result = yield this._fetchGet(`/${id}?langCode=${langCode}`);
74
- return result;
75
- });
76
- }
77
- /**
78
- * Get page object with information about forms, blocks, menus, linked to the page by URL.
79
- *
80
- * @param {string} [langCode] Required parameter lang code
81
- *
82
- * @param {string} [url] - Page URL
83
- *
84
- * @returns Returns page object (DTO depends on the type of page being returned)
85
- */
86
- getPageByUrl(url, langCode) {
87
- return __awaiter(this, void 0, void 0, function* () {
88
- const result = yield this._fetchGet(`/url/${url}?langCode=${langCode}`);
89
- return result;
90
- });
91
- }
92
- // /**
93
- // * Get child pages object with information as an array.
94
- // *
95
- // * @param {string} [langCode] Required parameter lang code
96
- // *
97
- // * @param {string} [url] - Page URL
98
- // *
99
- // * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data) for the selected parent
100
- // */
101
- // public async getChildPagesByParentUrl(url:string, langCode:string):Promise<IPagesEntity> {
102
- // const result = await this._fetchGet(`/${url}/children?langCode=${langCode}`)
103
- // return result
104
- // }
105
- /**
106
- * Get settings for the page.
107
- *
108
- * @param {string} [url] - Page URL
109
- *
110
- * @returns Returns a ConfigPageDto object with page display settings
111
- */
112
- getConfigPageByUrl(url) {
113
- return __awaiter(this, void 0, void 0, function* () {
114
- const result = yield this._fetchGet(`/${url}/config`);
115
- return result;
116
- });
117
- }
118
- /**
119
- * Quick search for page objects with limited output.
120
- *
121
- * @param {string} [name] - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account)
122
- *
123
- * @param {string} [langCode] Required parameter lang code
124
- *
125
- * @returns Returns all created pages as an array of ContentIndexedPageDto objects or an empty array [] (if there is no data)
126
- */
127
- searchPage(name, langCode) {
128
- return __awaiter(this, void 0, void 0, function* () {
129
- const result = yield this._fetchGet(`/quick/search?lang=${langCode}&name=${name}`);
130
- return result;
131
- });
132
- }
133
- }
134
- //# sourceMappingURL=pagesApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pagesApi.js","sourceRoot":"","sources":["../../../src/pages/pagesApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AAGxC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,QAAQ;IACzC,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAA;IACrC,CAAC;IAED;;;;;;OAMG;IACU,YAAY,CAAC,QAAe;;YACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAA;YACjE,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;;;OAUG;IACU,eAAe,CAAC,QAAe,EAAE,QAAe,EAAE,EAAE,SAAgB,CAAC;;YAC9E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,qBAAqB,QAAQ,UAAU,KAAK,WAAW,MAAM,EAAE,CAAC,CAAA;YACpG,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,QAAQ,CAAC,QAAe;;YACjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,QAAQ,EAAE,CAAC,CAAA;YAC5D,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;OAQG;IACU,WAAW,CAAC,EAAS,EAAE,QAAe;;YAC/C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,aAAa,QAAQ,EAAE,CAAC,CAAA;YAClE,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;OAQG;IACU,YAAY,CAAC,GAAU,EAAE,QAAe;;YACjD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,QAAQ,EAAE,CAAC,CAAA;YACvE,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED,MAAM;IACN,0DAA0D;IAC1D,KAAK;IACL,6DAA6D;IAC7D,KAAK;IACL,sCAAsC;IACtC,KAAK;IACL,wJAAwJ;IACxJ,MAAM;IACN,6FAA6F;IAC7F,mFAAmF;IACnF,oBAAoB;IACpB,IAAI;IAEJ;;;;;;OAMG;IACU,kBAAkB,CAAC,GAAU;;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAA;YACrD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;;;OAQG;IACU,UAAU,CAAC,IAAW,EAAE,QAAe;;YAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,sBAAsB,QAAQ,SAAS,IAAI,EAAE,CAAC,CAAA;YAClF,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CAEJ"}
@@ -1,39 +0,0 @@
1
- import { ILocalizeInfos, Types } from "../base/utils";
2
- interface IPageApi {
3
- getRootPages(langCode: string): Promise<Array<IPagesEntity>>;
4
- getCatalogPages(langCode: string, limit: number, offset: number): Promise<Array<IPagesEntity>>;
5
- getPages(langCode: string): Promise<Array<IPagesEntity>>;
6
- getPageById(id: number, langCode: string): Promise<IPagesEntity>;
7
- getPageByUrl(url: string, langCode: string): Promise<IPagesEntity>;
8
- getConfigPageByUrl(url: string): Promise<IPageConfig>;
9
- searchPage(name: string, langCode: string): Promise<IPagesEntity>;
10
- }
11
- interface IPageConfig {
12
- rowsPerPage: number;
13
- productsPerRow: number;
14
- }
15
- interface IPagesEntity {
16
- id: number;
17
- parentId: number;
18
- config: Record<string, number>;
19
- pageUrl: string;
20
- depth: number;
21
- localizeInfos: ILocalizeInfos;
22
- isVisible: boolean;
23
- isEditorDisabled: boolean;
24
- products: number;
25
- attributeSetId: number;
26
- templateIdentifier: string;
27
- /**
28
- * Language-specific attribute values.
29
- * @example attributeValues['en_US']
30
- *
31
- * @property {langCode.<object>}
32
- */
33
- attributeValues: {
34
- [langCode: string]: object;
35
- };
36
- position: string;
37
- type: Types;
38
- }
39
- export { IPageApi, IPageConfig, IPagesEntity };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=pagesInterfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pagesInterfaces.js","sourceRoot":"","sources":["../../../src/pages/pagesInterfaces.ts"],"names":[],"mappings":""}
@@ -1,38 +0,0 @@
1
- import OneEntry from '../base/oneEntry';
2
- import { IProductStatusEntity, IProductStatuses } from "./productStatusesInterfaces";
3
- /**
4
- * Controllers for working with product statuses
5
- */
6
- export default class ProductStatusesApi extends OneEntry implements IProductStatuses {
7
- constructor(url: string);
8
- /**
9
- * Search for all product status objects.
10
- *
11
- * @returns Returns an array of product status objects
12
- */
13
- getProductStatuses(): Promise<Array<IProductStatusEntity>>;
14
- /**
15
- * Search for a product status object by identifier.
16
- *
17
- * @param {number} [id] - Status id
18
- *
19
- * @returns Returns a product status object
20
- */
21
- getProductStatusesById(id: number): Promise<IProductStatusEntity>;
22
- /**
23
- * Search for a product status object by its textual identifier (marker).
24
- *
25
- * @param {string} [marker] - Product marker
26
- *
27
- * @returns Returns a product status object
28
- */
29
- getProductsByStatusMarker(marker: string): Promise<IProductStatusEntity>;
30
- /**
31
- * Check the existence of a textual identifier.
32
- *
33
- * @param {string} [marker] - Product marker
34
- *
35
- * @returns Returns true if the textual identifier (marker) exists or false if it doesn't
36
- */
37
- validateMarker(marker: string): Promise<boolean>;
38
- }
@@ -1,70 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import OneEntry from '../base/oneEntry';
11
- /**
12
- * Controllers for working with product statuses
13
- */
14
- export default class ProductStatusesApi extends OneEntry {
15
- constructor(url) {
16
- super(url);
17
- this._url += '/api/content/product-statuses';
18
- }
19
- /**
20
- * Search for all product status objects.
21
- *
22
- * @returns Returns an array of product status objects
23
- */
24
- getProductStatuses() {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- const result = yield this._fetchGet('');
27
- return result;
28
- });
29
- }
30
- /**
31
- * Search for a product status object by identifier.
32
- *
33
- * @param {number} [id] - Status id
34
- *
35
- * @returns Returns a product status object
36
- */
37
- getProductStatusesById(id) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- const result = yield this._fetchGet(`/${id}`);
40
- return result;
41
- });
42
- }
43
- /**
44
- * Search for a product status object by its textual identifier (marker).
45
- *
46
- * @param {string} [marker] - Product marker
47
- *
48
- * @returns Returns a product status object
49
- */
50
- getProductsByStatusMarker(marker) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- const result = yield this._fetchGet(`/marker/${marker}`);
53
- return result;
54
- });
55
- }
56
- /**
57
- * Check the existence of a textual identifier.
58
- *
59
- * @param {string} [marker] - Product marker
60
- *
61
- * @returns Returns true if the textual identifier (marker) exists or false if it doesn't
62
- */
63
- validateMarker(marker) {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- const result = yield this._fetchGet(`/marker-validation/${marker}`);
66
- return result;
67
- });
68
- }
69
- }
70
- //# sourceMappingURL=productStatusesApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"productStatusesApi.js","sourceRoot":"","sources":["../../../src/product-statuses/productStatusesApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAA;AAGvC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,QAAQ;IACpD,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,+BAA+B,CAAA;IAChD,CAAC;IAED;;;;OAIG;IACU,kBAAkB;;YAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,sBAAsB,CAAC,EAAS;;YACzC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAC7C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,yBAAyB,CAAC,MAAa;;YAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;YACxD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,cAAc,CAAC,MAAa;;YACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,sBAAsB,MAAM,EAAE,CAAC,CAAA;YACnE,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ"}
@@ -1,15 +0,0 @@
1
- import { ILocalizeInfos } from "../base/utils";
2
- interface IProductStatuses {
3
- getProductStatuses(): Promise<Array<IProductStatusEntity>>;
4
- getProductStatusesById(id: number): Promise<IProductStatusEntity>;
5
- getProductsByStatusMarker(marker: string): Promise<IProductStatusEntity>;
6
- validateMarker(marker: string): Promise<boolean>;
7
- }
8
- interface IProductStatusEntity {
9
- id: number;
10
- updatedDate: string;
11
- version: number;
12
- identifier: string;
13
- localizeInfos: ILocalizeInfos;
14
- }
15
- export { IProductStatuses, IProductStatusEntity };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=productStatusesInterfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"productStatusesInterfaces.js","sourceRoot":"","sources":["../../../src/product-statuses/productStatusesInterfaces.ts"],"names":[],"mappings":""}
@@ -1,195 +0,0 @@
1
- import { IProductsQuery, IFilterParams, IProductApi, IProductsEntity } from './productsInterfaces';
2
- import OneEntry from '../base/oneEntry';
3
- /**
4
- * Controllers for working with product pages
5
- */
6
- export default class ProductApi extends OneEntry implements IProductApi {
7
- constructor(url: string);
8
- private _defaultQuery;
9
- /**
10
- * Search for all product page objects with pagination and filtering.
11
- *
12
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
13
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
14
- *
15
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
16
- *
17
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
18
- *
19
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched
20
- *
21
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
22
- *
23
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
24
- *
25
- * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
26
- *
27
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
28
- *
29
- * @param {string} [userQuery.sortKey] - Optional field to sort by
30
- *
31
- * @returns {Promise<IProduct[]>} - List of products.
32
- */
33
- getProducts(userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
34
- /**
35
- * Search for all product page objects with pagination that do not have a category.
36
- *
37
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
38
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
39
- *
40
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
41
- *
42
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
43
- *
44
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched
45
- *
46
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
47
- *
48
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
49
- *
50
- * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
51
- *
52
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
53
- *
54
- * @param {string} [userQuery.sortKey] - Optional field to sort by
55
- *
56
- * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
57
- */
58
- getProductsEmptyPage(userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
59
- /**
60
- * Search for all product page objects with pagination for the selected category.
61
- *
62
- * @param {number} [id] - Page identifier.
63
- *
64
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
65
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
66
- *
67
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
68
- *
69
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
70
- *
71
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched
72
- *
73
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
74
- *
75
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
76
- *
77
- * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
78
- *
79
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
80
- *
81
- * @param {string} [userQuery.sortKey] - Optional field to sort by
82
- *
83
- * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
84
- */
85
- getProductsPageById(id: number, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
86
- /**
87
- * Search for all product page objects with pagination for the selected category (by its URL).
88
- *
89
- * @param {string} [url] - URL of the category page.
90
- *
91
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
92
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
93
- *
94
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
95
- *
96
- * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
97
- *
98
- * @param {string} [userQuery.conditionValue] - Optional value that is being searched
99
- *
100
- * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
101
- *
102
- * @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
103
- *
104
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
105
- *
106
- * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
107
- *
108
- * @param {string} [userQuery.sortKey] - Optional field to sort by
109
- *
110
- * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
111
- */
112
- getProductsPageByUrl(url: string, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
113
- /**
114
- * Find all related product page objects.
115
- *
116
- * @param {number} [id] - Product page identifier for which to find relationship.
117
- *
118
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
119
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
120
- *
121
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
122
- *
123
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
124
- *
125
- * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
126
- *
127
- * @param {string} [userQuery.sortKey] - Optional field to sort by
128
- *
129
- * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
130
- */
131
- getRelatedProductsById(id: number, userQuery?: IProductsQuery): Promise<IProductsEntity>;
132
- /**
133
- * Retrieve one product object.
134
- *
135
- * @param {number} [id] - Product id.
136
- *
137
- * @param {string | Array<string>} [langCode] Language code parameter. Default "en_US". Нou can also pass several language parameters ['en_US', 'it_IT']
138
- *
139
- * @returns {Promise<IProductsEntity>} - Returns ContentIndexedProductDto object for the product.
140
- */
141
- getProductById(id: number, langCode?: string | Array<string>): Promise<IProductsEntity>;
142
- /**
143
- * Find all product page objects with pagination and multiple filtering.
144
- *
145
- * @param {array} [data] - Request body.
146
- *
147
- * @example
148
- * const objects = [
149
- * {
150
- * attributeMarker: "price",
151
- * conditionMarker: "mth",
152
- * conditionValue: 1,
153
- * pageId: 0,
154
- * },
155
- * {
156
- * attributeMarker: "price",
157
- * conditionMarker: "lth",
158
- * conditionValue: 3,
159
- * pageId: 0,
160
- * },
161
- * ];
162
- * @param {IProductsQuery} [userQuery] - Optional set query parameters.
163
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
164
- *
165
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
166
- *
167
- * @param {string} [userQuery.langCode] Language code parameter. Default "en_US"
168
- *
169
- * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
170
- *
171
- * @param {string} [userQuery.sortKey] - Optional field to sort by
172
- *
173
- * @returns {Promise<IProduct[]>} - Returns array of items, where item - ContentIndexedProductDto objects.
174
- */
175
- filterProduct(data: Array<IFilterParams>, userQuery?: IProductsQuery): Promise<Array<IProductsEntity>>;
176
- /**
177
- * Quick search for product page objects with limited output.
178
- *
179
- * @param {string} [name] - Text to search product page objects (search is based on the title field of the localizeInfos object with language consideration)
180
- *
181
- * @param {string} [langCode] - Language code
182
- *
183
- * @returns {Promise<IProduct[]>} - Returns array of ContentIndexedProductDto object for the product.
184
- */
185
- searchProduct(name: string, langCode?: string): Promise<Array<IProductsEntity>>;
186
- /**
187
- * Get all attributes of one Product.
188
- *
189
- * @param {number} [id] - Product id.
190
- *
191
- * @returns {Promise<IProduct[]>} - Returns array of set attributes.
192
- */
193
- getAttributesByProductId(id: number): Promise<any>;
194
- private _normalizeProductData;
195
- }