@aglyn/plugins-commerce 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +10 -0
- package/package.json +57 -0
- package/src/index.d.ts +38 -0
- package/src/index.js +38 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/account.d.ts +31 -0
- package/src/lib/components/account.js +645 -0
- package/src/lib/components/account.js.map +1 -0
- package/src/lib/components/cart.d.ts +38 -0
- package/src/lib/components/cart.js +851 -0
- package/src/lib/components/cart.js.map +1 -0
- package/src/lib/components/commerce-console-page.d.ts +32 -0
- package/src/lib/components/commerce-console-page.js +296 -0
- package/src/lib/components/commerce-console-page.js.map +1 -0
- package/src/lib/components/commerce-console-sections.d.ts +34 -0
- package/src/lib/components/commerce-console-sections.js +62 -0
- package/src/lib/components/commerce-console-sections.js.map +1 -0
- package/src/lib/components/console/catalog-organization-card.component.d.ts +14 -0
- package/src/lib/components/console/catalog-organization-card.component.js +1087 -0
- package/src/lib/components/console/catalog-organization-card.component.js.map +1 -0
- package/src/lib/components/console/commerce-analytics-card.component.d.ts +27 -0
- package/src/lib/components/console/commerce-analytics-card.component.js +310 -0
- package/src/lib/components/console/commerce-analytics-card.component.js.map +1 -0
- package/src/lib/components/console/commerce-glance-card.component.d.ts +20 -0
- package/src/lib/components/console/commerce-glance-card.component.js +340 -0
- package/src/lib/components/console/commerce-glance-card.component.js.map +1 -0
- package/src/lib/components/console/commerce-stat-tile.component.d.ts +37 -0
- package/src/lib/components/console/commerce-stat-tile.component.js +72 -0
- package/src/lib/components/console/commerce-stat-tile.component.js.map +1 -0
- package/src/lib/components/console/discounts-card.component.d.ts +14 -0
- package/src/lib/components/console/discounts-card.component.js +443 -0
- package/src/lib/components/console/discounts-card.component.js.map +1 -0
- package/src/lib/components/console/entitlement-gate.component.d.ts +76 -0
- package/src/lib/components/console/entitlement-gate.component.js +115 -0
- package/src/lib/components/console/entitlement-gate.component.js.map +1 -0
- package/src/lib/components/console/gift-cards-card.component.d.ts +29 -0
- package/src/lib/components/console/gift-cards-card.component.js +379 -0
- package/src/lib/components/console/gift-cards-card.component.js.map +1 -0
- package/src/lib/components/console/host-coupons-card.component.d.ts +14 -0
- package/src/lib/components/console/host-coupons-card.component.js +252 -0
- package/src/lib/components/console/host-coupons-card.component.js.map +1 -0
- package/src/lib/components/console/host-orders-card.component.d.ts +13 -0
- package/src/lib/components/console/host-orders-card.component.js +861 -0
- package/src/lib/components/console/host-orders-card.component.js.map +1 -0
- package/src/lib/components/console/locations-card.component.d.ts +14 -0
- package/src/lib/components/console/locations-card.component.js +256 -0
- package/src/lib/components/console/locations-card.component.js.map +1 -0
- package/src/lib/components/console/member-posts-card.component.d.ts +8 -0
- package/src/lib/components/console/member-posts-card.component.js +283 -0
- package/src/lib/components/console/member-posts-card.component.js.map +1 -0
- package/src/lib/components/console/newest-site-users-card.component.d.ts +36 -0
- package/src/lib/components/console/newest-site-users-card.component.js +126 -0
- package/src/lib/components/console/newest-site-users-card.component.js.map +1 -0
- package/src/lib/components/console/order-detail-dialog.component.d.ts +28 -0
- package/src/lib/components/console/order-detail-dialog.component.js +976 -0
- package/src/lib/components/console/order-detail-dialog.component.js.map +1 -0
- package/src/lib/components/console/paid-media.d.ts +127 -0
- package/src/lib/components/console/paid-media.js +397 -0
- package/src/lib/components/console/paid-media.js.map +1 -0
- package/src/lib/components/console/payments-settings-card.component.d.ts +13 -0
- package/src/lib/components/console/payments-settings-card.component.js +295 -0
- package/src/lib/components/console/payments-settings-card.component.js.map +1 -0
- package/src/lib/components/console/pos-page.component.d.ts +13 -0
- package/src/lib/components/console/pos-page.component.js +916 -0
- package/src/lib/components/console/pos-page.component.js.map +1 -0
- package/src/lib/components/console/product-editor-dialog.component.d.ts +32 -0
- package/src/lib/components/console/product-editor-dialog.component.js +1374 -0
- package/src/lib/components/console/product-editor-dialog.component.js.map +1 -0
- package/src/lib/components/console/products-hub-card.component.d.ts +16 -0
- package/src/lib/components/console/products-hub-card.component.js +1280 -0
- package/src/lib/components/console/products-hub-card.component.js.map +1 -0
- package/src/lib/components/console/products-hub-zone.component.d.ts +50 -0
- package/src/lib/components/console/products-hub-zone.component.js +200 -0
- package/src/lib/components/console/products-hub-zone.component.js.map +1 -0
- package/src/lib/components/console/recovery-queue-card.component.d.ts +39 -0
- package/src/lib/components/console/recovery-queue-card.component.js +262 -0
- package/src/lib/components/console/recovery-queue-card.component.js.map +1 -0
- package/src/lib/components/console/registers-card.component.d.ts +21 -0
- package/src/lib/components/console/registers-card.component.js +296 -0
- package/src/lib/components/console/registers-card.component.js.map +1 -0
- package/src/lib/components/console/reservations-card.component.d.ts +14 -0
- package/src/lib/components/console/reservations-card.component.js +650 -0
- package/src/lib/components/console/reservations-card.component.js.map +1 -0
- package/src/lib/components/console/reviews-moderation-card.component.d.ts +8 -0
- package/src/lib/components/console/reviews-moderation-card.component.js +235 -0
- package/src/lib/components/console/reviews-moderation-card.component.js.map +1 -0
- package/src/lib/components/console/shipping-settings-card.component.d.ts +38 -0
- package/src/lib/components/console/shipping-settings-card.component.js +560 -0
- package/src/lib/components/console/shipping-settings-card.component.js.map +1 -0
- package/src/lib/components/console/stock-movements-card.component.d.ts +31 -0
- package/src/lib/components/console/stock-movements-card.component.js +333 -0
- package/src/lib/components/console/stock-movements-card.component.js.map +1 -0
- package/src/lib/components/console/store-settings-card.component.d.ts +14 -0
- package/src/lib/components/console/store-settings-card.component.js +300 -0
- package/src/lib/components/console/store-settings-card.component.js.map +1 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.d.ts +73 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.js +408 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.js.map +1 -0
- package/src/lib/components/console/suppliers-card.component.d.ts +8 -0
- package/src/lib/components/console/suppliers-card.component.js +328 -0
- package/src/lib/components/console/suppliers-card.component.js.map +1 -0
- package/src/lib/components/console/tax-settings-card.component.d.ts +14 -0
- package/src/lib/components/console/tax-settings-card.component.js +473 -0
- package/src/lib/components/console/tax-settings-card.component.js.map +1 -0
- package/src/lib/components/gate.d.ts +39 -0
- package/src/lib/components/gate.js +202 -0
- package/src/lib/components/gate.js.map +1 -0
- package/src/lib/components/gated-video.d.ts +40 -0
- package/src/lib/components/gated-video.js +366 -0
- package/src/lib/components/gated-video.js.map +1 -0
- package/src/lib/components/member-feed.d.ts +32 -0
- package/src/lib/components/member-feed.js +198 -0
- package/src/lib/components/member-feed.js.map +1 -0
- package/src/lib/components/member-recovery.d.ts +35 -0
- package/src/lib/components/member-recovery.js +313 -0
- package/src/lib/components/member-recovery.js.map +1 -0
- package/src/lib/components/member-signin.d.ts +35 -0
- package/src/lib/components/member-signin.js +257 -0
- package/src/lib/components/member-signin.js.map +1 -0
- package/src/lib/components/member-signup.d.ts +34 -0
- package/src/lib/components/member-signup.js +287 -0
- package/src/lib/components/member-signup.js.map +1 -0
- package/src/lib/components/newsletter-signup.d.ts +39 -0
- package/src/lib/components/newsletter-signup.js +229 -0
- package/src/lib/components/newsletter-signup.js.map +1 -0
- package/src/lib/components/product-detail.d.ts +38 -0
- package/src/lib/components/product-detail.js +1022 -0
- package/src/lib/components/product-detail.js.map +1 -0
- package/src/lib/components/product-grid.d.ts +67 -0
- package/src/lib/components/product-grid.js +909 -0
- package/src/lib/components/product-grid.js.map +1 -0
- package/src/lib/components/product-reviews.d.ts +32 -0
- package/src/lib/components/product-reviews.js +349 -0
- package/src/lib/components/product-reviews.js.map +1 -0
- package/src/lib/components/related-products.d.ts +33 -0
- package/src/lib/components/related-products.js +232 -0
- package/src/lib/components/related-products.js.map +1 -0
- package/src/lib/components/reservation-widget.d.ts +33 -0
- package/src/lib/components/reservation-widget.js +418 -0
- package/src/lib/components/reservation-widget.js.map +1 -0
- package/src/lib/components/storefront-payment-element-fallback.d.ts +18 -0
- package/src/lib/components/storefront-payment-element-fallback.js +51 -0
- package/src/lib/components/storefront-payment-element-fallback.js.map +1 -0
- package/src/lib/components/storefront-payment-element.d.ts +78 -0
- package/src/lib/components/storefront-payment-element.js +156 -0
- package/src/lib/components/storefront-payment-element.js.map +1 -0
- package/src/lib/components/wishlist.d.ts +46 -0
- package/src/lib/components/wishlist.js +304 -0
- package/src/lib/components/wishlist.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +18 -0
- package/src/lib/constants/bundle-common.js +18 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/constants/product-filters.d.ts +35 -0
- package/src/lib/constants/product-filters.js +109 -0
- package/src/lib/constants/product-filters.js.map +1 -0
- package/src/lib/model/commerce-cart.d.ts +52 -0
- package/src/lib/model/commerce-cart.js +102 -0
- package/src/lib/model/commerce-cart.js.map +1 -0
- package/src/lib/model/commerce-connect-transfer.d.ts +243 -0
- package/src/lib/model/commerce-connect-transfer.js +231 -0
- package/src/lib/model/commerce-connect-transfer.js.map +1 -0
- package/src/lib/model/commerce-discounts.d.ts +164 -0
- package/src/lib/model/commerce-discounts.js +231 -0
- package/src/lib/model/commerce-discounts.js.map +1 -0
- package/src/lib/model/commerce-dispute.d.ts +124 -0
- package/src/lib/model/commerce-dispute.js +225 -0
- package/src/lib/model/commerce-dispute.js.map +1 -0
- package/src/lib/model/commerce-gift-cards.d.ts +107 -0
- package/src/lib/model/commerce-gift-cards.js +121 -0
- package/src/lib/model/commerce-gift-cards.js.map +1 -0
- package/src/lib/model/commerce-io.d.ts +36 -0
- package/src/lib/model/commerce-io.js +245 -0
- package/src/lib/model/commerce-io.js.map +1 -0
- package/src/lib/model/commerce-orders.d.ts +1040 -0
- package/src/lib/model/commerce-orders.js +1022 -0
- package/src/lib/model/commerce-orders.js.map +1 -0
- package/src/lib/model/commerce-promotions.d.ts +188 -0
- package/src/lib/model/commerce-promotions.js +199 -0
- package/src/lib/model/commerce-promotions.js.map +1 -0
- package/src/lib/model/commerce-reservations.d.ts +175 -0
- package/src/lib/model/commerce-reservations.js +157 -0
- package/src/lib/model/commerce-reservations.js.map +1 -0
- package/src/lib/model/commerce-shipping.d.ts +316 -0
- package/src/lib/model/commerce-shipping.js +484 -0
- package/src/lib/model/commerce-shipping.js.map +1 -0
- package/src/lib/model/commerce-stock-holds.d.ts +199 -0
- package/src/lib/model/commerce-stock-holds.js +190 -0
- package/src/lib/model/commerce-stock-holds.js.map +1 -0
- package/src/lib/model/commerce-subscription-status.d.ts +67 -0
- package/src/lib/model/commerce-subscription-status.js +76 -0
- package/src/lib/model/commerce-subscription-status.js.map +1 -0
- package/src/lib/model/commerce-tax-decision.d.ts +222 -0
- package/src/lib/model/commerce-tax-decision.js +165 -0
- package/src/lib/model/commerce-tax-decision.js.map +1 -0
- package/src/lib/model/commerce-tax.d.ts +176 -0
- package/src/lib/model/commerce-tax.js +92 -0
- package/src/lib/model/commerce-tax.js.map +1 -0
- package/src/lib/model/commerce.d.ts +551 -0
- package/src/lib/model/commerce.js +739 -0
- package/src/lib/model/commerce.js.map +1 -0
- package/src/lib/model/index.d.ts +40 -0
- package/src/lib/model/index.js +40 -0
- package/src/lib/model/index.js.map +1 -0
- package/src/lib/model/order-figures.d.ts +48 -0
- package/src/lib/model/order-figures.js +74 -0
- package/src/lib/model/order-figures.js.map +1 -0
- package/src/lib/model/plugin-permissions.d.ts +23 -0
- package/src/lib/model/plugin-permissions.js +34 -0
- package/src/lib/model/plugin-permissions.js.map +1 -0
- package/src/lib/model/purchase-analytics.d.ts +186 -0
- package/src/lib/model/purchase-analytics.js +216 -0
- package/src/lib/model/purchase-analytics.js.map +1 -0
- package/src/lib/plugin-config.d.ts +62 -0
- package/src/lib/plugin-config.js +78 -0
- package/src/lib/plugin-config.js.map +1 -0
- package/src/lib/plugin.d.ts +28 -0
- package/src/lib/plugin.js +147 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/server/billing-webhook.d.ts +26 -0
- package/src/lib/server/billing-webhook.js +4011 -0
- package/src/lib/server/billing-webhook.js.map +1 -0
- package/src/lib/server/cancel-order.d.ts +87 -0
- package/src/lib/server/cancel-order.js +368 -0
- package/src/lib/server/cancel-order.js.map +1 -0
- package/src/lib/server/cart-checkout.d.ts +25 -0
- package/src/lib/server/cart-checkout.js +976 -0
- package/src/lib/server/cart-checkout.js.map +1 -0
- package/src/lib/server/cart-cookie.d.ts +32 -0
- package/src/lib/server/cart-cookie.js +77 -0
- package/src/lib/server/cart-cookie.js.map +1 -0
- package/src/lib/server/cart.d.ts +34 -0
- package/src/lib/server/cart.js +181 -0
- package/src/lib/server/cart.js.map +1 -0
- package/src/lib/server/catalog.d.ts +127 -0
- package/src/lib/server/catalog.js +277 -0
- package/src/lib/server/catalog.js.map +1 -0
- package/src/lib/server/checkout.d.ts +36 -0
- package/src/lib/server/checkout.js +915 -0
- package/src/lib/server/checkout.js.map +1 -0
- package/src/lib/server/connect.d.ts +26 -0
- package/src/lib/server/connect.js +238 -0
- package/src/lib/server/connect.js.map +1 -0
- package/src/lib/server/contact-refund.d.ts +117 -0
- package/src/lib/server/contact-refund.js +196 -0
- package/src/lib/server/contact-refund.js.map +1 -0
- package/src/lib/server/download.d.ts +39 -0
- package/src/lib/server/download.js +206 -0
- package/src/lib/server/download.js.map +1 -0
- package/src/lib/server/draft-order.d.ts +26 -0
- package/src/lib/server/draft-order.js +706 -0
- package/src/lib/server/draft-order.js.map +1 -0
- package/src/lib/server/feed.d.ts +24 -0
- package/src/lib/server/feed.js +59 -0
- package/src/lib/server/feed.js.map +1 -0
- package/src/lib/server/fulfill-order.d.ts +97 -0
- package/src/lib/server/fulfill-order.js +235 -0
- package/src/lib/server/fulfill-order.js.map +1 -0
- package/src/lib/server/gate.d.ts +36 -0
- package/src/lib/server/gate.js +112 -0
- package/src/lib/server/gate.js.map +1 -0
- package/src/lib/server/gift-cards.d.ts +42 -0
- package/src/lib/server/gift-cards.js +219 -0
- package/src/lib/server/gift-cards.js.map +1 -0
- package/src/lib/server/low-stock.d.ts +49 -0
- package/src/lib/server/low-stock.js +60 -0
- package/src/lib/server/low-stock.js.map +1 -0
- package/src/lib/server/manual-tax-rate.d.ts +82 -0
- package/src/lib/server/manual-tax-rate.js +113 -0
- package/src/lib/server/manual-tax-rate.js.map +1 -0
- package/src/lib/server/member-feed.d.ts +24 -0
- package/src/lib/server/member-feed.js +72 -0
- package/src/lib/server/member-feed.js.map +1 -0
- package/src/lib/server/member-name-search.d.ts +37 -0
- package/src/lib/server/member-name-search.js +42 -0
- package/src/lib/server/member-name-search.js.map +1 -0
- package/src/lib/server/member-post.d.ts +23 -0
- package/src/lib/server/member-post.js +166 -0
- package/src/lib/server/member-post.js.map +1 -0
- package/src/lib/server/membership-account.d.ts +37 -0
- package/src/lib/server/membership-account.js +148 -0
- package/src/lib/server/membership-account.js.map +1 -0
- package/src/lib/server/membership-admin-password.d.ts +33 -0
- package/src/lib/server/membership-admin-password.js +202 -0
- package/src/lib/server/membership-admin-password.js.map +1 -0
- package/src/lib/server/membership-content.d.ts +23 -0
- package/src/lib/server/membership-content.js +105 -0
- package/src/lib/server/membership-content.js.map +1 -0
- package/src/lib/server/membership-login.d.ts +19 -0
- package/src/lib/server/membership-login.js +137 -0
- package/src/lib/server/membership-login.js.map +1 -0
- package/src/lib/server/membership-logout.d.ts +19 -0
- package/src/lib/server/membership-logout.js +35 -0
- package/src/lib/server/membership-logout.js.map +1 -0
- package/src/lib/server/membership-recover.d.ts +60 -0
- package/src/lib/server/membership-recover.js +244 -0
- package/src/lib/server/membership-recover.js.map +1 -0
- package/src/lib/server/membership-register.d.ts +22 -0
- package/src/lib/server/membership-register.js +241 -0
- package/src/lib/server/membership-register.js.map +1 -0
- package/src/lib/server/membership-reset.d.ts +26 -0
- package/src/lib/server/membership-reset.js +88 -0
- package/src/lib/server/membership-reset.js.map +1 -0
- package/src/lib/server/membership-wishlist.d.ts +23 -0
- package/src/lib/server/membership-wishlist.js +89 -0
- package/src/lib/server/membership-wishlist.js.map +1 -0
- package/src/lib/server/membership.d.ts +96 -0
- package/src/lib/server/membership.js +222 -0
- package/src/lib/server/membership.js.map +1 -0
- package/src/lib/server/native-checkout.d.ts +170 -0
- package/src/lib/server/native-checkout.js +193 -0
- package/src/lib/server/native-checkout.js.map +1 -0
- package/src/lib/server/newsletter.d.ts +23 -0
- package/src/lib/server/newsletter.js +323 -0
- package/src/lib/server/newsletter.js.map +1 -0
- package/src/lib/server/notify-restock.d.ts +22 -0
- package/src/lib/server/notify-restock.js +84 -0
- package/src/lib/server/notify-restock.js.map +1 -0
- package/src/lib/server/order-analytics.d.ts +134 -0
- package/src/lib/server/order-analytics.js +263 -0
- package/src/lib/server/order-analytics.js.map +1 -0
- package/src/lib/server/order-figures.d.ts +33 -0
- package/src/lib/server/order-figures.js +220 -0
- package/src/lib/server/order-figures.js.map +1 -0
- package/src/lib/server/paid-media-delivery.d.ts +173 -0
- package/src/lib/server/paid-media-delivery.js +212 -0
- package/src/lib/server/paid-media-delivery.js.map +1 -0
- package/src/lib/server/pos-order.d.ts +54 -0
- package/src/lib/server/pos-order.js +1137 -0
- package/src/lib/server/pos-order.js.map +1 -0
- package/src/lib/server/process-abandoned.d.ts +54 -0
- package/src/lib/server/process-abandoned.js +222 -0
- package/src/lib/server/process-abandoned.js.map +1 -0
- package/src/lib/server/process-restock.d.ts +42 -0
- package/src/lib/server/process-restock.js +219 -0
- package/src/lib/server/process-restock.js.map +1 -0
- package/src/lib/server/product-card.d.ts +29 -0
- package/src/lib/server/product-card.js +54 -0
- package/src/lib/server/product-card.js.map +1 -0
- package/src/lib/server/product.d.ts +70 -0
- package/src/lib/server/product.js +105 -0
- package/src/lib/server/product.js.map +1 -0
- package/src/lib/server/promotion-hold.d.ts +144 -0
- package/src/lib/server/promotion-hold.js +174 -0
- package/src/lib/server/promotion-hold.js.map +1 -0
- package/src/lib/server/reconcile-stock.d.ts +106 -0
- package/src/lib/server/reconcile-stock.js +349 -0
- package/src/lib/server/reconcile-stock.js.map +1 -0
- package/src/lib/server/refund.d.ts +45 -0
- package/src/lib/server/refund.js +607 -0
- package/src/lib/server/refund.js.map +1 -0
- package/src/lib/server/related.d.ts +24 -0
- package/src/lib/server/related.js +104 -0
- package/src/lib/server/related.js.map +1 -0
- package/src/lib/server/reservation-availability.d.ts +23 -0
- package/src/lib/server/reservation-availability.js +111 -0
- package/src/lib/server/reservation-availability.js.map +1 -0
- package/src/lib/server/reserve-stock.d.ts +156 -0
- package/src/lib/server/reserve-stock.js +146 -0
- package/src/lib/server/reserve-stock.js.map +1 -0
- package/src/lib/server/reserve.d.ts +25 -0
- package/src/lib/server/reserve.js +426 -0
- package/src/lib/server/reserve.js.map +1 -0
- package/src/lib/server/restock-flag.d.ts +202 -0
- package/src/lib/server/restock-flag.js +449 -0
- package/src/lib/server/restock-flag.js.map +1 -0
- package/src/lib/server/reviews.d.ts +51 -0
- package/src/lib/server/reviews.js +132 -0
- package/src/lib/server/reviews.js.map +1 -0
- package/src/lib/server/site-page-enricher.d.ts +42 -0
- package/src/lib/server/site-page-enricher.js +149 -0
- package/src/lib/server/site-page-enricher.js.map +1 -0
- package/src/lib/server/site-page-resolver.d.ts +26 -0
- package/src/lib/server/site-page-resolver.js +223 -0
- package/src/lib/server/site-page-resolver.js.map +1 -0
- package/src/lib/server/stock-hold.d.ts +127 -0
- package/src/lib/server/stock-hold.js +258 -0
- package/src/lib/server/stock-hold.js.map +1 -0
- package/src/lib/server/storefront-tax-record.d.ts +22 -0
- package/src/lib/server/storefront-tax-record.js +218 -0
- package/src/lib/server/storefront-tax-record.js.map +1 -0
- package/src/lib/server/storefront-tax.d.ts +197 -0
- package/src/lib/server/storefront-tax.js +245 -0
- package/src/lib/server/storefront-tax.js.map +1 -0
- package/src/lib/server/stream.d.ts +25 -0
- package/src/lib/server/stream.js +191 -0
- package/src/lib/server/stream.js.map +1 -0
- package/src/lib/server/subscription-portal.d.ts +24 -0
- package/src/lib/server/subscription-portal.js +91 -0
- package/src/lib/server/subscription-portal.js.map +1 -0
- package/src/lib/server/supplier-outbox.d.ts +190 -0
- package/src/lib/server/supplier-outbox.js +342 -0
- package/src/lib/server/supplier-outbox.js.map +1 -0
- package/src/lib/server/supplier-update.d.ts +23 -0
- package/src/lib/server/supplier-update.js +289 -0
- package/src/lib/server/supplier-update.js.map +1 -0
- package/src/lib/server/tax-profile.d.ts +29 -0
- package/src/lib/server/tax-profile.js +40 -0
- package/src/lib/server/tax-profile.js.map +1 -0
- package/src/lib/server.d.ts +32 -0
- package/src/lib/server.js +311 -0
- package/src/lib/server.js.map +1 -0
- package/src/lib/site.d.ts +27 -0
- package/src/lib/site.js +134 -0
- package/src/lib/site.js.map +1 -0
- package/src/lib/utils/escape-html.d.ts +41 -0
- package/src/lib/utils/escape-html.js +41 -0
- package/src/lib/utils/escape-html.js.map +1 -0
- package/src/lib/utils/generate-preset-id.d.ts +19 -0
- package/src/lib/utils/generate-preset-id.js +25 -0
- package/src/lib/utils/generate-preset-id.js.map +1 -0
- package/src/lib/utils/member-continue.d.ts +45 -0
- package/src/lib/utils/member-continue.js +49 -0
- package/src/lib/utils/member-continue.js.map +1 -0
- package/src/lib/utils/use-storefront-purchase-event.d.ts +60 -0
- package/src/lib/utils/use-storefront-purchase-event.js +142 -0
- package/src/lib/utils/use-storefront-purchase-event.js.map +1 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ 'use client';
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
import { trackEvent } from "@aglyn/aglyn/app-utils/analytics-events";
|
|
19
|
+
import * as Aglyn from "@aglyn/aglyn";
|
|
20
|
+
import { CardDisplay } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { useSnackbar } from "@aglyn/shared-ui-snackstack";
|
|
22
|
+
import { Alert, Button, Chip, Stack, Typography } from "@mui/material";
|
|
23
|
+
import { doc } from "firebase/firestore";
|
|
24
|
+
import { useCallback, useState } from "react";
|
|
25
|
+
import { useFirestore, useUser } from "@aglyn/tenant-feature-instance";
|
|
26
|
+
import { useFirestoreDoc } from "@aglyn/tenant-feature-instance";
|
|
27
|
+
import { useOrgPlan } from "@aglyn/tenant-feature-instance";
|
|
28
|
+
import { pluginDocsHelp } from "@aglyn/aglyn";
|
|
29
|
+
import { authorizedFetch } from "@aglyn/shared-util-http/authorized-token";
|
|
30
|
+
/**
|
|
31
|
+
* Merchant payments card (AGL-284): Stripe Connect Express onboarding
|
|
32
|
+
* status for the org owner + the plan's transaction-fee ladder so the
|
|
33
|
+
* "upgrade to kill fees" motion (AGL-278) is visible where it matters.
|
|
34
|
+
*/ export function PaymentsSettingsCard(props) {
|
|
35
|
+
var _profile_lastPayoutFailureCents, _profile_lastPayoutFailureReason;
|
|
36
|
+
const { hostId } = props;
|
|
37
|
+
const firestore = useFirestore();
|
|
38
|
+
const { data: user } = useUser();
|
|
39
|
+
const { enqueueSnackbar } = useSnackbar();
|
|
40
|
+
const [busy, setBusy] = useState(false);
|
|
41
|
+
/**
|
|
42
|
+
* A one-time Stripe Express dashboard link, minted by the connect route on
|
|
43
|
+
* request. Not persisted: login links are single-use and short-lived, so a
|
|
44
|
+
* stored one would be a button that fails the second time it is pressed.
|
|
45
|
+
*/ const [dashboardUrl, setDashboardUrl] = useState(null);
|
|
46
|
+
const { org, ready: planReady } = useOrgPlan(hostId);
|
|
47
|
+
/** Bumped by Retry to re-subscribe the profile listen (AGL-1380). */ const [retryNonce, setRetryNonce] = useState(0);
|
|
48
|
+
const uid = user == null ? void 0 : user.uid;
|
|
49
|
+
const { data: profile, status: profileStatus } = useFirestoreDoc(// Held at null rather than addressed as `profiles/-pending-` — that
|
|
50
|
+
// sentinel issued a guaranteed-denied read on every pre-auth mount, and
|
|
51
|
+
// a denial lands in `status: 'error'`, which now means something.
|
|
52
|
+
()=>uid ? doc(firestore, 'profiles', uid) : null, [
|
|
53
|
+
firestore,
|
|
54
|
+
uid,
|
|
55
|
+
retryNonce
|
|
56
|
+
]);
|
|
57
|
+
const isOwner = Boolean((org == null ? void 0 : org.ownerUid) && (user == null ? void 0 : user.uid) === org.ownerUid);
|
|
58
|
+
/**
|
|
59
|
+
* Three outcomes, not two (AGL-1380). An absent profile doc is the value
|
|
60
|
+
* BEFORE an answer as much as it is the value of a merchant who never
|
|
61
|
+
* connected Stripe, so "Not set up" off a falsy `stripeChargesEnabled` is a
|
|
62
|
+
* claim about this org's payment setup made without having heard back. It
|
|
63
|
+
* is wrong in the direction that provokes action: the same falsy value
|
|
64
|
+
* turns the button into "Set up payments", which sends a merchant who is
|
|
65
|
+
* already taking money into Stripe onboarding.
|
|
66
|
+
*/ const stripeState = !uid || profileStatus === 'loading' ? 'pending' : profileStatus === 'error' ? 'error' : 'loaded';
|
|
67
|
+
/**
|
|
68
|
+
* WHICH STRIPE WORLD THE STORED ACCOUNT BELONGS TO (AGL-2471).
|
|
69
|
+
*
|
|
70
|
+
* `stripeChargesEnabled: true` was the whole readiness claim, and a
|
|
71
|
+
* production profile carrying it named a TEST-mode account: this card said
|
|
72
|
+
* "Charges enabled" about three storefronts that could not take a single
|
|
73
|
+
* payment. Only a literal boolean counts as recorded — the same
|
|
74
|
+
* three-valued reading `connectLinkageIsReady` uses on the server, so the
|
|
75
|
+
* chip and the checkout cannot disagree.
|
|
76
|
+
*/ const modeVerified = typeof (profile == null ? void 0 : profile.stripeAccountLivemode) === 'boolean';
|
|
77
|
+
const chargesConnected = stripeState === 'loaded' && Boolean(profile == null ? void 0 : profile.stripeChargesEnabled);
|
|
78
|
+
const modeUnverified = chargesConnected && !modeVerified;
|
|
79
|
+
const chargesEnabled = chargesConnected && modeVerified;
|
|
80
|
+
const physicalPct = Aglyn.resolveTransactionFeePct(org, 'physical');
|
|
81
|
+
const digitalPct = Aglyn.resolveTransactionFeePct(org, 'digital');
|
|
82
|
+
const commerceEnabled = Aglyn.checkEntitlement(org, 'commerce');
|
|
83
|
+
const handleConnect = useCallback(async ()=>{
|
|
84
|
+
setBusy(true);
|
|
85
|
+
try {
|
|
86
|
+
const response = await authorizedFetch(user, '/api/commerce/connect', {
|
|
87
|
+
method: 'POST',
|
|
88
|
+
headers: {
|
|
89
|
+
'Content-Type': 'application/json'
|
|
90
|
+
},
|
|
91
|
+
body: JSON.stringify({
|
|
92
|
+
hostId
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
const payload = await response.json();
|
|
96
|
+
if (response.status === 501) {
|
|
97
|
+
return void enqueueSnackbar('Payments are not configured on this deployment', {
|
|
98
|
+
variant: 'info',
|
|
99
|
+
persist: false
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (!response.ok) {
|
|
103
|
+
var _ref;
|
|
104
|
+
return void enqueueSnackbar((_ref = payload == null ? void 0 : payload.error) != null ? _ref : 'Payment setup failed', {
|
|
105
|
+
variant: 'error',
|
|
106
|
+
allowDuplicate: true
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (payload.chargesEnabled) {
|
|
110
|
+
// "% who connect Stripe" — a GTM plan §6 activation metric
|
|
111
|
+
// (AGL-1561). Gated on the TRANSITION, not the state: this handler
|
|
112
|
+
// is a re-entrant create-or-resume, so it answers `chargesEnabled:
|
|
113
|
+
// true` on every subsequent visit to a connected account, and a bare
|
|
114
|
+
// event here would count one merchant once per click forever.
|
|
115
|
+
// `chargesEnabled` is the state read from the profile BEFORE this
|
|
116
|
+
// request, so the event fires only when onboarding actually completed.
|
|
117
|
+
if (!chargesEnabled) trackEvent('stripe_connected', {});
|
|
118
|
+
// CHARGES AND PAYOUTS ARE TWO FLAGS, AND ONLY ONE OF THEM IS THIS
|
|
119
|
+
// SENTENCE (AGL-1997). `chargesEnabled` says Stripe will let the
|
|
120
|
+
// account take money; whether the money can LEAVE is `payoutsEnabled`,
|
|
121
|
+
// which the route answers alongside it. Charges-yes/payouts-no is an
|
|
122
|
+
// ordinary Stripe state — verification pending or lapsed, no payout
|
|
123
|
+
// method — and announcing "Payments are enabled" in it is false in the
|
|
124
|
+
// direction that costs the merchant: they sell believing they are
|
|
125
|
+
// paid, and the funds sit in a Connect account that cannot release
|
|
126
|
+
// them. Read three-valued, so only a literal `false` from Stripe
|
|
127
|
+
// downgrades the claim; an absent flag means unasked, not off.
|
|
128
|
+
const payoutsBlocked = payload.payoutsEnabled === false;
|
|
129
|
+
// A WARNING THAT NAMES A PROBLEM MUST OFFER THE FIX.
|
|
130
|
+
//
|
|
131
|
+
// Stripe is the only place payouts can be released — an Express
|
|
132
|
+
// account has no password and no direct login — so telling the
|
|
133
|
+
// merchant their funds are stranded and then keeping them here is half
|
|
134
|
+
// an answer. The route now mints the remediation link for exactly this
|
|
135
|
+
// state; going there is the whole point of pressing the button.
|
|
136
|
+
if (payoutsBlocked && payload.url) {
|
|
137
|
+
return void window.location.assign(payload.url);
|
|
138
|
+
}
|
|
139
|
+
// Payouts are flowing, so the link is the Express dashboard: balance,
|
|
140
|
+
// payout schedule, and the reason a payout failed. Held in state
|
|
141
|
+
// rather than followed, because this click was a status check and
|
|
142
|
+
// navigating away from one nobody asked to leave is its own defect.
|
|
143
|
+
if (!payoutsBlocked && typeof payload.dashboardUrl === 'string') {
|
|
144
|
+
setDashboardUrl(payload.dashboardUrl);
|
|
145
|
+
}
|
|
146
|
+
return void enqueueSnackbar(payoutsBlocked ? 'Connected — payouts are not released yet' : 'Payments are enabled', {
|
|
147
|
+
variant: payoutsBlocked ? 'warning' : 'success',
|
|
148
|
+
persist: false
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
if (payload.url) window.location.assign(payload.url);
|
|
152
|
+
} catch (error) {
|
|
153
|
+
console.error(error);
|
|
154
|
+
enqueueSnackbar('An error has occurred', {
|
|
155
|
+
variant: 'error',
|
|
156
|
+
allowDuplicate: true
|
|
157
|
+
});
|
|
158
|
+
} finally{
|
|
159
|
+
setBusy(false);
|
|
160
|
+
}
|
|
161
|
+
}, [
|
|
162
|
+
user,
|
|
163
|
+
hostId,
|
|
164
|
+
chargesEnabled,
|
|
165
|
+
enqueueSnackbar
|
|
166
|
+
]);
|
|
167
|
+
return /*#__PURE__*/ _jsx(CardDisplay, {
|
|
168
|
+
header: 'Payments',
|
|
169
|
+
help: pluginDocsHelp('commerceEndToEnd', {
|
|
170
|
+
anchor: '#1-connect-payments'
|
|
171
|
+
}),
|
|
172
|
+
contentGutterX: true,
|
|
173
|
+
contentGutterY: true,
|
|
174
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
175
|
+
spacing: 1.5,
|
|
176
|
+
children: [
|
|
177
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
178
|
+
direction: "row",
|
|
179
|
+
spacing: 1,
|
|
180
|
+
sx: {
|
|
181
|
+
alignItems: 'center'
|
|
182
|
+
},
|
|
183
|
+
children: [
|
|
184
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
185
|
+
variant: "body2",
|
|
186
|
+
sx: {
|
|
187
|
+
flex: 1
|
|
188
|
+
},
|
|
189
|
+
children: 'Stripe account'
|
|
190
|
+
}),
|
|
191
|
+
stripeState === 'error' ? null : /*#__PURE__*/ _jsx(Chip, {
|
|
192
|
+
size: "small",
|
|
193
|
+
label: stripeState === 'pending' ? 'Checking…' : chargesEnabled ? 'Charges enabled' : modeUnverified ? 'Not verified' : 'Not set up',
|
|
194
|
+
color: stripeState === 'pending' ? 'default' : chargesEnabled ? 'success' : modeUnverified ? 'error' : 'warning',
|
|
195
|
+
variant: "outlined"
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}),
|
|
199
|
+
stripeState === 'error' ? /*#__PURE__*/ _jsx(Alert, {
|
|
200
|
+
severity: "error",
|
|
201
|
+
action: /*#__PURE__*/ _jsx(Button, {
|
|
202
|
+
color: "inherit",
|
|
203
|
+
size: "small",
|
|
204
|
+
onClick: ()=>setRetryNonce((n)=>n + 1),
|
|
205
|
+
children: 'Retry'
|
|
206
|
+
}),
|
|
207
|
+
children: 'We couldn’t load your payment setup. This says nothing about ' + 'whether payments are on — we could not reach the setting to ' + 'find out. Nothing has changed.'
|
|
208
|
+
}) : null,
|
|
209
|
+
!planReady ? /*#__PURE__*/ _jsx(Typography, {
|
|
210
|
+
variant: "body2",
|
|
211
|
+
color: "text.secondary",
|
|
212
|
+
children: 'Checking your plan…'
|
|
213
|
+
}) : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
214
|
+
children: [
|
|
215
|
+
!commerceEnabled ? /*#__PURE__*/ _jsx(Alert, {
|
|
216
|
+
severity: "info",
|
|
217
|
+
children: 'Selling requires a paid plan — upgrade on the billing page.'
|
|
218
|
+
}) : null,
|
|
219
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
220
|
+
variant: "body2",
|
|
221
|
+
color: "text.secondary",
|
|
222
|
+
children: 'Buyers pay on your own Stripe account; ' + `${Aglyn.PLATFORM_BRAND_LEGAL_NAME} collects a platform fee ` + 'per sale based on your plan:'
|
|
223
|
+
}),
|
|
224
|
+
/*#__PURE__*/ _jsxs(Typography, {
|
|
225
|
+
variant: "body2",
|
|
226
|
+
children: [
|
|
227
|
+
`Physical products: ${physicalPct}% · Digital products, ` + `services & bookings: ${digitalPct}%`,
|
|
228
|
+
physicalPct > 0 || digitalPct > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
229
|
+
component: "span",
|
|
230
|
+
variant: "caption",
|
|
231
|
+
color: "text.secondary",
|
|
232
|
+
children: ' — higher plans reduce fees to 0%'
|
|
233
|
+
}) : null
|
|
234
|
+
]
|
|
235
|
+
}),
|
|
236
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
237
|
+
variant: "body2",
|
|
238
|
+
color: "text.secondary",
|
|
239
|
+
children: 'Card processing is passed through at cost on top of that: ' + `${Aglyn.MARKETPLACE_PROCESSING_PERCENT_CARD}–` + `${Aglyn.MARKETPLACE_PROCESSING_PERCENT_BNPL}% + ` + `${Aglyn.MARKETPLACE_PROCESSING_FIXED_CENTS}¢ per online ` + 'sale, what Stripe charges to take the payment. It is not a ' + `${Aglyn.PLATFORM_BRAND_LEGAL_NAME} margin.`
|
|
240
|
+
}),
|
|
241
|
+
physicalPct > 0 || digitalPct > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
242
|
+
variant: "body2",
|
|
243
|
+
color: "text.secondary",
|
|
244
|
+
children: 'The fee is charged on the sale, not on how it was paid — ' + 'in-person cash and room-charge sales carry it too. On card ' + 'sales it is deducted from your Stripe payout; on cash and ' + 'room-charge sales there is no payout to deduct from, so it ' + `is added to your monthly ${Aglyn.PLATFORM_BRAND_LEGAL_NAME} ` + 'invoice instead.'
|
|
245
|
+
}) : null
|
|
246
|
+
]
|
|
247
|
+
}),
|
|
248
|
+
modeUnverified ? /*#__PURE__*/ _jsx(Alert, {
|
|
249
|
+
severity: "error",
|
|
250
|
+
children: 'Your Stripe account has not been verified for payments on ' + 'this site, so sales will be refused. Set up payments again ' + 'to verify it — if it was connected against Stripe test mode, ' + 'you will need to connect a live account.'
|
|
251
|
+
}) : null,
|
|
252
|
+
stripeState === 'loaded' && (profile == null ? void 0 : profile.lastPayoutFailureAtMs) ? /*#__PURE__*/ _jsx(Alert, {
|
|
253
|
+
severity: "warning",
|
|
254
|
+
variant: "outlined",
|
|
255
|
+
children: `A payout of $${(Number((_profile_lastPayoutFailureCents = profile.lastPayoutFailureCents) != null ? _profile_lastPayoutFailureCents : 0) / 100).toFixed(2)} did not reach your bank on ${new Date(Number(profile.lastPayoutFailureAtMs)).toLocaleDateString()} — ${String((_profile_lastPayoutFailureReason = profile.lastPayoutFailureReason) != null ? _profile_lastPayoutFailureReason : 'Stripe did not say why')} The money is still in your Stripe account. Open Stripe to fix your payout details.`
|
|
256
|
+
}) : null,
|
|
257
|
+
!planReady || stripeState !== 'loaded' ? null : isOwner ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
258
|
+
children: [
|
|
259
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
260
|
+
size: "small",
|
|
261
|
+
variant: chargesEnabled ? 'text' : 'contained',
|
|
262
|
+
color: "primary",
|
|
263
|
+
disabled: busy,
|
|
264
|
+
onClick: handleConnect,
|
|
265
|
+
sx: {
|
|
266
|
+
alignSelf: 'flex-start'
|
|
267
|
+
},
|
|
268
|
+
children: chargesEnabled ? 'Refresh status' : busy ? 'Opening Stripe…' : 'Set up payments'
|
|
269
|
+
}),
|
|
270
|
+
dashboardUrl ? /*#__PURE__*/ _jsx(Button, {
|
|
271
|
+
size: "small",
|
|
272
|
+
variant: "text",
|
|
273
|
+
color: "primary",
|
|
274
|
+
href: dashboardUrl,
|
|
275
|
+
target: "_blank",
|
|
276
|
+
rel: "noopener noreferrer",
|
|
277
|
+
sx: {
|
|
278
|
+
alignSelf: 'flex-start'
|
|
279
|
+
},
|
|
280
|
+
children: 'View payouts in Stripe'
|
|
281
|
+
}) : null
|
|
282
|
+
]
|
|
283
|
+
}) : /*#__PURE__*/ _jsx(Typography, {
|
|
284
|
+
variant: "caption",
|
|
285
|
+
color: "text.secondary",
|
|
286
|
+
children: 'Only the organization owner can set up payments.'
|
|
287
|
+
})
|
|
288
|
+
]
|
|
289
|
+
})
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
PaymentsSettingsCard.displayName = 'PaymentsSettingsCard';
|
|
293
|
+
export default PaymentsSettingsCard;
|
|
294
|
+
|
|
295
|
+
//# sourceMappingURL=payments-settings-card.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/components/console/payments-settings-card.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { trackEvent } from '@aglyn/aglyn/app-utils/analytics-events'\nimport * as Aglyn from '@aglyn/aglyn'\nimport { CardDisplay } from '@aglyn/shared-ui-jsx'\nimport { useSnackbar } from '@aglyn/shared-ui-snackstack'\nimport { Alert, Button, Chip, Stack, Typography } from '@mui/material'\nimport { doc } from 'firebase/firestore'\nimport { useCallback, useState } from 'react'\nimport { useFirestore, useUser } from '@aglyn/tenant-feature-instance'\nimport { useFirestoreDoc } from '@aglyn/tenant-feature-instance'\nimport { useOrgPlan } from '@aglyn/tenant-feature-instance'\nimport { pluginDocsHelp } from '@aglyn/aglyn'\nimport { authorizedFetch } from '@aglyn/shared-util-http/authorized-token'\n\nexport interface PaymentsSettingsCardProps {\n hostId: string\n}\n\n/**\n * Merchant payments card (AGL-284): Stripe Connect Express onboarding\n * status for the org owner + the plan's transaction-fee ladder so the\n * \"upgrade to kill fees\" motion (AGL-278) is visible where it matters.\n */\nexport function PaymentsSettingsCard(props: PaymentsSettingsCardProps) {\n const { hostId } = props\n const firestore = useFirestore()\n const { data: user } = useUser()\n const { enqueueSnackbar } = useSnackbar()\n const [busy, setBusy] = useState(false)\n /**\n * A one-time Stripe Express dashboard link, minted by the connect route on\n * request. Not persisted: login links are single-use and short-lived, so a\n * stored one would be a button that fails the second time it is pressed.\n */\n const [dashboardUrl, setDashboardUrl] = useState<string | null>(null)\n const { org, ready: planReady } = useOrgPlan(hostId)\n /** Bumped by Retry to re-subscribe the profile listen (AGL-1380). */\n const [retryNonce, setRetryNonce] = useState(0)\n const uid = (user as any)?.uid as string | undefined\n const { data: profile, status: profileStatus } = useFirestoreDoc<any>(\n // Held at null rather than addressed as `profiles/-pending-` — that\n // sentinel issued a guaranteed-denied read on every pre-auth mount, and\n // a denial lands in `status: 'error'`, which now means something.\n () => (uid ? doc(firestore, 'profiles', uid) : null),\n [firestore, uid, retryNonce],\n )\n const isOwner = Boolean(\n org?.ownerUid && (user as any)?.uid === org.ownerUid,\n )\n /**\n * Three outcomes, not two (AGL-1380). An absent profile doc is the value\n * BEFORE an answer as much as it is the value of a merchant who never\n * connected Stripe, so \"Not set up\" off a falsy `stripeChargesEnabled` is a\n * claim about this org's payment setup made without having heard back. It\n * is wrong in the direction that provokes action: the same falsy value\n * turns the button into \"Set up payments\", which sends a merchant who is\n * already taking money into Stripe onboarding.\n */\n const stripeState: 'pending' | 'error' | 'loaded' =\n !uid || profileStatus === 'loading'\n ? 'pending'\n : profileStatus === 'error'\n ? 'error'\n : 'loaded'\n /**\n * WHICH STRIPE WORLD THE STORED ACCOUNT BELONGS TO (AGL-2471).\n *\n * `stripeChargesEnabled: true` was the whole readiness claim, and a\n * production profile carrying it named a TEST-mode account: this card said\n * \"Charges enabled\" about three storefronts that could not take a single\n * payment. Only a literal boolean counts as recorded — the same\n * three-valued reading `connectLinkageIsReady` uses on the server, so the\n * chip and the checkout cannot disagree.\n */\n const modeVerified = typeof profile?.stripeAccountLivemode === 'boolean'\n const chargesConnected =\n stripeState === 'loaded' && Boolean(profile?.stripeChargesEnabled)\n const modeUnverified = chargesConnected && !modeVerified\n const chargesEnabled = chargesConnected && modeVerified\n const physicalPct = Aglyn.resolveTransactionFeePct(org, 'physical')\n const digitalPct = Aglyn.resolveTransactionFeePct(org, 'digital')\n const commerceEnabled = Aglyn.checkEntitlement(org, 'commerce')\n\n const handleConnect = useCallback(async () => {\n setBusy(true)\n try {\n const response = await authorizedFetch(user, '/api/commerce/connect', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ hostId }),\n })\n const payload = await response.json()\n if (response.status === 501) {\n return void enqueueSnackbar(\n 'Payments are not configured on this deployment',\n { variant: 'info', persist: false },\n )\n }\n if (!response.ok) {\n return void enqueueSnackbar(payload?.error ?? 'Payment setup failed', {\n variant: 'error',\n allowDuplicate: true,\n })\n }\n if (payload.chargesEnabled) {\n // \"% who connect Stripe\" — a GTM plan §6 activation metric\n // (AGL-1561). Gated on the TRANSITION, not the state: this handler\n // is a re-entrant create-or-resume, so it answers `chargesEnabled:\n // true` on every subsequent visit to a connected account, and a bare\n // event here would count one merchant once per click forever.\n // `chargesEnabled` is the state read from the profile BEFORE this\n // request, so the event fires only when onboarding actually completed.\n if (!chargesEnabled) trackEvent('stripe_connected', {})\n // CHARGES AND PAYOUTS ARE TWO FLAGS, AND ONLY ONE OF THEM IS THIS\n // SENTENCE (AGL-1997). `chargesEnabled` says Stripe will let the\n // account take money; whether the money can LEAVE is `payoutsEnabled`,\n // which the route answers alongside it. Charges-yes/payouts-no is an\n // ordinary Stripe state — verification pending or lapsed, no payout\n // method — and announcing \"Payments are enabled\" in it is false in the\n // direction that costs the merchant: they sell believing they are\n // paid, and the funds sit in a Connect account that cannot release\n // them. Read three-valued, so only a literal `false` from Stripe\n // downgrades the claim; an absent flag means unasked, not off.\n const payoutsBlocked = payload.payoutsEnabled === false\n // A WARNING THAT NAMES A PROBLEM MUST OFFER THE FIX.\n //\n // Stripe is the only place payouts can be released — an Express\n // account has no password and no direct login — so telling the\n // merchant their funds are stranded and then keeping them here is half\n // an answer. The route now mints the remediation link for exactly this\n // state; going there is the whole point of pressing the button.\n if (payoutsBlocked && payload.url) {\n return void window.location.assign(payload.url)\n }\n // Payouts are flowing, so the link is the Express dashboard: balance,\n // payout schedule, and the reason a payout failed. Held in state\n // rather than followed, because this click was a status check and\n // navigating away from one nobody asked to leave is its own defect.\n if (!payoutsBlocked && typeof payload.dashboardUrl === 'string') {\n setDashboardUrl(payload.dashboardUrl)\n }\n return void enqueueSnackbar(\n payoutsBlocked\n ? 'Connected — payouts are not released yet'\n : 'Payments are enabled',\n {\n variant: payoutsBlocked ? 'warning' : 'success',\n persist: false,\n },\n )\n }\n if (payload.url) window.location.assign(payload.url)\n } catch (error) {\n console.error(error)\n enqueueSnackbar('An error has occurred', {\n variant: 'error',\n allowDuplicate: true,\n })\n } finally {\n setBusy(false)\n }\n }, [user, hostId, chargesEnabled, enqueueSnackbar])\n\n return (\n <CardDisplay\n header={'Payments'}\n help={pluginDocsHelp('commerceEndToEnd', {\n anchor: '#1-connect-payments',\n })}\n contentGutterX\n contentGutterY\n >\n <Stack spacing={1.5}>\n <Stack direction=\"row\" spacing={1} sx={{ alignItems: 'center' }}>\n <Typography variant=\"body2\" sx={{ flex: 1 }}>\n {'Stripe account'}\n </Typography>\n {/*\n No chip at all on error: both labels it could carry — \"Charges\n enabled\" and \"Not set up\" — assert something we failed to find\n out. Whatever Stripe is doing right now it carries on doing.\n */}\n {stripeState === 'error' ? null : (\n <Chip\n size=\"small\"\n label={\n stripeState === 'pending'\n ? 'Checking…'\n : chargesEnabled\n ? 'Charges enabled'\n : modeUnverified\n ? 'Not verified'\n : 'Not set up'\n }\n color={\n stripeState === 'pending'\n ? 'default'\n : chargesEnabled\n ? 'success'\n : modeUnverified\n ? 'error'\n : 'warning'\n }\n variant=\"outlined\"\n />\n )}\n </Stack>\n {stripeState === 'error' ? (\n <Alert\n severity=\"error\"\n action={\n <Button\n color=\"inherit\"\n size=\"small\"\n onClick={() => setRetryNonce((n) => n + 1)}\n >\n {'Retry'}\n </Button>\n }\n >\n {'We couldn’t load your payment setup. This says nothing about ' +\n 'whether payments are on — we could not reach the setting to ' +\n 'find out. Nothing has changed.'}\n </Alert>\n ) : null}\n {/*\n Every line below reads the plan, and an org doc still in flight\n resolves to the FREE tier (AGL-1064) — which would flash \"Selling\n requires a paid plan\" and the wrong fee percentages at a paying\n seller, then correct itself. Say nothing until it is known.\n */}\n {!planReady ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Checking your plan…'}\n </Typography>\n ) : (\n <>\n {!commerceEnabled ? (\n <Alert severity=\"info\">\n {'Selling requires a paid plan — upgrade on the billing page.'}\n </Alert>\n ) : null}\n {/*\n THE LEGAL NAME, not the org's resolved `productName`\n (AGL-2351). This sentence says who takes money off the\n merchant's own Stripe account, and the application fee lands in\n the platform Stripe account — held by the operating entity, not\n by a white-label agency reselling the console. Naming the\n agency here would assert a fee relationship that does not\n exist. `PLATFORM_BRAND_LEGAL_NAME` still configures cleanly for\n a self-host operator, who really is the entity collecting it.\n */}\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Buyers pay on your own Stripe account; ' +\n `${Aglyn.PLATFORM_BRAND_LEGAL_NAME} collects a platform fee ` +\n 'per sale based on your plan:'}\n </Typography>\n {/* The DIGITAL rate is not products-only (AGL-2315). A paid\n booking is a service sale and resolves through the same\n `'service'`/digital axis, so a bookings-only merchant pays this\n exact number — and this card was the one place they could read\n their own rate while naming only \"products\". Stated here rather\n than adding a third figure: it is one rate, not two. */}\n <Typography variant=\"body2\">\n {`Physical products: ${physicalPct}% · Digital products, ` +\n `services & bookings: ${digitalPct}%`}\n {physicalPct > 0 || digitalPct > 0 ? (\n <Typography\n component=\"span\"\n variant=\"caption\"\n color=\"text.secondary\"\n >\n {' — higher plans reduce fees to 0%'}\n </Typography>\n ) : null}\n </Typography>\n {/* CARD PROCESSING, PASSED THROUGH AT COST (AGL-2152).\n\n Unconditional, including on the 0% plans, because it is\n exactly those plans where the merchant would otherwise read\n \"0%\" and be surprised by a deduction. Their PLATFORM fee\n really is zero — the figure below is Stripe's own charge for\n taking the payment, which every storefront sale incurs and\n which used to be absorbed silently out of the platform's\n balance rather than passed through.\n\n Named as a range rather than one number because the buyer\n chooses the payment method after the session is created:\n cards settle at the low end, buy-now-pay-later at the high\n end, and the deduction is sized for the dearest so a sale can\n never cost more to process than it collects. */}\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Card processing is passed through at cost on top of that: ' +\n `${Aglyn.MARKETPLACE_PROCESSING_PERCENT_CARD}–` +\n `${Aglyn.MARKETPLACE_PROCESSING_PERCENT_BNPL}% + ` +\n `${Aglyn.MARKETPLACE_PROCESSING_FIXED_CENTS}¢ per online ` +\n 'sale, what Stripe charges to take the payment. It is not a ' +\n `${Aglyn.PLATFORM_BRAND_LEGAL_NAME} margin.`}\n </Typography>\n {/* EVERY TENDER, AND HOW EACH IS COLLECTED (AGL-2111).\n\n Until now this card said \"per sale\" and meant it for online and\n card sales only: cash and room-charge sales at the register\n recorded no fee at all, so a merchant could read this sentence,\n ring everything as cash, and pay nothing. The fee now attaches\n to the sale on every tender, which makes the sentence above\n true — and creates a second, visible collection route the\n merchant has to be told about BEFORE it appears on their\n invoice, because it is money leaving by a door they have never\n seen it leave by.\n\n Shown only when a rate actually applies: on a 0% plan there is\n nothing to collect either way, and the paragraph would be noise\n on the card of the merchants who upgraded to escape fees. */}\n {physicalPct > 0 || digitalPct > 0 ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'The fee is charged on the sale, not on how it was paid — ' +\n 'in-person cash and room-charge sales carry it too. On card ' +\n 'sales it is deducted from your Stripe payout; on cash and ' +\n 'room-charge sales there is no payout to deduct from, so it ' +\n `is added to your monthly ${Aglyn.PLATFORM_BRAND_LEGAL_NAME} ` +\n 'invoice instead.'}\n </Typography>\n ) : null}\n </>\n )}\n {/*\n AGL-2471: connected, and refused by every money door because the\n account was never verified against this deployment's Stripe mode.\n \"Not set up\" would be a lie in the other direction — the merchant\n did set something up — so the card names what is actually wrong and\n what to do about it.\n */}\n {modeUnverified ? (\n <Alert severity=\"error\">\n {'Your Stripe account has not been verified for payments on ' +\n 'this site, so sales will be refused. Set up payments again ' +\n 'to verify it — if it was connected against Stripe test mode, ' +\n 'you will need to connect a live account.'}\n </Alert>\n ) : null}\n {/*\n The button's own label is a claim — \"Set up payments\" tells the\n owner they have none. Withheld until the answer is in, for the same\n reason as the chip (AGL-1380); on error the Retry above is the only\n action offered, because acting on a setup we could not read is how\n a connected merchant gets sent back through onboarding.\n */}\n {/*\n WHERE THE MONEY STOPPED. Mirrored onto this profile by the\n `payout.failed` handler and retired by the next successful payout, so\n it names a live problem rather than a scar. Without it a merchant sold\n into an account that could not release the funds and the card said\n \"Payments are enabled\" the whole time — the storefront looked healthy\n from every angle available to them.\n */}\n {stripeState === 'loaded' && profile?.lastPayoutFailureAtMs ? (\n <Alert severity=\"warning\" variant=\"outlined\">\n {`A payout of $${(\n Number(profile.lastPayoutFailureCents ?? 0) / 100\n ).toFixed(2)} did not reach your bank on ${new Date(\n Number(profile.lastPayoutFailureAtMs),\n ).toLocaleDateString()} — ${String(\n profile.lastPayoutFailureReason ?? 'Stripe did not say why',\n )} The money is still in your Stripe account. Open Stripe to fix your payout details.`}\n </Alert>\n ) : null}\n {!planReady || stripeState !== 'loaded' ? null : isOwner ? (\n <>\n <Button\n size=\"small\"\n variant={chargesEnabled ? 'text' : 'contained'}\n color=\"primary\"\n disabled={busy}\n onClick={handleConnect}\n sx={{ alignSelf: 'flex-start' }}\n >\n {chargesEnabled\n ? 'Refresh status'\n : busy\n ? 'Opening Stripe…'\n : 'Set up payments'}\n </Button>\n {/*\n Where the money actually is. Aglyn records none of it —\n no balance, no payout schedule, and no `payout.failed` handling\n anywhere — so a merchant whose payout bounced has no way to learn\n that from this console. An Express account has no direct login\n either, which leaves a link minted by the platform as the only\n route in. `target=\"_blank\"` because it leaves the app entirely.\n */}\n {dashboardUrl ? (\n <Button\n size=\"small\"\n variant=\"text\"\n color=\"primary\"\n href={dashboardUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n sx={{ alignSelf: 'flex-start' }}\n >\n {'View payouts in Stripe'}\n </Button>\n ) : null}\n </>\n ) : (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'Only the organization owner can set up payments.'}\n </Typography>\n )}\n </Stack>\n </CardDisplay>\n )\n}\nPaymentsSettingsCard.displayName = 'PaymentsSettingsCard'\n\nexport default PaymentsSettingsCard\n"],"names":["trackEvent","Aglyn","CardDisplay","useSnackbar","Alert","Button","Chip","Stack","Typography","doc","useCallback","useState","useFirestore","useUser","useFirestoreDoc","useOrgPlan","pluginDocsHelp","authorizedFetch","PaymentsSettingsCard","props","profile","hostId","firestore","data","user","enqueueSnackbar","busy","setBusy","dashboardUrl","setDashboardUrl","org","ready","planReady","retryNonce","setRetryNonce","uid","status","profileStatus","isOwner","Boolean","ownerUid","stripeState","modeVerified","stripeAccountLivemode","chargesConnected","stripeChargesEnabled","modeUnverified","chargesEnabled","physicalPct","resolveTransactionFeePct","digitalPct","commerceEnabled","checkEntitlement","handleConnect","response","method","headers","body","JSON","stringify","payload","json","variant","persist","ok","error","allowDuplicate","payoutsBlocked","payoutsEnabled","url","window","location","assign","console","header","help","anchor","contentGutterX","contentGutterY","spacing","direction","sx","alignItems","flex","size","label","color","severity","action","onClick","n","PLATFORM_BRAND_LEGAL_NAME","component","MARKETPLACE_PROCESSING_PERCENT_CARD","MARKETPLACE_PROCESSING_PERCENT_BNPL","MARKETPLACE_PROCESSING_FIXED_CENTS","lastPayoutFailureAtMs","Number","lastPayoutFailureCents","toFixed","Date","toLocaleDateString","String","lastPayoutFailureReason","disabled","alignSelf","href","target","rel","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,SAASA,UAAU,QAAQ,0CAAyC;AACpE,YAAYC,WAAW,eAAc;AACrC,SAASC,WAAW,QAAQ,uBAAsB;AAClD,SAASC,WAAW,QAAQ,8BAA6B;AACzD,SAASC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,UAAU,QAAQ,gBAAe;AACtE,SAASC,GAAG,QAAQ,qBAAoB;AACxC,SAASC,WAAW,EAAEC,QAAQ,QAAQ,QAAO;AAC7C,SAASC,YAAY,EAAEC,OAAO,QAAQ,iCAAgC;AACtE,SAASC,eAAe,QAAQ,iCAAgC;AAChE,SAASC,UAAU,QAAQ,iCAAgC;AAC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C,KAAK,GAAE,EAChD+E,OAAO,CAAC,GAAG,4BAA4B,EAAE,IAAIC,KAC7CH,OAAO7E,QAAQ4E,qBAAqB,GACpCK,kBAAkB,GAAG,GAAG,EAAEC,QAC1BlF,mCAAAA,QAAQmF,uBAAuB,YAA/BnF,mCAAmC,0BACnC,mFAAmF,CAAC;qBAEtF;gBACH,CAACY,aAAaS,gBAAgB,WAAW,OAAOH,wBAC/C;;sCACE,KAACjC;4BACC+E,MAAK;4BACLtB,SAASf,iBAAiB,SAAS;4BACnCuC,OAAM;4BACNkB,UAAU9E;4BACV+D,SAASpC;4BACT4B,IAAI;gCAAEwB,WAAW;4BAAa;sCAE7B1D,iBACG,mBACArB,OACE,oBACA;;wBAUPE,6BACC,KAACvB;4BACC+E,MAAK;4BACLtB,SAAQ;4BACRwB,OAAM;4BACNoB,MAAM9E;4BACN+E,QAAO;4BACPC,KAAI;4BACJ3B,IAAI;gCAAEwB,WAAW;4BAAa;sCAE7B;6BAED;;mCAGN,KAACjG;oBAAWsD,SAAQ;oBAAUwB,OAAM;8BACjC;;;;;AAMb;AACApE,qBAAqB2F,WAAW,GAAG;AAEnC,eAAe3F,qBAAoB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConsolePluginPageProps } from '@aglyn/aglyn';
|
|
2
|
+
/**
|
|
3
|
+
* POS register (AGL-312): touch-first full-screen sale surface —
|
|
4
|
+
* product grid with search/barcode (keyboard-wedge scanners type into
|
|
5
|
+
* the search box and press Enter), a register cart with a whole-sale
|
|
6
|
+
* discount, and cash / QR-card / reservation-folio settlement through
|
|
7
|
+
* the server-priced pos-order API. Receipts print via the browser.
|
|
8
|
+
*/
|
|
9
|
+
export declare function PosConsolePage({ hostId }: ConsolePluginPageProps): import("react").JSX.Element;
|
|
10
|
+
export declare namespace PosConsolePage {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
export default PosConsolePage;
|