@rovela-ai/sdk 0.1.1 → 0.1.2

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 (575) hide show
  1. package/dist/admin/hooks/useAdminAuth.d.ts.map +1 -1
  2. package/dist/admin/hooks/useAdminAuth.js +4 -1
  3. package/dist/admin/hooks/useAdminAuth.js.map +1 -1
  4. package/dist/auth/hooks/useAuth.d.ts.map +1 -1
  5. package/dist/auth/hooks/useAuth.js +8 -2
  6. package/dist/auth/hooks/useAuth.js.map +1 -1
  7. package/package.json +1 -1
  8. package/dist/admin/api/auth.d.ts +0 -32
  9. package/dist/admin/api/auth.d.ts.map +0 -1
  10. package/dist/admin/api/auth.js +0 -43
  11. package/dist/admin/api/auth.js.map +0 -1
  12. package/dist/admin/api/categories.d.ts +0 -68
  13. package/dist/admin/api/categories.d.ts.map +0 -1
  14. package/dist/admin/api/categories.js +0 -247
  15. package/dist/admin/api/categories.js.map +0 -1
  16. package/dist/admin/api/customers.d.ts +0 -41
  17. package/dist/admin/api/customers.d.ts.map +0 -1
  18. package/dist/admin/api/customers.js +0 -113
  19. package/dist/admin/api/customers.js.map +0 -1
  20. package/dist/admin/api/index.d.ts +0 -56
  21. package/dist/admin/api/index.d.ts.map +0 -1
  22. package/dist/admin/api/index.js +0 -87
  23. package/dist/admin/api/index.js.map +0 -1
  24. package/dist/admin/api/orders.d.ts +0 -59
  25. package/dist/admin/api/orders.d.ts.map +0 -1
  26. package/dist/admin/api/orders.js +0 -209
  27. package/dist/admin/api/orders.js.map +0 -1
  28. package/dist/admin/api/products.d.ts +0 -103
  29. package/dist/admin/api/products.d.ts.map +0 -1
  30. package/dist/admin/api/products.js +0 -329
  31. package/dist/admin/api/products.js.map +0 -1
  32. package/dist/admin/api/refund.d.ts +0 -29
  33. package/dist/admin/api/refund.d.ts.map +0 -1
  34. package/dist/admin/api/refund.js +0 -136
  35. package/dist/admin/api/refund.js.map +0 -1
  36. package/dist/admin/api/stats.d.ts +0 -40
  37. package/dist/admin/api/stats.d.ts.map +0 -1
  38. package/dist/admin/api/stats.js +0 -74
  39. package/dist/admin/api/stats.js.map +0 -1
  40. package/dist/admin/components/AdminGuard.d.ts +0 -40
  41. package/dist/admin/components/AdminGuard.d.ts.map +0 -1
  42. package/dist/admin/components/AdminGuard.js +0 -97
  43. package/dist/admin/components/AdminGuard.js.map +0 -1
  44. package/dist/admin/components/AdminHeader.d.ts +0 -18
  45. package/dist/admin/components/AdminHeader.d.ts.map +0 -1
  46. package/dist/admin/components/AdminHeader.js +0 -33
  47. package/dist/admin/components/AdminHeader.js.map +0 -1
  48. package/dist/admin/components/AdminLayout.d.ts +0 -50
  49. package/dist/admin/components/AdminLayout.d.ts.map +0 -1
  50. package/dist/admin/components/AdminLayout.js +0 -46
  51. package/dist/admin/components/AdminLayout.js.map +0 -1
  52. package/dist/admin/components/AdminLoginForm.d.ts +0 -18
  53. package/dist/admin/components/AdminLoginForm.d.ts.map +0 -1
  54. package/dist/admin/components/AdminLoginForm.js +0 -58
  55. package/dist/admin/components/AdminLoginForm.js.map +0 -1
  56. package/dist/admin/components/AdminNav.d.ts +0 -34
  57. package/dist/admin/components/AdminNav.d.ts.map +0 -1
  58. package/dist/admin/components/AdminNav.js +0 -61
  59. package/dist/admin/components/AdminNav.js.map +0 -1
  60. package/dist/admin/components/InventoryEditor.d.ts +0 -15
  61. package/dist/admin/components/InventoryEditor.d.ts.map +0 -1
  62. package/dist/admin/components/InventoryEditor.js +0 -83
  63. package/dist/admin/components/InventoryEditor.js.map +0 -1
  64. package/dist/admin/components/LowStockAlert.d.ts +0 -11
  65. package/dist/admin/components/LowStockAlert.d.ts.map +0 -1
  66. package/dist/admin/components/LowStockAlert.js +0 -35
  67. package/dist/admin/components/LowStockAlert.js.map +0 -1
  68. package/dist/admin/components/OrderDetails.d.ts +0 -14
  69. package/dist/admin/components/OrderDetails.d.ts.map +0 -1
  70. package/dist/admin/components/OrderDetails.js +0 -94
  71. package/dist/admin/components/OrderDetails.js.map +0 -1
  72. package/dist/admin/components/OrderTable.d.ts +0 -13
  73. package/dist/admin/components/OrderTable.d.ts.map +0 -1
  74. package/dist/admin/components/OrderTable.js +0 -89
  75. package/dist/admin/components/OrderTable.js.map +0 -1
  76. package/dist/admin/components/ProductForm.d.ts +0 -18
  77. package/dist/admin/components/ProductForm.d.ts.map +0 -1
  78. package/dist/admin/components/ProductForm.js +0 -127
  79. package/dist/admin/components/ProductForm.js.map +0 -1
  80. package/dist/admin/components/ProductTable.d.ts +0 -13
  81. package/dist/admin/components/ProductTable.d.ts.map +0 -1
  82. package/dist/admin/components/ProductTable.js +0 -81
  83. package/dist/admin/components/ProductTable.js.map +0 -1
  84. package/dist/admin/components/RecentOrders.d.ts +0 -11
  85. package/dist/admin/components/RecentOrders.d.ts.map +0 -1
  86. package/dist/admin/components/RecentOrders.js +0 -58
  87. package/dist/admin/components/RecentOrders.js.map +0 -1
  88. package/dist/admin/components/RefundDialog.d.ts +0 -17
  89. package/dist/admin/components/RefundDialog.d.ts.map +0 -1
  90. package/dist/admin/components/RefundDialog.js +0 -86
  91. package/dist/admin/components/RefundDialog.js.map +0 -1
  92. package/dist/admin/components/StatsCards.d.ts +0 -23
  93. package/dist/admin/components/StatsCards.d.ts.map +0 -1
  94. package/dist/admin/components/StatsCards.js +0 -82
  95. package/dist/admin/components/StatsCards.js.map +0 -1
  96. package/dist/admin/components/StoreSettings.d.ts +0 -14
  97. package/dist/admin/components/StoreSettings.d.ts.map +0 -1
  98. package/dist/admin/components/StoreSettings.js +0 -88
  99. package/dist/admin/components/StoreSettings.js.map +0 -1
  100. package/dist/admin/components/index.d.ts +0 -21
  101. package/dist/admin/components/index.d.ts.map +0 -1
  102. package/dist/admin/components/index.js +0 -57
  103. package/dist/admin/components/index.js.map +0 -1
  104. package/dist/admin/config.d.ts +0 -74
  105. package/dist/admin/config.d.ts.map +0 -1
  106. package/dist/admin/config.js +0 -229
  107. package/dist/admin/config.js.map +0 -1
  108. package/dist/admin/hooks/index.d.ts +0 -10
  109. package/dist/admin/hooks/index.d.ts.map +0 -1
  110. package/dist/admin/hooks/index.js +0 -17
  111. package/dist/admin/hooks/index.js.map +0 -1
  112. package/dist/admin/hooks/useAdminOrders.d.ts +0 -41
  113. package/dist/admin/hooks/useAdminOrders.d.ts.map +0 -1
  114. package/dist/admin/hooks/useAdminOrders.js +0 -191
  115. package/dist/admin/hooks/useAdminOrders.js.map +0 -1
  116. package/dist/admin/hooks/useAdminProducts.d.ts +0 -39
  117. package/dist/admin/hooks/useAdminProducts.d.ts.map +0 -1
  118. package/dist/admin/hooks/useAdminProducts.js +0 -235
  119. package/dist/admin/hooks/useAdminProducts.js.map +0 -1
  120. package/dist/admin/hooks/useAdminStats.d.ts +0 -50
  121. package/dist/admin/hooks/useAdminStats.d.ts.map +0 -1
  122. package/dist/admin/hooks/useAdminStats.js +0 -111
  123. package/dist/admin/hooks/useAdminStats.js.map +0 -1
  124. package/dist/admin/index.d.ts +0 -63
  125. package/dist/admin/index.d.ts.map +0 -1
  126. package/dist/admin/index.js +0 -148
  127. package/dist/admin/index.js.map +0 -1
  128. package/dist/admin/server/admin-service.d.ts +0 -130
  129. package/dist/admin/server/admin-service.d.ts.map +0 -1
  130. package/dist/admin/server/admin-service.js +0 -298
  131. package/dist/admin/server/admin-service.js.map +0 -1
  132. package/dist/admin/server/index.d.ts +0 -8
  133. package/dist/admin/server/index.d.ts.map +0 -1
  134. package/dist/admin/server/index.js +0 -25
  135. package/dist/admin/server/index.js.map +0 -1
  136. package/dist/admin/types.d.ts +0 -549
  137. package/dist/admin/types.d.ts.map +0 -1
  138. package/dist/admin/types.js +0 -11
  139. package/dist/admin/types.js.map +0 -1
  140. package/dist/auth/api/auth.d.ts +0 -54
  141. package/dist/auth/api/auth.d.ts.map +0 -1
  142. package/dist/auth/api/auth.js +0 -67
  143. package/dist/auth/api/auth.js.map +0 -1
  144. package/dist/auth/api/forgot-password.d.ts +0 -41
  145. package/dist/auth/api/forgot-password.d.ts.map +0 -1
  146. package/dist/auth/api/forgot-password.js +0 -68
  147. package/dist/auth/api/forgot-password.js.map +0 -1
  148. package/dist/auth/api/index.d.ts +0 -34
  149. package/dist/auth/api/index.d.ts.map +0 -1
  150. package/dist/auth/api/index.js +0 -52
  151. package/dist/auth/api/index.js.map +0 -1
  152. package/dist/auth/api/register.d.ts +0 -41
  153. package/dist/auth/api/register.d.ts.map +0 -1
  154. package/dist/auth/api/register.js +0 -93
  155. package/dist/auth/api/register.js.map +0 -1
  156. package/dist/auth/api/resend-verification.d.ts +0 -41
  157. package/dist/auth/api/resend-verification.d.ts.map +0 -1
  158. package/dist/auth/api/resend-verification.js +0 -71
  159. package/dist/auth/api/resend-verification.js.map +0 -1
  160. package/dist/auth/api/reset-password.d.ts +0 -67
  161. package/dist/auth/api/reset-password.d.ts.map +0 -1
  162. package/dist/auth/api/reset-password.js +0 -110
  163. package/dist/auth/api/reset-password.js.map +0 -1
  164. package/dist/auth/api/verify-email.d.ts +0 -47
  165. package/dist/auth/api/verify-email.d.ts.map +0 -1
  166. package/dist/auth/api/verify-email.js +0 -94
  167. package/dist/auth/api/verify-email.js.map +0 -1
  168. package/dist/auth/components/AuthGuard.d.ts +0 -52
  169. package/dist/auth/components/AuthGuard.d.ts.map +0 -1
  170. package/dist/auth/components/AuthGuard.js +0 -113
  171. package/dist/auth/components/AuthGuard.js.map +0 -1
  172. package/dist/auth/components/ForgotPasswordForm.d.ts +0 -15
  173. package/dist/auth/components/ForgotPasswordForm.d.ts.map +0 -1
  174. package/dist/auth/components/ForgotPasswordForm.js +0 -44
  175. package/dist/auth/components/ForgotPasswordForm.js.map +0 -1
  176. package/dist/auth/components/ResetPasswordForm.d.ts +0 -18
  177. package/dist/auth/components/ResetPasswordForm.d.ts.map +0 -1
  178. package/dist/auth/components/ResetPasswordForm.js +0 -88
  179. package/dist/auth/components/ResetPasswordForm.js.map +0 -1
  180. package/dist/auth/components/SignInForm.d.ts +0 -21
  181. package/dist/auth/components/SignInForm.d.ts.map +0 -1
  182. package/dist/auth/components/SignInForm.js +0 -63
  183. package/dist/auth/components/SignInForm.js.map +0 -1
  184. package/dist/auth/components/SignUpForm.d.ts +0 -18
  185. package/dist/auth/components/SignUpForm.d.ts.map +0 -1
  186. package/dist/auth/components/SignUpForm.js +0 -79
  187. package/dist/auth/components/SignUpForm.js.map +0 -1
  188. package/dist/auth/components/UserMenu.d.ts +0 -18
  189. package/dist/auth/components/UserMenu.d.ts.map +0 -1
  190. package/dist/auth/components/UserMenu.js +0 -75
  191. package/dist/auth/components/UserMenu.js.map +0 -1
  192. package/dist/auth/components/VerifyEmailNotice.d.ts +0 -20
  193. package/dist/auth/components/VerifyEmailNotice.d.ts.map +0 -1
  194. package/dist/auth/components/VerifyEmailNotice.js +0 -59
  195. package/dist/auth/components/VerifyEmailNotice.js.map +0 -1
  196. package/dist/auth/components/index.d.ts +0 -13
  197. package/dist/auth/components/index.d.ts.map +0 -1
  198. package/dist/auth/components/index.js +0 -24
  199. package/dist/auth/components/index.js.map +0 -1
  200. package/dist/auth/config.d.ts +0 -42
  201. package/dist/auth/config.d.ts.map +0 -1
  202. package/dist/auth/config.js +0 -174
  203. package/dist/auth/config.js.map +0 -1
  204. package/dist/auth/hooks/index.d.ts +0 -7
  205. package/dist/auth/hooks/index.d.ts.map +0 -1
  206. package/dist/auth/hooks/index.js +0 -11
  207. package/dist/auth/hooks/index.js.map +0 -1
  208. package/dist/auth/index.d.ts +0 -54
  209. package/dist/auth/index.d.ts.map +0 -1
  210. package/dist/auth/index.js +0 -88
  211. package/dist/auth/index.js.map +0 -1
  212. package/dist/auth/server/customer-service.d.ts +0 -138
  213. package/dist/auth/server/customer-service.d.ts.map +0 -1
  214. package/dist/auth/server/customer-service.js +0 -309
  215. package/dist/auth/server/customer-service.js.map +0 -1
  216. package/dist/auth/server/email-sender.d.ts +0 -64
  217. package/dist/auth/server/email-sender.d.ts.map +0 -1
  218. package/dist/auth/server/email-sender.js +0 -112
  219. package/dist/auth/server/email-sender.js.map +0 -1
  220. package/dist/auth/server/index.d.ts +0 -13
  221. package/dist/auth/server/index.d.ts.map +0 -1
  222. package/dist/auth/server/index.js +0 -48
  223. package/dist/auth/server/index.js.map +0 -1
  224. package/dist/auth/server/password-reset-service.d.ts +0 -86
  225. package/dist/auth/server/password-reset-service.d.ts.map +0 -1
  226. package/dist/auth/server/password-reset-service.js +0 -236
  227. package/dist/auth/server/password-reset-service.js.map +0 -1
  228. package/dist/auth/server/password.d.ts +0 -58
  229. package/dist/auth/server/password.d.ts.map +0 -1
  230. package/dist/auth/server/password.js +0 -94
  231. package/dist/auth/server/password.js.map +0 -1
  232. package/dist/auth/server/verification-service.d.ts +0 -87
  233. package/dist/auth/server/verification-service.d.ts.map +0 -1
  234. package/dist/auth/server/verification-service.js +0 -268
  235. package/dist/auth/server/verification-service.js.map +0 -1
  236. package/dist/auth/types.d.ts +0 -305
  237. package/dist/auth/types.d.ts.map +0 -1
  238. package/dist/auth/types.js +0 -8
  239. package/dist/auth/types.js.map +0 -1
  240. package/dist/cart/CartProvider.d.ts +0 -65
  241. package/dist/cart/CartProvider.d.ts.map +0 -1
  242. package/dist/cart/CartProvider.js +0 -101
  243. package/dist/cart/CartProvider.js.map +0 -1
  244. package/dist/cart/components/AddToCartButton.d.ts +0 -77
  245. package/dist/cart/components/AddToCartButton.d.ts.map +0 -1
  246. package/dist/cart/components/AddToCartButton.js +0 -124
  247. package/dist/cart/components/AddToCartButton.js.map +0 -1
  248. package/dist/cart/components/CartDrawer.d.ts +0 -71
  249. package/dist/cart/components/CartDrawer.d.ts.map +0 -1
  250. package/dist/cart/components/CartDrawer.js +0 -108
  251. package/dist/cart/components/CartDrawer.js.map +0 -1
  252. package/dist/cart/components/CartIcon.d.ts +0 -36
  253. package/dist/cart/components/CartIcon.d.ts.map +0 -1
  254. package/dist/cart/components/CartIcon.js +0 -70
  255. package/dist/cart/components/CartIcon.js.map +0 -1
  256. package/dist/cart/components/CartItem.d.ts +0 -52
  257. package/dist/cart/components/CartItem.d.ts.map +0 -1
  258. package/dist/cart/components/CartItem.js +0 -55
  259. package/dist/cart/components/CartItem.js.map +0 -1
  260. package/dist/cart/components/CartSummary.d.ts +0 -43
  261. package/dist/cart/components/CartSummary.d.ts.map +0 -1
  262. package/dist/cart/components/CartSummary.js +0 -58
  263. package/dist/cart/components/CartSummary.js.map +0 -1
  264. package/dist/cart/components/QuantitySelector.d.ts +0 -39
  265. package/dist/cart/components/QuantitySelector.d.ts.map +0 -1
  266. package/dist/cart/components/QuantitySelector.js +0 -87
  267. package/dist/cart/components/QuantitySelector.js.map +0 -1
  268. package/dist/cart/components/index.d.ts +0 -18
  269. package/dist/cart/components/index.d.ts.map +0 -1
  270. package/dist/cart/components/index.js +0 -21
  271. package/dist/cart/components/index.js.map +0 -1
  272. package/dist/cart/index.d.ts +0 -109
  273. package/dist/cart/index.d.ts.map +0 -1
  274. package/dist/cart/index.js +0 -129
  275. package/dist/cart/index.js.map +0 -1
  276. package/dist/cart/store.d.ts +0 -101
  277. package/dist/cart/store.d.ts.map +0 -1
  278. package/dist/cart/store.js +0 -207
  279. package/dist/cart/store.js.map +0 -1
  280. package/dist/checkout/api/checkout.d.ts +0 -31
  281. package/dist/checkout/api/checkout.d.ts.map +0 -1
  282. package/dist/checkout/api/checkout.js +0 -103
  283. package/dist/checkout/api/checkout.js.map +0 -1
  284. package/dist/checkout/api/index.d.ts +0 -8
  285. package/dist/checkout/api/index.d.ts.map +0 -1
  286. package/dist/checkout/api/index.js +0 -13
  287. package/dist/checkout/api/index.js.map +0 -1
  288. package/dist/checkout/api/webhook.d.ts +0 -30
  289. package/dist/checkout/api/webhook.d.ts.map +0 -1
  290. package/dist/checkout/api/webhook.js +0 -58
  291. package/dist/checkout/api/webhook.js.map +0 -1
  292. package/dist/checkout/components/CheckoutButton.d.ts +0 -44
  293. package/dist/checkout/components/CheckoutButton.d.ts.map +0 -1
  294. package/dist/checkout/components/CheckoutButton.js +0 -97
  295. package/dist/checkout/components/CheckoutButton.js.map +0 -1
  296. package/dist/checkout/components/CheckoutSuccess.d.ts +0 -29
  297. package/dist/checkout/components/CheckoutSuccess.d.ts.map +0 -1
  298. package/dist/checkout/components/CheckoutSuccess.js +0 -60
  299. package/dist/checkout/components/CheckoutSuccess.js.map +0 -1
  300. package/dist/checkout/components/OrderSummary.d.ts +0 -37
  301. package/dist/checkout/components/OrderSummary.d.ts.map +0 -1
  302. package/dist/checkout/components/OrderSummary.js +0 -70
  303. package/dist/checkout/components/OrderSummary.js.map +0 -1
  304. package/dist/checkout/components/ShippingForm.d.ts +0 -30
  305. package/dist/checkout/components/ShippingForm.d.ts.map +0 -1
  306. package/dist/checkout/components/ShippingForm.js +0 -125
  307. package/dist/checkout/components/ShippingForm.js.map +0 -1
  308. package/dist/checkout/components/index.d.ts +0 -10
  309. package/dist/checkout/components/index.d.ts.map +0 -1
  310. package/dist/checkout/components/index.js +0 -17
  311. package/dist/checkout/components/index.js.map +0 -1
  312. package/dist/checkout/hooks/index.d.ts +0 -7
  313. package/dist/checkout/hooks/index.d.ts.map +0 -1
  314. package/dist/checkout/hooks/index.js +0 -12
  315. package/dist/checkout/hooks/index.js.map +0 -1
  316. package/dist/checkout/hooks/useCheckout.d.ts +0 -61
  317. package/dist/checkout/hooks/useCheckout.d.ts.map +0 -1
  318. package/dist/checkout/hooks/useCheckout.js +0 -174
  319. package/dist/checkout/hooks/useCheckout.js.map +0 -1
  320. package/dist/checkout/index.d.ts +0 -111
  321. package/dist/checkout/index.d.ts.map +0 -1
  322. package/dist/checkout/index.js +0 -148
  323. package/dist/checkout/index.js.map +0 -1
  324. package/dist/checkout/server/create-checkout-session.d.ts +0 -69
  325. package/dist/checkout/server/create-checkout-session.d.ts.map +0 -1
  326. package/dist/checkout/server/create-checkout-session.js +0 -190
  327. package/dist/checkout/server/create-checkout-session.js.map +0 -1
  328. package/dist/checkout/server/handle-webhook.d.ts +0 -35
  329. package/dist/checkout/server/handle-webhook.d.ts.map +0 -1
  330. package/dist/checkout/server/handle-webhook.js +0 -279
  331. package/dist/checkout/server/handle-webhook.js.map +0 -1
  332. package/dist/checkout/server/index.d.ts +0 -10
  333. package/dist/checkout/server/index.d.ts.map +0 -1
  334. package/dist/checkout/server/index.js +0 -19
  335. package/dist/checkout/server/index.js.map +0 -1
  336. package/dist/checkout/server/order-service.d.ts +0 -43
  337. package/dist/checkout/server/order-service.d.ts.map +0 -1
  338. package/dist/checkout/server/order-service.js +0 -196
  339. package/dist/checkout/server/order-service.js.map +0 -1
  340. package/dist/checkout/stripe/client.d.ts +0 -72
  341. package/dist/checkout/stripe/client.d.ts.map +0 -1
  342. package/dist/checkout/stripe/client.js +0 -189
  343. package/dist/checkout/stripe/client.js.map +0 -1
  344. package/dist/checkout/stripe/index.d.ts +0 -7
  345. package/dist/checkout/stripe/index.d.ts.map +0 -1
  346. package/dist/checkout/stripe/index.js +0 -21
  347. package/dist/checkout/stripe/index.js.map +0 -1
  348. package/dist/checkout/types.d.ts +0 -263
  349. package/dist/checkout/types.d.ts.map +0 -1
  350. package/dist/checkout/types.js +0 -9
  351. package/dist/checkout/types.js.map +0 -1
  352. package/dist/core/config.d.ts +0 -296
  353. package/dist/core/config.d.ts.map +0 -1
  354. package/dist/core/config.js +0 -162
  355. package/dist/core/config.js.map +0 -1
  356. package/dist/core/db/client.d.ts +0 -69
  357. package/dist/core/db/client.d.ts.map +0 -1
  358. package/dist/core/db/client.js +0 -202
  359. package/dist/core/db/client.js.map +0 -1
  360. package/dist/core/db/index.d.ts +0 -11
  361. package/dist/core/db/index.d.ts.map +0 -1
  362. package/dist/core/db/index.js +0 -87
  363. package/dist/core/db/index.js.map +0 -1
  364. package/dist/core/db/queries.d.ts +0 -658
  365. package/dist/core/db/queries.d.ts.map +0 -1
  366. package/dist/core/db/queries.js +0 -735
  367. package/dist/core/db/queries.js.map +0 -1
  368. package/dist/core/db/schema.d.ts +0 -1628
  369. package/dist/core/db/schema.d.ts.map +0 -1
  370. package/dist/core/db/schema.js +0 -262
  371. package/dist/core/db/schema.js.map +0 -1
  372. package/dist/core/index.d.ts +0 -20
  373. package/dist/core/index.d.ts.map +0 -1
  374. package/dist/core/index.js +0 -71
  375. package/dist/core/index.js.map +0 -1
  376. package/dist/core/server/index.d.ts +0 -17
  377. package/dist/core/server/index.d.ts.map +0 -1
  378. package/dist/core/server/index.js +0 -68
  379. package/dist/core/server/index.js.map +0 -1
  380. package/dist/core/types.d.ts +0 -230
  381. package/dist/core/types.d.ts.map +0 -1
  382. package/dist/core/types.js +0 -9
  383. package/dist/core/types.js.map +0 -1
  384. package/dist/core/utils.d.ts +0 -153
  385. package/dist/core/utils.d.ts.map +0 -1
  386. package/dist/core/utils.js +0 -356
  387. package/dist/core/utils.js.map +0 -1
  388. package/dist/emails/config.d.ts +0 -42
  389. package/dist/emails/config.d.ts.map +0 -1
  390. package/dist/emails/config.js +0 -89
  391. package/dist/emails/config.js.map +0 -1
  392. package/dist/emails/index.d.ts +0 -85
  393. package/dist/emails/index.d.ts.map +0 -1
  394. package/dist/emails/index.js +0 -170
  395. package/dist/emails/index.js.map +0 -1
  396. package/dist/emails/send/auth.d.ts +0 -91
  397. package/dist/emails/send/auth.d.ts.map +0 -1
  398. package/dist/emails/send/auth.js +0 -132
  399. package/dist/emails/send/auth.js.map +0 -1
  400. package/dist/emails/send/index.d.ts +0 -10
  401. package/dist/emails/send/index.d.ts.map +0 -1
  402. package/dist/emails/send/index.js +0 -33
  403. package/dist/emails/send/index.js.map +0 -1
  404. package/dist/emails/send/orders.d.ts +0 -180
  405. package/dist/emails/send/orders.d.ts.map +0 -1
  406. package/dist/emails/send/orders.js +0 -259
  407. package/dist/emails/send/orders.js.map +0 -1
  408. package/dist/emails/sender.d.ts +0 -72
  409. package/dist/emails/sender.d.ts.map +0 -1
  410. package/dist/emails/sender.js +0 -118
  411. package/dist/emails/sender.js.map +0 -1
  412. package/dist/emails/templates/base.d.ts +0 -105
  413. package/dist/emails/templates/base.d.ts.map +0 -1
  414. package/dist/emails/templates/base.js +0 -291
  415. package/dist/emails/templates/base.js.map +0 -1
  416. package/dist/emails/templates/email-verification.d.ts +0 -28
  417. package/dist/emails/templates/email-verification.d.ts.map +0 -1
  418. package/dist/emails/templates/email-verification.js +0 -56
  419. package/dist/emails/templates/email-verification.js.map +0 -1
  420. package/dist/emails/templates/index.d.ts +0 -15
  421. package/dist/emails/templates/index.d.ts.map +0 -1
  422. package/dist/emails/templates/index.js +0 -58
  423. package/dist/emails/templates/index.js.map +0 -1
  424. package/dist/emails/templates/order-cancelled.d.ts +0 -30
  425. package/dist/emails/templates/order-cancelled.d.ts.map +0 -1
  426. package/dist/emails/templates/order-cancelled.js +0 -87
  427. package/dist/emails/templates/order-cancelled.js.map +0 -1
  428. package/dist/emails/templates/order-confirmation.d.ts +0 -36
  429. package/dist/emails/templates/order-confirmation.d.ts.map +0 -1
  430. package/dist/emails/templates/order-confirmation.js +0 -161
  431. package/dist/emails/templates/order-confirmation.js.map +0 -1
  432. package/dist/emails/templates/order-delivered.d.ts +0 -31
  433. package/dist/emails/templates/order-delivered.d.ts.map +0 -1
  434. package/dist/emails/templates/order-delivered.js +0 -95
  435. package/dist/emails/templates/order-delivered.js.map +0 -1
  436. package/dist/emails/templates/order-shipped.d.ts +0 -32
  437. package/dist/emails/templates/order-shipped.d.ts.map +0 -1
  438. package/dist/emails/templates/order-shipped.js +0 -87
  439. package/dist/emails/templates/order-shipped.js.map +0 -1
  440. package/dist/emails/templates/password-reset.d.ts +0 -27
  441. package/dist/emails/templates/password-reset.d.ts.map +0 -1
  442. package/dist/emails/templates/password-reset.js +0 -55
  443. package/dist/emails/templates/password-reset.js.map +0 -1
  444. package/dist/emails/templates/refund-processed.d.ts +0 -32
  445. package/dist/emails/templates/refund-processed.d.ts.map +0 -1
  446. package/dist/emails/templates/refund-processed.js +0 -96
  447. package/dist/emails/templates/refund-processed.js.map +0 -1
  448. package/dist/emails/templates/welcome.d.ts +0 -27
  449. package/dist/emails/templates/welcome.d.ts.map +0 -1
  450. package/dist/emails/templates/welcome.js +0 -56
  451. package/dist/emails/templates/welcome.js.map +0 -1
  452. package/dist/emails/types.d.ts +0 -202
  453. package/dist/emails/types.d.ts.map +0 -1
  454. package/dist/emails/types.js +0 -8
  455. package/dist/emails/types.js.map +0 -1
  456. package/dist/emails/utils.d.ts +0 -94
  457. package/dist/emails/utils.d.ts.map +0 -1
  458. package/dist/emails/utils.js +0 -229
  459. package/dist/emails/utils.js.map +0 -1
  460. package/dist/index.d.ts +0 -40
  461. package/dist/index.d.ts.map +0 -1
  462. package/dist/index.js +0 -225
  463. package/dist/index.js.map +0 -1
  464. package/dist/products/api/categories.d.ts +0 -29
  465. package/dist/products/api/categories.d.ts.map +0 -1
  466. package/dist/products/api/categories.js +0 -49
  467. package/dist/products/api/categories.js.map +0 -1
  468. package/dist/products/api/index.d.ts +0 -24
  469. package/dist/products/api/index.d.ts.map +0 -1
  470. package/dist/products/api/index.js +0 -30
  471. package/dist/products/api/index.js.map +0 -1
  472. package/dist/products/api/product.d.ts +0 -36
  473. package/dist/products/api/product.d.ts.map +0 -1
  474. package/dist/products/api/product.js +0 -70
  475. package/dist/products/api/product.js.map +0 -1
  476. package/dist/products/api/products.d.ts +0 -41
  477. package/dist/products/api/products.d.ts.map +0 -1
  478. package/dist/products/api/products.js +0 -102
  479. package/dist/products/api/products.js.map +0 -1
  480. package/dist/products/components/CategoryNav.d.ts +0 -51
  481. package/dist/products/components/CategoryNav.d.ts.map +0 -1
  482. package/dist/products/components/CategoryNav.js +0 -115
  483. package/dist/products/components/CategoryNav.js.map +0 -1
  484. package/dist/products/components/ProductBreadcrumb.d.ts +0 -52
  485. package/dist/products/components/ProductBreadcrumb.d.ts.map +0 -1
  486. package/dist/products/components/ProductBreadcrumb.js +0 -78
  487. package/dist/products/components/ProductBreadcrumb.js.map +0 -1
  488. package/dist/products/components/ProductCard.d.ts +0 -54
  489. package/dist/products/components/ProductCard.d.ts.map +0 -1
  490. package/dist/products/components/ProductCard.js +0 -65
  491. package/dist/products/components/ProductCard.js.map +0 -1
  492. package/dist/products/components/ProductDetails.d.ts +0 -63
  493. package/dist/products/components/ProductDetails.d.ts.map +0 -1
  494. package/dist/products/components/ProductDetails.js +0 -105
  495. package/dist/products/components/ProductDetails.js.map +0 -1
  496. package/dist/products/components/ProductFilters.d.ts +0 -70
  497. package/dist/products/components/ProductFilters.d.ts.map +0 -1
  498. package/dist/products/components/ProductFilters.js +0 -127
  499. package/dist/products/components/ProductFilters.js.map +0 -1
  500. package/dist/products/components/ProductGallery.d.ts +0 -37
  501. package/dist/products/components/ProductGallery.d.ts.map +0 -1
  502. package/dist/products/components/ProductGallery.js +0 -80
  503. package/dist/products/components/ProductGallery.js.map +0 -1
  504. package/dist/products/components/ProductGrid.d.ts +0 -50
  505. package/dist/products/components/ProductGrid.d.ts.map +0 -1
  506. package/dist/products/components/ProductGrid.js +0 -83
  507. package/dist/products/components/ProductGrid.js.map +0 -1
  508. package/dist/products/components/ProductSearch.d.ts +0 -43
  509. package/dist/products/components/ProductSearch.d.ts.map +0 -1
  510. package/dist/products/components/ProductSearch.js +0 -99
  511. package/dist/products/components/ProductSearch.js.map +0 -1
  512. package/dist/products/components/ProductSort.d.ts +0 -43
  513. package/dist/products/components/ProductSort.d.ts.map +0 -1
  514. package/dist/products/components/ProductSort.js +0 -61
  515. package/dist/products/components/ProductSort.js.map +0 -1
  516. package/dist/products/components/VariantSelector.d.ts +0 -43
  517. package/dist/products/components/VariantSelector.d.ts.map +0 -1
  518. package/dist/products/components/VariantSelector.js +0 -147
  519. package/dist/products/components/VariantSelector.js.map +0 -1
  520. package/dist/products/components/index.d.ts +0 -26
  521. package/dist/products/components/index.d.ts.map +0 -1
  522. package/dist/products/components/index.js +0 -32
  523. package/dist/products/components/index.js.map +0 -1
  524. package/dist/products/hooks/index.d.ts +0 -14
  525. package/dist/products/hooks/index.d.ts.map +0 -1
  526. package/dist/products/hooks/index.js +0 -17
  527. package/dist/products/hooks/index.js.map +0 -1
  528. package/dist/products/hooks/useCategories.d.ts +0 -56
  529. package/dist/products/hooks/useCategories.d.ts.map +0 -1
  530. package/dist/products/hooks/useCategories.js +0 -126
  531. package/dist/products/hooks/useCategories.js.map +0 -1
  532. package/dist/products/hooks/useProduct.d.ts +0 -44
  533. package/dist/products/hooks/useProduct.d.ts.map +0 -1
  534. package/dist/products/hooks/useProduct.js +0 -86
  535. package/dist/products/hooks/useProduct.js.map +0 -1
  536. package/dist/products/hooks/useProductAttributes.d.ts +0 -59
  537. package/dist/products/hooks/useProductAttributes.d.ts.map +0 -1
  538. package/dist/products/hooks/useProductAttributes.js +0 -148
  539. package/dist/products/hooks/useProductAttributes.js.map +0 -1
  540. package/dist/products/hooks/useProducts.d.ts +0 -67
  541. package/dist/products/hooks/useProducts.d.ts.map +0 -1
  542. package/dist/products/hooks/useProducts.js +0 -132
  543. package/dist/products/hooks/useProducts.js.map +0 -1
  544. package/dist/products/index.d.ts +0 -94
  545. package/dist/products/index.d.ts.map +0 -1
  546. package/dist/products/index.js +0 -123
  547. package/dist/products/index.js.map +0 -1
  548. package/dist/theme/ThemeProvider.d.ts +0 -70
  549. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  550. package/dist/theme/ThemeProvider.js +0 -77
  551. package/dist/theme/ThemeProvider.js.map +0 -1
  552. package/dist/theme/colors.d.ts +0 -148
  553. package/dist/theme/colors.d.ts.map +0 -1
  554. package/dist/theme/colors.js +0 -219
  555. package/dist/theme/colors.js.map +0 -1
  556. package/dist/theme/defaults.d.ts +0 -212
  557. package/dist/theme/defaults.d.ts.map +0 -1
  558. package/dist/theme/defaults.js +0 -278
  559. package/dist/theme/defaults.js.map +0 -1
  560. package/dist/theme/fonts.d.ts +0 -59
  561. package/dist/theme/fonts.d.ts.map +0 -1
  562. package/dist/theme/fonts.js +0 -202
  563. package/dist/theme/fonts.js.map +0 -1
  564. package/dist/theme/generator.d.ts +0 -50
  565. package/dist/theme/generator.d.ts.map +0 -1
  566. package/dist/theme/generator.js +0 -322
  567. package/dist/theme/generator.js.map +0 -1
  568. package/dist/theme/hooks.d.ts +0 -110
  569. package/dist/theme/hooks.d.ts.map +0 -1
  570. package/dist/theme/hooks.js +0 -106
  571. package/dist/theme/hooks.js.map +0 -1
  572. package/dist/theme/index.d.ts +0 -37
  573. package/dist/theme/index.d.ts.map +0 -1
  574. package/dist/theme/index.js +0 -85
  575. package/dist/theme/index.js.map +0 -1
