@mgsoftwarebv/mcp-server-bridge 3.5.16 → 3.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -106952,7 +106952,7 @@ var TOOLS = [
|
|
|
106952
106952
|
},
|
|
106953
106953
|
{
|
|
106954
106954
|
name: "send-invoice-to-customer",
|
|
106955
|
-
description: "Email an invoice to the customer via the same generate-invoice \u2192 send-invoice-email pipeline as the dashboard send modal. Supports link-only, PDF attachment, or both (mode).
|
|
106955
|
+
description: "Email an invoice to the customer via the same generate-invoice \u2192 send-invoice-email pipeline as the dashboard send modal. Supports link-only, PDF attachment, or both (mode). Draft invoices are blocked unless allowDraft=true; an already-sent invoice warns unless confirmResend=true. Paid, scheduled, canceled and refunded invoices can NEVER be (re)sent here (no override) \u2014 fetch a copy with get-invoice-link and share it manually. Use dryRun=true to preview recipients/mode without sending. Delivery is asynchronous (Trigger.dev). Custom subject/message are not supported yet \u2014 the standard Refront invoice email template is used.",
|
|
106956
106956
|
inputSchema: {
|
|
106957
106957
|
type: "object",
|
|
106958
106958
|
properties: {
|
|
@@ -106993,7 +106993,7 @@ var TOOLS = [
|
|
|
106993
106993
|
allowDraft: {
|
|
106994
106994
|
type: "boolean",
|
|
106995
106995
|
default: false,
|
|
106996
|
-
description: "Allow sending draft invoices"
|
|
106996
|
+
description: "Allow sending draft invoices (does not affect paid/scheduled/canceled/refunded, which are always blocked)"
|
|
106997
106997
|
},
|
|
106998
106998
|
confirmResend: {
|
|
106999
106999
|
type: "boolean",
|
|
@@ -121874,8 +121874,7 @@ function buildInvoiceDownloadRouteUrl(params) {
|
|
|
121874
121874
|
}
|
|
121875
121875
|
return `${base}/api/download/invoice?id=${encodeURIComponent(params.invoiceId)}`;
|
|
121876
121876
|
}
|
|
121877
|
-
var
|
|
121878
|
-
"draft",
|
|
121877
|
+
var HARD_BLOCKED_INVOICE_STATUSES = /* @__PURE__ */ new Set([
|
|
121879
121878
|
"scheduled",
|
|
121880
121879
|
"canceled",
|
|
121881
121880
|
"refunded",
|
|
@@ -122098,9 +122097,9 @@ async function handleSendInvoiceToCustomer(input) {
|
|
|
122098
122097
|
`Invoice ${invoice.invoiceNumber ?? invoice.id} is still a draft. Finalize it in the dashboard first, or pass allowDraft=true to override.`
|
|
122099
122098
|
);
|
|
122100
122099
|
}
|
|
122101
|
-
if (
|
|
122100
|
+
if (HARD_BLOCKED_INVOICE_STATUSES.has(invoice.status)) {
|
|
122102
122101
|
return textResponse6(
|
|
122103
|
-
`Invoice ${invoice.invoiceNumber ?? invoice.id} has status "${invoice.status}" and cannot be sent.`
|
|
122102
|
+
`Invoice ${invoice.invoiceNumber ?? invoice.id} has status "${invoice.status}" and cannot be (re)sent via MCP. Use get-invoice-link (linkType pdf or public_payment) to fetch a copy and share it manually.`
|
|
122104
122103
|
);
|
|
122105
122104
|
}
|
|
122106
122105
|
if (invoice.sentAt && !input.confirmResend) {
|