@voyantjs/finance-react 0.28.1 → 0.28.3

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.
Files changed (34) hide show
  1. package/dist/hooks/index.d.ts +2 -0
  2. package/dist/hooks/index.d.ts.map +1 -1
  3. package/dist/hooks/index.js +2 -0
  4. package/dist/hooks/use-admin-booking-payments.d.ts +1 -1
  5. package/dist/hooks/use-all-payments.d.ts +35 -0
  6. package/dist/hooks/use-all-payments.d.ts.map +1 -0
  7. package/dist/hooks/use-all-payments.js +12 -0
  8. package/dist/hooks/use-booking-guarantees.d.ts +3 -3
  9. package/dist/hooks/use-invoice-payment-mutation.d.ts +1 -1
  10. package/dist/hooks/use-invoice-payment-mutation.d.ts.map +1 -1
  11. package/dist/hooks/use-invoice-payment-mutation.js +1 -0
  12. package/dist/hooks/use-invoice-payments.d.ts +1 -1
  13. package/dist/hooks/use-payment.d.ts +31 -0
  14. package/dist/hooks/use-payment.d.ts.map +1 -0
  15. package/dist/hooks/use-payment.js +12 -0
  16. package/dist/hooks/use-public-booking-payments.d.ts +1 -1
  17. package/dist/hooks/use-supplier-payment-mutation.d.ts +2 -2
  18. package/dist/hooks/use-supplier-payment-mutation.d.ts.map +1 -1
  19. package/dist/hooks/use-supplier-payment-mutation.js +2 -0
  20. package/dist/hooks/use-supplier-payments.d.ts +1 -1
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -2
  24. package/dist/operations.d.ts +2 -2
  25. package/dist/query-keys.d.ts +42 -0
  26. package/dist/query-keys.d.ts.map +1 -1
  27. package/dist/query-keys.js +3 -0
  28. package/dist/query-options.d.ts +258 -20
  29. package/dist/query-options.d.ts.map +1 -1
  30. package/dist/query-options.js +83 -1
  31. package/dist/schemas.d.ts +120 -9
  32. package/dist/schemas.d.ts.map +1 -1
  33. package/dist/schemas.js +28 -0
  34. package/package.json +5 -5
@@ -1,4 +1,5 @@
1
1
  import { type FetchWithValidationOptions } from "./client.js";
2
+ import type { UseAllPaymentsOptions } from "./hooks/use-all-payments.js";
2
3
  import type { UseBookingGuaranteesOptions } from "./hooks/use-booking-guarantees.js";
3
4
  import type { UseBookingPaymentSchedulesOptions } from "./hooks/use-booking-payment-schedules.js";
4
5
  import type { UseInvoiceOptions } from "./hooks/use-invoice.js";
@@ -7,6 +8,7 @@ import type { UseInvoiceLineItemsOptions } from "./hooks/use-invoice-line-items.
7
8
  import type { UseInvoiceNotesOptions } from "./hooks/use-invoice-notes.js";
8
9
  import type { UseInvoicePaymentsOptions } from "./hooks/use-invoice-payments.js";
9
10
  import type { UseInvoicesOptions } from "./hooks/use-invoices.js";
11
+ import type { UsePaymentOptions } from "./hooks/use-payment.js";
10
12
  import type { UsePublicBookingDocumentsOptions } from "./hooks/use-public-booking-documents.js";
11
13
  import type { UsePublicBookingPaymentOptionsOptions } from "./hooks/use-public-booking-payment-options.js";
12
14
  import type { UsePublicBookingPaymentsOptions } from "./hooks/use-public-booking-payments.js";
