@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.
- package/dist/admin/hooks/useAdminAuth.d.ts.map +1 -1
- package/dist/admin/hooks/useAdminAuth.js +4 -1
- package/dist/admin/hooks/useAdminAuth.js.map +1 -1
- package/dist/auth/hooks/useAuth.d.ts.map +1 -1
- package/dist/auth/hooks/useAuth.js +8 -2
- package/dist/auth/hooks/useAuth.js.map +1 -1
- package/package.json +1 -1
- package/dist/admin/api/auth.d.ts +0 -32
- package/dist/admin/api/auth.d.ts.map +0 -1
- package/dist/admin/api/auth.js +0 -43
- package/dist/admin/api/auth.js.map +0 -1
- package/dist/admin/api/categories.d.ts +0 -68
- package/dist/admin/api/categories.d.ts.map +0 -1
- package/dist/admin/api/categories.js +0 -247
- package/dist/admin/api/categories.js.map +0 -1
- package/dist/admin/api/customers.d.ts +0 -41
- package/dist/admin/api/customers.d.ts.map +0 -1
- package/dist/admin/api/customers.js +0 -113
- package/dist/admin/api/customers.js.map +0 -1
- package/dist/admin/api/index.d.ts +0 -56
- package/dist/admin/api/index.d.ts.map +0 -1
- package/dist/admin/api/index.js +0 -87
- package/dist/admin/api/index.js.map +0 -1
- package/dist/admin/api/orders.d.ts +0 -59
- package/dist/admin/api/orders.d.ts.map +0 -1
- package/dist/admin/api/orders.js +0 -209
- package/dist/admin/api/orders.js.map +0 -1
- package/dist/admin/api/products.d.ts +0 -103
- package/dist/admin/api/products.d.ts.map +0 -1
- package/dist/admin/api/products.js +0 -329
- package/dist/admin/api/products.js.map +0 -1
- package/dist/admin/api/refund.d.ts +0 -29
- package/dist/admin/api/refund.d.ts.map +0 -1
- package/dist/admin/api/refund.js +0 -136
- package/dist/admin/api/refund.js.map +0 -1
- package/dist/admin/api/stats.d.ts +0 -40
- package/dist/admin/api/stats.d.ts.map +0 -1
- package/dist/admin/api/stats.js +0 -74
- package/dist/admin/api/stats.js.map +0 -1
- package/dist/admin/components/AdminGuard.d.ts +0 -40
- package/dist/admin/components/AdminGuard.d.ts.map +0 -1
- package/dist/admin/components/AdminGuard.js +0 -97
- package/dist/admin/components/AdminGuard.js.map +0 -1
- package/dist/admin/components/AdminHeader.d.ts +0 -18
- package/dist/admin/components/AdminHeader.d.ts.map +0 -1
- package/dist/admin/components/AdminHeader.js +0 -33
- package/dist/admin/components/AdminHeader.js.map +0 -1
- package/dist/admin/components/AdminLayout.d.ts +0 -50
- package/dist/admin/components/AdminLayout.d.ts.map +0 -1
- package/dist/admin/components/AdminLayout.js +0 -46
- package/dist/admin/components/AdminLayout.js.map +0 -1
- package/dist/admin/components/AdminLoginForm.d.ts +0 -18
- package/dist/admin/components/AdminLoginForm.d.ts.map +0 -1
- package/dist/admin/components/AdminLoginForm.js +0 -58
- package/dist/admin/components/AdminLoginForm.js.map +0 -1
- package/dist/admin/components/AdminNav.d.ts +0 -34
- package/dist/admin/components/AdminNav.d.ts.map +0 -1
- package/dist/admin/components/AdminNav.js +0 -61
- package/dist/admin/components/AdminNav.js.map +0 -1
- package/dist/admin/components/InventoryEditor.d.ts +0 -15
- package/dist/admin/components/InventoryEditor.d.ts.map +0 -1
- package/dist/admin/components/InventoryEditor.js +0 -83
- package/dist/admin/components/InventoryEditor.js.map +0 -1
- package/dist/admin/components/LowStockAlert.d.ts +0 -11
- package/dist/admin/components/LowStockAlert.d.ts.map +0 -1
- package/dist/admin/components/LowStockAlert.js +0 -35
- package/dist/admin/components/LowStockAlert.js.map +0 -1
- package/dist/admin/components/OrderDetails.d.ts +0 -14
- package/dist/admin/components/OrderDetails.d.ts.map +0 -1
- package/dist/admin/components/OrderDetails.js +0 -94
- package/dist/admin/components/OrderDetails.js.map +0 -1
- package/dist/admin/components/OrderTable.d.ts +0 -13
- package/dist/admin/components/OrderTable.d.ts.map +0 -1
- package/dist/admin/components/OrderTable.js +0 -89
- package/dist/admin/components/OrderTable.js.map +0 -1
- package/dist/admin/components/ProductForm.d.ts +0 -18
- package/dist/admin/components/ProductForm.d.ts.map +0 -1
- package/dist/admin/components/ProductForm.js +0 -127
- package/dist/admin/components/ProductForm.js.map +0 -1
- package/dist/admin/components/ProductTable.d.ts +0 -13
- package/dist/admin/components/ProductTable.d.ts.map +0 -1
- package/dist/admin/components/ProductTable.js +0 -81
- package/dist/admin/components/ProductTable.js.map +0 -1
- package/dist/admin/components/RecentOrders.d.ts +0 -11
- package/dist/admin/components/RecentOrders.d.ts.map +0 -1
- package/dist/admin/components/RecentOrders.js +0 -58
- package/dist/admin/components/RecentOrders.js.map +0 -1
- package/dist/admin/components/RefundDialog.d.ts +0 -17
- package/dist/admin/components/RefundDialog.d.ts.map +0 -1
- package/dist/admin/components/RefundDialog.js +0 -86
- package/dist/admin/components/RefundDialog.js.map +0 -1
- package/dist/admin/components/StatsCards.d.ts +0 -23
- package/dist/admin/components/StatsCards.d.ts.map +0 -1
- package/dist/admin/components/StatsCards.js +0 -82
- package/dist/admin/components/StatsCards.js.map +0 -1
- package/dist/admin/components/StoreSettings.d.ts +0 -14
- package/dist/admin/components/StoreSettings.d.ts.map +0 -1
- package/dist/admin/components/StoreSettings.js +0 -88
- package/dist/admin/components/StoreSettings.js.map +0 -1
- package/dist/admin/components/index.d.ts +0 -21
- package/dist/admin/components/index.d.ts.map +0 -1
- package/dist/admin/components/index.js +0 -57
- package/dist/admin/components/index.js.map +0 -1
- package/dist/admin/config.d.ts +0 -74
- package/dist/admin/config.d.ts.map +0 -1
- package/dist/admin/config.js +0 -229
- package/dist/admin/config.js.map +0 -1
- package/dist/admin/hooks/index.d.ts +0 -10
- package/dist/admin/hooks/index.d.ts.map +0 -1
- package/dist/admin/hooks/index.js +0 -17
- package/dist/admin/hooks/index.js.map +0 -1
- package/dist/admin/hooks/useAdminOrders.d.ts +0 -41
- package/dist/admin/hooks/useAdminOrders.d.ts.map +0 -1
- package/dist/admin/hooks/useAdminOrders.js +0 -191
- package/dist/admin/hooks/useAdminOrders.js.map +0 -1
- package/dist/admin/hooks/useAdminProducts.d.ts +0 -39
- package/dist/admin/hooks/useAdminProducts.d.ts.map +0 -1
- package/dist/admin/hooks/useAdminProducts.js +0 -235
- package/dist/admin/hooks/useAdminProducts.js.map +0 -1
- package/dist/admin/hooks/useAdminStats.d.ts +0 -50
- package/dist/admin/hooks/useAdminStats.d.ts.map +0 -1
- package/dist/admin/hooks/useAdminStats.js +0 -111
- package/dist/admin/hooks/useAdminStats.js.map +0 -1
- package/dist/admin/index.d.ts +0 -63
- package/dist/admin/index.d.ts.map +0 -1
- package/dist/admin/index.js +0 -148
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/server/admin-service.d.ts +0 -130
- package/dist/admin/server/admin-service.d.ts.map +0 -1
- package/dist/admin/server/admin-service.js +0 -298
- package/dist/admin/server/admin-service.js.map +0 -1
- package/dist/admin/server/index.d.ts +0 -8
- package/dist/admin/server/index.d.ts.map +0 -1
- package/dist/admin/server/index.js +0 -25
- package/dist/admin/server/index.js.map +0 -1
- package/dist/admin/types.d.ts +0 -549
- package/dist/admin/types.d.ts.map +0 -1
- package/dist/admin/types.js +0 -11
- package/dist/admin/types.js.map +0 -1
- package/dist/auth/api/auth.d.ts +0 -54
- package/dist/auth/api/auth.d.ts.map +0 -1
- package/dist/auth/api/auth.js +0 -67
- package/dist/auth/api/auth.js.map +0 -1
- package/dist/auth/api/forgot-password.d.ts +0 -41
- package/dist/auth/api/forgot-password.d.ts.map +0 -1
- package/dist/auth/api/forgot-password.js +0 -68
- package/dist/auth/api/forgot-password.js.map +0 -1
- package/dist/auth/api/index.d.ts +0 -34
- package/dist/auth/api/index.d.ts.map +0 -1
- package/dist/auth/api/index.js +0 -52
- package/dist/auth/api/index.js.map +0 -1
- package/dist/auth/api/register.d.ts +0 -41
- package/dist/auth/api/register.d.ts.map +0 -1
- package/dist/auth/api/register.js +0 -93
- package/dist/auth/api/register.js.map +0 -1
- package/dist/auth/api/resend-verification.d.ts +0 -41
- package/dist/auth/api/resend-verification.d.ts.map +0 -1
- package/dist/auth/api/resend-verification.js +0 -71
- package/dist/auth/api/resend-verification.js.map +0 -1
- package/dist/auth/api/reset-password.d.ts +0 -67
- package/dist/auth/api/reset-password.d.ts.map +0 -1
- package/dist/auth/api/reset-password.js +0 -110
- package/dist/auth/api/reset-password.js.map +0 -1
- package/dist/auth/api/verify-email.d.ts +0 -47
- package/dist/auth/api/verify-email.d.ts.map +0 -1
- package/dist/auth/api/verify-email.js +0 -94
- package/dist/auth/api/verify-email.js.map +0 -1
- package/dist/auth/components/AuthGuard.d.ts +0 -52
- package/dist/auth/components/AuthGuard.d.ts.map +0 -1
- package/dist/auth/components/AuthGuard.js +0 -113
- package/dist/auth/components/AuthGuard.js.map +0 -1
- package/dist/auth/components/ForgotPasswordForm.d.ts +0 -15
- package/dist/auth/components/ForgotPasswordForm.d.ts.map +0 -1
- package/dist/auth/components/ForgotPasswordForm.js +0 -44
- package/dist/auth/components/ForgotPasswordForm.js.map +0 -1
- package/dist/auth/components/ResetPasswordForm.d.ts +0 -18
- package/dist/auth/components/ResetPasswordForm.d.ts.map +0 -1
- package/dist/auth/components/ResetPasswordForm.js +0 -88
- package/dist/auth/components/ResetPasswordForm.js.map +0 -1
- package/dist/auth/components/SignInForm.d.ts +0 -21
- package/dist/auth/components/SignInForm.d.ts.map +0 -1
- package/dist/auth/components/SignInForm.js +0 -63
- package/dist/auth/components/SignInForm.js.map +0 -1
- package/dist/auth/components/SignUpForm.d.ts +0 -18
- package/dist/auth/components/SignUpForm.d.ts.map +0 -1
- package/dist/auth/components/SignUpForm.js +0 -79
- package/dist/auth/components/SignUpForm.js.map +0 -1
- package/dist/auth/components/UserMenu.d.ts +0 -18
- package/dist/auth/components/UserMenu.d.ts.map +0 -1
- package/dist/auth/components/UserMenu.js +0 -75
- package/dist/auth/components/UserMenu.js.map +0 -1
- package/dist/auth/components/VerifyEmailNotice.d.ts +0 -20
- package/dist/auth/components/VerifyEmailNotice.d.ts.map +0 -1
- package/dist/auth/components/VerifyEmailNotice.js +0 -59
- package/dist/auth/components/VerifyEmailNotice.js.map +0 -1
- package/dist/auth/components/index.d.ts +0 -13
- package/dist/auth/components/index.d.ts.map +0 -1
- package/dist/auth/components/index.js +0 -24
- package/dist/auth/components/index.js.map +0 -1
- package/dist/auth/config.d.ts +0 -42
- package/dist/auth/config.d.ts.map +0 -1
- package/dist/auth/config.js +0 -174
- package/dist/auth/config.js.map +0 -1
- package/dist/auth/hooks/index.d.ts +0 -7
- package/dist/auth/hooks/index.d.ts.map +0 -1
- package/dist/auth/hooks/index.js +0 -11
- package/dist/auth/hooks/index.js.map +0 -1
- package/dist/auth/index.d.ts +0 -54
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -88
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/server/customer-service.d.ts +0 -138
- package/dist/auth/server/customer-service.d.ts.map +0 -1
- package/dist/auth/server/customer-service.js +0 -309
- package/dist/auth/server/customer-service.js.map +0 -1
- package/dist/auth/server/email-sender.d.ts +0 -64
- package/dist/auth/server/email-sender.d.ts.map +0 -1
- package/dist/auth/server/email-sender.js +0 -112
- package/dist/auth/server/email-sender.js.map +0 -1
- package/dist/auth/server/index.d.ts +0 -13
- package/dist/auth/server/index.d.ts.map +0 -1
- package/dist/auth/server/index.js +0 -48
- package/dist/auth/server/index.js.map +0 -1
- package/dist/auth/server/password-reset-service.d.ts +0 -86
- package/dist/auth/server/password-reset-service.d.ts.map +0 -1
- package/dist/auth/server/password-reset-service.js +0 -236
- package/dist/auth/server/password-reset-service.js.map +0 -1
- package/dist/auth/server/password.d.ts +0 -58
- package/dist/auth/server/password.d.ts.map +0 -1
- package/dist/auth/server/password.js +0 -94
- package/dist/auth/server/password.js.map +0 -1
- package/dist/auth/server/verification-service.d.ts +0 -87
- package/dist/auth/server/verification-service.d.ts.map +0 -1
- package/dist/auth/server/verification-service.js +0 -268
- package/dist/auth/server/verification-service.js.map +0 -1
- package/dist/auth/types.d.ts +0 -305
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js +0 -8
- package/dist/auth/types.js.map +0 -1
- package/dist/cart/CartProvider.d.ts +0 -65
- package/dist/cart/CartProvider.d.ts.map +0 -1
- package/dist/cart/CartProvider.js +0 -101
- package/dist/cart/CartProvider.js.map +0 -1
- package/dist/cart/components/AddToCartButton.d.ts +0 -77
- package/dist/cart/components/AddToCartButton.d.ts.map +0 -1
- package/dist/cart/components/AddToCartButton.js +0 -124
- package/dist/cart/components/AddToCartButton.js.map +0 -1
- package/dist/cart/components/CartDrawer.d.ts +0 -71
- package/dist/cart/components/CartDrawer.d.ts.map +0 -1
- package/dist/cart/components/CartDrawer.js +0 -108
- package/dist/cart/components/CartDrawer.js.map +0 -1
- package/dist/cart/components/CartIcon.d.ts +0 -36
- package/dist/cart/components/CartIcon.d.ts.map +0 -1
- package/dist/cart/components/CartIcon.js +0 -70
- package/dist/cart/components/CartIcon.js.map +0 -1
- package/dist/cart/components/CartItem.d.ts +0 -52
- package/dist/cart/components/CartItem.d.ts.map +0 -1
- package/dist/cart/components/CartItem.js +0 -55
- package/dist/cart/components/CartItem.js.map +0 -1
- package/dist/cart/components/CartSummary.d.ts +0 -43
- package/dist/cart/components/CartSummary.d.ts.map +0 -1
- package/dist/cart/components/CartSummary.js +0 -58
- package/dist/cart/components/CartSummary.js.map +0 -1
- package/dist/cart/components/QuantitySelector.d.ts +0 -39
- package/dist/cart/components/QuantitySelector.d.ts.map +0 -1
- package/dist/cart/components/QuantitySelector.js +0 -87
- package/dist/cart/components/QuantitySelector.js.map +0 -1
- package/dist/cart/components/index.d.ts +0 -18
- package/dist/cart/components/index.d.ts.map +0 -1
- package/dist/cart/components/index.js +0 -21
- package/dist/cart/components/index.js.map +0 -1
- package/dist/cart/index.d.ts +0 -109
- package/dist/cart/index.d.ts.map +0 -1
- package/dist/cart/index.js +0 -129
- package/dist/cart/index.js.map +0 -1
- package/dist/cart/store.d.ts +0 -101
- package/dist/cart/store.d.ts.map +0 -1
- package/dist/cart/store.js +0 -207
- package/dist/cart/store.js.map +0 -1
- package/dist/checkout/api/checkout.d.ts +0 -31
- package/dist/checkout/api/checkout.d.ts.map +0 -1
- package/dist/checkout/api/checkout.js +0 -103
- package/dist/checkout/api/checkout.js.map +0 -1
- package/dist/checkout/api/index.d.ts +0 -8
- package/dist/checkout/api/index.d.ts.map +0 -1
- package/dist/checkout/api/index.js +0 -13
- package/dist/checkout/api/index.js.map +0 -1
- package/dist/checkout/api/webhook.d.ts +0 -30
- package/dist/checkout/api/webhook.d.ts.map +0 -1
- package/dist/checkout/api/webhook.js +0 -58
- package/dist/checkout/api/webhook.js.map +0 -1
- package/dist/checkout/components/CheckoutButton.d.ts +0 -44
- package/dist/checkout/components/CheckoutButton.d.ts.map +0 -1
- package/dist/checkout/components/CheckoutButton.js +0 -97
- package/dist/checkout/components/CheckoutButton.js.map +0 -1
- package/dist/checkout/components/CheckoutSuccess.d.ts +0 -29
- package/dist/checkout/components/CheckoutSuccess.d.ts.map +0 -1
- package/dist/checkout/components/CheckoutSuccess.js +0 -60
- package/dist/checkout/components/CheckoutSuccess.js.map +0 -1
- package/dist/checkout/components/OrderSummary.d.ts +0 -37
- package/dist/checkout/components/OrderSummary.d.ts.map +0 -1
- package/dist/checkout/components/OrderSummary.js +0 -70
- package/dist/checkout/components/OrderSummary.js.map +0 -1
- package/dist/checkout/components/ShippingForm.d.ts +0 -30
- package/dist/checkout/components/ShippingForm.d.ts.map +0 -1
- package/dist/checkout/components/ShippingForm.js +0 -125
- package/dist/checkout/components/ShippingForm.js.map +0 -1
- package/dist/checkout/components/index.d.ts +0 -10
- package/dist/checkout/components/index.d.ts.map +0 -1
- package/dist/checkout/components/index.js +0 -17
- package/dist/checkout/components/index.js.map +0 -1
- package/dist/checkout/hooks/index.d.ts +0 -7
- package/dist/checkout/hooks/index.d.ts.map +0 -1
- package/dist/checkout/hooks/index.js +0 -12
- package/dist/checkout/hooks/index.js.map +0 -1
- package/dist/checkout/hooks/useCheckout.d.ts +0 -61
- package/dist/checkout/hooks/useCheckout.d.ts.map +0 -1
- package/dist/checkout/hooks/useCheckout.js +0 -174
- package/dist/checkout/hooks/useCheckout.js.map +0 -1
- package/dist/checkout/index.d.ts +0 -111
- package/dist/checkout/index.d.ts.map +0 -1
- package/dist/checkout/index.js +0 -148
- package/dist/checkout/index.js.map +0 -1
- package/dist/checkout/server/create-checkout-session.d.ts +0 -69
- package/dist/checkout/server/create-checkout-session.d.ts.map +0 -1
- package/dist/checkout/server/create-checkout-session.js +0 -190
- package/dist/checkout/server/create-checkout-session.js.map +0 -1
- package/dist/checkout/server/handle-webhook.d.ts +0 -35
- package/dist/checkout/server/handle-webhook.d.ts.map +0 -1
- package/dist/checkout/server/handle-webhook.js +0 -279
- package/dist/checkout/server/handle-webhook.js.map +0 -1
- package/dist/checkout/server/index.d.ts +0 -10
- package/dist/checkout/server/index.d.ts.map +0 -1
- package/dist/checkout/server/index.js +0 -19
- package/dist/checkout/server/index.js.map +0 -1
- package/dist/checkout/server/order-service.d.ts +0 -43
- package/dist/checkout/server/order-service.d.ts.map +0 -1
- package/dist/checkout/server/order-service.js +0 -196
- package/dist/checkout/server/order-service.js.map +0 -1
- package/dist/checkout/stripe/client.d.ts +0 -72
- package/dist/checkout/stripe/client.d.ts.map +0 -1
- package/dist/checkout/stripe/client.js +0 -189
- package/dist/checkout/stripe/client.js.map +0 -1
- package/dist/checkout/stripe/index.d.ts +0 -7
- package/dist/checkout/stripe/index.d.ts.map +0 -1
- package/dist/checkout/stripe/index.js +0 -21
- package/dist/checkout/stripe/index.js.map +0 -1
- package/dist/checkout/types.d.ts +0 -263
- package/dist/checkout/types.d.ts.map +0 -1
- package/dist/checkout/types.js +0 -9
- package/dist/checkout/types.js.map +0 -1
- package/dist/core/config.d.ts +0 -296
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js +0 -162
- package/dist/core/config.js.map +0 -1
- package/dist/core/db/client.d.ts +0 -69
- package/dist/core/db/client.d.ts.map +0 -1
- package/dist/core/db/client.js +0 -202
- package/dist/core/db/client.js.map +0 -1
- package/dist/core/db/index.d.ts +0 -11
- package/dist/core/db/index.d.ts.map +0 -1
- package/dist/core/db/index.js +0 -87
- package/dist/core/db/index.js.map +0 -1
- package/dist/core/db/queries.d.ts +0 -658
- package/dist/core/db/queries.d.ts.map +0 -1
- package/dist/core/db/queries.js +0 -735
- package/dist/core/db/queries.js.map +0 -1
- package/dist/core/db/schema.d.ts +0 -1628
- package/dist/core/db/schema.d.ts.map +0 -1
- package/dist/core/db/schema.js +0 -262
- package/dist/core/db/schema.js.map +0 -1
- package/dist/core/index.d.ts +0 -20
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -71
- package/dist/core/index.js.map +0 -1
- package/dist/core/server/index.d.ts +0 -17
- package/dist/core/server/index.d.ts.map +0 -1
- package/dist/core/server/index.js +0 -68
- package/dist/core/server/index.js.map +0 -1
- package/dist/core/types.d.ts +0 -230
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -9
- package/dist/core/types.js.map +0 -1
- package/dist/core/utils.d.ts +0 -153
- package/dist/core/utils.d.ts.map +0 -1
- package/dist/core/utils.js +0 -356
- package/dist/core/utils.js.map +0 -1
- package/dist/emails/config.d.ts +0 -42
- package/dist/emails/config.d.ts.map +0 -1
- package/dist/emails/config.js +0 -89
- package/dist/emails/config.js.map +0 -1
- package/dist/emails/index.d.ts +0 -85
- package/dist/emails/index.d.ts.map +0 -1
- package/dist/emails/index.js +0 -170
- package/dist/emails/index.js.map +0 -1
- package/dist/emails/send/auth.d.ts +0 -91
- package/dist/emails/send/auth.d.ts.map +0 -1
- package/dist/emails/send/auth.js +0 -132
- package/dist/emails/send/auth.js.map +0 -1
- package/dist/emails/send/index.d.ts +0 -10
- package/dist/emails/send/index.d.ts.map +0 -1
- package/dist/emails/send/index.js +0 -33
- package/dist/emails/send/index.js.map +0 -1
- package/dist/emails/send/orders.d.ts +0 -180
- package/dist/emails/send/orders.d.ts.map +0 -1
- package/dist/emails/send/orders.js +0 -259
- package/dist/emails/send/orders.js.map +0 -1
- package/dist/emails/sender.d.ts +0 -72
- package/dist/emails/sender.d.ts.map +0 -1
- package/dist/emails/sender.js +0 -118
- package/dist/emails/sender.js.map +0 -1
- package/dist/emails/templates/base.d.ts +0 -105
- package/dist/emails/templates/base.d.ts.map +0 -1
- package/dist/emails/templates/base.js +0 -291
- package/dist/emails/templates/base.js.map +0 -1
- package/dist/emails/templates/email-verification.d.ts +0 -28
- package/dist/emails/templates/email-verification.d.ts.map +0 -1
- package/dist/emails/templates/email-verification.js +0 -56
- package/dist/emails/templates/email-verification.js.map +0 -1
- package/dist/emails/templates/index.d.ts +0 -15
- package/dist/emails/templates/index.d.ts.map +0 -1
- package/dist/emails/templates/index.js +0 -58
- package/dist/emails/templates/index.js.map +0 -1
- package/dist/emails/templates/order-cancelled.d.ts +0 -30
- package/dist/emails/templates/order-cancelled.d.ts.map +0 -1
- package/dist/emails/templates/order-cancelled.js +0 -87
- package/dist/emails/templates/order-cancelled.js.map +0 -1
- package/dist/emails/templates/order-confirmation.d.ts +0 -36
- package/dist/emails/templates/order-confirmation.d.ts.map +0 -1
- package/dist/emails/templates/order-confirmation.js +0 -161
- package/dist/emails/templates/order-confirmation.js.map +0 -1
- package/dist/emails/templates/order-delivered.d.ts +0 -31
- package/dist/emails/templates/order-delivered.d.ts.map +0 -1
- package/dist/emails/templates/order-delivered.js +0 -95
- package/dist/emails/templates/order-delivered.js.map +0 -1
- package/dist/emails/templates/order-shipped.d.ts +0 -32
- package/dist/emails/templates/order-shipped.d.ts.map +0 -1
- package/dist/emails/templates/order-shipped.js +0 -87
- package/dist/emails/templates/order-shipped.js.map +0 -1
- package/dist/emails/templates/password-reset.d.ts +0 -27
- package/dist/emails/templates/password-reset.d.ts.map +0 -1
- package/dist/emails/templates/password-reset.js +0 -55
- package/dist/emails/templates/password-reset.js.map +0 -1
- package/dist/emails/templates/refund-processed.d.ts +0 -32
- package/dist/emails/templates/refund-processed.d.ts.map +0 -1
- package/dist/emails/templates/refund-processed.js +0 -96
- package/dist/emails/templates/refund-processed.js.map +0 -1
- package/dist/emails/templates/welcome.d.ts +0 -27
- package/dist/emails/templates/welcome.d.ts.map +0 -1
- package/dist/emails/templates/welcome.js +0 -56
- package/dist/emails/templates/welcome.js.map +0 -1
- package/dist/emails/types.d.ts +0 -202
- package/dist/emails/types.d.ts.map +0 -1
- package/dist/emails/types.js +0 -8
- package/dist/emails/types.js.map +0 -1
- package/dist/emails/utils.d.ts +0 -94
- package/dist/emails/utils.d.ts.map +0 -1
- package/dist/emails/utils.js +0 -229
- package/dist/emails/utils.js.map +0 -1
- package/dist/index.d.ts +0 -40
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -225
- package/dist/index.js.map +0 -1
- package/dist/products/api/categories.d.ts +0 -29
- package/dist/products/api/categories.d.ts.map +0 -1
- package/dist/products/api/categories.js +0 -49
- package/dist/products/api/categories.js.map +0 -1
- package/dist/products/api/index.d.ts +0 -24
- package/dist/products/api/index.d.ts.map +0 -1
- package/dist/products/api/index.js +0 -30
- package/dist/products/api/index.js.map +0 -1
- package/dist/products/api/product.d.ts +0 -36
- package/dist/products/api/product.d.ts.map +0 -1
- package/dist/products/api/product.js +0 -70
- package/dist/products/api/product.js.map +0 -1
- package/dist/products/api/products.d.ts +0 -41
- package/dist/products/api/products.d.ts.map +0 -1
- package/dist/products/api/products.js +0 -102
- package/dist/products/api/products.js.map +0 -1
- package/dist/products/components/CategoryNav.d.ts +0 -51
- package/dist/products/components/CategoryNav.d.ts.map +0 -1
- package/dist/products/components/CategoryNav.js +0 -115
- package/dist/products/components/CategoryNav.js.map +0 -1
- package/dist/products/components/ProductBreadcrumb.d.ts +0 -52
- package/dist/products/components/ProductBreadcrumb.d.ts.map +0 -1
- package/dist/products/components/ProductBreadcrumb.js +0 -78
- package/dist/products/components/ProductBreadcrumb.js.map +0 -1
- package/dist/products/components/ProductCard.d.ts +0 -54
- package/dist/products/components/ProductCard.d.ts.map +0 -1
- package/dist/products/components/ProductCard.js +0 -65
- package/dist/products/components/ProductCard.js.map +0 -1
- package/dist/products/components/ProductDetails.d.ts +0 -63
- package/dist/products/components/ProductDetails.d.ts.map +0 -1
- package/dist/products/components/ProductDetails.js +0 -105
- package/dist/products/components/ProductDetails.js.map +0 -1
- package/dist/products/components/ProductFilters.d.ts +0 -70
- package/dist/products/components/ProductFilters.d.ts.map +0 -1
- package/dist/products/components/ProductFilters.js +0 -127
- package/dist/products/components/ProductFilters.js.map +0 -1
- package/dist/products/components/ProductGallery.d.ts +0 -37
- package/dist/products/components/ProductGallery.d.ts.map +0 -1
- package/dist/products/components/ProductGallery.js +0 -80
- package/dist/products/components/ProductGallery.js.map +0 -1
- package/dist/products/components/ProductGrid.d.ts +0 -50
- package/dist/products/components/ProductGrid.d.ts.map +0 -1
- package/dist/products/components/ProductGrid.js +0 -83
- package/dist/products/components/ProductGrid.js.map +0 -1
- package/dist/products/components/ProductSearch.d.ts +0 -43
- package/dist/products/components/ProductSearch.d.ts.map +0 -1
- package/dist/products/components/ProductSearch.js +0 -99
- package/dist/products/components/ProductSearch.js.map +0 -1
- package/dist/products/components/ProductSort.d.ts +0 -43
- package/dist/products/components/ProductSort.d.ts.map +0 -1
- package/dist/products/components/ProductSort.js +0 -61
- package/dist/products/components/ProductSort.js.map +0 -1
- package/dist/products/components/VariantSelector.d.ts +0 -43
- package/dist/products/components/VariantSelector.d.ts.map +0 -1
- package/dist/products/components/VariantSelector.js +0 -147
- package/dist/products/components/VariantSelector.js.map +0 -1
- package/dist/products/components/index.d.ts +0 -26
- package/dist/products/components/index.d.ts.map +0 -1
- package/dist/products/components/index.js +0 -32
- package/dist/products/components/index.js.map +0 -1
- package/dist/products/hooks/index.d.ts +0 -14
- package/dist/products/hooks/index.d.ts.map +0 -1
- package/dist/products/hooks/index.js +0 -17
- package/dist/products/hooks/index.js.map +0 -1
- package/dist/products/hooks/useCategories.d.ts +0 -56
- package/dist/products/hooks/useCategories.d.ts.map +0 -1
- package/dist/products/hooks/useCategories.js +0 -126
- package/dist/products/hooks/useCategories.js.map +0 -1
- package/dist/products/hooks/useProduct.d.ts +0 -44
- package/dist/products/hooks/useProduct.d.ts.map +0 -1
- package/dist/products/hooks/useProduct.js +0 -86
- package/dist/products/hooks/useProduct.js.map +0 -1
- package/dist/products/hooks/useProductAttributes.d.ts +0 -59
- package/dist/products/hooks/useProductAttributes.d.ts.map +0 -1
- package/dist/products/hooks/useProductAttributes.js +0 -148
- package/dist/products/hooks/useProductAttributes.js.map +0 -1
- package/dist/products/hooks/useProducts.d.ts +0 -67
- package/dist/products/hooks/useProducts.d.ts.map +0 -1
- package/dist/products/hooks/useProducts.js +0 -132
- package/dist/products/hooks/useProducts.js.map +0 -1
- package/dist/products/index.d.ts +0 -94
- package/dist/products/index.d.ts.map +0 -1
- package/dist/products/index.js +0 -123
- package/dist/products/index.js.map +0 -1
- package/dist/theme/ThemeProvider.d.ts +0 -70
- package/dist/theme/ThemeProvider.d.ts.map +0 -1
- package/dist/theme/ThemeProvider.js +0 -77
- package/dist/theme/ThemeProvider.js.map +0 -1
- package/dist/theme/colors.d.ts +0 -148
- package/dist/theme/colors.d.ts.map +0 -1
- package/dist/theme/colors.js +0 -219
- package/dist/theme/colors.js.map +0 -1
- package/dist/theme/defaults.d.ts +0 -212
- package/dist/theme/defaults.d.ts.map +0 -1
- package/dist/theme/defaults.js +0 -278
- package/dist/theme/defaults.js.map +0 -1
- package/dist/theme/fonts.d.ts +0 -59
- package/dist/theme/fonts.d.ts.map +0 -1
- package/dist/theme/fonts.js +0 -202
- package/dist/theme/fonts.js.map +0 -1
- package/dist/theme/generator.d.ts +0 -50
- package/dist/theme/generator.d.ts.map +0 -1
- package/dist/theme/generator.js +0 -322
- package/dist/theme/generator.js.map +0 -1
- package/dist/theme/hooks.d.ts +0 -110
- package/dist/theme/hooks.d.ts.map +0 -1
- package/dist/theme/hooks.js +0 -106
- package/dist/theme/hooks.js.map +0 -1
- package/dist/theme/index.d.ts +0 -37
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -85
- package/dist/theme/index.js.map +0 -1
package/dist/core/config.js
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @rovela/sdk/core/config
|
|
4
|
-
*
|
|
5
|
-
* Configuration system for reading blueprint.json at runtime.
|
|
6
|
-
* The blueprint is generated by Rovela and placed at .rovela/blueprint.json
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
-
}) : function(o, v) {
|
|
22
|
-
o["default"] = v;
|
|
23
|
-
});
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.loadBlueprint = loadBlueprint;
|
|
43
|
-
exports.getBlueprint = getBlueprint;
|
|
44
|
-
exports.getStoreConfig = getStoreConfig;
|
|
45
|
-
exports.clearConfigCache = clearConfigCache;
|
|
46
|
-
exports.blueprintExists = blueprintExists;
|
|
47
|
-
exports.getTheme = getTheme;
|
|
48
|
-
exports.getBrand = getBrand;
|
|
49
|
-
exports.getHomepage = getHomepage;
|
|
50
|
-
exports.getModules = getModules;
|
|
51
|
-
exports.getSEO = getSEO;
|
|
52
|
-
const fs = __importStar(require("fs"));
|
|
53
|
-
const path = __importStar(require("path"));
|
|
54
|
-
// =============================================================================
|
|
55
|
-
// Configuration Loading
|
|
56
|
-
// =============================================================================
|
|
57
|
-
let cachedBlueprint = null;
|
|
58
|
-
let cachedConfig = null;
|
|
59
|
-
/**
|
|
60
|
-
* Default blueprint path relative to project root
|
|
61
|
-
*/
|
|
62
|
-
const DEFAULT_BLUEPRINT_PATH = '.rovela/blueprint.json';
|
|
63
|
-
/**
|
|
64
|
-
* Get the blueprint file path, checking environment variable first
|
|
65
|
-
*/
|
|
66
|
-
function getBlueprintPath() {
|
|
67
|
-
return process.env.ROVELA_BLUEPRINT_PATH || path.join(process.cwd(), DEFAULT_BLUEPRINT_PATH);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Load and parse the blueprint.json file
|
|
71
|
-
* @throws Error if blueprint file is not found or invalid
|
|
72
|
-
*/
|
|
73
|
-
function loadBlueprint() {
|
|
74
|
-
if (cachedBlueprint) {
|
|
75
|
-
return cachedBlueprint;
|
|
76
|
-
}
|
|
77
|
-
const blueprintPath = getBlueprintPath();
|
|
78
|
-
if (!fs.existsSync(blueprintPath)) {
|
|
79
|
-
throw new Error(`Blueprint not found at ${blueprintPath}. ` +
|
|
80
|
-
`Make sure .rovela/blueprint.json exists or set ROVELA_BLUEPRINT_PATH environment variable.`);
|
|
81
|
-
}
|
|
82
|
-
try {
|
|
83
|
-
const content = fs.readFileSync(blueprintPath, 'utf-8');
|
|
84
|
-
cachedBlueprint = JSON.parse(content);
|
|
85
|
-
return cachedBlueprint;
|
|
86
|
-
}
|
|
87
|
-
catch (error) {
|
|
88
|
-
throw new Error(`Failed to parse blueprint at ${blueprintPath}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Get the full blueprint object
|
|
93
|
-
* Use this when you need access to all blueprint data (theme, brand, homepage, etc.)
|
|
94
|
-
*/
|
|
95
|
-
function getBlueprint() {
|
|
96
|
-
return loadBlueprint();
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Get simplified store configuration
|
|
100
|
-
* Use this for basic store info (name, currency, locale)
|
|
101
|
-
*/
|
|
102
|
-
function getStoreConfig() {
|
|
103
|
-
if (cachedConfig) {
|
|
104
|
-
return cachedConfig;
|
|
105
|
-
}
|
|
106
|
-
const blueprint = loadBlueprint();
|
|
107
|
-
cachedConfig = {
|
|
108
|
-
name: blueprint.store.name,
|
|
109
|
-
slug: blueprint.store.slug,
|
|
110
|
-
currency: blueprint.store.currency,
|
|
111
|
-
locale: blueprint.store.locale,
|
|
112
|
-
ownerEmail: process.env.STORE_OWNER_EMAIL || '',
|
|
113
|
-
};
|
|
114
|
-
return cachedConfig;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Clear cached blueprint and config (useful for testing or hot reloading)
|
|
118
|
-
*/
|
|
119
|
-
function clearConfigCache() {
|
|
120
|
-
cachedBlueprint = null;
|
|
121
|
-
cachedConfig = null;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Check if blueprint exists at the expected path
|
|
125
|
-
*/
|
|
126
|
-
function blueprintExists() {
|
|
127
|
-
return fs.existsSync(getBlueprintPath());
|
|
128
|
-
}
|
|
129
|
-
// =============================================================================
|
|
130
|
-
// Convenience Accessors
|
|
131
|
-
// =============================================================================
|
|
132
|
-
/**
|
|
133
|
-
* Get theme configuration from blueprint
|
|
134
|
-
*/
|
|
135
|
-
function getTheme() {
|
|
136
|
-
return loadBlueprint().theme;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Get brand configuration from blueprint
|
|
140
|
-
*/
|
|
141
|
-
function getBrand() {
|
|
142
|
-
return loadBlueprint().brand;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Get homepage configuration from blueprint
|
|
146
|
-
*/
|
|
147
|
-
function getHomepage() {
|
|
148
|
-
return loadBlueprint().homepage;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Get module configuration from blueprint
|
|
152
|
-
*/
|
|
153
|
-
function getModules() {
|
|
154
|
-
return loadBlueprint().modules;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Get SEO configuration from blueprint
|
|
158
|
-
*/
|
|
159
|
-
function getSEO() {
|
|
160
|
-
return loadBlueprint().seo;
|
|
161
|
-
}
|
|
162
|
-
//# sourceMappingURL=config.js.map
|
package/dist/core/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"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"}
|
package/dist/core/db/client.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @rovela/sdk/core/db/client
|
|
3
|
-
*
|
|
4
|
-
* Neon serverless database client with Drizzle ORM
|
|
5
|
-
* Includes tenant isolation for multi-tenant e-commerce stores
|
|
6
|
-
*/
|
|
7
|
-
import { NeonQueryFunction } from '@neondatabase/serverless';
|
|
8
|
-
import { NeonHttpDatabase } from 'drizzle-orm/neon-http';
|
|
9
|
-
import * as schema from './schema';
|
|
10
|
-
/**
|
|
11
|
-
* Get the raw Neon SQL client
|
|
12
|
-
* Use this for raw SQL queries when needed
|
|
13
|
-
*/
|
|
14
|
-
export declare function getSql(): NeonQueryFunction<false, false>;
|
|
15
|
-
/**
|
|
16
|
-
* Get the Drizzle ORM database client with full schema
|
|
17
|
-
* This is the main entry point for database operations
|
|
18
|
-
*/
|
|
19
|
-
export declare function getDb(): NeonHttpDatabase<typeof schema>;
|
|
20
|
-
/**
|
|
21
|
-
* Main database client export
|
|
22
|
-
* Usage: import { db } from '@rovela/sdk/core'
|
|
23
|
-
*
|
|
24
|
-
* Note: This is a lazy-loaded proxy to avoid connection at import time
|
|
25
|
-
*/
|
|
26
|
-
export declare const db: NeonHttpDatabase<typeof schema>;
|
|
27
|
-
/**
|
|
28
|
-
* Set the current tenant ID for the request
|
|
29
|
-
* All queries using withTenant() will be scoped to this tenant
|
|
30
|
-
*/
|
|
31
|
-
export declare function setTenantId(tenantId: string): void;
|
|
32
|
-
/**
|
|
33
|
-
* Get the current tenant ID
|
|
34
|
-
* @throws Error if tenant ID is not set
|
|
35
|
-
*/
|
|
36
|
-
export declare function getTenantId(): string;
|
|
37
|
-
/**
|
|
38
|
-
* Clear the tenant context (call at end of request)
|
|
39
|
-
*/
|
|
40
|
-
export declare function clearTenantId(): void;
|
|
41
|
-
/**
|
|
42
|
-
* Initialize tenant from environment variable
|
|
43
|
-
* Useful for single-tenant deployments
|
|
44
|
-
*/
|
|
45
|
-
export declare function initTenantFromEnv(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Execute a function with a specific tenant context
|
|
48
|
-
* Automatically clears tenant after execution
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* const products = await withTenant(tenantId, async () => {
|
|
52
|
-
* return db.query.products.findMany()
|
|
53
|
-
* })
|
|
54
|
-
*/
|
|
55
|
-
export declare function withTenant<T>(tenantId: string, fn: () => Promise<T>): Promise<T>;
|
|
56
|
-
/**
|
|
57
|
-
* Check database connection health
|
|
58
|
-
* Returns true if connection is successful
|
|
59
|
-
*/
|
|
60
|
-
export declare function checkConnection(): Promise<boolean>;
|
|
61
|
-
/**
|
|
62
|
-
* Get database connection info (for debugging)
|
|
63
|
-
*/
|
|
64
|
-
export declare function getConnectionInfo(): {
|
|
65
|
-
hasUrl: boolean;
|
|
66
|
-
hasTenant: boolean;
|
|
67
|
-
tenantId: string | null;
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/core/db/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAW,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAyBlC;;;GAGG;AACH,wBAAgB,MAAM,IAAI,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAKxD;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,gBAAgB,CAAC,OAAO,MAAM,CAAC,CAMvD;AAED;;;;;GAKG;AACH,eAAO,MAAM,EAAE,iCAMb,CAAA;AAYF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAQpC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAKxC;AAMD;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAYZ;AAMD;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAQxD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB,CAMA"}
|
package/dist/core/db/client.js
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @rovela/sdk/core/db/client
|
|
4
|
-
*
|
|
5
|
-
* Neon serverless database client with Drizzle ORM
|
|
6
|
-
* Includes tenant isolation for multi-tenant e-commerce stores
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
-
}) : function(o, v) {
|
|
22
|
-
o["default"] = v;
|
|
23
|
-
});
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.db = void 0;
|
|
43
|
-
exports.getSql = getSql;
|
|
44
|
-
exports.getDb = getDb;
|
|
45
|
-
exports.setTenantId = setTenantId;
|
|
46
|
-
exports.getTenantId = getTenantId;
|
|
47
|
-
exports.clearTenantId = clearTenantId;
|
|
48
|
-
exports.initTenantFromEnv = initTenantFromEnv;
|
|
49
|
-
exports.withTenant = withTenant;
|
|
50
|
-
exports.checkConnection = checkConnection;
|
|
51
|
-
exports.getConnectionInfo = getConnectionInfo;
|
|
52
|
-
const serverless_1 = require("@neondatabase/serverless");
|
|
53
|
-
const neon_http_1 = require("drizzle-orm/neon-http");
|
|
54
|
-
const schema = __importStar(require("./schema"));
|
|
55
|
-
// =============================================================================
|
|
56
|
-
// Configuration
|
|
57
|
-
// =============================================================================
|
|
58
|
-
// Get database URL from environment
|
|
59
|
-
function getDatabaseUrl() {
|
|
60
|
-
const url = process.env.DATABASE_URL;
|
|
61
|
-
if (!url) {
|
|
62
|
-
throw new Error('DATABASE_URL environment variable is not set. ' +
|
|
63
|
-
'Please set it to your Neon database connection string.');
|
|
64
|
-
}
|
|
65
|
-
return url;
|
|
66
|
-
}
|
|
67
|
-
// =============================================================================
|
|
68
|
-
// Database Client
|
|
69
|
-
// =============================================================================
|
|
70
|
-
let _sql = null;
|
|
71
|
-
let _db = null;
|
|
72
|
-
/**
|
|
73
|
-
* Get the raw Neon SQL client
|
|
74
|
-
* Use this for raw SQL queries when needed
|
|
75
|
-
*/
|
|
76
|
-
function getSql() {
|
|
77
|
-
if (!_sql) {
|
|
78
|
-
_sql = (0, serverless_1.neon)(getDatabaseUrl());
|
|
79
|
-
}
|
|
80
|
-
return _sql;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Get the Drizzle ORM database client with full schema
|
|
84
|
-
* This is the main entry point for database operations
|
|
85
|
-
*/
|
|
86
|
-
function getDb() {
|
|
87
|
-
if (!_db) {
|
|
88
|
-
const sql = getSql();
|
|
89
|
-
_db = (0, neon_http_1.drizzle)(sql, { schema });
|
|
90
|
-
}
|
|
91
|
-
return _db;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Main database client export
|
|
95
|
-
* Usage: import { db } from '@rovela/sdk/core'
|
|
96
|
-
*
|
|
97
|
-
* Note: This is a lazy-loaded proxy to avoid connection at import time
|
|
98
|
-
*/
|
|
99
|
-
exports.db = new Proxy({}, {
|
|
100
|
-
get(_target, prop) {
|
|
101
|
-
const database = getDb();
|
|
102
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
103
|
-
return database[prop];
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
// =============================================================================
|
|
107
|
-
// Tenant Context
|
|
108
|
-
// =============================================================================
|
|
109
|
-
/**
|
|
110
|
-
* Tenant context for multi-tenant isolation
|
|
111
|
-
* Set this at the start of each request to ensure queries are scoped
|
|
112
|
-
*/
|
|
113
|
-
let currentTenantId = null;
|
|
114
|
-
/**
|
|
115
|
-
* Set the current tenant ID for the request
|
|
116
|
-
* All queries using withTenant() will be scoped to this tenant
|
|
117
|
-
*/
|
|
118
|
-
function setTenantId(tenantId) {
|
|
119
|
-
currentTenantId = tenantId;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Get the current tenant ID
|
|
123
|
-
* @throws Error if tenant ID is not set
|
|
124
|
-
*/
|
|
125
|
-
function getTenantId() {
|
|
126
|
-
if (!currentTenantId) {
|
|
127
|
-
throw new Error('Tenant ID not set. Call setTenantId() at the start of each request, ' +
|
|
128
|
-
'or set TENANT_ID environment variable.');
|
|
129
|
-
}
|
|
130
|
-
return currentTenantId;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Clear the tenant context (call at end of request)
|
|
134
|
-
*/
|
|
135
|
-
function clearTenantId() {
|
|
136
|
-
currentTenantId = null;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Initialize tenant from environment variable
|
|
140
|
-
* Useful for single-tenant deployments
|
|
141
|
-
*/
|
|
142
|
-
function initTenantFromEnv() {
|
|
143
|
-
const envTenantId = process.env.TENANT_ID;
|
|
144
|
-
if (envTenantId) {
|
|
145
|
-
setTenantId(envTenantId);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
// =============================================================================
|
|
149
|
-
// Request Scoped Tenant (for middleware)
|
|
150
|
-
// =============================================================================
|
|
151
|
-
/**
|
|
152
|
-
* Execute a function with a specific tenant context
|
|
153
|
-
* Automatically clears tenant after execution
|
|
154
|
-
*
|
|
155
|
-
* @example
|
|
156
|
-
* const products = await withTenant(tenantId, async () => {
|
|
157
|
-
* return db.query.products.findMany()
|
|
158
|
-
* })
|
|
159
|
-
*/
|
|
160
|
-
async function withTenant(tenantId, fn) {
|
|
161
|
-
const previousTenantId = currentTenantId;
|
|
162
|
-
try {
|
|
163
|
-
setTenantId(tenantId);
|
|
164
|
-
return await fn();
|
|
165
|
-
}
|
|
166
|
-
finally {
|
|
167
|
-
if (previousTenantId) {
|
|
168
|
-
setTenantId(previousTenantId);
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
clearTenantId();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
// =============================================================================
|
|
176
|
-
// Connection Health
|
|
177
|
-
// =============================================================================
|
|
178
|
-
/**
|
|
179
|
-
* Check database connection health
|
|
180
|
-
* Returns true if connection is successful
|
|
181
|
-
*/
|
|
182
|
-
async function checkConnection() {
|
|
183
|
-
try {
|
|
184
|
-
const sql = getSql();
|
|
185
|
-
await sql `SELECT 1`;
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
catch {
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Get database connection info (for debugging)
|
|
194
|
-
*/
|
|
195
|
-
function getConnectionInfo() {
|
|
196
|
-
return {
|
|
197
|
-
hasUrl: !!process.env.DATABASE_URL,
|
|
198
|
-
hasTenant: !!currentTenantId,
|
|
199
|
-
tenantId: currentTenantId,
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
//# sourceMappingURL=client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/core/db/client.ts"],"names":[],"mappings":"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"}
|
package/dist/core/db/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @rovela/sdk/core/db
|
|
3
|
-
*
|
|
4
|
-
* Database module exports
|
|
5
|
-
*/
|
|
6
|
-
export { db, getDb, getSql, setTenantId, getTenantId, clearTenantId, initTenantFromEnv, withTenant, checkConnection, getConnectionInfo, } from './client';
|
|
7
|
-
export * as schema from './schema';
|
|
8
|
-
export type { Product, NewProduct, ProductVariant, NewProductVariant, Category, NewCategory, Order, NewOrder, OrderItem, NewOrderItem, Customer, NewCustomer, StoreAdmin, NewStoreAdmin, } from './schema';
|
|
9
|
-
export { findProducts, findProductBySlug, findProductById, findProductVariants, countProducts, findCategories, findCategoryBySlug, findOrders, findOrderById, findOrderItems, findOrderByPaymentIntent, findOrderBySessionId, createOrder, createOrderItems, updateOrderStatus, findCustomerByEmail, findCustomerById, findCustomers, findAdminByEmail, getStoreStats, getLowStockProducts, getRecentOrders, } from './queries';
|
|
10
|
-
export type { FindProductsOptions, FindOrdersOptions } from './queries';
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/db/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,EAAE,EACF,KAAK,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,iBAAiB,GAClB,MAAM,UAAU,CAAA;AAGjB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAGlC,YAAY,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,GACd,MAAM,UAAU,CAAA;AAGjB,OAAO,EAEL,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,aAAa,EAEb,cAAc,EACd,kBAAkB,EAElB,UAAU,EACV,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,oBAAoB,EAEpB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EAEjB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EAEb,gBAAgB,EAEhB,aAAa,EACb,mBAAmB,EACnB,eAAe,GAChB,MAAM,WAAW,CAAA;AAElB,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/core/db/index.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @rovela/sdk/core/db
|
|
4
|
-
*
|
|
5
|
-
* Database module exports
|
|
6
|
-
*/
|
|
7
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
-
}) : function(o, v) {
|
|
21
|
-
o["default"] = v;
|
|
22
|
-
});
|
|
23
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
-
var ownKeys = function(o) {
|
|
25
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
-
var ar = [];
|
|
27
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
-
return ar;
|
|
29
|
-
};
|
|
30
|
-
return ownKeys(o);
|
|
31
|
-
};
|
|
32
|
-
return function (mod) {
|
|
33
|
-
if (mod && mod.__esModule) return mod;
|
|
34
|
-
var result = {};
|
|
35
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
-
__setModuleDefault(result, mod);
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
})();
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.getRecentOrders = exports.getLowStockProducts = exports.getStoreStats = exports.findAdminByEmail = exports.findCustomers = exports.findCustomerById = exports.findCustomerByEmail = exports.updateOrderStatus = exports.createOrderItems = exports.createOrder = exports.findOrderBySessionId = exports.findOrderByPaymentIntent = exports.findOrderItems = exports.findOrderById = exports.findOrders = exports.findCategoryBySlug = exports.findCategories = exports.countProducts = exports.findProductVariants = exports.findProductById = exports.findProductBySlug = exports.findProducts = exports.schema = exports.getConnectionInfo = exports.checkConnection = exports.withTenant = exports.initTenantFromEnv = exports.clearTenantId = exports.getTenantId = exports.setTenantId = exports.getSql = exports.getDb = exports.db = void 0;
|
|
42
|
-
// Client and tenant management
|
|
43
|
-
var client_1 = require("./client");
|
|
44
|
-
Object.defineProperty(exports, "db", { enumerable: true, get: function () { return client_1.db; } });
|
|
45
|
-
Object.defineProperty(exports, "getDb", { enumerable: true, get: function () { return client_1.getDb; } });
|
|
46
|
-
Object.defineProperty(exports, "getSql", { enumerable: true, get: function () { return client_1.getSql; } });
|
|
47
|
-
Object.defineProperty(exports, "setTenantId", { enumerable: true, get: function () { return client_1.setTenantId; } });
|
|
48
|
-
Object.defineProperty(exports, "getTenantId", { enumerable: true, get: function () { return client_1.getTenantId; } });
|
|
49
|
-
Object.defineProperty(exports, "clearTenantId", { enumerable: true, get: function () { return client_1.clearTenantId; } });
|
|
50
|
-
Object.defineProperty(exports, "initTenantFromEnv", { enumerable: true, get: function () { return client_1.initTenantFromEnv; } });
|
|
51
|
-
Object.defineProperty(exports, "withTenant", { enumerable: true, get: function () { return client_1.withTenant; } });
|
|
52
|
-
Object.defineProperty(exports, "checkConnection", { enumerable: true, get: function () { return client_1.checkConnection; } });
|
|
53
|
-
Object.defineProperty(exports, "getConnectionInfo", { enumerable: true, get: function () { return client_1.getConnectionInfo; } });
|
|
54
|
-
// Schema exports
|
|
55
|
-
exports.schema = __importStar(require("./schema"));
|
|
56
|
-
// Query helpers
|
|
57
|
-
var queries_1 = require("./queries");
|
|
58
|
-
// Products
|
|
59
|
-
Object.defineProperty(exports, "findProducts", { enumerable: true, get: function () { return queries_1.findProducts; } });
|
|
60
|
-
Object.defineProperty(exports, "findProductBySlug", { enumerable: true, get: function () { return queries_1.findProductBySlug; } });
|
|
61
|
-
Object.defineProperty(exports, "findProductById", { enumerable: true, get: function () { return queries_1.findProductById; } });
|
|
62
|
-
Object.defineProperty(exports, "findProductVariants", { enumerable: true, get: function () { return queries_1.findProductVariants; } });
|
|
63
|
-
Object.defineProperty(exports, "countProducts", { enumerable: true, get: function () { return queries_1.countProducts; } });
|
|
64
|
-
// Categories
|
|
65
|
-
Object.defineProperty(exports, "findCategories", { enumerable: true, get: function () { return queries_1.findCategories; } });
|
|
66
|
-
Object.defineProperty(exports, "findCategoryBySlug", { enumerable: true, get: function () { return queries_1.findCategoryBySlug; } });
|
|
67
|
-
// Orders (queries)
|
|
68
|
-
Object.defineProperty(exports, "findOrders", { enumerable: true, get: function () { return queries_1.findOrders; } });
|
|
69
|
-
Object.defineProperty(exports, "findOrderById", { enumerable: true, get: function () { return queries_1.findOrderById; } });
|
|
70
|
-
Object.defineProperty(exports, "findOrderItems", { enumerable: true, get: function () { return queries_1.findOrderItems; } });
|
|
71
|
-
Object.defineProperty(exports, "findOrderByPaymentIntent", { enumerable: true, get: function () { return queries_1.findOrderByPaymentIntent; } });
|
|
72
|
-
Object.defineProperty(exports, "findOrderBySessionId", { enumerable: true, get: function () { return queries_1.findOrderBySessionId; } });
|
|
73
|
-
// Orders (mutations)
|
|
74
|
-
Object.defineProperty(exports, "createOrder", { enumerable: true, get: function () { return queries_1.createOrder; } });
|
|
75
|
-
Object.defineProperty(exports, "createOrderItems", { enumerable: true, get: function () { return queries_1.createOrderItems; } });
|
|
76
|
-
Object.defineProperty(exports, "updateOrderStatus", { enumerable: true, get: function () { return queries_1.updateOrderStatus; } });
|
|
77
|
-
// Customers
|
|
78
|
-
Object.defineProperty(exports, "findCustomerByEmail", { enumerable: true, get: function () { return queries_1.findCustomerByEmail; } });
|
|
79
|
-
Object.defineProperty(exports, "findCustomerById", { enumerable: true, get: function () { return queries_1.findCustomerById; } });
|
|
80
|
-
Object.defineProperty(exports, "findCustomers", { enumerable: true, get: function () { return queries_1.findCustomers; } });
|
|
81
|
-
// Admins
|
|
82
|
-
Object.defineProperty(exports, "findAdminByEmail", { enumerable: true, get: function () { return queries_1.findAdminByEmail; } });
|
|
83
|
-
// Stats
|
|
84
|
-
Object.defineProperty(exports, "getStoreStats", { enumerable: true, get: function () { return queries_1.getStoreStats; } });
|
|
85
|
-
Object.defineProperty(exports, "getLowStockProducts", { enumerable: true, get: function () { return queries_1.getLowStockProducts; } });
|
|
86
|
-
Object.defineProperty(exports, "getRecentOrders", { enumerable: true, get: function () { return queries_1.getRecentOrders; } });
|
|
87
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/db/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA+B;AAC/B,mCAWiB;AAVf,4FAAA,EAAE,OAAA;AACF,+FAAA,KAAK,OAAA;AACL,gGAAA,MAAM,OAAA;AACN,qGAAA,WAAW,OAAA;AACX,qGAAA,WAAW,OAAA;AACX,uGAAA,aAAa,OAAA;AACb,2GAAA,iBAAiB,OAAA;AACjB,oGAAA,UAAU,OAAA;AACV,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AAGnB,iBAAiB;AACjB,mDAAkC;AAoBlC,gBAAgB;AAChB,qCA8BkB;AA7BhB,WAAW;AACX,uGAAA,YAAY,OAAA;AACZ,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,8GAAA,mBAAmB,OAAA;AACnB,wGAAA,aAAa,OAAA;AACb,aAAa;AACb,yGAAA,cAAc,OAAA;AACd,6GAAA,kBAAkB,OAAA;AAClB,mBAAmB;AACnB,qGAAA,UAAU,OAAA;AACV,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,mHAAA,wBAAwB,OAAA;AACxB,+GAAA,oBAAoB,OAAA;AACpB,qBAAqB;AACrB,sGAAA,WAAW,OAAA;AACX,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,YAAY;AACZ,8GAAA,mBAAmB,OAAA;AACnB,2GAAA,gBAAgB,OAAA;AAChB,wGAAA,aAAa,OAAA;AACb,SAAS;AACT,2GAAA,gBAAgB,OAAA;AAChB,QAAQ;AACR,wGAAA,aAAa,OAAA;AACb,8GAAA,mBAAmB,OAAA;AACnB,0GAAA,eAAe,OAAA"}
|