@voyantjs/finance 0.5.0 → 0.6.0

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/service.d.ts CHANGED
@@ -141,15 +141,15 @@ export declare const financeService: {
141
141
  updatedAt: Date;
142
142
  } | null>;
143
143
  createPaymentInstrument(db: PostgresJsDatabase, data: CreatePaymentInstrumentInput): Promise<{
144
+ metadata: unknown;
144
145
  id: string;
145
146
  brand: string | null;
146
- status: "expired" | "revoked" | "active" | "inactive" | "failed_verification";
147
- personId: string | null;
148
- organizationId: string | null;
149
147
  createdAt: Date;
150
148
  updatedAt: Date;
149
+ organizationId: string | null;
150
+ status: "expired" | "revoked" | "active" | "inactive" | "failed_verification";
151
151
  notes: string | null;
152
- metadata: unknown;
152
+ personId: string | null;
153
153
  label: string;
154
154
  ownerType: "internal" | "supplier" | "other" | "client" | "channel" | "agency";
155
155
  supplierId: string | null;
@@ -209,7 +209,7 @@ export declare const financeService: {
209
209
  paymentAuthorizationId: string | null;
210
210
  paymentCaptureId: string | null;
211
211
  paymentId: string | null;
212
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
212
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
213
213
  provider: string | null;
214
214
  providerSessionId: string | null;
215
215
  providerPaymentId: string | null;
@@ -257,7 +257,7 @@ export declare const financeService: {
257
257
  paymentAuthorizationId: string | null;
258
258
  paymentCaptureId: string | null;
259
259
  paymentId: string | null;
260
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
260
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
261
261
  provider: string | null;
262
262
  providerSessionId: string | null;
263
263
  providerPaymentId: string | null;
@@ -289,22 +289,22 @@ export declare const financeService: {
289
289
  updatedAt: Date;
290
290
  } | null>;
291
291
  createPaymentSession(db: PostgresJsDatabase, data: CreatePaymentSessionInput): Promise<{
292
+ metadata: Record<string, unknown> | null;
292
293
  id: string;
293
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
294
+ createdAt: Date;
295
+ updatedAt: Date;
296
+ expiresAt: Date | null;
297
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
298
+ currency: string;
299
+ notes: string | null;
294
300
  expiredAt: Date | null;
295
301
  cancelledAt: Date | null;
296
302
  completedAt: Date | null;
297
- createdAt: Date;
298
- updatedAt: Date;
299
303
  bookingId: string | null;
300
- notes: string | null;
301
- metadata: Record<string, unknown> | null;
302
- expiresAt: Date | null;
303
304
  provider: string | null;
304
305
  targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
305
306
  targetId: string | null;
306
307
  orderId: string | null;
307
- currency: string;
308
308
  invoiceId: string | null;
309
309
  amountCents: number;
310
310
  bookingPaymentScheduleId: string | null;
@@ -345,7 +345,7 @@ export declare const financeService: {
345
345
  paymentAuthorizationId: string | null;
346
346
  paymentCaptureId: string | null;
347
347
  paymentId: string | null;
348
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
348
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
349
349
  provider: string | null;
350
350
  providerSessionId: string | null;
351
351
  providerPaymentId: string | null;
@@ -389,7 +389,7 @@ export declare const financeService: {
389
389
  paymentAuthorizationId: string | null;
390
390
  paymentCaptureId: string | null;
391
391
  paymentId: string | null;
392
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
392
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
393
393
  provider: string | null;
394
394
  providerSessionId: string | null;
395
395
  providerPaymentId: string | null;
@@ -433,7 +433,7 @@ export declare const financeService: {
433
433
  paymentAuthorizationId: string | null;
434
434
  paymentCaptureId: string | null;
435
435
  paymentId: string | null;
436
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
436
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
437
437
  provider: string | null;
438
438
  providerSessionId: string | null;
439
439
  providerPaymentId: string | null;
@@ -477,7 +477,7 @@ export declare const financeService: {
477
477
  paymentAuthorizationId: string | null;
478
478
  paymentCaptureId: string | null;
479
479
  paymentId: string | null;
480
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
480
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
481
481
  provider: string | null;
482
482
  providerSessionId: string | null;
483
483
  providerPaymentId: string | null;
@@ -521,7 +521,7 @@ export declare const financeService: {
521
521
  paymentAuthorizationId: string | null;
522
522
  paymentCaptureId: string | null;
523
523
  paymentId: string | null;
524
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
524
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
525
525
  provider: string | null;
526
526
  providerSessionId: string | null;
527
527
  providerPaymentId: string | null;
@@ -565,7 +565,7 @@ export declare const financeService: {
565
565
  paymentAuthorizationId: string | null;
566
566
  paymentCaptureId: string | null;
567
567
  paymentId: string | null;
568
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
568
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
569
569
  provider: string | null;
570
570
  providerSessionId: string | null;
571
571
  providerPaymentId: string | null;
@@ -604,7 +604,7 @@ export declare const financeService: {
604
604
  invoiceId: string | null;
605
605
  bookingGuaranteeId: string | null;
606
606
  paymentInstrumentId: string | null;
607
- status: "expired" | "pending" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
607
+ status: "pending" | "expired" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
608
608
  captureMode: "manual" | "automatic";
609
609
  currency: string;
610
610
  amountCents: number;
@@ -629,7 +629,7 @@ export declare const financeService: {
629
629
  invoiceId: string | null;
630
630
  bookingGuaranteeId: string | null;
631
631
  paymentInstrumentId: string | null;
632
- status: "expired" | "pending" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
632
+ status: "pending" | "expired" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
633
633
  captureMode: "manual" | "automatic";
634
634
  currency: string;
635
635
  amountCents: number;
@@ -645,15 +645,15 @@ export declare const financeService: {
645
645
  } | null>;
646
646
  createPaymentAuthorization(db: PostgresJsDatabase, data: CreatePaymentAuthorizationInput): Promise<{
647
647
  id: string;
648
- status: "expired" | "pending" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
649
648
  createdAt: Date;
650
649
  updatedAt: Date;
651
- bookingId: string | null;
652
- notes: string | null;
653
650
  expiresAt: Date | null;
651
+ status: "pending" | "expired" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
652
+ currency: string;
653
+ notes: string | null;
654
+ bookingId: string | null;
654
655
  provider: string | null;
655
656
  orderId: string | null;
656
- currency: string;
657
657
  invoiceId: string | null;
658
658
  amountCents: number;
659
659
  paymentInstrumentId: string | null;
@@ -671,7 +671,7 @@ export declare const financeService: {
671
671
  invoiceId: string | null;
672
672
  bookingGuaranteeId: string | null;
673
673
  paymentInstrumentId: string | null;
674
- status: "expired" | "pending" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
674
+ status: "pending" | "expired" | "failed" | "authorized" | "partially_captured" | "captured" | "voided";
675
675
  captureMode: "manual" | "automatic";
676
676
  currency: string;
677
677
  amountCents: number;
@@ -693,7 +693,7 @@ export declare const financeService: {
693
693
  id: string;
694
694
  paymentAuthorizationId: string | null;
695
695
  invoiceId: string | null;
696
- status: "completed" | "pending" | "failed" | "refunded" | "voided";
696
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
697
697
  currency: string;
698
698
  amountCents: number;
699
699
  provider: string | null;
@@ -712,7 +712,7 @@ export declare const financeService: {
712
712
  id: string;
713
713
  paymentAuthorizationId: string | null;
714
714
  invoiceId: string | null;
715
- status: "completed" | "pending" | "failed" | "refunded" | "voided";
715
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
716
716
  currency: string;
717
717
  amountCents: number;
718
718
  provider: string | null;
@@ -725,12 +725,12 @@ export declare const financeService: {
725
725
  } | null>;
726
726
  createPaymentCapture(db: PostgresJsDatabase, data: CreatePaymentCaptureInput): Promise<{
727
727
  id: string;
728
- status: "completed" | "pending" | "failed" | "refunded" | "voided";
729
728
  createdAt: Date;
730
729
  updatedAt: Date;
730
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
731
+ currency: string;
731
732
  notes: string | null;
732
733
  provider: string | null;
733
- currency: string;
734
734
  invoiceId: string | null;
735
735
  amountCents: number;
736
736
  paymentAuthorizationId: string | null;
@@ -742,7 +742,7 @@ export declare const financeService: {
742
742
  id: string;
743
743
  paymentAuthorizationId: string | null;
744
744
  invoiceId: string | null;
745
- status: "completed" | "pending" | "failed" | "refunded" | "voided";
745
+ status: "pending" | "completed" | "failed" | "refunded" | "voided";
746
746
  currency: string;
747
747
  amountCents: number;
748
748
  provider: string | null;
@@ -830,7 +830,7 @@ export declare const financeService: {
830
830
  tableName: "booking_payment_schedules";
831
831
  dataType: "string";
832
832
  columnType: "PgEnumColumn";
833
- data: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
833
+ data: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
834
834
  driverParam: string;
835
835
  notNull: true;
836
836
  hasDefault: true;
@@ -949,7 +949,7 @@ export declare const financeService: {
949
949
  bookingId: string;
950
950
  bookingItemId: string | null;
951
951
  scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
952
- status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
952
+ status: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
953
953
  dueDate: string;
954
954
  currency: string;
955
955
  amountCents: number;
@@ -1030,7 +1030,7 @@ export declare const financeService: {
1030
1030
  tableName: "booking_payment_schedules";
1031
1031
  dataType: "string";
1032
1032
  columnType: "PgEnumColumn";
1033
- data: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
1033
+ data: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
1034
1034
  driverParam: string;
1035
1035
  notNull: true;
1036
1036
  hasDefault: true;
@@ -1147,26 +1147,26 @@ export declare const financeService: {
1147
1147
  }>, "where" | "orderBy">;
1148
1148
  createBookingPaymentSchedule(db: PostgresJsDatabase, bookingId: string, data: CreateBookingPaymentScheduleInput): Promise<{
1149
1149
  id: string;
1150
- status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
1151
1150
  createdAt: Date;
1152
1151
  updatedAt: Date;
1153
- bookingId: string;
1152
+ status: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
1153
+ currency: string;
1154
1154
  notes: string | null;
1155
+ bookingId: string;
1155
1156
  bookingItemId: string | null;
1156
- currency: string;
1157
1157
  dueDate: string;
1158
1158
  scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
1159
1159
  amountCents: number;
1160
1160
  } | null>;
1161
1161
  applyDefaultBookingPaymentPlan(db: PostgresJsDatabase, bookingId: string, data: ApplyDefaultBookingPaymentPlanInput): Promise<{
1162
1162
  id: string;
1163
- status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
1164
1163
  createdAt: Date;
1165
1164
  updatedAt: Date;
1166
- bookingId: string;
1165
+ status: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
1166
+ currency: string;
1167
1167
  notes: string | null;
1168
+ bookingId: string;
1168
1169
  bookingItemId: string | null;
1169
- currency: string;
1170
1170
  dueDate: string;
1171
1171
  scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
1172
1172
  amountCents: number;
@@ -1176,7 +1176,7 @@ export declare const financeService: {
1176
1176
  bookingId: string;
1177
1177
  bookingItemId: string | null;
1178
1178
  scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
1179
- status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
1179
+ status: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
1180
1180
  dueDate: string;
1181
1181
  currency: string;
1182
1182
  amountCents: number;
@@ -1188,22 +1188,22 @@ export declare const financeService: {
1188
1188
  id: string;
1189
1189
  } | null>;
1190
1190
  createPaymentSessionFromBookingSchedule(db: PostgresJsDatabase, scheduleId: string, data: CreatePaymentSessionFromScheduleInput): Promise<{
1191
+ metadata: Record<string, unknown> | null;
1191
1192
  id: string;
1192
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
1193
+ createdAt: Date;
1194
+ updatedAt: Date;
1195
+ expiresAt: Date | null;
1196
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
1197
+ currency: string;
1198
+ notes: string | null;
1193
1199
  expiredAt: Date | null;
1194
1200
  cancelledAt: Date | null;
1195
1201
  completedAt: Date | null;
1196
- createdAt: Date;
1197
- updatedAt: Date;
1198
1202
  bookingId: string | null;
1199
- notes: string | null;
1200
- metadata: Record<string, unknown> | null;
1201
- expiresAt: Date | null;
1202
1203
  provider: string | null;
1203
1204
  targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
1204
1205
  targetId: string | null;
1205
1206
  orderId: string | null;
1206
- currency: string;
1207
1207
  invoiceId: string | null;
1208
1208
  amountCents: number;
1209
1209
  bookingPaymentScheduleId: string | null;
@@ -1232,22 +1232,22 @@ export declare const financeService: {
1232
1232
  providerPayload: Record<string, unknown> | null;
1233
1233
  } | null>;
1234
1234
  createPaymentSessionFromInvoice(db: PostgresJsDatabase, invoiceId: string, data: CreatePaymentSessionFromInvoiceInput): Promise<{
1235
+ metadata: Record<string, unknown> | null;
1235
1236
  id: string;
1236
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
1237
+ createdAt: Date;
1238
+ updatedAt: Date;
1239
+ expiresAt: Date | null;
1240
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
1241
+ currency: string;
1242
+ notes: string | null;
1237
1243
  expiredAt: Date | null;
1238
1244
  cancelledAt: Date | null;
1239
1245
  completedAt: Date | null;
1240
- createdAt: Date;
1241
- updatedAt: Date;
1242
1246
  bookingId: string | null;
1243
- notes: string | null;
1244
- metadata: Record<string, unknown> | null;
1245
- expiresAt: Date | null;
1246
1247
  provider: string | null;
1247
1248
  targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
1248
1249
  targetId: string | null;
1249
1250
  orderId: string | null;
1250
- currency: string;
1251
1251
  invoiceId: string | null;
1252
1252
  amountCents: number;
1253
1253
  bookingPaymentScheduleId: string | null;
@@ -1366,7 +1366,7 @@ export declare const financeService: {
1366
1366
  tableName: "booking_guarantees";
1367
1367
  dataType: "string";
1368
1368
  columnType: "PgEnumColumn";
1369
- data: "expired" | "cancelled" | "pending" | "released" | "failed" | "active";
1369
+ data: "pending" | "expired" | "cancelled" | "released" | "failed" | "active";
1370
1370
  driverParam: string;
1371
1371
  notNull: true;
1372
1372
  hasDefault: true;
@@ -1588,7 +1588,7 @@ export declare const financeService: {
1588
1588
  bookingPaymentScheduleId: string | null;
1589
1589
  bookingItemId: string | null;
1590
1590
  guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
1591
- status: "expired" | "cancelled" | "pending" | "released" | "failed" | "active";
1591
+ status: "pending" | "expired" | "cancelled" | "released" | "failed" | "active";
1592
1592
  paymentInstrumentId: string | null;
1593
1593
  paymentAuthorizationId: string | null;
1594
1594
  currency: string | null;
@@ -1692,7 +1692,7 @@ export declare const financeService: {
1692
1692
  tableName: "booking_guarantees";
1693
1693
  dataType: "string";
1694
1694
  columnType: "PgEnumColumn";
1695
- data: "expired" | "cancelled" | "pending" | "released" | "failed" | "active";
1695
+ data: "pending" | "expired" | "cancelled" | "released" | "failed" | "active";
1696
1696
  driverParam: string;
1697
1697
  notNull: true;
1698
1698
  hasDefault: true;
@@ -1911,16 +1911,16 @@ export declare const financeService: {
1911
1911
  }>, "where" | "orderBy">;
1912
1912
  createBookingGuarantee(db: PostgresJsDatabase, bookingId: string, data: CreateBookingGuaranteeInput): Promise<{
1913
1913
  id: string;
1914
- status: "expired" | "cancelled" | "pending" | "released" | "failed" | "active";
1915
1914
  createdAt: Date;
1916
1915
  updatedAt: Date;
1917
- bookingId: string;
1916
+ expiresAt: Date | null;
1917
+ status: "pending" | "expired" | "cancelled" | "released" | "failed" | "active";
1918
+ currency: string | null;
1918
1919
  notes: string | null;
1920
+ bookingId: string;
1919
1921
  bookingItemId: string | null;
1920
1922
  releasedAt: Date | null;
1921
- expiresAt: Date | null;
1922
1923
  provider: string | null;
1923
- currency: string | null;
1924
1924
  amountCents: number | null;
1925
1925
  bookingPaymentScheduleId: string | null;
1926
1926
  guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
@@ -1930,22 +1930,22 @@ export declare const financeService: {
1930
1930
  guaranteedAt: Date | null;
1931
1931
  } | null>;
1932
1932
  createPaymentSessionFromBookingGuarantee(db: PostgresJsDatabase, guaranteeId: string, data: CreatePaymentSessionFromGuaranteeInput): Promise<{
1933
+ metadata: Record<string, unknown> | null;
1933
1934
  id: string;
1934
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
1935
+ createdAt: Date;
1936
+ updatedAt: Date;
1937
+ expiresAt: Date | null;
1938
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
1939
+ currency: string;
1940
+ notes: string | null;
1935
1941
  expiredAt: Date | null;
1936
1942
  cancelledAt: Date | null;
1937
1943
  completedAt: Date | null;
1938
- createdAt: Date;
1939
- updatedAt: Date;
1940
1944
  bookingId: string | null;
1941
- notes: string | null;
1942
- metadata: Record<string, unknown> | null;
1943
- expiresAt: Date | null;
1944
1945
  provider: string | null;
1945
1946
  targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
1946
1947
  targetId: string | null;
1947
1948
  orderId: string | null;
1948
- currency: string;
1949
1949
  invoiceId: string | null;
1950
1950
  amountCents: number;
1951
1951
  bookingPaymentScheduleId: string | null;
@@ -1979,7 +1979,7 @@ export declare const financeService: {
1979
1979
  bookingPaymentScheduleId: string | null;
1980
1980
  bookingItemId: string | null;
1981
1981
  guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
1982
- status: "expired" | "cancelled" | "pending" | "released" | "failed" | "active";
1982
+ status: "pending" | "expired" | "cancelled" | "released" | "failed" | "active";
1983
1983
  paymentInstrumentId: string | null;
1984
1984
  paymentAuthorizationId: string | null;
1985
1985
  currency: string | null;
@@ -2495,12 +2495,12 @@ export declare const financeService: {
2495
2495
  name: string;
2496
2496
  createdAt: Date;
2497
2497
  updatedAt: Date;
2498
- bookingItemId: string;
2498
+ scope: "included" | "excluded" | "withheld";
2499
2499
  currency: string;
2500
- amountCents: number;
2501
2500
  code: string | null;
2501
+ bookingItemId: string;
2502
+ amountCents: number;
2502
2503
  jurisdiction: string | null;
2503
- scope: "included" | "excluded" | "withheld";
2504
2504
  rateBasisPoints: number | null;
2505
2505
  includedInPrice: boolean;
2506
2506
  remittanceParty: string | null;
@@ -2667,7 +2667,7 @@ export declare const financeService: {
2667
2667
  tableName: "booking_item_commissions";
2668
2668
  dataType: "string";
2669
2669
  columnType: "PgEnumColumn";
2670
- data: "pending" | "paid" | "void" | "accrued" | "payable";
2670
+ data: "pending" | "void" | "paid" | "accrued" | "payable";
2671
2671
  driverParam: string;
2672
2672
  notNull: true;
2673
2673
  hasDefault: true;
@@ -2773,7 +2773,7 @@ export declare const financeService: {
2773
2773
  currency: string | null;
2774
2774
  amountCents: number | null;
2775
2775
  rateBasisPoints: number | null;
2776
- status: "pending" | "paid" | "void" | "accrued" | "payable";
2776
+ status: "pending" | "void" | "paid" | "accrued" | "payable";
2777
2777
  payableAt: string | null;
2778
2778
  paidAt: string | null;
2779
2779
  notes: string | null;
@@ -2921,7 +2921,7 @@ export declare const financeService: {
2921
2921
  tableName: "booking_item_commissions";
2922
2922
  dataType: "string";
2923
2923
  columnType: "PgEnumColumn";
2924
- data: "pending" | "paid" | "void" | "accrued" | "payable";
2924
+ data: "pending" | "void" | "paid" | "accrued" | "payable";
2925
2925
  driverParam: string;
2926
2926
  notNull: true;
2927
2927
  hasDefault: true;
@@ -3021,13 +3021,13 @@ export declare const financeService: {
3021
3021
  }>, "where" | "orderBy">;
3022
3022
  createBookingItemCommission(db: PostgresJsDatabase, bookingItemId: string, data: CreateBookingItemCommissionInput): Promise<{
3023
3023
  id: string;
3024
- status: "pending" | "paid" | "void" | "accrued" | "payable";
3025
3024
  createdAt: Date;
3026
3025
  updatedAt: Date;
3026
+ status: "pending" | "void" | "paid" | "accrued" | "payable";
3027
+ currency: string | null;
3027
3028
  notes: string | null;
3028
3029
  bookingItemId: string;
3029
3030
  channelId: string | null;
3030
- currency: string | null;
3031
3031
  amountCents: number | null;
3032
3032
  rateBasisPoints: number | null;
3033
3033
  recipientType: "internal" | "supplier" | "other" | "affiliate" | "channel" | "agency" | "agent";
@@ -3044,7 +3044,7 @@ export declare const financeService: {
3044
3044
  currency: string | null;
3045
3045
  amountCents: number | null;
3046
3046
  rateBasisPoints: number | null;
3047
- status: "pending" | "paid" | "void" | "accrued" | "payable";
3047
+ status: "pending" | "void" | "paid" | "accrued" | "payable";
3048
3048
  payableAt: string | null;
3049
3049
  paidAt: string | null;
3050
3050
  notes: string | null;
@@ -3100,7 +3100,7 @@ export declare const financeService: {
3100
3100
  fxRateSetId: string | null;
3101
3101
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
3102
3102
  paymentInstrumentId: string | null;
3103
- status: "completed" | "pending" | "failed" | "refunded";
3103
+ status: "pending" | "completed" | "failed" | "refunded";
3104
3104
  referenceNumber: string | null;
3105
3105
  paymentDate: string;
3106
3106
  notes: string | null;
@@ -3113,14 +3113,14 @@ export declare const financeService: {
3113
3113
  }>;
3114
3114
  createSupplierPayment(db: PostgresJsDatabase, data: CreateSupplierPaymentInput): Promise<{
3115
3115
  id: string;
3116
- status: "completed" | "pending" | "failed" | "refunded";
3117
- baseCurrency: string | null;
3118
3116
  createdAt: Date;
3119
3117
  updatedAt: Date;
3120
- bookingId: string;
3118
+ status: "pending" | "completed" | "failed" | "refunded";
3119
+ currency: string;
3121
3120
  notes: string | null;
3121
+ baseCurrency: string | null;
3122
+ bookingId: string;
3122
3123
  supplierId: string | null;
3123
- currency: string;
3124
3124
  fxRateSetId: string | null;
3125
3125
  amountCents: number;
3126
3126
  paymentInstrumentId: string | null;
@@ -3142,7 +3142,7 @@ export declare const financeService: {
3142
3142
  fxRateSetId: string | null;
3143
3143
  paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
3144
3144
  paymentInstrumentId: string | null;
3145
- status: "completed" | "pending" | "failed" | "refunded";
3145
+ status: "pending" | "completed" | "failed" | "refunded";
3146
3146
  referenceNumber: string | null;
3147
3147
  paymentDate: string;
3148
3148
  notes: string | null;
@@ -3162,7 +3162,7 @@ export declare const financeService: {
3162
3162
  bookingId: string;
3163
3163
  personId: string | null;
3164
3164
  organizationId: string | null;
3165
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
3165
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
3166
3166
  currency: string;
3167
3167
  baseCurrency: string | null;
3168
3168
  fxRateSetId: string | null;
@@ -3190,14 +3190,16 @@ export declare const financeService: {
3190
3190
  }>;
3191
3191
  createInvoice(db: PostgresJsDatabase, data: CreateInvoiceInput): Promise<{
3192
3192
  id: string;
3193
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
3194
- personId: string | null;
3195
- organizationId: string | null;
3196
- baseCurrency: string | null;
3197
3193
  createdAt: Date;
3198
3194
  updatedAt: Date;
3199
- bookingId: string;
3195
+ organizationId: string | null;
3196
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
3197
+ issueDate: string;
3198
+ currency: string;
3200
3199
  notes: string | null;
3200
+ personId: string | null;
3201
+ baseCurrency: string | null;
3202
+ bookingId: string;
3201
3203
  invoiceNumber: string;
3202
3204
  invoiceType: "invoice" | "proforma" | "credit_note";
3203
3205
  seriesId: string | null;
@@ -3205,7 +3207,6 @@ export declare const financeService: {
3205
3207
  templateId: string | null;
3206
3208
  taxRegimeId: string | null;
3207
3209
  language: string | null;
3208
- currency: string;
3209
3210
  fxRateSetId: string | null;
3210
3211
  subtotalCents: number;
3211
3212
  baseSubtotalCents: number | null;
@@ -3219,19 +3220,20 @@ export declare const financeService: {
3219
3220
  baseBalanceDueCents: number | null;
3220
3221
  commissionPercent: number | null;
3221
3222
  commissionAmountCents: number | null;
3222
- issueDate: string;
3223
3223
  dueDate: string;
3224
3224
  } | undefined>;
3225
3225
  createInvoiceFromBooking(db: PostgresJsDatabase, data: CreateInvoiceFromBookingInput, bookingData: InvoiceFromBookingData): Promise<{
3226
3226
  id: string;
3227
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
3228
- personId: string | null;
3229
- organizationId: string | null;
3230
- baseCurrency: string | null;
3231
3227
  createdAt: Date;
3232
3228
  updatedAt: Date;
3233
- bookingId: string;
3229
+ organizationId: string | null;
3230
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
3231
+ issueDate: string;
3232
+ currency: string;
3234
3233
  notes: string | null;
3234
+ personId: string | null;
3235
+ baseCurrency: string | null;
3236
+ bookingId: string;
3235
3237
  invoiceNumber: string;
3236
3238
  invoiceType: "invoice" | "proforma" | "credit_note";
3237
3239
  seriesId: string | null;
@@ -3239,7 +3241,6 @@ export declare const financeService: {
3239
3241
  templateId: string | null;
3240
3242
  taxRegimeId: string | null;
3241
3243
  language: string | null;
3242
- currency: string;
3243
3244
  fxRateSetId: string | null;
3244
3245
  subtotalCents: number;
3245
3246
  baseSubtotalCents: number | null;
@@ -3253,7 +3254,6 @@ export declare const financeService: {
3253
3254
  baseBalanceDueCents: number | null;
3254
3255
  commissionPercent: number | null;
3255
3256
  commissionAmountCents: number | null;
3256
- issueDate: string;
3257
3257
  dueDate: string;
3258
3258
  } | null>;
3259
3259
  getInvoiceById(db: PostgresJsDatabase, id: string): Promise<{
@@ -3268,7 +3268,7 @@ export declare const financeService: {
3268
3268
  bookingId: string;
3269
3269
  personId: string | null;
3270
3270
  organizationId: string | null;
3271
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
3271
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
3272
3272
  currency: string;
3273
3273
  baseCurrency: string | null;
3274
3274
  fxRateSetId: string | null;
@@ -3302,7 +3302,7 @@ export declare const financeService: {
3302
3302
  bookingId: string;
3303
3303
  personId: string | null;
3304
3304
  organizationId: string | null;
3305
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
3305
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
3306
3306
  currency: string;
3307
3307
  baseCurrency: string | null;
3308
3308
  fxRateSetId: string | null;
@@ -3905,7 +3905,7 @@ export declare const financeService: {
3905
3905
  tableName: "payments";
3906
3906
  dataType: "string";
3907
3907
  columnType: "PgEnumColumn";
3908
- data: "completed" | "pending" | "failed" | "refunded";
3908
+ data: "pending" | "completed" | "failed" | "refunded";
3909
3909
  driverParam: string;
3910
3910
  notNull: true;
3911
3911
  hasDefault: true;
@@ -4014,7 +4014,7 @@ export declare const financeService: {
4014
4014
  paymentInstrumentId: string | null;
4015
4015
  paymentAuthorizationId: string | null;
4016
4016
  paymentCaptureId: string | null;
4017
- status: "completed" | "pending" | "failed" | "refunded";
4017
+ status: "pending" | "completed" | "failed" | "refunded";
4018
4018
  referenceNumber: string | null;
4019
4019
  paymentDate: string;
4020
4020
  notes: string | null;
@@ -4213,7 +4213,7 @@ export declare const financeService: {
4213
4213
  tableName: "payments";
4214
4214
  dataType: "string";
4215
4215
  columnType: "PgEnumColumn";
4216
- data: "completed" | "pending" | "failed" | "refunded";
4216
+ data: "pending" | "completed" | "failed" | "refunded";
4217
4217
  driverParam: string;
4218
4218
  notNull: true;
4219
4219
  hasDefault: true;
@@ -4313,12 +4313,12 @@ export declare const financeService: {
4313
4313
  }>, "where" | "orderBy">;
4314
4314
  createPayment(db: PostgresJsDatabase, invoiceId: string, data: CreatePaymentInput): Promise<{
4315
4315
  id: string;
4316
- status: "completed" | "pending" | "failed" | "refunded";
4317
- baseCurrency: string | null;
4318
4316
  createdAt: Date;
4319
4317
  updatedAt: Date;
4320
- notes: string | null;
4318
+ status: "pending" | "completed" | "failed" | "refunded";
4321
4319
  currency: string;
4320
+ notes: string | null;
4321
+ baseCurrency: string | null;
4322
4322
  fxRateSetId: string | null;
4323
4323
  invoiceId: string;
4324
4324
  amountCents: number;
@@ -4791,13 +4791,13 @@ export declare const financeService: {
4791
4791
  }>, "where" | "orderBy">;
4792
4792
  createCreditNote(db: PostgresJsDatabase, invoiceId: string, data: CreateCreditNoteInput): Promise<{
4793
4793
  id: string;
4794
- status: "draft" | "issued" | "applied";
4795
- baseCurrency: string | null;
4796
4794
  createdAt: Date;
4797
4795
  updatedAt: Date;
4796
+ status: "draft" | "issued" | "applied";
4797
+ currency: string;
4798
4798
  notes: string | null;
4799
+ baseCurrency: string | null;
4799
4800
  reason: string;
4800
- currency: string;
4801
4801
  fxRateSetId: string | null;
4802
4802
  invoiceId: string;
4803
4803
  amountCents: number;
@@ -5337,12 +5337,12 @@ export declare const financeService: {
5337
5337
  createInvoiceNumberSeries(db: PostgresJsDatabase, data: CreateInvoiceNumberSeriesInput): Promise<{
5338
5338
  id: string;
5339
5339
  name: string;
5340
+ prefix: string;
5340
5341
  createdAt: Date;
5341
5342
  updatedAt: Date;
5342
- active: boolean;
5343
- code: string;
5344
5343
  scope: "invoice" | "proforma" | "credit_note";
5345
- prefix: string;
5344
+ code: string;
5345
+ active: boolean;
5346
5346
  separator: string;
5347
5347
  padLength: number;
5348
5348
  currentSequence: number;
@@ -5425,15 +5425,15 @@ export declare const financeService: {
5425
5425
  updatedAt: Date;
5426
5426
  } | null>;
5427
5427
  createInvoiceTemplate(db: PostgresJsDatabase, data: CreateInvoiceTemplateInput): Promise<{
5428
+ metadata: unknown;
5428
5429
  id: string;
5429
5430
  name: string;
5430
5431
  createdAt: Date;
5431
5432
  updatedAt: Date;
5432
- metadata: unknown;
5433
+ slug: string;
5433
5434
  active: boolean;
5434
5435
  language: string;
5435
5436
  jurisdiction: string | null;
5436
- slug: string;
5437
5437
  bodyFormat: "html" | "markdown" | "lexical_json";
5438
5438
  body: string;
5439
5439
  cssStyles: string | null;
@@ -5490,12 +5490,12 @@ export declare const financeService: {
5490
5490
  updatedAt: Date;
5491
5491
  } | null>;
5492
5492
  createInvoiceRendition(db: PostgresJsDatabase, invoiceId: string, data: CreateInvoiceRenditionInput): Promise<{
5493
- format: "json" | "pdf" | "html" | "xml";
5493
+ metadata: unknown;
5494
5494
  id: string;
5495
- status: "pending" | "failed" | "ready" | "stale";
5496
5495
  createdAt: Date;
5497
5496
  updatedAt: Date;
5498
- metadata: unknown;
5497
+ status: "pending" | "failed" | "ready" | "stale";
5498
+ format: "json" | "pdf" | "html" | "xml";
5499
5499
  templateId: string | null;
5500
5500
  language: string | null;
5501
5501
  invoiceId: string;
@@ -5536,12 +5536,12 @@ export declare const financeService: {
5536
5536
  } | {
5537
5537
  status: "requested";
5538
5538
  rendition: {
5539
- format: "json" | "pdf" | "html" | "xml";
5539
+ metadata: unknown;
5540
5540
  id: string;
5541
- status: "pending" | "failed" | "ready" | "stale";
5542
5541
  createdAt: Date;
5543
5542
  updatedAt: Date;
5544
- metadata: unknown;
5543
+ status: "pending" | "failed" | "ready" | "stale";
5544
+ format: "json" | "pdf" | "html" | "xml";
5545
5545
  templateId: string | null;
5546
5546
  language: string | null;
5547
5547
  invoiceId: string;
@@ -5584,14 +5584,14 @@ export declare const financeService: {
5584
5584
  updatedAt: Date;
5585
5585
  } | null>;
5586
5586
  createTaxRegime(db: PostgresJsDatabase, data: CreateTaxRegimeInput): Promise<{
5587
+ metadata: unknown;
5587
5588
  id: string;
5588
5589
  name: string;
5589
5590
  createdAt: Date;
5590
5591
  updatedAt: Date;
5591
- metadata: unknown;
5592
5592
  description: string | null;
5593
- active: boolean;
5594
5593
  code: "other" | "standard" | "reduced" | "exempt" | "reverse_charge" | "margin_scheme_art311" | "zero_rated" | "out_of_scope";
5594
+ active: boolean;
5595
5595
  jurisdiction: string | null;
5596
5596
  ratePercent: number | null;
5597
5597
  legalReference: string | null;
@@ -5632,11 +5632,11 @@ export declare const financeService: {
5632
5632
  * immediately after a successful provider call.
5633
5633
  */
5634
5634
  registerInvoiceExternalRef(db: PostgresJsDatabase, invoiceId: string, data: CreateInvoiceExternalRefInput): Promise<{
5635
+ metadata: unknown;
5635
5636
  id: string;
5636
- status: string | null;
5637
5637
  createdAt: Date;
5638
5638
  updatedAt: Date;
5639
- metadata: unknown;
5639
+ status: string | null;
5640
5640
  provider: string;
5641
5641
  invoiceId: string;
5642
5642
  externalId: string | null;