@voyantjs/finance-react 0.80.15 → 0.80.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/hooks/use-booking-guarantees.js +3 -3
- package/dist/hooks/use-booking-payment-schedules.js +3 -3
- package/dist/hooks/use-invoice-attachment-mutation.js +3 -3
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts +2 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts.map +1 -1
- package/dist/hooks/use-invoice-bulk-status-mutation.js +1 -1
- package/dist/hooks/use-invoice-credit-note-mutation.js +2 -2
- package/dist/hooks/use-invoice-line-item-mutation.js +3 -3
- package/dist/hooks/use-invoice-mutation.d.ts +37 -0
- package/dist/hooks/use-invoice-mutation.d.ts.map +1 -1
- package/dist/hooks/use-invoice-mutation.js +17 -7
- package/dist/hooks/use-invoice-note-mutation.js +1 -1
- package/dist/hooks/use-invoice-payment-mutation.js +1 -1
- package/dist/hooks/use-invoice.d.ts +2 -0
- package/dist/hooks/use-invoice.d.ts.map +1 -1
- package/dist/hooks/use-invoices.d.ts +2 -0
- package/dist/hooks/use-invoices.d.ts.map +1 -1
- package/dist/hooks/use-payment-mutation.d.ts +1 -1
- package/dist/hooks/use-payment-mutation.js +3 -3
- package/dist/hooks/use-supplier-payment-mutation.js +2 -2
- package/dist/hooks/use-voucher-mutation.js +3 -3
- package/dist/operations.js +3 -3
- package/dist/query-options.d.ts +16 -0
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +14 -14
- package/dist/schemas.d.ts +7 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +3 -1
- package/package.json +5 -5
|
@@ -26,20 +26,20 @@ export function useBookingGuaranteeMutation(bookingId) {
|
|
|
26
26
|
};
|
|
27
27
|
const create = useMutation({
|
|
28
28
|
mutationFn: async (input) => {
|
|
29
|
-
const res = await fetchWithValidation(`/v1/finance/bookings/${bookingId}/guarantees`, guaranteeSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
29
|
+
const res = await fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/guarantees`, guaranteeSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
30
30
|
return res.data;
|
|
31
31
|
},
|
|
32
32
|
onSuccess: invalidate,
|
|
33
33
|
});
|
|
34
34
|
const update = useMutation({
|
|
35
35
|
mutationFn: async ({ id, input }) => {
|
|
36
|
-
const res = await fetchWithValidation(`/v1/finance/bookings/${bookingId}/guarantees/${id}`, guaranteeSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
36
|
+
const res = await fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/guarantees/${id}`, guaranteeSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
37
37
|
return res.data;
|
|
38
38
|
},
|
|
39
39
|
onSuccess: invalidate,
|
|
40
40
|
});
|
|
41
41
|
const remove = useMutation({
|
|
42
|
-
mutationFn: async (guaranteeId) => fetchWithValidation(`/v1/finance/bookings/${bookingId}/guarantees/${guaranteeId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
42
|
+
mutationFn: async (guaranteeId) => fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/guarantees/${guaranteeId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
43
43
|
onSuccess: invalidate,
|
|
44
44
|
});
|
|
45
45
|
return { create, update, remove };
|
|
@@ -27,20 +27,20 @@ export function useBookingPaymentScheduleMutation(bookingId) {
|
|
|
27
27
|
};
|
|
28
28
|
const create = useMutation({
|
|
29
29
|
mutationFn: async (input) => {
|
|
30
|
-
const res = await fetchWithValidation(`/v1/finance/bookings/${bookingId}/payment-schedules`, scheduleSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
30
|
+
const res = await fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/payment-schedules`, scheduleSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
31
31
|
return res.data;
|
|
32
32
|
},
|
|
33
33
|
onSuccess: invalidate,
|
|
34
34
|
});
|
|
35
35
|
const update = useMutation({
|
|
36
36
|
mutationFn: async ({ id, input }) => {
|
|
37
|
-
const res = await fetchWithValidation(`/v1/finance/bookings/${bookingId}/payment-schedules/${id}`, scheduleSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
37
|
+
const res = await fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/payment-schedules/${id}`, scheduleSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
38
38
|
return res.data;
|
|
39
39
|
},
|
|
40
40
|
onSuccess: invalidate,
|
|
41
41
|
});
|
|
42
42
|
const remove = useMutation({
|
|
43
|
-
mutationFn: async (scheduleId) => fetchWithValidation(`/v1/finance/bookings/${bookingId}/payment-schedules/${scheduleId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
43
|
+
mutationFn: async (scheduleId) => fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/payment-schedules/${scheduleId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
44
44
|
onSuccess: invalidate,
|
|
45
45
|
});
|
|
46
46
|
return { create, update, remove };
|
|
@@ -13,7 +13,7 @@ export function useInvoiceAttachmentMutation(invoiceId) {
|
|
|
13
13
|
const queryClient = useQueryClient();
|
|
14
14
|
const create = useMutation({
|
|
15
15
|
mutationFn: async (input) => {
|
|
16
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/attachments`, invoiceAttachmentSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
16
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/attachments`, invoiceAttachmentSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
17
17
|
return data;
|
|
18
18
|
},
|
|
19
19
|
onSuccess: () => {
|
|
@@ -22,7 +22,7 @@ export function useInvoiceAttachmentMutation(invoiceId) {
|
|
|
22
22
|
});
|
|
23
23
|
const update = useMutation({
|
|
24
24
|
mutationFn: async ({ id, input }) => {
|
|
25
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/attachments/${id}`, invoiceAttachmentSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
25
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/attachments/${id}`, invoiceAttachmentSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
26
26
|
return data;
|
|
27
27
|
},
|
|
28
28
|
onSuccess: () => {
|
|
@@ -30,7 +30,7 @@ export function useInvoiceAttachmentMutation(invoiceId) {
|
|
|
30
30
|
},
|
|
31
31
|
});
|
|
32
32
|
const remove = useMutation({
|
|
33
|
-
mutationFn: async (attachmentId) => fetchWithValidation(`/v1/finance/invoices/${invoiceId}/attachments/${attachmentId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
33
|
+
mutationFn: async (attachmentId) => fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/attachments/${attachmentId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
34
34
|
onSuccess: () => {
|
|
35
35
|
void queryClient.invalidateQueries({ queryKey: financeQueryKeys.attachments(invoiceId) });
|
|
36
36
|
},
|
|
@@ -39,6 +39,8 @@ export declare function useInvoiceBulkStatusMutation(): import("@tanstack/react-
|
|
|
39
39
|
createdAt: string;
|
|
40
40
|
updatedAt: string;
|
|
41
41
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
42
|
+
voidedAt?: string | null | undefined;
|
|
43
|
+
voidReason?: string | null | undefined;
|
|
42
44
|
}[];
|
|
43
45
|
failed: InvoiceBulkStatusFailure[];
|
|
44
46
|
}, Error, UpdateInvoicesStatusInput, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-invoice-bulk-status-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice-bulk-status-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,eAAe,CAAA;AAGzE,KAAK,qBAAqB,GAAG,IAAI,CAC/B,aAAa,EACb,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,CACjE,GAAG;IACF,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B,CAAA;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,qBAAqB,EAAE,CAAA;IACjC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,MAAM,EAAE,wBAAwB,EAAE,CAAA;CACnC;AA8BD,wBAAgB,4BAA4B
|
|
1
|
+
{"version":3,"file":"use-invoice-bulk-status-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice-bulk-status-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,eAAe,CAAA;AAGzE,KAAK,qBAAqB,GAAG,IAAI,CAC/B,aAAa,EACb,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,CACjE,GAAG;IACF,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B,CAAA;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,qBAAqB,EAAE,CAAA;IACjC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,MAAM,EAAE,wBAAwB,EAAE,CAAA;CACnC;AA8BD,wBAAgB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAoD3C"}
|
|
@@ -31,7 +31,7 @@ export function useInvoiceBulkStatusMutation() {
|
|
|
31
31
|
for (let index = 0; index < invoices.length; index += BULK_STATUS_BATCH_SIZE) {
|
|
32
32
|
const batch = invoices.slice(index, index + BULK_STATUS_BATCH_SIZE);
|
|
33
33
|
const results = await Promise.allSettled(batch.map(async (invoice) => {
|
|
34
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoice.id}`, invoiceSingleResponse, { baseUrl, fetcher }, {
|
|
34
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoice.id}`, invoiceSingleResponse, { baseUrl, fetcher }, {
|
|
35
35
|
method: "PATCH",
|
|
36
36
|
body: JSON.stringify(buildStatusPayload(invoice, status)),
|
|
37
37
|
});
|
|
@@ -13,7 +13,7 @@ export function useInvoiceCreditNoteMutation(invoiceId) {
|
|
|
13
13
|
const queryClient = useQueryClient();
|
|
14
14
|
const create = useMutation({
|
|
15
15
|
mutationFn: async (input) => {
|
|
16
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/credit-notes`, invoiceCreditNoteSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
16
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/credit-notes`, invoiceCreditNoteSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
17
17
|
return data;
|
|
18
18
|
},
|
|
19
19
|
onSuccess: () => {
|
|
@@ -23,7 +23,7 @@ export function useInvoiceCreditNoteMutation(invoiceId) {
|
|
|
23
23
|
});
|
|
24
24
|
const update = useMutation({
|
|
25
25
|
mutationFn: async ({ id, input }) => {
|
|
26
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/credit-notes/${id}`, invoiceCreditNoteSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
26
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/credit-notes/${id}`, invoiceCreditNoteSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
27
27
|
return data;
|
|
28
28
|
},
|
|
29
29
|
onSuccess: () => {
|
|
@@ -13,7 +13,7 @@ export function useInvoiceLineItemMutation(invoiceId) {
|
|
|
13
13
|
const queryClient = useQueryClient();
|
|
14
14
|
const create = useMutation({
|
|
15
15
|
mutationFn: async (input) => {
|
|
16
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/line-items`, invoiceLineItemSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
16
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/line-items`, invoiceLineItemSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
17
17
|
return data;
|
|
18
18
|
},
|
|
19
19
|
onSuccess: () => {
|
|
@@ -23,7 +23,7 @@ export function useInvoiceLineItemMutation(invoiceId) {
|
|
|
23
23
|
});
|
|
24
24
|
const update = useMutation({
|
|
25
25
|
mutationFn: async ({ id, input }) => {
|
|
26
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/line-items/${id}`, invoiceLineItemSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
26
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/line-items/${id}`, invoiceLineItemSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
27
27
|
return data;
|
|
28
28
|
},
|
|
29
29
|
onSuccess: () => {
|
|
@@ -32,7 +32,7 @@ export function useInvoiceLineItemMutation(invoiceId) {
|
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
const remove = useMutation({
|
|
35
|
-
mutationFn: async (lineItemId) => fetchWithValidation(`/v1/finance/invoices/${invoiceId}/line-items/${lineItemId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
35
|
+
mutationFn: async (lineItemId) => fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/line-items/${lineItemId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
|
|
36
36
|
onSuccess: () => {
|
|
37
37
|
void queryClient.invalidateQueries({ queryKey: financeQueryKeys.lineItems(invoiceId) });
|
|
38
38
|
void queryClient.invalidateQueries({ queryKey: financeQueryKeys.invoice(invoiceId) });
|
|
@@ -16,6 +16,9 @@ export interface CreateInvoiceInput {
|
|
|
16
16
|
notes?: string | null;
|
|
17
17
|
}
|
|
18
18
|
export type UpdateInvoiceInput = Partial<CreateInvoiceInput>;
|
|
19
|
+
export interface VoidInvoiceInput {
|
|
20
|
+
reason?: string | null;
|
|
21
|
+
}
|
|
19
22
|
export declare function useInvoiceMutation(): {
|
|
20
23
|
create: import("@tanstack/react-query").UseMutationResult<{
|
|
21
24
|
[x: string]: unknown;
|
|
@@ -37,6 +40,8 @@ export declare function useInvoiceMutation(): {
|
|
|
37
40
|
createdAt: string;
|
|
38
41
|
updatedAt: string;
|
|
39
42
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
43
|
+
voidedAt?: string | null | undefined;
|
|
44
|
+
voidReason?: string | null | undefined;
|
|
40
45
|
}, Error, CreateInvoiceInput, unknown>;
|
|
41
46
|
createFromBooking: import("@tanstack/react-query").UseMutationResult<{
|
|
42
47
|
[x: string]: unknown;
|
|
@@ -58,6 +63,8 @@ export declare function useInvoiceMutation(): {
|
|
|
58
63
|
createdAt: string;
|
|
59
64
|
updatedAt: string;
|
|
60
65
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
66
|
+
voidedAt?: string | null | undefined;
|
|
67
|
+
voidReason?: string | null | undefined;
|
|
61
68
|
}, Error, CreateInvoiceFromBookingInput, unknown>;
|
|
62
69
|
convertToInvoice: import("@tanstack/react-query").UseMutationResult<{
|
|
63
70
|
[x: string]: unknown;
|
|
@@ -79,6 +86,8 @@ export declare function useInvoiceMutation(): {
|
|
|
79
86
|
createdAt: string;
|
|
80
87
|
updatedAt: string;
|
|
81
88
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
89
|
+
voidedAt?: string | null | undefined;
|
|
90
|
+
voidReason?: string | null | undefined;
|
|
82
91
|
}, Error, {
|
|
83
92
|
id: string;
|
|
84
93
|
input?: ConvertProformaInput;
|
|
@@ -110,6 +119,8 @@ export declare function useInvoiceMutation(): {
|
|
|
110
119
|
createdAt: string;
|
|
111
120
|
updatedAt: string;
|
|
112
121
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
122
|
+
voidedAt?: string | null | undefined;
|
|
123
|
+
voidReason?: string | null | undefined;
|
|
113
124
|
}, Error, {
|
|
114
125
|
id: string;
|
|
115
126
|
input: UpdateInvoiceInput;
|
|
@@ -117,6 +128,32 @@ export declare function useInvoiceMutation(): {
|
|
|
117
128
|
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
118
129
|
success: boolean;
|
|
119
130
|
}, Error, string, unknown>;
|
|
131
|
+
voidInvoice: import("@tanstack/react-query").UseMutationResult<{
|
|
132
|
+
[x: string]: unknown;
|
|
133
|
+
id: string;
|
|
134
|
+
invoiceNumber: string;
|
|
135
|
+
bookingId: string;
|
|
136
|
+
personId: string | null;
|
|
137
|
+
organizationId: string | null;
|
|
138
|
+
status: "void" | "draft" | "pending_external_allocation" | "issued" | "partially_paid" | "paid" | "overdue";
|
|
139
|
+
currency: string;
|
|
140
|
+
subtotalCents: number;
|
|
141
|
+
taxCents: number;
|
|
142
|
+
totalCents: number;
|
|
143
|
+
paidCents: number;
|
|
144
|
+
balanceDueCents: number;
|
|
145
|
+
issueDate: string;
|
|
146
|
+
dueDate: string;
|
|
147
|
+
notes: string | null;
|
|
148
|
+
createdAt: string;
|
|
149
|
+
updatedAt: string;
|
|
150
|
+
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
151
|
+
voidedAt?: string | null | undefined;
|
|
152
|
+
voidReason?: string | null | undefined;
|
|
153
|
+
}, Error, {
|
|
154
|
+
id: string;
|
|
155
|
+
input?: VoidInvoiceInput;
|
|
156
|
+
}, unknown>;
|
|
120
157
|
};
|
|
121
158
|
export interface ConvertProformaInput {
|
|
122
159
|
/** Optional override; server derives from the proforma number when omitted. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-invoice-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice-mutation.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAA0C,MAAM,eAAe,CAAA;AAE1F,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE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,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,MAAM,WAAW,qCAAqC;IACpD,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACvB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B"}
|
|
@@ -10,7 +10,7 @@ export function useInvoiceMutation() {
|
|
|
10
10
|
const queryClient = useQueryClient();
|
|
11
11
|
const create = useMutation({
|
|
12
12
|
mutationFn: async (input) => {
|
|
13
|
-
const { data } = await fetchWithValidation("/v1/finance/invoices", invoiceSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
13
|
+
const { data } = await fetchWithValidation("/v1/admin/finance/invoices", invoiceSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
14
14
|
return data;
|
|
15
15
|
},
|
|
16
16
|
onSuccess: (data) => {
|
|
@@ -20,7 +20,7 @@ export function useInvoiceMutation() {
|
|
|
20
20
|
});
|
|
21
21
|
const update = useMutation({
|
|
22
22
|
mutationFn: async ({ id, input }) => {
|
|
23
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${id}`, invoiceSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
23
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${id}`, invoiceSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
24
24
|
return data;
|
|
25
25
|
},
|
|
26
26
|
onSuccess: (data) => {
|
|
@@ -29,7 +29,7 @@ export function useInvoiceMutation() {
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
const remove = useMutation({
|
|
32
|
-
mutationFn: async (id) => fetchWithValidation(`/v1/finance/invoices/${id}`, successEnvelope, { baseUrl, fetcher }, {
|
|
32
|
+
mutationFn: async (id) => fetchWithValidation(`/v1/admin/finance/invoices/${id}`, successEnvelope, { baseUrl, fetcher }, {
|
|
33
33
|
method: "DELETE",
|
|
34
34
|
}),
|
|
35
35
|
onSuccess: (_data, id) => {
|
|
@@ -41,6 +41,16 @@ export function useInvoiceMutation() {
|
|
|
41
41
|
queryClient.removeQueries({ queryKey: financeQueryKeys.notes(id) });
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
|
+
const voidInvoice = useMutation({
|
|
45
|
+
mutationFn: async ({ id, input }) => {
|
|
46
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${id}/void`, invoiceSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
|
|
47
|
+
return data;
|
|
48
|
+
},
|
|
49
|
+
onSuccess: (data) => {
|
|
50
|
+
void queryClient.invalidateQueries({ queryKey: financeQueryKeys.invoices() });
|
|
51
|
+
queryClient.setQueryData(financeQueryKeys.invoice(data.id), { data });
|
|
52
|
+
},
|
|
53
|
+
});
|
|
44
54
|
/**
|
|
45
55
|
* Create + issue an invoice (or proforma) from an existing booking. The
|
|
46
56
|
* server builds line items from either the booking items or a targeted
|
|
@@ -48,7 +58,7 @@ export function useInvoiceMutation() {
|
|
|
48
58
|
*/
|
|
49
59
|
const createFromBooking = useMutation({
|
|
50
60
|
mutationFn: async (input) => {
|
|
51
|
-
const { data } = await fetchWithValidation("/v1/finance/invoices/from-booking", invoiceSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
61
|
+
const { data } = await fetchWithValidation("/v1/admin/finance/invoices/from-booking", invoiceSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
52
62
|
return data;
|
|
53
63
|
},
|
|
54
64
|
onSuccess: (data) => {
|
|
@@ -64,7 +74,7 @@ export function useInvoiceMutation() {
|
|
|
64
74
|
*/
|
|
65
75
|
const convertToInvoice = useMutation({
|
|
66
76
|
mutationFn: async ({ id, input }) => {
|
|
67
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${id}/convert-to-invoice`, invoiceSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
|
|
77
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${id}/convert-to-invoice`, invoiceSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
|
|
68
78
|
return data;
|
|
69
79
|
},
|
|
70
80
|
onSuccess: (data) => {
|
|
@@ -80,7 +90,7 @@ export function useInvoiceMutation() {
|
|
|
80
90
|
*/
|
|
81
91
|
const render = useMutation({
|
|
82
92
|
mutationFn: async ({ id, input }) => {
|
|
83
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${id}/render`, invoiceRenditionResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? { format: "pdf" }) });
|
|
93
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${id}/render`, invoiceRenditionResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? { format: "pdf" }) });
|
|
84
94
|
return data;
|
|
85
95
|
},
|
|
86
96
|
onSuccess: (_data, variables) => {
|
|
@@ -90,7 +100,7 @@ export function useInvoiceMutation() {
|
|
|
90
100
|
void queryClient.invalidateQueries({ queryKey: financeQueryKeys.invoices() });
|
|
91
101
|
},
|
|
92
102
|
});
|
|
93
|
-
return { create, createFromBooking, convertToInvoice, render, update, remove };
|
|
103
|
+
return { create, createFromBooking, convertToInvoice, render, update, remove, voidInvoice };
|
|
94
104
|
}
|
|
95
105
|
// Light envelope schema for the render endpoint — the server returns
|
|
96
106
|
// `{ data: rendition }` where rendition is { id, invoiceId, format, ... }.
|
|
@@ -13,7 +13,7 @@ export function useInvoiceNoteMutation(invoiceId) {
|
|
|
13
13
|
const queryClient = useQueryClient();
|
|
14
14
|
return useMutation({
|
|
15
15
|
mutationFn: async (input) => {
|
|
16
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/notes`, invoiceNoteSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
16
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/notes`, invoiceNoteSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
17
17
|
return data;
|
|
18
18
|
},
|
|
19
19
|
onSuccess: () => {
|
|
@@ -13,7 +13,7 @@ export function useInvoicePaymentMutation(invoiceId) {
|
|
|
13
13
|
const queryClient = useQueryClient();
|
|
14
14
|
return useMutation({
|
|
15
15
|
mutationFn: async (input) => {
|
|
16
|
-
const { data } = await fetchWithValidation(`/v1/finance/invoices/${invoiceId}/payments`, invoicePaymentSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
16
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/payments`, invoicePaymentSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
17
17
|
return data;
|
|
18
18
|
},
|
|
19
19
|
onSuccess: () => {
|
|
@@ -22,6 +22,8 @@ export declare function useInvoice(id: string | null | undefined, options?: UseI
|
|
|
22
22
|
createdAt: string;
|
|
23
23
|
updatedAt: string;
|
|
24
24
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
25
|
+
voidedAt?: string | null | undefined;
|
|
26
|
+
voidReason?: string | null | undefined;
|
|
25
27
|
};
|
|
26
28
|
}, Error>;
|
|
27
29
|
//# sourceMappingURL=use-invoice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-invoice.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,GAAE,iBAAsB
|
|
1
|
+
{"version":3,"file":"use-invoice.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,GAAE,iBAAsB;;;;;;;;;;;;;;;;;;;;;;;;UAQxF"}
|
|
@@ -23,6 +23,8 @@ export declare function useInvoices(options?: UseInvoicesOptions): import("@tans
|
|
|
23
23
|
createdAt: string;
|
|
24
24
|
updatedAt: string;
|
|
25
25
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
26
|
+
voidedAt?: string | null | undefined;
|
|
27
|
+
voidReason?: string | null | undefined;
|
|
26
28
|
}[];
|
|
27
29
|
total: number;
|
|
28
30
|
limit: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-invoices.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoices.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAGjE,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACnE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB
|
|
1
|
+
{"version":3,"file":"use-invoices.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoices.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAGjE,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACnE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQ3D"}
|
|
@@ -15,7 +15,7 @@ export interface UpdatePaymentInput {
|
|
|
15
15
|
* Mutations for an already-recorded customer payment.
|
|
16
16
|
*
|
|
17
17
|
* `useInvoicePaymentMutation(invoiceId)` covers create; update + delete
|
|
18
|
-
* route through `/v1/finance/payments/:id` and recompute invoice totals
|
|
18
|
+
* route through `/v1/admin/finance/payments/:id` and recompute invoice totals
|
|
19
19
|
* server-side, so callers don't need to refresh the invoice manually —
|
|
20
20
|
* onSuccess invalidates the invoice and payment list queries.
|
|
21
21
|
*/
|
|
@@ -30,7 +30,7 @@ function invalidatePaymentScopes(queryClient, invoiceId, paymentId) {
|
|
|
30
30
|
* Mutations for an already-recorded customer payment.
|
|
31
31
|
*
|
|
32
32
|
* `useInvoicePaymentMutation(invoiceId)` covers create; update + delete
|
|
33
|
-
* route through `/v1/finance/payments/:id` and recompute invoice totals
|
|
33
|
+
* route through `/v1/admin/finance/payments/:id` and recompute invoice totals
|
|
34
34
|
* server-side, so callers don't need to refresh the invoice manually —
|
|
35
35
|
* onSuccess invalidates the invoice and payment list queries.
|
|
36
36
|
*/
|
|
@@ -39,7 +39,7 @@ export function usePaymentMutation() {
|
|
|
39
39
|
const queryClient = useQueryClient();
|
|
40
40
|
const update = useMutation({
|
|
41
41
|
mutationFn: async ({ id, input }) => {
|
|
42
|
-
const { data } = await fetchWithValidation(`/v1/finance/payments/${id}`, paymentSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
42
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/payments/${id}`, paymentSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
43
43
|
return data;
|
|
44
44
|
},
|
|
45
45
|
onSuccess: (data) => {
|
|
@@ -48,7 +48,7 @@ export function usePaymentMutation() {
|
|
|
48
48
|
});
|
|
49
49
|
const remove = useMutation({
|
|
50
50
|
mutationFn: async (id) => {
|
|
51
|
-
const { data } = await fetchWithValidation(`/v1/finance/payments/${id}`, paymentSingleResponse, { baseUrl, fetcher }, { method: "DELETE" });
|
|
51
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/payments/${id}`, paymentSingleResponse, { baseUrl, fetcher }, { method: "DELETE" });
|
|
52
52
|
return data;
|
|
53
53
|
},
|
|
54
54
|
onSuccess: (data) => {
|
|
@@ -13,7 +13,7 @@ export function useSupplierPaymentMutation() {
|
|
|
13
13
|
const queryClient = useQueryClient();
|
|
14
14
|
const create = useMutation({
|
|
15
15
|
mutationFn: async (input) => {
|
|
16
|
-
const { data } = await fetchWithValidation("/v1/finance/supplier-payments", supplierPaymentSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
16
|
+
const { data } = await fetchWithValidation("/v1/admin/finance/supplier-payments", supplierPaymentSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
17
17
|
return data;
|
|
18
18
|
},
|
|
19
19
|
onSuccess: () => {
|
|
@@ -23,7 +23,7 @@ export function useSupplierPaymentMutation() {
|
|
|
23
23
|
});
|
|
24
24
|
const update = useMutation({
|
|
25
25
|
mutationFn: async ({ id, input }) => {
|
|
26
|
-
const { data } = await fetchWithValidation(`/v1/finance/supplier-payments/${id}`, supplierPaymentSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
26
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/supplier-payments/${id}`, supplierPaymentSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
27
27
|
return data;
|
|
28
28
|
},
|
|
29
29
|
onSuccess: () => {
|
|
@@ -16,7 +16,7 @@ export function useVoucherMutation() {
|
|
|
16
16
|
const invalidateLists = () => queryClient.invalidateQueries({ queryKey: financeQueryKeys.vouchers() });
|
|
17
17
|
const issue = useMutation({
|
|
18
18
|
mutationFn: async (input) => {
|
|
19
|
-
const { data } = await fetchWithValidation("/v1/finance/vouchers", voucherSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
19
|
+
const { data } = await fetchWithValidation("/v1/admin/finance/vouchers", voucherSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
20
20
|
return data;
|
|
21
21
|
},
|
|
22
22
|
onSuccess: (data) => {
|
|
@@ -26,7 +26,7 @@ export function useVoucherMutation() {
|
|
|
26
26
|
});
|
|
27
27
|
const update = useMutation({
|
|
28
28
|
mutationFn: async ({ id, input }) => {
|
|
29
|
-
const { data } = await fetchWithValidation(`/v1/finance/vouchers/${id}`, voucherSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
29
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/vouchers/${id}`, voucherSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
30
30
|
return data;
|
|
31
31
|
},
|
|
32
32
|
onSuccess: (data) => {
|
|
@@ -36,7 +36,7 @@ export function useVoucherMutation() {
|
|
|
36
36
|
});
|
|
37
37
|
const redeem = useMutation({
|
|
38
38
|
mutationFn: async ({ id, input, }) => {
|
|
39
|
-
const { data } = await fetchWithValidation(`/v1/finance/vouchers/${id}/redeem`, voucherRedemptionResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
39
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/vouchers/${id}/redeem`, voucherRedemptionResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
40
40
|
return data;
|
|
41
41
|
},
|
|
42
42
|
onSuccess: (result) => {
|
package/dist/operations.js
CHANGED
|
@@ -9,10 +9,10 @@ function toFinanceActionLedgerQuery(input) {
|
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export function listInvoiceActionLedger(client, invoiceId, input = {}) {
|
|
12
|
-
return fetchWithValidation(withQueryParams(`/v1/finance/invoices/${invoiceId}/action-ledger`, toFinanceActionLedgerQuery(input)), financeActionLedgerListResponse, client);
|
|
12
|
+
return fetchWithValidation(withQueryParams(`/v1/admin/finance/invoices/${invoiceId}/action-ledger`, toFinanceActionLedgerQuery(input)), financeActionLedgerListResponse, client);
|
|
13
13
|
}
|
|
14
14
|
export function listPaymentSessionActionLedger(client, paymentSessionId, input = {}) {
|
|
15
|
-
return fetchWithValidation(withQueryParams(`/v1/finance/payment-sessions/${paymentSessionId}/action-ledger`, toFinanceActionLedgerQuery(input)), financeActionLedgerListResponse, client);
|
|
15
|
+
return fetchWithValidation(withQueryParams(`/v1/admin/finance/payment-sessions/${paymentSessionId}/action-ledger`, toFinanceActionLedgerQuery(input)), financeActionLedgerListResponse, client);
|
|
16
16
|
}
|
|
17
17
|
export function getPublicFinanceDocumentByReference(client, query) {
|
|
18
18
|
return fetchWithValidation(withQueryParams("/v1/public/finance/documents/by-reference", query), publicFinanceDocumentLookupResponse, client);
|
|
@@ -33,7 +33,7 @@ export function getAdminBookingPayments(client, bookingId) {
|
|
|
33
33
|
return fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/payments`, publicBookingFinancePaymentsResponse, client);
|
|
34
34
|
}
|
|
35
35
|
export function getInvoiceFxRate(client, input) {
|
|
36
|
-
return fetchWithValidation(withQueryParams("/v1/finance/invoice-fx-rate", input), invoiceFxRateResponse, client);
|
|
36
|
+
return fetchWithValidation(withQueryParams("/v1/admin/finance/invoice-fx-rate", input), invoiceFxRateResponse, client);
|
|
37
37
|
}
|
|
38
38
|
export function getPublicBookingPaymentOptions(client, bookingId, filters) {
|
|
39
39
|
return fetchWithValidation(withQueryParams(`/v1/public/finance/bookings/${bookingId}/payment-options`, filters), publicBookingPaymentOptionsResponse, client);
|
package/dist/query-options.d.ts
CHANGED
|
@@ -249,6 +249,8 @@ export declare function getInvoicesQueryOptions(client: FetchWithValidationOptio
|
|
|
249
249
|
createdAt: string;
|
|
250
250
|
updatedAt: string;
|
|
251
251
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
252
|
+
voidedAt?: string | null | undefined;
|
|
253
|
+
voidReason?: string | null | undefined;
|
|
252
254
|
}[];
|
|
253
255
|
total: number;
|
|
254
256
|
limit: number;
|
|
@@ -274,6 +276,8 @@ export declare function getInvoicesQueryOptions(client: FetchWithValidationOptio
|
|
|
274
276
|
createdAt: string;
|
|
275
277
|
updatedAt: string;
|
|
276
278
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
279
|
+
voidedAt?: string | null | undefined;
|
|
280
|
+
voidReason?: string | null | undefined;
|
|
277
281
|
}[];
|
|
278
282
|
total: number;
|
|
279
283
|
limit: number;
|
|
@@ -300,6 +304,8 @@ export declare function getInvoicesQueryOptions(client: FetchWithValidationOptio
|
|
|
300
304
|
createdAt: string;
|
|
301
305
|
updatedAt: string;
|
|
302
306
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
307
|
+
voidedAt?: string | null | undefined;
|
|
308
|
+
voidReason?: string | null | undefined;
|
|
303
309
|
}[];
|
|
304
310
|
total: number;
|
|
305
311
|
limit: number;
|
|
@@ -328,6 +334,8 @@ export declare function getInvoicesQueryOptions(client: FetchWithValidationOptio
|
|
|
328
334
|
createdAt: string;
|
|
329
335
|
updatedAt: string;
|
|
330
336
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
337
|
+
voidedAt?: string | null | undefined;
|
|
338
|
+
voidReason?: string | null | undefined;
|
|
331
339
|
}[];
|
|
332
340
|
total: number;
|
|
333
341
|
limit: number;
|
|
@@ -777,6 +785,8 @@ export declare function getInvoiceQueryOptions(client: FetchWithValidationOption
|
|
|
777
785
|
createdAt: string;
|
|
778
786
|
updatedAt: string;
|
|
779
787
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
788
|
+
voidedAt?: string | null | undefined;
|
|
789
|
+
voidReason?: string | null | undefined;
|
|
780
790
|
};
|
|
781
791
|
}, Error, {
|
|
782
792
|
data: {
|
|
@@ -799,6 +809,8 @@ export declare function getInvoiceQueryOptions(client: FetchWithValidationOption
|
|
|
799
809
|
createdAt: string;
|
|
800
810
|
updatedAt: string;
|
|
801
811
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
812
|
+
voidedAt?: string | null | undefined;
|
|
813
|
+
voidReason?: string | null | undefined;
|
|
802
814
|
};
|
|
803
815
|
}, readonly ["voyant", "finance", "invoices", "detail", string]>, "queryFn"> & {
|
|
804
816
|
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
@@ -822,6 +834,8 @@ export declare function getInvoiceQueryOptions(client: FetchWithValidationOption
|
|
|
822
834
|
createdAt: string;
|
|
823
835
|
updatedAt: string;
|
|
824
836
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
837
|
+
voidedAt?: string | null | undefined;
|
|
838
|
+
voidReason?: string | null | undefined;
|
|
825
839
|
};
|
|
826
840
|
}, readonly ["voyant", "finance", "invoices", "detail", string], never> | undefined;
|
|
827
841
|
} & {
|
|
@@ -847,6 +861,8 @@ export declare function getInvoiceQueryOptions(client: FetchWithValidationOption
|
|
|
847
861
|
createdAt: string;
|
|
848
862
|
updatedAt: string;
|
|
849
863
|
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
864
|
+
voidedAt?: string | null | undefined;
|
|
865
|
+
voidReason?: string | null | undefined;
|
|
850
866
|
};
|
|
851
867
|
};
|
|
852
868
|
[dataTagErrorSymbol]: Error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,2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CAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,8BAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc7C;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,kBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BjC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,iBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhC;AAED,OAAO,EACL,kCAAkC,EAClC,yCAAyC,EACzC,KAAK,6BAA6B,GACnC,MAAM,kCAAkC,CAAA"}
|
package/dist/query-options.js
CHANGED
|
@@ -8,14 +8,14 @@ export function getBookingPaymentSchedulesQueryOptions(client, bookingId, option
|
|
|
8
8
|
const { enabled: _enabled = true } = options;
|
|
9
9
|
return queryOptions({
|
|
10
10
|
queryKey: financeQueryKeys.bookingPaymentSchedules(bookingId ?? ""),
|
|
11
|
-
queryFn: () => fetchWithValidation(`/v1/finance/bookings/${bookingId}/payment-schedules`, bookingPaymentSchedulesResponse, client),
|
|
11
|
+
queryFn: () => fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/payment-schedules`, bookingPaymentSchedulesResponse, client),
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
export function getBookingGuaranteesQueryOptions(client, bookingId, options = {}) {
|
|
15
15
|
const { enabled: _enabled = true } = options;
|
|
16
16
|
return queryOptions({
|
|
17
17
|
queryKey: financeQueryKeys.bookingGuarantees(bookingId ?? ""),
|
|
18
|
-
queryFn: () => fetchWithValidation(`/v1/finance/bookings/${bookingId}/guarantees`, bookingGuaranteesResponse, client),
|
|
18
|
+
queryFn: () => fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/guarantees`, bookingGuaranteesResponse, client),
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
export function getInvoiceFxRateQueryOptions(client, options) {
|
|
@@ -65,7 +65,7 @@ export function getInvoicesQueryOptions(client, options = {}) {
|
|
|
65
65
|
if (filters.offset !== undefined)
|
|
66
66
|
params.set("offset", String(filters.offset));
|
|
67
67
|
const qs = params.toString();
|
|
68
|
-
return fetchWithValidation(`/v1/finance/invoices${qs ? `?${qs}` : ""}`, invoiceListResponse, client);
|
|
68
|
+
return fetchWithValidation(`/v1/admin/finance/invoices${qs ? `?${qs}` : ""}`, invoiceListResponse, client);
|
|
69
69
|
},
|
|
70
70
|
});
|
|
71
71
|
}
|
|
@@ -123,7 +123,7 @@ export function getAllPaymentsQueryOptions(client, options = {}) {
|
|
|
123
123
|
if (filters.offset !== undefined)
|
|
124
124
|
params.set("offset", String(filters.offset));
|
|
125
125
|
const qs = params.toString();
|
|
126
|
-
return fetchWithValidation(`/v1/finance/payments${qs ? `?${qs}` : ""}`, allPaymentsListResponse, client);
|
|
126
|
+
return fetchWithValidation(`/v1/admin/finance/payments${qs ? `?${qs}` : ""}`, allPaymentsListResponse, client);
|
|
127
127
|
},
|
|
128
128
|
});
|
|
129
129
|
}
|
|
@@ -134,7 +134,7 @@ export function getPaymentQueryOptions(client, id, options = {}) {
|
|
|
134
134
|
queryFn: async () => {
|
|
135
135
|
if (!id)
|
|
136
136
|
throw new Error("getPaymentQueryOptions requires an id");
|
|
137
|
-
return fetchWithValidation(`/v1/finance/payments/${id}`, paymentSingleResponse, client);
|
|
137
|
+
return fetchWithValidation(`/v1/admin/finance/payments/${id}`, paymentSingleResponse, client);
|
|
138
138
|
},
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -167,7 +167,7 @@ export function getSupplierPaymentsQueryOptions(client, options = {}) {
|
|
|
167
167
|
if (filters.offset !== undefined)
|
|
168
168
|
params.set("offset", String(filters.offset));
|
|
169
169
|
const qs = params.toString();
|
|
170
|
-
return fetchWithValidation(`/v1/finance/supplier-payments${qs ? `?${qs}` : ""}`, supplierPaymentListResponse, client);
|
|
170
|
+
return fetchWithValidation(`/v1/admin/finance/supplier-payments${qs ? `?${qs}` : ""}`, supplierPaymentListResponse, client);
|
|
171
171
|
},
|
|
172
172
|
});
|
|
173
173
|
}
|
|
@@ -178,7 +178,7 @@ export function getInvoiceQueryOptions(client, id, options = {}) {
|
|
|
178
178
|
queryFn: async () => {
|
|
179
179
|
if (!id)
|
|
180
180
|
throw new Error("getInvoiceQueryOptions requires an id");
|
|
181
|
-
return fetchWithValidation(`/v1/finance/invoices/${id}`, invoiceSingleResponse, client);
|
|
181
|
+
return fetchWithValidation(`/v1/admin/finance/invoices/${id}`, invoiceSingleResponse, client);
|
|
182
182
|
},
|
|
183
183
|
});
|
|
184
184
|
}
|
|
@@ -189,7 +189,7 @@ export function getInvoiceLineItemsQueryOptions(client, invoiceId, options = {})
|
|
|
189
189
|
queryFn: async () => {
|
|
190
190
|
if (!invoiceId)
|
|
191
191
|
throw new Error("getInvoiceLineItemsQueryOptions requires an invoiceId");
|
|
192
|
-
return fetchWithValidation(`/v1/finance/invoices/${invoiceId}/line-items`, invoiceLineItemsResponse, client);
|
|
192
|
+
return fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/line-items`, invoiceLineItemsResponse, client);
|
|
193
193
|
},
|
|
194
194
|
});
|
|
195
195
|
}
|
|
@@ -200,7 +200,7 @@ export function getInvoicePaymentsQueryOptions(client, invoiceId, options = {})
|
|
|
200
200
|
queryFn: async () => {
|
|
201
201
|
if (!invoiceId)
|
|
202
202
|
throw new Error("getInvoicePaymentsQueryOptions requires an invoiceId");
|
|
203
|
-
return fetchWithValidation(`/v1/finance/invoices/${invoiceId}/payments`, invoicePaymentsResponse, client);
|
|
203
|
+
return fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/payments`, invoicePaymentsResponse, client);
|
|
204
204
|
},
|
|
205
205
|
});
|
|
206
206
|
}
|
|
@@ -211,7 +211,7 @@ export function getInvoiceCreditNotesQueryOptions(client, invoiceId, options = {
|
|
|
211
211
|
queryFn: async () => {
|
|
212
212
|
if (!invoiceId)
|
|
213
213
|
throw new Error("getInvoiceCreditNotesQueryOptions requires an invoiceId");
|
|
214
|
-
return fetchWithValidation(`/v1/finance/invoices/${invoiceId}/credit-notes`, invoiceCreditNotesResponse, client);
|
|
214
|
+
return fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/credit-notes`, invoiceCreditNotesResponse, client);
|
|
215
215
|
},
|
|
216
216
|
});
|
|
217
217
|
}
|
|
@@ -222,7 +222,7 @@ export function getInvoiceNotesQueryOptions(client, invoiceId, options = {}) {
|
|
|
222
222
|
queryFn: async () => {
|
|
223
223
|
if (!invoiceId)
|
|
224
224
|
throw new Error("getInvoiceNotesQueryOptions requires an invoiceId");
|
|
225
|
-
return fetchWithValidation(`/v1/finance/invoices/${invoiceId}/notes`, invoiceNotesResponse, client);
|
|
225
|
+
return fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/notes`, invoiceNotesResponse, client);
|
|
226
226
|
},
|
|
227
227
|
});
|
|
228
228
|
}
|
|
@@ -233,7 +233,7 @@ export function getInvoiceAttachmentsQueryOptions(client, invoiceId, options = {
|
|
|
233
233
|
queryFn: async () => {
|
|
234
234
|
if (!invoiceId)
|
|
235
235
|
throw new Error("getInvoiceAttachmentsQueryOptions requires an invoiceId");
|
|
236
|
-
return fetchWithValidation(`/v1/finance/invoices/${invoiceId}/attachments`, invoiceAttachmentsResponse, client);
|
|
236
|
+
return fetchWithValidation(`/v1/admin/finance/invoices/${invoiceId}/attachments`, invoiceAttachmentsResponse, client);
|
|
237
237
|
},
|
|
238
238
|
});
|
|
239
239
|
}
|
|
@@ -330,7 +330,7 @@ export function getVouchersQueryOptions(client, options = {}) {
|
|
|
330
330
|
if (filters.offset !== undefined)
|
|
331
331
|
params.set("offset", String(filters.offset));
|
|
332
332
|
const qs = params.toString();
|
|
333
|
-
return fetchWithValidation(`/v1/finance/vouchers${qs ? `?${qs}` : ""}`, voucherListResponse, client);
|
|
333
|
+
return fetchWithValidation(`/v1/admin/finance/vouchers${qs ? `?${qs}` : ""}`, voucherListResponse, client);
|
|
334
334
|
},
|
|
335
335
|
});
|
|
336
336
|
}
|
|
@@ -341,7 +341,7 @@ export function getVoucherQueryOptions(client, id, options = {}) {
|
|
|
341
341
|
queryFn: async () => {
|
|
342
342
|
if (!id)
|
|
343
343
|
throw new Error("getVoucherQueryOptions requires an id");
|
|
344
|
-
return fetchWithValidation(`/v1/finance/vouchers/${id}`, voucherDetailResponse, client);
|
|
344
|
+
return fetchWithValidation(`/v1/admin/finance/vouchers/${id}`, voucherDetailResponse, client);
|
|
345
345
|
},
|
|
346
346
|
});
|
|
347
347
|
}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -121,6 +121,8 @@ export declare const invoiceRecordSchema: z.ZodObject<{
|
|
|
121
121
|
issueDate: z.ZodString;
|
|
122
122
|
dueDate: z.ZodString;
|
|
123
123
|
notes: z.ZodNullable<z.ZodString>;
|
|
124
|
+
voidedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
|
+
voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
126
|
createdAt: z.ZodString;
|
|
125
127
|
updatedAt: z.ZodString;
|
|
126
128
|
}, z.core.$loose>;
|
|
@@ -471,6 +473,8 @@ export declare const invoiceListResponse: z.ZodObject<{
|
|
|
471
473
|
issueDate: z.ZodString;
|
|
472
474
|
dueDate: z.ZodString;
|
|
473
475
|
notes: z.ZodNullable<z.ZodString>;
|
|
476
|
+
voidedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
477
|
+
voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
474
478
|
createdAt: z.ZodString;
|
|
475
479
|
updatedAt: z.ZodString;
|
|
476
480
|
}, z.core.$loose>>;
|
|
@@ -666,6 +670,8 @@ export declare const invoiceSingleResponse: z.ZodObject<{
|
|
|
666
670
|
issueDate: z.ZodString;
|
|
667
671
|
dueDate: z.ZodString;
|
|
668
672
|
notes: z.ZodNullable<z.ZodString>;
|
|
673
|
+
voidedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
674
|
+
voidReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
669
675
|
createdAt: z.ZodString;
|
|
670
676
|
updatedAt: z.ZodString;
|
|
671
677
|
}, z.core.$loose>;
|
|
@@ -1338,7 +1344,7 @@ export declare const voucherDetailSchema: z.ZodObject<{
|
|
|
1338
1344
|
}, z.core.$strip>>;
|
|
1339
1345
|
}, z.core.$strip>;
|
|
1340
1346
|
export type VoucherDetailRecord = z.infer<typeof voucherDetailSchema>;
|
|
1341
|
-
/** Result envelope for `POST /v1/finance/vouchers/:id/redeem`. */
|
|
1347
|
+
/** Result envelope for `POST /v1/admin/finance/vouchers/:id/redeem`. */
|
|
1342
1348
|
export declare const voucherRedemptionResultSchema: z.ZodObject<{
|
|
1343
1349
|
voucher: z.ZodObject<{
|
|
1344
1350
|
id: z.ZodString;
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,iCAAiC,EACjC,kCAAkC,EAClC,iCAAiC,EACjC,sCAAsC,EACtC,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,+BAA+B,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AA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyC,CAAA;AACzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsC,CAAA;AACxE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsC,CAAA;AACxE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgD,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -79,6 +79,8 @@ export const invoiceRecordSchema = z
|
|
|
79
79
|
issueDate: z.string(),
|
|
80
80
|
dueDate: z.string(),
|
|
81
81
|
notes: z.string().nullable(),
|
|
82
|
+
voidedAt: z.string().nullable().optional(),
|
|
83
|
+
voidReason: z.string().nullable().optional(),
|
|
82
84
|
createdAt: z.string(),
|
|
83
85
|
updatedAt: z.string(),
|
|
84
86
|
})
|
|
@@ -403,7 +405,7 @@ export const voucherRedemptionRecordSchema = z.object({
|
|
|
403
405
|
export const voucherDetailSchema = voucherRecordSchema.extend({
|
|
404
406
|
redemptions: z.array(voucherRedemptionRecordSchema),
|
|
405
407
|
});
|
|
406
|
-
/** Result envelope for `POST /v1/finance/vouchers/:id/redeem`. */
|
|
408
|
+
/** Result envelope for `POST /v1/admin/finance/vouchers/:id/redeem`. */
|
|
407
409
|
export const voucherRedemptionResultSchema = z.object({
|
|
408
410
|
voucher: voucherRecordSchema,
|
|
409
411
|
redemption: voucherRedemptionRecordSchema.nullable(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/finance-react",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.17",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/finance": "0.80.
|
|
44
|
+
"@voyantjs/finance": "0.80.17"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.100.11",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/finance": "0.80.
|
|
56
|
-
"@voyantjs/react": "0.80.
|
|
55
|
+
"@voyantjs/finance": "0.80.17",
|
|
56
|
+
"@voyantjs/react": "0.80.17",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.80.
|
|
60
|
+
"@voyantjs/react": "0.80.17"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|