Skip to content

Commit 67e9d1b

Browse files
committed
feat: updated form-data types, added builderId and createdWith to misc
1 parent be0ec9d commit 67e9d1b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/create-invoice-form/src/lib/utils/prepareRequest.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ export const prepareRequestParams = ({
5959
format: "rnf_invoice",
6060
version: "0.0.3",
6161
},
62-
miscellaneous:
63-
formData.miscellaneous.labels.length > 0
64-
? formData.miscellaneous
65-
: undefined,
62+
miscellaneous: {
63+
labels: formData.miscellaneous.labels || undefined,
64+
builderId: formData.miscellaneous.builderId || undefined,
65+
createdWith: formData.miscellaneous.createdWith || undefined,
66+
},
6667
creationDate: new Date(formData.issuedOn).toISOString(),
6768
invoiceNumber: formData.invoiceNumber,
6869
note: formData.note.length > 0 ? formData.note : undefined,

shared/types/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export interface CustomFormData {
1515
miscellaneous: {
1616
// This is a placeholder for any additional data that the user wants to include in the invoice
1717
labels: string[];
18+
builderId: string;
19+
createdWith: string;
1820
};
1921
invoiceNumber: string;
2022
payerAddress: string;

0 commit comments

Comments
 (0)