cloudcommerce 0.39.0 → 0.40.0

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 (205) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  3. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  4. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  5. package/ecomplus-stores/barra-doce/package.json +2 -2
  6. package/package.json +6 -6
  7. package/packages/api/lib/api.d.ts +2 -2
  8. package/packages/api/package.json +1 -1
  9. package/packages/api/types/applications.d.ts +15 -0
  10. package/packages/api/types/authentications.d.ts +14 -0
  11. package/packages/api/types/brands.d.ts +17 -0
  12. package/packages/api/types/carts.d.ts +12 -0
  13. package/packages/api/types/categories.d.ts +17 -0
  14. package/packages/api/types/collections.d.ts +15 -0
  15. package/packages/api/types/customers.d.ts +12 -0
  16. package/packages/api/types/grids.d.ts +15 -0
  17. package/packages/api/types/orders.d.ts +15 -0
  18. package/packages/api/types/products.d.ts +17 -0
  19. package/packages/api/types/stores.d.ts +15 -0
  20. package/packages/api/types.d.ts +34 -8
  21. package/packages/apps/affilate-program/package.json +1 -1
  22. package/packages/apps/correios/package.json +2 -2
  23. package/packages/apps/custom-payment/package.json +1 -1
  24. package/packages/apps/custom-shipping/package.json +1 -1
  25. package/packages/apps/datafrete/package.json +2 -2
  26. package/packages/apps/discounts/package.json +2 -2
  27. package/packages/apps/emails/package.json +1 -1
  28. package/packages/apps/fb-conversions/package.json +1 -1
  29. package/packages/apps/flash-courier/package.json +1 -1
  30. package/packages/apps/frenet/package.json +1 -1
  31. package/packages/apps/galaxpay/package.json +1 -1
  32. package/packages/apps/google-analytics/package.json +1 -1
  33. package/packages/apps/jadlog/package.json +1 -1
  34. package/packages/apps/loyalty-points/package.json +2 -2
  35. package/packages/apps/mandae/package.json +2 -2
  36. package/packages/apps/melhor-envio/package.json +1 -1
  37. package/packages/apps/mercadopago/package.json +1 -1
  38. package/packages/apps/pagarme/package.json +1 -1
  39. package/packages/apps/pagarme-v5/package.json +2 -2
  40. package/packages/apps/paghiper/package.json +1 -1
  41. package/packages/apps/pix/package.json +1 -1
  42. package/packages/apps/tiny-erp/package.json +2 -2
  43. package/packages/apps/webhooks/package.json +1 -1
  44. package/packages/cli/config/firebase.json +1 -1
  45. package/packages/cli/package.json +1 -1
  46. package/packages/config/package.json +1 -1
  47. package/packages/emails/package.json +1 -1
  48. package/packages/eslint/package.json +5 -5
  49. package/packages/eslint/storefront.eslintrc.cjs +1 -0
  50. package/packages/events/package.json +1 -1
  51. package/packages/feeds/package.json +1 -1
  52. package/packages/firebase/package.json +2 -2
  53. package/packages/i18n/lib/en_us/i19anyPrice.txt +1 -0
  54. package/packages/i18n/lib/en_us/i19filterOut.txt +1 -0
  55. package/packages/i18n/lib/en_us/i19loadMoreProducts.txt +1 -0
  56. package/packages/i18n/lib/en_us/i19noProductsFound.txt +1 -0
  57. package/packages/i18n/lib/en_us/i19noProductsFoundFor$1.txt +1 -0
  58. package/packages/i18n/lib/en_us/i19noProductsInBrandMsg.txt +1 -0
  59. package/packages/i18n/lib/en_us/i19noProductsInCategoryMsg.txt +1 -0
  60. package/packages/i18n/lib/en_us.d.ts +8 -3
  61. package/packages/i18n/lib/en_us.js +8 -3
  62. package/packages/i18n/lib/en_us.js.map +1 -1
  63. package/packages/i18n/lib/pt_br/i19anyPrice.txt +1 -0
  64. package/packages/i18n/lib/pt_br/i19filterOut.txt +1 -0
  65. package/packages/i18n/lib/pt_br/i19loadMoreProducts.txt +1 -0
  66. package/packages/i18n/lib/pt_br/i19noItemSelected.txt +1 -1
  67. package/packages/i18n/lib/pt_br/i19noProductsFoundFor$1.txt +1 -0
  68. package/packages/i18n/lib/pt_br/i19noProductsInBrandMsg.txt +1 -0
  69. package/packages/i18n/lib/pt_br/i19noProductsInCategoryMsg.txt +1 -0
  70. package/packages/i18n/lib/pt_br.d.ts +9 -4
  71. package/packages/i18n/lib/pt_br.js +9 -4
  72. package/packages/i18n/lib/pt_br.js.map +1 -1
  73. package/packages/i18n/package.json +1 -1
  74. package/packages/i18n/src/en_us.ts +8 -3
  75. package/packages/i18n/src/pt_br.ts +9 -4
  76. package/packages/modules/package.json +2 -2
  77. package/packages/passport/package.json +1 -1
  78. package/packages/ssr/events.js +0 -0
  79. package/packages/ssr/package.json +6 -6
  80. package/packages/storefront/dist/client/_astro/AccountPage.Osc6ffV0.js +1 -0
  81. package/packages/storefront/dist/client/_astro/{CartSidebar.1kUFk9Xn.js → CartSidebar.LrfpXG2B.js} +1 -1
  82. package/packages/storefront/dist/client/_astro/HeroSlider.Zf6kCaqD.js +1 -0
  83. package/packages/storefront/dist/client/_astro/PitchBar.N4d9fV8H.js +1 -0
  84. package/packages/storefront/dist/client/_astro/{Prices.PuQc6C7F.js → Prices.eQ9Vd255.js} +1 -1
  85. package/packages/storefront/dist/client/_astro/ProductDetails.Ln_jf57U.js +7 -0
  86. package/packages/storefront/dist/client/_astro/ProductShelf.X389bv9S.js +1 -0
  87. package/packages/storefront/dist/client/_astro/ProductShelf.vj6lVDCr.js +1 -0
  88. package/packages/storefront/dist/client/_astro/{QuantitySelector.YNmWjN8y.js → QuantitySelector.qSJQlvTe.js} +1 -1
  89. package/packages/storefront/dist/client/_astro/SearchModal.BrVoDBvg.js +1 -0
  90. package/packages/storefront/dist/client/_astro/SearchShowcase.KAz3nwco.js +1 -0
  91. package/packages/storefront/dist/client/_astro/ShopHeader.mFKGzhIu.js +7 -0
  92. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper._suIQ7WC.js +1 -0
  93. package/packages/storefront/dist/client/_astro/_slug_.cfRx-rdA.css +1 -0
  94. package/packages/storefront/dist/client/_astro/client.PdegUP6S.js +1 -0
  95. package/packages/storefront/dist/client/_astro/{customer-session._VkzXnXT.js → customer-session.KkTHFOXl.js} +1 -1
  96. package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
  97. package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
  98. package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
  99. package/packages/storefront/dist/client/_astro/ecom-utils.Ld2zf-Ve.js +1 -0
  100. package/packages/storefront/dist/client/_astro/{format-money.FMQXgKHB.js → format-money.Axn0YFLJ.js} +1 -1
  101. package/packages/storefront/dist/client/_astro/grid-title.GntHOijE.js +1 -0
  102. package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
  103. package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
  104. package/packages/storefront/dist/client/_astro/{hoisted._FbzheVm.js → hoisted.3ec9NcvP.js} +1 -1
  105. package/packages/storefront/dist/client/_astro/{hoisted.B6fKrLPR.js → hoisted.UnTlypMd.js} +1 -1
  106. package/packages/storefront/dist/client/_astro/{i18n.m7SpISxy.js → i18n.3-NUtxYq.js} +1 -1
  107. package/packages/storefront/dist/client/_astro/{img.zh-Drf-O.js → img.pozlYdd3.js} +1 -1
  108. package/packages/storefront/dist/client/_astro/{index.XrHFaN2F.js → index.TkCbiY_p.js} +1 -1
  109. package/packages/storefront/dist/client/_astro/{index.5PN-EYMS.js → index.m6fK0JXC.js} +1 -1
  110. package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
  111. package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
  112. package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
  113. package/packages/storefront/dist/client/_astro/{modules-info.sD0tdb2b.js → modules-info.mmwB1qIJ.js} +1 -1
  114. package/packages/storefront/dist/client/_astro/name.49dZlpDx.js +1 -0
  115. package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
  116. package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
  117. package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
  118. package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
  119. package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
  120. package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
  121. package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
  122. package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
  123. package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
  124. package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
  125. package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
  126. package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
  127. package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
  128. package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
  129. package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
  130. package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
  131. package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
  132. package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
  133. package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
  134. package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
  135. package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
  136. package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
  137. package/packages/storefront/dist/client/_astro/sf-utils.yjuG8NjM.js +1 -0
  138. package/packages/storefront/dist/client/_astro/{shopping-cart.A-1jhlKi.js → shopping-cart.Ean2uW2R.js} +1 -1
  139. package/packages/storefront/dist/client/_astro/use-analytics.Y7amTmnr.js +1 -0
  140. package/packages/storefront/dist/client/_astro/{use-product-card.erbOV6Fv.js → use-product-card.zB4z32bC.js} +1 -1
  141. package/packages/storefront/dist/client/_astro/use-text-value.f9pDzruv.js +4 -0
  142. package/packages/storefront/dist/client/app/account/index.html +56 -0
  143. package/packages/storefront/dist/client/app/index.html +96 -0
  144. package/packages/storefront/dist/client/headset-gamer-corsair-hs40-raptor-ca-9011122-naap-vinho/index.html +107 -0
  145. package/packages/storefront/dist/client/index.html +120 -0
  146. package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +107 -0
  147. package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +107 -0
  148. package/packages/storefront/dist/client/teclado-gamer-fortrek-mecanico-k5-rgb-outemu-blue-preto/index.html +107 -0
  149. package/packages/storefront/dist/client/~fallback/index.html +74 -0
  150. package/packages/storefront/dist/server/chunks/{CartSidebar_hAgJQJgm.mjs → CartSidebar_gCUGFy65.mjs} +1 -1
  151. package/packages/storefront/dist/server/chunks/{SearchModal_eWb5SdQM.mjs → SearchModal_2uYZ9tHy.mjs} +4 -5
  152. package/packages/storefront/dist/server/chunks/{_.._S7DDBn_b.mjs → _.._FnNLvTNv.mjs} +1 -1
  153. package/packages/storefront/dist/server/chunks/{account_3ySmGzMc.mjs → account_iZ2QmK5E.mjs} +1 -1
  154. package/packages/storefront/dist/server/chunks/astro/{assets-service_QlOZG8ov.mjs → assets-service_TpUb271h.mjs} +58 -136
  155. package/packages/storefront/dist/server/chunks/{astro_zcC1GStV.mjs → astro_PpArQAsY.mjs} +4 -4
  156. package/packages/storefront/dist/server/chunks/{index_nIwq11oA.mjs → index_1q5IpD39.mjs} +1 -1
  157. package/packages/storefront/dist/server/chunks/{index_uAR5ZV4d.mjs → index_JEU6B2DI.mjs} +1 -1
  158. package/packages/storefront/dist/server/chunks/{node_2VvC7trl.mjs → node_wOa5hJmt.mjs} +1 -1
  159. package/packages/storefront/dist/server/chunks/pages/{__MSibDuuV.mjs → __cEcxuEWe.mjs} +1674 -422
  160. package/packages/storefront/dist/server/chunks/pages/{account_iG-YqJ5q.mjs → account_WliDuQOB.mjs} +2 -2
  161. package/packages/storefront/dist/server/chunks/pages/{index_BtDyKPh_.mjs → index_2bQLkQf-.mjs} +3 -3
  162. package/packages/storefront/dist/server/chunks/pages/{node_bKqL47eZ.mjs → node_ZaY4t9qW.mjs} +21 -2
  163. package/packages/storefront/dist/server/chunks/pages/{~fallback_73R5VA6j.mjs → ~fallback_TL5hPXF_.mjs} +2 -2
  164. package/packages/storefront/dist/server/chunks/{~fallback_7q1dqY4e.mjs → ~fallback_wxuqpDXG.mjs} +1 -1
  165. package/packages/storefront/dist/server/entry.mjs +34 -16
  166. package/packages/storefront/dist/server/{manifest_dSwvaOdW.mjs → manifest_YgAgEwvF.mjs} +17 -16
  167. package/packages/storefront/dist/server/renderers.mjs +14 -3
  168. package/packages/storefront/package.json +12 -12
  169. package/packages/storefront/src/helpers/sf-utils.ts +11 -0
  170. package/packages/storefront/src/lib/$storefront.d.ts +7 -1
  171. package/packages/storefront/src/lib/components/Drawer.vue +13 -8
  172. package/packages/storefront/src/lib/components/globals/ALink.vue +1 -1
  173. package/packages/storefront/src/lib/composables/use-pagination.ts +61 -0
  174. package/packages/storefront/src/lib/composables/use-product-shelf.ts +29 -19
  175. package/packages/storefront/src/lib/composables/use-search-filters.ts +271 -0
  176. package/packages/storefront/src/lib/composables/use-search-modal.ts +2 -11
  177. package/packages/storefront/src/lib/composables/use-search-showcase.ts +168 -22
  178. package/packages/storefront/src/lib/composables/use-sku-selector.ts +3 -8
  179. package/packages/storefront/src/lib/layouts/use-page-main.ts +20 -8
  180. package/packages/storefront/src/lib/state/search-engine.ts +19 -6
  181. package/packages/storefront/tsconfig.json +1 -1
  182. package/packages/test-base/package.json +1 -1
  183. package/packages/types/package.json +1 -1
  184. package/packages/i18n/lib/en_us/i19noProduct.txt +0 -1
  185. package/packages/i18n/lib/en_us/i19noResultsFor.txt +0 -1
  186. package/packages/i18n/lib/pt_br/i19noResultsFor.txt +0 -1
  187. package/packages/storefront/dist/client/_astro/AccountPage.j0C5JBLY.js +0 -1
  188. package/packages/storefront/dist/client/_astro/HeroSlider.tR1dVXyu.js +0 -1
  189. package/packages/storefront/dist/client/_astro/PitchBar.FelC04wE.js +0 -1
  190. package/packages/storefront/dist/client/_astro/ProductCard.ephJafAE.js +0 -1
  191. package/packages/storefront/dist/client/_astro/ProductDetails.B6Ih5MGf.js +0 -7
  192. package/packages/storefront/dist/client/_astro/ProductShelf.GESxuPZ_.js +0 -1
  193. package/packages/storefront/dist/client/_astro/SearchContainer.BzixfU3R.js +0 -1
  194. package/packages/storefront/dist/client/_astro/SearchModal.F7vbwxIv.js +0 -1
  195. package/packages/storefront/dist/client/_astro/ShopHeader.5vR1LgSW.js +0 -10
  196. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.sk5AFsEV.js +0 -1
  197. package/packages/storefront/dist/client/_astro/_slug_.r8QHNfdw.css +0 -1
  198. package/packages/storefront/dist/client/_astro/client.RF8UxjZd.js +0 -1
  199. package/packages/storefront/dist/client/_astro/ecom-utils.gJYgRPRz.js +0 -1
  200. package/packages/storefront/dist/client/_astro/name.HU5l7TJo.js +0 -1
  201. package/packages/storefront/dist/client/_astro/sf-utils.5t7r9A2G.js +0 -1
  202. package/packages/storefront/dist/client/_astro/use-analytics.1EVxbrS7.js +0 -1
  203. /package/packages/i18n/lib/en_us/{i19relatedProduct.txt → i19relatedProducts.txt} +0 -0
  204. /package/packages/i18n/lib/pt_br/{i19noProduct.txt → i19noProductsFound.txt} +0 -0
  205. /package/packages/i18n/lib/pt_br/{i19relatedProduct.txt → i19relatedProducts.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,61 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.40.0](https://github.com/ecomplus/cloud-commerce/compare/v0.39.0...v0.40.0) (2023-12-29)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * **i18n:** `i19relatedProduct` properly renamed to `i19relatedProducts`
11
+ * **storefront:** `useSearchShowcase` prop changed from `params` to `fixedParams`
12
+ * **storefront:** Renaming `searchMeta` prop&return to `resultMeta`
13
+ * **storefront:** `useSearchEngine` API changed removing `sort` prop
14
+
15
+ ### Features
16
+
17
+ * **api:** New interface and type updates adding `searches` resource ([e165a13](https://github.com/ecomplus/cloud-commerce/commit/e165a136f207404cca63400f0bdc8d53811f7692))
18
+ * **i18n:** Add `i19anyPrice` ([4308611](https://github.com/ecomplus/cloud-commerce/commit/43086119874d86ccd4bfa95312377de8e02eaea3))
19
+ * **i18n:** Add `i19filterOut` ([f4b31ee](https://github.com/ecomplus/cloud-commerce/commit/f4b31eecbd9874ebb872f9a52c7ce570ba549603))
20
+ * **i18n:** Add `i19loadMoreProducts` ([40016e3](https://github.com/ecomplus/cloud-commerce/commit/40016e30a37ec86757a981c59b09ac3d2a5efcd5))
21
+ * **storefront:** Abstract handling `sortOption` (optionally) on search showcase composable ([9e170e8](https://github.com/ecomplus/cloud-commerce/commit/9e170e88afaff6a38cb6e68cef33946b91db5f63))
22
+ * **storefront:** Add `canLockScroll` prop to `Drawer` ([87b9b7e](https://github.com/ecomplus/cloud-commerce/commit/87b9b7e21edf4b3544c26d844eb0416830d070da))
23
+ * **storefront:** Add `isRelatedProducts` optional prop to products shelf composable ([09c4f7a](https://github.com/ecomplus/cloud-commerce/commit/09c4f7adaf73b55f03ff453ce2d982b7bd045afb))
24
+ * **storefront:** Add `sortOptions` to search showcase composable return ([fe41f0f](https://github.com/ecomplus/cloud-commerce/commit/fe41f0fad39f6d24e5d1e70a5dee937bd86c7460))
25
+ * **storefront:** Adding `searchMeta` to search showcase composable ([3525402](https://github.com/ecomplus/cloud-commerce/commit/3525402ec18529cdf631da703042f0d96dc2645d))
26
+ * **storefront:** Better defining some global `$storefront.data` types with partial resources lists ([a6f938a](https://github.com/ecomplus/cloud-commerce/commit/a6f938ab66a30efac18a55e0ead9364bb2885d93))
27
+ * **storefront:** Bypassing sections `doc-banner` and `page-title` on `usePageSections` ([cbd7297](https://github.com/ecomplus/cloud-commerce/commit/cbd729797137ab113b4a0724af940709ce0ead42))
28
+ * **storefront:** Completing `useSearchFilters` composable with filter options handlers ([5cdf744](https://github.com/ecomplus/cloud-commerce/commit/5cdf744a3bb1204a7926029a1cef6f11e3c4bf6d))
29
+ * **storefront:** Completing `useSearchFilters` composable with specs filters ([92c549e](https://github.com/ecomplus/cloud-commerce/commit/92c549e87fd38a37655804098e62eb4ced75dc62))
30
+ * **storefront:** Export new utility method `scrollToEl` ([7c5b5eb](https://github.com/ecomplus/cloud-commerce/commit/7c5b5eb73d79e36e52c8a2d416086121fca3ee2f))
31
+ * **storefront:** New `activeFilters` and `filtersCount` also returned from search showcase ([8474db3](https://github.com/ecomplus/cloud-commerce/commit/8474db3f45a7ec84f09b5567425d9ac46a3cf93e))
32
+ * **storefront:** New `usePagination` composable ([32877aa](https://github.com/ecomplus/cloud-commerce/commit/32877aaad4f4326c62e35031ab5f42f827e7bc1b))
33
+ * **storefront:** New `useSearchFilters` composable ([0bc450d](https://github.com/ecomplus/cloud-commerce/commit/0bc450dd7f042104ae6dfa0597361fd2e40d02c2))
34
+ * **storefront:** New method `setResult` to search engine class ([1c756d8](https://github.com/ecomplus/cloud-commerce/commit/1c756d89ebd8a62c4ade5fc3c178360ab13a3e53))
35
+ * **storefront:** Properly sync filters and pagination with URL on search showcase ([8152ed1](https://github.com/ecomplus/cloud-commerce/commit/8152ed1ebfcb63298aa9fc9ca8f210abaa33ccf6))
36
+ * **storefront:** Renaming section `doc-banners` and adding `custom-html` on `usePageSections` ([174db80](https://github.com/ecomplus/cloud-commerce/commit/174db80e6c6b32c41883e42592fe97cdb2c8e8d6))
37
+ * **storefront:** Update search showcase composable with pagination abstractions ([5752e39](https://github.com/ecomplus/cloud-commerce/commit/5752e395aca219a799141b4136acbbd702f757a0))
38
+
39
+
40
+ ### Bug Fixes
41
+
42
+ * **api:** Fixing returned result typedef for search requests with query string ([4fbfa88](https://github.com/ecomplus/cloud-commerce/commit/4fbfa8850a11a323d0934039a39c7932d1001cc0))
43
+ * **api:** Proper typedef for stores/me and authentications/me responses ([#292](https://github.com/ecomplus/cloud-commerce/issues/292)) ([07598a7](https://github.com/ecomplus/cloud-commerce/commit/07598a775490a77acf30d6a109bf5e0b86810a27))
44
+ * **api:** Updating config params typedef to accept undefined properties ([37175e1](https://github.com/ecomplus/cloud-commerce/commit/37175e1340b434c477648bf65a14196f597c176c))
45
+ * **api:** Updating typdefs for search v2 response buckets ([757a485](https://github.com/ecomplus/cloud-commerce/commit/757a48592fb38b2a1aa16f8b89938802acbaec8c))
46
+ * **deps:** Update Astro to v4.0.6 ([#288](https://github.com/ecomplus/cloud-commerce/issues/288)) ([d57416b](https://github.com/ecomplus/cloud-commerce/commit/d57416b460c77cb521b991e7a2f317a5989879b8))
47
+ * **deps:** Update non-major dependencies ([#295](https://github.com/ecomplus/cloud-commerce/issues/295)) ([5ec12dd](https://github.com/ecomplus/cloud-commerce/commit/5ec12dd2730c11247cf0e096ac5680ab6b3dd506))
48
+ * **deps:** Update Vue to v3.3.12 ([#289](https://github.com/ecomplus/cloud-commerce/issues/289)) ([c440202](https://github.com/ecomplus/cloud-commerce/commit/c44020239f3720c61ee0a2844a212b831ee26a55))
49
+ * **i18n:** Fix `i19noItemSelected`, `i19noProductsFound`, `i19noProductsFoundFor$1` ([fef8b35](https://github.com/ecomplus/cloud-commerce/commit/fef8b3522e92e6fe426ae7e5176eb824c9f7d0ea))
50
+ * **i18n:** Fix `i19reltedProducts` ([d49c2fd](https://github.com/ecomplus/cloud-commerce/commit/d49c2fd0d1d078f1d80713c8de21462b14841e7a))
51
+ * **storefront:** Fix `SearchEngine` params reusing API client config typedef ([4313b70](https://github.com/ecomplus/cloud-commerce/commit/4313b70774c3771eb5c1d582ce10258fe7798607))
52
+ * **storefront:** Fix `SearchEngine` params types removing null(s) following API params typedef ([0fd9c6b](https://github.com/ecomplus/cloud-commerce/commit/0fd9c6b8fe5e61765ce731ac180eda2f483195f8))
53
+ * **storefront:** Update Astro to v4.0.6 ([#293](https://github.com/ecomplus/cloud-commerce/issues/293)) ([50adca0](https://github.com/ecomplus/cloud-commerce/commit/50adca094c169171ddbb011f27d6b4ebfc19a17f))
54
+ * **storefront:** Update Vue to v3.3.13 ([#294](https://github.com/ecomplus/cloud-commerce/issues/294)) ([7c88a09](https://github.com/ecomplus/cloud-commerce/commit/7c88a09deccaec88dad33582f7aa3ee084480be5))
55
+
56
+
57
+ * **storefront:** Remove `sort` prop from search showcase composable ([9dff758](https://github.com/ecomplus/cloud-commerce/commit/9dff758b988ecdf2dbd78ca7d3e898135d46d023))
58
+ * **storefront:** Renaming prop `fixedParams` on search showcase composable ([e1404ba](https://github.com/ecomplus/cloud-commerce/commit/e1404baafbb37bc7ea45e060f87d75df08758b77))
59
+
5
60
  ## [0.39.0](https://github.com/ecomplus/cloud-commerce/compare/v0.38.0...v0.39.0) (2023-12-15)
6
61
 
7
62
 
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^0.38.0",
19
- "@cloudcommerce/firebase": "^0.38.0",
20
- "@cloudcommerce/passport": "^0.38.0"
18
+ "@cloudcommerce/feeds": "^0.39.0",
19
+ "@cloudcommerce/firebase": "^0.39.0",
20
+ "@cloudcommerce/passport": "^0.39.0"
21
21
  }
22
22
  }
@@ -17,15 +17,15 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.38.0",
21
- "@cloudcommerce/firebase": "^0.38.0",
22
- "@cloudcommerce/ssr": "^0.38.0",
20
+ "@cloudcommerce/api": "^0.39.0",
21
+ "@cloudcommerce/firebase": "^0.39.0",
22
+ "@cloudcommerce/ssr": "^0.39.0",
23
23
  "@headlessui/vue": "^1.7.16"
24
24
  },
25
25
  "devDependencies": {
26
- "@cloudcommerce/i18n": "^0.38.0",
27
- "@cloudcommerce/storefront": "^0.38.0",
28
- "@cloudcommerce/types": "^0.38.0",
26
+ "@cloudcommerce/i18n": "^0.39.0",
27
+ "@cloudcommerce/storefront": "^0.39.0",
28
+ "@cloudcommerce/types": "^0.39.0",
29
29
  "@fontsource/croissant-one": "^5.0.17",
30
30
  "@iconify-json/mingcute": "^1.1.11",
31
31
  "photoswipe": "^5.4.2"
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^0.38.0",
19
- "@cloudcommerce/firebase": "^0.38.0",
20
- "@cloudcommerce/modules": "^0.38.0"
18
+ "@cloudcommerce/events": "^0.39.0",
19
+ "@cloudcommerce/firebase": "^0.39.0",
20
+ "@cloudcommerce/modules": "^0.39.0"
21
21
  }
22
22
  }
@@ -23,9 +23,9 @@
23
23
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@cloudcommerce/cli": "^0.38.0"
26
+ "@cloudcommerce/cli": "^0.39.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/eslint": "^0.38.0"
29
+ "@cloudcommerce/eslint": "^0.39.0"
30
30
  }
31
31
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "0.39.0",
4
+ "version": "0.40.0",
5
5
  "description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
6
6
  "main": "packages/api/lib/index.js",
7
7
  "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
@@ -20,17 +20,17 @@
20
20
  "@commitlint/config-conventional": "^18.4.3",
21
21
  "@commitlint/rules": "^18.4.3",
22
22
  "@types/node": "^18.19.3",
23
- "eslint": "^8.55.0",
23
+ "eslint": "^8.56.0",
24
24
  "husky": "^8.0.3",
25
25
  "standard-version": "^9.5.0",
26
26
  "ts-node": "^10.9.2",
27
- "turbo": "^1.11.1",
27
+ "turbo": "^1.11.2",
28
28
  "typescript": "~5.2.2",
29
29
  "uglify-js": "^3.17.4",
30
- "vite": "^5.0.8",
31
- "vitest": "^1.0.4",
30
+ "vite": "^5.0.10",
31
+ "vitest": "^1.1.0",
32
32
  "zx": "^7.2.3",
33
- "@cloudcommerce/eslint": "0.39.0"
33
+ "@cloudcommerce/eslint": "0.40.0"
34
34
  },
35
35
  "scripts": {
36
36
  "fix-install": "bash scripts/pre-install.sh && pnpm i",
@@ -59,7 +59,7 @@ declare const api: {
59
59
  _id: import("../types.d").ResourceId;
60
60
  };
61
61
  }>;
62
- put: <E_1 extends import("../types.d").ResourceAndFind | `products/${import("../types.d").ResourceId}/${string}` | `categories/${import("../types.d").ResourceId}/${string}` | `brands/${import("../types.d").ResourceId}/${string}` | `collections/${import("../types.d").ResourceId}/${string}` | `grids/${import("../types.d").ResourceId}/${string}` | `carts/${import("../types.d").ResourceId}/${string}` | `orders/${import("../types.d").ResourceId}/${string}` | `customers/${import("../types.d").ResourceId}/${string}` | `stores/${import("../types.d").ResourceId}/${string}` | `applications/${import("../types.d").ResourceId}/${string}` | `authentications/${import("../types.d").ResourceId}/${string}` | `products/${string}:${string}/${string}` | `categories/${string}:${string}/${string}` | `brands/${string}:${string}/${string}` | `collections/${string}:${string}/${string}` | `grids/${string}:${string}/${string}` | `carts/${string}:${string}/${string}` | `orders/${string}:${string}/${string}` | `customers/${string}:${string}/${string}` | `stores/${string}:${string}/${string}` | `applications/${string}:${string}/${string}` | `authentications/${string}:${string}/${string}` | `stores/me/${string}` | `authentications/me/${string}` | `slugs/${string}` | ("search/v1" | `search/v1?${string}` | "search/_els" | `search/_els?${string}`) | ("events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${import("../types.d").ResourceId}` | `events/categories/${import("../types.d").ResourceId}` | `events/brands/${import("../types.d").ResourceId}` | `events/collections/${import("../types.d").ResourceId}` | `events/grids/${import("../types.d").ResourceId}` | `events/carts/${import("../types.d").ResourceId}` | `events/orders/${import("../types.d").ResourceId}` | `events/customers/${import("../types.d").ResourceId}` | `events/stores/${import("../types.d").ResourceId}` | `events/applications/${import("../types.d").ResourceId}` | `events/authentications/${import("../types.d").ResourceId}` | "events/me") | "login" | "authenticate" | "ask-auth-callback" | "check-username" | "$aggregate/products" | "$aggregate/categories" | "$aggregate/brands" | "$aggregate/collections" | "$aggregate/grids" | "$aggregate/carts" | "$aggregate/orders" | "$aggregate/customers" | "schemas/products" | "schemas/categories" | "schemas/brands" | "schemas/collections" | "schemas/grids" | "schemas/carts" | "schemas/orders" | "schemas/customers" | "schemas/stores" | "schemas/applications" | "schemas/authentications", C_1 extends AbstractedConfig>(endpoint: E_1, body: RequestBody<{
62
+ put: <E_1 extends import("../types.d").ResourceAndFind | `products/${import("../types.d").ResourceId}/${string}` | `categories/${import("../types.d").ResourceId}/${string}` | `brands/${import("../types.d").ResourceId}/${string}` | `collections/${import("../types.d").ResourceId}/${string}` | `grids/${import("../types.d").ResourceId}/${string}` | `carts/${import("../types.d").ResourceId}/${string}` | `orders/${import("../types.d").ResourceId}/${string}` | `customers/${import("../types.d").ResourceId}/${string}` | `stores/${import("../types.d").ResourceId}/${string}` | `applications/${import("../types.d").ResourceId}/${string}` | `authentications/${import("../types.d").ResourceId}/${string}` | `products/${string}:${string}/${string}` | `categories/${string}:${string}/${string}` | `brands/${string}:${string}/${string}` | `collections/${string}:${string}/${string}` | `grids/${string}:${string}/${string}` | `carts/${string}:${string}/${string}` | `orders/${string}:${string}/${string}` | `customers/${string}:${string}/${string}` | `stores/${string}:${string}/${string}` | `applications/${string}:${string}/${string}` | `authentications/${string}:${string}/${string}` | `stores/me/${string}` | `authentications/me/${string}` | `slugs/${string}` | (("search/v1" | `search/v1?${string}`) | "search/_els" | `search/_els?${string}`) | ("search/v1/history" | `search/v1/history?${string}`) | ("events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${import("../types.d").ResourceId}` | `events/categories/${import("../types.d").ResourceId}` | `events/brands/${import("../types.d").ResourceId}` | `events/collections/${import("../types.d").ResourceId}` | `events/grids/${import("../types.d").ResourceId}` | `events/carts/${import("../types.d").ResourceId}` | `events/orders/${import("../types.d").ResourceId}` | `events/customers/${import("../types.d").ResourceId}` | `events/stores/${import("../types.d").ResourceId}` | `events/applications/${import("../types.d").ResourceId}` | `events/authentications/${import("../types.d").ResourceId}` | "events/me") | "login" | "authenticate" | "ask-auth-callback" | "check-username" | "$aggregate/products" | "$aggregate/categories" | "$aggregate/brands" | "$aggregate/collections" | "$aggregate/grids" | "$aggregate/carts" | "$aggregate/orders" | "$aggregate/customers" | "schemas/products" | "schemas/categories" | "schemas/brands" | "schemas/collections" | "schemas/grids" | "schemas/carts" | "schemas/orders" | "schemas/customers" | "schemas/stores" | "schemas/applications" | "schemas/authentications", C_1 extends AbstractedConfig>(endpoint: E_1, body: RequestBody<{
63
63
  endpoint: E_1;
64
64
  method: 'put';
65
65
  }>, config?: C_1 | undefined) => Promise<Response & {
@@ -103,7 +103,7 @@ declare const post: <E extends Endpoint, C extends AbstractedConfig>(endpoint: E
103
103
  _id: import("../types.d").ResourceId;
104
104
  };
105
105
  }>;
106
- declare const put: <E extends import("../types.d").ResourceAndFind | `products/${import("../types.d").ResourceId}/${string}` | `categories/${import("../types.d").ResourceId}/${string}` | `brands/${import("../types.d").ResourceId}/${string}` | `collections/${import("../types.d").ResourceId}/${string}` | `grids/${import("../types.d").ResourceId}/${string}` | `carts/${import("../types.d").ResourceId}/${string}` | `orders/${import("../types.d").ResourceId}/${string}` | `customers/${import("../types.d").ResourceId}/${string}` | `stores/${import("../types.d").ResourceId}/${string}` | `applications/${import("../types.d").ResourceId}/${string}` | `authentications/${import("../types.d").ResourceId}/${string}` | `products/${string}:${string}/${string}` | `categories/${string}:${string}/${string}` | `brands/${string}:${string}/${string}` | `collections/${string}:${string}/${string}` | `grids/${string}:${string}/${string}` | `carts/${string}:${string}/${string}` | `orders/${string}:${string}/${string}` | `customers/${string}:${string}/${string}` | `stores/${string}:${string}/${string}` | `applications/${string}:${string}/${string}` | `authentications/${string}:${string}/${string}` | `stores/me/${string}` | `authentications/me/${string}` | `slugs/${string}` | ("search/v1" | `search/v1?${string}` | "search/_els" | `search/_els?${string}`) | ("events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${import("../types.d").ResourceId}` | `events/categories/${import("../types.d").ResourceId}` | `events/brands/${import("../types.d").ResourceId}` | `events/collections/${import("../types.d").ResourceId}` | `events/grids/${import("../types.d").ResourceId}` | `events/carts/${import("../types.d").ResourceId}` | `events/orders/${import("../types.d").ResourceId}` | `events/customers/${import("../types.d").ResourceId}` | `events/stores/${import("../types.d").ResourceId}` | `events/applications/${import("../types.d").ResourceId}` | `events/authentications/${import("../types.d").ResourceId}` | "events/me") | "login" | "authenticate" | "ask-auth-callback" | "check-username" | "$aggregate/products" | "$aggregate/categories" | "$aggregate/brands" | "$aggregate/collections" | "$aggregate/grids" | "$aggregate/carts" | "$aggregate/orders" | "$aggregate/customers" | "schemas/products" | "schemas/categories" | "schemas/brands" | "schemas/collections" | "schemas/grids" | "schemas/carts" | "schemas/orders" | "schemas/customers" | "schemas/stores" | "schemas/applications" | "schemas/authentications", C extends AbstractedConfig>(endpoint: E, body: RequestBody<{
106
+ declare const put: <E extends import("../types.d").ResourceAndFind | `products/${import("../types.d").ResourceId}/${string}` | `categories/${import("../types.d").ResourceId}/${string}` | `brands/${import("../types.d").ResourceId}/${string}` | `collections/${import("../types.d").ResourceId}/${string}` | `grids/${import("../types.d").ResourceId}/${string}` | `carts/${import("../types.d").ResourceId}/${string}` | `orders/${import("../types.d").ResourceId}/${string}` | `customers/${import("../types.d").ResourceId}/${string}` | `stores/${import("../types.d").ResourceId}/${string}` | `applications/${import("../types.d").ResourceId}/${string}` | `authentications/${import("../types.d").ResourceId}/${string}` | `products/${string}:${string}/${string}` | `categories/${string}:${string}/${string}` | `brands/${string}:${string}/${string}` | `collections/${string}:${string}/${string}` | `grids/${string}:${string}/${string}` | `carts/${string}:${string}/${string}` | `orders/${string}:${string}/${string}` | `customers/${string}:${string}/${string}` | `stores/${string}:${string}/${string}` | `applications/${string}:${string}/${string}` | `authentications/${string}:${string}/${string}` | `stores/me/${string}` | `authentications/me/${string}` | `slugs/${string}` | (("search/v1" | `search/v1?${string}`) | "search/_els" | `search/_els?${string}`) | ("search/v1/history" | `search/v1/history?${string}`) | ("events/products" | "events/categories" | "events/brands" | "events/collections" | "events/grids" | "events/carts" | "events/orders" | "events/customers" | "events/stores" | "events/applications" | "events/authentications" | `events/products/${import("../types.d").ResourceId}` | `events/categories/${import("../types.d").ResourceId}` | `events/brands/${import("../types.d").ResourceId}` | `events/collections/${import("../types.d").ResourceId}` | `events/grids/${import("../types.d").ResourceId}` | `events/carts/${import("../types.d").ResourceId}` | `events/orders/${import("../types.d").ResourceId}` | `events/customers/${import("../types.d").ResourceId}` | `events/stores/${import("../types.d").ResourceId}` | `events/applications/${import("../types.d").ResourceId}` | `events/authentications/${import("../types.d").ResourceId}` | "events/me") | "login" | "authenticate" | "ask-auth-callback" | "check-username" | "$aggregate/products" | "$aggregate/categories" | "$aggregate/brands" | "$aggregate/collections" | "$aggregate/grids" | "$aggregate/carts" | "$aggregate/orders" | "$aggregate/customers" | "schemas/products" | "schemas/categories" | "schemas/brands" | "schemas/collections" | "schemas/grids" | "schemas/carts" | "schemas/orders" | "schemas/customers" | "schemas/stores" | "schemas/applications" | "schemas/authentications", C extends AbstractedConfig>(endpoint: E, body: RequestBody<{
107
107
  endpoint: E;
108
108
  method: 'put';
109
109
  }>, config?: C | undefined) => Promise<Response & {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/api",
3
3
  "type": "module",
4
- "version": "0.39.0",
4
+ "version": "0.40.0",
5
5
  "description": "E-Com Plus Cloud Commerce APIs client/adapter",
6
6
  "main": "lib/api.js",
7
7
  "types": "lib/api.d.ts",
@@ -5,10 +5,25 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Installed API extension app
10
+ */
8
11
  export interface Applications {
12
+ /**
13
+ * Application ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
12
27
  store_id: number;
13
28
  /**
14
29
  * ID of application on marketplace
@@ -5,11 +5,25 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Authenticated API user
10
+ */
8
11
  export interface Authentications {
12
+ /**
13
+ * Authentication ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
12
24
  /**
25
+ * List of store IDs granted for this authentication [auto]
26
+ *
13
27
  * @maxItems 500
14
28
  */
15
29
  store_ids: number[];
@@ -5,12 +5,29 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Brand object model
10
+ */
8
11
  export interface Brands {
12
+ /**
13
+ * Brand ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
12
27
  store_id: number;
13
28
  /**
29
+ * List of sales channels if brand not available in all channels
30
+ *
14
31
  * @maxItems 10
15
32
  */
16
33
  channel_ids?: string[];
@@ -9,9 +9,21 @@
9
9
  * Shopping cart object model
10
10
  */
11
11
  export interface Carts {
12
+ /**
13
+ * Cart ID (ObjectID) [auto]
14
+ */
12
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
13
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
14
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
15
27
  store_id: number;
16
28
  /**
17
29
  * Whether cart was created by staff and is trusted
@@ -5,12 +5,29 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Category object model
10
+ */
8
11
  export interface Categories {
12
+ /**
13
+ * Category ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
12
27
  store_id: number;
13
28
  /**
29
+ * List of sales channels if category not available in all channels
30
+ *
14
31
  * @maxItems 10
15
32
  */
16
33
  channel_ids?: string[];
@@ -5,10 +5,25 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Collection object model
10
+ */
8
11
  export interface Collections {
12
+ /**
13
+ * Collection ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
12
27
  store_id: number;
13
28
  /**
14
29
  * Collection full name
@@ -9,9 +9,21 @@
9
9
  * Customer object model
10
10
  */
11
11
  export interface Customers {
12
+ /**
13
+ * Customer ID (ObjectID) [auto]
14
+ */
12
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
13
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
14
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
15
27
  store_id: number;
16
28
  /**
17
29
  * Whether customer was registered by staff and is trusted
@@ -5,10 +5,25 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Grid object model
10
+ */
8
11
  export interface Grids {
12
+ /**
13
+ * Grid ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
12
27
  store_id: number;
13
28
  /**
14
29
  * Grid title
@@ -9,9 +9,21 @@
9
9
  * Order object model
10
10
  */
11
11
  export interface Orders {
12
+ /**
13
+ * Order ID (ObjectID) [auto]
14
+ */
12
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
13
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
14
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
15
27
  store_id: number;
16
28
  /**
17
29
  * Whether order was created by staff and is trusted
@@ -70,6 +82,9 @@ export interface Orders {
70
82
  * User-Agent of the browser (if any) used by the customer
71
83
  */
72
84
  client_user_agent?: string;
85
+ /**
86
+ * Sales channel unique identifier or domain name
87
+ */
73
88
  channel_id?: string;
74
89
  /**
75
90
  * Channel type or source
@@ -5,12 +5,29 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Product object model
10
+ */
8
11
  export interface Products {
12
+ /**
13
+ * Product ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
12
27
  store_id: number;
13
28
  /**
29
+ * List of sales channels if product not available in all channels
30
+ *
14
31
  * @maxItems 10
15
32
  */
16
33
  channel_ids?: string[];
@@ -5,10 +5,25 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ /**
9
+ * Head store and company info
10
+ */
8
11
  export interface Stores {
12
+ /**
13
+ * Store ID (ObjectID) [auto]
14
+ */
9
15
  _id: string & { length: 24 };
16
+ /**
17
+ * When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
18
+ */
10
19
  created_at: string;
20
+ /**
21
+ * When was it last changed, date and time in ISO 8601 standard representation [auto]
22
+ */
11
23
  updated_at: string;
24
+ /**
25
+ * ID of store [auto]
26
+ */
12
27
  store_id: number;
13
28
  /**
14
29
  * Store name
@@ -30,11 +30,15 @@ type ResourceAndFind = ResourceAndId
30
30
  | 'authentications/me';
31
31
  type ResourceOpQuery = Resource | `${Resource}?${string}`;
32
32
 
33
- type SearchOpQuery = 'search/v1'
34
- | `search/v1?${string}`
33
+ type SearchV1OpQuery = 'search/v1'
34
+ | `search/v1?${string}`;
35
+ type SearchOpQuery = SearchV1OpQuery
35
36
  | 'search/_els'
36
37
  | `search/_els?${string}`;
37
38
 
39
+ type SearchHistoryOpQuery = 'search/v1/history'
40
+ | `search/v1/history?${string}`;
41
+
38
42
  type EventsEndpoint = `events/${Resource}`
39
43
  | `events/${ResourceAndId}`
40
44
  | 'events/me';
@@ -44,6 +48,7 @@ type Endpoint = ResourceOpQuery
44
48
  | `${ResourceAndFind}/${string}`
45
49
  | `slugs/${string}`
46
50
  | SearchOpQuery
51
+ | SearchHistoryOpQuery
47
52
  | EventsEndpoint
48
53
  | 'login'
49
54
  | 'authenticate'
@@ -72,7 +77,10 @@ type Config = {
72
77
  buckets?: boolean,
73
78
  verbose?: boolean,
74
79
  concise?: boolean,
75
- params?: Record<string, string | number | boolean | string[] | number[]> | string,
80
+ params?: string | Record<
81
+ string,
82
+ string | number | boolean | string[] | number[] | undefined,
83
+ >,
76
84
  headers?: Headers | Record<string, string>,
77
85
  timeout?: number,
78
86
  maxRetries?: number,
@@ -284,9 +292,9 @@ type SearchItem<Fields extends null | string[] | '*' = '*'> = Omit<(
284
292
 
285
293
  type SearchResult<
286
294
  TEndpoint extends SearchOpQuery | 'v1' | 'els',
287
- Fields extends string[] | null = TEndpoint extends 'search/v1' | 'v1' ? null : '*',
295
+ Fields extends string[] | null = TEndpoint extends SearchV1OpQuery | 'v1' ? null : '*',
288
296
  > =
289
- TEndpoint extends 'search/v1' | `search/v1?${string}` | 'v1' ? {
297
+ TEndpoint extends SearchV1OpQuery | 'v1' ? {
290
298
  result: SearchItem<Fields>[],
291
299
  meta: BaseListResultMeta & {
292
300
  count?: number,
@@ -302,10 +310,10 @@ type SearchResult<
302
310
  avg: null | number,
303
311
  count: number,
304
312
  }>,
305
- 'brands/name'?: {
313
+ 'brands.name'?: {
306
314
  [key: string]: number,
307
315
  },
308
- 'categories/name'?: {
316
+ 'categories.name'?: {
309
317
  [key: string]: number,
310
318
  },
311
319
  specs?: {
@@ -325,6 +333,21 @@ type SearchResult<
325
333
  } :
326
334
  never;
327
335
 
336
+ type SearchHistoryResult = {
337
+ result: Array<{
338
+ terms: string[];
339
+ hits_count?: number;
340
+ counted_at?: string;
341
+ }>,
342
+ meta: {
343
+ offset: number,
344
+ limit: number,
345
+ query: {
346
+ terms?: any,
347
+ },
348
+ },
349
+ };
350
+
328
351
  type EventFieldsByEndpoint<TEndpoint extends EventsEndpoint> =
329
352
  TEndpoint extends `events/${Resource}` ? {
330
353
  resource_id: ResourceId,
@@ -358,7 +381,7 @@ type EventsResult<TEndpoint extends EventsEndpoint> = {
358
381
 
359
382
  type ResponseBody<
360
383
  TConfig extends Config,
361
- ListFields extends string[] | null = TConfig['endpoint'] extends Resource | 'search/v1'
384
+ ListFields extends string[] | null = TConfig['endpoint'] extends Resource | SearchV1OpQuery
362
385
  ? TConfig['params']['fields'] extends string ? '*'
363
386
  : TConfig['fields'] extends readonly string[] ? TConfig['fields']
364
387
  : null
@@ -380,10 +403,13 @@ type ResponseBody<
380
403
  TConfig['endpoint'] extends `orders/${ResourceId}` ? Orders :
381
404
  TConfig['endpoint'] extends `customers/${ResourceId}` ? Customers :
382
405
  TConfig['endpoint'] extends `stores/${ResourceId}` ? Stores :
406
+ TConfig['endpoint'] extends 'stores/me' ? Stores :
383
407
  TConfig['endpoint'] extends `applications/${ResourceId}` ? Applications :
384
408
  TConfig['endpoint'] extends `authentications/${ResourceId}` ? Authentications :
409
+ TConfig['endpoint'] extends 'authentications/me' ? Authentications :
385
410
  TConfig['endpoint'] extends ResourceOpQuery ? ResourceListResult<TConfig['endpoint'], ListFields> :
386
411
  TConfig['endpoint'] extends SearchOpQuery ? SearchResult<TConfig['endpoint'], ListFields> :
412
+ TConfig['endpoint'] extends SearchHistoryOpQuery ? SearchHistoryResult :
387
413
  TConfig['endpoint'] extends EventsEndpoint ? EventsResult<TConfig['endpoint']> :
388
414
  any;
389
415
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-affilate-program",
3
3
  "type": "module",
4
- "version": "0.39.0",
4
+ "version": "0.40.0",
5
5
  "description": "E-Com Plus Cloud Commerce app for simple affiliate program",
6
6
  "main": "lib/index.js",
7
7
  "repository": {