@voyantjs/customer-portal 0.6.0 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAOvD,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,oBAAoB,CAAA;AAE3B,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AACpE,OAAO,EAAE,gCAAgC,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AACjE,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,mCAAmC,EACnC,2BAA2B,EAC3B,6BAA6B,EAC7B,sCAAsC,EACtC,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,gCAAgC,EAChC,uBAAuB,EACvB,gCAAgC,EAChC,iCAAiC,EACjC,qCAAqC,EACrC,sCAAsC,EACtC,qBAAqB,EACrB,4CAA4C,EAC5C,6CAA6C,EAC7C,gCAAgC,EAChC,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,yCAAyC,EACzC,iCAAiC,EACjC,mCAAmC,EACnC,4CAA4C,EAC5C,qCAAqC,EACrC,kCAAkC,EAClC,kCAAkC,EAClC,sCAAsC,EACtC,6BAA6B,EAC7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CAAgC,EAChC,iCAAiC,EACjC,qCAAqC,EACrC,sCAAsC,EACtC,qBAAqB,EACrB,4CAA4C,EAC5C,6CAA6C,EAC7C,gCAAgC,EAChC,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,yCAAyC,EACzC,iCAAiC,EACjC,mCAAmC,EACnC,4CAA4C,EAC5C,qCAAqC,EACrC,kCAAkC,EAClC,kCAAkC,EAClC,sCAAsC,EACtC,6BAA6B,EAC7B,sCAAsC,EACtC,uCAAuC,EACvC,2CAA2C,EAC3C,4CAA4C,EAC5C,2BAA2B,EAC3B,mDAAmD,EACnD,6CAA6C,EAC7C,iCAAiC,EACjC,mCAAmC,EACnC,iCAAiC,GAClC,MAAM,wBAAwB,CAAA;AAE/B,eAAO,MAAM,oBAAoB,EAAE,MAElC,CAAA;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,GAAE,gCAAqC,GAC7C,UAAU,CAeZ;AAED,eAAO,MAAM,wBAAwB,EAAE,UAA6C,CAAA;AAEpF,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,EAChC,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,+BAA+B,EAC/B,qCAAqC,EACrC,2CAA2C,GAC5C,MAAM,oBAAoB,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { buildPublicCustomerPortalRouteRuntime, CUSTOMER_PORTAL_ROUTE_RUNTIME_CONTAINER_KEY, } from "./route-runtime.js";
2
- import { customerPortalRoutes } from "./routes.js";
3
2
  import { createPublicCustomerPortalRoutes, } from "./routes-public.js";
4
3
  export { customerPortalRoutes } from "./routes.js";
5
4
  export { createPublicCustomerPortalRoutes, publicCustomerPortalRoutes } from "./routes-public.js";
@@ -17,7 +16,6 @@ export function createCustomerPortalHonoModule(options = {}) {
17
16
  };
18
17
  return {
19
18
  module,
20
- routes: customerPortalRoutes,
21
19
  publicRoutes: createPublicCustomerPortalRoutes(options),
22
20
  };
23
21
  }
