fix(quotes): persist is_no_quote through quotes.create path
Closes the gap that the MCP quotes.create tool advertised is_no_quote
but the upstream POST /api/v1/quotes/create chain silently dropped the
flag. Three additions:
- CreateQuoteInput interface gains the field
- createQuote() forwards it to pb.collection.create(...)
- POST handler forwards body.is_no_quote to createQuote()
Spec test case 10 ("quotes.create with is_no_quote: true persists
flag and returns quote") now passes end-to-end.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e51a405414
commit
87eacdc307
2 changed files with 3 additions and 0 deletions
|
|
@ -99,6 +99,7 @@ export async function POST(req: NextRequest) {
|
|||
? body.notes
|
||||
: undefined,
|
||||
status: body.status || undefined,
|
||||
is_no_quote: body.is_no_quote,
|
||||
items: body.items,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -2583,6 +2583,7 @@ export interface CreateQuoteInput {
|
|||
items: CreateQuoteInputItem[];
|
||||
/** Optional override — defaults to validity_days=30. */
|
||||
validity_days?: number;
|
||||
is_no_quote?: boolean;
|
||||
}
|
||||
|
||||
export interface CreateQuoteResult {
|
||||
|
|
@ -2661,6 +2662,7 @@ export async function createQuote(
|
|||
has_attachments: false,
|
||||
email_subject: input.description || "",
|
||||
email_body: "",
|
||||
is_no_quote: input.is_no_quote,
|
||||
});
|
||||
|
||||
// ── 5. Create the line items via the shared service layer so the
|
||||
|
|
|
|||
Loading…
Reference in a new issue