@rovela-ai/sdk 0.1.0 → 0.1.1

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 (577) 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/useAdminAuth.d.ts +36 -0
  106. package/dist/admin/hooks/useAdminAuth.d.ts.map +1 -0
  107. package/dist/admin/hooks/useAdminAuth.js +115 -0
  108. package/dist/admin/hooks/useAdminAuth.js.map +1 -0
  109. package/dist/admin/hooks/useAdminOrders.d.ts +41 -0
  110. package/dist/admin/hooks/useAdminOrders.d.ts.map +1 -0
  111. package/dist/admin/hooks/useAdminOrders.js +191 -0
  112. package/dist/admin/hooks/useAdminOrders.js.map +1 -0
  113. package/dist/admin/hooks/useAdminProducts.d.ts +39 -0
  114. package/dist/admin/hooks/useAdminProducts.d.ts.map +1 -0
  115. package/dist/admin/hooks/useAdminProducts.js +235 -0
  116. package/dist/admin/hooks/useAdminProducts.js.map +1 -0
  117. package/dist/admin/hooks/useAdminStats.d.ts +50 -0
  118. package/dist/admin/hooks/useAdminStats.d.ts.map +1 -0
  119. package/dist/admin/hooks/useAdminStats.js +111 -0
  120. package/dist/admin/hooks/useAdminStats.js.map +1 -0
  121. package/dist/admin/index.d.ts +63 -0
  122. package/dist/admin/index.d.ts.map +1 -0
  123. package/dist/admin/index.js +148 -0
  124. package/dist/admin/index.js.map +1 -0
  125. package/dist/admin/server/admin-service.d.ts +130 -0
  126. package/dist/admin/server/admin-service.d.ts.map +1 -0
  127. package/dist/admin/server/admin-service.js +298 -0
  128. package/dist/admin/server/admin-service.js.map +1 -0
  129. package/dist/admin/server/index.d.ts +8 -0
  130. package/dist/admin/server/index.d.ts.map +1 -0
  131. package/dist/admin/server/index.js +25 -0
  132. package/dist/admin/server/index.js.map +1 -0
  133. package/dist/admin/types.d.ts +549 -0
  134. package/dist/admin/types.d.ts.map +1 -0
  135. package/dist/admin/types.js +11 -0
  136. package/dist/admin/types.js.map +1 -0
  137. package/dist/auth/api/auth.d.ts +54 -0
  138. package/dist/auth/api/auth.d.ts.map +1 -0
  139. package/dist/auth/api/auth.js +67 -0
  140. package/dist/auth/api/auth.js.map +1 -0
  141. package/dist/auth/api/forgot-password.d.ts +41 -0
  142. package/dist/auth/api/forgot-password.d.ts.map +1 -0
  143. package/dist/auth/api/forgot-password.js +68 -0
  144. package/dist/auth/api/forgot-password.js.map +1 -0
  145. package/dist/auth/api/index.d.ts +34 -0
  146. package/dist/auth/api/index.d.ts.map +1 -0
  147. package/dist/auth/api/index.js +52 -0
  148. package/dist/auth/api/index.js.map +1 -0
  149. package/dist/auth/api/register.d.ts +41 -0
  150. package/dist/auth/api/register.d.ts.map +1 -0
  151. package/dist/auth/api/register.js +93 -0
  152. package/dist/auth/api/register.js.map +1 -0
  153. package/dist/auth/api/resend-verification.d.ts +41 -0
  154. package/dist/auth/api/resend-verification.d.ts.map +1 -0
  155. package/dist/auth/api/resend-verification.js +71 -0
  156. package/dist/auth/api/resend-verification.js.map +1 -0
  157. package/dist/auth/api/reset-password.d.ts +67 -0
  158. package/dist/auth/api/reset-password.d.ts.map +1 -0
  159. package/dist/auth/api/reset-password.js +110 -0
  160. package/dist/auth/api/reset-password.js.map +1 -0
  161. package/dist/auth/api/verify-email.d.ts +47 -0
  162. package/dist/auth/api/verify-email.d.ts.map +1 -0
  163. package/dist/auth/api/verify-email.js +94 -0
  164. package/dist/auth/api/verify-email.js.map +1 -0
  165. package/dist/auth/components/AuthGuard.d.ts +52 -0
  166. package/dist/auth/components/AuthGuard.d.ts.map +1 -0
  167. package/dist/auth/components/AuthGuard.js +113 -0
  168. package/dist/auth/components/AuthGuard.js.map +1 -0
  169. package/dist/auth/components/ForgotPasswordForm.d.ts +15 -0
  170. package/dist/auth/components/ForgotPasswordForm.d.ts.map +1 -0
  171. package/dist/auth/components/ForgotPasswordForm.js +44 -0
  172. package/dist/auth/components/ForgotPasswordForm.js.map +1 -0
  173. package/dist/auth/components/ResetPasswordForm.d.ts +18 -0
  174. package/dist/auth/components/ResetPasswordForm.d.ts.map +1 -0
  175. package/dist/auth/components/ResetPasswordForm.js +88 -0
  176. package/dist/auth/components/ResetPasswordForm.js.map +1 -0
  177. package/dist/auth/components/SignInForm.d.ts +21 -0
  178. package/dist/auth/components/SignInForm.d.ts.map +1 -0
  179. package/dist/auth/components/SignInForm.js +63 -0
  180. package/dist/auth/components/SignInForm.js.map +1 -0
  181. package/dist/auth/components/SignUpForm.d.ts +18 -0
  182. package/dist/auth/components/SignUpForm.d.ts.map +1 -0
  183. package/dist/auth/components/SignUpForm.js +79 -0
  184. package/dist/auth/components/SignUpForm.js.map +1 -0
  185. package/dist/auth/components/UserMenu.d.ts +18 -0
  186. package/dist/auth/components/UserMenu.d.ts.map +1 -0
  187. package/dist/auth/components/UserMenu.js +75 -0
  188. package/dist/auth/components/UserMenu.js.map +1 -0
  189. package/dist/auth/components/VerifyEmailNotice.d.ts +20 -0
  190. package/dist/auth/components/VerifyEmailNotice.d.ts.map +1 -0
  191. package/dist/auth/components/VerifyEmailNotice.js +59 -0
  192. package/dist/auth/components/VerifyEmailNotice.js.map +1 -0
  193. package/dist/auth/components/index.d.ts +13 -0
  194. package/dist/auth/components/index.d.ts.map +1 -0
  195. package/dist/auth/components/index.js +24 -0
  196. package/dist/auth/components/index.js.map +1 -0
  197. package/dist/auth/config.d.ts +42 -0
  198. package/dist/auth/config.d.ts.map +1 -0
  199. package/dist/auth/config.js +174 -0
  200. package/dist/auth/config.js.map +1 -0
  201. package/dist/auth/hooks/index.d.ts +7 -0
  202. package/dist/auth/hooks/index.d.ts.map +1 -0
  203. package/dist/auth/hooks/index.js +11 -0
  204. package/dist/auth/hooks/index.js.map +1 -0
  205. package/dist/auth/hooks/useAuth.d.ts +30 -0
  206. package/dist/auth/hooks/useAuth.d.ts.map +1 -0
  207. package/dist/auth/hooks/useAuth.js +248 -0
  208. package/dist/auth/hooks/useAuth.js.map +1 -0
  209. package/dist/auth/index.d.ts +54 -0
  210. package/dist/auth/index.d.ts.map +1 -0
  211. package/dist/auth/index.js +88 -0
  212. package/dist/auth/index.js.map +1 -0
  213. package/dist/auth/server/customer-service.d.ts +138 -0
  214. package/dist/auth/server/customer-service.d.ts.map +1 -0
  215. package/dist/auth/server/customer-service.js +309 -0
  216. package/dist/auth/server/customer-service.js.map +1 -0
  217. package/dist/auth/server/email-sender.d.ts +64 -0
  218. package/dist/auth/server/email-sender.d.ts.map +1 -0
  219. package/dist/auth/server/email-sender.js +112 -0
  220. package/dist/auth/server/email-sender.js.map +1 -0
  221. package/dist/auth/server/index.d.ts +13 -0
  222. package/dist/auth/server/index.d.ts.map +1 -0
  223. package/dist/auth/server/index.js +48 -0
  224. package/dist/auth/server/index.js.map +1 -0
  225. package/dist/auth/server/password-reset-service.d.ts +86 -0
  226. package/dist/auth/server/password-reset-service.d.ts.map +1 -0
  227. package/dist/auth/server/password-reset-service.js +236 -0
  228. package/dist/auth/server/password-reset-service.js.map +1 -0
  229. package/dist/auth/server/password.d.ts +58 -0
  230. package/dist/auth/server/password.d.ts.map +1 -0
  231. package/dist/auth/server/password.js +94 -0
  232. package/dist/auth/server/password.js.map +1 -0
  233. package/dist/auth/server/verification-service.d.ts +87 -0
  234. package/dist/auth/server/verification-service.d.ts.map +1 -0
  235. package/dist/auth/server/verification-service.js +268 -0
  236. package/dist/auth/server/verification-service.js.map +1 -0
  237. package/dist/auth/types.d.ts +305 -0
  238. package/dist/auth/types.d.ts.map +1 -0
  239. package/dist/auth/types.js +8 -0
  240. package/dist/auth/types.js.map +1 -0
  241. package/dist/cart/CartProvider.d.ts +65 -0
  242. package/dist/cart/CartProvider.d.ts.map +1 -0
  243. package/dist/cart/CartProvider.js +101 -0
  244. package/dist/cart/CartProvider.js.map +1 -0
  245. package/dist/cart/components/AddToCartButton.d.ts +77 -0
  246. package/dist/cart/components/AddToCartButton.d.ts.map +1 -0
  247. package/dist/cart/components/AddToCartButton.js +124 -0
  248. package/dist/cart/components/AddToCartButton.js.map +1 -0
  249. package/dist/cart/components/CartDrawer.d.ts +71 -0
  250. package/dist/cart/components/CartDrawer.d.ts.map +1 -0
  251. package/dist/cart/components/CartDrawer.js +108 -0
  252. package/dist/cart/components/CartDrawer.js.map +1 -0
  253. package/dist/cart/components/CartIcon.d.ts +36 -0
  254. package/dist/cart/components/CartIcon.d.ts.map +1 -0
  255. package/dist/cart/components/CartIcon.js +70 -0
  256. package/dist/cart/components/CartIcon.js.map +1 -0
  257. package/dist/cart/components/CartItem.d.ts +52 -0
  258. package/dist/cart/components/CartItem.d.ts.map +1 -0
  259. package/dist/cart/components/CartItem.js +55 -0
  260. package/dist/cart/components/CartItem.js.map +1 -0
  261. package/dist/cart/components/CartSummary.d.ts +43 -0
  262. package/dist/cart/components/CartSummary.d.ts.map +1 -0
  263. package/dist/cart/components/CartSummary.js +58 -0
  264. package/dist/cart/components/CartSummary.js.map +1 -0
  265. package/dist/cart/components/QuantitySelector.d.ts +39 -0
  266. package/dist/cart/components/QuantitySelector.d.ts.map +1 -0
  267. package/dist/cart/components/QuantitySelector.js +87 -0
  268. package/dist/cart/components/QuantitySelector.js.map +1 -0
  269. package/dist/cart/components/index.d.ts +18 -0
  270. package/dist/cart/components/index.d.ts.map +1 -0
  271. package/dist/cart/components/index.js +21 -0
  272. package/dist/cart/components/index.js.map +1 -0
  273. package/dist/cart/index.d.ts +109 -0
  274. package/dist/cart/index.d.ts.map +1 -0
  275. package/dist/cart/index.js +129 -0
  276. package/dist/cart/index.js.map +1 -0
  277. package/dist/cart/store.d.ts +101 -0
  278. package/dist/cart/store.d.ts.map +1 -0
  279. package/dist/cart/store.js +207 -0
  280. package/dist/cart/store.js.map +1 -0
  281. package/dist/checkout/api/checkout.d.ts +31 -0
  282. package/dist/checkout/api/checkout.d.ts.map +1 -0
  283. package/dist/checkout/api/checkout.js +103 -0
  284. package/dist/checkout/api/checkout.js.map +1 -0
  285. package/dist/checkout/api/index.d.ts +8 -0
  286. package/dist/checkout/api/index.d.ts.map +1 -0
  287. package/dist/checkout/api/index.js +13 -0
  288. package/dist/checkout/api/index.js.map +1 -0
  289. package/dist/checkout/api/webhook.d.ts +30 -0
  290. package/dist/checkout/api/webhook.d.ts.map +1 -0
  291. package/dist/checkout/api/webhook.js +58 -0
  292. package/dist/checkout/api/webhook.js.map +1 -0
  293. package/dist/checkout/components/CheckoutButton.d.ts +44 -0
  294. package/dist/checkout/components/CheckoutButton.d.ts.map +1 -0
  295. package/dist/checkout/components/CheckoutButton.js +97 -0
  296. package/dist/checkout/components/CheckoutButton.js.map +1 -0
  297. package/dist/checkout/components/CheckoutSuccess.d.ts +29 -0
  298. package/dist/checkout/components/CheckoutSuccess.d.ts.map +1 -0
  299. package/dist/checkout/components/CheckoutSuccess.js +60 -0
  300. package/dist/checkout/components/CheckoutSuccess.js.map +1 -0
  301. package/dist/checkout/components/OrderSummary.d.ts +37 -0
  302. package/dist/checkout/components/OrderSummary.d.ts.map +1 -0
  303. package/dist/checkout/components/OrderSummary.js +70 -0
  304. package/dist/checkout/components/OrderSummary.js.map +1 -0
  305. package/dist/checkout/components/ShippingForm.d.ts +30 -0
  306. package/dist/checkout/components/ShippingForm.d.ts.map +1 -0
  307. package/dist/checkout/components/ShippingForm.js +125 -0
  308. package/dist/checkout/components/ShippingForm.js.map +1 -0
  309. package/dist/checkout/components/index.d.ts +10 -0
  310. package/dist/checkout/components/index.d.ts.map +1 -0
  311. package/dist/checkout/components/index.js +17 -0
  312. package/dist/checkout/components/index.js.map +1 -0
  313. package/dist/checkout/hooks/index.d.ts +7 -0
  314. package/dist/checkout/hooks/index.d.ts.map +1 -0
  315. package/dist/checkout/hooks/index.js +12 -0
  316. package/dist/checkout/hooks/index.js.map +1 -0
  317. package/dist/checkout/hooks/useCheckout.d.ts +61 -0
  318. package/dist/checkout/hooks/useCheckout.d.ts.map +1 -0
  319. package/dist/checkout/hooks/useCheckout.js +174 -0
  320. package/dist/checkout/hooks/useCheckout.js.map +1 -0
  321. package/dist/checkout/index.d.ts +111 -0
  322. package/dist/checkout/index.d.ts.map +1 -0
  323. package/dist/checkout/index.js +148 -0
  324. package/dist/checkout/index.js.map +1 -0
  325. package/dist/checkout/server/create-checkout-session.d.ts +69 -0
  326. package/dist/checkout/server/create-checkout-session.d.ts.map +1 -0
  327. package/dist/checkout/server/create-checkout-session.js +190 -0
  328. package/dist/checkout/server/create-checkout-session.js.map +1 -0
  329. package/dist/checkout/server/handle-webhook.d.ts +35 -0
  330. package/dist/checkout/server/handle-webhook.d.ts.map +1 -0
  331. package/dist/checkout/server/handle-webhook.js +279 -0
  332. package/dist/checkout/server/handle-webhook.js.map +1 -0
  333. package/dist/checkout/server/index.d.ts +10 -0
  334. package/dist/checkout/server/index.d.ts.map +1 -0
  335. package/dist/checkout/server/index.js +19 -0
  336. package/dist/checkout/server/index.js.map +1 -0
  337. package/dist/checkout/server/order-service.d.ts +43 -0
  338. package/dist/checkout/server/order-service.d.ts.map +1 -0
  339. package/dist/checkout/server/order-service.js +196 -0
  340. package/dist/checkout/server/order-service.js.map +1 -0
  341. package/dist/checkout/stripe/client.d.ts +72 -0
  342. package/dist/checkout/stripe/client.d.ts.map +1 -0
  343. package/dist/checkout/stripe/client.js +189 -0
  344. package/dist/checkout/stripe/client.js.map +1 -0
  345. package/dist/checkout/stripe/index.d.ts +7 -0
  346. package/dist/checkout/stripe/index.d.ts.map +1 -0
  347. package/dist/checkout/stripe/index.js +21 -0
  348. package/dist/checkout/stripe/index.js.map +1 -0
  349. package/dist/checkout/types.d.ts +263 -0
  350. package/dist/checkout/types.d.ts.map +1 -0
  351. package/dist/checkout/types.js +9 -0
  352. package/dist/checkout/types.js.map +1 -0
  353. package/dist/core/config.d.ts +296 -0
  354. package/dist/core/config.d.ts.map +1 -0
  355. package/dist/core/config.js +162 -0
  356. package/dist/core/config.js.map +1 -0
  357. package/dist/core/db/client.d.ts +69 -0
  358. package/dist/core/db/client.d.ts.map +1 -0
  359. package/dist/core/db/client.js +202 -0
  360. package/dist/core/db/client.js.map +1 -0
  361. package/dist/core/db/index.d.ts +11 -0
  362. package/dist/core/db/index.d.ts.map +1 -0
  363. package/dist/core/db/index.js +87 -0
  364. package/dist/core/db/index.js.map +1 -0
  365. package/dist/core/db/queries.d.ts +658 -0
  366. package/dist/core/db/queries.d.ts.map +1 -0
  367. package/dist/core/db/queries.js +735 -0
  368. package/dist/core/db/queries.js.map +1 -0
  369. package/dist/core/db/schema.d.ts +1628 -0
  370. package/dist/core/db/schema.d.ts.map +1 -0
  371. package/dist/core/db/schema.js +262 -0
  372. package/dist/core/db/schema.js.map +1 -0
  373. package/dist/core/index.d.ts +20 -0
  374. package/dist/core/index.d.ts.map +1 -0
  375. package/dist/core/index.js +71 -0
  376. package/dist/core/index.js.map +1 -0
  377. package/dist/core/server/index.d.ts +17 -0
  378. package/dist/core/server/index.d.ts.map +1 -0
  379. package/dist/core/server/index.js +68 -0
  380. package/dist/core/server/index.js.map +1 -0
  381. package/dist/core/types.d.ts +230 -0
  382. package/dist/core/types.d.ts.map +1 -0
  383. package/dist/core/types.js +9 -0
  384. package/dist/core/types.js.map +1 -0
  385. package/dist/core/utils.d.ts +153 -0
  386. package/dist/core/utils.d.ts.map +1 -0
  387. package/dist/core/utils.js +356 -0
  388. package/dist/core/utils.js.map +1 -0
  389. package/dist/emails/config.d.ts +42 -0
  390. package/dist/emails/config.d.ts.map +1 -0
  391. package/dist/emails/config.js +89 -0
  392. package/dist/emails/config.js.map +1 -0
  393. package/dist/emails/index.d.ts +85 -0
  394. package/dist/emails/index.d.ts.map +1 -0
  395. package/dist/emails/index.js +170 -0
  396. package/dist/emails/index.js.map +1 -0
  397. package/dist/emails/send/auth.d.ts +91 -0
  398. package/dist/emails/send/auth.d.ts.map +1 -0
  399. package/dist/emails/send/auth.js +132 -0
  400. package/dist/emails/send/auth.js.map +1 -0
  401. package/dist/emails/send/index.d.ts +10 -0
  402. package/dist/emails/send/index.d.ts.map +1 -0
  403. package/dist/emails/send/index.js +33 -0
  404. package/dist/emails/send/index.js.map +1 -0
  405. package/dist/emails/send/orders.d.ts +180 -0
  406. package/dist/emails/send/orders.d.ts.map +1 -0
  407. package/dist/emails/send/orders.js +259 -0
  408. package/dist/emails/send/orders.js.map +1 -0
  409. package/dist/emails/sender.d.ts +72 -0
  410. package/dist/emails/sender.d.ts.map +1 -0
  411. package/dist/emails/sender.js +118 -0
  412. package/dist/emails/sender.js.map +1 -0
  413. package/dist/emails/templates/base.d.ts +105 -0
  414. package/dist/emails/templates/base.d.ts.map +1 -0
  415. package/dist/emails/templates/base.js +291 -0
  416. package/dist/emails/templates/base.js.map +1 -0
  417. package/dist/emails/templates/email-verification.d.ts +28 -0
  418. package/dist/emails/templates/email-verification.d.ts.map +1 -0
  419. package/dist/emails/templates/email-verification.js +56 -0
  420. package/dist/emails/templates/email-verification.js.map +1 -0
  421. package/dist/emails/templates/index.d.ts +15 -0
  422. package/dist/emails/templates/index.d.ts.map +1 -0
  423. package/dist/emails/templates/index.js +58 -0
  424. package/dist/emails/templates/index.js.map +1 -0
  425. package/dist/emails/templates/order-cancelled.d.ts +30 -0
  426. package/dist/emails/templates/order-cancelled.d.ts.map +1 -0
  427. package/dist/emails/templates/order-cancelled.js +87 -0
  428. package/dist/emails/templates/order-cancelled.js.map +1 -0
  429. package/dist/emails/templates/order-confirmation.d.ts +36 -0
  430. package/dist/emails/templates/order-confirmation.d.ts.map +1 -0
  431. package/dist/emails/templates/order-confirmation.js +161 -0
  432. package/dist/emails/templates/order-confirmation.js.map +1 -0
  433. package/dist/emails/templates/order-delivered.d.ts +31 -0
  434. package/dist/emails/templates/order-delivered.d.ts.map +1 -0
  435. package/dist/emails/templates/order-delivered.js +95 -0
  436. package/dist/emails/templates/order-delivered.js.map +1 -0
  437. package/dist/emails/templates/order-shipped.d.ts +32 -0
  438. package/dist/emails/templates/order-shipped.d.ts.map +1 -0
  439. package/dist/emails/templates/order-shipped.js +87 -0
  440. package/dist/emails/templates/order-shipped.js.map +1 -0
  441. package/dist/emails/templates/password-reset.d.ts +27 -0
  442. package/dist/emails/templates/password-reset.d.ts.map +1 -0
  443. package/dist/emails/templates/password-reset.js +55 -0
  444. package/dist/emails/templates/password-reset.js.map +1 -0
  445. package/dist/emails/templates/refund-processed.d.ts +32 -0
  446. package/dist/emails/templates/refund-processed.d.ts.map +1 -0
  447. package/dist/emails/templates/refund-processed.js +96 -0
  448. package/dist/emails/templates/refund-processed.js.map +1 -0
  449. package/dist/emails/templates/welcome.d.ts +27 -0
  450. package/dist/emails/templates/welcome.d.ts.map +1 -0
  451. package/dist/emails/templates/welcome.js +56 -0
  452. package/dist/emails/templates/welcome.js.map +1 -0
  453. package/dist/emails/types.d.ts +202 -0
  454. package/dist/emails/types.d.ts.map +1 -0
  455. package/dist/emails/types.js +8 -0
  456. package/dist/emails/types.js.map +1 -0
  457. package/dist/emails/utils.d.ts +94 -0
  458. package/dist/emails/utils.d.ts.map +1 -0
  459. package/dist/emails/utils.js +229 -0
  460. package/dist/emails/utils.js.map +1 -0
  461. package/dist/index.d.ts +40 -0
  462. package/dist/index.d.ts.map +1 -0
  463. package/dist/index.js +225 -0
  464. package/dist/index.js.map +1 -0
  465. package/dist/products/api/categories.d.ts +29 -0
  466. package/dist/products/api/categories.d.ts.map +1 -0
  467. package/dist/products/api/categories.js +49 -0
  468. package/dist/products/api/categories.js.map +1 -0
  469. package/dist/products/api/index.d.ts +24 -0
  470. package/dist/products/api/index.d.ts.map +1 -0
  471. package/dist/products/api/index.js +30 -0
  472. package/dist/products/api/index.js.map +1 -0
  473. package/dist/products/api/product.d.ts +36 -0
  474. package/dist/products/api/product.d.ts.map +1 -0
  475. package/dist/products/api/product.js +70 -0
  476. package/dist/products/api/product.js.map +1 -0
  477. package/dist/products/api/products.d.ts +41 -0
  478. package/dist/products/api/products.d.ts.map +1 -0
  479. package/dist/products/api/products.js +102 -0
  480. package/dist/products/api/products.js.map +1 -0
  481. package/dist/products/components/CategoryNav.d.ts +51 -0
  482. package/dist/products/components/CategoryNav.d.ts.map +1 -0
  483. package/dist/products/components/CategoryNav.js +115 -0
  484. package/dist/products/components/CategoryNav.js.map +1 -0
  485. package/dist/products/components/ProductBreadcrumb.d.ts +52 -0
  486. package/dist/products/components/ProductBreadcrumb.d.ts.map +1 -0
  487. package/dist/products/components/ProductBreadcrumb.js +78 -0
  488. package/dist/products/components/ProductBreadcrumb.js.map +1 -0
  489. package/dist/products/components/ProductCard.d.ts +54 -0
  490. package/dist/products/components/ProductCard.d.ts.map +1 -0
  491. package/dist/products/components/ProductCard.js +65 -0
  492. package/dist/products/components/ProductCard.js.map +1 -0
  493. package/dist/products/components/ProductDetails.d.ts +63 -0
  494. package/dist/products/components/ProductDetails.d.ts.map +1 -0
  495. package/dist/products/components/ProductDetails.js +105 -0
  496. package/dist/products/components/ProductDetails.js.map +1 -0
  497. package/dist/products/components/ProductFilters.d.ts +70 -0
  498. package/dist/products/components/ProductFilters.d.ts.map +1 -0
  499. package/dist/products/components/ProductFilters.js +127 -0
  500. package/dist/products/components/ProductFilters.js.map +1 -0
  501. package/dist/products/components/ProductGallery.d.ts +37 -0
  502. package/dist/products/components/ProductGallery.d.ts.map +1 -0
  503. package/dist/products/components/ProductGallery.js +80 -0
  504. package/dist/products/components/ProductGallery.js.map +1 -0
  505. package/dist/products/components/ProductGrid.d.ts +50 -0
  506. package/dist/products/components/ProductGrid.d.ts.map +1 -0
  507. package/dist/products/components/ProductGrid.js +83 -0
  508. package/dist/products/components/ProductGrid.js.map +1 -0
  509. package/dist/products/components/ProductSearch.d.ts +43 -0
  510. package/dist/products/components/ProductSearch.d.ts.map +1 -0
  511. package/dist/products/components/ProductSearch.js +99 -0
  512. package/dist/products/components/ProductSearch.js.map +1 -0
  513. package/dist/products/components/ProductSort.d.ts +43 -0
  514. package/dist/products/components/ProductSort.d.ts.map +1 -0
  515. package/dist/products/components/ProductSort.js +61 -0
  516. package/dist/products/components/ProductSort.js.map +1 -0
  517. package/dist/products/components/VariantSelector.d.ts +43 -0
  518. package/dist/products/components/VariantSelector.d.ts.map +1 -0
  519. package/dist/products/components/VariantSelector.js +147 -0
  520. package/dist/products/components/VariantSelector.js.map +1 -0
  521. package/dist/products/components/index.d.ts +26 -0
  522. package/dist/products/components/index.d.ts.map +1 -0
  523. package/dist/products/components/index.js +32 -0
  524. package/dist/products/components/index.js.map +1 -0
  525. package/dist/products/hooks/index.d.ts +14 -0
  526. package/dist/products/hooks/index.d.ts.map +1 -0
  527. package/dist/products/hooks/index.js +17 -0
  528. package/dist/products/hooks/index.js.map +1 -0
  529. package/dist/products/hooks/useCategories.d.ts +56 -0
  530. package/dist/products/hooks/useCategories.d.ts.map +1 -0
  531. package/dist/products/hooks/useCategories.js +126 -0
  532. package/dist/products/hooks/useCategories.js.map +1 -0
  533. package/dist/products/hooks/useProduct.d.ts +44 -0
  534. package/dist/products/hooks/useProduct.d.ts.map +1 -0
  535. package/dist/products/hooks/useProduct.js +86 -0
  536. package/dist/products/hooks/useProduct.js.map +1 -0
  537. package/dist/products/hooks/useProductAttributes.d.ts +59 -0
  538. package/dist/products/hooks/useProductAttributes.d.ts.map +1 -0
  539. package/dist/products/hooks/useProductAttributes.js +148 -0
  540. package/dist/products/hooks/useProductAttributes.js.map +1 -0
  541. package/dist/products/hooks/useProducts.d.ts +67 -0
  542. package/dist/products/hooks/useProducts.d.ts.map +1 -0
  543. package/dist/products/hooks/useProducts.js +132 -0
  544. package/dist/products/hooks/useProducts.js.map +1 -0
  545. package/dist/products/index.d.ts +94 -0
  546. package/dist/products/index.d.ts.map +1 -0
  547. package/dist/products/index.js +123 -0
  548. package/dist/products/index.js.map +1 -0
  549. package/dist/theme/ThemeProvider.d.ts +70 -0
  550. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  551. package/dist/theme/ThemeProvider.js +77 -0
  552. package/dist/theme/ThemeProvider.js.map +1 -0
  553. package/dist/theme/colors.d.ts +148 -0
  554. package/dist/theme/colors.d.ts.map +1 -0
  555. package/dist/theme/colors.js +219 -0
  556. package/dist/theme/colors.js.map +1 -0
  557. package/dist/theme/defaults.d.ts +212 -0
  558. package/dist/theme/defaults.d.ts.map +1 -0
  559. package/dist/theme/defaults.js +278 -0
  560. package/dist/theme/defaults.js.map +1 -0
  561. package/dist/theme/fonts.d.ts +59 -0
  562. package/dist/theme/fonts.d.ts.map +1 -0
  563. package/dist/theme/fonts.js +202 -0
  564. package/dist/theme/fonts.js.map +1 -0
  565. package/dist/theme/generator.d.ts +50 -0
  566. package/dist/theme/generator.d.ts.map +1 -0
  567. package/dist/theme/generator.js +322 -0
  568. package/dist/theme/generator.js.map +1 -0
  569. package/dist/theme/hooks.d.ts +110 -0
  570. package/dist/theme/hooks.d.ts.map +1 -0
  571. package/dist/theme/hooks.js +106 -0
  572. package/dist/theme/hooks.js.map +1 -0
  573. package/dist/theme/index.d.ts +37 -0
  574. package/dist/theme/index.d.ts.map +1 -0
  575. package/dist/theme/index.js +85 -0
  576. package/dist/theme/index.js.map +1 -0
  577. package/package.json +1 -1
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ /**
3
+ * @rovela/sdk/emails
4
+ *
5
+ * Transactional email module for e-commerce stores.
6
+ *
7
+ * This module provides:
8
+ * - Email template rendering functions
9
+ * - Send functions for common transactional emails
10
+ * - Configuration utilities for Resend integration
11
+ *
12
+ * @example Basic Usage
13
+ * ```typescript
14
+ * import { sendOrderConfirmation, sendVerificationEmail } from '@rovela/sdk/emails'
15
+ *
16
+ * // Send order confirmation
17
+ * await sendOrderConfirmation({
18
+ * to: 'customer@example.com',
19
+ * customerName: 'John',
20
+ * orderNumber: 'ORD-12345',
21
+ * // ... other params
22
+ * })
23
+ *
24
+ * // Send verification email
25
+ * await sendVerificationEmail({
26
+ * to: 'customer@example.com',
27
+ * customerName: 'John',
28
+ * verificationLink: 'https://store.com/verify?token=...',
29
+ * })
30
+ * ```
31
+ *
32
+ * @example Fire-and-Forget (Webhooks)
33
+ * ```typescript
34
+ * import { sendOrderConfirmationAsync } from '@rovela/sdk/emails'
35
+ *
36
+ * // In webhook handler - don't wait for email
37
+ * sendOrderConfirmationAsync({
38
+ * to: 'customer@example.com',
39
+ * // ...
40
+ * })
41
+ *
42
+ * // Return immediately
43
+ * return Response.json({ received: true })
44
+ * ```
45
+ *
46
+ * @example Custom Templates
47
+ * ```typescript
48
+ * import { sendEmail, getEmailConfig, baseLayout } from '@rovela/sdk/emails'
49
+ *
50
+ * // Build custom email HTML
51
+ * const config = getEmailConfig()
52
+ * const html = baseLayout({
53
+ * config,
54
+ * title: 'Custom Email',
55
+ * content: '<h1>Hello World</h1>',
56
+ * })
57
+ *
58
+ * // Send it
59
+ * await sendEmail({
60
+ * to: 'customer@example.com',
61
+ * subject: 'Custom Email',
62
+ * html,
63
+ * })
64
+ * ```
65
+ *
66
+ * ## Environment Variables
67
+ *
68
+ * Required:
69
+ * - `RESEND_API_KEY` - Your Resend API key
70
+ * - `RESEND_FROM_EMAIL` - Sender email address (must be verified in Resend)
71
+ *
72
+ * Optional:
73
+ * - `STORE_NAME` - Store name (falls back to blueprint config)
74
+ * - `STORE_LOGO_URL` - Logo URL for emails
75
+ * - `STORE_ADDRESS` - Physical address for footer
76
+ * - `SUPPORT_EMAIL` - Support email (falls back to RESEND_FROM_EMAIL)
77
+ * - `NEXT_PUBLIC_APP_URL` - Store URL for links
78
+ */
79
+ Object.defineProperty(exports, "__esModule", { value: true });
80
+ exports.sendWelcomeEmail = exports.sendVerificationEmailAsync = exports.sendVerificationEmail = exports.getRefundProcessedSubject = exports.renderRefundProcessed = exports.getOrderCancelledSubject = exports.renderOrderCancelled = exports.getOrderDeliveredSubject = exports.renderOrderDelivered = exports.getOrderShippedSubject = exports.renderOrderShipped = exports.getOrderConfirmationSubject = exports.renderOrderConfirmation = exports.getPasswordResetSubject = exports.renderPasswordResetEmail = exports.getWelcomeEmailSubject = exports.renderWelcomeEmail = exports.getEmailVerificationSubject = exports.renderEmailVerification = exports.STYLES = exports.sectionHeading = exports.addressSection = exports.secondaryButton = exports.highlightBox = exports.statusBadge = exports.detailBox = exports.linkFallback = exports.infoBox = exports.paragraph = exports.heading = exports.primaryButton = exports.baseLayout = exports.formatOrderNumber = exports.emailFooter = exports.emailButton = exports.escapeHtml = exports.formatAddressHtml = exports.formatAddressLine = exports.formatPrice = exports.formatDateTime = exports.formatDate = exports.sendEmailBatch = exports.sendEmailAsync = exports.sendEmail = exports.getSupportEmail = exports.getEmailConfig = exports.getStoreUrl = exports.getStoreName = exports.getFromEmail = exports.getResend = void 0;
81
+ exports.sendRefundProcessedAsync = exports.sendRefundProcessed = exports.sendOrderCancelledAsync = exports.sendOrderCancelled = exports.sendOrderDeliveredAsync = exports.sendOrderDelivered = exports.sendOrderShippedAsync = exports.sendOrderShipped = exports.sendOrderConfirmationAsync = exports.sendOrderConfirmation = exports.sendPasswordResetEmailAsync = exports.sendPasswordResetEmail = exports.sendWelcomeEmailAsync = void 0;
82
+ // =============================================================================
83
+ // Configuration
84
+ // =============================================================================
85
+ var config_1 = require("./config");
86
+ Object.defineProperty(exports, "getResend", { enumerable: true, get: function () { return config_1.getResend; } });
87
+ Object.defineProperty(exports, "getFromEmail", { enumerable: true, get: function () { return config_1.getFromEmail; } });
88
+ Object.defineProperty(exports, "getStoreName", { enumerable: true, get: function () { return config_1.getStoreName; } });
89
+ Object.defineProperty(exports, "getStoreUrl", { enumerable: true, get: function () { return config_1.getStoreUrl; } });
90
+ Object.defineProperty(exports, "getEmailConfig", { enumerable: true, get: function () { return config_1.getEmailConfig; } });
91
+ Object.defineProperty(exports, "getSupportEmail", { enumerable: true, get: function () { return config_1.getSupportEmail; } });
92
+ // =============================================================================
93
+ // Core Sender
94
+ // =============================================================================
95
+ var sender_1 = require("./sender");
96
+ Object.defineProperty(exports, "sendEmail", { enumerable: true, get: function () { return sender_1.sendEmail; } });
97
+ Object.defineProperty(exports, "sendEmailAsync", { enumerable: true, get: function () { return sender_1.sendEmailAsync; } });
98
+ Object.defineProperty(exports, "sendEmailBatch", { enumerable: true, get: function () { return sender_1.sendEmailBatch; } });
99
+ // =============================================================================
100
+ // Utilities
101
+ // =============================================================================
102
+ var utils_1 = require("./utils");
103
+ Object.defineProperty(exports, "formatDate", { enumerable: true, get: function () { return utils_1.formatDate; } });
104
+ Object.defineProperty(exports, "formatDateTime", { enumerable: true, get: function () { return utils_1.formatDateTime; } });
105
+ Object.defineProperty(exports, "formatPrice", { enumerable: true, get: function () { return utils_1.formatPrice; } });
106
+ Object.defineProperty(exports, "formatAddressLine", { enumerable: true, get: function () { return utils_1.formatAddressLine; } });
107
+ Object.defineProperty(exports, "formatAddressHtml", { enumerable: true, get: function () { return utils_1.formatAddressHtml; } });
108
+ Object.defineProperty(exports, "escapeHtml", { enumerable: true, get: function () { return utils_1.escapeHtml; } });
109
+ Object.defineProperty(exports, "emailButton", { enumerable: true, get: function () { return utils_1.emailButton; } });
110
+ Object.defineProperty(exports, "emailFooter", { enumerable: true, get: function () { return utils_1.emailFooter; } });
111
+ Object.defineProperty(exports, "formatOrderNumber", { enumerable: true, get: function () { return utils_1.formatOrderNumber; } });
112
+ // =============================================================================
113
+ // Templates (Render Functions)
114
+ // =============================================================================
115
+ var templates_1 = require("./templates");
116
+ // Base components
117
+ Object.defineProperty(exports, "baseLayout", { enumerable: true, get: function () { return templates_1.baseLayout; } });
118
+ Object.defineProperty(exports, "primaryButton", { enumerable: true, get: function () { return templates_1.primaryButton; } });
119
+ Object.defineProperty(exports, "heading", { enumerable: true, get: function () { return templates_1.heading; } });
120
+ Object.defineProperty(exports, "paragraph", { enumerable: true, get: function () { return templates_1.paragraph; } });
121
+ Object.defineProperty(exports, "infoBox", { enumerable: true, get: function () { return templates_1.infoBox; } });
122
+ Object.defineProperty(exports, "linkFallback", { enumerable: true, get: function () { return templates_1.linkFallback; } });
123
+ Object.defineProperty(exports, "detailBox", { enumerable: true, get: function () { return templates_1.detailBox; } });
124
+ Object.defineProperty(exports, "statusBadge", { enumerable: true, get: function () { return templates_1.statusBadge; } });
125
+ Object.defineProperty(exports, "highlightBox", { enumerable: true, get: function () { return templates_1.highlightBox; } });
126
+ Object.defineProperty(exports, "secondaryButton", { enumerable: true, get: function () { return templates_1.secondaryButton; } });
127
+ Object.defineProperty(exports, "addressSection", { enumerable: true, get: function () { return templates_1.addressSection; } });
128
+ Object.defineProperty(exports, "sectionHeading", { enumerable: true, get: function () { return templates_1.sectionHeading; } });
129
+ Object.defineProperty(exports, "STYLES", { enumerable: true, get: function () { return templates_1.STYLES; } });
130
+ // Auth templates
131
+ Object.defineProperty(exports, "renderEmailVerification", { enumerable: true, get: function () { return templates_1.renderEmailVerification; } });
132
+ Object.defineProperty(exports, "getEmailVerificationSubject", { enumerable: true, get: function () { return templates_1.getEmailVerificationSubject; } });
133
+ Object.defineProperty(exports, "renderWelcomeEmail", { enumerable: true, get: function () { return templates_1.renderWelcomeEmail; } });
134
+ Object.defineProperty(exports, "getWelcomeEmailSubject", { enumerable: true, get: function () { return templates_1.getWelcomeEmailSubject; } });
135
+ Object.defineProperty(exports, "renderPasswordResetEmail", { enumerable: true, get: function () { return templates_1.renderPasswordResetEmail; } });
136
+ Object.defineProperty(exports, "getPasswordResetSubject", { enumerable: true, get: function () { return templates_1.getPasswordResetSubject; } });
137
+ // Order templates
138
+ Object.defineProperty(exports, "renderOrderConfirmation", { enumerable: true, get: function () { return templates_1.renderOrderConfirmation; } });
139
+ Object.defineProperty(exports, "getOrderConfirmationSubject", { enumerable: true, get: function () { return templates_1.getOrderConfirmationSubject; } });
140
+ Object.defineProperty(exports, "renderOrderShipped", { enumerable: true, get: function () { return templates_1.renderOrderShipped; } });
141
+ Object.defineProperty(exports, "getOrderShippedSubject", { enumerable: true, get: function () { return templates_1.getOrderShippedSubject; } });
142
+ Object.defineProperty(exports, "renderOrderDelivered", { enumerable: true, get: function () { return templates_1.renderOrderDelivered; } });
143
+ Object.defineProperty(exports, "getOrderDeliveredSubject", { enumerable: true, get: function () { return templates_1.getOrderDeliveredSubject; } });
144
+ Object.defineProperty(exports, "renderOrderCancelled", { enumerable: true, get: function () { return templates_1.renderOrderCancelled; } });
145
+ Object.defineProperty(exports, "getOrderCancelledSubject", { enumerable: true, get: function () { return templates_1.getOrderCancelledSubject; } });
146
+ Object.defineProperty(exports, "renderRefundProcessed", { enumerable: true, get: function () { return templates_1.renderRefundProcessed; } });
147
+ Object.defineProperty(exports, "getRefundProcessedSubject", { enumerable: true, get: function () { return templates_1.getRefundProcessedSubject; } });
148
+ // =============================================================================
149
+ // Send Functions (Convenience)
150
+ // =============================================================================
151
+ var send_1 = require("./send");
152
+ // Auth emails
153
+ Object.defineProperty(exports, "sendVerificationEmail", { enumerable: true, get: function () { return send_1.sendVerificationEmail; } });
154
+ Object.defineProperty(exports, "sendVerificationEmailAsync", { enumerable: true, get: function () { return send_1.sendVerificationEmailAsync; } });
155
+ Object.defineProperty(exports, "sendWelcomeEmail", { enumerable: true, get: function () { return send_1.sendWelcomeEmail; } });
156
+ Object.defineProperty(exports, "sendWelcomeEmailAsync", { enumerable: true, get: function () { return send_1.sendWelcomeEmailAsync; } });
157
+ Object.defineProperty(exports, "sendPasswordResetEmail", { enumerable: true, get: function () { return send_1.sendPasswordResetEmail; } });
158
+ Object.defineProperty(exports, "sendPasswordResetEmailAsync", { enumerable: true, get: function () { return send_1.sendPasswordResetEmailAsync; } });
159
+ // Order emails
160
+ Object.defineProperty(exports, "sendOrderConfirmation", { enumerable: true, get: function () { return send_1.sendOrderConfirmation; } });
161
+ Object.defineProperty(exports, "sendOrderConfirmationAsync", { enumerable: true, get: function () { return send_1.sendOrderConfirmationAsync; } });
162
+ Object.defineProperty(exports, "sendOrderShipped", { enumerable: true, get: function () { return send_1.sendOrderShipped; } });
163
+ Object.defineProperty(exports, "sendOrderShippedAsync", { enumerable: true, get: function () { return send_1.sendOrderShippedAsync; } });
164
+ Object.defineProperty(exports, "sendOrderDelivered", { enumerable: true, get: function () { return send_1.sendOrderDelivered; } });
165
+ Object.defineProperty(exports, "sendOrderDeliveredAsync", { enumerable: true, get: function () { return send_1.sendOrderDeliveredAsync; } });
166
+ Object.defineProperty(exports, "sendOrderCancelled", { enumerable: true, get: function () { return send_1.sendOrderCancelled; } });
167
+ Object.defineProperty(exports, "sendOrderCancelledAsync", { enumerable: true, get: function () { return send_1.sendOrderCancelledAsync; } });
168
+ Object.defineProperty(exports, "sendRefundProcessed", { enumerable: true, get: function () { return send_1.sendRefundProcessed; } });
169
+ Object.defineProperty(exports, "sendRefundProcessedAsync", { enumerable: true, get: function () { return send_1.sendRefundProcessedAsync; } });
170
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/emails/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;;;;AA6BH,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF,mCAOiB;AANf,mGAAA,SAAS,OAAA;AACT,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,qGAAA,WAAW,OAAA;AACX,wGAAA,cAAc,OAAA;AACd,yGAAA,eAAe,OAAA;AAGjB,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF,mCAAoE;AAA3D,mGAAA,SAAS,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,wGAAA,cAAc,OAAA;AAElD,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,iCAUgB;AATd,mGAAA,UAAU,OAAA;AACV,uGAAA,cAAc,OAAA;AACd,oGAAA,WAAW,OAAA;AACX,0GAAA,iBAAiB,OAAA;AACjB,0GAAA,iBAAiB,OAAA;AACjB,mGAAA,UAAU,OAAA;AACV,oGAAA,WAAW,OAAA;AACX,oGAAA,WAAW,OAAA;AACX,0GAAA,iBAAiB,OAAA;AAGnB,gFAAgF;AAChF,+BAA+B;AAC/B,gFAAgF;AAEhF,yCAiCoB;AAhClB,kBAAkB;AAClB,uGAAA,UAAU,OAAA;AACV,0GAAA,aAAa,OAAA;AACb,oGAAA,OAAO,OAAA;AACP,sGAAA,SAAS,OAAA;AACT,oGAAA,OAAO,OAAA;AACP,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,wGAAA,WAAW,OAAA;AACX,yGAAA,YAAY,OAAA;AACZ,4GAAA,eAAe,OAAA;AACf,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,mGAAA,MAAM,OAAA;AACN,iBAAiB;AACjB,oHAAA,uBAAuB,OAAA;AACvB,wHAAA,2BAA2B,OAAA;AAC3B,+GAAA,kBAAkB,OAAA;AAClB,mHAAA,sBAAsB,OAAA;AACtB,qHAAA,wBAAwB,OAAA;AACxB,oHAAA,uBAAuB,OAAA;AACvB,kBAAkB;AAClB,oHAAA,uBAAuB,OAAA;AACvB,wHAAA,2BAA2B,OAAA;AAC3B,+GAAA,kBAAkB,OAAA;AAClB,mHAAA,sBAAsB,OAAA;AACtB,iHAAA,oBAAoB,OAAA;AACpB,qHAAA,wBAAwB,OAAA;AACxB,iHAAA,oBAAoB,OAAA;AACpB,qHAAA,wBAAwB,OAAA;AACxB,kHAAA,qBAAqB,OAAA;AACrB,sHAAA,yBAAyB,OAAA;AAG3B,gFAAgF;AAChF,+BAA+B;AAC/B,gFAAgF;AAEhF,+BAmBe;AAlBb,cAAc;AACd,6GAAA,qBAAqB,OAAA;AACrB,kHAAA,0BAA0B,OAAA;AAC1B,wGAAA,gBAAgB,OAAA;AAChB,6GAAA,qBAAqB,OAAA;AACrB,8GAAA,sBAAsB,OAAA;AACtB,mHAAA,2BAA2B,OAAA;AAC3B,eAAe;AACf,6GAAA,qBAAqB,OAAA;AACrB,kHAAA,0BAA0B,OAAA;AAC1B,wGAAA,gBAAgB,OAAA;AAChB,6GAAA,qBAAqB,OAAA;AACrB,0GAAA,kBAAkB,OAAA;AAClB,+GAAA,uBAAuB,OAAA;AACvB,0GAAA,kBAAkB,OAAA;AAClB,+GAAA,uBAAuB,OAAA;AACvB,2GAAA,mBAAmB,OAAA;AACnB,gHAAA,wBAAwB,OAAA"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @rovela/sdk/emails/send/auth
3
+ *
4
+ * Send functions for authentication emails.
5
+ */
6
+ import type { SendEmailResult } from '../types';
7
+ export interface SendVerificationEmailParams {
8
+ /** Customer email address */
9
+ to: string;
10
+ /** Customer's first name */
11
+ customerName: string;
12
+ /** Verification link URL */
13
+ verificationLink: string;
14
+ /** Link expiry time in hours (default: "24") */
15
+ expiryTime?: string;
16
+ }
17
+ /**
18
+ * Send an email verification email.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * import { sendVerificationEmail } from '@rovela/sdk/emails'
23
+ *
24
+ * await sendVerificationEmail({
25
+ * to: 'john@example.com',
26
+ * customerName: 'John',
27
+ * verificationLink: 'https://store.com/verify?token=...',
28
+ * })
29
+ * ```
30
+ */
31
+ export declare function sendVerificationEmail(params: SendVerificationEmailParams): Promise<SendEmailResult>;
32
+ export interface SendWelcomeEmailParams {
33
+ /** Customer email address */
34
+ to: string;
35
+ /** Customer's first name */
36
+ customerName: string;
37
+ /** Account creation date (defaults to today) */
38
+ createdDate?: Date | string;
39
+ }
40
+ /**
41
+ * Send a welcome email after account creation/verification.
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * import { sendWelcomeEmail } from '@rovela/sdk/emails'
46
+ *
47
+ * await sendWelcomeEmail({
48
+ * to: 'john@example.com',
49
+ * customerName: 'John',
50
+ * })
51
+ * ```
52
+ */
53
+ export declare function sendWelcomeEmail(params: SendWelcomeEmailParams): Promise<SendEmailResult>;
54
+ export interface SendPasswordResetEmailParams {
55
+ /** Customer email address */
56
+ to: string;
57
+ /** Customer's first name */
58
+ customerName: string;
59
+ /** Password reset link URL */
60
+ resetLink: string;
61
+ /** Link expiry time in hours (default: "1") */
62
+ expiryTime?: string;
63
+ }
64
+ /**
65
+ * Send a password reset email.
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * import { sendPasswordResetEmail } from '@rovela/sdk/emails'
70
+ *
71
+ * await sendPasswordResetEmail({
72
+ * to: 'john@example.com',
73
+ * customerName: 'John',
74
+ * resetLink: 'https://store.com/reset-password?token=...',
75
+ * })
76
+ * ```
77
+ */
78
+ export declare function sendPasswordResetEmail(params: SendPasswordResetEmailParams): Promise<SendEmailResult>;
79
+ /**
80
+ * Send verification email without waiting (fire-and-forget).
81
+ */
82
+ export declare function sendVerificationEmailAsync(params: SendVerificationEmailParams): void;
83
+ /**
84
+ * Send welcome email without waiting (fire-and-forget).
85
+ */
86
+ export declare function sendWelcomeEmailAsync(params: SendWelcomeEmailParams): void;
87
+ /**
88
+ * Send password reset email without waiting (fire-and-forget).
89
+ */
90
+ export declare function sendPasswordResetEmailAsync(params: SendPasswordResetEmailParams): void;
91
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/emails/send/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAc/C,MAAM,WAAW,2BAA2B;IAC1C,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,gBAAgB,EAAE,MAAM,CAAA;IACxB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,eAAe,CAAC,CAiB1B;AAED,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,gDAAgD;IAChD,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAgB1B;AAED,MAAM,WAAW,4BAA4B;IAC3C,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,eAAe,CAAC,CAgB1B;AAMD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,2BAA2B,GAClC,IAAI,CAIN;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAI1E;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,4BAA4B,GACnC,IAAI,CAIN"}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ /**
3
+ * @rovela/sdk/emails/send/auth
4
+ *
5
+ * Send functions for authentication emails.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.sendVerificationEmail = sendVerificationEmail;
9
+ exports.sendWelcomeEmail = sendWelcomeEmail;
10
+ exports.sendPasswordResetEmail = sendPasswordResetEmail;
11
+ exports.sendVerificationEmailAsync = sendVerificationEmailAsync;
12
+ exports.sendWelcomeEmailAsync = sendWelcomeEmailAsync;
13
+ exports.sendPasswordResetEmailAsync = sendPasswordResetEmailAsync;
14
+ const sender_1 = require("../sender");
15
+ const config_1 = require("../config");
16
+ const utils_1 = require("../utils");
17
+ const templates_1 = require("../templates");
18
+ /**
19
+ * Send an email verification email.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * import { sendVerificationEmail } from '@rovela/sdk/emails'
24
+ *
25
+ * await sendVerificationEmail({
26
+ * to: 'john@example.com',
27
+ * customerName: 'John',
28
+ * verificationLink: 'https://store.com/verify?token=...',
29
+ * })
30
+ * ```
31
+ */
32
+ async function sendVerificationEmail(params) {
33
+ const config = (0, config_1.getEmailConfig)();
34
+ const storeName = (0, config_1.getStoreName)();
35
+ const html = (0, templates_1.renderEmailVerification)({
36
+ config,
37
+ customerName: params.customerName,
38
+ customerEmail: params.to,
39
+ verificationLink: params.verificationLink,
40
+ expiryTime: params.expiryTime || '24',
41
+ });
42
+ return (0, sender_1.sendEmail)({
43
+ to: params.to,
44
+ subject: (0, templates_1.getEmailVerificationSubject)(storeName),
45
+ html,
46
+ });
47
+ }
48
+ /**
49
+ * Send a welcome email after account creation/verification.
50
+ *
51
+ * @example
52
+ * ```typescript
53
+ * import { sendWelcomeEmail } from '@rovela/sdk/emails'
54
+ *
55
+ * await sendWelcomeEmail({
56
+ * to: 'john@example.com',
57
+ * customerName: 'John',
58
+ * })
59
+ * ```
60
+ */
61
+ async function sendWelcomeEmail(params) {
62
+ const config = (0, config_1.getEmailConfig)();
63
+ const storeName = (0, config_1.getStoreName)();
64
+ const html = (0, templates_1.renderWelcomeEmail)({
65
+ config,
66
+ customerName: params.customerName,
67
+ customerEmail: params.to,
68
+ createdDate: (0, utils_1.formatDate)(params.createdDate || new Date()),
69
+ });
70
+ return (0, sender_1.sendEmail)({
71
+ to: params.to,
72
+ subject: (0, templates_1.getWelcomeEmailSubject)(storeName),
73
+ html,
74
+ });
75
+ }
76
+ /**
77
+ * Send a password reset email.
78
+ *
79
+ * @example
80
+ * ```typescript
81
+ * import { sendPasswordResetEmail } from '@rovela/sdk/emails'
82
+ *
83
+ * await sendPasswordResetEmail({
84
+ * to: 'john@example.com',
85
+ * customerName: 'John',
86
+ * resetLink: 'https://store.com/reset-password?token=...',
87
+ * })
88
+ * ```
89
+ */
90
+ async function sendPasswordResetEmail(params) {
91
+ const config = (0, config_1.getEmailConfig)();
92
+ const storeName = (0, config_1.getStoreName)();
93
+ const html = (0, templates_1.renderPasswordResetEmail)({
94
+ config,
95
+ customerName: params.customerName,
96
+ resetLink: params.resetLink,
97
+ expiryTime: params.expiryTime || '1',
98
+ });
99
+ return (0, sender_1.sendEmail)({
100
+ to: params.to,
101
+ subject: (0, templates_1.getPasswordResetSubject)(storeName),
102
+ html,
103
+ });
104
+ }
105
+ // =============================================================================
106
+ // Fire-and-Forget Variants
107
+ // =============================================================================
108
+ /**
109
+ * Send verification email without waiting (fire-and-forget).
110
+ */
111
+ function sendVerificationEmailAsync(params) {
112
+ sendVerificationEmail(params).catch((err) => {
113
+ console.error('[Email] Failed to send verification email:', err);
114
+ });
115
+ }
116
+ /**
117
+ * Send welcome email without waiting (fire-and-forget).
118
+ */
119
+ function sendWelcomeEmailAsync(params) {
120
+ sendWelcomeEmail(params).catch((err) => {
121
+ console.error('[Email] Failed to send welcome email:', err);
122
+ });
123
+ }
124
+ /**
125
+ * Send password reset email without waiting (fire-and-forget).
126
+ */
127
+ function sendPasswordResetEmailAsync(params) {
128
+ sendPasswordResetEmail(params).catch((err) => {
129
+ console.error('[Email] Failed to send password reset email:', err);
130
+ });
131
+ }
132
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/emails/send/auth.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @rovela/sdk/emails/send
3
+ *
4
+ * Convenience functions for sending emails.
5
+ */
6
+ export { sendVerificationEmail, sendVerificationEmailAsync, sendWelcomeEmail, sendWelcomeEmailAsync, sendPasswordResetEmail, sendPasswordResetEmailAsync, } from './auth';
7
+ export type { SendVerificationEmailParams, SendWelcomeEmailParams, SendPasswordResetEmailParams, } from './auth';
8
+ export { sendOrderConfirmation, sendOrderConfirmationAsync, sendOrderShipped, sendOrderShippedAsync, sendOrderDelivered, sendOrderDeliveredAsync, sendOrderCancelled, sendOrderCancelledAsync, sendRefundProcessed, sendRefundProcessedAsync, } from './orders';
9
+ export type { SendOrderConfirmationParams, SendOrderShippedParams, SendOrderDeliveredParams, SendOrderCancelledParams, SendRefundProcessedParams, } from './orders';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/emails/send/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,QAAQ,CAAA;AAEf,YAAY,EACV,2BAA2B,EAC3B,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,QAAQ,CAAA;AAMf,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,UAAU,CAAA;AAEjB,YAAY,EACV,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,UAAU,CAAA"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /**
3
+ * @rovela/sdk/emails/send
4
+ *
5
+ * Convenience functions for sending emails.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.sendRefundProcessedAsync = exports.sendRefundProcessed = exports.sendOrderCancelledAsync = exports.sendOrderCancelled = exports.sendOrderDeliveredAsync = exports.sendOrderDelivered = exports.sendOrderShippedAsync = exports.sendOrderShipped = exports.sendOrderConfirmationAsync = exports.sendOrderConfirmation = exports.sendPasswordResetEmailAsync = exports.sendPasswordResetEmail = exports.sendWelcomeEmailAsync = exports.sendWelcomeEmail = exports.sendVerificationEmailAsync = exports.sendVerificationEmail = void 0;
9
+ // =============================================================================
10
+ // Auth Emails
11
+ // =============================================================================
12
+ var auth_1 = require("./auth");
13
+ Object.defineProperty(exports, "sendVerificationEmail", { enumerable: true, get: function () { return auth_1.sendVerificationEmail; } });
14
+ Object.defineProperty(exports, "sendVerificationEmailAsync", { enumerable: true, get: function () { return auth_1.sendVerificationEmailAsync; } });
15
+ Object.defineProperty(exports, "sendWelcomeEmail", { enumerable: true, get: function () { return auth_1.sendWelcomeEmail; } });
16
+ Object.defineProperty(exports, "sendWelcomeEmailAsync", { enumerable: true, get: function () { return auth_1.sendWelcomeEmailAsync; } });
17
+ Object.defineProperty(exports, "sendPasswordResetEmail", { enumerable: true, get: function () { return auth_1.sendPasswordResetEmail; } });
18
+ Object.defineProperty(exports, "sendPasswordResetEmailAsync", { enumerable: true, get: function () { return auth_1.sendPasswordResetEmailAsync; } });
19
+ // =============================================================================
20
+ // Order Emails
21
+ // =============================================================================
22
+ var orders_1 = require("./orders");
23
+ Object.defineProperty(exports, "sendOrderConfirmation", { enumerable: true, get: function () { return orders_1.sendOrderConfirmation; } });
24
+ Object.defineProperty(exports, "sendOrderConfirmationAsync", { enumerable: true, get: function () { return orders_1.sendOrderConfirmationAsync; } });
25
+ Object.defineProperty(exports, "sendOrderShipped", { enumerable: true, get: function () { return orders_1.sendOrderShipped; } });
26
+ Object.defineProperty(exports, "sendOrderShippedAsync", { enumerable: true, get: function () { return orders_1.sendOrderShippedAsync; } });
27
+ Object.defineProperty(exports, "sendOrderDelivered", { enumerable: true, get: function () { return orders_1.sendOrderDelivered; } });
28
+ Object.defineProperty(exports, "sendOrderDeliveredAsync", { enumerable: true, get: function () { return orders_1.sendOrderDeliveredAsync; } });
29
+ Object.defineProperty(exports, "sendOrderCancelled", { enumerable: true, get: function () { return orders_1.sendOrderCancelled; } });
30
+ Object.defineProperty(exports, "sendOrderCancelledAsync", { enumerable: true, get: function () { return orders_1.sendOrderCancelledAsync; } });
31
+ Object.defineProperty(exports, "sendRefundProcessed", { enumerable: true, get: function () { return orders_1.sendRefundProcessed; } });
32
+ Object.defineProperty(exports, "sendRefundProcessedAsync", { enumerable: true, get: function () { return orders_1.sendRefundProcessedAsync; } });
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/emails/send/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF,+BAOe;AANb,6GAAA,qBAAqB,OAAA;AACrB,kHAAA,0BAA0B,OAAA;AAC1B,wGAAA,gBAAgB,OAAA;AAChB,6GAAA,qBAAqB,OAAA;AACrB,8GAAA,sBAAsB,OAAA;AACtB,mHAAA,2BAA2B,OAAA;AAS7B,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AAEhF,mCAWiB;AAVf,+GAAA,qBAAqB,OAAA;AACrB,oHAAA,0BAA0B,OAAA;AAC1B,0GAAA,gBAAgB,OAAA;AAChB,+GAAA,qBAAqB,OAAA;AACrB,4GAAA,kBAAkB,OAAA;AAClB,iHAAA,uBAAuB,OAAA;AACvB,4GAAA,kBAAkB,OAAA;AAClB,iHAAA,uBAAuB,OAAA;AACvB,6GAAA,mBAAmB,OAAA;AACnB,kHAAA,wBAAwB,OAAA"}
@@ -0,0 +1,180 @@
1
+ /**
2
+ * @rovela/sdk/emails/send/orders
3
+ *
4
+ * Send functions for order-related emails.
5
+ */
6
+ import type { SendEmailResult, EmailOrderItem, EmailAddress } from '../types';
7
+ export interface SendOrderConfirmationParams {
8
+ to: string;
9
+ customerName: string;
10
+ orderNumber: string;
11
+ orderDate: string;
12
+ paymentStatus: string;
13
+ items: EmailOrderItem[];
14
+ subtotal: string;
15
+ shippingCost: string;
16
+ tax: string;
17
+ total: string;
18
+ shippingAddress: EmailAddress;
19
+ orderTrackingUrl: string;
20
+ }
21
+ /**
22
+ * Send an order confirmation email.
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * import { sendOrderConfirmation } from '@rovela/sdk/emails'
27
+ *
28
+ * await sendOrderConfirmation({
29
+ * to: 'john@example.com',
30
+ * customerName: 'John',
31
+ * orderNumber: 'ORD-12345',
32
+ * orderDate: 'November 28, 2025',
33
+ * paymentStatus: 'Paid',
34
+ * items: [{ name: 'Product', quantity: 1, price: '$29.99' }],
35
+ * subtotal: '$29.99',
36
+ * shippingCost: '$5.00',
37
+ * tax: '$2.80',
38
+ * total: '$37.79',
39
+ * shippingAddress: { name: 'John Doe', ... },
40
+ * orderTrackingUrl: 'https://store.com/orders/12345',
41
+ * })
42
+ * ```
43
+ */
44
+ export declare function sendOrderConfirmation(params: SendOrderConfirmationParams): Promise<SendEmailResult>;
45
+ /**
46
+ * Send order confirmation without waiting (fire-and-forget).
47
+ * Use this in webhooks to not block the response.
48
+ */
49
+ export declare function sendOrderConfirmationAsync(params: SendOrderConfirmationParams): void;
50
+ export interface SendOrderShippedParams {
51
+ to: string;
52
+ customerName: string;
53
+ orderNumber: string;
54
+ trackingNumber: string;
55
+ carrierName: string;
56
+ estimatedDeliveryDate: string;
57
+ shippingAddress: EmailAddress;
58
+ trackingUrl: string;
59
+ }
60
+ /**
61
+ * Send an order shipped email.
62
+ *
63
+ * @example
64
+ * ```typescript
65
+ * import { sendOrderShipped } from '@rovela/sdk/emails'
66
+ *
67
+ * await sendOrderShipped({
68
+ * to: 'john@example.com',
69
+ * customerName: 'John',
70
+ * orderNumber: 'ORD-12345',
71
+ * trackingNumber: '1Z999AA10123456784',
72
+ * carrierName: 'UPS',
73
+ * estimatedDeliveryDate: 'December 3, 2025',
74
+ * shippingAddress: { name: 'John Doe', ... },
75
+ * trackingUrl: 'https://ups.com/track/...',
76
+ * })
77
+ * ```
78
+ */
79
+ export declare function sendOrderShipped(params: SendOrderShippedParams): Promise<SendEmailResult>;
80
+ /**
81
+ * Send order shipped without waiting (fire-and-forget).
82
+ */
83
+ export declare function sendOrderShippedAsync(params: SendOrderShippedParams): void;
84
+ export interface SendOrderDeliveredParams {
85
+ to: string;
86
+ customerName: string;
87
+ orderNumber: string;
88
+ deliveryDate: string;
89
+ deliveryLocation: string;
90
+ reviewUrl: string;
91
+ returnCenterUrl: string;
92
+ }
93
+ /**
94
+ * Send an order delivered email.
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * import { sendOrderDelivered } from '@rovela/sdk/emails'
99
+ *
100
+ * await sendOrderDelivered({
101
+ * to: 'john@example.com',
102
+ * customerName: 'John',
103
+ * orderNumber: 'ORD-12345',
104
+ * deliveryDate: 'December 3, 2025',
105
+ * deliveryLocation: 'Front Door',
106
+ * reviewUrl: 'https://store.com/review/12345',
107
+ * returnCenterUrl: 'https://store.com/returns',
108
+ * })
109
+ * ```
110
+ */
111
+ export declare function sendOrderDelivered(params: SendOrderDeliveredParams): Promise<SendEmailResult>;
112
+ /**
113
+ * Send order delivered without waiting (fire-and-forget).
114
+ */
115
+ export declare function sendOrderDeliveredAsync(params: SendOrderDeliveredParams): void;
116
+ export interface SendOrderCancelledParams {
117
+ to: string;
118
+ customerName: string;
119
+ orderNumber: string;
120
+ cancellationReason?: string;
121
+ cancellationDate: string;
122
+ refundMessage: string;
123
+ }
124
+ /**
125
+ * Send an order cancelled email.
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * import { sendOrderCancelled } from '@rovela/sdk/emails'
130
+ *
131
+ * await sendOrderCancelled({
132
+ * to: 'john@example.com',
133
+ * customerName: 'John',
134
+ * orderNumber: 'ORD-12345',
135
+ * cancellationReason: 'Customer requested cancellation.',
136
+ * cancellationDate: 'November 28, 2025',
137
+ * refundMessage: 'Your refund will be processed within 3-5 business days.',
138
+ * })
139
+ * ```
140
+ */
141
+ export declare function sendOrderCancelled(params: SendOrderCancelledParams): Promise<SendEmailResult>;
142
+ /**
143
+ * Send order cancelled without waiting (fire-and-forget).
144
+ */
145
+ export declare function sendOrderCancelledAsync(params: SendOrderCancelledParams): void;
146
+ export interface SendRefundProcessedParams {
147
+ to: string;
148
+ customerName: string;
149
+ orderNumber: string;
150
+ refundAmount: string;
151
+ refundDate: string;
152
+ paymentMethod: string;
153
+ estimatedArrival: string;
154
+ businessDays: string;
155
+ }
156
+ /**
157
+ * Send a refund processed email.
158
+ *
159
+ * @example
160
+ * ```typescript
161
+ * import { sendRefundProcessed } from '@rovela/sdk/emails'
162
+ *
163
+ * await sendRefundProcessed({
164
+ * to: 'john@example.com',
165
+ * customerName: 'John',
166
+ * orderNumber: 'ORD-12345',
167
+ * refundAmount: '$99.00',
168
+ * refundDate: 'November 28, 2025',
169
+ * paymentMethod: 'Visa ending in 4242',
170
+ * estimatedArrival: '3-5 business days',
171
+ * businessDays: '3-5',
172
+ * })
173
+ * ```
174
+ */
175
+ export declare function sendRefundProcessed(params: SendRefundProcessedParams): Promise<SendEmailResult>;
176
+ /**
177
+ * Send refund processed without waiting (fire-and-forget).
178
+ */
179
+ export declare function sendRefundProcessedAsync(params: SendRefundProcessedParams): void;
180
+ //# sourceMappingURL=orders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orders.d.ts","sourceRoot":"","sources":["../../../src/emails/send/orders.ts"],"names":[],"mappings":"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"}