@voyant-travel/finance 0.151.3 → 0.152.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/booking-lifecycle.d.ts +13 -0
- package/dist/booking-lifecycle.d.ts.map +1 -0
- package/dist/booking-lifecycle.js +64 -0
- package/dist/booking-schedule/subscriber-runtime.d.ts +20 -0
- package/dist/booking-schedule/subscriber-runtime.d.ts.map +1 -0
- package/dist/booking-schedule/subscriber-runtime.js +39 -0
- package/dist/booking-tax.d.ts +31 -21
- package/dist/booking-tax.d.ts.map +1 -1
- package/dist/booking-tax.js +84 -13
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -7
- package/dist/mcp-runtime.d.ts +3 -0
- package/dist/mcp-runtime.d.ts.map +1 -0
- package/dist/mcp-runtime.js +16 -0
- package/dist/payment-schedule/routes.d.ts +1 -0
- package/dist/payment-schedule/routes.d.ts.map +1 -1
- package/dist/payment-schedule/routes.js +32 -0
- package/dist/routes-action-ledger.d.ts +19 -19
- package/dist/routes-booking-billing.d.ts +30 -30
- package/dist/routes-booking-create.d.ts.map +1 -1
- package/dist/routes-booking-create.js +2 -0
- package/dist/routes-booking-reads.d.ts +11 -11
- package/dist/routes-invoice-core.d.ts +11 -11
- package/dist/routes-public.d.ts +24 -24
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +12 -0
- package/dist/routes-reference-data.d.ts +15 -15
- package/dist/routes-reports.d.ts +11 -11
- package/dist/routes-settlement.d.ts +11 -11
- package/dist/routes-supplier-invoices.d.ts +20 -20
- package/dist/routes.d.ts +78 -78
- package/dist/runtime-contributor.d.ts +7 -0
- package/dist/runtime-contributor.d.ts.map +1 -0
- package/dist/runtime-contributor.js +17 -0
- package/dist/runtime-port.d.ts +70 -0
- package/dist/runtime-port.d.ts.map +1 -0
- package/dist/runtime-port.js +47 -0
- package/dist/runtime.d.ts +10 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +98 -0
- package/dist/stale-booking-holds-runtime.d.ts +9 -0
- package/dist/stale-booking-holds-runtime.d.ts.map +1 -0
- package/dist/stale-booking-holds-runtime.js +25 -0
- package/dist/voyant.d.ts.map +1 -1
- package/dist/voyant.js +157 -8
- package/openapi/admin/booking-tax.json +86 -0
- package/openapi/admin/finance.json +36583 -0
- package/openapi/storefront/finance.json +3678 -0
- package/package.json +45 -17
|
@@ -18,6 +18,17 @@ export interface FinanceSettlementRouteOptions {
|
|
|
18
18
|
export declare function createFinanceAdminSettlementRoutes(options?: FinanceSettlementRouteOptions): OpenAPIHono<Env, {
|
|
19
19
|
"/invoices/:id/poll-settlement": {
|
|
20
20
|
$post: {
|
|
21
|
+
input: {
|
|
22
|
+
param: {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
output: {
|
|
27
|
+
error: string;
|
|
28
|
+
};
|
|
29
|
+
outputFormat: "json";
|
|
30
|
+
status: 404;
|
|
31
|
+
} | {
|
|
21
32
|
input: {
|
|
22
33
|
param: {
|
|
23
34
|
id: string;
|
|
@@ -48,17 +59,6 @@ export declare function createFinanceAdminSettlementRoutes(options?: FinanceSett
|
|
|
48
59
|
};
|
|
49
60
|
outputFormat: "json";
|
|
50
61
|
status: 200;
|
|
51
|
-
} | {
|
|
52
|
-
input: {
|
|
53
|
-
param: {
|
|
54
|
-
id: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
output: {
|
|
58
|
-
error: string;
|
|
59
|
-
};
|
|
60
|
-
outputFormat: "json";
|
|
61
|
-
status: 404;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
}, "/">;
|
|
@@ -579,9 +579,10 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
579
579
|
};
|
|
580
580
|
output: {
|
|
581
581
|
error: string;
|
|
582
|
+
code?: string | undefined;
|
|
582
583
|
};
|
|
583
584
|
outputFormat: "json";
|
|
584
|
-
status:
|
|
585
|
+
status: 404;
|
|
585
586
|
} | {
|
|
586
587
|
input: {
|
|
587
588
|
json: {
|
|
@@ -629,10 +630,9 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
629
630
|
};
|
|
630
631
|
output: {
|
|
631
632
|
error: string;
|
|
632
|
-
code?: string | undefined;
|
|
633
633
|
};
|
|
634
634
|
outputFormat: "json";
|
|
635
|
-
status:
|
|
635
|
+
status: 400;
|
|
636
636
|
} | {
|
|
637
637
|
input: {
|
|
638
638
|
json: {
|
|
@@ -700,6 +700,17 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
700
700
|
};
|
|
701
701
|
outputFormat: "json";
|
|
702
702
|
status: 422;
|
|
703
|
+
} | {
|
|
704
|
+
input: {
|
|
705
|
+
param: {
|
|
706
|
+
id: string;
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
output: {
|
|
710
|
+
error: string;
|
|
711
|
+
};
|
|
712
|
+
outputFormat: "json";
|
|
713
|
+
status: 404;
|
|
703
714
|
} | {
|
|
704
715
|
input: {
|
|
705
716
|
param: {
|
|
@@ -775,17 +786,6 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
775
786
|
};
|
|
776
787
|
outputFormat: "json";
|
|
777
788
|
status: 200;
|
|
778
|
-
} | {
|
|
779
|
-
input: {
|
|
780
|
-
param: {
|
|
781
|
-
id: string;
|
|
782
|
-
};
|
|
783
|
-
};
|
|
784
|
-
output: {
|
|
785
|
-
error: string;
|
|
786
|
-
};
|
|
787
|
-
outputFormat: "json";
|
|
788
|
-
status: 404;
|
|
789
789
|
};
|
|
790
790
|
};
|
|
791
791
|
} & {
|
|
@@ -1030,9 +1030,10 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
1030
1030
|
};
|
|
1031
1031
|
output: {
|
|
1032
1032
|
error: string;
|
|
1033
|
+
code?: string | undefined;
|
|
1033
1034
|
};
|
|
1034
1035
|
outputFormat: "json";
|
|
1035
|
-
status:
|
|
1036
|
+
status: 404;
|
|
1036
1037
|
} | {
|
|
1037
1038
|
input: {
|
|
1038
1039
|
param: {
|
|
@@ -1056,10 +1057,9 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
1056
1057
|
};
|
|
1057
1058
|
output: {
|
|
1058
1059
|
error: string;
|
|
1059
|
-
code?: string | undefined;
|
|
1060
1060
|
};
|
|
1061
1061
|
outputFormat: "json";
|
|
1062
|
-
status:
|
|
1062
|
+
status: 400;
|
|
1063
1063
|
} | {
|
|
1064
1064
|
input: {
|
|
1065
1065
|
param: {
|
|
@@ -1204,9 +1204,10 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
1204
1204
|
};
|
|
1205
1205
|
output: {
|
|
1206
1206
|
error: string;
|
|
1207
|
+
code?: string | undefined;
|
|
1207
1208
|
};
|
|
1208
1209
|
outputFormat: "json";
|
|
1209
|
-
status:
|
|
1210
|
+
status: 404;
|
|
1210
1211
|
} | {
|
|
1211
1212
|
input: {
|
|
1212
1213
|
param: {
|
|
@@ -1230,10 +1231,9 @@ export declare const supplierInvoiceRoutes: OpenAPIHono<Env, import("hono/types"
|
|
|
1230
1231
|
};
|
|
1231
1232
|
output: {
|
|
1232
1233
|
error: string;
|
|
1233
|
-
code?: string | undefined;
|
|
1234
1234
|
};
|
|
1235
1235
|
outputFormat: "json";
|
|
1236
|
-
status:
|
|
1236
|
+
status: 400;
|
|
1237
1237
|
} | {
|
|
1238
1238
|
input: {
|
|
1239
1239
|
param: {
|
package/dist/routes.d.ts
CHANGED
|
@@ -2502,17 +2502,10 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2502
2502
|
};
|
|
2503
2503
|
};
|
|
2504
2504
|
output: {
|
|
2505
|
-
|
|
2506
|
-
id: string;
|
|
2507
|
-
name: string;
|
|
2508
|
-
sortOrder: number;
|
|
2509
|
-
archived: boolean;
|
|
2510
|
-
createdAt: string;
|
|
2511
|
-
updatedAt: string;
|
|
2512
|
-
};
|
|
2505
|
+
error: string;
|
|
2513
2506
|
};
|
|
2514
2507
|
outputFormat: "json";
|
|
2515
|
-
status:
|
|
2508
|
+
status: 404;
|
|
2516
2509
|
} | {
|
|
2517
2510
|
input: {
|
|
2518
2511
|
param: {
|
|
@@ -2526,10 +2519,17 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2526
2519
|
};
|
|
2527
2520
|
};
|
|
2528
2521
|
output: {
|
|
2529
|
-
|
|
2522
|
+
data: {
|
|
2523
|
+
id: string;
|
|
2524
|
+
name: string;
|
|
2525
|
+
sortOrder: number;
|
|
2526
|
+
archived: boolean;
|
|
2527
|
+
createdAt: string;
|
|
2528
|
+
updatedAt: string;
|
|
2529
|
+
};
|
|
2530
2530
|
};
|
|
2531
2531
|
outputFormat: "json";
|
|
2532
|
-
status:
|
|
2532
|
+
status: 200;
|
|
2533
2533
|
};
|
|
2534
2534
|
};
|
|
2535
2535
|
}, "/"> & import("hono/types").MergeSchemaPath<{
|
|
@@ -2842,13 +2842,9 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2842
2842
|
};
|
|
2843
2843
|
output: {
|
|
2844
2844
|
error: string;
|
|
2845
|
-
code: string;
|
|
2846
|
-
details?: {
|
|
2847
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
2848
|
-
} | undefined;
|
|
2849
2845
|
};
|
|
2850
2846
|
outputFormat: "json";
|
|
2851
|
-
status:
|
|
2847
|
+
status: 404;
|
|
2852
2848
|
} | {
|
|
2853
2849
|
input: {
|
|
2854
2850
|
param: {
|
|
@@ -2870,9 +2866,13 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2870
2866
|
};
|
|
2871
2867
|
output: {
|
|
2872
2868
|
error: string;
|
|
2869
|
+
code: string;
|
|
2870
|
+
details?: {
|
|
2871
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2872
|
+
} | undefined;
|
|
2873
2873
|
};
|
|
2874
2874
|
outputFormat: "json";
|
|
2875
|
-
status:
|
|
2875
|
+
status: 400;
|
|
2876
2876
|
} | {
|
|
2877
2877
|
input: {
|
|
2878
2878
|
param: {
|
|
@@ -2938,13 +2938,9 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2938
2938
|
};
|
|
2939
2939
|
output: {
|
|
2940
2940
|
error: string;
|
|
2941
|
-
code: string;
|
|
2942
|
-
details?: {
|
|
2943
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
2944
|
-
} | undefined;
|
|
2945
2941
|
};
|
|
2946
2942
|
outputFormat: "json";
|
|
2947
|
-
status:
|
|
2943
|
+
status: 404;
|
|
2948
2944
|
} | {
|
|
2949
2945
|
input: {
|
|
2950
2946
|
param: {
|
|
@@ -2967,9 +2963,13 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
2967
2963
|
};
|
|
2968
2964
|
output: {
|
|
2969
2965
|
error: string;
|
|
2966
|
+
code: string;
|
|
2967
|
+
details?: {
|
|
2968
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2969
|
+
} | undefined;
|
|
2970
2970
|
};
|
|
2971
2971
|
outputFormat: "json";
|
|
2972
|
-
status:
|
|
2972
|
+
status: 400;
|
|
2973
2973
|
} | {
|
|
2974
2974
|
input: {
|
|
2975
2975
|
param: {
|
|
@@ -3872,13 +3872,9 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3872
3872
|
};
|
|
3873
3873
|
output: {
|
|
3874
3874
|
error: string;
|
|
3875
|
-
code: string;
|
|
3876
|
-
details?: {
|
|
3877
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
3878
|
-
} | undefined;
|
|
3879
3875
|
};
|
|
3880
3876
|
outputFormat: "json";
|
|
3881
|
-
status:
|
|
3877
|
+
status: 404;
|
|
3882
3878
|
} | {
|
|
3883
3879
|
input: {
|
|
3884
3880
|
param: {
|
|
@@ -3888,9 +3884,13 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3888
3884
|
};
|
|
3889
3885
|
output: {
|
|
3890
3886
|
error: string;
|
|
3887
|
+
code: string;
|
|
3888
|
+
details?: {
|
|
3889
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
3890
|
+
} | undefined;
|
|
3891
3891
|
};
|
|
3892
3892
|
outputFormat: "json";
|
|
3893
|
-
status:
|
|
3893
|
+
status: 400;
|
|
3894
3894
|
} | {
|
|
3895
3895
|
input: {
|
|
3896
3896
|
param: {
|
|
@@ -3985,13 +3985,9 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
3985
3985
|
};
|
|
3986
3986
|
output: {
|
|
3987
3987
|
error: string;
|
|
3988
|
-
code: string;
|
|
3989
|
-
details?: {
|
|
3990
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
3991
|
-
} | undefined;
|
|
3992
3988
|
};
|
|
3993
3989
|
outputFormat: "json";
|
|
3994
|
-
status:
|
|
3990
|
+
status: 404;
|
|
3995
3991
|
} | {
|
|
3996
3992
|
input: {
|
|
3997
3993
|
param: {
|
|
@@ -4010,9 +4006,13 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
4010
4006
|
};
|
|
4011
4007
|
output: {
|
|
4012
4008
|
error: string;
|
|
4009
|
+
code: string;
|
|
4010
|
+
details?: {
|
|
4011
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
4012
|
+
} | undefined;
|
|
4013
4013
|
};
|
|
4014
4014
|
outputFormat: "json";
|
|
4015
|
-
status:
|
|
4015
|
+
status: 400;
|
|
4016
4016
|
} | {
|
|
4017
4017
|
input: {
|
|
4018
4018
|
param: {
|
|
@@ -4144,13 +4144,9 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
4144
4144
|
};
|
|
4145
4145
|
output: {
|
|
4146
4146
|
error: string;
|
|
4147
|
-
code: string;
|
|
4148
|
-
details?: {
|
|
4149
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
4150
|
-
} | undefined;
|
|
4151
4147
|
};
|
|
4152
4148
|
outputFormat: "json";
|
|
4153
|
-
status:
|
|
4149
|
+
status: 404;
|
|
4154
4150
|
} | {
|
|
4155
4151
|
input: {
|
|
4156
4152
|
param: {
|
|
@@ -4170,9 +4166,13 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
4170
4166
|
};
|
|
4171
4167
|
output: {
|
|
4172
4168
|
error: string;
|
|
4169
|
+
code: string;
|
|
4170
|
+
details?: {
|
|
4171
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
4172
|
+
} | undefined;
|
|
4173
4173
|
};
|
|
4174
4174
|
outputFormat: "json";
|
|
4175
|
-
status:
|
|
4175
|
+
status: 400;
|
|
4176
4176
|
} | {
|
|
4177
4177
|
input: {
|
|
4178
4178
|
param: {
|
|
@@ -5987,6 +5987,17 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
5987
5987
|
}, "/"> & import("hono/types").MergeSchemaPath<{
|
|
5988
5988
|
"/invoices/:id": {
|
|
5989
5989
|
$get: {
|
|
5990
|
+
input: {
|
|
5991
|
+
param: {
|
|
5992
|
+
id: string;
|
|
5993
|
+
};
|
|
5994
|
+
};
|
|
5995
|
+
output: {
|
|
5996
|
+
error: string;
|
|
5997
|
+
};
|
|
5998
|
+
outputFormat: "json";
|
|
5999
|
+
status: 404;
|
|
6000
|
+
} | {
|
|
5990
6001
|
input: {
|
|
5991
6002
|
param: {
|
|
5992
6003
|
id: string;
|
|
@@ -6035,17 +6046,6 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
6035
6046
|
};
|
|
6036
6047
|
outputFormat: "json";
|
|
6037
6048
|
status: 200;
|
|
6038
|
-
} | {
|
|
6039
|
-
input: {
|
|
6040
|
-
param: {
|
|
6041
|
-
id: string;
|
|
6042
|
-
};
|
|
6043
|
-
};
|
|
6044
|
-
output: {
|
|
6045
|
-
error: string;
|
|
6046
|
-
};
|
|
6047
|
-
outputFormat: "json";
|
|
6048
|
-
status: 404;
|
|
6049
6049
|
};
|
|
6050
6050
|
};
|
|
6051
6051
|
} & {
|
|
@@ -8060,6 +8060,21 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
8060
8060
|
} & {
|
|
8061
8061
|
"/invoice-number-series/:id": {
|
|
8062
8062
|
$get: {
|
|
8063
|
+
input: {
|
|
8064
|
+
param: {
|
|
8065
|
+
id: string;
|
|
8066
|
+
};
|
|
8067
|
+
};
|
|
8068
|
+
output: {
|
|
8069
|
+
error: string;
|
|
8070
|
+
code?: string | undefined;
|
|
8071
|
+
details?: {
|
|
8072
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
8073
|
+
} | undefined;
|
|
8074
|
+
};
|
|
8075
|
+
outputFormat: "json";
|
|
8076
|
+
status: 404;
|
|
8077
|
+
} | {
|
|
8063
8078
|
input: {
|
|
8064
8079
|
param: {
|
|
8065
8080
|
id: string;
|
|
@@ -8087,21 +8102,6 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
8087
8102
|
};
|
|
8088
8103
|
outputFormat: "json";
|
|
8089
8104
|
status: 200;
|
|
8090
|
-
} | {
|
|
8091
|
-
input: {
|
|
8092
|
-
param: {
|
|
8093
|
-
id: string;
|
|
8094
|
-
};
|
|
8095
|
-
};
|
|
8096
|
-
output: {
|
|
8097
|
-
error: string;
|
|
8098
|
-
code?: string | undefined;
|
|
8099
|
-
details?: {
|
|
8100
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
8101
|
-
} | undefined;
|
|
8102
|
-
};
|
|
8103
|
-
outputFormat: "json";
|
|
8104
|
-
status: 404;
|
|
8105
8105
|
};
|
|
8106
8106
|
};
|
|
8107
8107
|
} & {
|
|
@@ -9249,6 +9249,17 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
9249
9249
|
}, "/">, "/"> | import("hono/types").MergeSchemaPath<{
|
|
9250
9250
|
"/bookings/:bookingId/payments": {
|
|
9251
9251
|
$get: {
|
|
9252
|
+
input: {
|
|
9253
|
+
param: {
|
|
9254
|
+
bookingId: string;
|
|
9255
|
+
};
|
|
9256
|
+
};
|
|
9257
|
+
output: {
|
|
9258
|
+
error: string;
|
|
9259
|
+
};
|
|
9260
|
+
outputFormat: "json";
|
|
9261
|
+
status: 404;
|
|
9262
|
+
} | {
|
|
9252
9263
|
input: {
|
|
9253
9264
|
param: {
|
|
9254
9265
|
bookingId: string;
|
|
@@ -9277,17 +9288,6 @@ export declare const financeRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
|
9277
9288
|
};
|
|
9278
9289
|
outputFormat: "json";
|
|
9279
9290
|
status: 200;
|
|
9280
|
-
} | {
|
|
9281
|
-
input: {
|
|
9282
|
-
param: {
|
|
9283
|
-
bookingId: string;
|
|
9284
|
-
};
|
|
9285
|
-
};
|
|
9286
|
-
output: {
|
|
9287
|
-
error: string;
|
|
9288
|
-
};
|
|
9289
|
-
outputFormat: "json";
|
|
9290
|
-
status: 404;
|
|
9291
9291
|
};
|
|
9292
9292
|
};
|
|
9293
9293
|
}, "/">, "/", "/aggregates">;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VoyantRuntimeHostPrimitives } from "@voyant-travel/core";
|
|
2
|
+
export interface FinanceRuntimeContributorHost {
|
|
3
|
+
primitives: VoyantRuntimeHostPrimitives;
|
|
4
|
+
}
|
|
5
|
+
/** Provide Finance's generic host input and its narrow Bookings integration. */
|
|
6
|
+
export declare function createFinanceRuntimePortContribution(host: FinanceRuntimeContributorHost): Readonly<Record<string, unknown>>;
|
|
7
|
+
//# sourceMappingURL=runtime-contributor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-contributor.d.ts","sourceRoot":"","sources":["../src/runtime-contributor.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AAKtE,MAAM,WAAW,6BAA6B;IAC5C,UAAU,EAAE,2BAA2B,CAAA;CACxC;AAED,gFAAgF;AAChF,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,6BAA6B,GAClC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAUnC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { actionLedgerFinanceDriftRuntimePort, } from "@voyant-travel/action-ledger/runtime-port";
|
|
2
|
+
import { bookingsFinanceRuntimePort, } from "@voyant-travel/bookings/runtime-port";
|
|
3
|
+
import { checkFinanceActionLedgerDrift } from "./action-ledger-drift.js";
|
|
4
|
+
import { financeHostRuntimePort } from "./runtime-port.js";
|
|
5
|
+
import { createFinanceStaleBookingHoldsRuntime } from "./stale-booking-holds-runtime.js";
|
|
6
|
+
/** Provide Finance's generic host input and its narrow Bookings integration. */
|
|
7
|
+
export function createFinanceRuntimePortContribution(host) {
|
|
8
|
+
return {
|
|
9
|
+
[actionLedgerFinanceDriftRuntimePort.id]: {
|
|
10
|
+
checkFinanceDrift: checkFinanceActionLedgerDrift,
|
|
11
|
+
},
|
|
12
|
+
[financeHostRuntimePort.id]: { primitives: host.primitives },
|
|
13
|
+
[bookingsFinanceRuntimePort.id]: {
|
|
14
|
+
createStaleBookingHoldsRuntime: createFinanceStaleBookingHoldsRuntime,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { VoyantRuntimeHostPrimitives } from "@voyant-travel/core";
|
|
2
|
+
import type { AnyDrizzleDb } from "@voyant-travel/db";
|
|
3
|
+
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
4
|
+
import type { BookingTaxRouteOptions } from "./booking-tax.js";
|
|
5
|
+
import type { CheckoutRoutesOptions } from "./checkout-routes.js";
|
|
6
|
+
import type { CheckoutPaymentStarter } from "./checkout-service.js";
|
|
7
|
+
import type { PaymentPolicy } from "./payment-policy.js";
|
|
8
|
+
import type { PaymentPolicyEntityContext } from "./payment-policy-cascade.js";
|
|
9
|
+
import type { BookingScheduleRoutesOptions } from "./payment-schedule/routes.js";
|
|
10
|
+
import type { InvoiceSettlementPoller } from "./service-settlement.js";
|
|
11
|
+
type PolicyReader = (db: PostgresJsDatabase, bookingId: string) => Promise<PaymentPolicy | null>;
|
|
12
|
+
type EntityPolicyReader = (db: PostgresJsDatabase, context: PaymentPolicyEntityContext) => Promise<PaymentPolicy | null>;
|
|
13
|
+
export interface FinanceHostRuntime {
|
|
14
|
+
primitives: VoyantRuntimeHostPrimitives;
|
|
15
|
+
}
|
|
16
|
+
export interface FinanceOperatorSettingsRuntime {
|
|
17
|
+
resolveOperatorDefaultPaymentPolicy: BookingScheduleRoutesOptions["resolveOperatorDefaultPaymentPolicy"];
|
|
18
|
+
resolveBookingTaxSettings: NonNullable<BookingTaxRouteOptions["resolveBookingTaxSettings"]>;
|
|
19
|
+
updateBookingTaxSettings: NonNullable<BookingTaxRouteOptions["updateBookingTaxSettings"]>;
|
|
20
|
+
}
|
|
21
|
+
export interface FinanceNotificationsRuntime {
|
|
22
|
+
resolveNotificationDispatcher: NonNullable<CheckoutRoutesOptions["resolveNotificationDispatcher"]>;
|
|
23
|
+
listBookingReminderRuns: NonNullable<CheckoutRoutesOptions["listBookingReminderRuns"]>;
|
|
24
|
+
}
|
|
25
|
+
export interface FinanceDistributionPaymentPolicyRuntime {
|
|
26
|
+
resolveSupplierPolicy: PolicyReader;
|
|
27
|
+
resolveSupplierPolicyById(db: PostgresJsDatabase, supplierId: string): Promise<PaymentPolicy | null>;
|
|
28
|
+
}
|
|
29
|
+
export interface FinanceAccommodationsPaymentPolicyRuntime {
|
|
30
|
+
resolveBookingPolicy: PolicyReader;
|
|
31
|
+
resolveEntityPolicy: EntityPolicyReader;
|
|
32
|
+
}
|
|
33
|
+
export interface FinanceCruisesPaymentPolicyRuntime {
|
|
34
|
+
resolveBookingPolicy: PolicyReader;
|
|
35
|
+
resolveEntityPolicy: EntityPolicyReader;
|
|
36
|
+
resolveSupplierId(db: PostgresJsDatabase, context: PaymentPolicyEntityContext): Promise<string | null>;
|
|
37
|
+
}
|
|
38
|
+
export interface FinanceInventoryPaymentPolicyRuntime {
|
|
39
|
+
createPaymentPolicyRuntime(options: {
|
|
40
|
+
resolveSupplierPolicy: PolicyReader;
|
|
41
|
+
resolveSupplierPolicyById: FinanceDistributionPaymentPolicyRuntime["resolveSupplierPolicyById"];
|
|
42
|
+
resolveVerticalListingPolicy: PolicyReader;
|
|
43
|
+
resolveVerticalListingPolicyForEntity: EntityPolicyReader;
|
|
44
|
+
resolveVerticalSupplierPolicyForEntity: EntityPolicyReader;
|
|
45
|
+
}): Pick<BookingScheduleRoutesOptions, "resolveSupplierPolicy" | "resolveCategoryPolicy" | "resolveListingPolicy" | "resolveSupplierPolicyForEntity" | "resolveCategoryPolicyForEntity" | "resolveListingPolicyForEntity">;
|
|
46
|
+
stampPolicySourceOnBooking: BookingScheduleRoutesOptions["stampPolicySourceOnBooking"];
|
|
47
|
+
readPolicySourceFromInternalNotes: BookingScheduleRoutesOptions["readPolicySourceFromInternalNotes"];
|
|
48
|
+
}
|
|
49
|
+
export interface FinanceCheckoutPaymentStartersRuntime {
|
|
50
|
+
resolvePaymentStarters(bindings: Record<string, unknown>): Record<string, CheckoutPaymentStarter>;
|
|
51
|
+
}
|
|
52
|
+
export interface FinanceInvoiceSettlementPollerProvider {
|
|
53
|
+
provider: string;
|
|
54
|
+
poller: InvoiceSettlementPoller;
|
|
55
|
+
}
|
|
56
|
+
export interface FinanceBookingScheduleRuntime {
|
|
57
|
+
options: BookingScheduleRoutesOptions;
|
|
58
|
+
withDb<T>(bindings: unknown, operation: (db: AnyDrizzleDb) => Promise<T>): Promise<T>;
|
|
59
|
+
}
|
|
60
|
+
export declare const financeHostRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceHostRuntime>;
|
|
61
|
+
export declare const financeOperatorSettingsRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceOperatorSettingsRuntime>;
|
|
62
|
+
export declare const financeNotificationsRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceNotificationsRuntime>;
|
|
63
|
+
export declare const financeDistributionPaymentPolicyRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceDistributionPaymentPolicyRuntime>;
|
|
64
|
+
export declare const financeAccommodationsPaymentPolicyRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceAccommodationsPaymentPolicyRuntime>;
|
|
65
|
+
export declare const financeCruisesPaymentPolicyRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceCruisesPaymentPolicyRuntime>;
|
|
66
|
+
export declare const financeInventoryPaymentPolicyRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceInventoryPaymentPolicyRuntime>;
|
|
67
|
+
export declare const financeCheckoutPaymentStartersRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceCheckoutPaymentStartersRuntime>;
|
|
68
|
+
export declare const financeInvoiceSettlementPollerRuntimePort: import("@voyant-travel/core/project").VoyantPort<FinanceInvoiceSettlementPollerProvider>;
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=runtime-port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-port.d.ts","sourceRoot":"","sources":["../src/runtime-port.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC9D,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Y,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CACtF;AAED,eAAO,MAAM,sBAAsB,sEAAyD,CAAA;AAC5F,eAAO,MAAM,kCAAkC,kFAG9C,CAAA;AACD,eAAO,MAAM,+BAA+B,+EAG3C,CAAA;AACD,eAAO,MAAM,2CAA2C,2FAIrD,CAAA;AACH,eAAO,MAAM,6CAA6C,6FAIvD,CAAA;AACH,eAAO,MAAM,sCAAsC,sFAK/C,CAAA;AACJ,eAAO,MAAM,wCAAwC,wFAKjD,CAAA;AACJ,eAAO,MAAM,yCAAyC,yFAGlD,CAAA;AACJ,eAAO,MAAM,yCAAyC,0FAiBlD,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { definePort } from "@voyant-travel/core/project";
|
|
2
|
+
function objectPort(id, methods = []) {
|
|
3
|
+
return definePort({
|
|
4
|
+
id,
|
|
5
|
+
test(provider) {
|
|
6
|
+
if (provider === null || typeof provider !== "object") {
|
|
7
|
+
throw new Error(`${id} provider must be an object.`);
|
|
8
|
+
}
|
|
9
|
+
for (const method of methods) {
|
|
10
|
+
if (typeof Reflect.get(provider, method) !== "function") {
|
|
11
|
+
throw new Error(`${id} provider must implement ${method}().`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export const financeHostRuntimePort = objectPort("finance.host.runtime");
|
|
18
|
+
export const financeOperatorSettingsRuntimePort = objectPort("finance.operator-settings.runtime", ["resolveOperatorDefaultPaymentPolicy", "resolveBookingTaxSettings", "updateBookingTaxSettings"]);
|
|
19
|
+
export const financeNotificationsRuntimePort = objectPort("finance.notifications.runtime", ["resolveNotificationDispatcher", "listBookingReminderRuns"]);
|
|
20
|
+
export const financeDistributionPaymentPolicyRuntimePort = objectPort("finance.distribution-payment-policy.runtime", ["resolveSupplierPolicy", "resolveSupplierPolicyById"]);
|
|
21
|
+
export const financeAccommodationsPaymentPolicyRuntimePort = objectPort("finance.accommodations-payment-policy.runtime", ["resolveBookingPolicy", "resolveEntityPolicy"]);
|
|
22
|
+
export const financeCruisesPaymentPolicyRuntimePort = objectPort("finance.cruises-payment-policy.runtime", [
|
|
23
|
+
"resolveBookingPolicy",
|
|
24
|
+
"resolveEntityPolicy",
|
|
25
|
+
"resolveSupplierId",
|
|
26
|
+
]);
|
|
27
|
+
export const financeInventoryPaymentPolicyRuntimePort = objectPort("finance.inventory-payment-policy.runtime", [
|
|
28
|
+
"createPaymentPolicyRuntime",
|
|
29
|
+
"stampPolicySourceOnBooking",
|
|
30
|
+
"readPolicySourceFromInternalNotes",
|
|
31
|
+
]);
|
|
32
|
+
export const financeCheckoutPaymentStartersRuntimePort = objectPort("finance.checkout-payment-starters.runtime", [
|
|
33
|
+
"resolvePaymentStarters",
|
|
34
|
+
]);
|
|
35
|
+
export const financeInvoiceSettlementPollerRuntimePort = definePort({
|
|
36
|
+
id: "finance.invoice-settlement-poller",
|
|
37
|
+
test(provider) {
|
|
38
|
+
if (provider === null ||
|
|
39
|
+
typeof provider !== "object" ||
|
|
40
|
+
typeof provider.provider !== "string" ||
|
|
41
|
+
provider.provider.trim() !== provider.provider ||
|
|
42
|
+
provider.provider.length === 0 ||
|
|
43
|
+
typeof provider.poller !== "function") {
|
|
44
|
+
throw new Error("finance.invoice-settlement-poller provider must declare a canonical provider name and poller function.");
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FinanceHonoModuleOptions } from "./index.js";
|
|
2
|
+
import type { FinanceAccommodationsPaymentPolicyRuntime, FinanceBookingScheduleRuntime, FinanceCheckoutPaymentStartersRuntime, FinanceCruisesPaymentPolicyRuntime, FinanceDistributionPaymentPolicyRuntime, FinanceHostRuntime, FinanceInventoryPaymentPolicyRuntime, FinanceInvoiceSettlementPollerProvider, FinanceNotificationsRuntime, FinanceOperatorSettingsRuntime } from "./runtime-port.js";
|
|
3
|
+
import type { InvoiceSettlementPoller } from "./service-settlement.js";
|
|
4
|
+
/** Compose Finance's main HTTP runtime from generic host and selected providers. */
|
|
5
|
+
export declare function createFinanceRuntime(host: FinanceHostRuntime, notifications: FinanceNotificationsRuntime, checkoutPaymentStarters?: FinanceCheckoutPaymentStartersRuntime, invoiceSettlementPollerProviders?: readonly FinanceInvoiceSettlementPollerProvider[]): FinanceHonoModuleOptions;
|
|
6
|
+
/** Compose Finance's payment schedule from statically selected domain providers. */
|
|
7
|
+
export declare function createFinanceBookingScheduleRuntime(host: FinanceHostRuntime, settings: FinanceOperatorSettingsRuntime, distribution: FinanceDistributionPaymentPolicyRuntime, accommodations: FinanceAccommodationsPaymentPolicyRuntime, cruises: FinanceCruisesPaymentPolicyRuntime, inventory: FinanceInventoryPaymentPolicyRuntime): FinanceBookingScheduleRuntime;
|
|
8
|
+
export declare function createFinanceBookingTaxRuntime(settings: FinanceOperatorSettingsRuntime): FinanceHonoModuleOptions;
|
|
9
|
+
export declare function aggregateFinanceInvoiceSettlementPollers(providers: readonly FinanceInvoiceSettlementPollerProvider[]): Readonly<Record<string, InvoiceSettlementPoller>>;
|
|
10
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAK1D,OAAO,KAAK,EACV,yCAAyC,EACzC,6BAA6B,EAC7B,qCAAqC,EACrC,kCAAkC,EAClC,uCAAuC,EACvC,kBAAkB,EAClB,oCAAoC,EACpC,sCAAsC,EACtC,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAEtE,oFAAoF;AACpF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,kBAAkB,EACxB,aAAa,EAAE,2BAA2B,EAC1C,uBAAuB,CAAC,EAAE,qCAAqC,EAC/D,gCAAgC,GAAE,SAAS,sCAAsC,EAAO,GACvF,wBAAwB,CAmB1B;AAED,oFAAoF;AACpF,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,8BAA8B,EACxC,YAAY,EAAE,uCAAuC,EACrD,cAAc,EAAE,yCAAyC,EACzD,OAAO,EAAE,kCAAkC,EAC3C,SAAS,EAAE,oCAAoC,GAC9C,6BAA6B,CA4B/B;AAED,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,8BAA8B,GACvC,wBAAwB,CAK1B;AAmBD,wBAAgB,wCAAwC,CACtD,SAAS,EAAE,SAAS,sCAAsC,EAAE,GAC3D,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAanD"}
|