@@ -11,7 +11,7 @@ type Env = {
11
11
  export interface PublicCustomerPortalRouteOptions {
12
12
  resolveDocumentDownloadUrl?: (bindings: unknown, storageKey: string) => Promise<string | null> | string | null;
13
13
  }
14
- export declare function createPublicCustomerPortalRoutes(options?: PublicCustomerPortalRouteOptions): import("hono/hono-base").HonoBase<Env, {
14
+ export declare function createPublicCustomerPortalRoutes(options?: PublicCustomerPortalRouteOptions): import("hono/hono-base").HonoBase<Env, ((((((((((({
15
15
  "/me": {
16
16
  $get: {
17
17
  input: {};
@@ -94,7 +94,121 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
94
94
  status: 404;
95
95
  };
96
96
  };
97
+ } | (import("hono/types").MergeSchemaPath<{
98
+ "/contact-exists": {
99
+ $get: {
100
+ input: {};
101
+ output: {
102
+ data: {
103
+ email: string;
104
+ authAccountExists: boolean;
105
+ customerRecordExists: boolean;
106
+ linkedCustomerRecordExists: boolean;
107
+ };
108
+ };
109
+ outputFormat: "json";
110
+ status: import("hono/utils/http-status").ContentfulStatusCode;
111
+ };
112
+ };
97
113
  } & {
114
+ "/contact-exists/phone": {
115
+ $get: {
116
+ input: {};
117
+ output: {
118
+ data: {
119
+ phone: string;
120
+ customerRecordExists: boolean;
121
+ linkedCustomerRecordExists: boolean;
122
+ };
123
+ };
124
+ outputFormat: "json";
125
+ status: import("hono/utils/http-status").ContentfulStatusCode;
126
+ };
127
+ };
128
+ }, "/"> & {
129
+ "/me": {
130
+ $get: {
131
+ input: {};
132
+ output: {
133
+ data: {
134
+ userId: string;
135
+ email: string;
136
+ emailVerified: boolean;
137
+ firstName: string | null;
138
+ middleName: string | null;
139
+ lastName: string | null;
140
+ avatarUrl: string | null;
141
+ locale: string;
142
+ timezone: string | null;
143
+ seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
144
+ dateOfBirth: string | null;
145
+ address: {
146
+ country: string | null;
147
+ state: string | null;
148
+ city: string | null;
149
+ postalCode: string | null;
150
+ addressLine1: string | null;
151
+ addressLine2: string | null;
152
+ } | null;
153
+ documents: {
154
+ type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
155
+ number: string;
156
+ issuingAuthority: string | null;
157
+ issuingCountry: string;
158
+ nationality: string | null;
159
+ expiryDate: string;
160
+ issueDate: string | null;
161
+ }[];
162
+ marketingConsent: boolean;
163
+ marketingConsentAt: string | null;
164
+ marketingConsentSource: string | null;
165
+ notificationDefaults: {
166
+ [x: string]: import("hono/utils/types").JSONValue;
167
+ } | null;
168
+ uiPrefs: {
169
+ [x: string]: import("hono/utils/types").JSONValue;
170
+ } | null;
171
+ customerRecord: {
172
+ id: string;
173
+ firstName: string;
174
+ lastName: string;
175
+ preferredLanguage: string | null;
176
+ preferredCurrency: string | null;
177
+ birthday: string | null;
178
+ email: string | null;
179
+ phone: string | null;
180
+ address: string | null;
181
+ city: string | null;
182
+ country: string | null;
183
+ billingAddress: {
184
+ id: string;
185
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
186
+ fullText: string | null;
187
+ line1: string | null;
188
+ line2: string | null;
189
+ city: string | null;
190
+ region: string | null;
191
+ postalCode: string | null;
192
+ country: string | null;
193
+ isPrimary: boolean;
194
+ } | null;
195
+ relation: string | null;
196
+ status: string;
197
+ } | null;
198
+ };
199
+ };
200
+ outputFormat: "json";
201
+ status: import("hono/utils/http-status").ContentfulStatusCode;
202
+ } | {
203
+ input: {};
204
+ output: {
205
+ error: string;
206
+ };
207
+ outputFormat: "json";
208
+ status: 404;
209
+ };
210
+ };
211
+ })) & {
98
212
  "/me": {
99
213
  $patch: {
100
214
  input: {};
@@ -184,7 +298,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
184
298
  status: import("hono/utils/http-status").ContentfulStatusCode;
185
299
  };
186
300
  };
187
- } & {
301
+ }) & {
188
302
  "/bootstrap": {
189
303
  $post: {
190
304
  input: {};
@@ -306,7 +420,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
306
420
  status: import("hono/utils/http-status").ContentfulStatusCode;
307
421
  };
308
422
  };
309
- } & {
423
+ }) & {
310
424
  "/companions": {
311
425
  $get: {
312
426
  input: {};
@@ -354,7 +468,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
354
468
  status: import("hono/utils/http-status").ContentfulStatusCode;
355
469
  };
356
470
  };
357
- } & {
471
+ }) & {
358
472
  "/companions": {
359
473
  $post: {
360
474
  input: {};
@@ -409,7 +523,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
409
523
  status: 201;
410
524
  };
411
525
  };
412
- } & {
526
+ }) & {
413
527
  "/companions/import-booking-participants": {
414
528
  $post: {
415
529
  input: {};
@@ -467,7 +581,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
467
581
  status: import("hono/utils/http-status").ContentfulStatusCode;
468
582
  };
469
583
  };
470
- } & {
584
+ }) & {
471
585
  "/companions/:companionId": {
472
586
  $patch: {
473
587
  input: {
@@ -480,7 +594,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
480
594
  status: import("hono/utils/http-status").StatusCode;
481
595
  };
482
596
  };
483
- } & {
597
+ }) & {
484
598
  "/companions/:companionId": {
485
599
  $delete: {
486
600
  input: {
@@ -493,7 +607,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
493
607
  status: import("hono/utils/http-status").StatusCode;
494
608
  };
495
609
  };
496
- } & {
610
+ }) & {
497
611
  "/bookings": {
498
612
  $get: {
499
613
  input: {};
@@ -526,7 +640,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
526
640
  status: import("hono/utils/http-status").ContentfulStatusCode;
527
641
  };
528
642
  };
529
- } & {
643
+ }) & {
530
644
  "/bookings/:bookingId": {
531
645
  $get: {
532
646
  input: {
@@ -653,7 +767,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
653
767
  status: import("hono/utils/http-status").ContentfulStatusCode;
654
768
  };
655
769
  };
656
- } & {
770
+ }) & {
657
771
  "/bookings/:bookingId/documents": {
658
772
  $get: {
659
773
  input: {
@@ -688,7 +802,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
688
802
  status: import("hono/utils/http-status").ContentfulStatusCode;
689
803
  };
690
804
  };
691
- } & {
805
+ }) & {
692
806
  "/bookings/:bookingId/billing-contact": {
693
807
  $get: {
694
808
  input: {
@@ -725,7 +839,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
725
839
  };
726
840
  };
727
841
  }, "/", "/bookings/:bookingId/billing-contact">;
728
- export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBase<Env, {
842
+ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBase<Env, ((((((((((({
729
843
  "/me": {
730
844
  $get: {
731
845
  input: {};
@@ -808,7 +922,121 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
808
922
  status: 404;
809
923
  };
810
924
  };
925
+ } | (import("hono/types").MergeSchemaPath<{
926
+ "/contact-exists": {
927
+ $get: {
928
+ input: {};
929
+ output: {
930
+ data: {
931
+ email: string;
932
+ authAccountExists: boolean;
933
+ customerRecordExists: boolean;
934
+ linkedCustomerRecordExists: boolean;
935
+ };
936
+ };
937
+ outputFormat: "json";
938
+ status: import("hono/utils/http-status").ContentfulStatusCode;
939
+ };
940
+ };
811
941
  } & {
942
+ "/contact-exists/phone": {
943
+ $get: {
944
+ input: {};
945
+ output: {
946
+ data: {
947
+ phone: string;
948
+ customerRecordExists: boolean;
949
+ linkedCustomerRecordExists: boolean;
950
+ };
951
+ };
952
+ outputFormat: "json";
953
+ status: import("hono/utils/http-status").ContentfulStatusCode;
954
+ };
955
+ };
956
+ }, "/"> & {
957
+ "/me": {
958
+ $get: {
959
+ input: {};
960
+ output: {
961
+ data: {
962
+ userId: string;
963
+ email: string;
964
+ emailVerified: boolean;
965
+ firstName: string | null;
966
+ middleName: string | null;
967
+ lastName: string | null;
968
+ avatarUrl: string | null;
969
+ locale: string;
970
+ timezone: string | null;
971
+ seatingPreference: "aisle" | "window" | "middle" | "no_preference" | null;
972
+ dateOfBirth: string | null;
973
+ address: {
974
+ country: string | null;
975
+ state: string | null;
976
+ city: string | null;
977
+ postalCode: string | null;
978
+ addressLine1: string | null;
979
+ addressLine2: string | null;
980
+ } | null;
981
+ documents: {
982
+ type: "passport" | "visa" | "drivers_license" | "other" | "id_card";
983
+ number: string;
984
+ issuingAuthority: string | null;
985
+ issuingCountry: string;
986
+ nationality: string | null;
987
+ expiryDate: string;
988
+ issueDate: string | null;
989
+ }[];
990
+ marketingConsent: boolean;
991
+ marketingConsentAt: string | null;
992
+ marketingConsentSource: string | null;
993
+ notificationDefaults: {
994
+ [x: string]: import("hono/utils/types").JSONValue;
995
+ } | null;
996
+ uiPrefs: {
997
+ [x: string]: import("hono/utils/types").JSONValue;
998
+ } | null;
999
+ customerRecord: {
1000
+ id: string;
1001
+ firstName: string;
1002
+ lastName: string;
1003
+ preferredLanguage: string | null;
1004
+ preferredCurrency: string | null;
1005
+ birthday: string | null;
1006
+ email: string | null;
1007
+ phone: string | null;
1008
+ address: string | null;
1009
+ city: string | null;
1010
+ country: string | null;
1011
+ billingAddress: {
1012
+ id: string;
1013
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
1014
+ fullText: string | null;
1015
+ line1: string | null;
1016
+ line2: string | null;
1017
+ city: string | null;
1018
+ region: string | null;
1019
+ postalCode: string | null;
1020
+ country: string | null;
1021
+ isPrimary: boolean;
1022
+ } | null;
1023
+ relation: string | null;
1024
+ status: string;
1025
+ } | null;
1026
+ };
1027
+ };
1028
+ outputFormat: "json";
1029
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1030
+ } | {
1031
+ input: {};
1032
+ output: {
1033
+ error: string;
1034
+ };
1035
+ outputFormat: "json";
1036
+ status: 404;
1037
+ };
1038
+ };
1039
+ })) & {
812
1040
  "/me": {
813
1041
  $patch: {
814
1042
  input: {};
@@ -898,7 +1126,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
898
1126
  status: import("hono/utils/http-status").ContentfulStatusCode;
899
1127
  };
900
1128
  };
901
- } & {
1129
+ }) & {
902
1130
  "/bootstrap": {
903
1131
  $post: {
904
1132
  input: {};
@@ -1020,7 +1248,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1020
1248
  status: import("hono/utils/http-status").ContentfulStatusCode;
1021
1249
  };
1022
1250
  };
1023
- } & {
1251
+ }) & {
1024
1252
  "/companions": {
1025
1253
  $get: {
1026
1254
  input: {};
@@ -1068,7 +1296,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1068
1296
  status: import("hono/utils/http-status").ContentfulStatusCode;
1069
1297
  };
1070
1298
  };
1071
- } & {
1299
+ }) & {
1072
1300
  "/companions": {
1073
1301
  $post: {
1074
1302
  input: {};
@@ -1123,7 +1351,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1123
1351
  status: 201;
1124
1352
  };
1125
1353
  };
1126
- } & {
1354
+ }) & {
1127
1355
  "/companions/import-booking-participants": {
1128
1356
  $post: {
1129
1357
  input: {};
@@ -1181,7 +1409,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1181
1409
  status: import("hono/utils/http-status").ContentfulStatusCode;
1182
1410
  };
1183
1411
  };
1184
- } & {
1412
+ }) & {
1185
1413
  "/companions/:companionId": {
1186
1414
  $patch: {
1187
1415
  input: {
@@ -1194,7 +1422,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1194
1422
  status: import("hono/utils/http-status").StatusCode;
1195
1423
  };
1196
1424
  };
1197
- } & {
1425
+ }) & {
1198
1426
  "/companions/:companionId": {
1199
1427
  $delete: {
1200
1428
  input: {
@@ -1207,7 +1435,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1207
1435
  status: import("hono/utils/http-status").StatusCode;
1208
1436
  };
1209
1437
  };
1210
- } & {
1438
+ }) & {
1211
1439
  "/bookings": {
1212
1440
  $get: {
1213
1441
  input: {};
@@ -1240,7 +1468,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1240
1468
  status: import("hono/utils/http-status").ContentfulStatusCode;
1241
1469
  };
1242
1470
  };
1243
- } & {
1471
+ }) & {
1244
1472
  "/bookings/:bookingId": {
1245
1473
  $get: {
1246
1474
  input: {
@@ -1367,7 +1595,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1367
1595
  status: import("hono/utils/http-status").ContentfulStatusCode;
1368
1596
  };
1369
1597
  };
1370
- } & {
1598
+ }) & {
1371
1599
  "/bookings/:bookingId/documents": {
1372
1600
  $get: {
1373
1601
  input: {
@@ -1402,7 +1630,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
1402
1630
  status: import("hono/utils/http-status").ContentfulStatusCode;
1403
1631
  };
1404
1632
  };
1405
- } & {
1633
+ }) & {
1406
1634
  "/bookings/:bookingId/billing-contact": {
1407
1635
  $get: {
1408
1636
  input: {
@@ -1 +1 @@
1
- {"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAiBjE,KAAK,GAAG,GAAG;IACT,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,EAAE;QACT,SAAS,CAAC,EAAE,eAAe,CAAA;QAC3B,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAoBD,MAAM,WAAW,gCAAgC;IAC/C,0BAA0B,CAAC,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAAqC,CAAA;AAE5E,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { ForbiddenApiError, handleApiError, parseJsonBody, requireUserId } from "@voyantjs/hono";
2
2
  import { Hono } from "hono";
3
3
  import { buildPublicCustomerPortalRouteRuntime, CUSTOMER_PORTAL_ROUTE_RUNTIME_CONTAINER_KEY, } from "./route-runtime.js";
4
+ import { customerPortalRoutes } from "./routes.js";
4
5
  import { publicCustomerPortalService } from "./service-public.js";
5
6
  import { bootstrapCustomerPortalSchema, createCustomerPortalCompanionSchema, importCustomerPortalBookingParticipantsSchema, updateCustomerPortalCompanionSchema, updateCustomerPortalProfileSchema, } from "./validation-public.js";
6
7
  function notFound(c, error) {
@@ -17,6 +18,7 @@ export function createPublicCustomerPortalRoutes(options = {}) {
17
18
  const resolveOptionalKms = (c) => getRuntime(c).getOptionalKmsProvider();
18
19
  const resolveDocumentDownloadUrl = (c, storageKey) => getRuntime(c).resolveDocumentDownloadUrl?.(storageKey) ?? null;
19
20
  return new Hono()
21
+ .route("/", customerPortalRoutes)
20
22
  .get("/me", async (c) => {
21
23
  const userId = requireUserId(c);
22
24
  const profile = await publicCustomerPortalService.getProfileWithOptions(c.get("db"), userId, {
@@ -1 +1 @@
1
- {"version":3,"file":"service-public.d.ts","sourceRoot":"","sources":["../src/service-public.ts"],"names":[],"mappings":"AAoBA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,kCAAkC,EAGlC,2BAA2B,EAK3B,4BAA4B,EAE5B,uBAAuB,EACvB,iCAAiC,EACjC,sCAAsC,EACtC,qBAAqB,EACrB,4CAA4C,EAC5C,6CAA6C,EAE7C,kCAAkC,EAClC,gCAAgC,EACjC,MAAM,wBAAwB,CAAA;AAQ/B,UAAU,4BAA4B;IACpC,GAAG,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACxB,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;CAC5F;AA6wCD,eAAO,MAAM,2BAA2B;sBAEhC,kBAAkB,SACf,MAAM,GACZ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bookingId, options = {}) {
342
342
  const metadata = getMetadataRecord(attachment.metadata);
343
343
  const downloadUrl = attachment.storageKey && options.resolveDocumentDownloadUrl
344
344
  ? await options.resolveDocumentDownloadUrl(attachment.storageKey)
345
- : getMetadataString(metadata, ["url", "downloadUrl"]);
345
+ : getMetadataString(metadata, ["url"]);
346
346
  if (!downloadUrl || bestAttachmentByContractId.has(attachment.contractId)) {
347
347
  continue;
348
348
  }
@@ -369,17 +369,7 @@ async function listLegalDocumentsForBooking(db, bookingId, options = {}) {
369
369
  });
370
370
  }
371
371
  function resolveFinanceDocumentDownloadUrl(metadata) {
372
- return getMetadataString(metadata, [
373
- "downloadUrl",
374
- "download_url",
375
- "signedUrl",
376
- "signed_url",
377
- "publicUrl",
378
- "public_url",
379
- "fileUrl",
380
- "file_url",
381
- "url",
382
- ]);
372
+ return getMetadataString(metadata, ["url"]);
383
373
  }
384
374
  function selectBookingSummaryProductTitle(items) {
385
375
  const preferredItem = items.find((item) => item.itemType === "unit") ??
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/customer-portal",
3
- "version": "0.6.0",
3
+ "version": "0.6.3",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,15 +30,15 @@
30
30
  "drizzle-orm": "^0.45.2",
31
31
  "hono": "^4.12.10",
32
32
  "zod": "^4.3.6",
33
- "@voyantjs/bookings": "0.6.0",
34
- "@voyantjs/core": "0.6.0",
35
- "@voyantjs/crm": "0.6.0",
36
- "@voyantjs/db": "0.6.0",
37
- "@voyantjs/finance": "0.6.0",
38
- "@voyantjs/hono": "0.6.0",
39
- "@voyantjs/identity": "0.6.0",
40
- "@voyantjs/legal": "0.6.0",
41
- "@voyantjs/utils": "0.6.0"
33
+ "@voyantjs/bookings": "0.6.3",
34
+ "@voyantjs/core": "0.6.3",
35
+ "@voyantjs/crm": "0.6.3",
36
+ "@voyantjs/db": "0.6.3",
37
+ "@voyantjs/finance": "0.6.3",
38
+ "@voyantjs/hono": "0.6.3",
39
+ "@voyantjs/identity": "0.6.3",
40
+ "@voyantjs/legal": "0.6.3",
41
+ "@voyantjs/utils": "0.6.3"
42
42
  },
43
43
  "devDependencies": {
44
44
  "typescript": "^6.0.2",