@voyantjs/customer-portal 0.52.1 → 0.52.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.
- package/dist/routes-public.d.ts +10 -10
- package/dist/service-public.js +12 -12
- package/dist/validation-public.d.ts +8 -8
- package/dist/validation-public.js +2 -2
- package/package.json +10 -10
package/dist/routes-public.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
55
55
|
lastName: string;
|
|
56
56
|
preferredLanguage: string | null;
|
|
57
57
|
preferredCurrency: string | null;
|
|
58
|
-
|
|
58
|
+
dateOfBirth: string | null;
|
|
59
59
|
email: string | null;
|
|
60
60
|
phone: string | null;
|
|
61
61
|
billingAddress: {
|
|
@@ -162,7 +162,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
162
162
|
lastName: string;
|
|
163
163
|
preferredLanguage: string | null;
|
|
164
164
|
preferredCurrency: string | null;
|
|
165
|
-
|
|
165
|
+
dateOfBirth: string | null;
|
|
166
166
|
email: string | null;
|
|
167
167
|
phone: string | null;
|
|
168
168
|
billingAddress: {
|
|
@@ -252,7 +252,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
252
252
|
lastName: string;
|
|
253
253
|
preferredLanguage: string | null;
|
|
254
254
|
preferredCurrency: string | null;
|
|
255
|
-
|
|
255
|
+
dateOfBirth: string | null;
|
|
256
256
|
email: string | null;
|
|
257
257
|
phone: string | null;
|
|
258
258
|
billingAddress: {
|
|
@@ -496,7 +496,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
496
496
|
lastName: string;
|
|
497
497
|
preferredLanguage: string | null;
|
|
498
498
|
preferredCurrency: string | null;
|
|
499
|
-
|
|
499
|
+
dateOfBirth: string | null;
|
|
500
500
|
email: string | null;
|
|
501
501
|
phone: string | null;
|
|
502
502
|
billingAddress: {
|
|
@@ -522,7 +522,7 @@ export declare function createPublicCustomerPortalRoutes(options?: PublicCustome
|
|
|
522
522
|
lastName: string;
|
|
523
523
|
preferredLanguage: string | null;
|
|
524
524
|
preferredCurrency: string | null;
|
|
525
|
-
|
|
525
|
+
dateOfBirth: string | null;
|
|
526
526
|
email: string | null;
|
|
527
527
|
phone: string | null;
|
|
528
528
|
billingAddress: {
|
|
@@ -1011,7 +1011,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1011
1011
|
lastName: string;
|
|
1012
1012
|
preferredLanguage: string | null;
|
|
1013
1013
|
preferredCurrency: string | null;
|
|
1014
|
-
|
|
1014
|
+
dateOfBirth: string | null;
|
|
1015
1015
|
email: string | null;
|
|
1016
1016
|
phone: string | null;
|
|
1017
1017
|
billingAddress: {
|
|
@@ -1118,7 +1118,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1118
1118
|
lastName: string;
|
|
1119
1119
|
preferredLanguage: string | null;
|
|
1120
1120
|
preferredCurrency: string | null;
|
|
1121
|
-
|
|
1121
|
+
dateOfBirth: string | null;
|
|
1122
1122
|
email: string | null;
|
|
1123
1123
|
phone: string | null;
|
|
1124
1124
|
billingAddress: {
|
|
@@ -1208,7 +1208,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1208
1208
|
lastName: string;
|
|
1209
1209
|
preferredLanguage: string | null;
|
|
1210
1210
|
preferredCurrency: string | null;
|
|
1211
|
-
|
|
1211
|
+
dateOfBirth: string | null;
|
|
1212
1212
|
email: string | null;
|
|
1213
1213
|
phone: string | null;
|
|
1214
1214
|
billingAddress: {
|
|
@@ -1452,7 +1452,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1452
1452
|
lastName: string;
|
|
1453
1453
|
preferredLanguage: string | null;
|
|
1454
1454
|
preferredCurrency: string | null;
|
|
1455
|
-
|
|
1455
|
+
dateOfBirth: string | null;
|
|
1456
1456
|
email: string | null;
|
|
1457
1457
|
phone: string | null;
|
|
1458
1458
|
billingAddress: {
|
|
@@ -1478,7 +1478,7 @@ export declare const publicCustomerPortalRoutes: import("hono/hono-base").HonoBa
|
|
|
1478
1478
|
lastName: string;
|
|
1479
1479
|
preferredLanguage: string | null;
|
|
1480
1480
|
preferredCurrency: string | null;
|
|
1481
|
-
|
|
1481
|
+
dateOfBirth: string | null;
|
|
1482
1482
|
email: string | null;
|
|
1483
1483
|
phone: string | null;
|
|
1484
1484
|
billingAddress: {
|
package/dist/service-public.js
CHANGED
|
@@ -643,7 +643,7 @@ async function listCustomerRecordCandidatesByEmail(db, email) {
|
|
|
643
643
|
lastName: people.lastName,
|
|
644
644
|
preferredLanguage: people.preferredLanguage,
|
|
645
645
|
preferredCurrency: people.preferredCurrency,
|
|
646
|
-
|
|
646
|
+
dateOfBirth: people.dateOfBirth,
|
|
647
647
|
relation: people.relation,
|
|
648
648
|
status: people.status,
|
|
649
649
|
source: people.source,
|
|
@@ -664,7 +664,7 @@ async function listCustomerRecordCandidatesByEmail(db, email) {
|
|
|
664
664
|
lastName: row.lastName,
|
|
665
665
|
preferredLanguage: row.preferredLanguage ?? null,
|
|
666
666
|
preferredCurrency: row.preferredCurrency ?? null,
|
|
667
|
-
|
|
667
|
+
dateOfBirth: row.dateOfBirth ?? null,
|
|
668
668
|
email: normalizedEmail,
|
|
669
669
|
phone: null,
|
|
670
670
|
billingAddress: null,
|
|
@@ -684,7 +684,7 @@ async function listCustomerRecordCandidatesByPhone(db, phone) {
|
|
|
684
684
|
lastName: people.lastName,
|
|
685
685
|
preferredLanguage: people.preferredLanguage,
|
|
686
686
|
preferredCurrency: people.preferredCurrency,
|
|
687
|
-
|
|
687
|
+
dateOfBirth: people.dateOfBirth,
|
|
688
688
|
relation: people.relation,
|
|
689
689
|
status: people.status,
|
|
690
690
|
source: people.source,
|
|
@@ -705,7 +705,7 @@ async function listCustomerRecordCandidatesByPhone(db, phone) {
|
|
|
705
705
|
lastName: row.lastName,
|
|
706
706
|
preferredLanguage: row.preferredLanguage ?? null,
|
|
707
707
|
preferredCurrency: row.preferredCurrency ?? null,
|
|
708
|
-
|
|
708
|
+
dateOfBirth: row.dateOfBirth ?? null,
|
|
709
709
|
email: null,
|
|
710
710
|
phone: normalizedPhone,
|
|
711
711
|
billingAddress: null,
|
|
@@ -734,7 +734,7 @@ async function getCustomerRecord(db, userId) {
|
|
|
734
734
|
lastName: person.lastName,
|
|
735
735
|
preferredLanguage: person.preferredLanguage ?? null,
|
|
736
736
|
preferredCurrency: person.preferredCurrency ?? null,
|
|
737
|
-
|
|
737
|
+
dateOfBirth: person.dateOfBirth ?? null,
|
|
738
738
|
email: person.email ?? null,
|
|
739
739
|
phone: person.phone ?? null,
|
|
740
740
|
billingAddress: billingAddress ? toCustomerAddress(billingAddress) : null,
|
|
@@ -1071,7 +1071,7 @@ export const publicCustomerPortalService = {
|
|
|
1071
1071
|
locale: authProfile.locale ?? "en",
|
|
1072
1072
|
timezone: authProfile.timezone ?? null,
|
|
1073
1073
|
seatingPreference: authProfile.seatingPreference ?? null,
|
|
1074
|
-
dateOfBirth: customerRecord?.
|
|
1074
|
+
dateOfBirth: customerRecord?.dateOfBirth ?? null,
|
|
1075
1075
|
address: billingAddress
|
|
1076
1076
|
? {
|
|
1077
1077
|
country: billingAddress.country,
|
|
@@ -1221,7 +1221,7 @@ export const publicCustomerPortalService = {
|
|
|
1221
1221
|
nextAddressRecord !== undefined
|
|
1222
1222
|
? {
|
|
1223
1223
|
...(input.customerRecord ?? {}),
|
|
1224
|
-
...(nextDateOfBirth !== undefined ? {
|
|
1224
|
+
...(nextDateOfBirth !== undefined ? { dateOfBirth: nextDateOfBirth } : {}),
|
|
1225
1225
|
...(nextAddressRecord ?? {}),
|
|
1226
1226
|
}
|
|
1227
1227
|
: undefined;
|
|
@@ -1238,8 +1238,8 @@ export const publicCustomerPortalService = {
|
|
|
1238
1238
|
...(nextCustomerRecord?.preferredCurrency !== undefined
|
|
1239
1239
|
? { preferredCurrency: nextCustomerRecord.preferredCurrency }
|
|
1240
1240
|
: {}),
|
|
1241
|
-
...(nextCustomerRecord?.
|
|
1242
|
-
? {
|
|
1241
|
+
...(nextCustomerRecord?.dateOfBirth !== undefined
|
|
1242
|
+
? { dateOfBirth: nextCustomerRecord.dateOfBirth }
|
|
1243
1243
|
: {}),
|
|
1244
1244
|
...(nextCustomerRecord?.phone !== undefined ? { phone: nextCustomerRecord.phone } : {}),
|
|
1245
1245
|
});
|
|
@@ -1318,8 +1318,8 @@ export const publicCustomerPortalService = {
|
|
|
1318
1318
|
...(input.customerRecord?.preferredCurrency !== undefined
|
|
1319
1319
|
? { preferredCurrency: input.customerRecord.preferredCurrency }
|
|
1320
1320
|
: {}),
|
|
1321
|
-
...(input.customerRecord?.
|
|
1322
|
-
? {
|
|
1321
|
+
...(input.customerRecord?.dateOfBirth !== undefined
|
|
1322
|
+
? { dateOfBirth: input.customerRecord.dateOfBirth }
|
|
1323
1323
|
: {}),
|
|
1324
1324
|
...(input.customerRecord?.phone !== undefined ? { phone: input.customerRecord.phone } : {}),
|
|
1325
1325
|
});
|
|
@@ -1359,7 +1359,7 @@ export const publicCustomerPortalService = {
|
|
|
1359
1359
|
lastName: nextLastName || "Customer",
|
|
1360
1360
|
preferredLanguage: input.customerRecord?.preferredLanguage ?? authProfile.locale ?? null,
|
|
1361
1361
|
preferredCurrency: input.customerRecord?.preferredCurrency ?? null,
|
|
1362
|
-
|
|
1362
|
+
dateOfBirth: input.customerRecord?.dateOfBirth ?? null,
|
|
1363
1363
|
relation: "client",
|
|
1364
1364
|
status: "active",
|
|
1365
1365
|
source: linkedCustomerSource,
|
|
@@ -46,7 +46,7 @@ export declare const customerPortalRecordSchema: z.ZodObject<{
|
|
|
46
46
|
lastName: z.ZodString;
|
|
47
47
|
preferredLanguage: z.ZodNullable<z.ZodString>;
|
|
48
48
|
preferredCurrency: z.ZodNullable<z.ZodString>;
|
|
49
|
-
|
|
49
|
+
dateOfBirth: z.ZodNullable<z.ZodString>;
|
|
50
50
|
email: z.ZodNullable<z.ZodString>;
|
|
51
51
|
phone: z.ZodNullable<z.ZodString>;
|
|
52
52
|
billingAddress: z.ZodNullable<z.ZodObject<{
|
|
@@ -79,7 +79,7 @@ export declare const customerPortalBootstrapCandidateSchema: z.ZodObject<{
|
|
|
79
79
|
lastName: z.ZodString;
|
|
80
80
|
preferredLanguage: z.ZodNullable<z.ZodString>;
|
|
81
81
|
preferredCurrency: z.ZodNullable<z.ZodString>;
|
|
82
|
-
|
|
82
|
+
dateOfBirth: z.ZodNullable<z.ZodString>;
|
|
83
83
|
email: z.ZodNullable<z.ZodString>;
|
|
84
84
|
phone: z.ZodNullable<z.ZodString>;
|
|
85
85
|
billingAddress: z.ZodNullable<z.ZodObject<{
|
|
@@ -149,7 +149,7 @@ export declare const customerPortalProfileSchema: z.ZodObject<{
|
|
|
149
149
|
lastName: z.ZodString;
|
|
150
150
|
preferredLanguage: z.ZodNullable<z.ZodString>;
|
|
151
151
|
preferredCurrency: z.ZodNullable<z.ZodString>;
|
|
152
|
-
|
|
152
|
+
dateOfBirth: z.ZodNullable<z.ZodString>;
|
|
153
153
|
email: z.ZodNullable<z.ZodString>;
|
|
154
154
|
phone: z.ZodNullable<z.ZodString>;
|
|
155
155
|
billingAddress: z.ZodNullable<z.ZodObject<{
|
|
@@ -180,7 +180,7 @@ export declare const customerPortalProfileSchema: z.ZodObject<{
|
|
|
180
180
|
export declare const updateCustomerPortalRecordSchema: z.ZodObject<{
|
|
181
181
|
preferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
182
182
|
preferredCurrency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
183
|
-
|
|
183
|
+
dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
184
|
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
185
|
billingAddress: z.ZodOptional<z.ZodObject<{
|
|
186
186
|
label: z.ZodOptional<z.ZodEnum<{
|
|
@@ -236,7 +236,7 @@ export declare const updateCustomerPortalProfileSchema: z.ZodObject<{
|
|
|
236
236
|
customerRecord: z.ZodOptional<z.ZodObject<{
|
|
237
237
|
preferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
238
238
|
preferredCurrency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
239
|
-
|
|
239
|
+
dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
240
|
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
241
|
billingAddress: z.ZodOptional<z.ZodObject<{
|
|
242
242
|
label: z.ZodOptional<z.ZodEnum<{
|
|
@@ -345,7 +345,7 @@ export declare const bootstrapCustomerPortalSchema: z.ZodObject<{
|
|
|
345
345
|
customerRecord: z.ZodOptional<z.ZodObject<{
|
|
346
346
|
preferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
347
347
|
preferredCurrency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
-
|
|
348
|
+
dateOfBirth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
349
349
|
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
350
350
|
billingAddress: z.ZodOptional<z.ZodObject<{
|
|
351
351
|
label: z.ZodOptional<z.ZodEnum<{
|
|
@@ -417,7 +417,7 @@ export declare const bootstrapCustomerPortalResultSchema: z.ZodObject<{
|
|
|
417
417
|
lastName: z.ZodString;
|
|
418
418
|
preferredLanguage: z.ZodNullable<z.ZodString>;
|
|
419
419
|
preferredCurrency: z.ZodNullable<z.ZodString>;
|
|
420
|
-
|
|
420
|
+
dateOfBirth: z.ZodNullable<z.ZodString>;
|
|
421
421
|
email: z.ZodNullable<z.ZodString>;
|
|
422
422
|
phone: z.ZodNullable<z.ZodString>;
|
|
423
423
|
billingAddress: z.ZodNullable<z.ZodObject<{
|
|
@@ -451,7 +451,7 @@ export declare const bootstrapCustomerPortalResultSchema: z.ZodObject<{
|
|
|
451
451
|
lastName: z.ZodString;
|
|
452
452
|
preferredLanguage: z.ZodNullable<z.ZodString>;
|
|
453
453
|
preferredCurrency: z.ZodNullable<z.ZodString>;
|
|
454
|
-
|
|
454
|
+
dateOfBirth: z.ZodNullable<z.ZodString>;
|
|
455
455
|
email: z.ZodNullable<z.ZodString>;
|
|
456
456
|
phone: z.ZodNullable<z.ZodString>;
|
|
457
457
|
billingAddress: z.ZodNullable<z.ZodObject<{
|
|
@@ -164,7 +164,7 @@ export const customerPortalRecordSchema = z.object({
|
|
|
164
164
|
lastName: z.string(),
|
|
165
165
|
preferredLanguage: z.string().nullable(),
|
|
166
166
|
preferredCurrency: z.string().nullable(),
|
|
167
|
-
|
|
167
|
+
dateOfBirth: z.string().nullable(),
|
|
168
168
|
email: z.string().nullable(),
|
|
169
169
|
phone: z.string().nullable(),
|
|
170
170
|
billingAddress: customerPortalAddressSchema.nullable(),
|
|
@@ -220,7 +220,7 @@ export const customerPortalProfileSchema = z.object({
|
|
|
220
220
|
export const updateCustomerPortalRecordSchema = z.object({
|
|
221
221
|
preferredLanguage: z.string().max(35).nullable().optional(),
|
|
222
222
|
preferredCurrency: z.string().min(3).max(3).nullable().optional(),
|
|
223
|
-
|
|
223
|
+
dateOfBirth: z.string().date().nullable().optional(),
|
|
224
224
|
phone: z.string().max(50).nullable().optional(),
|
|
225
225
|
billingAddress: updateCustomerPortalAddressSchema.optional(),
|
|
226
226
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/customer-portal",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"drizzle-orm": "^0.45.2",
|
|
35
35
|
"hono": "^4.12.10",
|
|
36
36
|
"zod": "^4.3.6",
|
|
37
|
-
"@voyantjs/bookings": "0.52.
|
|
38
|
-
"@voyantjs/core": "0.52.
|
|
39
|
-
"@voyantjs/crm": "0.52.
|
|
40
|
-
"@voyantjs/db": "0.52.
|
|
41
|
-
"@voyantjs/finance": "0.52.
|
|
42
|
-
"@voyantjs/hono": "0.52.
|
|
43
|
-
"@voyantjs/identity": "0.52.
|
|
44
|
-
"@voyantjs/legal": "0.52.
|
|
45
|
-
"@voyantjs/utils": "0.52.
|
|
37
|
+
"@voyantjs/bookings": "0.52.3",
|
|
38
|
+
"@voyantjs/core": "0.52.3",
|
|
39
|
+
"@voyantjs/crm": "0.52.3",
|
|
40
|
+
"@voyantjs/db": "0.52.3",
|
|
41
|
+
"@voyantjs/finance": "0.52.3",
|
|
42
|
+
"@voyantjs/hono": "0.52.3",
|
|
43
|
+
"@voyantjs/identity": "0.52.3",
|
|
44
|
+
"@voyantjs/legal": "0.52.3",
|
|
45
|
+
"@voyantjs/utils": "0.52.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"typescript": "^6.0.2",
|