@@ -1,10 +0,0 @@
1
- /**
2
- * @rovela/sdk/checkout/components
3
- *
4
- * Checkout UI components
5
- */
6
- export { CheckoutButton } from './CheckoutButton';
7
- export { CheckoutSuccess } from './CheckoutSuccess';
8
- export { OrderSummary } from './OrderSummary';
9
- export { ShippingForm } from './ShippingForm';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/checkout/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- /**
3
- * @rovela/sdk/checkout/components
4
- *
5
- * Checkout UI components
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ShippingForm = exports.OrderSummary = exports.CheckoutSuccess = exports.CheckoutButton = void 0;
9
- var CheckoutButton_1 = require("./CheckoutButton");
10
- Object.defineProperty(exports, "CheckoutButton", { enumerable: true, get: function () { return CheckoutButton_1.CheckoutButton; } });
11
- var CheckoutSuccess_1 = require("./CheckoutSuccess");
12
- Object.defineProperty(exports, "CheckoutSuccess", { enumerable: true, get: function () { return CheckoutSuccess_1.CheckoutSuccess; } });
13
- var OrderSummary_1 = require("./OrderSummary");
14
- Object.defineProperty(exports, "OrderSummary", { enumerable: true, get: function () { return OrderSummary_1.OrderSummary; } });
15
- var ShippingForm_1 = require("./ShippingForm");
16
- Object.defineProperty(exports, "ShippingForm", { enumerable: true, get: function () { return ShippingForm_1.ShippingForm; } });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/checkout/components/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,+CAA6C;AAApC,4GAAA,YAAY,OAAA"}
@@ -1,7 +0,0 @@
1
- /**
2
- * @rovela/sdk/checkout/hooks
3
- *
4
- * React hooks for checkout
5
- */
6
- export { useCheckout, useCheckoutSuccess } from './useCheckout';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/checkout/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- /**
3
- * @rovela/sdk/checkout/hooks
4
- *
5
- * React hooks for checkout
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.useCheckoutSuccess = exports.useCheckout = void 0;
9
- var useCheckout_1 = require("./useCheckout");
10
- Object.defineProperty(exports, "useCheckout", { enumerable: true, get: function () { return useCheckout_1.useCheckout; } });
11
- Object.defineProperty(exports, "useCheckoutSuccess", { enumerable: true, get: function () { return useCheckout_1.useCheckoutSuccess; } });
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/checkout/hooks/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,6CAA+D;AAAtD,0GAAA,WAAW,OAAA;AAAE,iHAAA,kBAAkB,OAAA"}
@@ -1,61 +0,0 @@
1
- /**
2
- * @rovela/sdk/checkout/hooks/useCheckout
3
- *
4
- * React hook for initiating Stripe Checkout.
5
- */
6
- import type { UseCheckoutOptions, UseCheckoutReturn } from '../types';
7
- /**
8
- * Hook for initiating Stripe Checkout.
9
- *
10
- * Automatically reads cart items and creates a checkout session.
11
- * Redirects to Stripe's hosted checkout page.
12
- *
13
- * @example
14
- * ```tsx
15
- * import { useCheckout } from '@rovela/sdk/checkout'
16
- *
17
- * function CheckoutButton() {
18
- * const { checkout, isLoading, error } = useCheckout()
19
- *
20
- * return (
21
- * <button onClick={checkout} disabled={isLoading}>
22
- * {isLoading ? 'Redirecting...' : 'Checkout'}
23
- * </button>
24
- * )
25
- * }
26
- * ```
27
- *
28
- * @example With custom options
29
- * ```tsx
30
- * const { checkout } = useCheckout({
31
- * onSuccess: (session) => console.log('Session created:', session.sessionId),
32
- * onError: (error) => alert(error.error),
33
- * customerEmail: 'customer@example.com',
34
- * })
35
- * ```
36
- */
37
- export declare function useCheckout(options?: UseCheckoutOptions): UseCheckoutReturn;
38
- /**
39
- * Hook to retrieve checkout session details from URL.
40
- * Used on success pages to display order confirmation.
41
- *
42
- * @example
43
- * ```tsx
44
- * // app/checkout/success/page.tsx
45
- * 'use client'
46
- *
47
- * import { useCheckoutSuccess } from '@rovela/sdk/checkout'
48
- *
49
- * export default function SuccessPage() {
50
- * const { sessionId, isLoading, session } = useCheckoutSuccess()
51
- *
52
- * if (isLoading) return <div>Loading...</div>
53
- *
54
- * return <div>Thank you for your order! Session: {sessionId}</div>
55
- * }
56
- * ```
57
- */
58
- export declare function useCheckoutSuccess(): {
59
- sessionId: string | null;
60
- };
61
- //# sourceMappingURL=useCheckout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCheckout.d.ts","sourceRoot":"","sources":["../../../src/checkout/hooks/useCheckout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAGV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAMjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CA8F3E;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB;;EAgBjC"}
@@ -1,174 +0,0 @@
1
- "use strict";
2
- /**
3
- * @rovela/sdk/checkout/hooks/useCheckout
4
- *
5
- * React hook for initiating Stripe Checkout.
6
- */
7
- 'use client';
8
- /**
9
- * @rovela/sdk/checkout/hooks/useCheckout
10
- *
11
- * React hook for initiating Stripe Checkout.
12
- */
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.useCheckout = useCheckout;
15
- exports.useCheckoutSuccess = useCheckoutSuccess;
16
- const react_1 = require("react");
17
- const store_1 = require("../../cart/store");
18
- // =============================================================================
19
- // Hook
20
- // =============================================================================
21
- /**
22
- * Hook for initiating Stripe Checkout.
23
- *
24
- * Automatically reads cart items and creates a checkout session.
25
- * Redirects to Stripe's hosted checkout page.
26
- *
27
- * @example
28
- * ```tsx
29
- * import { useCheckout } from '@rovela/sdk/checkout'
30
- *
31
- * function CheckoutButton() {
32
- * const { checkout, isLoading, error } = useCheckout()
33
- *
34
- * return (
35
- * <button onClick={checkout} disabled={isLoading}>
36
- * {isLoading ? 'Redirecting...' : 'Checkout'}
37
- * </button>
38
- * )
39
- * }
40
- * ```
41
- *
42
- * @example With custom options
43
- * ```tsx
44
- * const { checkout } = useCheckout({
45
- * onSuccess: (session) => console.log('Session created:', session.sessionId),
46
- * onError: (error) => alert(error.error),
47
- * customerEmail: 'customer@example.com',
48
- * })
49
- * ```
50
- */
51
- function useCheckout(options) {
52
- const { items, clearCart } = (0, store_1.useCart)();
53
- const [isLoading, setIsLoading] = (0, react_1.useState)(false);
54
- const [error, setError] = (0, react_1.useState)(null);
55
- const checkout = (0, react_1.useCallback)(async () => {
56
- // Reset error state
57
- setError(null);
58
- // Validate cart
59
- if (items.length === 0) {
60
- const emptyError = {
61
- error: 'Your cart is empty',
62
- code: 'EMPTY_CART',
63
- };
64
- setError(emptyError);
65
- options?.onError?.(emptyError);
66
- return;
67
- }
68
- setIsLoading(true);
69
- try {
70
- // Build request body
71
- const body = {
72
- items: items.map((item) => ({
73
- productId: item.productId,
74
- variantId: item.variantId,
75
- name: item.name,
76
- description: item.attributes
77
- ? Object.entries(item.attributes)
78
- .map(([k, v]) => `${k}: ${v}`)
79
- .join(', ')
80
- : undefined,
81
- // Convert dollars to cents for Stripe
82
- price: Math.round(item.price * 100),
83
- quantity: item.quantity,
84
- image: item.image,
85
- })),
86
- customerEmail: options?.customerEmail,
87
- customerId: options?.customerId,
88
- successUrl: options?.successUrl,
89
- cancelUrl: options?.cancelUrl,
90
- metadata: options?.metadata,
91
- };
92
- // Call checkout API
93
- const response = await fetch('/api/checkout', {
94
- method: 'POST',
95
- headers: { 'Content-Type': 'application/json' },
96
- body: JSON.stringify(body),
97
- });
98
- const data = await response.json();
99
- if (!response.ok) {
100
- const apiError = data;
101
- setError(apiError);
102
- options?.onError?.(apiError);
103
- return;
104
- }
105
- const session = data;
106
- // Call success callback
107
- options?.onSuccess?.(session);
108
- // Clear cart before redirect (optional behavior)
109
- if (options?.clearCartOnCheckout !== false) {
110
- clearCart();
111
- }
112
- // Redirect to Stripe Checkout
113
- if (session.url) {
114
- window.location.href = session.url;
115
- }
116
- }
117
- catch (err) {
118
- const networkError = {
119
- error: 'Network error. Please try again.',
120
- code: 'CHECKOUT_ERROR',
121
- };
122
- setError(networkError);
123
- options?.onError?.(networkError);
124
- }
125
- finally {
126
- setIsLoading(false);
127
- }
128
- }, [items, clearCart, options]);
129
- return {
130
- checkout,
131
- isLoading,
132
- error,
133
- clearError: (0, react_1.useCallback)(() => setError(null), []),
134
- };
135
- }
136
- // =============================================================================
137
- // Additional Hooks
138
- // =============================================================================
139
- /**
140
- * Hook to retrieve checkout session details from URL.
141
- * Used on success pages to display order confirmation.
142
- *
143
- * @example
144
- * ```tsx
145
- * // app/checkout/success/page.tsx
146
- * 'use client'
147
- *
148
- * import { useCheckoutSuccess } from '@rovela/sdk/checkout'
149
- *
150
- * export default function SuccessPage() {
151
- * const { sessionId, isLoading, session } = useCheckoutSuccess()
152
- *
153
- * if (isLoading) return <div>Loading...</div>
154
- *
155
- * return <div>Thank you for your order! Session: {sessionId}</div>
156
- * }
157
- * ```
158
- */
159
- function useCheckoutSuccess() {
160
- const [sessionId, setSessionId] = (0, react_1.useState)(null);
161
- // Extract session_id from URL on mount
162
- if (typeof window !== 'undefined' && !sessionId) {
163
- const params = new URLSearchParams(window.location.search);
164
- const id = params.get('session_id');
165
- if (id) {
166
- setSessionId(id);
167
- }
168
- }
169
- return {
170
- sessionId,
171
- // Could be extended to fetch session details from API if needed
172
- };
173
- }
174
- //# sourceMappingURL=useCheckout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCheckout.js","sourceRoot":"","sources":["../../../src/checkout/hooks/useCheckout.ts"],"names":[],"mappings":"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"}
@@ -1,111 +0,0 @@
1
- /**
2
- * @rovela/sdk/checkout
3
- *
4
- * Stripe Checkout integration with Direct Charges for connected accounts.
5
- *
6
- * ## Overview
7
- *
8
- * This module provides complete Stripe Checkout integration:
9
- * - Stripe Checkout (hosted) for payment collection
10
- * - Direct Charges to connected accounts
11
- * - Automatic platform fee calculation
12
- * - Webhook handling for order creation
13
- *
14
- * ## Quick Start
15
- *
16
- * ### 1. Environment Variables
17
- *
18
- * ```env
19
- * # Platform (Rovela) credentials
20
- * STRIPE_SECRET_KEY=sk_live_...
21
- * STRIPE_PUBLISHABLE_KEY=pk_live_...
22
- * STRIPE_WEBHOOK_SECRET=whsec_...
23
- *
24
- * # Per-store connected account (set during store setup)
25
- * STRIPE_CONNECTED_ACCOUNT_ID=acct_...
26
- *
27
- * # Optional configuration
28
- * STRIPE_PLATFORM_FEE_PERCENT=5 # Platform takes 5%
29
- * STORE_CURRENCY=USD # Store currency
30
- * ```
31
- *
32
- * ### 2. API Routes
33
- *
34
- * ```typescript
35
- * // app/api/checkout/route.ts
36
- * export { POST } from '@rovela/sdk/checkout/api'
37
- *
38
- * // app/api/webhooks/stripe/route.ts
39
- * import { handleStripeWebhook } from '@rovela/sdk/checkout/server'
40
- *
41
- * export async function POST(request: Request) {
42
- * const payload = await request.text()
43
- * const signature = request.headers.get('stripe-signature')!
44
- * const result = await handleStripeWebhook(payload, signature)
45
- * return Response.json(result)
46
- * }
47
- * ```
48
- *
49
- * ### 3. Checkout Button
50
- *
51
- * ```tsx
52
- * // In your cart or product page
53
- * import { CheckoutButton } from '@rovela/sdk/checkout'
54
- *
55
- * function Cart() {
56
- * return (
57
- * <div>
58
- * <CartItems />
59
- * <CartSummary />
60
- * <CheckoutButton size="lg" fullWidth>
61
- * Proceed to Checkout
62
- * </CheckoutButton>
63
- * </div>
64
- * )
65
- * }
66
- * ```
67
- *
68
- * ### 4. Success Page
69
- *
70
- * ```tsx
71
- * // app/checkout/success/page.tsx
72
- * import { CheckoutSuccess } from '@rovela/sdk/checkout'
73
- * import { useCart } from '@rovela/sdk/cart'
74
- *
75
- * export default function SuccessPage() {
76
- * const { clearCart } = useCart()
77
- *
78
- * return (
79
- * <CheckoutSuccess
80
- * continueShoppingHref="/products"
81
- * viewOrderHref="/account/orders/{orderId}"
82
- * onMount={clearCart}
83
- * />
84
- * )
85
- * }
86
- * ```
87
- *
88
- * ## Architecture
89
- *
90
- * ```
91
- * Cart → CheckoutButton → /api/checkout → Stripe Checkout (hosted)
92
- * ↓
93
- * Database ← Webhook ← /api/webhooks/stripe ← Stripe
94
- * ↓
95
- * Order Created
96
- * ```
97
- *
98
- * ## Direct Charges Model
99
- *
100
- * With Direct Charges, payments are made directly on the connected account:
101
- * - Payment shows connected account name on customer statement
102
- * - Connected account handles disputes
103
- * - Platform collects application fee automatically
104
- */
105
- export type { CheckoutLineItem, CheckoutSessionRequest, CheckoutSessionResponse, CheckoutApiError, CreateOrderParams, WebhookResult, CheckoutStep, ShippingOption, CheckoutState, CheckoutButtonProps, ShippingFormProps, OrderSummaryProps, CheckoutSuccessProps, UseCheckoutOptions, UseCheckoutReturn, } from './types';
106
- export { CheckoutButton, CheckoutSuccess, OrderSummary, ShippingForm, } from './components';
107
- export { useCheckout, useCheckoutSuccess } from './hooks';
108
- export { createCheckoutSession, getCheckoutSession, createOrderFromCheckout, extractOrderParamsFromSession, handleRefund, handleStripeWebhook, } from './server';
109
- export type { CreateCheckoutSessionOptions } from './server';
110
- export { getStripe, getConnectedAccountId, hasConnectedAccount, getPlatformFeePercent, calculateApplicationFee, getWebhookSecret, getStoreCurrency, getAllowedShippingCountries, getPublishableKey, } from './stripe';
111
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/checkout/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuGG;AAMH,YAAY,EAEV,gBAAgB,EAEhB,sBAAsB,EACtB,uBAAuB,EAEvB,gBAAgB,EAEhB,iBAAiB,EAEjB,aAAa,EAEb,YAAY,EACZ,cAAc,EACd,aAAa,EAEb,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EAEpB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,SAAS,CAAA;AAMhB,OAAO,EACL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,YAAY,GACb,MAAM,cAAc,CAAA;AAMrB,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAMzD,OAAO,EAEL,qBAAqB,EACrB,kBAAkB,EAElB,uBAAuB,EACvB,6BAA6B,EAC7B,YAAY,EAEZ,mBAAmB,GACpB,MAAM,UAAU,CAAA;AAEjB,YAAY,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAM5D,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,UAAU,CAAA"}
@@ -1,148 +0,0 @@
1
- "use strict";
2
- /**
3
- * @rovela/sdk/checkout
4
- *
5
- * Stripe Checkout integration with Direct Charges for connected accounts.
6
- *
7
- * ## Overview
8
- *
9
- * This module provides complete Stripe Checkout integration:
10
- * - Stripe Checkout (hosted) for payment collection
11
- * - Direct Charges to connected accounts
12
- * - Automatic platform fee calculation
13
- * - Webhook handling for order creation
14
- *
15
- * ## Quick Start
16
- *
17
- * ### 1. Environment Variables
18
- *
19
- * ```env
20
- * # Platform (Rovela) credentials
21
- * STRIPE_SECRET_KEY=sk_live_...
22
- * STRIPE_PUBLISHABLE_KEY=pk_live_...
23
- * STRIPE_WEBHOOK_SECRET=whsec_...
24
- *
25
- * # Per-store connected account (set during store setup)
26
- * STRIPE_CONNECTED_ACCOUNT_ID=acct_...
27
- *
28
- * # Optional configuration
29
- * STRIPE_PLATFORM_FEE_PERCENT=5 # Platform takes 5%
30
- * STORE_CURRENCY=USD # Store currency
31
- * ```
32
- *
33
- * ### 2. API Routes
34
- *
35
- * ```typescript
36
- * // app/api/checkout/route.ts
37
- * export { POST } from '@rovela/sdk/checkout/api'
38
- *
39
- * // app/api/webhooks/stripe/route.ts
40
- * import { handleStripeWebhook } from '@rovela/sdk/checkout/server'
41
- *
42
- * export async function POST(request: Request) {
43
- * const payload = await request.text()
44
- * const signature = request.headers.get('stripe-signature')!
45
- * const result = await handleStripeWebhook(payload, signature)
46
- * return Response.json(result)
47
- * }
48
- * ```
49
- *
50
- * ### 3. Checkout Button
51
- *
52
- * ```tsx
53
- * // In your cart or product page
54
- * import { CheckoutButton } from '@rovela/sdk/checkout'
55
- *
56
- * function Cart() {
57
- * return (
58
- * <div>
59
- * <CartItems />
60
- * <CartSummary />
61
- * <CheckoutButton size="lg" fullWidth>
62
- * Proceed to Checkout
63
- * </CheckoutButton>
64
- * </div>
65
- * )
66
- * }
67
- * ```
68
- *
69
- * ### 4. Success Page
70
- *
71
- * ```tsx
72
- * // app/checkout/success/page.tsx
73
- * import { CheckoutSuccess } from '@rovela/sdk/checkout'
74
- * import { useCart } from '@rovela/sdk/cart'
75
- *
76
- * export default function SuccessPage() {
77
- * const { clearCart } = useCart()
78
- *
79
- * return (
80
- * <CheckoutSuccess
81
- * continueShoppingHref="/products"
82
- * viewOrderHref="/account/orders/{orderId}"
83
- * onMount={clearCart}
84
- * />
85
- * )
86
- * }
87
- * ```
88
- *
89
- * ## Architecture
90
- *
91
- * ```
92
- * Cart → CheckoutButton → /api/checkout → Stripe Checkout (hosted)
93
- * ↓
94
- * Database ← Webhook ← /api/webhooks/stripe ← Stripe
95
- * ↓
96
- * Order Created
97
- * ```
98
- *
99
- * ## Direct Charges Model
100
- *
101
- * With Direct Charges, payments are made directly on the connected account:
102
- * - Payment shows connected account name on customer statement
103
- * - Connected account handles disputes
104
- * - Platform collects application fee automatically
105
- */
106
- Object.defineProperty(exports, "__esModule", { value: true });
107
- exports.getPublishableKey = exports.getAllowedShippingCountries = exports.getStoreCurrency = exports.getWebhookSecret = exports.calculateApplicationFee = exports.getPlatformFeePercent = exports.hasConnectedAccount = exports.getConnectedAccountId = exports.getStripe = exports.handleStripeWebhook = exports.handleRefund = exports.extractOrderParamsFromSession = exports.createOrderFromCheckout = exports.getCheckoutSession = exports.createCheckoutSession = exports.useCheckoutSuccess = exports.useCheckout = exports.ShippingForm = exports.OrderSummary = exports.CheckoutSuccess = exports.CheckoutButton = void 0;
108
- // =============================================================================
109
- // Components
110
- // =============================================================================
111
- var components_1 = require("./components");
112
- Object.defineProperty(exports, "CheckoutButton", { enumerable: true, get: function () { return components_1.CheckoutButton; } });
113
- Object.defineProperty(exports, "CheckoutSuccess", { enumerable: true, get: function () { return components_1.CheckoutSuccess; } });
114
- Object.defineProperty(exports, "OrderSummary", { enumerable: true, get: function () { return components_1.OrderSummary; } });
115
- Object.defineProperty(exports, "ShippingForm", { enumerable: true, get: function () { return components_1.ShippingForm; } });
116
- // =============================================================================
117
- // Hooks
118
- // =============================================================================
119
- var hooks_1 = require("./hooks");
120
- Object.defineProperty(exports, "useCheckout", { enumerable: true, get: function () { return hooks_1.useCheckout; } });
121
- Object.defineProperty(exports, "useCheckoutSuccess", { enumerable: true, get: function () { return hooks_1.useCheckoutSuccess; } });
122
- // =============================================================================
123
- // Server Functions
124
- // =============================================================================
125
- var server_1 = require("./server");
126
- // Session creation
127
- Object.defineProperty(exports, "createCheckoutSession", { enumerable: true, get: function () { return server_1.createCheckoutSession; } });
128
- Object.defineProperty(exports, "getCheckoutSession", { enumerable: true, get: function () { return server_1.getCheckoutSession; } });
129
- // Order management
130
- Object.defineProperty(exports, "createOrderFromCheckout", { enumerable: true, get: function () { return server_1.createOrderFromCheckout; } });
131
- Object.defineProperty(exports, "extractOrderParamsFromSession", { enumerable: true, get: function () { return server_1.extractOrderParamsFromSession; } });
132
- Object.defineProperty(exports, "handleRefund", { enumerable: true, get: function () { return server_1.handleRefund; } });
133
- // Webhook handler
134
- Object.defineProperty(exports, "handleStripeWebhook", { enumerable: true, get: function () { return server_1.handleStripeWebhook; } });
135
- // =============================================================================
136
- // Stripe Client Utilities
137
- // =============================================================================
138
- var stripe_1 = require("./stripe");
139
- Object.defineProperty(exports, "getStripe", { enumerable: true, get: function () { return stripe_1.getStripe; } });
140
- Object.defineProperty(exports, "getConnectedAccountId", { enumerable: true, get: function () { return stripe_1.getConnectedAccountId; } });
141
- Object.defineProperty(exports, "hasConnectedAccount", { enumerable: true, get: function () { return stripe_1.hasConnectedAccount; } });
142
- Object.defineProperty(exports, "getPlatformFeePercent", { enumerable: true, get: function () { return stripe_1.getPlatformFeePercent; } });
143
- Object.defineProperty(exports, "calculateApplicationFee", { enumerable: true, get: function () { return stripe_1.calculateApplicationFee; } });
144
- Object.defineProperty(exports, "getWebhookSecret", { enumerable: true, get: function () { return stripe_1.getWebhookSecret; } });
145
- Object.defineProperty(exports, "getStoreCurrency", { enumerable: true, get: function () { return stripe_1.getStoreCurrency; } });
146
- Object.defineProperty(exports, "getAllowedShippingCountries", { enumerable: true, get: function () { return stripe_1.getAllowedShippingCountries; } });
147
- Object.defineProperty(exports, "getPublishableKey", { enumerable: true, get: function () { return stripe_1.getPublishableKey; } });
148
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkout/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuGG;;;AAgCH,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF,2CAKqB;AAJnB,4GAAA,cAAc,OAAA;AACd,6GAAA,eAAe,OAAA;AACf,0GAAA,YAAY,OAAA;AACZ,0GAAA,YAAY,OAAA;AAGd,gFAAgF;AAChF,QAAQ;AACR,gFAAgF;AAEhF,iCAAyD;AAAhD,oGAAA,WAAW,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAExC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF,mCAUiB;AATf,mBAAmB;AACnB,+GAAA,qBAAqB,OAAA;AACrB,4GAAA,kBAAkB,OAAA;AAClB,mBAAmB;AACnB,iHAAA,uBAAuB,OAAA;AACvB,uHAAA,6BAA6B,OAAA;AAC7B,sGAAA,YAAY,OAAA;AACZ,kBAAkB;AAClB,6GAAA,mBAAmB,OAAA;AAKrB,gFAAgF;AAChF,0BAA0B;AAC1B,gFAAgF;AAEhF,mCAUiB;AATf,mGAAA,SAAS,OAAA;AACT,+GAAA,qBAAqB,OAAA;AACrB,6GAAA,mBAAmB,OAAA;AACnB,+GAAA,qBAAqB,OAAA;AACrB,iHAAA,uBAAuB,OAAA;AACvB,0GAAA,gBAAgB,OAAA;AAChB,0GAAA,gBAAgB,OAAA;AAChB,qHAAA,2BAA2B,OAAA;AAC3B,2GAAA,iBAAiB,OAAA"}
@@ -1,69 +0,0 @@
1
- /**
2
- * @rovela/sdk/checkout/server/create-checkout-session
3
- *
4
- * Creates a Stripe Checkout session using Direct Charges.
5
- * The payment is processed ON the connected account, not the platform.
6
- */
7
- import type Stripe from 'stripe';
8
- import type { CheckoutSessionRequest, CheckoutSessionResponse, CheckoutLineItem } from '../types';
9
- export interface CreateCheckoutSessionOptions {
10
- /**
11
- * Whether to collect shipping address.
12
- * Default: true
13
- */
14
- collectShippingAddress?: boolean;
15
- /**
16
- * Whether to collect phone number.
17
- * Default: false
18
- */
19
- collectPhoneNumber?: boolean;
20
- /**
21
- * Whether to allow promotion codes.
22
- * Default: false
23
- */
24
- allowPromotionCodes?: boolean;
25
- /**
26
- * Automatic tax calculation.
27
- * Requires Stripe Tax to be enabled.
28
- * Default: false
29
- */
30
- automaticTax?: boolean;
31
- /**
32
- * Custom application fee in cents.
33
- * If not provided, calculated from STRIPE_PLATFORM_FEE_PERCENT.
34
- */
35
- applicationFeeAmount?: number;
36
- }
37
- /**
38
- * Create a Stripe Checkout session for Direct Charges.
39
- *
40
- * This creates the checkout session ON the connected account (Direct Charge),
41
- * meaning the payment shows up in the connected account's dashboard, and
42
- * the application fee is transferred to the platform.
43
- *
44
- * @example
45
- * ```typescript
46
- * const session = await createCheckoutSession({
47
- * items: [
48
- * { name: 'T-Shirt', price: 2999, quantity: 1 }
49
- * ],
50
- * customerEmail: 'customer@example.com',
51
- * successUrl: 'https://store.example.com/success?session_id={CHECKOUT_SESSION_ID}',
52
- * cancelUrl: 'https://store.example.com/cart',
53
- * })
54
- *
55
- * // Redirect customer to Stripe Checkout
56
- * redirect(session.url)
57
- * ```
58
- */
59
- export declare function createCheckoutSession(request: CheckoutSessionRequest, options?: CreateCheckoutSessionOptions): Promise<CheckoutSessionResponse>;
60
- /**
61
- * Deserialize items from Stripe metadata.
62
- */
63
- export declare function deserializeItemsFromMetadata(json: string): CheckoutLineItem[];
64
- /**
65
- * Retrieve a checkout session by ID.
66
- * Useful for the success page to get order details.
67
- */
68
- export declare function getCheckoutSession(sessionId: string): Promise<Stripe.Checkout.Session | null>;
69
- //# sourceMappingURL=create-checkout-session.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-checkout-session.d.ts","sourceRoot":"","sources":["../../../src/checkout/server/create-checkout-session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAQhC,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,UAAU,CAAA;AAMjB,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAEhC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,sBAAsB,EAC/B,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,uBAAuB,CAAC,CAsHlC;AA4BD;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,GACX,gBAAgB,EAAE,CAqBpB;AAMD;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC,CAoBzC"}