@voyant-travel/finance 0.133.0 → 0.134.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-invoice-artifacts.d.ts +15 -20
- package/dist/service-invoice-artifacts.d.ts.map +1 -1
- package/dist/service-invoice-artifacts.js +1 -1
- package/dist/service-invoice-numbering.d.ts +18 -23
- package/dist/service-invoice-numbering.d.ts.map +1 -1
- package/dist/service-invoice-numbering.js +1 -1
- package/dist/service-payment-authorizations.d.ts +36 -46
- package/dist/service-payment-authorizations.d.ts.map +1 -1
- package/dist/service-payment-authorizations.js +2 -2
- package/dist/service-payment-instruments.d.ts +26 -31
- package/dist/service-payment-instruments.d.ts.map +1 -1
- package/dist/service-payment-instruments.js +1 -1
- package/dist/service-payment-processing.d.ts +106 -126
- package/dist/service-payment-processing.d.ts.map +1 -1
- package/dist/service-payment-sessions.d.ts +44 -49
- package/dist/service-payment-sessions.d.ts.map +1 -1
- package/dist/service-payment-sessions.js +1 -1
- package/dist/service-reference-data.d.ts +50 -70
- package/dist/service-reference-data.d.ts.map +1 -1
- package/dist/service-reference-data.js +4 -4
- package/dist/service-shared.d.ts +2 -7
- package/dist/service-shared.d.ts.map +1 -1
- package/dist/service-shared.js +2 -1
- package/dist/service.d.ts +189 -239
- package/dist/service.d.ts.map +1 -1
- package/package.json +7 -6
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
import type { BindInvoiceRenditionInput, CreateInvoiceAttachmentInput, CreateInvoiceRenditionInput, CreateInvoiceTemplateInput, FinanceServiceRuntime, InvoiceTemplateListQuery, PostgresJsDatabase, RenderInvoiceInput, UpdateInvoiceAttachmentInput, UpdateInvoiceRenditionInput, UpdateInvoiceTemplateInput } from "./service-shared.js";
|
|
2
2
|
export declare const financeInvoiceArtifactService: {
|
|
3
|
-
listInvoiceTemplates(db: PostgresJsDatabase, query: InvoiceTemplateListQuery): Promise<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}[];
|
|
19
|
-
total: number;
|
|
20
|
-
limit: number;
|
|
21
|
-
offset: number;
|
|
22
|
-
}>;
|
|
3
|
+
listInvoiceTemplates(db: PostgresJsDatabase, query: InvoiceTemplateListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
slug: string;
|
|
7
|
+
language: string;
|
|
8
|
+
jurisdiction: string | null;
|
|
9
|
+
bodyFormat: "html" | "markdown" | "lexical_json";
|
|
10
|
+
body: string;
|
|
11
|
+
cssStyles: string | null;
|
|
12
|
+
isDefault: boolean;
|
|
13
|
+
active: boolean;
|
|
14
|
+
metadata: unknown;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
}>>;
|
|
23
18
|
getInvoiceTemplateById(db: PostgresJsDatabase, id: string): Promise<{
|
|
24
19
|
id: string;
|
|
25
20
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-invoice-artifacts.d.ts","sourceRoot":"","sources":["../src/service-invoice-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EAErB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,qBAAqB,CAAA;AAiB5B,eAAO,MAAM,6BAA6B;6BACT,kBAAkB,SAAS,wBAAwB
|
|
1
|
+
{"version":3,"file":"service-invoice-artifacts.d.ts","sourceRoot":"","sources":["../src/service-invoice-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EAErB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,qBAAqB,CAAA;AAiB5B,eAAO,MAAM,6BAA6B;6BACT,kBAAkB,SAAS,wBAAwB;;;;;;;;;;;;;;;+BAyBjD,kBAAkB,MAAM,MAAM;;;;;;;;;;;;;;;8BAS/B,kBAAkB,QAAQ,0BAA0B;;;;;;;;;;;;;;;8BAoB9E,kBAAkB,MAClB,MAAM,QACJ,0BAA0B;;;;;;;;;;;;;;;8BAUF,kBAAkB,MAAM,MAAM;;;8BAY9B,kBAAkB,aAAa,MAAM;;;;;;;;;;;;;;;;gCAQnC,kBAAkB,MAAM,MAAM;;;;;;;;;;;;;;;;+BAU1D,kBAAkB,aACX,MAAM,QACX,2BAA2B;;;;;;;;;;;;;;;;+BA6B7B,kBAAkB,MAClB,MAAM,QACJ,2BAA2B;;;;;;;;;;;;;;;;6BAgB7B,kBAAkB,aACX,MAAM,QACX,yBAAyB,YACtB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA8EC,kBAAkB,MAAM,MAAM;;;+BAY9B,kBAAkB,aAAa,MAAM;;;;;;;;;;;;iCAQnC,kBAAkB,MAAM,MAAM;;;;;;;;;;;;gCAU3D,kBAAkB,aACX,MAAM,QACX,4BAA4B;;;;;;;;;;;;gCA0B9B,kBAAkB,aACX,MAAM,MACb,MAAM,QACJ,4BAA4B;;;;;;;;;;;;gCAUF,kBAAkB,aAAa,MAAM,MAAM,MAAM;;;IAQnF;;;;;OAKG;sBACqB,kBAAkB,aAAa,MAAM,SAAS,kBAAkB;;;;;;;;;;;;;;;;;;;;;;CA4BzF,CAAA"}
|
|
@@ -19,7 +19,7 @@ export const financeInvoiceArtifactService = {
|
|
|
19
19
|
.where(where)
|
|
20
20
|
.limit(query.limit)
|
|
21
21
|
.offset(query.offset)
|
|
22
|
-
.orderBy(desc(invoiceTemplates.updatedAt)), db.select({
|
|
22
|
+
.orderBy(desc(invoiceTemplates.updatedAt)), db.select({ count: sql `count(*)::int` }).from(invoiceTemplates).where(where), query.limit, query.offset);
|
|
23
23
|
},
|
|
24
24
|
async getInvoiceTemplateById(db, id) {
|
|
25
25
|
const [row] = await db
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import type { CreateInvoiceNumberSeriesInput, EnsureExternalInvoiceNumberSeriesInput, InvoiceNumberScope, InvoiceNumberSeriesListQuery, PostgresJsDatabase, UpdateInvoiceNumberSeriesInput } from "./service-shared.js";
|
|
2
2
|
export declare const financeInvoiceNumberingService: {
|
|
3
|
-
listInvoiceNumberSeries(db: PostgresJsDatabase, query: InvoiceNumberSeriesListQuery): Promise<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}[];
|
|
22
|
-
total: number;
|
|
23
|
-
limit: number;
|
|
24
|
-
offset: number;
|
|
25
|
-
}>;
|
|
3
|
+
listInvoiceNumberSeries(db: PostgresJsDatabase, query: InvoiceNumberSeriesListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
4
|
+
id: string;
|
|
5
|
+
code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
prefix: string;
|
|
8
|
+
separator: string;
|
|
9
|
+
padLength: number;
|
|
10
|
+
currentSequence: number;
|
|
11
|
+
resetStrategy: "never" | "annual" | "monthly";
|
|
12
|
+
resetAt: Date | null;
|
|
13
|
+
scope: "invoice" | "proforma" | "credit_note";
|
|
14
|
+
isDefault: boolean;
|
|
15
|
+
externalProvider: string | null;
|
|
16
|
+
externalConfigKey: string | null;
|
|
17
|
+
active: boolean;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
}>>;
|
|
26
21
|
getInvoiceNumberSeriesById(db: PostgresJsDatabase, id: string): Promise<{
|
|
27
22
|
id: string;
|
|
28
23
|
code: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-invoice-numbering.d.ts","sourceRoot":"","sources":["../src/service-invoice-numbering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,sCAAsC,EACtC,kBAAkB,EAClB,4BAA4B,EAC5B,kBAAkB,EAClB,8BAA8B,EAC/B,MAAM,qBAAqB,CAAA;AAkB5B,eAAO,MAAM,8BAA8B;gCACP,kBAAkB,SAAS,4BAA4B
|
|
1
|
+
{"version":3,"file":"service-invoice-numbering.d.ts","sourceRoot":"","sources":["../src/service-invoice-numbering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,sCAAsC,EACtC,kBAAkB,EAClB,4BAA4B,EAC5B,kBAAkB,EAClB,8BAA8B,EAC/B,MAAM,qBAAqB,CAAA;AAkB5B,eAAO,MAAM,8BAA8B;gCACP,kBAAkB,SAAS,4BAA4B;;;;;;;;;;;;;;;;;;mCAoBpD,kBAAkB,MAAM,MAAM;;;;;;;;;;;;;;;;;;0CASvB,kBAAkB,SAAS,kBAAkB;;;;;;;;;;;;;;;;;;0CAenF,kBAAkB,UACd,sCAAsC,EAAE;;;;;;;;;;;;;;;;;;kCA+Gd,kBAAkB,QAAQ,8BAA8B;;;;;;;;;;;;;;;;;;kCAkCtF,kBAAkB,MAClB,MAAM,QACJ,8BAA8B;;;;;;;;;;;;;;;;;;kCAoCF,kBAAkB,MAAM,MAAM;;;IAQlE;;;;;OAKG;8BAC6B,kBAAkB,YAAY,MAAM;;;;;;;;;;;;;;;;uCAiD9D,kBAAkB,aACX,MAAM,QACX;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B/D,CAAA"}
|
|
@@ -13,7 +13,7 @@ export const financeInvoiceNumberingService = {
|
|
|
13
13
|
.where(where)
|
|
14
14
|
.limit(query.limit)
|
|
15
15
|
.offset(query.offset)
|
|
16
|
-
.orderBy(desc(invoiceNumberSeries.updatedAt)), db.select({
|
|
16
|
+
.orderBy(desc(invoiceNumberSeries.updatedAt)), db.select({ count: sql `count(*)::int` }).from(invoiceNumberSeries).where(where), query.limit, query.offset);
|
|
17
17
|
},
|
|
18
18
|
async getInvoiceNumberSeriesById(db, id) {
|
|
19
19
|
const [row] = await db
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import type { CreatePaymentAuthorizationInput, CreatePaymentCaptureInput, FinanceServiceRuntime, PaymentAuthorizationListQuery, PaymentCaptureListQuery, PostgresJsDatabase, UpdatePaymentAuthorizationInput, UpdatePaymentCaptureInput } from "./service-shared.js";
|
|
2
2
|
export declare const financePaymentAuthorizationService: {
|
|
3
|
-
listPaymentAuthorizations(db: PostgresJsDatabase, query: PaymentAuthorizationListQuery): Promise<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}[];
|
|
25
|
-
total: number;
|
|
26
|
-
limit: number;
|
|
27
|
-
offset: number;
|
|
28
|
-
}>;
|
|
3
|
+
listPaymentAuthorizations(db: PostgresJsDatabase, query: PaymentAuthorizationListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
4
|
+
id: string;
|
|
5
|
+
bookingId: string | null;
|
|
6
|
+
orderId: string | null;
|
|
7
|
+
invoiceId: string | null;
|
|
8
|
+
bookingGuaranteeId: string | null;
|
|
9
|
+
paymentInstrumentId: string | null;
|
|
10
|
+
status: "failed" | "expired" | "pending" | "authorized" | "partially_captured" | "captured" | "voided";
|
|
11
|
+
captureMode: "automatic" | "manual";
|
|
12
|
+
currency: string;
|
|
13
|
+
amountCents: number;
|
|
14
|
+
provider: string | null;
|
|
15
|
+
externalAuthorizationId: string | null;
|
|
16
|
+
approvalCode: string | null;
|
|
17
|
+
authorizedAt: Date | null;
|
|
18
|
+
expiresAt: Date | null;
|
|
19
|
+
voidedAt: Date | null;
|
|
20
|
+
notes: string | null;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
}>>;
|
|
29
24
|
getPaymentAuthorizationById(db: PostgresJsDatabase, id: string): Promise<{
|
|
30
25
|
id: string;
|
|
31
26
|
bookingId: string | null;
|
|
@@ -92,26 +87,21 @@ export declare const financePaymentAuthorizationService: {
|
|
|
92
87
|
deletePaymentAuthorization(db: PostgresJsDatabase, id: string, runtime?: FinanceServiceRuntime): Promise<{
|
|
93
88
|
id: string;
|
|
94
89
|
} | null>;
|
|
95
|
-
listPaymentCaptures(db: PostgresJsDatabase, query: PaymentCaptureListQuery): Promise<{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}[];
|
|
111
|
-
total: number;
|
|
112
|
-
limit: number;
|
|
113
|
-
offset: number;
|
|
114
|
-
}>;
|
|
90
|
+
listPaymentCaptures(db: PostgresJsDatabase, query: PaymentCaptureListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
91
|
+
id: string;
|
|
92
|
+
paymentAuthorizationId: string | null;
|
|
93
|
+
invoiceId: string | null;
|
|
94
|
+
status: "failed" | "pending" | "completed" | "refunded" | "voided";
|
|
95
|
+
currency: string;
|
|
96
|
+
amountCents: number;
|
|
97
|
+
provider: string | null;
|
|
98
|
+
externalCaptureId: string | null;
|
|
99
|
+
capturedAt: Date | null;
|
|
100
|
+
settledAt: Date | null;
|
|
101
|
+
notes: string | null;
|
|
102
|
+
createdAt: Date;
|
|
103
|
+
updatedAt: Date;
|
|
104
|
+
}>>;
|
|
115
105
|
getPaymentCaptureById(db: PostgresJsDatabase, id: string): Promise<{
|
|
116
106
|
id: string;
|
|
117
107
|
paymentAuthorizationId: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-payment-authorizations.d.ts","sourceRoot":"","sources":["../src/service-payment-authorizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,yBAAyB,EACzB,qBAAqB,EACrB,6BAA6B,EAC7B,uBAAuB,EACvB,kBAAkB,EAClB,+BAA+B,EAC/B,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AA8C5B,eAAO,MAAM,kCAAkC;kCACT,kBAAkB,SAAS,6BAA6B
|
|
1
|
+
{"version":3,"file":"service-payment-authorizations.d.ts","sourceRoot":"","sources":["../src/service-payment-authorizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,yBAAyB,EACzB,qBAAqB,EACrB,6BAA6B,EAC7B,uBAAuB,EACvB,kBAAkB,EAClB,+BAA+B,EAC/B,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AA8C5B,eAAO,MAAM,kCAAkC;kCACT,kBAAkB,SAAS,6BAA6B;;;;;;;;;;;;;;;;;;;;;oCAyBtD,kBAAkB,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;mCAU9D,kBAAkB,QAChB,+BAA+B,YAC5B,qBAAqB;;;;;;;;;;;;;;;;;;;;;mCAkD1B,kBAAkB,MAClB,MAAM,QACJ,+BAA+B,YAC5B,qBAAqB;;;;;;;;;;;;;;;;;;;;;mCAuD1B,kBAAkB,MAClB,MAAM,YACD,qBAAqB;;;4BAoCF,kBAAkB,SAAS,uBAAuB;;;;;;;;;;;;;;;8BAqBhD,kBAAkB,MAAM,MAAM;;;;;;;;;;;;;;;6BAMxD,kBAAkB,QAChB,yBAAyB,YACtB,qBAAqB;;;;;;;;;;;;;;;6BAuC1B,kBAAkB,MAClB,MAAM,QACJ,yBAAyB,YACtB,qBAAqB;;;;;;;;;;;;;;;6BAyC1B,kBAAkB,MAClB,MAAM,YACD,qBAAqB;;;CAmCjC,CAAA"}
|
|
@@ -38,7 +38,7 @@ export const financePaymentAuthorizationService = {
|
|
|
38
38
|
.where(where)
|
|
39
39
|
.limit(query.limit)
|
|
40
40
|
.offset(query.offset)
|
|
41
|
-
.orderBy(desc(paymentAuthorizations.createdAt)), db.select({
|
|
41
|
+
.orderBy(desc(paymentAuthorizations.createdAt)), db.select({ count: sql `count(*)::int` }).from(paymentAuthorizations).where(where), query.limit, query.offset);
|
|
42
42
|
},
|
|
43
43
|
async getPaymentAuthorizationById(db, id) {
|
|
44
44
|
const [row] = await db
|
|
@@ -147,7 +147,7 @@ export const financePaymentAuthorizationService = {
|
|
|
147
147
|
.where(where)
|
|
148
148
|
.limit(query.limit)
|
|
149
149
|
.offset(query.offset)
|
|
150
|
-
.orderBy(desc(paymentCaptures.createdAt)), db.select({
|
|
150
|
+
.orderBy(desc(paymentCaptures.createdAt)), db.select({ count: sql `count(*)::int` }).from(paymentCaptures).where(where), query.limit, query.offset);
|
|
151
151
|
},
|
|
152
152
|
async getPaymentCaptureById(db, id) {
|
|
153
153
|
const [row] = await db.select().from(paymentCaptures).where(eq(paymentCaptures.id, id)).limit(1);
|
|
@@ -1,36 +1,31 @@
|
|
|
1
1
|
import type { CreatePaymentInstrumentInput, FinanceServiceRuntime, PaymentInstrumentListQuery, PostgresJsDatabase, UpdatePaymentInstrumentInput } from "./service-shared.js";
|
|
2
2
|
export declare const financePaymentInstrumentService: {
|
|
3
|
-
listPaymentInstruments(db: PostgresJsDatabase, query: PaymentInstrumentListQuery): Promise<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}[];
|
|
30
|
-
total: number;
|
|
31
|
-
limit: number;
|
|
32
|
-
offset: number;
|
|
33
|
-
}>;
|
|
3
|
+
listPaymentInstruments(db: PostgresJsDatabase, query: PaymentInstrumentListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
4
|
+
id: string;
|
|
5
|
+
ownerType: "other" | "client" | "supplier" | "channel" | "agency" | "internal";
|
|
6
|
+
personId: string | null;
|
|
7
|
+
organizationId: string | null;
|
|
8
|
+
supplierId: string | null;
|
|
9
|
+
channelId: string | null;
|
|
10
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "voucher" | "other" | "bank_account";
|
|
11
|
+
status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
|
|
12
|
+
label: string;
|
|
13
|
+
provider: string | null;
|
|
14
|
+
brand: string | null;
|
|
15
|
+
last4: string | null;
|
|
16
|
+
holderName: string | null;
|
|
17
|
+
expiryMonth: number | null;
|
|
18
|
+
expiryYear: number | null;
|
|
19
|
+
externalToken: string | null;
|
|
20
|
+
externalCustomerId: string | null;
|
|
21
|
+
billingEmail: string | null;
|
|
22
|
+
billingAddress: string | null;
|
|
23
|
+
directBillReference: string | null;
|
|
24
|
+
notes: string | null;
|
|
25
|
+
metadata: unknown;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
}>>;
|
|
34
29
|
getPaymentInstrumentById(db: PostgresJsDatabase, id: string): Promise<{
|
|
35
30
|
id: string;
|
|
36
31
|
ownerType: "other" | "client" | "supplier" | "channel" | "agency" | "internal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-payment-instruments.d.ts","sourceRoot":"","sources":["../src/service-payment-instruments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAgB5B,eAAO,MAAM,+BAA+B;+BACT,kBAAkB,SAAS,0BAA0B
|
|
1
|
+
{"version":3,"file":"service-payment-instruments.d.ts","sourceRoot":"","sources":["../src/service-payment-instruments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAgB5B,eAAO,MAAM,+BAA+B;+BACT,kBAAkB,SAAS,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;iCAgCnD,kBAAkB,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;gCAU3D,kBAAkB,QAChB,4BAA4B,YACzB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgC1B,kBAAkB,MAClB,MAAM,QACJ,4BAA4B,YACzB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;gCAoC1B,kBAAkB,MAClB,MAAM,YACD,qBAAqB;;;CAmCjC,CAAA"}
|
|
@@ -27,7 +27,7 @@ export const financePaymentInstrumentService = {
|
|
|
27
27
|
.where(where)
|
|
28
28
|
.limit(query.limit)
|
|
29
29
|
.offset(query.offset)
|
|
30
|
-
.orderBy(desc(paymentInstruments.updatedAt)), db.select({
|
|
30
|
+
.orderBy(desc(paymentInstruments.updatedAt)), db.select({ count: sql `count(*)::int` }).from(paymentInstruments).where(where), query.limit, query.offset);
|
|
31
31
|
},
|
|
32
32
|
async getPaymentInstrumentById(db, id) {
|
|
33
33
|
const [row] = await db
|
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
export declare const financePaymentProcessingService: {
|
|
2
|
-
listPaymentAuthorizations(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentAuthorizationListQuery): Promise<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}[];
|
|
24
|
-
total: number;
|
|
25
|
-
limit: number;
|
|
26
|
-
offset: number;
|
|
27
|
-
}>;
|
|
2
|
+
listPaymentAuthorizations(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentAuthorizationListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
3
|
+
id: string;
|
|
4
|
+
bookingId: string | null;
|
|
5
|
+
orderId: string | null;
|
|
6
|
+
invoiceId: string | null;
|
|
7
|
+
bookingGuaranteeId: string | null;
|
|
8
|
+
paymentInstrumentId: string | null;
|
|
9
|
+
status: "failed" | "expired" | "pending" | "authorized" | "partially_captured" | "captured" | "voided";
|
|
10
|
+
captureMode: "automatic" | "manual";
|
|
11
|
+
currency: string;
|
|
12
|
+
amountCents: number;
|
|
13
|
+
provider: string | null;
|
|
14
|
+
externalAuthorizationId: string | null;
|
|
15
|
+
approvalCode: string | null;
|
|
16
|
+
authorizedAt: Date | null;
|
|
17
|
+
expiresAt: Date | null;
|
|
18
|
+
voidedAt: Date | null;
|
|
19
|
+
notes: string | null;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
}>>;
|
|
28
23
|
getPaymentAuthorizationById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
29
24
|
id: string;
|
|
30
25
|
bookingId: string | null;
|
|
@@ -91,26 +86,21 @@ export declare const financePaymentProcessingService: {
|
|
|
91
86
|
deletePaymentAuthorization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, runtime?: import("./service-shared.js").FinanceServiceRuntime): Promise<{
|
|
92
87
|
id: string;
|
|
93
88
|
} | null>;
|
|
94
|
-
listPaymentCaptures(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentCaptureListQuery): Promise<{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}[];
|
|
110
|
-
total: number;
|
|
111
|
-
limit: number;
|
|
112
|
-
offset: number;
|
|
113
|
-
}>;
|
|
89
|
+
listPaymentCaptures(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentCaptureListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
90
|
+
id: string;
|
|
91
|
+
paymentAuthorizationId: string | null;
|
|
92
|
+
invoiceId: string | null;
|
|
93
|
+
status: "failed" | "pending" | "completed" | "refunded" | "voided";
|
|
94
|
+
currency: string;
|
|
95
|
+
amountCents: number;
|
|
96
|
+
provider: string | null;
|
|
97
|
+
externalCaptureId: string | null;
|
|
98
|
+
capturedAt: Date | null;
|
|
99
|
+
settledAt: Date | null;
|
|
100
|
+
notes: string | null;
|
|
101
|
+
createdAt: Date;
|
|
102
|
+
updatedAt: Date;
|
|
103
|
+
}>>;
|
|
114
104
|
getPaymentCaptureById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
115
105
|
id: string;
|
|
116
106
|
paymentAuthorizationId: string | null;
|
|
@@ -203,55 +193,50 @@ export declare const financePaymentProcessingService: {
|
|
|
203
193
|
createdAt: Date;
|
|
204
194
|
updatedAt: Date;
|
|
205
195
|
} | null>;
|
|
206
|
-
listPaymentSessions(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentSessionListQuery): Promise<{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}[];
|
|
251
|
-
total: number;
|
|
252
|
-
limit: number;
|
|
253
|
-
offset: number;
|
|
254
|
-
}>;
|
|
196
|
+
listPaymentSessions(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentSessionListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
197
|
+
id: string;
|
|
198
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
|
|
199
|
+
targetId: string | null;
|
|
200
|
+
bookingId: string | null;
|
|
201
|
+
orderId: string | null;
|
|
202
|
+
invoiceId: string | null;
|
|
203
|
+
bookingPaymentScheduleId: string | null;
|
|
204
|
+
bookingGuaranteeId: string | null;
|
|
205
|
+
paymentInstrumentId: string | null;
|
|
206
|
+
paymentAuthorizationId: string | null;
|
|
207
|
+
paymentCaptureId: string | null;
|
|
208
|
+
paymentId: string | null;
|
|
209
|
+
status: "failed" | "expired" | "cancelled" | "pending" | "processing" | "paid" | "requires_redirect" | "authorized";
|
|
210
|
+
provider: string | null;
|
|
211
|
+
providerSessionId: string | null;
|
|
212
|
+
providerPaymentId: string | null;
|
|
213
|
+
externalReference: string | null;
|
|
214
|
+
idempotencyKey: string | null;
|
|
215
|
+
clientReference: string | null;
|
|
216
|
+
currency: string;
|
|
217
|
+
amountCents: number;
|
|
218
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "voucher" | "other" | null;
|
|
219
|
+
payerPersonId: string | null;
|
|
220
|
+
payerOrganizationId: string | null;
|
|
221
|
+
payerEmail: string | null;
|
|
222
|
+
payerName: string | null;
|
|
223
|
+
redirectUrl: string | null;
|
|
224
|
+
returnUrl: string | null;
|
|
225
|
+
cancelUrl: string | null;
|
|
226
|
+
callbackUrl: string | null;
|
|
227
|
+
expiresAt: Date | null;
|
|
228
|
+
completedAt: Date | null;
|
|
229
|
+
failedAt: Date | null;
|
|
230
|
+
cancelledAt: Date | null;
|
|
231
|
+
expiredAt: Date | null;
|
|
232
|
+
failureCode: string | null;
|
|
233
|
+
failureMessage: string | null;
|
|
234
|
+
notes: string | null;
|
|
235
|
+
providerPayload: Record<string, unknown> | null;
|
|
236
|
+
metadata: Record<string, unknown> | null;
|
|
237
|
+
createdAt: Date;
|
|
238
|
+
updatedAt: Date;
|
|
239
|
+
}>>;
|
|
255
240
|
getPaymentSessionById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
256
241
|
id: string;
|
|
257
242
|
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
|
|
@@ -560,37 +545,32 @@ export declare const financePaymentProcessingService: {
|
|
|
560
545
|
createdAt: Date;
|
|
561
546
|
updatedAt: Date;
|
|
562
547
|
} | null>;
|
|
563
|
-
listPaymentInstruments(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentInstrumentListQuery): Promise<{
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}[];
|
|
590
|
-
total: number;
|
|
591
|
-
limit: number;
|
|
592
|
-
offset: number;
|
|
593
|
-
}>;
|
|
548
|
+
listPaymentInstruments(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./service-shared.js").PaymentInstrumentListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
549
|
+
id: string;
|
|
550
|
+
ownerType: "other" | "client" | "supplier" | "channel" | "agency" | "internal";
|
|
551
|
+
personId: string | null;
|
|
552
|
+
organizationId: string | null;
|
|
553
|
+
supplierId: string | null;
|
|
554
|
+
channelId: string | null;
|
|
555
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "voucher" | "other" | "bank_account";
|
|
556
|
+
status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
|
|
557
|
+
label: string;
|
|
558
|
+
provider: string | null;
|
|
559
|
+
brand: string | null;
|
|
560
|
+
last4: string | null;
|
|
561
|
+
holderName: string | null;
|
|
562
|
+
expiryMonth: number | null;
|
|
563
|
+
expiryYear: number | null;
|
|
564
|
+
externalToken: string | null;
|
|
565
|
+
externalCustomerId: string | null;
|
|
566
|
+
billingEmail: string | null;
|
|
567
|
+
billingAddress: string | null;
|
|
568
|
+
directBillReference: string | null;
|
|
569
|
+
notes: string | null;
|
|
570
|
+
metadata: unknown;
|
|
571
|
+
createdAt: Date;
|
|
572
|
+
updatedAt: Date;
|
|
573
|
+
}>>;
|
|
594
574
|
getPaymentInstrumentById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
595
575
|
id: string;
|
|
596
576
|
ownerType: "other" | "client" | "supplier" | "channel" | "agency" | "internal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-payment-processing.d.ts","sourceRoot":"","sources":["../src/service-payment-processing.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":3,"file":"service-payment-processing.d.ts","sourceRoot":"","sources":["../src/service-payment-processing.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK3C,CAAA"}
|