@voyantjs/customer-portal 0.26.0 → 0.26.2
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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/routes-public.d.ts +368 -82
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +40 -1
- package/dist/service-public.d.ts +80 -0
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +242 -44
- package/dist/validation-public.d.ts +77 -47
- package/dist/validation-public.d.ts.map +1 -1
- package/dist/validation-public.js +52 -21
- package/package.json +10 -10
|
@@ -110,7 +110,8 @@ export declare const customerPortalBootstrapCandidateSchema: z.ZodObject<{
|
|
|
110
110
|
}, z.core.$strip>;
|
|
111
111
|
export declare const customerPortalProfileSchema: z.ZodObject<{
|
|
112
112
|
userId: z.ZodString;
|
|
113
|
-
email: z.ZodString
|
|
113
|
+
email: z.ZodNullable<z.ZodString>;
|
|
114
|
+
phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
115
|
emailVerified: z.ZodBoolean;
|
|
115
116
|
firstName: z.ZodNullable<z.ZodString>;
|
|
116
117
|
middleName: z.ZodNullable<z.ZodString>;
|
|
@@ -133,21 +134,10 @@ export declare const customerPortalProfileSchema: z.ZodObject<{
|
|
|
133
134
|
addressLine1: z.ZodNullable<z.ZodString>;
|
|
134
135
|
addressLine2: z.ZodNullable<z.ZodString>;
|
|
135
136
|
}, z.core.$strip>>;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
drivers_license: "drivers_license";
|
|
141
|
-
other: "other";
|
|
142
|
-
id_card: "id_card";
|
|
143
|
-
}>;
|
|
144
|
-
number: z.ZodString;
|
|
145
|
-
issuingAuthority: z.ZodNullable<z.ZodString>;
|
|
146
|
-
issuingCountry: z.ZodString;
|
|
147
|
-
nationality: z.ZodNullable<z.ZodString>;
|
|
148
|
-
expiryDate: z.ZodString;
|
|
149
|
-
issueDate: z.ZodNullable<z.ZodString>;
|
|
150
|
-
}, z.core.$strip>>;
|
|
137
|
+
accessibility: z.ZodNullable<z.ZodString>;
|
|
138
|
+
dietary: z.ZodNullable<z.ZodString>;
|
|
139
|
+
loyalty: z.ZodNullable<z.ZodString>;
|
|
140
|
+
insurance: z.ZodNullable<z.ZodString>;
|
|
151
141
|
marketingConsent: z.ZodBoolean;
|
|
152
142
|
marketingConsentAt: z.ZodNullable<z.ZodString>;
|
|
153
143
|
marketingConsentSource: z.ZodNullable<z.ZodString>;
|
|
@@ -235,21 +225,10 @@ export declare const updateCustomerPortalProfileSchema: z.ZodObject<{
|
|
|
235
225
|
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
236
226
|
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
227
|
}, z.core.$strip>>;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
drivers_license: "drivers_license";
|
|
243
|
-
other: "other";
|
|
244
|
-
id_card: "id_card";
|
|
245
|
-
}>;
|
|
246
|
-
number: z.ZodString;
|
|
247
|
-
issuingAuthority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
|
-
issuingCountry: z.ZodString;
|
|
249
|
-
nationality: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
250
|
-
expiryDate: z.ZodString;
|
|
251
|
-
issueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
252
|
-
}, z.core.$strip>>>;
|
|
228
|
+
accessibility: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
dietary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
loyalty: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
insurance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
253
232
|
marketingConsent: z.ZodOptional<z.ZodBoolean>;
|
|
254
233
|
marketingConsentSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
255
234
|
notificationDefaults: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -281,6 +260,64 @@ export declare const updateCustomerPortalProfileSchema: z.ZodObject<{
|
|
|
281
260
|
}, z.core.$strip>>;
|
|
282
261
|
}, z.core.$strip>>;
|
|
283
262
|
}, z.core.$strip>;
|
|
263
|
+
/**
|
|
264
|
+
* Per-document shape exposed by `/me/documents`. Plaintext on the
|
|
265
|
+
* wire — server encrypts/decrypts `number` against the people KMS key.
|
|
266
|
+
*/
|
|
267
|
+
export declare const customerPortalProfileDocumentSchema: z.ZodObject<{
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
type: z.ZodEnum<{
|
|
270
|
+
passport: "passport";
|
|
271
|
+
visa: "visa";
|
|
272
|
+
drivers_license: "drivers_license";
|
|
273
|
+
other: "other";
|
|
274
|
+
id_card: "id_card";
|
|
275
|
+
}>;
|
|
276
|
+
number: z.ZodNullable<z.ZodString>;
|
|
277
|
+
issuingAuthority: z.ZodNullable<z.ZodString>;
|
|
278
|
+
issuingCountry: z.ZodNullable<z.ZodString>;
|
|
279
|
+
issueDate: z.ZodNullable<z.ZodString>;
|
|
280
|
+
expiryDate: z.ZodNullable<z.ZodString>;
|
|
281
|
+
attachmentId: z.ZodNullable<z.ZodString>;
|
|
282
|
+
isPrimary: z.ZodBoolean;
|
|
283
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
284
|
+
createdAt: z.ZodString;
|
|
285
|
+
updatedAt: z.ZodString;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
export declare const createCustomerPortalProfileDocumentSchema: z.ZodObject<{
|
|
288
|
+
type: z.ZodEnum<{
|
|
289
|
+
passport: "passport";
|
|
290
|
+
visa: "visa";
|
|
291
|
+
drivers_license: "drivers_license";
|
|
292
|
+
other: "other";
|
|
293
|
+
id_card: "id_card";
|
|
294
|
+
}>;
|
|
295
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
296
|
+
issuingAuthority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
297
|
+
issuingCountry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
+
issueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
|
+
expiryDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
300
|
+
attachmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
+
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
302
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
export declare const updateCustomerPortalProfileDocumentSchema: z.ZodObject<{
|
|
305
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
306
|
+
passport: "passport";
|
|
307
|
+
visa: "visa";
|
|
308
|
+
drivers_license: "drivers_license";
|
|
309
|
+
other: "other";
|
|
310
|
+
id_card: "id_card";
|
|
311
|
+
}>>;
|
|
312
|
+
number: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
313
|
+
issuingAuthority: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
314
|
+
issuingCountry: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
315
|
+
issueDate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
316
|
+
expiryDate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
317
|
+
attachmentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
318
|
+
isPrimary: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
319
|
+
notes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
320
|
+
}, z.core.$strip>;
|
|
284
321
|
export declare const customerPortalContactExistsQuerySchema: z.ZodObject<{
|
|
285
322
|
email: z.ZodString;
|
|
286
323
|
}, z.core.$strip>;
|
|
@@ -341,7 +378,8 @@ export declare const bootstrapCustomerPortalResultSchema: z.ZodObject<{
|
|
|
341
378
|
}>;
|
|
342
379
|
profile: z.ZodNullable<z.ZodObject<{
|
|
343
380
|
userId: z.ZodString;
|
|
344
|
-
email: z.ZodString
|
|
381
|
+
email: z.ZodNullable<z.ZodString>;
|
|
382
|
+
phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
383
|
emailVerified: z.ZodBoolean;
|
|
346
384
|
firstName: z.ZodNullable<z.ZodString>;
|
|
347
385
|
middleName: z.ZodNullable<z.ZodString>;
|
|
@@ -364,21 +402,10 @@ export declare const bootstrapCustomerPortalResultSchema: z.ZodObject<{
|
|
|
364
402
|
addressLine1: z.ZodNullable<z.ZodString>;
|
|
365
403
|
addressLine2: z.ZodNullable<z.ZodString>;
|
|
366
404
|
}, z.core.$strip>>;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
drivers_license: "drivers_license";
|
|
372
|
-
other: "other";
|
|
373
|
-
id_card: "id_card";
|
|
374
|
-
}>;
|
|
375
|
-
number: z.ZodString;
|
|
376
|
-
issuingAuthority: z.ZodNullable<z.ZodString>;
|
|
377
|
-
issuingCountry: z.ZodString;
|
|
378
|
-
nationality: z.ZodNullable<z.ZodString>;
|
|
379
|
-
expiryDate: z.ZodString;
|
|
380
|
-
issueDate: z.ZodNullable<z.ZodString>;
|
|
381
|
-
}, z.core.$strip>>;
|
|
405
|
+
accessibility: z.ZodNullable<z.ZodString>;
|
|
406
|
+
dietary: z.ZodNullable<z.ZodString>;
|
|
407
|
+
loyalty: z.ZodNullable<z.ZodString>;
|
|
408
|
+
insurance: z.ZodNullable<z.ZodString>;
|
|
382
409
|
marketingConsent: z.ZodBoolean;
|
|
383
410
|
marketingConsentAt: z.ZodNullable<z.ZodString>;
|
|
384
411
|
marketingConsentSource: z.ZodNullable<z.ZodString>;
|
|
@@ -1235,6 +1262,9 @@ export declare const customerPortalBookingDetailSchema: z.ZodObject<{
|
|
|
1235
1262
|
}, z.core.$strip>;
|
|
1236
1263
|
export type CustomerPortalProfile = z.infer<typeof customerPortalProfileSchema>;
|
|
1237
1264
|
export type UpdateCustomerPortalProfileInput = z.infer<typeof updateCustomerPortalProfileSchema>;
|
|
1265
|
+
export type CustomerPortalProfileDocument = z.infer<typeof customerPortalProfileDocumentSchema>;
|
|
1266
|
+
export type CreateCustomerPortalProfileDocumentInput = z.infer<typeof createCustomerPortalProfileDocumentSchema>;
|
|
1267
|
+
export type UpdateCustomerPortalProfileDocumentInput = z.infer<typeof updateCustomerPortalProfileDocumentSchema>;
|
|
1238
1268
|
export type CustomerPortalContactExistsQuery = z.infer<typeof customerPortalContactExistsQuerySchema>;
|
|
1239
1269
|
export type CustomerPortalContactExistsResult = z.infer<typeof customerPortalContactExistsResultSchema>;
|
|
1240
1270
|
export type CustomerPortalPhoneContactExistsQuery = z.infer<typeof customerPortalPhoneContactExistsQuerySchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-public.d.ts","sourceRoot":"","sources":["../src/validation-public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgJvB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;iBAWtC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;iBAc1C,CAAA;AAEJ,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYrC,CAAA;AAEF,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGjD,CAAA;AAEF,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"validation-public.d.ts","sourceRoot":"","sources":["../src/validation-public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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K,CAC1D,OAAO,4CAA4C,CACpD,CAAA;AACD,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAC7F,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAA;AACnG,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA"}
|
|
@@ -177,7 +177,10 @@ export const customerPortalBootstrapCandidateSchema = customerPortalRecordSchema
|
|
|
177
177
|
});
|
|
178
178
|
export const customerPortalProfileSchema = z.object({
|
|
179
179
|
userId: z.string(),
|
|
180
|
-
|
|
180
|
+
// null for phone-only signups; check constraint on auth.user
|
|
181
|
+
// guarantees email or phoneNumber is set, not both required.
|
|
182
|
+
email: z.string().email().nullable(),
|
|
183
|
+
phoneNumber: z.string().nullable().optional(),
|
|
181
184
|
emailVerified: z.boolean(),
|
|
182
185
|
firstName: z.string().nullable(),
|
|
183
186
|
middleName: z.string().nullable(),
|
|
@@ -197,15 +200,16 @@ export const customerPortalProfileSchema = z.object({
|
|
|
197
200
|
addressLine2: z.string().nullable(),
|
|
198
201
|
})
|
|
199
202
|
.nullable(),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Free-text PII slots stored on `crm.people` and decrypted server-
|
|
205
|
+
* side. Stay nullable strings so the UI can surface them as simple
|
|
206
|
+
* textareas; richer structures (loyalty programs as rows, insurance
|
|
207
|
+
* policies as rows) graduate later if/when real consumers exist.
|
|
208
|
+
*/
|
|
209
|
+
accessibility: z.string().nullable(),
|
|
210
|
+
dietary: z.string().nullable(),
|
|
211
|
+
loyalty: z.string().nullable(),
|
|
212
|
+
insurance: z.string().nullable(),
|
|
209
213
|
marketingConsent: z.boolean(),
|
|
210
214
|
marketingConsentAt: z.string().nullable(),
|
|
211
215
|
marketingConsentSource: z.string().nullable(),
|
|
@@ -240,17 +244,10 @@ export const updateCustomerPortalProfileSchema = z
|
|
|
240
244
|
addressLine2: z.string().nullable().optional(),
|
|
241
245
|
})
|
|
242
246
|
.optional(),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
issuingAuthority: z.string().max(255).nullable().optional(),
|
|
248
|
-
issuingCountry: z.string().min(1).max(255),
|
|
249
|
-
nationality: z.string().max(255).nullable().optional(),
|
|
250
|
-
expiryDate: z.string().date(),
|
|
251
|
-
issueDate: z.string().date().nullable().optional(),
|
|
252
|
-
}))
|
|
253
|
-
.optional(),
|
|
247
|
+
accessibility: z.string().max(4000).nullable().optional(),
|
|
248
|
+
dietary: z.string().max(4000).nullable().optional(),
|
|
249
|
+
loyalty: z.string().max(4000).nullable().optional(),
|
|
250
|
+
insurance: z.string().max(4000).nullable().optional(),
|
|
254
251
|
marketingConsent: z.boolean().optional(),
|
|
255
252
|
marketingConsentSource: z.string().max(255).nullable().optional(),
|
|
256
253
|
notificationDefaults: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
@@ -260,6 +257,40 @@ export const updateCustomerPortalProfileSchema = z
|
|
|
260
257
|
.refine((value) => Object.keys(value).length > 0, {
|
|
261
258
|
message: "At least one field must be provided",
|
|
262
259
|
});
|
|
260
|
+
/**
|
|
261
|
+
* Per-document shape exposed by `/me/documents`. Plaintext on the
|
|
262
|
+
* wire — server encrypts/decrypts `number` against the people KMS key.
|
|
263
|
+
*/
|
|
264
|
+
export const customerPortalProfileDocumentSchema = z.object({
|
|
265
|
+
id: z.string(),
|
|
266
|
+
type: customerPortalProfileDocumentTypeSchema,
|
|
267
|
+
number: z.string().nullable(),
|
|
268
|
+
issuingAuthority: z.string().nullable(),
|
|
269
|
+
issuingCountry: z.string().nullable(),
|
|
270
|
+
issueDate: z.string().nullable(),
|
|
271
|
+
expiryDate: z.string().nullable(),
|
|
272
|
+
attachmentId: z.string().nullable(),
|
|
273
|
+
isPrimary: z.boolean(),
|
|
274
|
+
notes: z.string().nullable(),
|
|
275
|
+
createdAt: z.string(),
|
|
276
|
+
updatedAt: z.string(),
|
|
277
|
+
});
|
|
278
|
+
export const createCustomerPortalProfileDocumentSchema = z.object({
|
|
279
|
+
type: customerPortalProfileDocumentTypeSchema,
|
|
280
|
+
number: z.string().min(1).max(255).nullable().optional(),
|
|
281
|
+
issuingAuthority: z.string().max(255).nullable().optional(),
|
|
282
|
+
issuingCountry: z.string().max(255).nullable().optional(),
|
|
283
|
+
issueDate: z.string().date().nullable().optional(),
|
|
284
|
+
expiryDate: z.string().date().nullable().optional(),
|
|
285
|
+
attachmentId: z.string().max(1024).nullable().optional(),
|
|
286
|
+
isPrimary: z.boolean().optional(),
|
|
287
|
+
notes: z.string().max(2000).nullable().optional(),
|
|
288
|
+
});
|
|
289
|
+
export const updateCustomerPortalProfileDocumentSchema = createCustomerPortalProfileDocumentSchema
|
|
290
|
+
.partial()
|
|
291
|
+
.refine((value) => Object.keys(value).length > 0, {
|
|
292
|
+
message: "At least one field must be provided",
|
|
293
|
+
});
|
|
263
294
|
export const customerPortalContactExistsQuerySchema = z.object({
|
|
264
295
|
email: z.string().email(),
|
|
265
296
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/customer-portal",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
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.26.
|
|
38
|
-
"@voyantjs/core": "0.26.
|
|
39
|
-
"@voyantjs/crm": "0.26.
|
|
40
|
-
"@voyantjs/db": "0.26.
|
|
41
|
-
"@voyantjs/finance": "0.26.
|
|
42
|
-
"@voyantjs/hono": "0.26.
|
|
43
|
-
"@voyantjs/identity": "0.26.
|
|
44
|
-
"@voyantjs/legal": "0.26.
|
|
45
|
-
"@voyantjs/utils": "0.26.
|
|
37
|
+
"@voyantjs/bookings": "0.26.2",
|
|
38
|
+
"@voyantjs/core": "0.26.2",
|
|
39
|
+
"@voyantjs/crm": "0.26.2",
|
|
40
|
+
"@voyantjs/db": "0.26.2",
|
|
41
|
+
"@voyantjs/finance": "0.26.2",
|
|
42
|
+
"@voyantjs/hono": "0.26.2",
|
|
43
|
+
"@voyantjs/identity": "0.26.2",
|
|
44
|
+
"@voyantjs/legal": "0.26.2",
|
|
45
|
+
"@voyantjs/utils": "0.26.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"typescript": "^6.0.2",
|