@aglyn/plugins-commerce 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/package.json +13 -13
  2. package/src/lib/components/account-subscriptions.d.ts +51 -0
  3. package/src/lib/components/account-subscriptions.js +168 -0
  4. package/src/lib/components/account-subscriptions.js.map +1 -0
  5. package/src/lib/components/account.js +12 -48
  6. package/src/lib/components/account.js.map +1 -1
  7. package/src/lib/components/cart.js +30 -6
  8. package/src/lib/components/cart.js.map +1 -1
  9. package/src/lib/components/commerce-console-page.js +6 -0
  10. package/src/lib/components/commerce-console-page.js.map +1 -1
  11. package/src/lib/components/commerce-console-sections.d.ts +1 -1
  12. package/src/lib/components/commerce-console-sections.js +5 -0
  13. package/src/lib/components/commerce-console-sections.js.map +1 -1
  14. package/src/lib/components/console/paid-media.d.ts +1 -0
  15. package/src/lib/components/console/paid-media.js +15 -4
  16. package/src/lib/components/console/paid-media.js.map +1 -1
  17. package/src/lib/components/console/payments-settings-card.component.js +1 -1
  18. package/src/lib/components/console/payments-settings-card.component.js.map +1 -1
  19. package/src/lib/components/console/pos/pos-hardware-api.d.ts +10 -1
  20. package/src/lib/components/console/pos/pos-hardware-api.js.map +1 -1
  21. package/src/lib/components/console/pos/pos-hardware-buyer.component.js +2 -2
  22. package/src/lib/components/console/pos/pos-hardware-buyer.component.js.map +1 -1
  23. package/src/lib/components/console/pos/pos-hardware-sale-api.d.ts +2 -0
  24. package/src/lib/components/console/pos/pos-hardware-sale-api.js.map +1 -1
  25. package/src/lib/components/console/pos-cellular-control.component.d.ts +1 -1
  26. package/src/lib/components/console/pos-cellular-control.component.js +5 -5
  27. package/src/lib/components/console/pos-cellular-control.component.js.map +1 -1
  28. package/src/lib/components/console/pos-devices-card.component.js +2 -2
  29. package/src/lib/components/console/pos-devices-card.component.js.map +1 -1
  30. package/src/lib/components/console/pos-hardware-card.component.d.ts +5 -0
  31. package/src/lib/components/console/pos-hardware-card.component.js +77 -8
  32. package/src/lib/components/console/pos-hardware-card.component.js.map +1 -1
  33. package/src/lib/components/console/pos-hardware-orders-staff-page.component.js +137 -19
  34. package/src/lib/components/console/pos-hardware-orders-staff-page.component.js.map +1 -1
  35. package/src/lib/components/console/pos-page.component.js +19 -2
  36. package/src/lib/components/console/pos-page.component.js.map +1 -1
  37. package/src/lib/components/console/product-editor-dialog.component.js +21 -2
  38. package/src/lib/components/console/product-editor-dialog.component.js.map +1 -1
  39. package/src/lib/components/console/subscription-detail-dialog.component.d.ts +58 -0
  40. package/src/lib/components/console/subscription-detail-dialog.component.js +201 -0
  41. package/src/lib/components/console/subscription-detail-dialog.component.js.map +1 -0
  42. package/src/lib/components/console/subscriptions-card.component.d.ts +60 -0
  43. package/src/lib/components/console/subscriptions-card.component.js +280 -0
  44. package/src/lib/components/console/subscriptions-card.component.js.map +1 -0
  45. package/src/lib/components/hardware-terms-consent.d.ts +22 -0
  46. package/src/lib/components/hardware-terms-consent.js +85 -0
  47. package/src/lib/components/hardware-terms-consent.js.map +1 -0
  48. package/src/lib/components/product-detail.js +25 -5
  49. package/src/lib/components/product-detail.js.map +1 -1
  50. package/src/lib/constants/operator-alerts.d.ts +1 -1
  51. package/src/lib/constants/operator-alerts.js +4 -4
  52. package/src/lib/constants/operator-alerts.js.map +1 -1
  53. package/src/lib/model/commerce-orders.d.ts +6 -2
  54. package/src/lib/model/commerce-orders.js.map +1 -1
  55. package/src/lib/model/commerce-payment-methods.d.ts +24 -0
  56. package/src/lib/model/commerce-payment-methods.js +35 -0
  57. package/src/lib/model/commerce-payment-methods.js.map +1 -1
  58. package/src/lib/model/commerce.d.ts +6 -0
  59. package/src/lib/model/commerce.js.map +1 -1
  60. package/src/lib/model/index.d.ts +1 -0
  61. package/src/lib/model/index.js +1 -0
  62. package/src/lib/model/index.js.map +1 -1
  63. package/src/lib/model/paid-media.d.ts +8 -0
  64. package/src/lib/model/paid-media.js +13 -0
  65. package/src/lib/model/paid-media.js.map +1 -1
  66. package/src/lib/model/pos-hardware-in-person.d.ts +23 -2
  67. package/src/lib/model/pos-hardware-in-person.js +52 -20
  68. package/src/lib/model/pos-hardware-in-person.js.map +1 -1
  69. package/src/lib/model/pos-hardware-tax-summary.d.ts +5 -1
  70. package/src/lib/model/pos-hardware-tax-summary.js +2 -1
  71. package/src/lib/model/pos-hardware-tax-summary.js.map +1 -1
  72. package/src/lib/model/pos-hardware-terms.d.ts +37 -2
  73. package/src/lib/model/pos-hardware-terms.js +68 -3
  74. package/src/lib/model/pos-hardware-terms.js.map +1 -1
  75. package/src/lib/model/pos-hardware.d.ts +101 -15
  76. package/src/lib/model/pos-hardware.js +128 -18
  77. package/src/lib/model/pos-hardware.js.map +1 -1
  78. package/src/lib/model/pos-reader-splash.js +2 -2
  79. package/src/lib/model/pos-reader-splash.js.map +1 -1
  80. package/src/lib/model/product-write.d.ts +3 -0
  81. package/src/lib/model/subscription-view.d.ts +90 -0
  82. package/src/lib/model/subscription-view.js +176 -0
  83. package/src/lib/model/subscription-view.js.map +1 -0
  84. package/src/lib/server/billing-webhook.d.ts +4 -6
  85. package/src/lib/server/billing-webhook.js +109 -51
  86. package/src/lib/server/billing-webhook.js.map +1 -1
  87. package/src/lib/server/cart-checkout.js +45 -10
  88. package/src/lib/server/cart-checkout.js.map +1 -1
  89. package/src/lib/server/cart.js +15 -3
  90. package/src/lib/server/cart.js.map +1 -1
  91. package/src/lib/server/checkout.js +58 -16
  92. package/src/lib/server/checkout.js.map +1 -1
  93. package/src/lib/server/draft-order.js +7 -3
  94. package/src/lib/server/draft-order.js.map +1 -1
  95. package/src/lib/server/membership-account.d.ts +22 -0
  96. package/src/lib/server/membership-account.js +52 -8
  97. package/src/lib/server/membership-account.js.map +1 -1
  98. package/src/lib/server/pos-auth.d.ts +3 -3
  99. package/src/lib/server/pos-auth.js +3 -3
  100. package/src/lib/server/pos-auth.js.map +1 -1
  101. package/src/lib/server/pos-cellular-billing.js +1 -1
  102. package/src/lib/server/pos-cellular-billing.js.map +1 -1
  103. package/src/lib/server/pos-cellular-notify.js +1 -1
  104. package/src/lib/server/pos-cellular-notify.js.map +1 -1
  105. package/src/lib/server/pos-cellular.js +1 -1
  106. package/src/lib/server/pos-cellular.js.map +1 -1
  107. package/src/lib/server/pos-hardware-admin.js +86 -13
  108. package/src/lib/server/pos-hardware-admin.js.map +1 -1
  109. package/src/lib/server/pos-hardware-attach.js +5 -5
  110. package/src/lib/server/pos-hardware-attach.js.map +1 -1
  111. package/src/lib/server/pos-hardware-cancel.js +65 -0
  112. package/src/lib/server/pos-hardware-cancel.js.map +1 -1
  113. package/src/lib/server/pos-hardware-closure-notices.js +2 -5
  114. package/src/lib/server/pos-hardware-closure-notices.js.map +1 -1
  115. package/src/lib/server/pos-hardware-closure.js +5 -8
  116. package/src/lib/server/pos-hardware-closure.js.map +1 -1
  117. package/src/lib/server/pos-hardware-in-person.d.ts +2 -1
  118. package/src/lib/server/pos-hardware-in-person.js +72 -17
  119. package/src/lib/server/pos-hardware-in-person.js.map +1 -1
  120. package/src/lib/server/pos-hardware-notify.d.ts +2 -0
  121. package/src/lib/server/pos-hardware-notify.js +30 -5
  122. package/src/lib/server/pos-hardware-notify.js.map +1 -1
  123. package/src/lib/server/pos-hardware-readers.d.ts +25 -0
  124. package/src/lib/server/pos-hardware-readers.js +206 -85
  125. package/src/lib/server/pos-hardware-readers.js.map +1 -1
  126. package/src/lib/server/pos-hardware-returns.d.ts +8 -3
  127. package/src/lib/server/pos-hardware-returns.js +39 -7
  128. package/src/lib/server/pos-hardware-returns.js.map +1 -1
  129. package/src/lib/server/pos-hardware-sale-fields.d.ts +76 -0
  130. package/src/lib/server/pos-hardware-sale-fields.js +114 -1
  131. package/src/lib/server/pos-hardware-sale-fields.js.map +1 -1
  132. package/src/lib/server/pos-hardware-sale.d.ts +2 -0
  133. package/src/lib/server/pos-hardware-sale.js +1 -0
  134. package/src/lib/server/pos-hardware-sale.js.map +1 -1
  135. package/src/lib/server/pos-hardware-tax-return-source.js +7 -4
  136. package/src/lib/server/pos-hardware-tax-return-source.js.map +1 -1
  137. package/src/lib/server/pos-hardware-webhook.js +16 -3
  138. package/src/lib/server/pos-hardware-webhook.js.map +1 -1
  139. package/src/lib/server/pos-hardware.d.ts +14 -3
  140. package/src/lib/server/pos-hardware.js +83 -18
  141. package/src/lib/server/pos-hardware.js.map +1 -1
  142. package/src/lib/server/pos-ops-routes.js +2 -10
  143. package/src/lib/server/pos-ops-routes.js.map +1 -1
  144. package/src/lib/server/quote-pay.js +8 -4
  145. package/src/lib/server/quote-pay.js.map +1 -1
  146. package/src/lib/server/stream.d.ts +2 -0
  147. package/src/lib/server/stream.js +22 -2
  148. package/src/lib/server/stream.js.map +1 -1
  149. package/src/lib/server/tax-return-source.js +5 -1
  150. package/src/lib/server/tax-return-source.js.map +1 -1
  151. package/src/lib/server.js +2 -2
  152. package/src/lib/server.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/commerce/src/lib/constants/operator-alerts.ts"],"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\nimport type { OperatorAlertDefinition } from '@aglyn/aglyn/app-utils/operator-alerts'\nimport { BUNDLE_ID } from './bundle-common'\n\n/**\n * The storefront's operator alerts (AGL-3377): the money faults only this\n * plugin can see, declared in the registry's shape and registered from\n * `declarations.server`, so core lists none of them and an install without\n * commerce shows none of them on Staff → Operator alerts.\n *\n * Each is raised through `raiseOperatorAlert` with its definition, which\n * also registers it in a process whose declarations have not loaded yet.\n */\nconst DAY = 24 * 60\n\nexport const COMMERCE_CHARGEBACK_UNROUTABLE: OperatorAlertDefinition = {\n type: 'commerce.chargebackUnroutable',\n pluginId: BUNDLE_ID,\n label: 'Storefront chargeback could not be routed',\n description:\n 'A storefront chargeback matched no order, or more than one, so no order was flagged, no seller share reversed and no merchant told. A missing index means every storefront chargeback is being ignored.',\n tier: 'must',\n category: 'payments',\n title: 'A {{amount}} chargeback could not be routed to an order',\n body: '{{detail}}',\n delivery: 'immediate',\n dedupeWindowMinutes: DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_TAX_NOT_REVERSED: OperatorAlertDefinition = {\n type: 'commerce.taxNotReversed',\n pluginId: BUNDLE_ID,\n label: 'Subscription sales tax not reversed',\n description:\n 'Sales tax collected on a storefront subscription stayed with the merchant instead of coming back to the platform, which files and remits it. The platform may owe tax it does not hold.',\n tier: 'must',\n category: 'payments',\n title: 'Sales tax not reversed on invoice {{invoiceId}}',\n // `{{site}}` is the site's name and id (AGL-3432), so staff need not look\n // it up; the last sentence is the consequence the description states.\n body:\n '{{amount}} of sales tax on invoice {{invoiceId}} for site {{site}} was not pulled back from the merchant: {{reason}}. The platform files and remits that tax, so it may owe tax it does not hold.',\n delivery: 'immediate',\n dedupeWindowMinutes: 7 * DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_SELLER_SHARE_NOT_REVERSED: OperatorAlertDefinition = {\n type: 'commerce.sellerShareNotReversed',\n pluginId: BUNDLE_ID,\n label: 'Seller share not reversed on a lost dispute',\n description:\n 'A storefront dispute was lost and the merchant’s share could not be pulled back, so the platform is out the principal. Recover it by hand in Stripe.',\n tier: 'must',\n category: 'payments',\n title: 'Seller share not reversed on dispute {{disputeId}}',\n body:\n 'The lost dispute {{disputeId}} on order {{orderId}} from site {{site}} cost {{amount}}, and the merchant’s share was not reversed: {{reason}}. The platform is out that share until it is recovered by hand in Stripe.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_FEE_REPRICE_REFUSED: OperatorAlertDefinition = {\n type: 'commerce.feeRepriceRefused',\n pluginId: BUNDLE_ID,\n label: 'Platform fee correction refused',\n description:\n 'Stripe refused to change a storefront subscription’s platform fee, or to refund the part of a fee charged on the wrong base. The merchant is being charged a fee the plan does not set.',\n tier: 'must',\n category: 'payments',\n title: 'Platform fee not corrected on {{subject}}',\n body:\n 'The platform fee on {{subject}} for site {{site}} could not be corrected: {{reason}}. Until it is, the merchant is charged a fee its plan does not set.',\n delivery: 'immediate',\n dedupeWindowMinutes: 7 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A merchant paid for card readers in the POS hardware shop (AGL-4038). In\n * phase 1 a person places the order in Stripe's Terminal hardware shop, so\n * every paid order is work waiting on staff until it is marked ordered.\n */\nexport const COMMERCE_POS_HARDWARE_ORDER: OperatorAlertDefinition = {\n type: 'commerce.posHardwareOrder',\n pluginId: BUNDLE_ID,\n label: 'New hardware order',\n description:\n 'A workspace paid for card readers or accessories in the POS hardware shop. Place the order in the Stripe Dashboard’s Terminal hardware shop, shipping to the merchant’s address, then record the Stripe order id on Staff → Hardware orders.',\n tier: 'should',\n category: 'payments',\n title: 'New hardware order {{orderNumber}} for {{amount}}',\n body:\n 'Site {{site}} ordered {{items}} ({{amount}}, {{shipping}}). Place it in the Stripe Dashboard’s Terminal hardware shop, shipping to the address on the order, and record the Stripe order id on Staff → Hardware orders.',\n link: '/admin/hardware-orders',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A card taken offline on the Aglyn POS app's reader reached Stripe, but the\n * sale it belongs to never synced (AGL-4039). Raised by the hourly sweep once\n * the intent has waited past `POS_OFFLINE_CARD_UNSYNCED_ALERT_MS`, while there\n * is still time to sync it before Stripe's authorization lapses.\n */\nexport const COMMERCE_POS_OFFLINE_CARD_UNSYNCED: OperatorAlertDefinition = {\n type: 'commerce.posOfflineCardUnsynced',\n pluginId: BUNDLE_ID,\n label: 'Offline card sale never synced',\n description:\n 'A card taken offline on a register reached Stripe, but its sale never reached the store. An authorized card is never captured and lapses after about two days; a charged one has no order. The site’s managers are told too.',\n tier: 'should',\n category: 'payments',\n title: 'A {{amount}} card taken offline has no sale',\n body:\n 'Payment {{paymentIntentId}} ({{status}}) for site {{site}} was taken offline on register {{registerId}} {{age}} ago, and its sale never synced. Ask the store to open that register signed in as the member who rang it so the sale syncs. An authorized card that is not captured lapses about two days after it was taken.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A card taken offline was made out to a Stripe account that is not the\n * store's (AGL-4039): a stale offline kit, or a register that was tampered\n * with. The sync never captures it and records the order unpaid.\n */\nexport const COMMERCE_POS_OFFLINE_CARD_WRONG_ACCOUNT: OperatorAlertDefinition = {\n type: 'commerce.posOfflineCardWrongAccount',\n pluginId: BUNDLE_ID,\n label: 'Offline card made out to another Stripe account',\n description:\n 'A card taken offline on a register was set to pay a Stripe account that is not the store’s. The sale was recorded unpaid and the card was not captured. Check whether the account is the store’s own previous one before capturing it in Stripe, or let the authorization lapse.',\n tier: 'must',\n category: 'payments',\n title: 'A {{amount}} offline card was made out to another Stripe account',\n body:\n 'Payment {{paymentIntentId}} ({{status}}) on order {{orderId}} for site {{site}} pays account {{destination}}, but the store’s account is {{expected}}. The order is recorded unpaid and nothing was captured. If the payment already succeeded, the money is in that other account: recover or refund it in Stripe.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A hardware order already placed with Stripe was canceled and refunded\n * because its workspace was deleted or the account that placed it closed\n * (AGL-4038). The merchant has their money back; the platform has paid Stripe\n * for hardware that is still on its way unless someone cancels it there.\n */\nexport const COMMERCE_POS_HARDWARE_CANCELED_AFTER_ORDERING: OperatorAlertDefinition = {\n type: 'commerce.posHardwareCanceledAfterOrdering',\n pluginId: BUNDLE_ID,\n label: 'Hardware order canceled after it was placed with Stripe',\n description:\n 'A workspace was deleted, or the account that placed a hardware order was closed, after staff had placed the order with Stripe. The merchant was refunded in full. Cancel the order in the Stripe Dashboard’s Terminal hardware shop before it ships, or arrange its return with Stripe.',\n tier: 'must',\n category: 'payments',\n title: 'Cancel hardware order {{orderNumber}} with Stripe',\n // `{{stripeOrder}}` is ` (Stripe order …)` or blank, so the sentence reads\n // either way.\n body:\n 'Hardware order {{orderNumber}} ({{amount}}: {{items}}) was canceled and refunded in full to the merchant because {{reason}}, but it had already been placed with Stripe{{stripeOrder}}. Cancel it in the Stripe Dashboard’s Terminal hardware shop before it ships; if it has shipped, arrange its return with Stripe.',\n link: '/admin/hardware-orders',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * Stripe refused the refund of an unshipped hardware order while its\n * workspace or its buyer's account was closing (AGL-4038). The closure went\n * ahead, as decided, so the order may be gone from the staff page with the\n * merchant's money still held.\n */\nexport const COMMERCE_POS_HARDWARE_REFUND_FAILED: OperatorAlertDefinition = {\n type: 'commerce.posHardwareRefundFailed',\n pluginId: BUNDLE_ID,\n label: 'Hardware refund failed when a workspace or account closed',\n description:\n 'A hardware order had not shipped when its workspace was deleted or the account that placed it was closed, and Stripe refused its refund. The closure went ahead without it. Refund the payment in full in the Stripe Dashboard.',\n tier: 'must',\n category: 'payments',\n title: 'Refund hardware order {{orderNumber}} by hand: {{amount}}',\n body:\n 'Hardware order {{orderNumber}} ({{amount}}) had not shipped when {{reason}}, and Stripe refused its refund: {{error}}. The closure went ahead. Refund payment {{paymentIntentId}} in full in the Stripe Dashboard{{orderedNote}}.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A buyer asked to return a card reader they bought in person at the\n * platform's own store (AGL-4038), from their own purchase history. Staff\n * refund it from Staff → Hardware orders, or decline it there.\n */\nexport const COMMERCE_POS_HARDWARE_RETURN_REQUESTED: OperatorAlertDefinition = {\n type: 'commerce.posHardwareReturnRequested',\n pluginId: BUNDLE_ID,\n label: 'Card reader return requested',\n description:\n 'A workspace asked to return card reader hardware it bought in person. Arrange the return under Stripe’s hardware terms, then refund it or decline it on Staff → Hardware orders, under Return requested.',\n tier: 'should',\n category: 'payments',\n title: 'Return requested for hardware order {{orderNumber}} ({{amount}})',\n body:\n 'Workspace {{orgId}} asked to return {{items}} from hardware order {{orderNumber}} ({{amount}}), bought in person: “{{reason}}”. Refund it or decline it on Staff → Hardware orders, under Return requested.',\n link: '/admin/hardware-orders',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A workspace's monthly 4G charge for its Stripe Reader S710s did not\n * collect (AGL-4038): the card declined or asked for authentication (the\n * invoice is left open on their Billing page, which nothing retries), or\n * the workspace has no Stripe customer to bill. Stripe still bills the\n * platform for those readers' cellular service.\n */\nexport const COMMERCE_POS_CELLULAR_CHARGE_FAILED: OperatorAlertDefinition = {\n type: 'commerce.posCellularChargeFailed',\n pluginId: BUNDLE_ID,\n label: '4G charge for card readers not collected',\n description:\n 'A workspace’s monthly charge for 4G on its Stripe Reader S710s did not collect. Stripe still bills the platform for those readers. Follow up with the workspace, or turn 4G off for its stores.',\n tier: 'should',\n category: 'payments',\n title: '4G charge for {{month}} not collected: {{amount}}',\n body:\n 'Workspace {{orgId}} had 4G on {{readers}} card reader(s) in {{month}}, and its charge of {{amount}} was not collected: {{reason}}. Stripe still bills the platform for those readers.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * 4G could not be turned off at Stripe for a store that is gone (AGL-4038):\n * its workspace was deleted, or the store was, while its S710s had 4G. The\n * readers stay on the platform's Stripe account with cellular on, which\n * Stripe keeps billing the platform for, and nobody is charged for it.\n */\nexport const COMMERCE_POS_CELLULAR_TURN_OFF_FAILED: OperatorAlertDefinition = {\n type: 'commerce.posCellularTurnOffFailed',\n pluginId: BUNDLE_ID,\n label: '4G not turned off for a deleted store',\n description:\n 'A store with 4G on its Stripe Reader S710s was deleted, with its workspace or on its own, and Stripe refused to turn cellular off on its Terminal configuration. Turn it off in the Stripe Dashboard, or Stripe keeps billing the platform for it.',\n tier: 'must',\n category: 'payments',\n title: 'Turn off 4G on Terminal configuration {{configurationId}}',\n body:\n 'Store {{hostId}} of workspace {{orgId}} was deleted while its card readers had 4G, and Stripe refused to turn cellular off on Terminal configuration {{configurationId}}. Turn it off in the Stripe Dashboard (Terminal → Locations), or Stripe keeps billing the platform for those readers.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A workspace's monthly 4G charge stayed unpaid past the grace period\n * (AGL-4038), so 4G was turned off at Stripe for every one of its stores and\n * the members who manage its billing were emailed. Paying does not turn it\n * back on; the merchant does, once it is paid.\n */\nexport const COMMERCE_POS_CELLULAR_TURNED_OFF_UNPAID: OperatorAlertDefinition = {\n type: 'commerce.posCellularTurnedOffUnpaid',\n pluginId: BUNDLE_ID,\n label: '4G turned off for an unpaid charge',\n description:\n 'A workspace’s monthly 4G charge for its Stripe Reader S710s was still unpaid after the grace period, so 4G was turned off for its stores and the people who manage its billing were emailed. Follow up if the workspace asks; it turns 4G on again itself once the invoice is paid.',\n tier: 'should',\n category: 'payments',\n title: '4G turned off for workspace {{orgId}}: {{month}} unpaid ({{amount}})',\n body:\n 'Workspace {{orgId}} left its 4G charge of {{amount}} for {{month}} unpaid for {{graceDays}} days, so 4G was turned off at Stripe for its stores and the people who manage its billing were emailed. The invoice stays open on its Billing page.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_OPERATOR_ALERTS: readonly OperatorAlertDefinition[] = [\n COMMERCE_CHARGEBACK_UNROUTABLE,\n COMMERCE_TAX_NOT_REVERSED,\n COMMERCE_SELLER_SHARE_NOT_REVERSED,\n COMMERCE_FEE_REPRICE_REFUSED,\n COMMERCE_POS_HARDWARE_ORDER,\n COMMERCE_POS_OFFLINE_CARD_UNSYNCED,\n COMMERCE_POS_OFFLINE_CARD_WRONG_ACCOUNT,\n COMMERCE_POS_HARDWARE_CANCELED_AFTER_ORDERING,\n COMMERCE_POS_HARDWARE_REFUND_FAILED,\n COMMERCE_POS_HARDWARE_RETURN_REQUESTED,\n COMMERCE_POS_CELLULAR_CHARGE_FAILED,\n COMMERCE_POS_CELLULAR_TURN_OFF_FAILED,\n COMMERCE_POS_CELLULAR_TURNED_OFF_UNPAID,\n]\n"],"names":["BUNDLE_ID","DAY","COMMERCE_CHARGEBACK_UNROUTABLE","type","pluginId","label","description","tier","category","title","body","delivery","dedupeWindowMinutes","defaultEnabled","COMMERCE_TAX_NOT_REVERSED","COMMERCE_SELLER_SHARE_NOT_REVERSED","COMMERCE_FEE_REPRICE_REFUSED","COMMERCE_POS_HARDWARE_ORDER","link","COMMERCE_POS_OFFLINE_CARD_UNSYNCED","COMMERCE_POS_OFFLINE_CARD_WRONG_ACCOUNT","COMMERCE_POS_HARDWARE_CANCELED_AFTER_ORDERING","COMMERCE_POS_HARDWARE_REFUND_FAILED","COMMERCE_POS_HARDWARE_RETURN_REQUESTED","COMMERCE_POS_CELLULAR_CHARGE_FAILED","COMMERCE_POS_CELLULAR_TURN_OFF_FAILED","COMMERCE_POS_CELLULAR_TURNED_OFF_UNPAID","COMMERCE_OPERATOR_ALERTS"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,SAASA,SAAS,QAAQ,qBAAiB;AAE3C;;;;;;;;CAQC,GACD,MAAMC,MAAM,KAAK;AAEjB,OAAO,MAAMC,iCAA0D;IACrEC,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,MAAM;IACNC,UAAU;IACVC,qBAAqBX;IACrBY,gBAAgB;AAClB,EAAC;AAED,OAAO,MAAMC,4BAAqD;IAChEX,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;I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IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD,CAAA"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/commerce/src/lib/constants/operator-alerts.ts"],"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\nimport type { OperatorAlertDefinition } from '@aglyn/aglyn/app-utils/operator-alerts'\nimport { BUNDLE_ID } from './bundle-common'\n\n/**\n * The storefront's operator alerts (AGL-3377): the money faults only this\n * plugin can see, declared in the registry's shape and registered from\n * `declarations.server`, so core lists none of them and an install without\n * commerce shows none of them on Staff → Operator alerts.\n *\n * Each is raised through `raiseOperatorAlert` with its definition, which\n * also registers it in a process whose declarations have not loaded yet.\n */\nconst DAY = 24 * 60\n\nexport const COMMERCE_CHARGEBACK_UNROUTABLE: OperatorAlertDefinition = {\n type: 'commerce.chargebackUnroutable',\n pluginId: BUNDLE_ID,\n label: 'Storefront chargeback could not be routed',\n description:\n 'A storefront chargeback matched no order, or more than one, so no order was flagged, no seller share reversed and no merchant told. A missing index means every storefront chargeback is being ignored.',\n tier: 'must',\n category: 'payments',\n title: 'A {{amount}} chargeback could not be routed to an order',\n body: '{{detail}}',\n delivery: 'immediate',\n dedupeWindowMinutes: DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_TAX_NOT_REVERSED: OperatorAlertDefinition = {\n type: 'commerce.taxNotReversed',\n pluginId: BUNDLE_ID,\n label: 'Subscription sales tax not reversed',\n description:\n 'Sales tax collected on a storefront subscription stayed with the merchant instead of coming back to the platform, which files and remits it. The platform may owe tax it does not hold.',\n tier: 'must',\n category: 'payments',\n title: 'Sales tax not reversed on invoice {{invoiceId}}',\n // `{{site}}` is the site's name and id (AGL-3432), so staff need not look\n // it up; the last sentence is the consequence the description states.\n body:\n '{{amount}} of sales tax on invoice {{invoiceId}} for site {{site}} was not pulled back from the merchant: {{reason}}. The platform files and remits that tax, so it may owe tax it does not hold.',\n delivery: 'immediate',\n dedupeWindowMinutes: 7 * DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_SELLER_SHARE_NOT_REVERSED: OperatorAlertDefinition = {\n type: 'commerce.sellerShareNotReversed',\n pluginId: BUNDLE_ID,\n label: 'Seller share not reversed on a lost dispute',\n description:\n 'A storefront dispute was lost and the merchant’s share could not be pulled back, so the platform is out the principal. Recover it by hand in Stripe.',\n tier: 'must',\n category: 'payments',\n title: 'Seller share not reversed on dispute {{disputeId}}',\n body:\n 'The lost dispute {{disputeId}} on order {{orderId}} from site {{site}} cost {{amount}}, and the merchant’s share was not reversed: {{reason}}. The platform is out that share until it is recovered by hand in Stripe.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_FEE_REPRICE_REFUSED: OperatorAlertDefinition = {\n type: 'commerce.feeRepriceRefused',\n pluginId: BUNDLE_ID,\n label: 'Platform fee correction refused',\n description:\n 'Stripe refused to change a storefront subscription’s platform fee, or to refund the part of a fee charged on the wrong base. The merchant is being charged a fee the plan does not set.',\n tier: 'must',\n category: 'payments',\n title: 'Platform fee not corrected on {{subject}}',\n body:\n 'The platform fee on {{subject}} for site {{site}} could not be corrected: {{reason}}. Until it is, the merchant is charged a fee its plan does not set.',\n delivery: 'immediate',\n dedupeWindowMinutes: 7 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A merchant paid for card readers in the POS hardware shop (AGL-4038). In\n * phase 1 a person places the order in Stripe's Terminal hardware shop, so\n * every paid order is work waiting on staff until it is marked ordered.\n */\nexport const COMMERCE_POS_HARDWARE_ORDER: OperatorAlertDefinition = {\n type: 'commerce.posHardwareOrder',\n pluginId: BUNDLE_ID,\n label: 'New hardware order',\n description:\n 'A workspace paid for card readers or accessories in the POS hardware shop. Place the order in the Stripe Dashboard’s Terminal hardware shop, shipping to the merchant’s address, then record the Stripe order id on Staff → Hardware orders.',\n tier: 'should',\n category: 'payments',\n title: 'New hardware order {{orderNumber}} for {{amount}}',\n body:\n 'Site {{site}} ordered {{items}} ({{amount}}, {{shipping}}). Place it in the Stripe Dashboard’s Terminal hardware shop, shipping to the address on the order, and record the Stripe order id on Staff → Hardware orders.',\n link: '/admin/hardware-orders',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A card taken offline on the Aglyn POS app's reader reached Stripe, but the\n * sale it belongs to never synced (AGL-4039). Raised by the hourly sweep once\n * the intent has waited past `POS_OFFLINE_CARD_UNSYNCED_ALERT_MS`, while there\n * is still time to sync it before Stripe's authorization lapses.\n */\nexport const COMMERCE_POS_OFFLINE_CARD_UNSYNCED: OperatorAlertDefinition = {\n type: 'commerce.posOfflineCardUnsynced',\n pluginId: BUNDLE_ID,\n label: 'Offline card sale never synced',\n description:\n 'A card taken offline on a register reached Stripe, but its sale never reached the store. An authorized card is never captured and lapses after about two days; a charged one has no order. The site’s managers are told too.',\n tier: 'should',\n category: 'payments',\n title: 'A {{amount}} card taken offline has no sale',\n body:\n 'Payment {{paymentIntentId}} ({{status}}) for site {{site}} was taken offline on register {{registerId}} {{age}} ago, and its sale never synced. Ask the store to open that register signed in as the member who rang it so the sale syncs. An authorized card that is not captured lapses about two days after it was taken.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A card taken offline was made out to a Stripe account that is not the\n * store's (AGL-4039): a stale offline kit, or a register that was tampered\n * with. The sync never captures it and records the order unpaid.\n */\nexport const COMMERCE_POS_OFFLINE_CARD_WRONG_ACCOUNT: OperatorAlertDefinition = {\n type: 'commerce.posOfflineCardWrongAccount',\n pluginId: BUNDLE_ID,\n label: 'Offline card made out to another Stripe account',\n description:\n 'A card taken offline on a register was set to pay a Stripe account that is not the store’s. The sale was recorded unpaid and the card was not captured. Check whether the account is the store’s own previous one before capturing it in Stripe, or let the authorization lapse.',\n tier: 'must',\n category: 'payments',\n title: 'A {{amount}} offline card was made out to another Stripe account',\n body:\n 'Payment {{paymentIntentId}} ({{status}}) on order {{orderId}} for site {{site}} pays account {{destination}}, but the store’s account is {{expected}}. The order is recorded unpaid and nothing was captured. If the payment already succeeded, the money is in that other account: recover or refund it in Stripe.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A hardware order already placed with Stripe was canceled and refunded\n * because its workspace was deleted or the account that placed it closed\n * (AGL-4038). The merchant has their money back; the platform has paid Stripe\n * for hardware that is still on its way unless someone cancels it there.\n */\nexport const COMMERCE_POS_HARDWARE_CANCELED_AFTER_ORDERING: OperatorAlertDefinition = {\n type: 'commerce.posHardwareCanceledAfterOrdering',\n pluginId: BUNDLE_ID,\n label: 'Hardware order canceled after it was placed with Stripe',\n description:\n 'A workspace was deleted, or the account that placed a hardware order was closed, after staff had placed the order with Stripe. The merchant was refunded in full. Cancel the order in the Stripe Dashboard’s Terminal hardware shop before it ships, or arrange its return with Stripe.',\n tier: 'must',\n category: 'payments',\n title: 'Cancel hardware order {{orderNumber}} with Stripe',\n // `{{stripeOrder}}` is ` (Stripe order …)` or blank, so the sentence reads\n // either way.\n body:\n 'Hardware order {{orderNumber}} ({{amount}}: {{items}}) was canceled and refunded in full to the merchant because {{reason}}, but it had already been placed with Stripe{{stripeOrder}}. Cancel it in the Stripe Dashboard’s Terminal hardware shop before it ships; if it has shipped, arrange its return with Stripe.',\n link: '/admin/hardware-orders',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * Stripe refused the refund of an unshipped hardware order while its\n * workspace or its buyer's account was closing (AGL-4038). The closure went\n * ahead, as decided, so the order may be gone from the staff page with the\n * merchant's money still held.\n */\nexport const COMMERCE_POS_HARDWARE_REFUND_FAILED: OperatorAlertDefinition = {\n type: 'commerce.posHardwareRefundFailed',\n pluginId: BUNDLE_ID,\n label: 'Hardware refund failed when a workspace or account closed',\n description:\n 'A hardware order had not shipped when its workspace was deleted or the account that placed it was closed, and Stripe refused its refund. The closure went ahead without it. Refund the payment in full in the Stripe Dashboard.',\n tier: 'must',\n category: 'payments',\n title: 'Refund hardware order {{orderNumber}} by hand: {{amount}}',\n body:\n 'Hardware order {{orderNumber}} ({{amount}}) had not shipped when {{reason}}, and Stripe refused its refund: {{error}}. The closure went ahead. Refund payment {{paymentIntentId}} in full in the Stripe Dashboard{{orderedNote}}.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A buyer asked to return a card reader they bought in person at the\n * platform's own store (AGL-4038), from their own purchase history. Staff\n * refund it from Staff → Hardware orders, or decline it there.\n */\nexport const COMMERCE_POS_HARDWARE_RETURN_REQUESTED: OperatorAlertDefinition = {\n type: 'commerce.posHardwareReturnRequested',\n pluginId: BUNDLE_ID,\n label: 'Card reader return requested',\n description:\n 'A workspace asked to return card reader hardware it bought in person. Arrange the return under Stripe’s hardware terms, then refund it or decline it on Staff → Hardware orders, under Return requested.',\n tier: 'should',\n category: 'payments',\n title: 'Return requested for hardware order {{orderNumber}} ({{amount}})',\n body:\n 'Workspace {{orgId}} asked to return {{items}} from hardware order {{orderNumber}} ({{amount}}), bought in person: “{{reason}}”. Refund it or decline it on Staff → Hardware orders, under Return requested.',\n link: '/admin/hardware-orders',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A workspace's monthly 4G charge for its S710 readers did not\n * collect (AGL-4038): the card declined or asked for authentication (the\n * invoice is left open on their Billing page, which nothing retries), or\n * the workspace has no Stripe customer to bill. Stripe still bills the\n * platform for those readers' cellular service.\n */\nexport const COMMERCE_POS_CELLULAR_CHARGE_FAILED: OperatorAlertDefinition = {\n type: 'commerce.posCellularChargeFailed',\n pluginId: BUNDLE_ID,\n label: '4G charge for card readers not collected',\n description:\n 'A workspace’s monthly charge for 4G on its S710 readers did not collect. Stripe still bills the platform for those readers. Follow up with the workspace, or turn 4G off for its stores.',\n tier: 'should',\n category: 'payments',\n title: '4G charge for {{month}} not collected: {{amount}}',\n body:\n 'Workspace {{orgId}} had 4G on {{readers}} card reader(s) in {{month}}, and its charge of {{amount}} was not collected: {{reason}}. Stripe still bills the platform for those readers.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * 4G could not be turned off at Stripe for a store that is gone (AGL-4038):\n * its workspace was deleted, or the store was, while its S710s had 4G. The\n * readers stay on the platform's Stripe account with cellular on, which\n * Stripe keeps billing the platform for, and nobody is charged for it.\n */\nexport const COMMERCE_POS_CELLULAR_TURN_OFF_FAILED: OperatorAlertDefinition = {\n type: 'commerce.posCellularTurnOffFailed',\n pluginId: BUNDLE_ID,\n label: '4G not turned off for a deleted store',\n description:\n 'A store with 4G on its S710 readers was deleted, with its workspace or on its own, and Stripe refused to turn cellular off on its Terminal configuration. Turn it off in the Stripe Dashboard, or Stripe keeps billing the platform for it.',\n tier: 'must',\n category: 'payments',\n title: 'Turn off 4G on Terminal configuration {{configurationId}}',\n body:\n 'Store {{hostId}} of workspace {{orgId}} was deleted while its card readers had 4G, and Stripe refused to turn cellular off on Terminal configuration {{configurationId}}. Turn it off in the Stripe Dashboard (Terminal → Locations), or Stripe keeps billing the platform for those readers.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\n/**\n * A workspace's monthly 4G charge stayed unpaid past the grace period\n * (AGL-4038), so 4G was turned off at Stripe for every one of its stores and\n * the members who manage its billing were emailed. Paying does not turn it\n * back on; the merchant does, once it is paid.\n */\nexport const COMMERCE_POS_CELLULAR_TURNED_OFF_UNPAID: OperatorAlertDefinition = {\n type: 'commerce.posCellularTurnedOffUnpaid',\n pluginId: BUNDLE_ID,\n label: '4G turned off for an unpaid charge',\n description:\n 'A workspace’s monthly 4G charge for its S710 readers was still unpaid after the grace period, so 4G was turned off for its stores and the people who manage its billing were emailed. Follow up if the workspace asks; it turns 4G on again itself once the invoice is paid.',\n tier: 'should',\n category: 'payments',\n title: '4G turned off for workspace {{orgId}}: {{month}} unpaid ({{amount}})',\n body:\n 'Workspace {{orgId}} left its 4G charge of {{amount}} for {{month}} unpaid for {{graceDays}} days, so 4G was turned off at Stripe for its stores and the people who manage its billing were emailed. The invoice stays open on its Billing page.',\n delivery: 'immediate',\n dedupeWindowMinutes: 30 * DAY,\n defaultEnabled: true,\n}\n\nexport const COMMERCE_OPERATOR_ALERTS: readonly OperatorAlertDefinition[] = [\n COMMERCE_CHARGEBACK_UNROUTABLE,\n COMMERCE_TAX_NOT_REVERSED,\n COMMERCE_SELLER_SHARE_NOT_REVERSED,\n COMMERCE_FEE_REPRICE_REFUSED,\n COMMERCE_POS_HARDWARE_ORDER,\n COMMERCE_POS_OFFLINE_CARD_UNSYNCED,\n COMMERCE_POS_OFFLINE_CARD_WRONG_ACCOUNT,\n COMMERCE_POS_HARDWARE_CANCELED_AFTER_ORDERING,\n COMMERCE_POS_HARDWARE_REFUND_FAILED,\n COMMERCE_POS_HARDWARE_RETURN_REQUESTED,\n COMMERCE_POS_CELLULAR_CHARGE_FAILED,\n COMMERCE_POS_CELLULAR_TURN_OFF_FAILED,\n COMMERCE_POS_CELLULAR_TURNED_OFF_UNPAID,\n]\n"],"names":["BUNDLE_ID","DAY","COMMERCE_CHARGEBACK_UNROUTABLE","type","pluginId","label","description","tier","category","title","body","delivery","dedupeWindowMinutes","defaultEnabled","COMMERCE_TAX_NOT_REVERSED","COMMERCE_SELLER_SHARE_NOT_REVERSED","COMMERCE_FEE_REPRICE_REFUSED","COMMERCE_POS_HARDWARE_ORDER","link","COMMERCE_POS_OFFLINE_CARD_UNSYNCED","COMMERCE_POS_OFFLINE_CARD_WRONG_ACCOUNT","COMMERCE_POS_HARDWARE_CANCELED_AFTER_ORDERING","COMMERCE_POS_HARDWARE_REFUND_FAILED","COMMERCE_POS_HARDWARE_RETURN_REQUESTED","COMMERCE_POS_CELLULAR_CHARGE_FAILED","COMMERCE_POS_CELLULAR_TURN_OFF_FAILED","COMMERCE_POS_CELLULAR_TURNED_OFF_UNPAID","COMMERCE_OPERATOR_ALERTS"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,SAASA,SAAS,QAAQ,qBAAiB;AAE3C;;;;;;;;CAQC,GACD,MAAMC,MAAM,KAAK;AAEjB,OAAO,MAAMC,iCAA0D;IACrEC,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,MAAM;IACNC,UAAU;IACVC,qBAAqBX;IACrBY,gBAAgB;AAClB,EAAC;AAED,OAAO,MAAMC,4BAAqD;IAChEX,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACP,0EAA0E;IAC1E,sEAAsE;IACtEC,MACE;IACFC,UAAU;IACVC,qBAAqB,IAAIX;IACzBY,gBAAgB;AAClB,EAAC;AAED,OAAO,MAAME,qCAA8D;IACzEZ,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,MACE;IACFC,UAAU;IACVC,qBAAqB,KAAKX;IAC1BY,gBAAgB;AAClB,EAAC;AAED,OAAO,MAAMG,+BAAwD;IACnEb,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,MACE;IACFC,UAAU;IACVC,qBAAqB,IAAIX;IACzBY,gBAAgB;AAClB,EAAC;AAED;;;;CAIC,GACD,OAAO,MAAMI,8BAAuD;IAClEd,MAA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C;AAED;;;;;;CAMC,GACD,OAAO,MAAMW,sCAA+D;IAC1ErB,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,MACE;IACFC,UAAU;IACVC,qBAAqB,KAAKX;IAC1BY,gBAAgB;AAClB,EAAC;AAED;;;;;CAKC,GACD,OAAO,MAAMY,wCAAiE;IAC5EtB,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,MACE;IACFC,UAAU;IACVC,qBAAqB,KAAKX;IAC1BY,gBAAgB;AAClB,EAAC;AAED;;;;;CAKC,GACD,OAAO,MAAMa,0CAAmE;IAC9EvB,MAAM;IACNC,UAAUJ;IACVK,OAAO;IACPC,aACE;IACFC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,MACE;IACFC,UAAU;IACVC,qBAAqB,KAAKX;IAC1BY,gBAAgB;AAClB,EAAC;AAED,OAAO,MAAMc,2BAA+D;IAC1EzB;IACAY;IACAC;IACAC;IACAC;IACAE;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD,CAAA"}
@@ -523,16 +523,20 @@ export interface HostOrder {
523
523
  /**
524
524
  * How the buyer of a register sale of hardware agreed to the terms of sale
525
525
  * (AGL-4038, `model/pos-hardware-terms.ts`): on the tablet, on the
526
- * customer display, or by the receipt-and-sign notice. The first one stands.
526
+ * customer display, or by the receipt-and-sign notice; or, on an order
527
+ * from the platform's own online store, ticked at checkout (`online`) with
528
+ * business use confirmed. The first one stands.
527
529
  */
528
530
  hardwareTermsAcceptance?: {
529
531
  version: string;
530
532
  sections: string;
531
- method: 'tablet' | 'display' | 'notice';
533
+ method: 'tablet' | 'display' | 'notice' | 'online';
532
534
  atMs: number;
533
535
  staffUid: string | null;
534
536
  ip: string | null;
535
537
  userAgent: string | null;
538
+ /** The buyer confirmed business use, at an online checkout. */
539
+ businessUse?: boolean;
536
540
  };
537
541
  /** Who put the terms of sale on the customer display, and when: the acceptance names them. */
538
542
  hardwareTermsRequest?: {