@aglyn/plugins-commerce 1.0.0-beta.244 → 1.0.0-beta.246
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/README.md +4 -1
- package/package.json +13 -13
- package/src/lib/components/commerce-console-page.js +10 -0
- package/src/lib/components/commerce-console-page.js.map +1 -1
- package/src/lib/components/console/product-zones.d.ts +7 -1
- package/src/lib/components/console/product-zones.js.map +1 -1
- package/src/lib/components/console/products-hub-zone.component.d.ts +3 -2
- package/src/lib/components/console/products-hub-zone.component.js +9 -1
- package/src/lib/components/console/products-hub-zone.component.js.map +1 -1
- package/src/lib/components/console/review-settings-card.component.d.ts +14 -0
- package/src/lib/components/console/review-settings-card.component.js +168 -0
- package/src/lib/components/console/review-settings-card.component.js.map +1 -0
- package/src/lib/components/console/reviews-moderation-card.component.d.ts +14 -0
- package/src/lib/components/console/reviews-moderation-card.component.js +85 -11
- package/src/lib/components/console/reviews-moderation-card.component.js.map +1 -1
- package/src/lib/components/product-reviews.d.ts +29 -1
- package/src/lib/components/product-reviews.js +97 -12
- package/src/lib/components/product-reviews.js.map +1 -1
- package/src/lib/model/commerce.d.ts +11 -2
- package/src/lib/model/commerce.js +14 -2
- package/src/lib/model/commerce.js.map +1 -1
- package/src/lib/model/index.d.ts +1 -0
- package/src/lib/model/index.js +1 -0
- package/src/lib/model/index.js.map +1 -1
- package/src/lib/model/product-reviews.d.ts +124 -0
- package/src/lib/model/product-reviews.js +133 -0
- package/src/lib/model/product-reviews.js.map +1 -0
- package/src/lib/model/store-setup-content.d.ts +145 -0
- package/src/lib/model/store-setup-content.js +813 -0
- package/src/lib/model/store-setup-content.js.map +1 -0
- package/src/lib/server/membership-reset.js +8 -2
- package/src/lib/server/membership-reset.js.map +1 -1
- package/src/lib/server/order-event-triggers.d.ts +2 -0
- package/src/lib/server/order-event-triggers.js +18 -1
- package/src/lib/server/order-event-triggers.js.map +1 -1
- package/src/lib/server/review-requests.d.ts +102 -0
- package/src/lib/server/review-requests.js +346 -0
- package/src/lib/server/review-requests.js.map +1 -0
- package/src/lib/server/review-tokens.d.ts +82 -0
- package/src/lib/server/review-tokens.js +119 -0
- package/src/lib/server/review-tokens.js.map +1 -0
- package/src/lib/server/reviews.d.ts +36 -3
- package/src/lib/server/reviews.js +310 -52
- package/src/lib/server/reviews.js.map +1 -1
- package/src/lib/server/store-setup-ai-capability.d.ts +61 -0
- package/src/lib/server/store-setup-ai-capability.js +343 -0
- package/src/lib/server/store-setup-ai-capability.js.map +1 -0
- package/src/lib/server/store-setup-ai-writer.console.d.ts +27 -0
- package/src/lib/server/store-setup-ai-writer.console.js +44 -0
- package/src/lib/server/store-setup-ai-writer.console.js.map +1 -0
- package/src/lib/server/store-setup-ai-writer.d.ts +37 -0
- package/src/lib/server/store-setup-ai-writer.js +174 -0
- package/src/lib/server/store-setup-ai-writer.js.map +1 -0
- package/src/lib/server.js +27 -0
- package/src/lib/server.js.map +1 -1
- package/src/lib/tenant-emails.js +58 -0
- package/src/lib/tenant-emails.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/tenant-emails.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 { TenantEmailEntry } from '@aglyn/shared-util-email'\n\n/** The human order number every buyer order email names (AGL-3610). */\nconst ORDER_NUMBER_TOKEN = {\n name: 'order.number',\n description: 'The order number, as the store shows it',\n sample: '#1042',\n} as const\n\n/**\n * The buyer's private order-status page (AGL-3610): a signed link, so it\n * opens without an account and only for this order.\n */\nconst ORDER_STATUS_URL_TOKEN = {\n name: 'order.statusUrl',\n description:\n 'Link to the order status page: status, shipments and tracking. Private ' +\n 'to the buyer; it needs no account',\n sample: 'https://shop.example.com/order-status?o=ord_123&t=…',\n} as const\n\n/** Where a pickup order is collected (AGL-3624). */\nconst PICKUP_LOCATION_TOKEN = {\n name: 'pickup.location',\n description: 'The pickup location’s name and address',\n sample: 'Main Street shop, 12 Main St, Springfield',\n} as const\n\nconst ORDER_FOOTER_REASON =\n 'You’re receiving this because you placed an order with {{host.businessName}}.'\n\n/**\n * The emails a site sends its own customers through Commerce (AGL-769/770).\n *\n * Declared here, by the plugin that sends them, and compiled into the\n * platform's tenant email catalog (`TENANT_EMAILS` in\n * `@aglyn/shared-util-email`) by `tools/scripts/generate-plugin-manifests.mjs`\n * (AGL-3080): the catalog's readers include the send path, which loads no\n * plugin code, so a runtime registry it had not filled would quietly send\n * the text card in place of the site's designed email. Regenerate after\n * changing an entry; `--check` refuses a stale catalog.\n *\n * Most commerce sends are designable in the email besigner; a `fixed` entry\n * flips to `besigner` when its send site is wired to `renderHostEmail`\n * (AGL-770).\n */\nexport function commerceTenantEmails(): readonly TenantEmailEntry[] {\n return [\n {\n key: 'order-receipt',\n name: 'Order receipt',\n description: 'Sent to the buyer after a successful order or checkout.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Receipt for your order',\n mergeTokens: [\n {\n name: 'order.summary',\n description: 'The ordered items, one per line (with any license/download links)',\n sample: 'House Blend × 2 — $24.00',\n },\n {\n name: 'order.total',\n description: 'Order total',\n sample: '$24.00',\n },\n {\n name: 'order.ref',\n description: 'Order reference id',\n sample: 'cs_test_123',\n },\n {\n name: 'store.receiptFooter',\n description:\n 'The Receipt footer from the store settings; empty when none is set',\n sample: 'Returns are accepted within 30 days.',\n },\n ORDER_NUMBER_TOKEN,\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Thanks for your purchase!', variant: 'heading' },\n {\n block: 'text',\n text: 'Here is the receipt for your order from {{host.businessName}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: 'Total charged: {{order.total}}', variant: 'body' },\n { block: 'text', text: '{{store.receiptFooter}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n {\n block: 'text',\n text: 'Order reference: {{order.ref}}',\n variant: 'caption',\n },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-shipped',\n name: 'Order shipped',\n description:\n 'Tells the buyer part or all of their order is on its way, with the ' +\n 'carrier and a tracking link when the shipment has one. Sent once per ' +\n 'shipment.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} has shipped',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'shipment.summary',\n description: 'The items in this shipment, one per line',\n sample: '2× House Blend',\n },\n {\n name: 'shipment.carrier',\n description: 'The carrier; empty when none was recorded',\n sample: 'UPS',\n },\n {\n name: 'shipment.trackingNumber',\n description: 'The tracking number; empty when none was recorded',\n sample: '1Z999AA10123456784',\n },\n {\n name: 'shipment.tracking',\n description:\n 'A sentence with the carrier, tracking number and tracking link; ' +\n 'empty when the shipment has no tracking number',\n sample:\n 'Tracking: UPS 1Z999AA10123456784 — https://www.ups.com/track?tracknum=1Z999AA10123456784',\n },\n {\n name: 'shipment.remaining',\n description:\n 'A sentence saying how many items are still to ship; empty when ' +\n 'this shipment completes the order',\n sample: '1 more item will ship separately.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order is on its way', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} shipped items from order {{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{shipment.summary}}', variant: 'body' },\n { block: 'text', text: '{{shipment.tracking}}', variant: 'body' },\n { block: 'text', text: '{{shipment.remaining}}', variant: 'body' },\n { block: 'button', label: 'Track your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-delivered',\n name: 'Order delivered',\n description: 'Tells the buyer their order was marked delivered.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} was delivered',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order was delivered', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} marked order {{order.number}} as delivered.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n {\n block: 'text',\n text:\n 'If something is missing or not right, reply to this email or ' +\n 'contact {{host.businessName}}.',\n variant: 'caption',\n },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-refunded',\n name: 'Order refunded',\n description:\n 'Tells the buyer a refund was issued, for how much and, when the ' +\n 'store refunded named items, which ones. Sent once per refund.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Refund for your order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'refund.amount',\n description: 'The amount of this refund',\n sample: '$12.00',\n },\n {\n name: 'refund.summary',\n description:\n 'The refunded items, one per line; empty when the refund was by ' +\n 'amount only',\n sample: '1× House Blend',\n },\n {\n name: 'refund.note',\n description:\n 'Whether the order is now fully refunded, as a sentence',\n sample: 'Your order has been refunded in full.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your refund is on its way', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} refunded {{refund.amount}} on order ' +\n '{{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{refund.summary}}', variant: 'body' },\n { block: 'text', text: '{{refund.note}}', variant: 'body' },\n {\n block: 'text',\n text:\n 'Refunds go back to the original payment method and usually ' +\n 'appear within 5 to 10 business days, depending on your bank.',\n variant: 'caption',\n },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-cancelled',\n name: 'Order canceled',\n description: 'Tells the buyer their order was canceled.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} was canceled',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n {\n name: 'cancel.note',\n description:\n 'What happens to the payment, as a sentence; empty when nothing ' +\n 'was paid',\n sample:\n 'Any payment you made will be refunded, and you will get a ' +\n 'separate email when it is.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order was canceled', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} canceled order {{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: '{{cancel.note}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n // Pickup and the store's own delivery (AGL-3624).\n {\n key: 'order-ready-for-pickup',\n name: 'Order ready for pickup',\n description:\n 'Tells the buyer their pickup order is ready, where to collect it, ' +\n 'the pickup hours and any arrival instructions.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} is ready for pickup',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n PICKUP_LOCATION_TOKEN,\n {\n name: 'pickup.hours',\n description: 'The location’s pickup hours; empty when it lists none',\n sample: 'Pickup hours:\\nMo-Fr 09:00-17:00',\n },\n {\n name: 'pickup.instructions',\n description: 'What to do on arrival, as the store wrote it; empty when it wrote none',\n sample: 'Ring the bell at the side door.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order is ready for pickup', variant: 'heading' },\n {\n block: 'text',\n text: 'Order {{order.number}} is ready at {{pickup.location}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: '{{pickup.hours}}', variant: 'body' },\n { block: 'text', text: '{{pickup.instructions}}', variant: 'body' },\n {\n block: 'text',\n text: 'Bring your order number, {{order.number}}.',\n variant: 'caption',\n },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-picked-up',\n name: 'Order picked up',\n description: 'Confirms to the buyer that their pickup order was collected.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'You picked up order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n PICKUP_LOCATION_TOKEN,\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Thanks for picking up your order', variant: 'heading' },\n {\n block: 'text',\n text: 'Order {{order.number}} was picked up from {{pickup.location}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n {\n block: 'text',\n text:\n 'If something is missing or not right, reply to this email or ' +\n 'contact {{host.businessName}}.',\n variant: 'caption',\n },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-out-for-delivery',\n name: 'Order out for delivery',\n description:\n 'Tells the buyer the store’s own driver is on the way with their ' +\n 'local delivery, in the window they booked.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} is out for delivery',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n {\n name: 'delivery.window',\n description: 'The delivery window the buyer booked',\n sample: 'Tue, Oct 14, 9:00 AM – 12:00 PM',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order is on its way', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} is out delivering order {{order.number}}. ' +\n 'Your window: {{delivery.window}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'sale-notification',\n name: 'New sale',\n description: 'Notifies the seller when an order is placed.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'New order on {{site.name}}',\n mergeTokens: [\n {\n name: 'site.name',\n description: 'The site the sale happened on',\n sample: 'Northwind Coffee',\n },\n {\n name: 'order.summary',\n description: 'The ordered items',\n sample: 'House Blend — $12.00',\n },\n { name: 'order.total', description: 'Order total', sample: '$12.00' },\n {\n name: 'buyer.email',\n description: \"The buyer's email\",\n sample: 'buyer@example.com',\n },\n {\n name: 'order.ref',\n description: 'Order reference id',\n sample: 'cs_test_123',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'You made a sale', variant: 'heading' },\n {\n block: 'text',\n text: 'A new order came in on {{site.name}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: 'Total: {{order.total}}', variant: 'body' },\n {\n block: 'text',\n text: 'Buyer: {{buyer.email}} · Order {{order.ref}}',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because you manage {{host.businessName}}.',\n },\n {\n key: 'reservation-confirmed',\n name: 'Reservation confirmed',\n description: 'Confirms a paid reservation to the customer.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Reservation confirmed',\n mergeTokens: [\n {\n name: 'reservation.checkIn',\n description: 'Check-in date',\n sample: 'Mon, 01 Jun 2026',\n },\n {\n name: 'reservation.nights',\n description: 'Number of nights',\n sample: '2',\n },\n {\n name: 'reservation.paid',\n description:\n 'What the guest was charged today, lodging tax included; a ' +\n 'charge that carried lodging tax names it, as in “$254.40, ' +\n 'including $14.40 lodging tax”',\n sample: '$240.00',\n },\n {\n name: 'reservation.balance',\n description:\n 'What is still owed for the stay and where it is paid, as a ' +\n 'sentence; empty when the stay is paid in full',\n sample: 'Still to pay: $360.00, at the property. It has not been charged.',\n },\n {\n name: 'reservation.ref',\n description: 'Reservation reference id',\n sample: 'resv_123',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Reservation confirmed', variant: 'heading' },\n {\n block: 'text',\n text: 'Your stay at {{host.businessName}} is confirmed.',\n variant: 'body',\n },\n {\n block: 'text',\n text: 'Check-in: {{reservation.checkIn}}',\n variant: 'body',\n },\n { block: 'text', text: 'Nights: {{reservation.nights}}', variant: 'body' },\n {\n block: 'text',\n text: 'Paid today: {{reservation.paid}}',\n variant: 'body',\n },\n { block: 'text', text: '{{reservation.balance}}', variant: 'body' },\n {\n block: 'text',\n text: 'Reference: {{reservation.ref}}',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because you made a reservation with {{host.businessName}}.',\n },\n {\n key: 'gift-card',\n name: 'Gift card delivery',\n description: 'Delivers a purchased gift card to its recipient.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your gift card for {{host.businessName}}',\n mergeTokens: [\n {\n name: 'giftcard.code',\n description: 'The gift card code',\n sample: 'GC-ABC123DEF456',\n },\n {\n name: 'giftcard.value',\n description: 'The gift card value',\n sample: '$25.00',\n },\n {\n name: 'giftcard.note',\n description:\n 'The note written when the card was issued by hand; empty for a ' +\n 'card bought at checkout',\n sample: 'Happy birthday, Sam!',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Your gift card', variant: 'heading' },\n {\n block: 'text',\n text: 'You have a {{giftcard.value}} gift card for {{host.businessName}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{giftcard.note}}', variant: 'body' },\n {\n block: 'text',\n text: 'Gift card code: {{giftcard.code}}',\n variant: 'body',\n },\n {\n block: 'text',\n text: 'Enter the code at checkout on {{host.url}} to use its balance.',\n variant: 'body',\n },\n {\n block: 'button',\n label: 'Visit {{host.businessName}}',\n href: '{{host.url}}',\n },\n ],\n footerReason:\n 'You’re receiving this because a gift card from {{host.businessName}} was sent to this address.',\n },\n {\n key: 'supplier-fulfillment',\n name: 'Supplier fulfillment',\n description: 'Tells a dropship supplier there is a new order to fulfill.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'fixed',\n },\n {\n key: 'back-in-stock',\n name: 'Back in stock',\n description: 'Tells a customer a product they watched is available again.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Back in stock: {{product.name}}',\n mergeTokens: [\n {\n name: 'product.name',\n description: 'The product that restocked',\n sample: 'House Blend',\n },\n {\n name: 'product.url',\n description: 'Link to the product page',\n sample: 'https://shop.example.com/products/house-blend',\n },\n ],\n defaultBody: [\n {\n block: 'text',\n text: '{{product.name}} is back in stock at {{host.businessName}}.',\n variant: 'body',\n },\n { block: 'button', label: 'View product', href: '{{product.url}}' },\n ],\n footerReason:\n 'You’re receiving this because you asked {{host.businessName}} to tell you when this was back.',\n },\n {\n key: 'abandoned-cart',\n name: 'Abandoned cart',\n description: 'Reminds a shopper of items left in their cart.',\n // The cron refuses to send this without the entitlement\n // (`process-abandoned.ts:92`), so the console has to say so (AGL-2081).\n requiresFeature: 'abandonedCart',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'You left something in your cart',\n mergeTokens: [\n {\n name: 'cart.url',\n description: 'Link back to the shopper cart',\n sample: 'https://shop.example.com/cart',\n },\n ],\n defaultBody: [\n {\n block: 'text',\n text:\n 'You left items in your cart at {{host.businessName}}. Pick up ' +\n 'where you left off.',\n variant: 'body',\n },\n { block: 'button', label: 'Return to cart', href: '{{cart.url}}' },\n {\n block: 'text',\n text: 'Nothing in your cart is held for you.',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because you started a checkout with {{host.businessName}}.',\n },\n {\n key: 'member-post',\n name: 'New member post',\n description: 'Notifies members when new members-only content is posted.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: '{{post.title}}',\n mergeTokens: [\n { name: 'post.title', description: 'The post’s title', sample: 'This month in the studio' },\n {\n name: 'post.body',\n description: 'The post, as its author wrote it',\n sample: 'Three new pieces are up for members first.',\n },\n ],\n defaultBody: [\n { block: 'text', text: '{{post.title}}', variant: 'heading' },\n { block: 'text', text: '{{post.body}}', variant: 'body' },\n ],\n footerReason: 'You’re receiving this because you’re a member of {{host.businessName}}.',\n },\n {\n key: 'member-password-reset',\n name: 'Member password reset',\n description:\n \"Resets a site member's password — a store-member account, separate \" +\n 'from a console login. Sent when the member asks, and when a site ' +\n 'administrator starts a reset for them.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Reset your {{site.name}} password',\n mergeTokens: [\n { name: 'site.name', description: 'The site’s name', sample: 'Northwind Coffee' },\n {\n name: 'reset.intro',\n description: 'Who started the reset',\n sample: 'Someone asked to reset the password for your Northwind Coffee account.',\n },\n {\n name: 'resetUrl',\n description: 'The one-time reset link',\n sample: 'https://shop.example.com/recover?token=…',\n },\n {\n name: 'reset.note',\n description: 'How long the link lasts, and what to do if unexpected',\n sample:\n 'The link works once and expires in 1 hour. If you did not ask for ' +\n 'this, you can safely ignore this email — your password is unchanged.',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Reset your password', variant: 'heading' },\n { block: 'text', text: '{{reset.intro}}', variant: 'body' },\n { block: 'button', label: 'Set a new password', href: '{{resetUrl}}' },\n { block: 'text', text: '{{reset.note}}', variant: 'caption' },\n ],\n footerReason:\n 'You’re receiving this because a password reset was started for your ' +\n '{{host.businessName}} account.',\n },\n {\n key: 'member-password-changed',\n name: 'Member password changed',\n description:\n 'Tells a site member that a site administrator set a new password on ' +\n 'their account.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your {{site.name}} password was changed',\n mergeTokens: [\n { name: 'site.name', description: 'The site’s name', sample: 'Northwind Coffee' },\n {\n name: 'signInUrl',\n description: 'Where the member signs back in',\n sample: 'https://shop.example.com',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Your password was changed', variant: 'heading' },\n {\n block: 'text',\n text:\n 'An administrator of {{site.name}} set a new password on your ' +\n 'account and signed you out on every device. To sign back in, ' +\n 'get the new password from them, or choose \"Forgot password?\" on ' +\n 'the sign-in page to set your own.',\n variant: 'body',\n },\n { block: 'button', label: 'Sign in', href: '{{signInUrl}}' },\n {\n block: 'text',\n text: 'If you did not expect this, contact the site owner.',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because the password on your ' +\n '{{host.businessName}} account was changed.',\n },\n {\n key: 'newsletter-confirmation',\n name: 'Subscription confirmation',\n description:\n 'Asks someone who signed up for a site’s emails to confirm the address ' +\n 'before anything is sent to it.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Confirm your subscription',\n mergeTokens: [\n {\n name: 'stream.name',\n description: 'What they signed up for',\n sample: 'Newsletter',\n },\n {\n name: 'confirmUrl',\n description: 'The confirmation link',\n sample: 'https://shop.example.com/subscribe/confirm?token=…',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Confirm your subscription', variant: 'heading' },\n {\n block: 'text',\n text:\n 'Please confirm that you want to get {{stream.name}} emails from ' +\n '{{host.businessName}} at this address.',\n variant: 'body',\n },\n { block: 'button', label: 'Confirm my subscription', href: '{{confirmUrl}}' },\n {\n block: 'text',\n text:\n 'The link works for three days. If you did not sign up, ignore this ' +\n 'message — nothing will be sent.',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because this address was entered on ' +\n '{{host.businessName}}’s signup form.',\n },\n ...returnTenantEmails(),\n ]\n}\n\n/** The items a return covers, one per line. */\nconst RETURN_ITEMS_TOKEN = {\n name: 'return.items',\n description: 'The items being returned, one per line, with the reason',\n sample: '1× House Blend — Arrived damaged',\n} as const\n\n/** The merchant's note on a return; empty when they left none. */\nconst RETURN_NOTE_TOKEN = {\n name: 'return.note',\n description: 'The store’s note to the buyer on this return; empty when none',\n sample: 'Please include the original packaging.',\n} as const\n\n/**\n * The return emails (AGL-3611): one to the store when a buyer asks, and one\n * to the buyer at each answer. Their own block, beside the order emails\n * rather than among them, because those belong to the order notifications.\n */\nfunction returnTenantEmails(): readonly TenantEmailEntry[] {\n return [\n {\n key: 'return-requested',\n name: 'Return requested',\n description:\n 'Tells the store a buyer asked to return items, with what and why, so ' +\n 'someone can approve or decline it.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Return requested for order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n RETURN_ITEMS_TOKEN,\n {\n name: 'buyer.email',\n description: 'The buyer’s email',\n sample: 'buyer@example.com',\n },\n {\n name: 'return.customerNote',\n description: 'What the buyer wrote; empty when they wrote nothing',\n sample: 'The lid was cracked.',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'A buyer asked for a return', variant: 'heading' },\n {\n block: 'text',\n text: '{{buyer.email}} wants to return items from order {{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'text', text: '{{return.customerNote}}', variant: 'body' },\n {\n block: 'text',\n text: 'Approve or decline it under Products → Returns.',\n variant: 'caption',\n },\n ],\n footerReason: 'You’re receiving this because you manage {{host.businessName}}.',\n },\n {\n key: 'return-approved',\n name: 'Return approved',\n description:\n 'Tells the buyer their return was approved and how to send the items ' +\n 'back, with the return label when the store attached one.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your return for order {{order.number}} is approved',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n RETURN_ITEMS_TOKEN,\n RETURN_NOTE_TOKEN,\n {\n name: 'return.label',\n description:\n 'A sentence with the return label link and its tracking; empty ' +\n 'when the store attached no label',\n sample: 'Print your return label: https://labels.example.com/r/123',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your return is approved', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} approved the return of:',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'text', text: '{{return.note}}', variant: 'body' },\n { block: 'text', text: '{{return.label}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'return-declined',\n name: 'Return declined',\n description: 'Tells the buyer their return was declined, with the store’s note.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'About your return for order {{order.number}}',\n mergeTokens: [ORDER_NUMBER_TOKEN, RETURN_ITEMS_TOKEN, RETURN_NOTE_TOKEN, ORDER_STATUS_URL_TOKEN],\n defaultBody: [\n { block: 'text', text: 'We could not accept this return', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} declined the return of:',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'text', text: '{{return.note}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'return-refunded',\n name: 'Return refunded',\n description: 'Tells the buyer their return was received and refunded, and how much.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your refund for order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n RETURN_ITEMS_TOKEN,\n {\n name: 'return.refundTotal',\n description: 'The amount refunded for this return',\n sample: '$24.00',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your return is refunded', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} received your return and refunded ' +\n '{{return.refundTotal}} to your original payment method.',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n ]\n}\n"],"names":["ORDER_NUMBER_TOKEN","name","description","sample","ORDER_STATUS_URL_TOKEN","PICKUP_LOCATION_TOKEN","ORDER_FOOTER_REASON","commerceTenantEmails","key","pluginId","plugin","control","defaultSubject","mergeTokens","defaultBody","block","text","variant","label","href","footerReason","requiresFeature","returnTenantEmails","RETURN_ITEMS_TOKEN","RETURN_NOTE_TOKEN"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAID,qEAAqE,GACrE,MAAMA,qBAAqB;IACzBC,MAAM;IACNC,aAAa;IACbC,QAAQ;AACV;AAEA;;;CAGC,GACD,MAAMC,yBAAyB;IAC7BH,MAAM;IACNC,aACE,4EACA;IACFC,QAAQ;AACV;AAEA,kDAAkD,GAClD,MAAME,wBAAwB;IAC5BJ,MAAM;IACNC,aAAa;IACbC,QAAQ;AACV;AAEA,MAAMG,sBACJ;AAEF;;;;;;;;;;;;;;CAcC,GACD,OAAO,SAASC;IACd,OAAO;QACL;YACEC,KAAK;YACLP,MAAM;YACNC,aAAa;YACbO,UAAU;YACVC,QAAQ;YACRC,SAAS;YACTC,gBAAgB;YAChBC,aAAa;gBACX;oBACEZ,MAAM;oBACNC,aAAa;oBACbC,QAAQ;gBACV;gBACA;oBACEF,MAAM;oBACNC,aAAa;oBACbC,QAAQ;gBACV;gBACA;oBACEF,MAAM;oBACNC,aAAa;oBACbC,QAAQ;gBACV;gBACA;oBACEF,MAAM;oBACNC,aACE;oBACFC,QAAQ;gBACV;gB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AC1E;YACDC,cAAcd;QAChB;QACA;YACEE,KAAK;YACLP,MAAM;YACNC,aAAa;YACbO,UAAU;YACVC,QAAQ;YACRC,SAAS;YACTC,gBAAgB;YAChBC,aAAa;gBAACb;gBAAoBuB;gBAAoBC;gBAAmBpB;aAAuB;YAChGU,aAAa;gBACX;oBAAEC,OAAO;oBAAQC,MAAM;oBAAmCC,SAAS;gBAAU;gBAC7E;oBACEF,OAAO;oBACPC,MAAM;oBACNC,SAAS;gBACX;gBACA;oBAAEF,OAAO;oBAAQC,MAAM;oBAAoBC,SAAS;gBAAO;gBAC3D;oBAAEF,OAAO;oBAAQC,MAAM;oBAAmBC,SAAS;gBAAO;gBAC1D;oBAAEF,OAAO;oBAAUG,OAAO;oBAAmBC,MAAM;gBAAsB;aAC1E;YACDC,cAAcd;QAChB;QACA;YACEE,KAAK;YACLP,MAAM;YACNC,aAAa;YACbO,UAAU;YACVC,QAAQ;YACRC,SAAS;YACTC,gBAAgB;YAChBC,aAAa;gBACXb;gBACAuB;gBACA;oBACEtB,MAAM;oBACNC,aAAa;oBACbC,QAAQ;gBACV;gBACAC;aACD;YACDU,aAAa;gBACX;oBAAEC,OAAO;oBAAQC,MAAM;oBAA2BC,SAAS;gBAAU;gBACrE;oBACEF,OAAO;oBACPC,MACE,6DACA;oBACFC,SAAS;gBACX;gBACA;oBAAEF,OAAO;oBAAQC,MAAM;oBAAoBC,SAAS;gBAAO;gBAC3D;oBAAEF,OAAO;oBAAUG,OAAO;oBAAmBC,MAAM;gBAAsB;aAC1E;YACDC,cAAcd;QAChB;KACD;AACH"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/tenant-emails.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 { TenantEmailEntry } from '@aglyn/shared-util-email'\n\n/** The human order number every buyer order email names (AGL-3610). */\nconst ORDER_NUMBER_TOKEN = {\n name: 'order.number',\n description: 'The order number, as the store shows it',\n sample: '#1042',\n} as const\n\n/**\n * The buyer's private order-status page (AGL-3610): a signed link, so it\n * opens without an account and only for this order.\n */\nconst ORDER_STATUS_URL_TOKEN = {\n name: 'order.statusUrl',\n description:\n 'Link to the order status page: status, shipments and tracking. Private ' +\n 'to the buyer; it needs no account',\n sample: 'https://shop.example.com/order-status?o=ord_123&t=…',\n} as const\n\n/** Where a pickup order is collected (AGL-3624). */\nconst PICKUP_LOCATION_TOKEN = {\n name: 'pickup.location',\n description: 'The pickup location’s name and address',\n sample: 'Main Street shop, 12 Main St, Springfield',\n} as const\n\nconst ORDER_FOOTER_REASON =\n 'You’re receiving this because you placed an order with {{host.businessName}}.'\n\n/**\n * The emails a site sends its own customers through Commerce (AGL-769/770).\n *\n * Declared here, by the plugin that sends them, and compiled into the\n * platform's tenant email catalog (`TENANT_EMAILS` in\n * `@aglyn/shared-util-email`) by `tools/scripts/generate-plugin-manifests.mjs`\n * (AGL-3080): the catalog's readers include the send path, which loads no\n * plugin code, so a runtime registry it had not filled would quietly send\n * the text card in place of the site's designed email. Regenerate after\n * changing an entry; `--check` refuses a stale catalog.\n *\n * Most commerce sends are designable in the email besigner; a `fixed` entry\n * flips to `besigner` when its send site is wired to `renderHostEmail`\n * (AGL-770).\n */\nexport function commerceTenantEmails(): readonly TenantEmailEntry[] {\n return [\n {\n key: 'order-receipt',\n name: 'Order receipt',\n description: 'Sent to the buyer after a successful order or checkout.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Receipt for your order',\n mergeTokens: [\n {\n name: 'order.summary',\n description: 'The ordered items, one per line (with any license/download links)',\n sample: 'House Blend × 2 — $24.00',\n },\n {\n name: 'order.total',\n description: 'Order total',\n sample: '$24.00',\n },\n {\n name: 'order.ref',\n description: 'Order reference id',\n sample: 'cs_test_123',\n },\n {\n name: 'store.receiptFooter',\n description:\n 'The Receipt footer from the store settings; empty when none is set',\n sample: 'Returns are accepted within 30 days.',\n },\n ORDER_NUMBER_TOKEN,\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Thanks for your purchase!', variant: 'heading' },\n {\n block: 'text',\n text: 'Here is the receipt for your order from {{host.businessName}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: 'Total charged: {{order.total}}', variant: 'body' },\n { block: 'text', text: '{{store.receiptFooter}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n {\n block: 'text',\n text: 'Order reference: {{order.ref}}',\n variant: 'caption',\n },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-shipped',\n name: 'Order shipped',\n description:\n 'Tells the buyer part or all of their order is on its way, with the ' +\n 'carrier and a tracking link when the shipment has one. Sent once per ' +\n 'shipment.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} has shipped',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'shipment.summary',\n description: 'The items in this shipment, one per line',\n sample: '2× House Blend',\n },\n {\n name: 'shipment.carrier',\n description: 'The carrier; empty when none was recorded',\n sample: 'UPS',\n },\n {\n name: 'shipment.trackingNumber',\n description: 'The tracking number; empty when none was recorded',\n sample: '1Z999AA10123456784',\n },\n {\n name: 'shipment.tracking',\n description:\n 'A sentence with the carrier, tracking number and tracking link; ' +\n 'empty when the shipment has no tracking number',\n sample:\n 'Tracking: UPS 1Z999AA10123456784 — https://www.ups.com/track?tracknum=1Z999AA10123456784',\n },\n {\n name: 'shipment.remaining',\n description:\n 'A sentence saying how many items are still to ship; empty when ' +\n 'this shipment completes the order',\n sample: '1 more item will ship separately.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order is on its way', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} shipped items from order {{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{shipment.summary}}', variant: 'body' },\n { block: 'text', text: '{{shipment.tracking}}', variant: 'body' },\n { block: 'text', text: '{{shipment.remaining}}', variant: 'body' },\n { block: 'button', label: 'Track your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-delivered',\n name: 'Order delivered',\n description: 'Tells the buyer their order was marked delivered.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} was delivered',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order was delivered', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} marked order {{order.number}} as delivered.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n {\n block: 'text',\n text:\n 'If something is missing or not right, reply to this email or ' +\n 'contact {{host.businessName}}.',\n variant: 'caption',\n },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-refunded',\n name: 'Order refunded',\n description:\n 'Tells the buyer a refund was issued, for how much and, when the ' +\n 'store refunded named items, which ones. Sent once per refund.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Refund for your order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'refund.amount',\n description: 'The amount of this refund',\n sample: '$12.00',\n },\n {\n name: 'refund.summary',\n description:\n 'The refunded items, one per line; empty when the refund was by ' +\n 'amount only',\n sample: '1× House Blend',\n },\n {\n name: 'refund.note',\n description:\n 'Whether the order is now fully refunded, as a sentence',\n sample: 'Your order has been refunded in full.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your refund is on its way', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} refunded {{refund.amount}} on order ' +\n '{{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{refund.summary}}', variant: 'body' },\n { block: 'text', text: '{{refund.note}}', variant: 'body' },\n {\n block: 'text',\n text:\n 'Refunds go back to the original payment method and usually ' +\n 'appear within 5 to 10 business days, depending on your bank.',\n variant: 'caption',\n },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-cancelled',\n name: 'Order canceled',\n description: 'Tells the buyer their order was canceled.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} was canceled',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n {\n name: 'cancel.note',\n description:\n 'What happens to the payment, as a sentence; empty when nothing ' +\n 'was paid',\n sample:\n 'Any payment you made will be refunded, and you will get a ' +\n 'separate email when it is.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order was canceled', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} canceled order {{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: '{{cancel.note}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n // Pickup and the store's own delivery (AGL-3624).\n {\n key: 'order-ready-for-pickup',\n name: 'Order ready for pickup',\n description:\n 'Tells the buyer their pickup order is ready, where to collect it, ' +\n 'the pickup hours and any arrival instructions.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} is ready for pickup',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n PICKUP_LOCATION_TOKEN,\n {\n name: 'pickup.hours',\n description: 'The location’s pickup hours; empty when it lists none',\n sample: 'Pickup hours:\\nMo-Fr 09:00-17:00',\n },\n {\n name: 'pickup.instructions',\n description: 'What to do on arrival, as the store wrote it; empty when it wrote none',\n sample: 'Ring the bell at the side door.',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order is ready for pickup', variant: 'heading' },\n {\n block: 'text',\n text: 'Order {{order.number}} is ready at {{pickup.location}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: '{{pickup.hours}}', variant: 'body' },\n { block: 'text', text: '{{pickup.instructions}}', variant: 'body' },\n {\n block: 'text',\n text: 'Bring your order number, {{order.number}}.',\n variant: 'caption',\n },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-picked-up',\n name: 'Order picked up',\n description: 'Confirms to the buyer that their pickup order was collected.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'You picked up order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n PICKUP_LOCATION_TOKEN,\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Thanks for picking up your order', variant: 'heading' },\n {\n block: 'text',\n text: 'Order {{order.number}} was picked up from {{pickup.location}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n {\n block: 'text',\n text:\n 'If something is missing or not right, reply to this email or ' +\n 'contact {{host.businessName}}.',\n variant: 'caption',\n },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'order-out-for-delivery',\n name: 'Order out for delivery',\n description:\n 'Tells the buyer the store’s own driver is on the way with their ' +\n 'local delivery, in the window they booked.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your order {{order.number}} is out for delivery',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'order.summary',\n description: 'The ordered items, one per line',\n sample: '2× House Blend',\n },\n {\n name: 'delivery.window',\n description: 'The delivery window the buyer booked',\n sample: 'Tue, Oct 14, 9:00 AM – 12:00 PM',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your order is on its way', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} is out delivering order {{order.number}}. ' +\n 'Your window: {{delivery.window}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'sale-notification',\n name: 'New sale',\n description: 'Notifies the seller when an order is placed.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'New order on {{site.name}}',\n mergeTokens: [\n {\n name: 'site.name',\n description: 'The site the sale happened on',\n sample: 'Northwind Coffee',\n },\n {\n name: 'order.summary',\n description: 'The ordered items',\n sample: 'House Blend — $12.00',\n },\n { name: 'order.total', description: 'Order total', sample: '$12.00' },\n {\n name: 'buyer.email',\n description: \"The buyer's email\",\n sample: 'buyer@example.com',\n },\n {\n name: 'order.ref',\n description: 'Order reference id',\n sample: 'cs_test_123',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'You made a sale', variant: 'heading' },\n {\n block: 'text',\n text: 'A new order came in on {{site.name}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{order.summary}}', variant: 'body' },\n { block: 'text', text: 'Total: {{order.total}}', variant: 'body' },\n {\n block: 'text',\n text: 'Buyer: {{buyer.email}} · Order {{order.ref}}',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because you manage {{host.businessName}}.',\n },\n {\n key: 'reservation-confirmed',\n name: 'Reservation confirmed',\n description: 'Confirms a paid reservation to the customer.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Reservation confirmed',\n mergeTokens: [\n {\n name: 'reservation.checkIn',\n description: 'Check-in date',\n sample: 'Mon, 01 Jun 2026',\n },\n {\n name: 'reservation.nights',\n description: 'Number of nights',\n sample: '2',\n },\n {\n name: 'reservation.paid',\n description:\n 'What the guest was charged today, lodging tax included; a ' +\n 'charge that carried lodging tax names it, as in “$254.40, ' +\n 'including $14.40 lodging tax”',\n sample: '$240.00',\n },\n {\n name: 'reservation.balance',\n description:\n 'What is still owed for the stay and where it is paid, as a ' +\n 'sentence; empty when the stay is paid in full',\n sample: 'Still to pay: $360.00, at the property. It has not been charged.',\n },\n {\n name: 'reservation.ref',\n description: 'Reservation reference id',\n sample: 'resv_123',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Reservation confirmed', variant: 'heading' },\n {\n block: 'text',\n text: 'Your stay at {{host.businessName}} is confirmed.',\n variant: 'body',\n },\n {\n block: 'text',\n text: 'Check-in: {{reservation.checkIn}}',\n variant: 'body',\n },\n { block: 'text', text: 'Nights: {{reservation.nights}}', variant: 'body' },\n {\n block: 'text',\n text: 'Paid today: {{reservation.paid}}',\n variant: 'body',\n },\n { block: 'text', text: '{{reservation.balance}}', variant: 'body' },\n {\n block: 'text',\n text: 'Reference: {{reservation.ref}}',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because you made a reservation with {{host.businessName}}.',\n },\n {\n key: 'gift-card',\n name: 'Gift card delivery',\n description: 'Delivers a purchased gift card to its recipient.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your gift card for {{host.businessName}}',\n mergeTokens: [\n {\n name: 'giftcard.code',\n description: 'The gift card code',\n sample: 'GC-ABC123DEF456',\n },\n {\n name: 'giftcard.value',\n description: 'The gift card value',\n sample: '$25.00',\n },\n {\n name: 'giftcard.note',\n description:\n 'The note written when the card was issued by hand; empty for a ' +\n 'card bought at checkout',\n sample: 'Happy birthday, Sam!',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Your gift card', variant: 'heading' },\n {\n block: 'text',\n text: 'You have a {{giftcard.value}} gift card for {{host.businessName}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{giftcard.note}}', variant: 'body' },\n {\n block: 'text',\n text: 'Gift card code: {{giftcard.code}}',\n variant: 'body',\n },\n {\n block: 'text',\n text: 'Enter the code at checkout on {{host.url}} to use its balance.',\n variant: 'body',\n },\n {\n block: 'button',\n label: 'Visit {{host.businessName}}',\n href: '{{host.url}}',\n },\n ],\n footerReason:\n 'You’re receiving this because a gift card from {{host.businessName}} was sent to this address.',\n },\n {\n key: 'supplier-fulfillment',\n name: 'Supplier fulfillment',\n description: 'Tells a dropship supplier there is a new order to fulfill.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'fixed',\n },\n {\n key: 'back-in-stock',\n name: 'Back in stock',\n description: 'Tells a customer a product they watched is available again.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Back in stock: {{product.name}}',\n mergeTokens: [\n {\n name: 'product.name',\n description: 'The product that restocked',\n sample: 'House Blend',\n },\n {\n name: 'product.url',\n description: 'Link to the product page',\n sample: 'https://shop.example.com/products/house-blend',\n },\n ],\n defaultBody: [\n {\n block: 'text',\n text: '{{product.name}} is back in stock at {{host.businessName}}.',\n variant: 'body',\n },\n { block: 'button', label: 'View product', href: '{{product.url}}' },\n ],\n footerReason:\n 'You’re receiving this because you asked {{host.businessName}} to tell you when this was back.',\n },\n {\n key: 'abandoned-cart',\n name: 'Abandoned cart',\n description: 'Reminds a shopper of items left in their cart.',\n // The cron refuses to send this without the entitlement\n // (`process-abandoned.ts:92`), so the console has to say so (AGL-2081).\n requiresFeature: 'abandonedCart',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'You left something in your cart',\n mergeTokens: [\n {\n name: 'cart.url',\n description: 'Link back to the shopper cart',\n sample: 'https://shop.example.com/cart',\n },\n ],\n defaultBody: [\n {\n block: 'text',\n text:\n 'You left items in your cart at {{host.businessName}}. Pick up ' +\n 'where you left off.',\n variant: 'body',\n },\n { block: 'button', label: 'Return to cart', href: '{{cart.url}}' },\n {\n block: 'text',\n text: 'Nothing in your cart is held for you.',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because you started a checkout with {{host.businessName}}.',\n },\n {\n // AGL-3736: days after fulfilment, one per order, with a single-use\n // link per product that opens its review form pre-verified.\n key: 'review-request',\n name: 'Review request',\n description:\n 'Asks a buyer to review what they bought, a set number of days after ' +\n 'the order is fulfilled. One per order; each product has its own ' +\n 'single-use link. Turn it off or change the delay in Settings → Reviews.',\n requiresFeature: 'productReviews',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'How was your order from {{host.businessName}}?',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n {\n name: 'review.products',\n description:\n 'Each product to review, one per line, with its own review link',\n sample: 'House Blend: https://shop.example.com/products/house-blend?review=…',\n },\n {\n name: 'review.url',\n description: 'The review link for the first product',\n sample: 'https://shop.example.com/products/house-blend?review=…',\n },\n {\n name: 'review.productName',\n description: 'The first product’s name',\n sample: 'House Blend',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'How did we do?', variant: 'heading' },\n {\n block: 'text',\n text:\n 'Thanks again for your order {{order.number}} from ' +\n '{{host.businessName}}. Would you tell other shoppers what you ' +\n 'think? Each link opens the product with a review form.',\n variant: 'body',\n },\n { block: 'text', text: '{{review.products}}', variant: 'body' },\n { block: 'button', label: 'Write a review', href: '{{review.url}}' },\n {\n block: 'text',\n text: 'Each link works once, for 60 days.',\n variant: 'caption',\n },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'member-post',\n name: 'New member post',\n description: 'Notifies members when new members-only content is posted.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: '{{post.title}}',\n mergeTokens: [\n { name: 'post.title', description: 'The post’s title', sample: 'This month in the studio' },\n {\n name: 'post.body',\n description: 'The post, as its author wrote it',\n sample: 'Three new pieces are up for members first.',\n },\n ],\n defaultBody: [\n { block: 'text', text: '{{post.title}}', variant: 'heading' },\n { block: 'text', text: '{{post.body}}', variant: 'body' },\n ],\n footerReason: 'You’re receiving this because you’re a member of {{host.businessName}}.',\n },\n {\n key: 'member-password-reset',\n name: 'Member password reset',\n description:\n \"Resets a site member's password — a store-member account, separate \" +\n 'from a console login. Sent when the member asks, and when a site ' +\n 'administrator starts a reset for them.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Reset your {{site.name}} password',\n mergeTokens: [\n { name: 'site.name', description: 'The site’s name', sample: 'Northwind Coffee' },\n {\n name: 'reset.intro',\n description: 'Who started the reset',\n sample: 'Someone asked to reset the password for your Northwind Coffee account.',\n },\n {\n name: 'resetUrl',\n description: 'The one-time reset link',\n sample: 'https://shop.example.com/recover?token=…',\n },\n {\n name: 'reset.note',\n description: 'How long the link lasts, and what to do if unexpected',\n sample:\n 'The link works once and expires in 1 hour. If you did not ask for ' +\n 'this, you can safely ignore this email — your password is unchanged.',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Reset your password', variant: 'heading' },\n { block: 'text', text: '{{reset.intro}}', variant: 'body' },\n { block: 'button', label: 'Set a new password', href: '{{resetUrl}}' },\n { block: 'text', text: '{{reset.note}}', variant: 'caption' },\n ],\n footerReason:\n 'You’re receiving this because a password reset was started for your ' +\n '{{host.businessName}} account.',\n },\n {\n key: 'member-password-changed',\n name: 'Member password changed',\n description:\n 'Tells a site member that a site administrator set a new password on ' +\n 'their account.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your {{site.name}} password was changed',\n mergeTokens: [\n { name: 'site.name', description: 'The site’s name', sample: 'Northwind Coffee' },\n {\n name: 'signInUrl',\n description: 'Where the member signs back in',\n sample: 'https://shop.example.com',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Your password was changed', variant: 'heading' },\n {\n block: 'text',\n text:\n 'An administrator of {{site.name}} set a new password on your ' +\n 'account and signed you out on every device. To sign back in, ' +\n 'get the new password from them, or choose \"Forgot password?\" on ' +\n 'the sign-in page to set your own.',\n variant: 'body',\n },\n { block: 'button', label: 'Sign in', href: '{{signInUrl}}' },\n {\n block: 'text',\n text: 'If you did not expect this, contact the site owner.',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because the password on your ' +\n '{{host.businessName}} account was changed.',\n },\n {\n key: 'newsletter-confirmation',\n name: 'Subscription confirmation',\n description:\n 'Asks someone who signed up for a site’s emails to confirm the address ' +\n 'before anything is sent to it.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Confirm your subscription',\n mergeTokens: [\n {\n name: 'stream.name',\n description: 'What they signed up for',\n sample: 'Newsletter',\n },\n {\n name: 'confirmUrl',\n description: 'The confirmation link',\n sample: 'https://shop.example.com/subscribe/confirm?token=…',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'Confirm your subscription', variant: 'heading' },\n {\n block: 'text',\n text:\n 'Please confirm that you want to get {{stream.name}} emails from ' +\n '{{host.businessName}} at this address.',\n variant: 'body',\n },\n { block: 'button', label: 'Confirm my subscription', href: '{{confirmUrl}}' },\n {\n block: 'text',\n text:\n 'The link works for three days. If you did not sign up, ignore this ' +\n 'message — nothing will be sent.',\n variant: 'caption',\n },\n ],\n footerReason:\n 'You’re receiving this because this address was entered on ' +\n '{{host.businessName}}’s signup form.',\n },\n ...returnTenantEmails(),\n ]\n}\n\n/** The items a return covers, one per line. */\nconst RETURN_ITEMS_TOKEN = {\n name: 'return.items',\n description: 'The items being returned, one per line, with the reason',\n sample: '1× House Blend — Arrived damaged',\n} as const\n\n/** The merchant's note on a return; empty when they left none. */\nconst RETURN_NOTE_TOKEN = {\n name: 'return.note',\n description: 'The store’s note to the buyer on this return; empty when none',\n sample: 'Please include the original packaging.',\n} as const\n\n/**\n * The return emails (AGL-3611): one to the store when a buyer asks, and one\n * to the buyer at each answer. Their own block, beside the order emails\n * rather than among them, because those belong to the order notifications.\n */\nfunction returnTenantEmails(): readonly TenantEmailEntry[] {\n return [\n {\n key: 'return-requested',\n name: 'Return requested',\n description:\n 'Tells the store a buyer asked to return items, with what and why, so ' +\n 'someone can approve or decline it.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Return requested for order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n RETURN_ITEMS_TOKEN,\n {\n name: 'buyer.email',\n description: 'The buyer’s email',\n sample: 'buyer@example.com',\n },\n {\n name: 'return.customerNote',\n description: 'What the buyer wrote; empty when they wrote nothing',\n sample: 'The lid was cracked.',\n },\n ],\n defaultBody: [\n { block: 'text', text: 'A buyer asked for a return', variant: 'heading' },\n {\n block: 'text',\n text: '{{buyer.email}} wants to return items from order {{order.number}}.',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'text', text: '{{return.customerNote}}', variant: 'body' },\n {\n block: 'text',\n text: 'Approve or decline it under Products → Returns.',\n variant: 'caption',\n },\n ],\n footerReason: 'You’re receiving this because you manage {{host.businessName}}.',\n },\n {\n key: 'return-approved',\n name: 'Return approved',\n description:\n 'Tells the buyer their return was approved and how to send the items ' +\n 'back, with the return label when the store attached one.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your return for order {{order.number}} is approved',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n RETURN_ITEMS_TOKEN,\n RETURN_NOTE_TOKEN,\n {\n name: 'return.label',\n description:\n 'A sentence with the return label link and its tracking; empty ' +\n 'when the store attached no label',\n sample: 'Print your return label: https://labels.example.com/r/123',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your return is approved', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} approved the return of:',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'text', text: '{{return.note}}', variant: 'body' },\n { block: 'text', text: '{{return.label}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'return-declined',\n name: 'Return declined',\n description: 'Tells the buyer their return was declined, with the store’s note.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'About your return for order {{order.number}}',\n mergeTokens: [ORDER_NUMBER_TOKEN, RETURN_ITEMS_TOKEN, RETURN_NOTE_TOKEN, ORDER_STATUS_URL_TOKEN],\n defaultBody: [\n { block: 'text', text: 'We could not accept this return', variant: 'heading' },\n {\n block: 'text',\n text: '{{host.businessName}} declined the return of:',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'text', text: '{{return.note}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n {\n key: 'return-refunded',\n name: 'Return refunded',\n description: 'Tells the buyer their return was received and refunded, and how much.',\n pluginId: 'commerce',\n plugin: 'Commerce',\n control: 'besigner',\n defaultSubject: 'Your refund for order {{order.number}}',\n mergeTokens: [\n ORDER_NUMBER_TOKEN,\n RETURN_ITEMS_TOKEN,\n {\n name: 'return.refundTotal',\n description: 'The amount refunded for this return',\n sample: '$24.00',\n },\n ORDER_STATUS_URL_TOKEN,\n ],\n defaultBody: [\n { block: 'text', text: 'Your return is refunded', variant: 'heading' },\n {\n block: 'text',\n text:\n '{{host.businessName}} received your return and refunded ' +\n '{{return.refundTotal}} to your original payment method.',\n variant: 'body',\n },\n { block: 'text', text: '{{return.items}}', variant: 'body' },\n { block: 'button', label: 'View your order', href: '{{order.statusUrl}}' },\n ],\n footerReason: ORDER_FOOTER_REASON,\n },\n ]\n}\n"],"names":["ORDER_NUMBER_TOKEN","name","description","sample","ORDER_STATUS_URL_TOKEN","PICKUP_LOCATION_TOKEN","ORDER_FOOTER_REASON","commerceTenantEmails","key","pluginId","plugin","control","defaultSubject","mergeTokens","defaultBody","block","text","variant","label","href","footerReason","requiresFeature","returnTenantEmails","RETURN_ITEMS_TOKEN","RETURN_NOTE_TOKEN"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAID,qEAAqE,GACrE,MAAMA,qBAAqB;IACzBC,MAAM;IACNC,aAAa;IACbC,QAAQ;AACV;AAEA;;;CAGC,GACD,MAAMC,yBAAyB;IAC7BH,MAAM;IACNC,aACE,4EACA;IACFC,QAAQ;AACV;AAEA,kDAAkD,GAClD,MAAME,wBAAwB;IAC5BJ,MAAM;IACNC,aAAa;IACbC,QAAQ;AACV;AAEA,MAAMG,sBACJ;AAEF;;;;;;;;;;;;;;CAcC,GACD,OAAO,SAASC;IACd,OAAO;QACL;YACEC,KAAK;YACLP,MAAM;YACNC,aAAa;YACbO,UAAU;YACVC,QAAQ;YACRC,SAAS;YACTC,gBAAgB;YAChBC,aAAa;gBACX;oBACEZ,MAAM;oBACNC,aAAa;oBACbC,QAAQ;gBACV;gBACA;oBACEF,MAAM;oBACNC,aAAa;oBACbC,QAAQ;gBACV;gBACA;oBACEF,MAAM;oBACNC,aAAa;oBACbC,QAAQ;gBACV;gBACA;oBACEF,MAAM;oBACNC,aACE;oBACFC,QAAQ;gBACV;gBACAH;gBACAI;aACD;YACDU,aAAa;gBACX;oBAAEC,OAAO;oBAAQC,MAAM;oBAA6BC,SAAS;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