@aglyn/plugins-commerce 1.0.0-beta.289 → 1.0.0-beta.291
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 -2
- package/package.json +13 -13
- package/src/lib/components/commerce-console-page.js +2 -1
- package/src/lib/components/commerce-console-page.js.map +1 -1
- package/src/lib/components/console/commerce-pdf-download.d.ts +30 -0
- package/src/lib/components/console/commerce-pdf-download.js +53 -0
- package/src/lib/components/console/commerce-pdf-download.js.map +1 -0
- package/src/lib/components/console/host-orders-card.component.d.ts +6 -0
- package/src/lib/components/console/host-orders-card.component.js +3 -2
- package/src/lib/components/console/host-orders-card.component.js.map +1 -1
- package/src/lib/components/console/host-quotes-card.component.js +20 -4
- package/src/lib/components/console/host-quotes-card.component.js.map +1 -1
- package/src/lib/components/console/invoice-send.component.d.ts +44 -0
- package/src/lib/components/console/invoice-send.component.js +237 -0
- package/src/lib/components/console/invoice-send.component.js.map +1 -0
- package/src/lib/components/console/order-detail-dialog.component.d.ts +5 -0
- package/src/lib/components/console/order-detail-dialog.component.js +9 -2
- package/src/lib/components/console/order-detail-dialog.component.js.map +1 -1
- package/src/lib/components/console/order-invoice.component.d.ts +15 -4
- package/src/lib/components/console/order-invoice.component.js +93 -12
- package/src/lib/components/console/order-invoice.component.js.map +1 -1
- package/src/lib/components/console/quote-editor-dialog.component.d.ts +29 -0
- package/src/lib/components/console/quote-editor-dialog.component.js +154 -5
- package/src/lib/components/console/quote-editor-dialog.component.js.map +1 -1
- package/src/lib/components/console/quote-proofs.component.d.ts +48 -0
- package/src/lib/components/console/quote-proofs.component.js +694 -0
- package/src/lib/components/console/quote-proofs.component.js.map +1 -0
- package/src/lib/components/console/quote-send.component.d.ts +42 -0
- package/src/lib/components/console/quote-send.component.js +307 -0
- package/src/lib/components/console/quote-send.component.js.map +1 -0
- package/src/lib/components/console/quote-start.component.d.ts +45 -0
- package/src/lib/components/console/quote-start.component.js +182 -0
- package/src/lib/components/console/quote-start.component.js.map +1 -0
- package/src/lib/components/product-options-field-body.d.ts +44 -0
- package/src/lib/components/product-options-field-body.js +260 -0
- package/src/lib/components/product-options-field-body.js.map +1 -0
- package/src/lib/components/product-options-field.d.ts +32 -0
- package/src/lib/components/product-options-field.js +128 -0
- package/src/lib/components/product-options-field.js.map +1 -0
- package/src/lib/components/quote-page-body.js +67 -20
- package/src/lib/components/quote-page-body.js.map +1 -1
- package/src/lib/components/quote-proof-panel.d.ts +42 -0
- package/src/lib/components/quote-proof-panel.js +436 -0
- package/src/lib/components/quote-proof-panel.js.map +1 -0
- package/src/lib/model/commerce-invoices.d.ts +132 -0
- package/src/lib/model/commerce-invoices.js +332 -0
- package/src/lib/model/commerce-invoices.js.map +1 -0
- package/src/lib/model/commerce-orders.d.ts +29 -2
- package/src/lib/model/commerce-orders.js.map +1 -1
- package/src/lib/model/commerce-product-field.d.ts +23 -0
- package/src/lib/model/commerce-product-field.js +26 -0
- package/src/lib/model/commerce-product-field.js.map +1 -0
- package/src/lib/model/commerce-quote-email.d.ts +67 -0
- package/src/lib/model/commerce-quote-email.js +154 -0
- package/src/lib/model/commerce-quote-email.js.map +1 -0
- package/src/lib/model/commerce-quote-pay.d.ts +76 -6
- package/src/lib/model/commerce-quote-pay.js +105 -39
- package/src/lib/model/commerce-quote-pay.js.map +1 -1
- package/src/lib/model/commerce-quote-proofs.d.ts +159 -0
- package/src/lib/model/commerce-quote-proofs.js +348 -0
- package/src/lib/model/commerce-quote-proofs.js.map +1 -0
- package/src/lib/model/commerce-quote-request.d.ts +93 -0
- package/src/lib/model/commerce-quote-request.js +207 -0
- package/src/lib/model/commerce-quote-request.js.map +1 -0
- package/src/lib/model/commerce-quotes.d.ts +140 -3
- package/src/lib/model/commerce-quotes.js.map +1 -1
- package/src/lib/model/index.d.ts +4 -0
- package/src/lib/model/index.js +4 -0
- package/src/lib/model/index.js.map +1 -1
- package/src/lib/plugin.js +19 -0
- package/src/lib/plugin.js.map +1 -1
- package/src/lib/server/billing-webhook.js +115 -70
- package/src/lib/server/billing-webhook.js.map +1 -1
- package/src/lib/server/commerce-pdf.d.ts +104 -0
- package/src/lib/server/commerce-pdf.js +310 -0
- package/src/lib/server/commerce-pdf.js.map +1 -0
- package/src/lib/server/draft-order.js +23 -3
- package/src/lib/server/draft-order.js.map +1 -1
- package/src/lib/server/invoice-email.d.ts +76 -0
- package/src/lib/server/invoice-email.js +183 -0
- package/src/lib/server/invoice-email.js.map +1 -0
- package/src/lib/server/order-invoice-send.d.ts +43 -0
- package/src/lib/server/order-invoice-send.js +218 -0
- package/src/lib/server/order-invoice-send.js.map +1 -0
- package/src/lib/server/order-print.d.ts +6 -0
- package/src/lib/server/order-print.js +22 -5
- package/src/lib/server/order-print.js.map +1 -1
- package/src/lib/server/order-status.d.ts +11 -0
- package/src/lib/server/order-status.js +44 -8
- package/src/lib/server/order-status.js.map +1 -1
- package/src/lib/server/pdf-response.d.ts +31 -0
- package/src/lib/server/pdf-response.js +30 -0
- package/src/lib/server/pdf-response.js.map +1 -0
- package/src/lib/server/person-eraser.d.ts +3 -2
- package/src/lib/server/person-eraser.js +25 -6
- package/src/lib/server/person-eraser.js.map +1 -1
- package/src/lib/server/pos-reader-splash.d.ts +2 -18
- package/src/lib/server/pos-reader-splash.js +8 -93
- package/src/lib/server/pos-reader-splash.js.map +1 -1
- package/src/lib/server/quote-email.d.ts +85 -0
- package/src/lib/server/quote-email.js +211 -0
- package/src/lib/server/quote-email.js.map +1 -0
- package/src/lib/server/quote-link-token.d.ts +11 -0
- package/src/lib/server/quote-link-token.js +21 -0
- package/src/lib/server/quote-link-token.js.map +1 -1
- package/src/lib/server/quote-pay.d.ts +38 -6
- package/src/lib/server/quote-pay.js +115 -53
- package/src/lib/server/quote-pay.js.map +1 -1
- package/src/lib/server/quote-proofs.d.ts +51 -0
- package/src/lib/server/quote-proofs.js +500 -0
- package/src/lib/server/quote-proofs.js.map +1 -0
- package/src/lib/server/quote-uploads.d.ts +33 -0
- package/src/lib/server/quote-uploads.js +29 -0
- package/src/lib/server/quote-uploads.js.map +1 -0
- package/src/lib/server/quote.d.ts +25 -0
- package/src/lib/server/quote.js +638 -8
- package/src/lib/server/quote.js.map +1 -1
- package/src/lib/server/site-image-source.d.ts +38 -0
- package/src/lib/server/site-image-source.js +130 -0
- package/src/lib/server/site-image-source.js.map +1 -0
- package/src/lib/server/site-page-resolver.js +2 -1
- package/src/lib/server/site-page-resolver.js.map +1 -1
- package/src/lib/server.js +24 -1
- package/src/lib/server.js.map +1 -1
- package/src/lib/site.js +8 -0
- package/src/lib/site.js.map +1 -1
- package/src/lib/tenant-emails.js +243 -0
- package/src/lib/tenant-emails.js.map +1 -1
- package/src/lib/utils/commerce-document-pdf.d.ts +82 -0
- package/src/lib/utils/commerce-document-pdf.js +613 -0
- package/src/lib/utils/commerce-document-pdf.js.map +1 -0
- package/src/lib/utils/invoice-email-content.d.ts +45 -0
- package/src/lib/utils/invoice-email-content.js +126 -0
- package/src/lib/utils/invoice-email-content.js.map +1 -0
- package/src/lib/utils/order-invoice.d.ts +52 -3
- package/src/lib/utils/order-invoice.js +124 -64
- package/src/lib/utils/order-invoice.js.map +1 -1
- package/src/lib/utils/quote-email-content.d.ts +62 -0
- package/src/lib/utils/quote-email-content.js +154 -0
- package/src/lib/utils/quote-email-content.js.map +1 -0
package/src/lib/site.js
CHANGED
|
@@ -30,6 +30,7 @@ import * as ReservationWidget from "./components/reservation-widget.js";
|
|
|
30
30
|
import * as ProductGrid from "./components/product-grid.js";
|
|
31
31
|
import * as ProductReviews from "./components/product-reviews.js";
|
|
32
32
|
import * as QuotePage from "./components/quote-page.js";
|
|
33
|
+
import * as ProductOptionsField from "./components/product-options-field.js";
|
|
33
34
|
import * as RelatedProducts from "./components/related-products.js";
|
|
34
35
|
import * as ReturnRequest from "./components/return-request.js";
|
|
35
36
|
import * as Wishlist from "./components/wishlist.js";
|
|
@@ -131,6 +132,13 @@ import { BUNDLE_ID } from "./constants/bundle-common.js";
|
|
|
131
132
|
component: QuotePage.default,
|
|
132
133
|
schema: QuotePage.schema,
|
|
133
134
|
presets: QuotePage.presets
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
// A form field (AGL-4098): a product and its options, for a quote
|
|
138
|
+
// request. Its picker is a chunk of its own.
|
|
139
|
+
component: ProductOptionsField.default,
|
|
140
|
+
schema: ProductOptionsField.schema,
|
|
141
|
+
presets: ProductOptionsField.presets
|
|
134
142
|
}
|
|
135
143
|
];
|
|
136
144
|
export function registerCommercePlugin() {
|
package/src/lib/site.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/site.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 * as Aglyn from '@aglyn/aglyn'\nimport { mdiStorefrontOutline } from '@aglyn/shared-data-mdi'\nimport * as Account from './components/account'\nimport * as Cart from './components/cart'\nimport * as Gate from './components/gate'\nimport * as GatedVideo from './components/gated-video'\nimport * as MemberFeed from './components/member-feed'\nimport * as MemberRecovery from './components/member-recovery'\nimport * as MemberSignin from './components/member-signin'\nimport * as MemberSignup from './components/member-signup'\nimport * as NewsletterSignup from './components/newsletter-signup'\nimport * as OrderStatus from './components/order-status'\nimport * as ProductDetail from './components/product-detail'\nimport * as ReservationWidget from './components/reservation-widget'\nimport * as ProductGrid from './components/product-grid'\nimport * as ProductReviews from './components/product-reviews'\nimport * as QuotePage from './components/quote-page'\nimport * as RelatedProducts from './components/related-products'\nimport * as ReturnRequest from './components/return-request'\nimport * as Wishlist from './components/wishlist'\nimport { BUNDLE_ID } from './constants/bundle-common'\n\n/**\n * Commerce UI feature plugin (AGL-290): the storefront component set,\n * built on the feature-plugin pattern (AGL-277) — depends on the mui\n * bundle for primitives/theming and registers alongside it in the\n * besigner and the tenant renderer. Components join `COMMERCE_BUNDLE`\n * as they land (PLP AGL-291, PDP AGL-292, cart AGL-293, …); ids are\n * persisted in screen docs and never renamed.\n */\nexport const COMMERCE_BUNDLE: Aglyn.FeatureBundleEntry[] = [\n {\n component: ProductGrid.default,\n schema: ProductGrid.schema,\n presets: ProductGrid.presets,\n },\n {\n component: ProductDetail.default,\n schema: ProductDetail.schema,\n presets: ProductDetail.presets,\n },\n {\n component: Cart.default,\n schema: Cart.schema,\n presets: Cart.presets,\n },\n {\n component: Account.default,\n schema: Account.schema,\n presets: Account.presets,\n },\n {\n component: Wishlist.default,\n schema: Wishlist.schema,\n presets: Wishlist.presets,\n },\n {\n component: NewsletterSignup.default,\n schema: NewsletterSignup.schema,\n presets: NewsletterSignup.presets,\n },\n {\n component: Gate.default,\n schema: Gate.schema,\n presets: Gate.presets,\n },\n {\n component: GatedVideo.default,\n schema: GatedVideo.schema,\n presets: GatedVideo.presets,\n },\n {\n component: MemberFeed.default,\n schema: MemberFeed.schema,\n presets: MemberFeed.presets,\n },\n {\n component: MemberRecovery.default,\n schema: MemberRecovery.schema,\n presets: MemberRecovery.presets,\n },\n {\n component: MemberSignin.default,\n schema: MemberSignin.schema,\n presets: MemberSignin.presets,\n },\n {\n component: MemberSignup.default,\n schema: MemberSignup.schema,\n presets: MemberSignup.presets,\n },\n {\n component: ReservationWidget.default,\n schema: ReservationWidget.schema,\n presets: ReservationWidget.presets,\n },\n {\n component: ProductReviews.default,\n schema: ProductReviews.schema,\n presets: ProductReviews.presets,\n },\n {\n component: RelatedProducts.default,\n schema: RelatedProducts.schema,\n presets: RelatedProducts.presets,\n },\n {\n component: OrderStatus.default,\n schema: OrderStatus.schema,\n presets: OrderStatus.presets,\n },\n {\n component: ReturnRequest.default,\n schema: ReturnRequest.schema,\n presets: ReturnRequest.presets,\n },\n {\n component: QuotePage.default,\n schema: QuotePage.schema,\n presets: QuotePage.presets,\n },\n]\n\nexport function registerCommercePlugin(): void {\n // The canvas half only. The console registers the console half through its\n // own `console` surface, and a published page must never load console code\n // (AGL-3116): this runs on every page that places one of these elements.\n if (Aglyn.plugins.getDependency(BUNDLE_ID)) return\n Aglyn.plugins.addDependency(\n Aglyn.defineUiFeatureBundle(\n {\n bundleId: BUNDLE_ID,\n displayName: 'Commerce',\n description: 'Storefront blocks: product grids, detail, cart',\n icon: { path: mdiStorefrontOutline.path },\n components: COMMERCE_BUNDLE,\n },\n Aglyn.components,\n ),\n )\n}\n"],"names":["Aglyn","mdiStorefrontOutline","Account","Cart","Gate","GatedVideo","MemberFeed","MemberRecovery","MemberSignin","MemberSignup","NewsletterSignup","OrderStatus","ProductDetail","ReservationWidget","ProductGrid","ProductReviews","QuotePage","RelatedProducts","ReturnRequest","Wishlist","BUNDLE_ID","COMMERCE_BUNDLE","component","default","schema","presets","registerCommercePlugin","plugins","getDependency","addDependency","defineUiFeatureBundle","bundleId","displayName","description","icon","path","components"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SAASC,oBAAoB,QAAQ,yBAAwB;AAC7D,YAAYC,aAAa,0BAAsB;AAC/C,YAAYC,UAAU,uBAAmB;AACzC,YAAYC,UAAU,uBAAmB;AACzC,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,oBAAoB,kCAA8B;AAC9D,YAAYC,kBAAkB,gCAA4B;AAC1D,YAAYC,kBAAkB,gCAA4B;AAC1D,YAAYC,sBAAsB,oCAAgC;AAClE,YAAYC,iBAAiB,+BAA2B;AACxD,YAAYC,mBAAmB,iCAA6B;AAC5D,YAAYC,uBAAuB,qCAAiC;AACpE,YAAYC,iBAAiB,+BAA2B;AACxD,YAAYC,oBAAoB,kCAA8B;AAC9D,YAAYC,eAAe,6BAAyB;AACpD,YAAYC,qBAAqB,mCAA+B;AAChE,YAAYC,mBAAmB,iCAA6B;AAC5D,YAAYC,cAAc,2BAAuB;AACjD,SAASC,SAAS,QAAQ,+BAA2B;AAErD;;;;;;;CAOC,GACD,OAAO,MAAMC,kBAA8C;IACzD;QACEC,
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/site.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 * as Aglyn from '@aglyn/aglyn'\nimport { mdiStorefrontOutline } from '@aglyn/shared-data-mdi'\nimport * as Account from './components/account'\nimport * as Cart from './components/cart'\nimport * as Gate from './components/gate'\nimport * as GatedVideo from './components/gated-video'\nimport * as MemberFeed from './components/member-feed'\nimport * as MemberRecovery from './components/member-recovery'\nimport * as MemberSignin from './components/member-signin'\nimport * as MemberSignup from './components/member-signup'\nimport * as NewsletterSignup from './components/newsletter-signup'\nimport * as OrderStatus from './components/order-status'\nimport * as ProductDetail from './components/product-detail'\nimport * as ReservationWidget from './components/reservation-widget'\nimport * as ProductGrid from './components/product-grid'\nimport * as ProductReviews from './components/product-reviews'\nimport * as QuotePage from './components/quote-page'\nimport * as ProductOptionsField from './components/product-options-field'\nimport * as RelatedProducts from './components/related-products'\nimport * as ReturnRequest from './components/return-request'\nimport * as Wishlist from './components/wishlist'\nimport { BUNDLE_ID } from './constants/bundle-common'\n\n/**\n * Commerce UI feature plugin (AGL-290): the storefront component set,\n * built on the feature-plugin pattern (AGL-277) — depends on the mui\n * bundle for primitives/theming and registers alongside it in the\n * besigner and the tenant renderer. Components join `COMMERCE_BUNDLE`\n * as they land (PLP AGL-291, PDP AGL-292, cart AGL-293, …); ids are\n * persisted in screen docs and never renamed.\n */\nexport const COMMERCE_BUNDLE: Aglyn.FeatureBundleEntry[] = [\n {\n component: ProductGrid.default,\n schema: ProductGrid.schema,\n presets: ProductGrid.presets,\n },\n {\n component: ProductDetail.default,\n schema: ProductDetail.schema,\n presets: ProductDetail.presets,\n },\n {\n component: Cart.default,\n schema: Cart.schema,\n presets: Cart.presets,\n },\n {\n component: Account.default,\n schema: Account.schema,\n presets: Account.presets,\n },\n {\n component: Wishlist.default,\n schema: Wishlist.schema,\n presets: Wishlist.presets,\n },\n {\n component: NewsletterSignup.default,\n schema: NewsletterSignup.schema,\n presets: NewsletterSignup.presets,\n },\n {\n component: Gate.default,\n schema: Gate.schema,\n presets: Gate.presets,\n },\n {\n component: GatedVideo.default,\n schema: GatedVideo.schema,\n presets: GatedVideo.presets,\n },\n {\n component: MemberFeed.default,\n schema: MemberFeed.schema,\n presets: MemberFeed.presets,\n },\n {\n component: MemberRecovery.default,\n schema: MemberRecovery.schema,\n presets: MemberRecovery.presets,\n },\n {\n component: MemberSignin.default,\n schema: MemberSignin.schema,\n presets: MemberSignin.presets,\n },\n {\n component: MemberSignup.default,\n schema: MemberSignup.schema,\n presets: MemberSignup.presets,\n },\n {\n component: ReservationWidget.default,\n schema: ReservationWidget.schema,\n presets: ReservationWidget.presets,\n },\n {\n component: ProductReviews.default,\n schema: ProductReviews.schema,\n presets: ProductReviews.presets,\n },\n {\n component: RelatedProducts.default,\n schema: RelatedProducts.schema,\n presets: RelatedProducts.presets,\n },\n {\n component: OrderStatus.default,\n schema: OrderStatus.schema,\n presets: OrderStatus.presets,\n },\n {\n component: ReturnRequest.default,\n schema: ReturnRequest.schema,\n presets: ReturnRequest.presets,\n },\n {\n component: QuotePage.default,\n schema: QuotePage.schema,\n presets: QuotePage.presets,\n },\n {\n // A form field (AGL-4098): a product and its options, for a quote\n // request. Its picker is a chunk of its own.\n component: ProductOptionsField.default,\n schema: ProductOptionsField.schema,\n presets: ProductOptionsField.presets,\n },\n]\n\nexport function registerCommercePlugin(): void {\n // The canvas half only. The console registers the console half through its\n // own `console` surface, and a published page must never load console code\n // (AGL-3116): this runs on every page that places one of these elements.\n if (Aglyn.plugins.getDependency(BUNDLE_ID)) return\n Aglyn.plugins.addDependency(\n Aglyn.defineUiFeatureBundle(\n {\n bundleId: BUNDLE_ID,\n displayName: 'Commerce',\n description: 'Storefront blocks: product grids, detail, cart',\n icon: { path: mdiStorefrontOutline.path },\n components: COMMERCE_BUNDLE,\n },\n Aglyn.components,\n ),\n )\n}\n"],"names":["Aglyn","mdiStorefrontOutline","Account","Cart","Gate","GatedVideo","MemberFeed","MemberRecovery","MemberSignin","MemberSignup","NewsletterSignup","OrderStatus","ProductDetail","ReservationWidget","ProductGrid","ProductReviews","QuotePage","ProductOptionsField","RelatedProducts","ReturnRequest","Wishlist","BUNDLE_ID","COMMERCE_BUNDLE","component","default","schema","presets","registerCommercePlugin","plugins","getDependency","addDependency","defineUiFeatureBundle","bundleId","displayName","description","icon","path","components"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SAASC,oBAAoB,QAAQ,yBAAwB;AAC7D,YAAYC,aAAa,0BAAsB;AAC/C,YAAYC,UAAU,uBAAmB;AACzC,YAAYC,UAAU,uBAAmB;AACzC,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,gBAAgB,8BAA0B;AACtD,YAAYC,oBAAoB,kCAA8B;AAC9D,YAAYC,kBAAkB,gCAA4B;AAC1D,YAAYC,kBAAkB,gCAA4B;AAC1D,YAAYC,sBAAsB,oCAAgC;AAClE,YAAYC,iBAAiB,+BAA2B;AACxD,YAAYC,mBAAmB,iCAA6B;AAC5D,YAAYC,uBAAuB,qCAAiC;AACpE,YAAYC,iBAAiB,+BAA2B;AACxD,YAAYC,oBAAo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tenant-emails.js
CHANGED
|
@@ -559,6 +559,249 @@ const ORDER_FOOTER_REASON = 'You’re receiving this because you placed an order
|
|
|
559
559
|
],
|
|
560
560
|
footerReason: ORDER_FOOTER_REASON
|
|
561
561
|
},
|
|
562
|
+
{
|
|
563
|
+
// AGL-4097. Sent from the console's Send quote, never on its own; the
|
|
564
|
+
// quote's PDF is attached, and each send replies into the customer's
|
|
565
|
+
// conversation with the business (`quote.emailThread`). Every token is
|
|
566
|
+
// composed per send by `utils/quote-email-content.ts`; the prices it
|
|
567
|
+
// carries are the ones named here (`quote.total`, `quote.buttonLabel`),
|
|
568
|
+
// and `quote.proofImages` carries pictures and file names only.
|
|
569
|
+
key: 'quote-sent',
|
|
570
|
+
name: 'Quote',
|
|
571
|
+
description: 'Sends a quote to the customer when you choose Send quote: your ' + 'message, the proof, the quote as a PDF and a button to approve or ' + 'pay it on your site. Later sends, such as a new revision, arrive in ' + 'the same conversation.',
|
|
572
|
+
pluginId: 'commerce',
|
|
573
|
+
plugin: 'Commerce',
|
|
574
|
+
control: 'besigner',
|
|
575
|
+
defaultSubject: '{{quote.subject}}',
|
|
576
|
+
mergeTokens: [
|
|
577
|
+
{
|
|
578
|
+
name: 'quote.subject',
|
|
579
|
+
description: 'The subject typed when sending; it stays the same for every email about the quote',
|
|
580
|
+
sample: 'Quote #1042 from Northwind Signs'
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
name: 'quote.number',
|
|
584
|
+
description: 'The quote number',
|
|
585
|
+
sample: '#1042'
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
name: 'quote.revision',
|
|
589
|
+
description: 'Which revision of the quote this is',
|
|
590
|
+
sample: '2'
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
name: 'quote.total',
|
|
594
|
+
description: 'The quote total; “before tax” when tax is added at payment',
|
|
595
|
+
sample: '$1,250.00'
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
name: 'quote.heading',
|
|
599
|
+
description: '“Your quote from …”, or “Your updated quote” from the second revision on',
|
|
600
|
+
sample: 'Your quote from Northwind Signs'
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
name: 'quote.intro',
|
|
604
|
+
description: 'One sentence on what this email is: a new quote, or an updated revision',
|
|
605
|
+
sample: 'Here is your quote from Northwind Signs. The quote is attached as a PDF too.'
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
name: 'quote.message',
|
|
609
|
+
description: 'The message typed when sending; empty when none was typed',
|
|
610
|
+
sample: 'Thanks for stopping by the shop. Here is the banner we talked about.'
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
name: 'quote.proofImages',
|
|
614
|
+
description: 'Up to three proof images, each linked to the quote page; empty when the revision has none',
|
|
615
|
+
sample: '<table role="presentation"><tr><td><img src="https://shop.example.com/api/commerce/quote-proof?file=p1" alt="Proof: banner.png" width="552" /></td></tr></table>'
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: 'quote.proofFiles',
|
|
619
|
+
description: 'The other proof files by name, to see on the quote page; empty when there are none',
|
|
620
|
+
sample: 'Also with this revision: banner.ai. See it on your quote page.'
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
name: 'quote.nextStep',
|
|
624
|
+
description: 'What to do next: approve the proof first, or pay when ready',
|
|
625
|
+
sample: 'Look over the proof, then approve it on your quote page. Once you approve it, you can pay there.'
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
name: 'quote.buttonLabel',
|
|
629
|
+
description: '“Review and approve” while an approval is needed first, else “View and pay” with the total',
|
|
630
|
+
sample: 'View and pay $1,250.00'
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
name: 'quote.url',
|
|
634
|
+
description: 'The quote’s pay link on your site. Private to the customer; it needs no account',
|
|
635
|
+
sample: 'https://shop.example.com/pay-quote?q=quote_123&t=…'
|
|
636
|
+
}
|
|
637
|
+
],
|
|
638
|
+
defaultBody: [
|
|
639
|
+
{
|
|
640
|
+
block: 'text',
|
|
641
|
+
text: '{{host.businessName}} · Quote {{quote.number}}',
|
|
642
|
+
variant: 'eyebrow'
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
block: 'text',
|
|
646
|
+
text: '{{quote.heading}}',
|
|
647
|
+
variant: 'heading'
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
block: 'text',
|
|
651
|
+
text: '{{quote.intro}}',
|
|
652
|
+
variant: 'body'
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
block: 'text',
|
|
656
|
+
text: '{{quote.message}}',
|
|
657
|
+
variant: 'body'
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
block: 'text',
|
|
661
|
+
text: 'Quote: {{quote.number}}\nRevision: {{quote.revision}}\nTotal: {{quote.total}}',
|
|
662
|
+
variant: 'details'
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
block: 'html',
|
|
666
|
+
html: '{{quote.proofImages}}'
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
block: 'text',
|
|
670
|
+
text: '{{quote.proofFiles}}',
|
|
671
|
+
variant: 'caption'
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
block: 'text',
|
|
675
|
+
text: '{{quote.nextStep}}',
|
|
676
|
+
variant: 'body'
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
block: 'button',
|
|
680
|
+
label: '{{quote.buttonLabel}}',
|
|
681
|
+
href: '{{quote.url}}'
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
block: 'text',
|
|
685
|
+
text: 'Reply to this email to reach {{host.businessName}}.',
|
|
686
|
+
variant: 'caption'
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
footerReason: 'You’re receiving this because {{host.businessName}} prepared a quote for you.'
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
// The invoice email (AGL-4099), sent when the business chooses Send
|
|
693
|
+
// invoice on an order or a quote. Its tokens are composed per send by
|
|
694
|
+
// `utils/invoice-email-content.ts`: unpaid, it asks for payment through
|
|
695
|
+
// the order's lasting pay link; paid, it is the record and draws no
|
|
696
|
+
// button (an empty `invoice.url` leaves the button out).
|
|
697
|
+
key: 'order-invoice',
|
|
698
|
+
name: 'Invoice',
|
|
699
|
+
description: 'Sends an invoice for an order or a quote when you choose Send ' + 'invoice: your message, the invoice as a PDF and, while it is ' + 'unpaid, a button to pay it on your site. A paid invoice is the ' + 'customer’s record. It arrives in the same conversation as the ' + 'quote’s emails.',
|
|
700
|
+
pluginId: 'commerce',
|
|
701
|
+
plugin: 'Commerce',
|
|
702
|
+
control: 'besigner',
|
|
703
|
+
defaultSubject: '{{invoice.subject}}',
|
|
704
|
+
mergeTokens: [
|
|
705
|
+
{
|
|
706
|
+
name: 'invoice.subject',
|
|
707
|
+
description: 'The subject typed when sending; it stays the same as the conversation it joins',
|
|
708
|
+
sample: 'Invoice #1042 from Northwind Signs'
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
name: 'invoice.number',
|
|
712
|
+
description: 'The invoice number, which is the order number',
|
|
713
|
+
sample: '#1042'
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
name: 'invoice.date',
|
|
717
|
+
description: 'The date of the order or quote',
|
|
718
|
+
sample: 'October 28, 2026'
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: 'invoice.total',
|
|
722
|
+
description: 'The invoice total; “before tax” or “before shipping” when those are added at payment',
|
|
723
|
+
sample: '$1,250.00'
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
name: 'invoice.status',
|
|
727
|
+
description: '“Paid on …”, or what is still due',
|
|
728
|
+
sample: 'Unpaid, $1,250.00 due'
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
name: 'invoice.heading',
|
|
732
|
+
description: '“Invoice #… from …”',
|
|
733
|
+
sample: 'Invoice #1042 from Northwind Signs'
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
name: 'invoice.intro',
|
|
737
|
+
description: 'One sentence on what this email is: an invoice to pay, or a paid one for the customer’s records',
|
|
738
|
+
sample: 'Northwind Signs sent you an invoice for your order. The details are below, and the invoice is attached as a PDF.'
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
name: 'invoice.message',
|
|
742
|
+
description: 'The message typed when sending; empty when none was typed',
|
|
743
|
+
sample: 'Thanks again for your order. Here is the invoice we talked about.'
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: 'invoice.nextStep',
|
|
747
|
+
description: 'What to do next: pay with the button, or keep a paid invoice for the records',
|
|
748
|
+
sample: 'Use the button below to pay it securely by card. The button keeps working until the invoice is paid.'
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
name: 'invoice.buttonLabel',
|
|
752
|
+
description: '“Pay” with the amount; empty on a paid invoice, which leaves the button out',
|
|
753
|
+
sample: 'Pay $1,250.00'
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
name: 'invoice.url',
|
|
757
|
+
description: 'The invoice’s pay link on your site. Private to the customer; it needs no account. Empty once paid',
|
|
758
|
+
sample: 'https://shop.example.com/pay-quote?q=order_123&t=…'
|
|
759
|
+
}
|
|
760
|
+
],
|
|
761
|
+
defaultBody: [
|
|
762
|
+
{
|
|
763
|
+
block: 'text',
|
|
764
|
+
text: '{{host.businessName}} · Invoice {{invoice.number}}',
|
|
765
|
+
variant: 'eyebrow'
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
block: 'text',
|
|
769
|
+
text: '{{invoice.heading}}',
|
|
770
|
+
variant: 'heading'
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
block: 'text',
|
|
774
|
+
text: '{{invoice.intro}}',
|
|
775
|
+
variant: 'body'
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
block: 'text',
|
|
779
|
+
text: '{{invoice.message}}',
|
|
780
|
+
variant: 'body'
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
block: 'text',
|
|
784
|
+
text: 'Invoice: {{invoice.number}}\nDate: {{invoice.date}}\nTotal: {{invoice.total}}\nStatus: {{invoice.status}}',
|
|
785
|
+
variant: 'details'
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
block: 'text',
|
|
789
|
+
text: '{{invoice.nextStep}}',
|
|
790
|
+
variant: 'body'
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
block: 'button',
|
|
794
|
+
label: '{{invoice.buttonLabel}}',
|
|
795
|
+
href: '{{invoice.url}}'
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
block: 'text',
|
|
799
|
+
text: 'Reply to this email to reach {{host.businessName}}.',
|
|
800
|
+
variant: 'caption'
|
|
801
|
+
}
|
|
802
|
+
],
|
|
803
|
+
footerReason: 'You’re receiving this because {{host.businessName}} sent you an invoice.'
|
|
804
|
+
},
|
|
562
805
|
{
|
|
563
806
|
key: 'sale-notification',
|
|
564
807
|
name: 'New sale',
|