@rovela-ai/sdk 0.1.2 → 0.1.3

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 (569) hide show
  1. package/dist/admin/api/auth.d.ts +32 -0
  2. package/dist/admin/api/auth.d.ts.map +1 -0
  3. package/dist/admin/api/auth.js +43 -0
  4. package/dist/admin/api/auth.js.map +1 -0
  5. package/dist/admin/api/categories.d.ts +68 -0
  6. package/dist/admin/api/categories.d.ts.map +1 -0
  7. package/dist/admin/api/categories.js +247 -0
  8. package/dist/admin/api/categories.js.map +1 -0
  9. package/dist/admin/api/customers.d.ts +41 -0
  10. package/dist/admin/api/customers.d.ts.map +1 -0
  11. package/dist/admin/api/customers.js +113 -0
  12. package/dist/admin/api/customers.js.map +1 -0
  13. package/dist/admin/api/index.d.ts +56 -0
  14. package/dist/admin/api/index.d.ts.map +1 -0
  15. package/dist/admin/api/index.js +87 -0
  16. package/dist/admin/api/index.js.map +1 -0
  17. package/dist/admin/api/orders.d.ts +59 -0
  18. package/dist/admin/api/orders.d.ts.map +1 -0
  19. package/dist/admin/api/orders.js +209 -0
  20. package/dist/admin/api/orders.js.map +1 -0
  21. package/dist/admin/api/products.d.ts +103 -0
  22. package/dist/admin/api/products.d.ts.map +1 -0
  23. package/dist/admin/api/products.js +329 -0
  24. package/dist/admin/api/products.js.map +1 -0
  25. package/dist/admin/api/refund.d.ts +29 -0
  26. package/dist/admin/api/refund.d.ts.map +1 -0
  27. package/dist/admin/api/refund.js +136 -0
  28. package/dist/admin/api/refund.js.map +1 -0
  29. package/dist/admin/api/stats.d.ts +40 -0
  30. package/dist/admin/api/stats.d.ts.map +1 -0
  31. package/dist/admin/api/stats.js +74 -0
  32. package/dist/admin/api/stats.js.map +1 -0
  33. package/dist/admin/components/AdminGuard.d.ts +40 -0
  34. package/dist/admin/components/AdminGuard.d.ts.map +1 -0
  35. package/dist/admin/components/AdminGuard.js +97 -0
  36. package/dist/admin/components/AdminGuard.js.map +1 -0
  37. package/dist/admin/components/AdminHeader.d.ts +18 -0
  38. package/dist/admin/components/AdminHeader.d.ts.map +1 -0
  39. package/dist/admin/components/AdminHeader.js +33 -0
  40. package/dist/admin/components/AdminHeader.js.map +1 -0
  41. package/dist/admin/components/AdminLayout.d.ts +50 -0
  42. package/dist/admin/components/AdminLayout.d.ts.map +1 -0
  43. package/dist/admin/components/AdminLayout.js +46 -0
  44. package/dist/admin/components/AdminLayout.js.map +1 -0
  45. package/dist/admin/components/AdminLoginForm.d.ts +18 -0
  46. package/dist/admin/components/AdminLoginForm.d.ts.map +1 -0
  47. package/dist/admin/components/AdminLoginForm.js +58 -0
  48. package/dist/admin/components/AdminLoginForm.js.map +1 -0
  49. package/dist/admin/components/AdminNav.d.ts +34 -0
  50. package/dist/admin/components/AdminNav.d.ts.map +1 -0
  51. package/dist/admin/components/AdminNav.js +61 -0
  52. package/dist/admin/components/AdminNav.js.map +1 -0
  53. package/dist/admin/components/InventoryEditor.d.ts +15 -0
  54. package/dist/admin/components/InventoryEditor.d.ts.map +1 -0
  55. package/dist/admin/components/InventoryEditor.js +83 -0
  56. package/dist/admin/components/InventoryEditor.js.map +1 -0
  57. package/dist/admin/components/LowStockAlert.d.ts +11 -0
  58. package/dist/admin/components/LowStockAlert.d.ts.map +1 -0
  59. package/dist/admin/components/LowStockAlert.js +35 -0
  60. package/dist/admin/components/LowStockAlert.js.map +1 -0
  61. package/dist/admin/components/OrderDetails.d.ts +14 -0
  62. package/dist/admin/components/OrderDetails.d.ts.map +1 -0
  63. package/dist/admin/components/OrderDetails.js +94 -0
  64. package/dist/admin/components/OrderDetails.js.map +1 -0
  65. package/dist/admin/components/OrderTable.d.ts +13 -0
  66. package/dist/admin/components/OrderTable.d.ts.map +1 -0
  67. package/dist/admin/components/OrderTable.js +89 -0
  68. package/dist/admin/components/OrderTable.js.map +1 -0
  69. package/dist/admin/components/ProductForm.d.ts +18 -0
  70. package/dist/admin/components/ProductForm.d.ts.map +1 -0
  71. package/dist/admin/components/ProductForm.js +127 -0
  72. package/dist/admin/components/ProductForm.js.map +1 -0
  73. package/dist/admin/components/ProductTable.d.ts +13 -0
  74. package/dist/admin/components/ProductTable.d.ts.map +1 -0
  75. package/dist/admin/components/ProductTable.js +81 -0
  76. package/dist/admin/components/ProductTable.js.map +1 -0
  77. package/dist/admin/components/RecentOrders.d.ts +11 -0
  78. package/dist/admin/components/RecentOrders.d.ts.map +1 -0
  79. package/dist/admin/components/RecentOrders.js +58 -0
  80. package/dist/admin/components/RecentOrders.js.map +1 -0
  81. package/dist/admin/components/RefundDialog.d.ts +17 -0
  82. package/dist/admin/components/RefundDialog.d.ts.map +1 -0
  83. package/dist/admin/components/RefundDialog.js +86 -0
  84. package/dist/admin/components/RefundDialog.js.map +1 -0
  85. package/dist/admin/components/StatsCards.d.ts +23 -0
  86. package/dist/admin/components/StatsCards.d.ts.map +1 -0
  87. package/dist/admin/components/StatsCards.js +82 -0
  88. package/dist/admin/components/StatsCards.js.map +1 -0
  89. package/dist/admin/components/StoreSettings.d.ts +14 -0
  90. package/dist/admin/components/StoreSettings.d.ts.map +1 -0
  91. package/dist/admin/components/StoreSettings.js +88 -0
  92. package/dist/admin/components/StoreSettings.js.map +1 -0
  93. package/dist/admin/components/index.d.ts +21 -0
  94. package/dist/admin/components/index.d.ts.map +1 -0
  95. package/dist/admin/components/index.js +57 -0
  96. package/dist/admin/components/index.js.map +1 -0
  97. package/dist/admin/config.d.ts +74 -0
  98. package/dist/admin/config.d.ts.map +1 -0
  99. package/dist/admin/config.js +229 -0
  100. package/dist/admin/config.js.map +1 -0
  101. package/dist/admin/hooks/index.d.ts +10 -0
  102. package/dist/admin/hooks/index.d.ts.map +1 -0
  103. package/dist/admin/hooks/index.js +17 -0
  104. package/dist/admin/hooks/index.js.map +1 -0
  105. package/dist/admin/hooks/useAdminOrders.d.ts +41 -0
  106. package/dist/admin/hooks/useAdminOrders.d.ts.map +1 -0
  107. package/dist/admin/hooks/useAdminOrders.js +191 -0
  108. package/dist/admin/hooks/useAdminOrders.js.map +1 -0
  109. package/dist/admin/hooks/useAdminProducts.d.ts +39 -0
  110. package/dist/admin/hooks/useAdminProducts.d.ts.map +1 -0
  111. package/dist/admin/hooks/useAdminProducts.js +235 -0
  112. package/dist/admin/hooks/useAdminProducts.js.map +1 -0
  113. package/dist/admin/hooks/useAdminStats.d.ts +50 -0
  114. package/dist/admin/hooks/useAdminStats.d.ts.map +1 -0
  115. package/dist/admin/hooks/useAdminStats.js +111 -0
  116. package/dist/admin/hooks/useAdminStats.js.map +1 -0
  117. package/dist/admin/index.d.ts +63 -0
  118. package/dist/admin/index.d.ts.map +1 -0
  119. package/dist/admin/index.js +148 -0
  120. package/dist/admin/index.js.map +1 -0
  121. package/dist/admin/server/admin-service.d.ts +130 -0
  122. package/dist/admin/server/admin-service.d.ts.map +1 -0
  123. package/dist/admin/server/admin-service.js +298 -0
  124. package/dist/admin/server/admin-service.js.map +1 -0
  125. package/dist/admin/server/index.d.ts +8 -0
  126. package/dist/admin/server/index.d.ts.map +1 -0
  127. package/dist/admin/server/index.js +25 -0
  128. package/dist/admin/server/index.js.map +1 -0
  129. package/dist/admin/types.d.ts +549 -0
  130. package/dist/admin/types.d.ts.map +1 -0
  131. package/dist/admin/types.js +11 -0
  132. package/dist/admin/types.js.map +1 -0
  133. package/dist/auth/api/auth.d.ts +54 -0
  134. package/dist/auth/api/auth.d.ts.map +1 -0
  135. package/dist/auth/api/auth.js +67 -0
  136. package/dist/auth/api/auth.js.map +1 -0
  137. package/dist/auth/api/forgot-password.d.ts +41 -0
  138. package/dist/auth/api/forgot-password.d.ts.map +1 -0
  139. package/dist/auth/api/forgot-password.js +68 -0
  140. package/dist/auth/api/forgot-password.js.map +1 -0
  141. package/dist/auth/api/index.d.ts +34 -0
  142. package/dist/auth/api/index.d.ts.map +1 -0
  143. package/dist/auth/api/index.js +52 -0
  144. package/dist/auth/api/index.js.map +1 -0
  145. package/dist/auth/api/register.d.ts +41 -0
  146. package/dist/auth/api/register.d.ts.map +1 -0
  147. package/dist/auth/api/register.js +93 -0
  148. package/dist/auth/api/register.js.map +1 -0
  149. package/dist/auth/api/resend-verification.d.ts +41 -0
  150. package/dist/auth/api/resend-verification.d.ts.map +1 -0
  151. package/dist/auth/api/resend-verification.js +71 -0
  152. package/dist/auth/api/resend-verification.js.map +1 -0
  153. package/dist/auth/api/reset-password.d.ts +67 -0
  154. package/dist/auth/api/reset-password.d.ts.map +1 -0
  155. package/dist/auth/api/reset-password.js +110 -0
  156. package/dist/auth/api/reset-password.js.map +1 -0
  157. package/dist/auth/api/verify-email.d.ts +47 -0
  158. package/dist/auth/api/verify-email.d.ts.map +1 -0
  159. package/dist/auth/api/verify-email.js +94 -0
  160. package/dist/auth/api/verify-email.js.map +1 -0
  161. package/dist/auth/components/AuthGuard.d.ts +52 -0
  162. package/dist/auth/components/AuthGuard.d.ts.map +1 -0
  163. package/dist/auth/components/AuthGuard.js +113 -0
  164. package/dist/auth/components/AuthGuard.js.map +1 -0
  165. package/dist/auth/components/ForgotPasswordForm.d.ts +15 -0
  166. package/dist/auth/components/ForgotPasswordForm.d.ts.map +1 -0
  167. package/dist/auth/components/ForgotPasswordForm.js +44 -0
  168. package/dist/auth/components/ForgotPasswordForm.js.map +1 -0
  169. package/dist/auth/components/ResetPasswordForm.d.ts +18 -0
  170. package/dist/auth/components/ResetPasswordForm.d.ts.map +1 -0
  171. package/dist/auth/components/ResetPasswordForm.js +88 -0
  172. package/dist/auth/components/ResetPasswordForm.js.map +1 -0
  173. package/dist/auth/components/SignInForm.d.ts +21 -0
  174. package/dist/auth/components/SignInForm.d.ts.map +1 -0
  175. package/dist/auth/components/SignInForm.js +63 -0
  176. package/dist/auth/components/SignInForm.js.map +1 -0
  177. package/dist/auth/components/SignUpForm.d.ts +18 -0
  178. package/dist/auth/components/SignUpForm.d.ts.map +1 -0
  179. package/dist/auth/components/SignUpForm.js +79 -0
  180. package/dist/auth/components/SignUpForm.js.map +1 -0
  181. package/dist/auth/components/UserMenu.d.ts +18 -0
  182. package/dist/auth/components/UserMenu.d.ts.map +1 -0
  183. package/dist/auth/components/UserMenu.js +75 -0
  184. package/dist/auth/components/UserMenu.js.map +1 -0
  185. package/dist/auth/components/VerifyEmailNotice.d.ts +20 -0
  186. package/dist/auth/components/VerifyEmailNotice.d.ts.map +1 -0
  187. package/dist/auth/components/VerifyEmailNotice.js +59 -0
  188. package/dist/auth/components/VerifyEmailNotice.js.map +1 -0
  189. package/dist/auth/components/index.d.ts +13 -0
  190. package/dist/auth/components/index.d.ts.map +1 -0
  191. package/dist/auth/components/index.js +24 -0
  192. package/dist/auth/components/index.js.map +1 -0
  193. package/dist/auth/config.d.ts +42 -0
  194. package/dist/auth/config.d.ts.map +1 -0
  195. package/dist/auth/config.js +174 -0
  196. package/dist/auth/config.js.map +1 -0
  197. package/dist/auth/hooks/index.d.ts +7 -0
  198. package/dist/auth/hooks/index.d.ts.map +1 -0
  199. package/dist/auth/hooks/index.js +11 -0
  200. package/dist/auth/hooks/index.js.map +1 -0
  201. package/dist/auth/index.d.ts +54 -0
  202. package/dist/auth/index.d.ts.map +1 -0
  203. package/dist/auth/index.js +88 -0
  204. package/dist/auth/index.js.map +1 -0
  205. package/dist/auth/server/customer-service.d.ts +138 -0
  206. package/dist/auth/server/customer-service.d.ts.map +1 -0
  207. package/dist/auth/server/customer-service.js +309 -0
  208. package/dist/auth/server/customer-service.js.map +1 -0
  209. package/dist/auth/server/email-sender.d.ts +64 -0
  210. package/dist/auth/server/email-sender.d.ts.map +1 -0
  211. package/dist/auth/server/email-sender.js +112 -0
  212. package/dist/auth/server/email-sender.js.map +1 -0
  213. package/dist/auth/server/index.d.ts +13 -0
  214. package/dist/auth/server/index.d.ts.map +1 -0
  215. package/dist/auth/server/index.js +48 -0
  216. package/dist/auth/server/index.js.map +1 -0
  217. package/dist/auth/server/password-reset-service.d.ts +86 -0
  218. package/dist/auth/server/password-reset-service.d.ts.map +1 -0
  219. package/dist/auth/server/password-reset-service.js +236 -0
  220. package/dist/auth/server/password-reset-service.js.map +1 -0
  221. package/dist/auth/server/password.d.ts +58 -0
  222. package/dist/auth/server/password.d.ts.map +1 -0
  223. package/dist/auth/server/password.js +94 -0
  224. package/dist/auth/server/password.js.map +1 -0
  225. package/dist/auth/server/verification-service.d.ts +87 -0
  226. package/dist/auth/server/verification-service.d.ts.map +1 -0
  227. package/dist/auth/server/verification-service.js +268 -0
  228. package/dist/auth/server/verification-service.js.map +1 -0
  229. package/dist/auth/types.d.ts +305 -0
  230. package/dist/auth/types.d.ts.map +1 -0
  231. package/dist/auth/types.js +8 -0
  232. package/dist/auth/types.js.map +1 -0
  233. package/dist/cart/CartProvider.d.ts +65 -0
  234. package/dist/cart/CartProvider.d.ts.map +1 -0
  235. package/dist/cart/CartProvider.js +101 -0
  236. package/dist/cart/CartProvider.js.map +1 -0
  237. package/dist/cart/components/AddToCartButton.d.ts +77 -0
  238. package/dist/cart/components/AddToCartButton.d.ts.map +1 -0
  239. package/dist/cart/components/AddToCartButton.js +124 -0
  240. package/dist/cart/components/AddToCartButton.js.map +1 -0
  241. package/dist/cart/components/CartDrawer.d.ts +71 -0
  242. package/dist/cart/components/CartDrawer.d.ts.map +1 -0
  243. package/dist/cart/components/CartDrawer.js +108 -0
  244. package/dist/cart/components/CartDrawer.js.map +1 -0
  245. package/dist/cart/components/CartIcon.d.ts +36 -0
  246. package/dist/cart/components/CartIcon.d.ts.map +1 -0
  247. package/dist/cart/components/CartIcon.js +70 -0
  248. package/dist/cart/components/CartIcon.js.map +1 -0
  249. package/dist/cart/components/CartItem.d.ts +52 -0
  250. package/dist/cart/components/CartItem.d.ts.map +1 -0
  251. package/dist/cart/components/CartItem.js +55 -0
  252. package/dist/cart/components/CartItem.js.map +1 -0
  253. package/dist/cart/components/CartSummary.d.ts +43 -0
  254. package/dist/cart/components/CartSummary.d.ts.map +1 -0
  255. package/dist/cart/components/CartSummary.js +58 -0
  256. package/dist/cart/components/CartSummary.js.map +1 -0
  257. package/dist/cart/components/QuantitySelector.d.ts +39 -0
  258. package/dist/cart/components/QuantitySelector.d.ts.map +1 -0
  259. package/dist/cart/components/QuantitySelector.js +87 -0
  260. package/dist/cart/components/QuantitySelector.js.map +1 -0
  261. package/dist/cart/components/index.d.ts +18 -0
  262. package/dist/cart/components/index.d.ts.map +1 -0
  263. package/dist/cart/components/index.js +21 -0
  264. package/dist/cart/components/index.js.map +1 -0
  265. package/dist/cart/index.d.ts +109 -0
  266. package/dist/cart/index.d.ts.map +1 -0
  267. package/dist/cart/index.js +129 -0
  268. package/dist/cart/index.js.map +1 -0
  269. package/dist/cart/store.d.ts +101 -0
  270. package/dist/cart/store.d.ts.map +1 -0
  271. package/dist/cart/store.js +207 -0
  272. package/dist/cart/store.js.map +1 -0
  273. package/dist/checkout/api/checkout.d.ts +31 -0
  274. package/dist/checkout/api/checkout.d.ts.map +1 -0
  275. package/dist/checkout/api/checkout.js +103 -0
  276. package/dist/checkout/api/checkout.js.map +1 -0
  277. package/dist/checkout/api/index.d.ts +8 -0
  278. package/dist/checkout/api/index.d.ts.map +1 -0
  279. package/dist/checkout/api/index.js +13 -0
  280. package/dist/checkout/api/index.js.map +1 -0
  281. package/dist/checkout/api/webhook.d.ts +30 -0
  282. package/dist/checkout/api/webhook.d.ts.map +1 -0
  283. package/dist/checkout/api/webhook.js +58 -0
  284. package/dist/checkout/api/webhook.js.map +1 -0
  285. package/dist/checkout/components/CheckoutButton.d.ts +44 -0
  286. package/dist/checkout/components/CheckoutButton.d.ts.map +1 -0
  287. package/dist/checkout/components/CheckoutButton.js +97 -0
  288. package/dist/checkout/components/CheckoutButton.js.map +1 -0
  289. package/dist/checkout/components/CheckoutSuccess.d.ts +29 -0
  290. package/dist/checkout/components/CheckoutSuccess.d.ts.map +1 -0
  291. package/dist/checkout/components/CheckoutSuccess.js +60 -0
  292. package/dist/checkout/components/CheckoutSuccess.js.map +1 -0
  293. package/dist/checkout/components/OrderSummary.d.ts +37 -0
  294. package/dist/checkout/components/OrderSummary.d.ts.map +1 -0
  295. package/dist/checkout/components/OrderSummary.js +70 -0
  296. package/dist/checkout/components/OrderSummary.js.map +1 -0
  297. package/dist/checkout/components/ShippingForm.d.ts +30 -0
  298. package/dist/checkout/components/ShippingForm.d.ts.map +1 -0
  299. package/dist/checkout/components/ShippingForm.js +125 -0
  300. package/dist/checkout/components/ShippingForm.js.map +1 -0
  301. package/dist/checkout/components/index.d.ts +10 -0
  302. package/dist/checkout/components/index.d.ts.map +1 -0
  303. package/dist/checkout/components/index.js +17 -0
  304. package/dist/checkout/components/index.js.map +1 -0
  305. package/dist/checkout/hooks/index.d.ts +7 -0
  306. package/dist/checkout/hooks/index.d.ts.map +1 -0
  307. package/dist/checkout/hooks/index.js +12 -0
  308. package/dist/checkout/hooks/index.js.map +1 -0
  309. package/dist/checkout/hooks/useCheckout.d.ts +61 -0
  310. package/dist/checkout/hooks/useCheckout.d.ts.map +1 -0
  311. package/dist/checkout/hooks/useCheckout.js +174 -0
  312. package/dist/checkout/hooks/useCheckout.js.map +1 -0
  313. package/dist/checkout/index.d.ts +111 -0
  314. package/dist/checkout/index.d.ts.map +1 -0
  315. package/dist/checkout/index.js +148 -0
  316. package/dist/checkout/index.js.map +1 -0
  317. package/dist/checkout/server/create-checkout-session.d.ts +69 -0
  318. package/dist/checkout/server/create-checkout-session.d.ts.map +1 -0
  319. package/dist/checkout/server/create-checkout-session.js +190 -0
  320. package/dist/checkout/server/create-checkout-session.js.map +1 -0
  321. package/dist/checkout/server/handle-webhook.d.ts +35 -0
  322. package/dist/checkout/server/handle-webhook.d.ts.map +1 -0
  323. package/dist/checkout/server/handle-webhook.js +279 -0
  324. package/dist/checkout/server/handle-webhook.js.map +1 -0
  325. package/dist/checkout/server/index.d.ts +10 -0
  326. package/dist/checkout/server/index.d.ts.map +1 -0
  327. package/dist/checkout/server/index.js +19 -0
  328. package/dist/checkout/server/index.js.map +1 -0
  329. package/dist/checkout/server/order-service.d.ts +43 -0
  330. package/dist/checkout/server/order-service.d.ts.map +1 -0
  331. package/dist/checkout/server/order-service.js +196 -0
  332. package/dist/checkout/server/order-service.js.map +1 -0
  333. package/dist/checkout/stripe/client.d.ts +72 -0
  334. package/dist/checkout/stripe/client.d.ts.map +1 -0
  335. package/dist/checkout/stripe/client.js +189 -0
  336. package/dist/checkout/stripe/client.js.map +1 -0
  337. package/dist/checkout/stripe/index.d.ts +7 -0
  338. package/dist/checkout/stripe/index.d.ts.map +1 -0
  339. package/dist/checkout/stripe/index.js +21 -0
  340. package/dist/checkout/stripe/index.js.map +1 -0
  341. package/dist/checkout/types.d.ts +263 -0
  342. package/dist/checkout/types.d.ts.map +1 -0
  343. package/dist/checkout/types.js +9 -0
  344. package/dist/checkout/types.js.map +1 -0
  345. package/dist/core/config.d.ts +296 -0
  346. package/dist/core/config.d.ts.map +1 -0
  347. package/dist/core/config.js +162 -0
  348. package/dist/core/config.js.map +1 -0
  349. package/dist/core/db/client.d.ts +69 -0
  350. package/dist/core/db/client.d.ts.map +1 -0
  351. package/dist/core/db/client.js +202 -0
  352. package/dist/core/db/client.js.map +1 -0
  353. package/dist/core/db/index.d.ts +11 -0
  354. package/dist/core/db/index.d.ts.map +1 -0
  355. package/dist/core/db/index.js +87 -0
  356. package/dist/core/db/index.js.map +1 -0
  357. package/dist/core/db/queries.d.ts +658 -0
  358. package/dist/core/db/queries.d.ts.map +1 -0
  359. package/dist/core/db/queries.js +735 -0
  360. package/dist/core/db/queries.js.map +1 -0
  361. package/dist/core/db/schema.d.ts +1628 -0
  362. package/dist/core/db/schema.d.ts.map +1 -0
  363. package/dist/core/db/schema.js +262 -0
  364. package/dist/core/db/schema.js.map +1 -0
  365. package/dist/core/index.d.ts +20 -0
  366. package/dist/core/index.d.ts.map +1 -0
  367. package/dist/core/index.js +71 -0
  368. package/dist/core/index.js.map +1 -0
  369. package/dist/core/server/index.d.ts +17 -0
  370. package/dist/core/server/index.d.ts.map +1 -0
  371. package/dist/core/server/index.js +68 -0
  372. package/dist/core/server/index.js.map +1 -0
  373. package/dist/core/types.d.ts +230 -0
  374. package/dist/core/types.d.ts.map +1 -0
  375. package/dist/core/types.js +9 -0
  376. package/dist/core/types.js.map +1 -0
  377. package/dist/core/utils.d.ts +153 -0
  378. package/dist/core/utils.d.ts.map +1 -0
  379. package/dist/core/utils.js +356 -0
  380. package/dist/core/utils.js.map +1 -0
  381. package/dist/emails/config.d.ts +42 -0
  382. package/dist/emails/config.d.ts.map +1 -0
  383. package/dist/emails/config.js +89 -0
  384. package/dist/emails/config.js.map +1 -0
  385. package/dist/emails/index.d.ts +85 -0
  386. package/dist/emails/index.d.ts.map +1 -0
  387. package/dist/emails/index.js +170 -0
  388. package/dist/emails/index.js.map +1 -0
  389. package/dist/emails/send/auth.d.ts +91 -0
  390. package/dist/emails/send/auth.d.ts.map +1 -0
  391. package/dist/emails/send/auth.js +132 -0
  392. package/dist/emails/send/auth.js.map +1 -0
  393. package/dist/emails/send/index.d.ts +10 -0
  394. package/dist/emails/send/index.d.ts.map +1 -0
  395. package/dist/emails/send/index.js +33 -0
  396. package/dist/emails/send/index.js.map +1 -0
  397. package/dist/emails/send/orders.d.ts +180 -0
  398. package/dist/emails/send/orders.d.ts.map +1 -0
  399. package/dist/emails/send/orders.js +259 -0
  400. package/dist/emails/send/orders.js.map +1 -0
  401. package/dist/emails/sender.d.ts +72 -0
  402. package/dist/emails/sender.d.ts.map +1 -0
  403. package/dist/emails/sender.js +118 -0
  404. package/dist/emails/sender.js.map +1 -0
  405. package/dist/emails/templates/base.d.ts +105 -0
  406. package/dist/emails/templates/base.d.ts.map +1 -0
  407. package/dist/emails/templates/base.js +291 -0
  408. package/dist/emails/templates/base.js.map +1 -0
  409. package/dist/emails/templates/email-verification.d.ts +28 -0
  410. package/dist/emails/templates/email-verification.d.ts.map +1 -0
  411. package/dist/emails/templates/email-verification.js +56 -0
  412. package/dist/emails/templates/email-verification.js.map +1 -0
  413. package/dist/emails/templates/index.d.ts +15 -0
  414. package/dist/emails/templates/index.d.ts.map +1 -0
  415. package/dist/emails/templates/index.js +58 -0
  416. package/dist/emails/templates/index.js.map +1 -0
  417. package/dist/emails/templates/order-cancelled.d.ts +30 -0
  418. package/dist/emails/templates/order-cancelled.d.ts.map +1 -0
  419. package/dist/emails/templates/order-cancelled.js +87 -0
  420. package/dist/emails/templates/order-cancelled.js.map +1 -0
  421. package/dist/emails/templates/order-confirmation.d.ts +36 -0
  422. package/dist/emails/templates/order-confirmation.d.ts.map +1 -0
  423. package/dist/emails/templates/order-confirmation.js +161 -0
  424. package/dist/emails/templates/order-confirmation.js.map +1 -0
  425. package/dist/emails/templates/order-delivered.d.ts +31 -0
  426. package/dist/emails/templates/order-delivered.d.ts.map +1 -0
  427. package/dist/emails/templates/order-delivered.js +95 -0
  428. package/dist/emails/templates/order-delivered.js.map +1 -0
  429. package/dist/emails/templates/order-shipped.d.ts +32 -0
  430. package/dist/emails/templates/order-shipped.d.ts.map +1 -0
  431. package/dist/emails/templates/order-shipped.js +87 -0
  432. package/dist/emails/templates/order-shipped.js.map +1 -0
  433. package/dist/emails/templates/password-reset.d.ts +27 -0
  434. package/dist/emails/templates/password-reset.d.ts.map +1 -0
  435. package/dist/emails/templates/password-reset.js +55 -0
  436. package/dist/emails/templates/password-reset.js.map +1 -0
  437. package/dist/emails/templates/refund-processed.d.ts +32 -0
  438. package/dist/emails/templates/refund-processed.d.ts.map +1 -0
  439. package/dist/emails/templates/refund-processed.js +96 -0
  440. package/dist/emails/templates/refund-processed.js.map +1 -0
  441. package/dist/emails/templates/welcome.d.ts +27 -0
  442. package/dist/emails/templates/welcome.d.ts.map +1 -0
  443. package/dist/emails/templates/welcome.js +56 -0
  444. package/dist/emails/templates/welcome.js.map +1 -0
  445. package/dist/emails/types.d.ts +202 -0
  446. package/dist/emails/types.d.ts.map +1 -0
  447. package/dist/emails/types.js +8 -0
  448. package/dist/emails/types.js.map +1 -0
  449. package/dist/emails/utils.d.ts +94 -0
  450. package/dist/emails/utils.d.ts.map +1 -0
  451. package/dist/emails/utils.js +229 -0
  452. package/dist/emails/utils.js.map +1 -0
  453. package/dist/index.d.ts +40 -0
  454. package/dist/index.d.ts.map +1 -0
  455. package/dist/index.js +225 -0
  456. package/dist/index.js.map +1 -0
  457. package/dist/products/api/categories.d.ts +29 -0
  458. package/dist/products/api/categories.d.ts.map +1 -0
  459. package/dist/products/api/categories.js +49 -0
  460. package/dist/products/api/categories.js.map +1 -0
  461. package/dist/products/api/index.d.ts +24 -0
  462. package/dist/products/api/index.d.ts.map +1 -0
  463. package/dist/products/api/index.js +30 -0
  464. package/dist/products/api/index.js.map +1 -0
  465. package/dist/products/api/product.d.ts +36 -0
  466. package/dist/products/api/product.d.ts.map +1 -0
  467. package/dist/products/api/product.js +70 -0
  468. package/dist/products/api/product.js.map +1 -0
  469. package/dist/products/api/products.d.ts +41 -0
  470. package/dist/products/api/products.d.ts.map +1 -0
  471. package/dist/products/api/products.js +102 -0
  472. package/dist/products/api/products.js.map +1 -0
  473. package/dist/products/components/CategoryNav.d.ts +51 -0
  474. package/dist/products/components/CategoryNav.d.ts.map +1 -0
  475. package/dist/products/components/CategoryNav.js +115 -0
  476. package/dist/products/components/CategoryNav.js.map +1 -0
  477. package/dist/products/components/ProductBreadcrumb.d.ts +52 -0
  478. package/dist/products/components/ProductBreadcrumb.d.ts.map +1 -0
  479. package/dist/products/components/ProductBreadcrumb.js +78 -0
  480. package/dist/products/components/ProductBreadcrumb.js.map +1 -0
  481. package/dist/products/components/ProductCard.d.ts +54 -0
  482. package/dist/products/components/ProductCard.d.ts.map +1 -0
  483. package/dist/products/components/ProductCard.js +65 -0
  484. package/dist/products/components/ProductCard.js.map +1 -0
  485. package/dist/products/components/ProductDetails.d.ts +63 -0
  486. package/dist/products/components/ProductDetails.d.ts.map +1 -0
  487. package/dist/products/components/ProductDetails.js +105 -0
  488. package/dist/products/components/ProductDetails.js.map +1 -0
  489. package/dist/products/components/ProductFilters.d.ts +70 -0
  490. package/dist/products/components/ProductFilters.d.ts.map +1 -0
  491. package/dist/products/components/ProductFilters.js +127 -0
  492. package/dist/products/components/ProductFilters.js.map +1 -0
  493. package/dist/products/components/ProductGallery.d.ts +37 -0
  494. package/dist/products/components/ProductGallery.d.ts.map +1 -0
  495. package/dist/products/components/ProductGallery.js +80 -0
  496. package/dist/products/components/ProductGallery.js.map +1 -0
  497. package/dist/products/components/ProductGrid.d.ts +50 -0
  498. package/dist/products/components/ProductGrid.d.ts.map +1 -0
  499. package/dist/products/components/ProductGrid.js +83 -0
  500. package/dist/products/components/ProductGrid.js.map +1 -0
  501. package/dist/products/components/ProductSearch.d.ts +43 -0
  502. package/dist/products/components/ProductSearch.d.ts.map +1 -0
  503. package/dist/products/components/ProductSearch.js +99 -0
  504. package/dist/products/components/ProductSearch.js.map +1 -0
  505. package/dist/products/components/ProductSort.d.ts +43 -0
  506. package/dist/products/components/ProductSort.d.ts.map +1 -0
  507. package/dist/products/components/ProductSort.js +61 -0
  508. package/dist/products/components/ProductSort.js.map +1 -0
  509. package/dist/products/components/VariantSelector.d.ts +43 -0
  510. package/dist/products/components/VariantSelector.d.ts.map +1 -0
  511. package/dist/products/components/VariantSelector.js +147 -0
  512. package/dist/products/components/VariantSelector.js.map +1 -0
  513. package/dist/products/components/index.d.ts +26 -0
  514. package/dist/products/components/index.d.ts.map +1 -0
  515. package/dist/products/components/index.js +32 -0
  516. package/dist/products/components/index.js.map +1 -0
  517. package/dist/products/hooks/index.d.ts +14 -0
  518. package/dist/products/hooks/index.d.ts.map +1 -0
  519. package/dist/products/hooks/index.js +17 -0
  520. package/dist/products/hooks/index.js.map +1 -0
  521. package/dist/products/hooks/useCategories.d.ts +56 -0
  522. package/dist/products/hooks/useCategories.d.ts.map +1 -0
  523. package/dist/products/hooks/useCategories.js +126 -0
  524. package/dist/products/hooks/useCategories.js.map +1 -0
  525. package/dist/products/hooks/useProduct.d.ts +44 -0
  526. package/dist/products/hooks/useProduct.d.ts.map +1 -0
  527. package/dist/products/hooks/useProduct.js +86 -0
  528. package/dist/products/hooks/useProduct.js.map +1 -0
  529. package/dist/products/hooks/useProductAttributes.d.ts +59 -0
  530. package/dist/products/hooks/useProductAttributes.d.ts.map +1 -0
  531. package/dist/products/hooks/useProductAttributes.js +148 -0
  532. package/dist/products/hooks/useProductAttributes.js.map +1 -0
  533. package/dist/products/hooks/useProducts.d.ts +67 -0
  534. package/dist/products/hooks/useProducts.d.ts.map +1 -0
  535. package/dist/products/hooks/useProducts.js +132 -0
  536. package/dist/products/hooks/useProducts.js.map +1 -0
  537. package/dist/products/index.d.ts +94 -0
  538. package/dist/products/index.d.ts.map +1 -0
  539. package/dist/products/index.js +123 -0
  540. package/dist/products/index.js.map +1 -0
  541. package/dist/theme/ThemeProvider.d.ts +70 -0
  542. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  543. package/dist/theme/ThemeProvider.js +77 -0
  544. package/dist/theme/ThemeProvider.js.map +1 -0
  545. package/dist/theme/colors.d.ts +148 -0
  546. package/dist/theme/colors.d.ts.map +1 -0
  547. package/dist/theme/colors.js +219 -0
  548. package/dist/theme/colors.js.map +1 -0
  549. package/dist/theme/defaults.d.ts +212 -0
  550. package/dist/theme/defaults.d.ts.map +1 -0
  551. package/dist/theme/defaults.js +278 -0
  552. package/dist/theme/defaults.js.map +1 -0
  553. package/dist/theme/fonts.d.ts +59 -0
  554. package/dist/theme/fonts.d.ts.map +1 -0
  555. package/dist/theme/fonts.js +202 -0
  556. package/dist/theme/fonts.js.map +1 -0
  557. package/dist/theme/generator.d.ts +50 -0
  558. package/dist/theme/generator.d.ts.map +1 -0
  559. package/dist/theme/generator.js +322 -0
  560. package/dist/theme/generator.js.map +1 -0
  561. package/dist/theme/hooks.d.ts +110 -0
  562. package/dist/theme/hooks.d.ts.map +1 -0
  563. package/dist/theme/hooks.js +106 -0
  564. package/dist/theme/hooks.js.map +1 -0
  565. package/dist/theme/index.d.ts +37 -0
  566. package/dist/theme/index.d.ts.map +1 -0
  567. package/dist/theme/index.js +85 -0
  568. package/dist/theme/index.js.map +1 -0
  569. package/package.json +1 -1
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ /**
3
+ * @rovela/sdk/core/config
4
+ *
5
+ * Configuration system for reading blueprint.json at runtime.
6
+ * The blueprint is generated by Rovela and placed at .rovela/blueprint.json
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.loadBlueprint = loadBlueprint;
43
+ exports.getBlueprint = getBlueprint;
44
+ exports.getStoreConfig = getStoreConfig;
45
+ exports.clearConfigCache = clearConfigCache;
46
+ exports.blueprintExists = blueprintExists;
47
+ exports.getTheme = getTheme;
48
+ exports.getBrand = getBrand;
49
+ exports.getHomepage = getHomepage;
50
+ exports.getModules = getModules;
51
+ exports.getSEO = getSEO;
52
+ const fs = __importStar(require("fs"));
53
+ const path = __importStar(require("path"));
54
+ // =============================================================================
55
+ // Configuration Loading
56
+ // =============================================================================
57
+ let cachedBlueprint = null;
58
+ let cachedConfig = null;
59
+ /**
60
+ * Default blueprint path relative to project root
61
+ */
62
+ const DEFAULT_BLUEPRINT_PATH = '.rovela/blueprint.json';
63
+ /**
64
+ * Get the blueprint file path, checking environment variable first
65
+ */
66
+ function getBlueprintPath() {
67
+ return process.env.ROVELA_BLUEPRINT_PATH || path.join(process.cwd(), DEFAULT_BLUEPRINT_PATH);
68
+ }
69
+ /**
70
+ * Load and parse the blueprint.json file
71
+ * @throws Error if blueprint file is not found or invalid
72
+ */
73
+ function loadBlueprint() {
74
+ if (cachedBlueprint) {
75
+ return cachedBlueprint;
76
+ }
77
+ const blueprintPath = getBlueprintPath();
78
+ if (!fs.existsSync(blueprintPath)) {
79
+ throw new Error(`Blueprint not found at ${blueprintPath}. ` +
80
+ `Make sure .rovela/blueprint.json exists or set ROVELA_BLUEPRINT_PATH environment variable.`);
81
+ }
82
+ try {
83
+ const content = fs.readFileSync(blueprintPath, 'utf-8');
84
+ cachedBlueprint = JSON.parse(content);
85
+ return cachedBlueprint;
86
+ }
87
+ catch (error) {
88
+ throw new Error(`Failed to parse blueprint at ${blueprintPath}: ${error instanceof Error ? error.message : 'Unknown error'}`);
89
+ }
90
+ }
91
+ /**
92
+ * Get the full blueprint object
93
+ * Use this when you need access to all blueprint data (theme, brand, homepage, etc.)
94
+ */
95
+ function getBlueprint() {
96
+ return loadBlueprint();
97
+ }
98
+ /**
99
+ * Get simplified store configuration
100
+ * Use this for basic store info (name, currency, locale)
101
+ */
102
+ function getStoreConfig() {
103
+ if (cachedConfig) {
104
+ return cachedConfig;
105
+ }
106
+ const blueprint = loadBlueprint();
107
+ cachedConfig = {
108
+ name: blueprint.store.name,
109
+ slug: blueprint.store.slug,
110
+ currency: blueprint.store.currency,
111
+ locale: blueprint.store.locale,
112
+ ownerEmail: process.env.STORE_OWNER_EMAIL || '',
113
+ };
114
+ return cachedConfig;
115
+ }
116
+ /**
117
+ * Clear cached blueprint and config (useful for testing or hot reloading)
118
+ */
119
+ function clearConfigCache() {
120
+ cachedBlueprint = null;
121
+ cachedConfig = null;
122
+ }
123
+ /**
124
+ * Check if blueprint exists at the expected path
125
+ */
126
+ function blueprintExists() {
127
+ return fs.existsSync(getBlueprintPath());
128
+ }
129
+ // =============================================================================
130
+ // Convenience Accessors
131
+ // =============================================================================
132
+ /**
133
+ * Get theme configuration from blueprint
134
+ */
135
+ function getTheme() {
136
+ return loadBlueprint().theme;
137
+ }
138
+ /**
139
+ * Get brand configuration from blueprint
140
+ */
141
+ function getBrand() {
142
+ return loadBlueprint().brand;
143
+ }
144
+ /**
145
+ * Get homepage configuration from blueprint
146
+ */
147
+ function getHomepage() {
148
+ return loadBlueprint().homepage;
149
+ }
150
+ /**
151
+ * Get module configuration from blueprint
152
+ */
153
+ function getModules() {
154
+ return loadBlueprint().modules;
155
+ }
156
+ /**
157
+ * Get SEO configuration from blueprint
158
+ */
159
+ function getSEO() {
160
+ return loadBlueprint().seo;
161
+ }
162
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * @rovela/sdk/core/db/client
3
+ *
4
+ * Neon serverless database client with Drizzle ORM
5
+ * Includes tenant isolation for multi-tenant e-commerce stores
6
+ */
7
+ import { NeonQueryFunction } from '@neondatabase/serverless';
8
+ import { NeonHttpDatabase } from 'drizzle-orm/neon-http';
9
+ import * as schema from './schema';
10
+ /**
11
+ * Get the raw Neon SQL client
12
+ * Use this for raw SQL queries when needed
13
+ */
14
+ export declare function getSql(): NeonQueryFunction<false, false>;
15
+ /**
16
+ * Get the Drizzle ORM database client with full schema
17
+ * This is the main entry point for database operations
18
+ */
19
+ export declare function getDb(): NeonHttpDatabase<typeof schema>;
20
+ /**
21
+ * Main database client export
22
+ * Usage: import { db } from '@rovela/sdk/core'
23
+ *
24
+ * Note: This is a lazy-loaded proxy to avoid connection at import time
25
+ */
26
+ export declare const db: NeonHttpDatabase<typeof schema>;
27
+ /**
28
+ * Set the current tenant ID for the request
29
+ * All queries using withTenant() will be scoped to this tenant
30
+ */
31
+ export declare function setTenantId(tenantId: string): void;
32
+ /**
33
+ * Get the current tenant ID
34
+ * @throws Error if tenant ID is not set
35
+ */
36
+ export declare function getTenantId(): string;
37
+ /**
38
+ * Clear the tenant context (call at end of request)
39
+ */
40
+ export declare function clearTenantId(): void;
41
+ /**
42
+ * Initialize tenant from environment variable
43
+ * Useful for single-tenant deployments
44
+ */
45
+ export declare function initTenantFromEnv(): void;
46
+ /**
47
+ * Execute a function with a specific tenant context
48
+ * Automatically clears tenant after execution
49
+ *
50
+ * @example
51
+ * const products = await withTenant(tenantId, async () => {
52
+ * return db.query.products.findMany()
53
+ * })
54
+ */
55
+ export declare function withTenant<T>(tenantId: string, fn: () => Promise<T>): Promise<T>;
56
+ /**
57
+ * Check database connection health
58
+ * Returns true if connection is successful
59
+ */
60
+ export declare function checkConnection(): Promise<boolean>;
61
+ /**
62
+ * Get database connection info (for debugging)
63
+ */
64
+ export declare function getConnectionInfo(): {
65
+ hasUrl: boolean;
66
+ hasTenant: boolean;
67
+ tenantId: string | null;
68
+ };
69
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/core/db/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAW,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAyBlC;;;GAGG;AACH,wBAAgB,MAAM,IAAI,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAKxD;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,gBAAgB,CAAC,OAAO,MAAM,CAAC,CAMvD;AAED;;;;;GAKG;AACH,eAAO,MAAM,EAAE,iCAMb,CAAA;AAYF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAQpC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAKxC;AAMD;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAYZ;AAMD;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAQxD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB,CAMA"}
@@ -0,0 +1,202 @@
1
+ "use strict";
2
+ /**
3
+ * @rovela/sdk/core/db/client
4
+ *
5
+ * Neon serverless database client with Drizzle ORM
6
+ * Includes tenant isolation for multi-tenant e-commerce stores
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.db = void 0;
43
+ exports.getSql = getSql;
44
+ exports.getDb = getDb;
45
+ exports.setTenantId = setTenantId;
46
+ exports.getTenantId = getTenantId;
47
+ exports.clearTenantId = clearTenantId;
48
+ exports.initTenantFromEnv = initTenantFromEnv;
49
+ exports.withTenant = withTenant;
50
+ exports.checkConnection = checkConnection;
51
+ exports.getConnectionInfo = getConnectionInfo;
52
+ const serverless_1 = require("@neondatabase/serverless");
53
+ const neon_http_1 = require("drizzle-orm/neon-http");
54
+ const schema = __importStar(require("./schema"));
55
+ // =============================================================================
56
+ // Configuration
57
+ // =============================================================================
58
+ // Get database URL from environment
59
+ function getDatabaseUrl() {
60
+ const url = process.env.DATABASE_URL;
61
+ if (!url) {
62
+ throw new Error('DATABASE_URL environment variable is not set. ' +
63
+ 'Please set it to your Neon database connection string.');
64
+ }
65
+ return url;
66
+ }
67
+ // =============================================================================
68
+ // Database Client
69
+ // =============================================================================
70
+ let _sql = null;
71
+ let _db = null;
72
+ /**
73
+ * Get the raw Neon SQL client
74
+ * Use this for raw SQL queries when needed
75
+ */
76
+ function getSql() {
77
+ if (!_sql) {
78
+ _sql = (0, serverless_1.neon)(getDatabaseUrl());
79
+ }
80
+ return _sql;
81
+ }
82
+ /**
83
+ * Get the Drizzle ORM database client with full schema
84
+ * This is the main entry point for database operations
85
+ */
86
+ function getDb() {
87
+ if (!_db) {
88
+ const sql = getSql();
89
+ _db = (0, neon_http_1.drizzle)(sql, { schema });
90
+ }
91
+ return _db;
92
+ }
93
+ /**
94
+ * Main database client export
95
+ * Usage: import { db } from '@rovela/sdk/core'
96
+ *
97
+ * Note: This is a lazy-loaded proxy to avoid connection at import time
98
+ */
99
+ exports.db = new Proxy({}, {
100
+ get(_target, prop) {
101
+ const database = getDb();
102
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
+ return database[prop];
104
+ },
105
+ });
106
+ // =============================================================================
107
+ // Tenant Context
108
+ // =============================================================================
109
+ /**
110
+ * Tenant context for multi-tenant isolation
111
+ * Set this at the start of each request to ensure queries are scoped
112
+ */
113
+ let currentTenantId = null;
114
+ /**
115
+ * Set the current tenant ID for the request
116
+ * All queries using withTenant() will be scoped to this tenant
117
+ */
118
+ function setTenantId(tenantId) {
119
+ currentTenantId = tenantId;
120
+ }
121
+ /**
122
+ * Get the current tenant ID
123
+ * @throws Error if tenant ID is not set
124
+ */
125
+ function getTenantId() {
126
+ if (!currentTenantId) {
127
+ throw new Error('Tenant ID not set. Call setTenantId() at the start of each request, ' +
128
+ 'or set TENANT_ID environment variable.');
129
+ }
130
+ return currentTenantId;
131
+ }
132
+ /**
133
+ * Clear the tenant context (call at end of request)
134
+ */
135
+ function clearTenantId() {
136
+ currentTenantId = null;
137
+ }
138
+ /**
139
+ * Initialize tenant from environment variable
140
+ * Useful for single-tenant deployments
141
+ */
142
+ function initTenantFromEnv() {
143
+ const envTenantId = process.env.TENANT_ID;
144
+ if (envTenantId) {
145
+ setTenantId(envTenantId);
146
+ }
147
+ }
148
+ // =============================================================================
149
+ // Request Scoped Tenant (for middleware)
150
+ // =============================================================================
151
+ /**
152
+ * Execute a function with a specific tenant context
153
+ * Automatically clears tenant after execution
154
+ *
155
+ * @example
156
+ * const products = await withTenant(tenantId, async () => {
157
+ * return db.query.products.findMany()
158
+ * })
159
+ */
160
+ async function withTenant(tenantId, fn) {
161
+ const previousTenantId = currentTenantId;
162
+ try {
163
+ setTenantId(tenantId);
164
+ return await fn();
165
+ }
166
+ finally {
167
+ if (previousTenantId) {
168
+ setTenantId(previousTenantId);
169
+ }
170
+ else {
171
+ clearTenantId();
172
+ }
173
+ }
174
+ }
175
+ // =============================================================================
176
+ // Connection Health
177
+ // =============================================================================
178
+ /**
179
+ * Check database connection health
180
+ * Returns true if connection is successful
181
+ */
182
+ async function checkConnection() {
183
+ try {
184
+ const sql = getSql();
185
+ await sql `SELECT 1`;
186
+ return true;
187
+ }
188
+ catch {
189
+ return false;
190
+ }
191
+ }
192
+ /**
193
+ * Get database connection info (for debugging)
194
+ */
195
+ function getConnectionInfo() {
196
+ return {
197
+ hasUrl: !!process.env.DATABASE_URL,
198
+ hasTenant: !!currentTenantId,
199
+ tenantId: currentTenantId,
200
+ };
201
+ }
202
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/core/db/client.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @rovela/sdk/core/db
3
+ *
4
+ * Database module exports
5
+ */
6
+ export { db, getDb, getSql, setTenantId, getTenantId, clearTenantId, initTenantFromEnv, withTenant, checkConnection, getConnectionInfo, } from './client';
7
+ export * as schema from './schema';
8
+ export type { Product, NewProduct, ProductVariant, NewProductVariant, Category, NewCategory, Order, NewOrder, OrderItem, NewOrderItem, Customer, NewCustomer, StoreAdmin, NewStoreAdmin, } from './schema';
9
+ export { findProducts, findProductBySlug, findProductById, findProductVariants, countProducts, findCategories, findCategoryBySlug, findOrders, findOrderById, findOrderItems, findOrderByPaymentIntent, findOrderBySessionId, createOrder, createOrderItems, updateOrderStatus, findCustomerByEmail, findCustomerById, findCustomers, findAdminByEmail, getStoreStats, getLowStockProducts, getRecentOrders, } from './queries';
10
+ export type { FindProductsOptions, FindOrdersOptions } from './queries';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/db/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,EAAE,EACF,KAAK,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,iBAAiB,GAClB,MAAM,UAAU,CAAA;AAGjB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAGlC,YAAY,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,GACd,MAAM,UAAU,CAAA;AAGjB,OAAO,EAEL,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,aAAa,EAEb,cAAc,EACd,kBAAkB,EAElB,UAAU,EACV,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,oBAAoB,EAEpB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EAEjB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EAEb,gBAAgB,EAEhB,aAAa,EACb,mBAAmB,EACnB,eAAe,GAChB,MAAM,WAAW,CAAA;AAElB,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /**
3
+ * @rovela/sdk/core/db
4
+ *
5
+ * Database module exports
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
19
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
20
+ }) : function(o, v) {
21
+ o["default"] = v;
22
+ });
23
+ var __importStar = (this && this.__importStar) || (function () {
24
+ var ownKeys = function(o) {
25
+ ownKeys = Object.getOwnPropertyNames || function (o) {
26
+ var ar = [];
27
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
28
+ return ar;
29
+ };
30
+ return ownKeys(o);
31
+ };
32
+ return function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ })();
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.getRecentOrders = exports.getLowStockProducts = exports.getStoreStats = exports.findAdminByEmail = exports.findCustomers = exports.findCustomerById = exports.findCustomerByEmail = exports.updateOrderStatus = exports.createOrderItems = exports.createOrder = exports.findOrderBySessionId = exports.findOrderByPaymentIntent = exports.findOrderItems = exports.findOrderById = exports.findOrders = exports.findCategoryBySlug = exports.findCategories = exports.countProducts = exports.findProductVariants = exports.findProductById = exports.findProductBySlug = exports.findProducts = exports.schema = exports.getConnectionInfo = exports.checkConnection = exports.withTenant = exports.initTenantFromEnv = exports.clearTenantId = exports.getTenantId = exports.setTenantId = exports.getSql = exports.getDb = exports.db = void 0;
42
+ // Client and tenant management
43
+ var client_1 = require("./client");
44
+ Object.defineProperty(exports, "db", { enumerable: true, get: function () { return client_1.db; } });
45
+ Object.defineProperty(exports, "getDb", { enumerable: true, get: function () { return client_1.getDb; } });
46
+ Object.defineProperty(exports, "getSql", { enumerable: true, get: function () { return client_1.getSql; } });
47
+ Object.defineProperty(exports, "setTenantId", { enumerable: true, get: function () { return client_1.setTenantId; } });
48
+ Object.defineProperty(exports, "getTenantId", { enumerable: true, get: function () { return client_1.getTenantId; } });
49
+ Object.defineProperty(exports, "clearTenantId", { enumerable: true, get: function () { return client_1.clearTenantId; } });
50
+ Object.defineProperty(exports, "initTenantFromEnv", { enumerable: true, get: function () { return client_1.initTenantFromEnv; } });
51
+ Object.defineProperty(exports, "withTenant", { enumerable: true, get: function () { return client_1.withTenant; } });
52
+ Object.defineProperty(exports, "checkConnection", { enumerable: true, get: function () { return client_1.checkConnection; } });
53
+ Object.defineProperty(exports, "getConnectionInfo", { enumerable: true, get: function () { return client_1.getConnectionInfo; } });
54
+ // Schema exports
55
+ exports.schema = __importStar(require("./schema"));
56
+ // Query helpers
57
+ var queries_1 = require("./queries");
58
+ // Products
59
+ Object.defineProperty(exports, "findProducts", { enumerable: true, get: function () { return queries_1.findProducts; } });
60
+ Object.defineProperty(exports, "findProductBySlug", { enumerable: true, get: function () { return queries_1.findProductBySlug; } });
61
+ Object.defineProperty(exports, "findProductById", { enumerable: true, get: function () { return queries_1.findProductById; } });
62
+ Object.defineProperty(exports, "findProductVariants", { enumerable: true, get: function () { return queries_1.findProductVariants; } });
63
+ Object.defineProperty(exports, "countProducts", { enumerable: true, get: function () { return queries_1.countProducts; } });
64
+ // Categories
65
+ Object.defineProperty(exports, "findCategories", { enumerable: true, get: function () { return queries_1.findCategories; } });
66
+ Object.defineProperty(exports, "findCategoryBySlug", { enumerable: true, get: function () { return queries_1.findCategoryBySlug; } });
67
+ // Orders (queries)
68
+ Object.defineProperty(exports, "findOrders", { enumerable: true, get: function () { return queries_1.findOrders; } });
69
+ Object.defineProperty(exports, "findOrderById", { enumerable: true, get: function () { return queries_1.findOrderById; } });
70
+ Object.defineProperty(exports, "findOrderItems", { enumerable: true, get: function () { return queries_1.findOrderItems; } });
71
+ Object.defineProperty(exports, "findOrderByPaymentIntent", { enumerable: true, get: function () { return queries_1.findOrderByPaymentIntent; } });
72
+ Object.defineProperty(exports, "findOrderBySessionId", { enumerable: true, get: function () { return queries_1.findOrderBySessionId; } });
73
+ // Orders (mutations)
74
+ Object.defineProperty(exports, "createOrder", { enumerable: true, get: function () { return queries_1.createOrder; } });
75
+ Object.defineProperty(exports, "createOrderItems", { enumerable: true, get: function () { return queries_1.createOrderItems; } });
76
+ Object.defineProperty(exports, "updateOrderStatus", { enumerable: true, get: function () { return queries_1.updateOrderStatus; } });
77
+ // Customers
78
+ Object.defineProperty(exports, "findCustomerByEmail", { enumerable: true, get: function () { return queries_1.findCustomerByEmail; } });
79
+ Object.defineProperty(exports, "findCustomerById", { enumerable: true, get: function () { return queries_1.findCustomerById; } });
80
+ Object.defineProperty(exports, "findCustomers", { enumerable: true, get: function () { return queries_1.findCustomers; } });
81
+ // Admins
82
+ Object.defineProperty(exports, "findAdminByEmail", { enumerable: true, get: function () { return queries_1.findAdminByEmail; } });
83
+ // Stats
84
+ Object.defineProperty(exports, "getStoreStats", { enumerable: true, get: function () { return queries_1.getStoreStats; } });
85
+ Object.defineProperty(exports, "getLowStockProducts", { enumerable: true, get: function () { return queries_1.getLowStockProducts; } });
86
+ Object.defineProperty(exports, "getRecentOrders", { enumerable: true, get: function () { return queries_1.getRecentOrders; } });
87
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/db/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA+B;AAC/B,mCAWiB;AAVf,4FAAA,EAAE,OAAA;AACF,+FAAA,KAAK,OAAA;AACL,gGAAA,MAAM,OAAA;AACN,qGAAA,WAAW,OAAA;AACX,qGAAA,WAAW,OAAA;AACX,uGAAA,aAAa,OAAA;AACb,2GAAA,iBAAiB,OAAA;AACjB,oGAAA,UAAU,OAAA;AACV,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AAGnB,iBAAiB;AACjB,mDAAkC;AAoBlC,gBAAgB;AAChB,qCA8BkB;AA7BhB,WAAW;AACX,uGAAA,YAAY,OAAA;AACZ,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,8GAAA,mBAAmB,OAAA;AACnB,wGAAA,aAAa,OAAA;AACb,aAAa;AACb,yGAAA,cAAc,OAAA;AACd,6GAAA,kBAAkB,OAAA;AAClB,mBAAmB;AACnB,qGAAA,UAAU,OAAA;AACV,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,mHAAA,wBAAwB,OAAA;AACxB,+GAAA,oBAAoB,OAAA;AACpB,qBAAqB;AACrB,sGAAA,WAAW,OAAA;AACX,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,YAAY;AACZ,8GAAA,mBAAmB,OAAA;AACnB,2GAAA,gBAAgB,OAAA;AAChB,wGAAA,aAAa,OAAA;AACb,SAAS;AACT,2GAAA,gBAAgB,OAAA;AAChB,QAAQ;AACR,wGAAA,aAAa,OAAA;AACb,8GAAA,mBAAmB,OAAA;AACnB,0GAAA,eAAe,OAAA"}