@@ -86,7 +88,7 @@ export declare function getBookingGuaranteesQueryOptions(client: FetchWithValida
86
88
  bookingPaymentScheduleId: string | null;
87
89
  bookingItemId: string | null;
88
90
  guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
89
- status: "pending" | "active" | "failed" | "expired" | "cancelled" | "released";
91
+ status: "pending" | "failed" | "active" | "expired" | "cancelled" | "released";
90
92
  currency: string | null;
91
93
  amountCents: number | null;
92
94
  provider: string | null;
@@ -105,7 +107,7 @@ export declare function getBookingGuaranteesQueryOptions(client: FetchWithValida
105
107
  bookingPaymentScheduleId: string | null;
106
108
  bookingItemId: string | null;
107
109
  guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
108
- status: "pending" | "active" | "failed" | "expired" | "cancelled" | "released";
110
+ status: "pending" | "failed" | "active" | "expired" | "cancelled" | "released";
109
111
  currency: string | null;
110
112
  amountCents: number | null;
111
113
  provider: string | null;
@@ -125,7 +127,7 @@ export declare function getBookingGuaranteesQueryOptions(client: FetchWithValida
125
127
  bookingPaymentScheduleId: string | null;
126
128
  bookingItemId: string | null;
127
129
  guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
128
- status: "pending" | "active" | "failed" | "expired" | "cancelled" | "released";
130
+ status: "pending" | "failed" | "active" | "expired" | "cancelled" | "released";
129
131
  currency: string | null;
130
132
  amountCents: number | null;
131
133
  provider: string | null;
@@ -147,7 +149,7 @@ export declare function getBookingGuaranteesQueryOptions(client: FetchWithValida
147
149
  bookingPaymentScheduleId: string | null;
148
150
  bookingItemId: string | null;
149
151
  guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
150
- status: "pending" | "active" | "failed" | "expired" | "cancelled" | "released";
152
+ status: "pending" | "failed" | "active" | "expired" | "cancelled" | "released";
151
153
  currency: string | null;
152
154
  amountCents: number | null;
153
155
  provider: string | null;
@@ -271,6 +273,242 @@ export declare function getInvoicesQueryOptions(client: FetchWithValidationOptio
271
273
  [dataTagErrorSymbol]: Error;
272
274
  };
273
275
  };
276
+ export declare function getAllPaymentsQueryOptions(client: FetchWithValidationOptions, options?: UseAllPaymentsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
277
+ data: {
278
+ kind: "customer" | "supplier";
279
+ id: string;
280
+ invoiceId: string | null;
281
+ invoiceNumber: string | null;
282
+ bookingId: string | null;
283
+ bookingNumber: string | null;
284
+ supplierId: string | null;
285
+ supplierName: string | null;
286
+ personId: string | null;
287
+ personName: string | null;
288
+ organizationId: string | null;
289
+ organizationName: string | null;
290
+ amountCents: number;
291
+ currency: string;
292
+ baseCurrency: string | null;
293
+ baseAmountCents: number | null;
294
+ paymentMethod: string;
295
+ status: "pending" | "completed" | "failed" | "refunded";
296
+ referenceNumber: string | null;
297
+ paymentDate: string;
298
+ notes: string | null;
299
+ createdAt: string;
300
+ updatedAt: string;
301
+ }[];
302
+ total: number;
303
+ limit: number;
304
+ offset: number;
305
+ }, Error, {
306
+ data: {
307
+ kind: "customer" | "supplier";
308
+ id: string;
309
+ invoiceId: string | null;
310
+ invoiceNumber: string | null;
311
+ bookingId: string | null;
312
+ bookingNumber: string | null;
313
+ supplierId: string | null;
314
+ supplierName: string | null;
315
+ personId: string | null;
316
+ personName: string | null;
317
+ organizationId: string | null;
318
+ organizationName: string | null;
319
+ amountCents: number;
320
+ currency: string;
321
+ baseCurrency: string | null;
322
+ baseAmountCents: number | null;
323
+ paymentMethod: string;
324
+ status: "pending" | "completed" | "failed" | "refunded";
325
+ referenceNumber: string | null;
326
+ paymentDate: string;
327
+ notes: string | null;
328
+ createdAt: string;
329
+ updatedAt: string;
330
+ }[];
331
+ total: number;
332
+ limit: number;
333
+ offset: number;
334
+ }, readonly ["voyant", "finance", "all-payments", "list", import("./query-keys.js").FinanceAllPaymentsListFilters]>, "queryFn"> & {
335
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
336
+ data: {
337
+ kind: "customer" | "supplier";
338
+ id: string;
339
+ invoiceId: string | null;
340
+ invoiceNumber: string | null;
341
+ bookingId: string | null;
342
+ bookingNumber: string | null;
343
+ supplierId: string | null;
344
+ supplierName: string | null;
345
+ personId: string | null;
346
+ personName: string | null;
347
+ organizationId: string | null;
348
+ organizationName: string | null;
349
+ amountCents: number;
350
+ currency: string;
351
+ baseCurrency: string | null;
352
+ baseAmountCents: number | null;
353
+ paymentMethod: string;
354
+ status: "pending" | "completed" | "failed" | "refunded";
355
+ referenceNumber: string | null;
356
+ paymentDate: string;
357
+ notes: string | null;
358
+ createdAt: string;
359
+ updatedAt: string;
360
+ }[];
361
+ total: number;
362
+ limit: number;
363
+ offset: number;
364
+ }, readonly ["voyant", "finance", "all-payments", "list", import("./query-keys.js").FinanceAllPaymentsListFilters], never> | undefined;
365
+ } & {
366
+ queryKey: readonly ["voyant", "finance", "all-payments", "list", import("./query-keys.js").FinanceAllPaymentsListFilters] & {
367
+ [dataTagSymbol]: {
368
+ data: {
369
+ kind: "customer" | "supplier";
370
+ id: string;
371
+ invoiceId: string | null;
372
+ invoiceNumber: string | null;
373
+ bookingId: string | null;
374
+ bookingNumber: string | null;
375
+ supplierId: string | null;
376
+ supplierName: string | null;
377
+ personId: string | null;
378
+ personName: string | null;
379
+ organizationId: string | null;
380
+ organizationName: string | null;
381
+ amountCents: number;
382
+ currency: string;
383
+ baseCurrency: string | null;
384
+ baseAmountCents: number | null;
385
+ paymentMethod: string;
386
+ status: "pending" | "completed" | "failed" | "refunded";
387
+ referenceNumber: string | null;
388
+ paymentDate: string;
389
+ notes: string | null;
390
+ createdAt: string;
391
+ updatedAt: string;
392
+ }[];
393
+ total: number;
394
+ limit: number;
395
+ offset: number;
396
+ };
397
+ [dataTagErrorSymbol]: Error;
398
+ };
399
+ };
400
+ export declare function getPaymentQueryOptions(client: FetchWithValidationOptions, id: string | null | undefined, options?: UsePaymentOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
401
+ data: {
402
+ kind: "customer" | "supplier";
403
+ id: string;
404
+ invoiceId: string | null;
405
+ invoiceNumber: string | null;
406
+ bookingId: string | null;
407
+ bookingNumber: string | null;
408
+ supplierId: string | null;
409
+ supplierName: string | null;
410
+ personId: string | null;
411
+ personName: string | null;
412
+ organizationId: string | null;
413
+ organizationName: string | null;
414
+ amountCents: number;
415
+ currency: string;
416
+ baseCurrency: string | null;
417
+ baseAmountCents: number | null;
418
+ paymentMethod: string;
419
+ status: "pending" | "completed" | "failed" | "refunded";
420
+ referenceNumber: string | null;
421
+ paymentDate: string;
422
+ notes: string | null;
423
+ createdAt: string;
424
+ updatedAt: string;
425
+ };
426
+ }, Error, {
427
+ data: {
428
+ kind: "customer" | "supplier";
429
+ id: string;
430
+ invoiceId: string | null;
431
+ invoiceNumber: string | null;
432
+ bookingId: string | null;
433
+ bookingNumber: string | null;
434
+ supplierId: string | null;
435
+ supplierName: string | null;
436
+ personId: string | null;
437
+ personName: string | null;
438
+ organizationId: string | null;
439
+ organizationName: string | null;
440
+ amountCents: number;
441
+ currency: string;
442
+ baseCurrency: string | null;
443
+ baseAmountCents: number | null;
444
+ paymentMethod: string;
445
+ status: "pending" | "completed" | "failed" | "refunded";
446
+ referenceNumber: string | null;
447
+ paymentDate: string;
448
+ notes: string | null;
449
+ createdAt: string;
450
+ updatedAt: string;
451
+ };
452
+ }, readonly ["voyant", "finance", "all-payments", "detail", string]>, "queryFn"> & {
453
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
454
+ data: {
455
+ kind: "customer" | "supplier";
456
+ id: string;
457
+ invoiceId: string | null;
458
+ invoiceNumber: string | null;
459
+ bookingId: string | null;
460
+ bookingNumber: string | null;
461
+ supplierId: string | null;
462
+ supplierName: string | null;
463
+ personId: string | null;
464
+ personName: string | null;
465
+ organizationId: string | null;
466
+ organizationName: string | null;
467
+ amountCents: number;
468
+ currency: string;
469
+ baseCurrency: string | null;
470
+ baseAmountCents: number | null;
471
+ paymentMethod: string;
472
+ status: "pending" | "completed" | "failed" | "refunded";
473
+ referenceNumber: string | null;
474
+ paymentDate: string;
475
+ notes: string | null;
476
+ createdAt: string;
477
+ updatedAt: string;
478
+ };
479
+ }, readonly ["voyant", "finance", "all-payments", "detail", string], never> | undefined;
480
+ } & {
481
+ queryKey: readonly ["voyant", "finance", "all-payments", "detail", string] & {
482
+ [dataTagSymbol]: {
483
+ data: {
484
+ kind: "customer" | "supplier";
485
+ id: string;
486
+ invoiceId: string | null;
487
+ invoiceNumber: string | null;
488
+ bookingId: string | null;
489
+ bookingNumber: string | null;
490
+ supplierId: string | null;
491
+ supplierName: string | null;
492
+ personId: string | null;
493
+ personName: string | null;
494
+ organizationId: string | null;
495
+ organizationName: string | null;
496
+ amountCents: number;
497
+ currency: string;
498
+ baseCurrency: string | null;
499
+ baseAmountCents: number | null;
500
+ paymentMethod: string;
501
+ status: "pending" | "completed" | "failed" | "refunded";
502
+ referenceNumber: string | null;
503
+ paymentDate: string;
504
+ notes: string | null;
505
+ createdAt: string;
506
+ updatedAt: string;
507
+ };
508
+ };
509
+ [dataTagErrorSymbol]: Error;
510
+ };
511
+ };
274
512
  export declare function getSupplierPaymentsQueryOptions(client: FetchWithValidationOptions, options?: UseSupplierPaymentsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
275
513
  data: {
276
514
  id: string;
@@ -279,7 +517,7 @@ export declare function getSupplierPaymentsQueryOptions(client: FetchWithValidat
279
517
  amountCents: number;
280
518
  currency: string;
281
519
  paymentMethod: string;
282
- status: "pending" | "failed" | "completed" | "refunded";
520
+ status: "pending" | "completed" | "failed" | "refunded";
283
521
  referenceNumber: string | null;
284
522
  paymentDate: string;
285
523
  createdAt: string;
@@ -296,7 +534,7 @@ export declare function getSupplierPaymentsQueryOptions(client: FetchWithValidat
296
534
  amountCents: number;
297
535
  currency: string;
298
536
  paymentMethod: string;
299
- status: "pending" | "failed" | "completed" | "refunded";
537
+ status: "pending" | "completed" | "failed" | "refunded";
300
538
  referenceNumber: string | null;
301
539
  paymentDate: string;
302
540
  createdAt: string;
@@ -314,7 +552,7 @@ export declare function getSupplierPaymentsQueryOptions(client: FetchWithValidat
314
552
  amountCents: number;
315
553
  currency: string;
316
554
  paymentMethod: string;
317
- status: "pending" | "failed" | "completed" | "refunded";
555
+ status: "pending" | "completed" | "failed" | "refunded";
318
556
  referenceNumber: string | null;
319
557
  paymentDate: string;
320
558
  createdAt: string;
@@ -334,7 +572,7 @@ export declare function getSupplierPaymentsQueryOptions(client: FetchWithValidat
334
572
  amountCents: number;
335
573
  currency: string;
336
574
  paymentMethod: string;
337
- status: "pending" | "failed" | "completed" | "refunded";
575
+ status: "pending" | "completed" | "failed" | "refunded";
338
576
  referenceNumber: string | null;
339
577
  paymentDate: string;
340
578
  createdAt: string;
@@ -506,7 +744,7 @@ export declare function getInvoicePaymentsQueryOptions(client: FetchWithValidati
506
744
  amountCents: number;
507
745
  currency: string;
508
746
  paymentMethod: string;
509
- status: "pending" | "failed" | "completed" | "refunded";
747
+ status: "pending" | "completed" | "failed" | "refunded";
510
748
  referenceNumber: string | null;
511
749
  paymentDate: string;
512
750
  notes: string | null;
@@ -519,7 +757,7 @@ export declare function getInvoicePaymentsQueryOptions(client: FetchWithValidati
519
757
  amountCents: number;
520
758
  currency: string;
521
759
  paymentMethod: string;
522
- status: "pending" | "failed" | "completed" | "refunded";
760
+ status: "pending" | "completed" | "failed" | "refunded";
523
761
  referenceNumber: string | null;
524
762
  paymentDate: string;
525
763
  notes: string | null;
@@ -533,7 +771,7 @@ export declare function getInvoicePaymentsQueryOptions(client: FetchWithValidati
533
771
  amountCents: number;
534
772
  currency: string;
535
773
  paymentMethod: string;
536
- status: "pending" | "failed" | "completed" | "refunded";
774
+ status: "pending" | "completed" | "failed" | "refunded";
537
775
  referenceNumber: string | null;
538
776
  paymentDate: string;
539
777
  notes: string | null;
@@ -549,7 +787,7 @@ export declare function getInvoicePaymentsQueryOptions(client: FetchWithValidati
549
787
  amountCents: number;
550
788
  currency: string;
551
789
  paymentMethod: string;
552
- status: "pending" | "failed" | "completed" | "refunded";
790
+ status: "pending" | "completed" | "failed" | "refunded";
553
791
  referenceNumber: string | null;
554
792
  paymentDate: string;
555
793
  notes: string | null;
@@ -1035,7 +1273,7 @@ export declare function getPublicBookingPaymentsQueryOptions(client: FetchWithVa
1035
1273
  invoiceId: string;
1036
1274
  invoiceNumber: string;
1037
1275
  invoiceType: "invoice" | "proforma" | "credit_note";
1038
- status: "pending" | "failed" | "completed" | "refunded";
1276
+ status: "pending" | "completed" | "failed" | "refunded";
1039
1277
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1040
1278
  amountCents: number;
1041
1279
  currency: string;
@@ -1052,7 +1290,7 @@ export declare function getPublicBookingPaymentsQueryOptions(client: FetchWithVa
1052
1290
  invoiceId: string;
1053
1291
  invoiceNumber: string;
1054
1292
  invoiceType: "invoice" | "proforma" | "credit_note";
1055
- status: "pending" | "failed" | "completed" | "refunded";
1293
+ status: "pending" | "completed" | "failed" | "refunded";
1056
1294
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1057
1295
  amountCents: number;
1058
1296
  currency: string;
@@ -1070,7 +1308,7 @@ export declare function getPublicBookingPaymentsQueryOptions(client: FetchWithVa
1070
1308
  invoiceId: string;
1071
1309
  invoiceNumber: string;
1072
1310
  invoiceType: "invoice" | "proforma" | "credit_note";
1073
- status: "pending" | "failed" | "completed" | "refunded";
1311
+ status: "pending" | "completed" | "failed" | "refunded";
1074
1312
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1075
1313
  amountCents: number;
1076
1314
  currency: string;
@@ -1090,7 +1328,7 @@ export declare function getPublicBookingPaymentsQueryOptions(client: FetchWithVa
1090
1328
  invoiceId: string;
1091
1329
  invoiceNumber: string;
1092
1330
  invoiceType: "invoice" | "proforma" | "credit_note";
1093
- status: "pending" | "failed" | "completed" | "refunded";
1331
+ status: "pending" | "completed" | "failed" | "refunded";
1094
1332
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1095
1333
  amountCents: number;
1096
1334
  currency: string;
@@ -1111,7 +1349,7 @@ export declare function getAdminBookingPaymentsQueryOptions(client: FetchWithVal
1111
1349
  invoiceId: string;
1112
1350
  invoiceNumber: string;
1113
1351
  invoiceType: "invoice" | "proforma" | "credit_note";
1114
- status: "pending" | "failed" | "completed" | "refunded";
1352
+ status: "pending" | "completed" | "failed" | "refunded";
1115
1353
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1116
1354
  amountCents: number;
1117
1355
  currency: string;
@@ -1128,7 +1366,7 @@ export declare function getAdminBookingPaymentsQueryOptions(client: FetchWithVal
1128
1366
  invoiceId: string;
1129
1367
  invoiceNumber: string;
1130
1368
  invoiceType: "invoice" | "proforma" | "credit_note";
1131
- status: "pending" | "failed" | "completed" | "refunded";
1369
+ status: "pending" | "completed" | "failed" | "refunded";
1132
1370
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1133
1371
  amountCents: number;
1134
1372
  currency: string;
@@ -1146,7 +1384,7 @@ export declare function getAdminBookingPaymentsQueryOptions(client: FetchWithVal
1146
1384
  invoiceId: string;
1147
1385
  invoiceNumber: string;
1148
1386
  invoiceType: "invoice" | "proforma" | "credit_note";
1149
- status: "pending" | "failed" | "completed" | "refunded";
1387
+ status: "pending" | "completed" | "failed" | "refunded";
1150
1388
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1151
1389
  amountCents: number;
1152
1390
  currency: string;
@@ -1166,7 +1404,7 @@ export declare function getAdminBookingPaymentsQueryOptions(client: FetchWithVal
1166
1404
  invoiceId: string;
1167
1405
  invoiceNumber: string;
1168
1406
  invoiceType: "invoice" | "proforma" | "credit_note";
1169
- status: "pending" | "failed" | "completed" | "refunded";
1407
+ status: "pending" | "completed" | "failed" | "refunded";
1170
1408
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
1171
1409
  amountCents: number;
1172
1410
  currency: string;
@@ -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,2BAA2B,EAAE,MAAM,mCAAmC,CAAA;AACpF,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BjC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,iBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhC"}
@@ -3,7 +3,7 @@ import { queryOptions } from "@tanstack/react-query";
3
3
  import { fetchWithValidation } from "./client.js";
4
4
  import { getAdminBookingPayments, getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, getPublicFinanceDocumentByReference, getPublicPaymentSession, } from "./operations.js";
5
5
  import { financeQueryKeys } from "./query-keys.js";
6
- import { bookingGuaranteesResponse, bookingPaymentSchedulesResponse, invoiceCreditNotesResponse, invoiceLineItemsResponse, invoiceListResponse, invoiceNotesResponse, invoicePaymentsResponse, invoiceSingleResponse, supplierPaymentListResponse, voucherDetailResponse, voucherListResponse, } from "./schemas.js";
6
+ import { allPaymentsListResponse, bookingGuaranteesResponse, bookingPaymentSchedulesResponse, invoiceCreditNotesResponse, invoiceLineItemsResponse, invoiceListResponse, invoiceNotesResponse, invoicePaymentsResponse, invoiceSingleResponse, paymentSingleResponse, supplierPaymentListResponse, voucherDetailResponse, voucherListResponse, } from "./schemas.js";
7
7
  export function getBookingPaymentSchedulesQueryOptions(client, bookingId, options = {}) {
8
8
  const { enabled: _enabled = true } = options;
9
9
  return queryOptions({
@@ -28,8 +28,22 @@ export function getInvoicesQueryOptions(client, options = {}) {
28
28
  params.set("search", filters.search);
29
29
  if (filters.bookingId)
30
30
  params.set("bookingId", filters.bookingId);
31
+ if (filters.personId)
32
+ params.set("personId", filters.personId);
33
+ if (filters.organizationId)
34
+ params.set("organizationId", filters.organizationId);
31
35
  if (filters.status)
32
36
  params.set("status", filters.status);
37
+ if (filters.currency)
38
+ params.set("currency", filters.currency);
39
+ if (filters.dueDateFrom)
40
+ params.set("dueDateFrom", filters.dueDateFrom);
41
+ if (filters.dueDateTo)
42
+ params.set("dueDateTo", filters.dueDateTo);
43
+ if (filters.sortBy)
44
+ params.set("sortBy", filters.sortBy);
45
+ if (filters.sortDir)
46
+ params.set("sortDir", filters.sortDir);
33
47
  if (filters.limit !== undefined)
34
48
  params.set("limit", String(filters.limit));
35
49
  if (filters.offset !== undefined)
@@ -39,12 +53,80 @@ export function getInvoicesQueryOptions(client, options = {}) {
39
53
  },
40
54
  });
41
55
  }
56
+ export function getAllPaymentsQueryOptions(client, options = {}) {
57
+ const { enabled: _enabled = true, ...filters } = options;
58
+ return queryOptions({
59
+ queryKey: financeQueryKeys.allPaymentsList(filters),
60
+ queryFn: () => {
61
+ const params = new URLSearchParams();
62
+ if (filters.kind)
63
+ params.set("kind", filters.kind);
64
+ if (filters.status)
65
+ params.set("status", filters.status);
66
+ if (filters.paymentMethod)
67
+ params.set("paymentMethod", filters.paymentMethod);
68
+ if (filters.currency)
69
+ params.set("currency", filters.currency);
70
+ if (filters.invoiceId)
71
+ params.set("invoiceId", filters.invoiceId);
72
+ if (filters.bookingId)
73
+ params.set("bookingId", filters.bookingId);
74
+ if (filters.supplierId)
75
+ params.set("supplierId", filters.supplierId);
76
+ if (filters.paymentDateFrom)
77
+ params.set("paymentDateFrom", filters.paymentDateFrom);
78
+ if (filters.paymentDateTo)
79
+ params.set("paymentDateTo", filters.paymentDateTo);
80
+ if (filters.search)
81
+ params.set("search", filters.search);
82
+ if (filters.sortBy)
83
+ params.set("sortBy", filters.sortBy);
84
+ if (filters.sortDir)
85
+ params.set("sortDir", filters.sortDir);
86
+ if (filters.limit !== undefined)
87
+ params.set("limit", String(filters.limit));
88
+ if (filters.offset !== undefined)
89
+ params.set("offset", String(filters.offset));
90
+ const qs = params.toString();
91
+ return fetchWithValidation(`/v1/finance/payments${qs ? `?${qs}` : ""}`, allPaymentsListResponse, client);
92
+ },
93
+ });
94
+ }
95
+ export function getPaymentQueryOptions(client, id, options = {}) {
96
+ const { enabled: _enabled = true } = options;
97
+ return queryOptions({
98
+ queryKey: financeQueryKeys.payment(id ?? ""),
99
+ queryFn: async () => {
100
+ if (!id)
101
+ throw new Error("getPaymentQueryOptions requires an id");
102
+ return fetchWithValidation(`/v1/finance/payments/${id}`, paymentSingleResponse, client);
103
+ },
104
+ });
105
+ }
42
106
  export function getSupplierPaymentsQueryOptions(client, options = {}) {
43
107
  const { enabled: _enabled = true, ...filters } = options;
44
108
  return queryOptions({
45
109
  queryKey: financeQueryKeys.supplierPaymentsList(filters),
46
110
  queryFn: () => {
47
111
  const params = new URLSearchParams();
112
+ if (filters.bookingId)
113
+ params.set("bookingId", filters.bookingId);
114
+ if (filters.supplierId)
115
+ params.set("supplierId", filters.supplierId);
116
+ if (filters.status)
117
+ params.set("status", filters.status);
118
+ if (filters.paymentMethod)
119
+ params.set("paymentMethod", filters.paymentMethod);
120
+ if (filters.currency)
121
+ params.set("currency", filters.currency);
122
+ if (filters.paymentDateFrom)
123
+ params.set("paymentDateFrom", filters.paymentDateFrom);
124
+ if (filters.paymentDateTo)
125
+ params.set("paymentDateTo", filters.paymentDateTo);
126
+ if (filters.sortBy)
127
+ params.set("sortBy", filters.sortBy);
128
+ if (filters.sortDir)
129
+ params.set("sortDir", filters.sortDir);
48
130
  if (filters.limit !== undefined)
49
131
  params.set("limit", String(filters.limit));
50
132
  if (filters.offset !== undefined)