@voyant-travel/relationships 0.119.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.
Files changed (96) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +36 -0
  3. package/dist/action-ledger-capabilities.d.ts +20 -0
  4. package/dist/action-ledger-capabilities.d.ts.map +1 -0
  5. package/dist/action-ledger-capabilities.js +16 -0
  6. package/dist/events.d.ts +23 -0
  7. package/dist/events.d.ts.map +1 -0
  8. package/dist/events.js +9 -0
  9. package/dist/index.d.ts +32 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +49 -0
  12. package/dist/route-runtime.d.ts +21 -0
  13. package/dist/route-runtime.d.ts.map +1 -0
  14. package/dist/route-runtime.js +28 -0
  15. package/dist/routes/accounts.d.ts +1460 -0
  16. package/dist/routes/accounts.d.ts.map +1 -0
  17. package/dist/routes/accounts.js +274 -0
  18. package/dist/routes/activities.d.ts +299 -0
  19. package/dist/routes/activities.d.ts.map +1 -0
  20. package/dist/routes/activities.js +64 -0
  21. package/dist/routes/custom-fields.d.ts +256 -0
  22. package/dist/routes/custom-fields.d.ts.map +1 -0
  23. package/dist/routes/custom-fields.js +47 -0
  24. package/dist/routes/customer-signals.d.ts +281 -0
  25. package/dist/routes/customer-signals.d.ts.map +1 -0
  26. package/dist/routes/customer-signals.js +45 -0
  27. package/dist/routes/index.d.ts +2945 -0
  28. package/dist/routes/index.d.ts.map +1 -0
  29. package/dist/routes/index.js +14 -0
  30. package/dist/routes/person-documents.d.ts +519 -0
  31. package/dist/routes/person-documents.d.ts.map +1 -0
  32. package/dist/routes/person-documents.js +240 -0
  33. package/dist/routes/person-relationships.d.ts +189 -0
  34. package/dist/routes/person-relationships.d.ts.map +1 -0
  35. package/dist/routes/person-relationships.js +36 -0
  36. package/dist/schema-accounts.d.ts +2099 -0
  37. package/dist/schema-accounts.d.ts.map +1 -0
  38. package/dist/schema-accounts.js +312 -0
  39. package/dist/schema-activities.d.ts +821 -0
  40. package/dist/schema-activities.d.ts.map +1 -0
  41. package/dist/schema-activities.js +92 -0
  42. package/dist/schema-relations.d.ts +47 -0
  43. package/dist/schema-relations.d.ts.map +1 -0
  44. package/dist/schema-relations.js +70 -0
  45. package/dist/schema-shared.d.ts +10 -0
  46. package/dist/schema-shared.d.ts.map +1 -0
  47. package/dist/schema-shared.js +36 -0
  48. package/dist/schema-signals.d.ts +324 -0
  49. package/dist/schema-signals.d.ts.map +1 -0
  50. package/dist/schema-signals.js +80 -0
  51. package/dist/schema.d.ts +6 -0
  52. package/dist/schema.d.ts.map +1 -0
  53. package/dist/schema.js +5 -0
  54. package/dist/service/accounts-merge.d.ts +63 -0
  55. package/dist/service/accounts-merge.d.ts.map +1 -0
  56. package/dist/service/accounts-merge.js +382 -0
  57. package/dist/service/accounts-organizations.d.ts +97 -0
  58. package/dist/service/accounts-organizations.d.ts.map +1 -0
  59. package/dist/service/accounts-organizations.js +70 -0
  60. package/dist/service/accounts-people.d.ts +1315 -0
  61. package/dist/service/accounts-people.d.ts.map +1 -0
  62. package/dist/service/accounts-people.js +409 -0
  63. package/dist/service/accounts-resolve.d.ts +76 -0
  64. package/dist/service/accounts-resolve.d.ts.map +1 -0
  65. package/dist/service/accounts-resolve.js +103 -0
  66. package/dist/service/accounts-shared.d.ts +68 -0
  67. package/dist/service/accounts-shared.d.ts.map +1 -0
  68. package/dist/service/accounts-shared.js +149 -0
  69. package/dist/service/accounts.d.ts +1465 -0
  70. package/dist/service/accounts.d.ts.map +1 -0
  71. package/dist/service/accounts.js +13 -0
  72. package/dist/service/activities.d.ts +486 -0
  73. package/dist/service/activities.d.ts.map +1 -0
  74. package/dist/service/activities.js +114 -0
  75. package/dist/service/custom-fields.d.ts +118 -0
  76. package/dist/service/custom-fields.d.ts.map +1 -0
  77. package/dist/service/custom-fields.js +88 -0
  78. package/dist/service/customer-signals.d.ts +733 -0
  79. package/dist/service/customer-signals.d.ts.map +1 -0
  80. package/dist/service/customer-signals.js +112 -0
  81. package/dist/service/helpers.d.ts +22 -0
  82. package/dist/service/helpers.d.ts.map +1 -0
  83. package/dist/service/helpers.js +39 -0
  84. package/dist/service/index.d.ts +4434 -0
  85. package/dist/service/index.d.ts.map +1 -0
  86. package/dist/service/index.js +17 -0
  87. package/dist/service/person-documents.d.ts +1201 -0
  88. package/dist/service/person-documents.d.ts.map +1 -0
  89. package/dist/service/person-documents.js +240 -0
  90. package/dist/service/person-relationships.d.ts +502 -0
  91. package/dist/service/person-relationships.d.ts.map +1 -0
  92. package/dist/service/person-relationships.js +121 -0
  93. package/dist/validation.d.ts +3 -0
  94. package/dist/validation.d.ts.map +1 -0
  95. package/dist/validation.js +1 -0
  96. package/package.json +80 -0
@@ -0,0 +1,1201 @@
1
+ import type { KeyRef, KmsProvider } from "@voyant-travel/utils";
2
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
+ import { z } from "zod";
4
+ import type { insertPersonDocumentSchema, personDocumentListQuerySchema, updatePersonDocumentSchema } from "../validation.js";
5
+ /**
6
+ * Canonical plaintext shape for free-text PII blobs encrypted as
7
+ * `accessibilityEncrypted` / `dietaryEncrypted` / `loyaltyEncrypted` /
8
+ * `insuranceEncrypted` on `relationships.people`. Wrapped so future fields can
9
+ * be added without breaking existing ciphertexts.
10
+ *
11
+ * Writers (customer-portal) and readers (crm + bookings snapshot)
12
+ * must use this shape — drift between sides means decryption fails
13
+ * silently and pre-fill stops working.
14
+ */
15
+ export declare const personPiiBlobPlaintextSchema: z.ZodObject<{
16
+ text: z.ZodString;
17
+ }, z.core.$strip>;
18
+ /**
19
+ * Canonical plaintext shape for `numberEncrypted` on
20
+ * `relationships.person_documents`. Same compatibility contract as
21
+ * `personPiiBlobPlaintextSchema`.
22
+ */
23
+ export declare const personDocumentNumberPlaintextSchema: z.ZodObject<{
24
+ number: z.ZodString;
25
+ }, z.core.$strip>;
26
+ /** Plaintext, mergeable snapshot derived from a person record. */
27
+ export interface PersonTravelSnapshot {
28
+ dateOfBirth: string | null;
29
+ dietaryRequirements: string | null;
30
+ accessibilityNeeds: string | null;
31
+ documentType: PersonDocumentType | null;
32
+ documentNumber: string | null;
33
+ documentExpiry: string | null;
34
+ documentIssuingCountry: string | null;
35
+ documentIssuingAuthority: string | null;
36
+ documentPersonDocumentId: string | null;
37
+ }
38
+ export type CreatePersonDocumentInput = z.infer<typeof insertPersonDocumentSchema>;
39
+ export type UpdatePersonDocumentInput = z.infer<typeof updatePersonDocumentSchema>;
40
+ export type PersonDocumentListQuery = z.infer<typeof personDocumentListQuerySchema>;
41
+ export type PersonDocumentType = CreatePersonDocumentInput["type"];
42
+ export declare const personDocumentsService: {
43
+ listPersonDocuments(db: PostgresJsDatabase, personId: string, query?: PersonDocumentListQuery): Omit<import("drizzle-orm/pg-core").PgSelectBase<"person_documents", {
44
+ id: import("drizzle-orm/pg-core").PgColumn<{
45
+ name: string;
46
+ tableName: "person_documents";
47
+ dataType: "string";
48
+ columnType: "PgText";
49
+ data: string;
50
+ driverParam: string;
51
+ notNull: true;
52
+ hasDefault: true;
53
+ isPrimaryKey: true;
54
+ isAutoincrement: false;
55
+ hasRuntimeDefault: true;
56
+ enumValues: [string, ...string[]];
57
+ baseColumn: never;
58
+ identity: undefined;
59
+ generated: undefined;
60
+ }, {}, {}>;
61
+ personId: import("drizzle-orm/pg-core").PgColumn<{
62
+ name: string;
63
+ tableName: "person_documents";
64
+ dataType: "string";
65
+ columnType: "PgText";
66
+ data: string;
67
+ driverParam: string;
68
+ notNull: true;
69
+ hasDefault: false;
70
+ isPrimaryKey: false;
71
+ isAutoincrement: false;
72
+ hasRuntimeDefault: false;
73
+ enumValues: [string, ...string[]];
74
+ baseColumn: never;
75
+ identity: undefined;
76
+ generated: undefined;
77
+ }, {}, {}>;
78
+ type: import("drizzle-orm/pg-core").PgColumn<{
79
+ name: "type";
80
+ tableName: "person_documents";
81
+ dataType: "string";
82
+ columnType: "PgEnumColumn";
83
+ data: "passport" | "visa" | "other" | "id_card" | "driver_license";
84
+ driverParam: string;
85
+ notNull: true;
86
+ hasDefault: false;
87
+ isPrimaryKey: false;
88
+ isAutoincrement: false;
89
+ hasRuntimeDefault: false;
90
+ enumValues: ["passport", "id_card", "driver_license", "visa", "other"];
91
+ baseColumn: never;
92
+ identity: undefined;
93
+ generated: undefined;
94
+ }, {}, {}>;
95
+ numberEncrypted: import("drizzle-orm/pg-core").PgColumn<{
96
+ name: "number_encrypted";
97
+ tableName: "person_documents";
98
+ dataType: "json";
99
+ columnType: "PgJsonb";
100
+ data: {
101
+ enc: string;
102
+ } | null;
103
+ driverParam: unknown;
104
+ notNull: false;
105
+ hasDefault: false;
106
+ isPrimaryKey: false;
107
+ isAutoincrement: false;
108
+ hasRuntimeDefault: false;
109
+ enumValues: undefined;
110
+ baseColumn: never;
111
+ identity: undefined;
112
+ generated: undefined;
113
+ }, {}, {
114
+ $type: {
115
+ enc: string;
116
+ } | null;
117
+ }>;
118
+ issuingAuthority: import("drizzle-orm/pg-core").PgColumn<{
119
+ name: "issuing_authority";
120
+ tableName: "person_documents";
121
+ dataType: "string";
122
+ columnType: "PgText";
123
+ data: string;
124
+ driverParam: string;
125
+ notNull: false;
126
+ hasDefault: false;
127
+ isPrimaryKey: false;
128
+ isAutoincrement: false;
129
+ hasRuntimeDefault: false;
130
+ enumValues: [string, ...string[]];
131
+ baseColumn: never;
132
+ identity: undefined;
133
+ generated: undefined;
134
+ }, {}, {}>;
135
+ issuingCountry: import("drizzle-orm/pg-core").PgColumn<{
136
+ name: "issuing_country";
137
+ tableName: "person_documents";
138
+ dataType: "string";
139
+ columnType: "PgText";
140
+ data: string;
141
+ driverParam: string;
142
+ notNull: false;
143
+ hasDefault: false;
144
+ isPrimaryKey: false;
145
+ isAutoincrement: false;
146
+ hasRuntimeDefault: false;
147
+ enumValues: [string, ...string[]];
148
+ baseColumn: never;
149
+ identity: undefined;
150
+ generated: undefined;
151
+ }, {}, {}>;
152
+ issueDate: import("drizzle-orm/pg-core").PgColumn<{
153
+ name: "issue_date";
154
+ tableName: "person_documents";
155
+ dataType: "string";
156
+ columnType: "PgDateString";
157
+ data: string;
158
+ driverParam: string;
159
+ notNull: false;
160
+ hasDefault: false;
161
+ isPrimaryKey: false;
162
+ isAutoincrement: false;
163
+ hasRuntimeDefault: false;
164
+ enumValues: undefined;
165
+ baseColumn: never;
166
+ identity: undefined;
167
+ generated: undefined;
168
+ }, {}, {}>;
169
+ expiryDate: import("drizzle-orm/pg-core").PgColumn<{
170
+ name: "expiry_date";
171
+ tableName: "person_documents";
172
+ dataType: "string";
173
+ columnType: "PgDateString";
174
+ data: string;
175
+ driverParam: string;
176
+ notNull: false;
177
+ hasDefault: false;
178
+ isPrimaryKey: false;
179
+ isAutoincrement: false;
180
+ hasRuntimeDefault: false;
181
+ enumValues: undefined;
182
+ baseColumn: never;
183
+ identity: undefined;
184
+ generated: undefined;
185
+ }, {}, {}>;
186
+ attachmentId: import("drizzle-orm/pg-core").PgColumn<{
187
+ name: "attachment_id";
188
+ tableName: "person_documents";
189
+ dataType: "string";
190
+ columnType: "PgText";
191
+ data: string;
192
+ driverParam: string;
193
+ notNull: false;
194
+ hasDefault: false;
195
+ isPrimaryKey: false;
196
+ isAutoincrement: false;
197
+ hasRuntimeDefault: false;
198
+ enumValues: [string, ...string[]];
199
+ baseColumn: never;
200
+ identity: undefined;
201
+ generated: undefined;
202
+ }, {}, {}>;
203
+ isPrimary: import("drizzle-orm/pg-core").PgColumn<{
204
+ name: "is_primary";
205
+ tableName: "person_documents";
206
+ dataType: "boolean";
207
+ columnType: "PgBoolean";
208
+ data: boolean;
209
+ driverParam: boolean;
210
+ notNull: true;
211
+ hasDefault: true;
212
+ isPrimaryKey: false;
213
+ isAutoincrement: false;
214
+ hasRuntimeDefault: false;
215
+ enumValues: undefined;
216
+ baseColumn: never;
217
+ identity: undefined;
218
+ generated: undefined;
219
+ }, {}, {}>;
220
+ notes: import("drizzle-orm/pg-core").PgColumn<{
221
+ name: "notes";
222
+ tableName: "person_documents";
223
+ dataType: "string";
224
+ columnType: "PgText";
225
+ data: string;
226
+ driverParam: string;
227
+ notNull: false;
228
+ hasDefault: false;
229
+ isPrimaryKey: false;
230
+ isAutoincrement: false;
231
+ hasRuntimeDefault: false;
232
+ enumValues: [string, ...string[]];
233
+ baseColumn: never;
234
+ identity: undefined;
235
+ generated: undefined;
236
+ }, {}, {}>;
237
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
238
+ name: "metadata";
239
+ tableName: "person_documents";
240
+ dataType: "json";
241
+ columnType: "PgJsonb";
242
+ data: Record<string, unknown>;
243
+ driverParam: unknown;
244
+ notNull: false;
245
+ hasDefault: false;
246
+ isPrimaryKey: false;
247
+ isAutoincrement: false;
248
+ hasRuntimeDefault: false;
249
+ enumValues: undefined;
250
+ baseColumn: never;
251
+ identity: undefined;
252
+ generated: undefined;
253
+ }, {}, {
254
+ $type: Record<string, unknown>;
255
+ }>;
256
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
257
+ name: "created_at";
258
+ tableName: "person_documents";
259
+ dataType: "date";
260
+ columnType: "PgTimestamp";
261
+ data: Date;
262
+ driverParam: string;
263
+ notNull: true;
264
+ hasDefault: true;
265
+ isPrimaryKey: false;
266
+ isAutoincrement: false;
267
+ hasRuntimeDefault: false;
268
+ enumValues: undefined;
269
+ baseColumn: never;
270
+ identity: undefined;
271
+ generated: undefined;
272
+ }, {}, {}>;
273
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
274
+ name: "updated_at";
275
+ tableName: "person_documents";
276
+ dataType: "date";
277
+ columnType: "PgTimestamp";
278
+ data: Date;
279
+ driverParam: string;
280
+ notNull: true;
281
+ hasDefault: true;
282
+ isPrimaryKey: false;
283
+ isAutoincrement: false;
284
+ hasRuntimeDefault: false;
285
+ enumValues: undefined;
286
+ baseColumn: never;
287
+ identity: undefined;
288
+ generated: undefined;
289
+ }, {}, {}>;
290
+ }, "single", Record<"person_documents", "not-null">, false, "where" | "orderBy" | "limit" | "offset", {
291
+ id: string;
292
+ personId: string;
293
+ type: "passport" | "visa" | "other" | "id_card" | "driver_license";
294
+ numberEncrypted: {
295
+ enc: string;
296
+ } | null;
297
+ issuingAuthority: string | null;
298
+ issuingCountry: string | null;
299
+ issueDate: string | null;
300
+ expiryDate: string | null;
301
+ attachmentId: string | null;
302
+ isPrimary: boolean;
303
+ notes: string | null;
304
+ metadata: Record<string, unknown> | null;
305
+ createdAt: Date;
306
+ updatedAt: Date;
307
+ }[], {
308
+ id: import("drizzle-orm/pg-core").PgColumn<{
309
+ name: string;
310
+ tableName: "person_documents";
311
+ dataType: "string";
312
+ columnType: "PgText";
313
+ data: string;
314
+ driverParam: string;
315
+ notNull: true;
316
+ hasDefault: true;
317
+ isPrimaryKey: true;
318
+ isAutoincrement: false;
319
+ hasRuntimeDefault: true;
320
+ enumValues: [string, ...string[]];
321
+ baseColumn: never;
322
+ identity: undefined;
323
+ generated: undefined;
324
+ }, {}, {}>;
325
+ personId: import("drizzle-orm/pg-core").PgColumn<{
326
+ name: string;
327
+ tableName: "person_documents";
328
+ dataType: "string";
329
+ columnType: "PgText";
330
+ data: string;
331
+ driverParam: string;
332
+ notNull: true;
333
+ hasDefault: false;
334
+ isPrimaryKey: false;
335
+ isAutoincrement: false;
336
+ hasRuntimeDefault: false;
337
+ enumValues: [string, ...string[]];
338
+ baseColumn: never;
339
+ identity: undefined;
340
+ generated: undefined;
341
+ }, {}, {}>;
342
+ type: import("drizzle-orm/pg-core").PgColumn<{
343
+ name: "type";
344
+ tableName: "person_documents";
345
+ dataType: "string";
346
+ columnType: "PgEnumColumn";
347
+ data: "passport" | "visa" | "other" | "id_card" | "driver_license";
348
+ driverParam: string;
349
+ notNull: true;
350
+ hasDefault: false;
351
+ isPrimaryKey: false;
352
+ isAutoincrement: false;
353
+ hasRuntimeDefault: false;
354
+ enumValues: ["passport", "id_card", "driver_license", "visa", "other"];
355
+ baseColumn: never;
356
+ identity: undefined;
357
+ generated: undefined;
358
+ }, {}, {}>;
359
+ numberEncrypted: import("drizzle-orm/pg-core").PgColumn<{
360
+ name: "number_encrypted";
361
+ tableName: "person_documents";
362
+ dataType: "json";
363
+ columnType: "PgJsonb";
364
+ data: {
365
+ enc: string;
366
+ } | null;
367
+ driverParam: unknown;
368
+ notNull: false;
369
+ hasDefault: false;
370
+ isPrimaryKey: false;
371
+ isAutoincrement: false;
372
+ hasRuntimeDefault: false;
373
+ enumValues: undefined;
374
+ baseColumn: never;
375
+ identity: undefined;
376
+ generated: undefined;
377
+ }, {}, {
378
+ $type: {
379
+ enc: string;
380
+ } | null;
381
+ }>;
382
+ issuingAuthority: import("drizzle-orm/pg-core").PgColumn<{
383
+ name: "issuing_authority";
384
+ tableName: "person_documents";
385
+ dataType: "string";
386
+ columnType: "PgText";
387
+ data: string;
388
+ driverParam: string;
389
+ notNull: false;
390
+ hasDefault: false;
391
+ isPrimaryKey: false;
392
+ isAutoincrement: false;
393
+ hasRuntimeDefault: false;
394
+ enumValues: [string, ...string[]];
395
+ baseColumn: never;
396
+ identity: undefined;
397
+ generated: undefined;
398
+ }, {}, {}>;
399
+ issuingCountry: import("drizzle-orm/pg-core").PgColumn<{
400
+ name: "issuing_country";
401
+ tableName: "person_documents";
402
+ dataType: "string";
403
+ columnType: "PgText";
404
+ data: string;
405
+ driverParam: string;
406
+ notNull: false;
407
+ hasDefault: false;
408
+ isPrimaryKey: false;
409
+ isAutoincrement: false;
410
+ hasRuntimeDefault: false;
411
+ enumValues: [string, ...string[]];
412
+ baseColumn: never;
413
+ identity: undefined;
414
+ generated: undefined;
415
+ }, {}, {}>;
416
+ issueDate: import("drizzle-orm/pg-core").PgColumn<{
417
+ name: "issue_date";
418
+ tableName: "person_documents";
419
+ dataType: "string";
420
+ columnType: "PgDateString";
421
+ data: string;
422
+ driverParam: string;
423
+ notNull: false;
424
+ hasDefault: false;
425
+ isPrimaryKey: false;
426
+ isAutoincrement: false;
427
+ hasRuntimeDefault: false;
428
+ enumValues: undefined;
429
+ baseColumn: never;
430
+ identity: undefined;
431
+ generated: undefined;
432
+ }, {}, {}>;
433
+ expiryDate: import("drizzle-orm/pg-core").PgColumn<{
434
+ name: "expiry_date";
435
+ tableName: "person_documents";
436
+ dataType: "string";
437
+ columnType: "PgDateString";
438
+ data: string;
439
+ driverParam: string;
440
+ notNull: false;
441
+ hasDefault: false;
442
+ isPrimaryKey: false;
443
+ isAutoincrement: false;
444
+ hasRuntimeDefault: false;
445
+ enumValues: undefined;
446
+ baseColumn: never;
447
+ identity: undefined;
448
+ generated: undefined;
449
+ }, {}, {}>;
450
+ attachmentId: import("drizzle-orm/pg-core").PgColumn<{
451
+ name: "attachment_id";
452
+ tableName: "person_documents";
453
+ dataType: "string";
454
+ columnType: "PgText";
455
+ data: string;
456
+ driverParam: string;
457
+ notNull: false;
458
+ hasDefault: false;
459
+ isPrimaryKey: false;
460
+ isAutoincrement: false;
461
+ hasRuntimeDefault: false;
462
+ enumValues: [string, ...string[]];
463
+ baseColumn: never;
464
+ identity: undefined;
465
+ generated: undefined;
466
+ }, {}, {}>;
467
+ isPrimary: import("drizzle-orm/pg-core").PgColumn<{
468
+ name: "is_primary";
469
+ tableName: "person_documents";
470
+ dataType: "boolean";
471
+ columnType: "PgBoolean";
472
+ data: boolean;
473
+ driverParam: boolean;
474
+ notNull: true;
475
+ hasDefault: true;
476
+ isPrimaryKey: false;
477
+ isAutoincrement: false;
478
+ hasRuntimeDefault: false;
479
+ enumValues: undefined;
480
+ baseColumn: never;
481
+ identity: undefined;
482
+ generated: undefined;
483
+ }, {}, {}>;
484
+ notes: import("drizzle-orm/pg-core").PgColumn<{
485
+ name: "notes";
486
+ tableName: "person_documents";
487
+ dataType: "string";
488
+ columnType: "PgText";
489
+ data: string;
490
+ driverParam: string;
491
+ notNull: false;
492
+ hasDefault: false;
493
+ isPrimaryKey: false;
494
+ isAutoincrement: false;
495
+ hasRuntimeDefault: false;
496
+ enumValues: [string, ...string[]];
497
+ baseColumn: never;
498
+ identity: undefined;
499
+ generated: undefined;
500
+ }, {}, {}>;
501
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
502
+ name: "metadata";
503
+ tableName: "person_documents";
504
+ dataType: "json";
505
+ columnType: "PgJsonb";
506
+ data: Record<string, unknown>;
507
+ driverParam: unknown;
508
+ notNull: false;
509
+ hasDefault: false;
510
+ isPrimaryKey: false;
511
+ isAutoincrement: false;
512
+ hasRuntimeDefault: false;
513
+ enumValues: undefined;
514
+ baseColumn: never;
515
+ identity: undefined;
516
+ generated: undefined;
517
+ }, {}, {
518
+ $type: Record<string, unknown>;
519
+ }>;
520
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
521
+ name: "created_at";
522
+ tableName: "person_documents";
523
+ dataType: "date";
524
+ columnType: "PgTimestamp";
525
+ data: Date;
526
+ driverParam: string;
527
+ notNull: true;
528
+ hasDefault: true;
529
+ isPrimaryKey: false;
530
+ isAutoincrement: false;
531
+ hasRuntimeDefault: false;
532
+ enumValues: undefined;
533
+ baseColumn: never;
534
+ identity: undefined;
535
+ generated: undefined;
536
+ }, {}, {}>;
537
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
538
+ name: "updated_at";
539
+ tableName: "person_documents";
540
+ dataType: "date";
541
+ columnType: "PgTimestamp";
542
+ data: Date;
543
+ driverParam: string;
544
+ notNull: true;
545
+ hasDefault: true;
546
+ isPrimaryKey: false;
547
+ isAutoincrement: false;
548
+ hasRuntimeDefault: false;
549
+ enumValues: undefined;
550
+ baseColumn: never;
551
+ identity: undefined;
552
+ generated: undefined;
553
+ }, {}, {}>;
554
+ }>, "where" | "orderBy" | "limit" | "offset">;
555
+ getPersonDocument(db: PostgresJsDatabase, documentId: string): Promise<{
556
+ id: string;
557
+ personId: string;
558
+ type: "passport" | "visa" | "other" | "id_card" | "driver_license";
559
+ numberEncrypted: {
560
+ enc: string;
561
+ } | null;
562
+ issuingAuthority: string | null;
563
+ issuingCountry: string | null;
564
+ issueDate: string | null;
565
+ expiryDate: string | null;
566
+ attachmentId: string | null;
567
+ isPrimary: boolean;
568
+ notes: string | null;
569
+ metadata: Record<string, unknown> | null;
570
+ createdAt: Date;
571
+ updatedAt: Date;
572
+ } | null>;
573
+ /**
574
+ * Decrypts the `numberEncrypted` slot for a single document and
575
+ * returns the plaintext. Returns `null` when the document has no
576
+ * encrypted number on file. Caller is responsible for authorization
577
+ * and audit-logging; this is just the KMS unwrap.
578
+ */
579
+ revealPersonDocumentNumber(db: PostgresJsDatabase, documentId: string, options: {
580
+ kms: KmsProvider;
581
+ keyRef?: KeyRef;
582
+ }): Promise<{
583
+ documentId: string;
584
+ number: string | null;
585
+ } | null>;
586
+ /**
587
+ * Returns the primary document of a given type for a person, or
588
+ * `null` if no primary is set.
589
+ */
590
+ getPrimaryPersonDocument(db: PostgresJsDatabase, personId: string, type: PersonDocumentType): Promise<{
591
+ id: string;
592
+ personId: string;
593
+ type: "passport" | "visa" | "other" | "id_card" | "driver_license";
594
+ numberEncrypted: {
595
+ enc: string;
596
+ } | null;
597
+ issuingAuthority: string | null;
598
+ issuingCountry: string | null;
599
+ issueDate: string | null;
600
+ expiryDate: string | null;
601
+ attachmentId: string | null;
602
+ isPrimary: boolean;
603
+ notes: string | null;
604
+ metadata: Record<string, unknown> | null;
605
+ createdAt: Date;
606
+ updatedAt: Date;
607
+ } | null>;
608
+ createPersonDocument(db: PostgresJsDatabase, personId: string, data: CreatePersonDocumentInput): Promise<{
609
+ type: "passport" | "visa" | "other" | "id_card" | "driver_license";
610
+ id: string;
611
+ createdAt: Date;
612
+ metadata: Record<string, unknown> | null;
613
+ issuingAuthority: string | null;
614
+ issuingCountry: string | null;
615
+ expiryDate: string | null;
616
+ issueDate: string | null;
617
+ notes: string | null;
618
+ updatedAt: Date;
619
+ isPrimary: boolean;
620
+ personId: string;
621
+ numberEncrypted: {
622
+ enc: string;
623
+ } | null;
624
+ attachmentId: string | null;
625
+ } | null>;
626
+ updatePersonDocument(db: PostgresJsDatabase, documentId: string, data: UpdatePersonDocumentInput): Promise<{
627
+ id: string;
628
+ personId: string;
629
+ type: "passport" | "visa" | "other" | "id_card" | "driver_license";
630
+ numberEncrypted: {
631
+ enc: string;
632
+ } | null;
633
+ issuingAuthority: string | null;
634
+ issuingCountry: string | null;
635
+ issueDate: string | null;
636
+ expiryDate: string | null;
637
+ attachmentId: string | null;
638
+ isPrimary: boolean;
639
+ notes: string | null;
640
+ metadata: Record<string, unknown> | null;
641
+ createdAt: Date;
642
+ updatedAt: Date;
643
+ } | null>;
644
+ deletePersonDocument(db: PostgresJsDatabase, documentId: string): Promise<{
645
+ id: string;
646
+ } | null>;
647
+ /**
648
+ * Atomically promotes a document to primary, demoting any prior
649
+ * primary of the same type for the same person.
650
+ */
651
+ setPrimaryPersonDocument(db: PostgresJsDatabase, documentId: string): Promise<{
652
+ id: string;
653
+ personId: string;
654
+ type: "passport" | "visa" | "other" | "id_card" | "driver_license";
655
+ numberEncrypted: {
656
+ enc: string;
657
+ } | null;
658
+ issuingAuthority: string | null;
659
+ issuingCountry: string | null;
660
+ issueDate: string | null;
661
+ expiryDate: string | null;
662
+ attachmentId: string | null;
663
+ isPrimary: boolean;
664
+ notes: string | null;
665
+ metadata: Record<string, unknown> | null;
666
+ createdAt: Date;
667
+ updatedAt: Date;
668
+ } | null>;
669
+ /**
670
+ * Plaintext snapshot of the fields a booking-traveler creation
671
+ * pulls from a person record: dietary, accessibility, primary identity
672
+ * document (type + number + expiry + country + authority + provenance id),
673
+ * and date-of-birth from `people.dateOfBirth`.
674
+ *
675
+ * Caller passes a KMS provider so decryption happens in-process.
676
+ * Missing person → returns null. Missing document or blob → that
677
+ * field returns null in the snapshot.
678
+ */
679
+ loadPersonTravelSnapshot(db: PostgresJsDatabase, personId: string, options: {
680
+ kms: KmsProvider;
681
+ keyRef?: KeyRef;
682
+ }): Promise<PersonTravelSnapshot | null>;
683
+ /**
684
+ * Documents whose `expiryDate` falls within the next `daysAhead`
685
+ * days. Used by the future `crm.detect-expiring-documents` cron;
686
+ * shipped now since the helper is free.
687
+ */
688
+ listExpiringPersonDocuments(db: PostgresJsDatabase, daysAhead?: number): Omit<import("drizzle-orm/pg-core").PgSelectBase<"person_documents", {
689
+ id: import("drizzle-orm/pg-core").PgColumn<{
690
+ name: string;
691
+ tableName: "person_documents";
692
+ dataType: "string";
693
+ columnType: "PgText";
694
+ data: string;
695
+ driverParam: string;
696
+ notNull: true;
697
+ hasDefault: true;
698
+ isPrimaryKey: true;
699
+ isAutoincrement: false;
700
+ hasRuntimeDefault: true;
701
+ enumValues: [string, ...string[]];
702
+ baseColumn: never;
703
+ identity: undefined;
704
+ generated: undefined;
705
+ }, {}, {}>;
706
+ personId: import("drizzle-orm/pg-core").PgColumn<{
707
+ name: string;
708
+ tableName: "person_documents";
709
+ dataType: "string";
710
+ columnType: "PgText";
711
+ data: string;
712
+ driverParam: string;
713
+ notNull: true;
714
+ hasDefault: false;
715
+ isPrimaryKey: false;
716
+ isAutoincrement: false;
717
+ hasRuntimeDefault: false;
718
+ enumValues: [string, ...string[]];
719
+ baseColumn: never;
720
+ identity: undefined;
721
+ generated: undefined;
722
+ }, {}, {}>;
723
+ type: import("drizzle-orm/pg-core").PgColumn<{
724
+ name: "type";
725
+ tableName: "person_documents";
726
+ dataType: "string";
727
+ columnType: "PgEnumColumn";
728
+ data: "passport" | "visa" | "other" | "id_card" | "driver_license";
729
+ driverParam: string;
730
+ notNull: true;
731
+ hasDefault: false;
732
+ isPrimaryKey: false;
733
+ isAutoincrement: false;
734
+ hasRuntimeDefault: false;
735
+ enumValues: ["passport", "id_card", "driver_license", "visa", "other"];
736
+ baseColumn: never;
737
+ identity: undefined;
738
+ generated: undefined;
739
+ }, {}, {}>;
740
+ numberEncrypted: import("drizzle-orm/pg-core").PgColumn<{
741
+ name: "number_encrypted";
742
+ tableName: "person_documents";
743
+ dataType: "json";
744
+ columnType: "PgJsonb";
745
+ data: {
746
+ enc: string;
747
+ } | null;
748
+ driverParam: unknown;
749
+ notNull: false;
750
+ hasDefault: false;
751
+ isPrimaryKey: false;
752
+ isAutoincrement: false;
753
+ hasRuntimeDefault: false;
754
+ enumValues: undefined;
755
+ baseColumn: never;
756
+ identity: undefined;
757
+ generated: undefined;
758
+ }, {}, {
759
+ $type: {
760
+ enc: string;
761
+ } | null;
762
+ }>;
763
+ issuingAuthority: import("drizzle-orm/pg-core").PgColumn<{
764
+ name: "issuing_authority";
765
+ tableName: "person_documents";
766
+ dataType: "string";
767
+ columnType: "PgText";
768
+ data: string;
769
+ driverParam: string;
770
+ notNull: false;
771
+ hasDefault: false;
772
+ isPrimaryKey: false;
773
+ isAutoincrement: false;
774
+ hasRuntimeDefault: false;
775
+ enumValues: [string, ...string[]];
776
+ baseColumn: never;
777
+ identity: undefined;
778
+ generated: undefined;
779
+ }, {}, {}>;
780
+ issuingCountry: import("drizzle-orm/pg-core").PgColumn<{
781
+ name: "issuing_country";
782
+ tableName: "person_documents";
783
+ dataType: "string";
784
+ columnType: "PgText";
785
+ data: string;
786
+ driverParam: string;
787
+ notNull: false;
788
+ hasDefault: false;
789
+ isPrimaryKey: false;
790
+ isAutoincrement: false;
791
+ hasRuntimeDefault: false;
792
+ enumValues: [string, ...string[]];
793
+ baseColumn: never;
794
+ identity: undefined;
795
+ generated: undefined;
796
+ }, {}, {}>;
797
+ issueDate: import("drizzle-orm/pg-core").PgColumn<{
798
+ name: "issue_date";
799
+ tableName: "person_documents";
800
+ dataType: "string";
801
+ columnType: "PgDateString";
802
+ data: string;
803
+ driverParam: string;
804
+ notNull: false;
805
+ hasDefault: false;
806
+ isPrimaryKey: false;
807
+ isAutoincrement: false;
808
+ hasRuntimeDefault: false;
809
+ enumValues: undefined;
810
+ baseColumn: never;
811
+ identity: undefined;
812
+ generated: undefined;
813
+ }, {}, {}>;
814
+ expiryDate: import("drizzle-orm/pg-core").PgColumn<{
815
+ name: "expiry_date";
816
+ tableName: "person_documents";
817
+ dataType: "string";
818
+ columnType: "PgDateString";
819
+ data: string;
820
+ driverParam: string;
821
+ notNull: false;
822
+ hasDefault: false;
823
+ isPrimaryKey: false;
824
+ isAutoincrement: false;
825
+ hasRuntimeDefault: false;
826
+ enumValues: undefined;
827
+ baseColumn: never;
828
+ identity: undefined;
829
+ generated: undefined;
830
+ }, {}, {}>;
831
+ attachmentId: import("drizzle-orm/pg-core").PgColumn<{
832
+ name: "attachment_id";
833
+ tableName: "person_documents";
834
+ dataType: "string";
835
+ columnType: "PgText";
836
+ data: string;
837
+ driverParam: string;
838
+ notNull: false;
839
+ hasDefault: false;
840
+ isPrimaryKey: false;
841
+ isAutoincrement: false;
842
+ hasRuntimeDefault: false;
843
+ enumValues: [string, ...string[]];
844
+ baseColumn: never;
845
+ identity: undefined;
846
+ generated: undefined;
847
+ }, {}, {}>;
848
+ isPrimary: import("drizzle-orm/pg-core").PgColumn<{
849
+ name: "is_primary";
850
+ tableName: "person_documents";
851
+ dataType: "boolean";
852
+ columnType: "PgBoolean";
853
+ data: boolean;
854
+ driverParam: boolean;
855
+ notNull: true;
856
+ hasDefault: true;
857
+ isPrimaryKey: false;
858
+ isAutoincrement: false;
859
+ hasRuntimeDefault: false;
860
+ enumValues: undefined;
861
+ baseColumn: never;
862
+ identity: undefined;
863
+ generated: undefined;
864
+ }, {}, {}>;
865
+ notes: import("drizzle-orm/pg-core").PgColumn<{
866
+ name: "notes";
867
+ tableName: "person_documents";
868
+ dataType: "string";
869
+ columnType: "PgText";
870
+ data: string;
871
+ driverParam: string;
872
+ notNull: false;
873
+ hasDefault: false;
874
+ isPrimaryKey: false;
875
+ isAutoincrement: false;
876
+ hasRuntimeDefault: false;
877
+ enumValues: [string, ...string[]];
878
+ baseColumn: never;
879
+ identity: undefined;
880
+ generated: undefined;
881
+ }, {}, {}>;
882
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
883
+ name: "metadata";
884
+ tableName: "person_documents";
885
+ dataType: "json";
886
+ columnType: "PgJsonb";
887
+ data: Record<string, unknown>;
888
+ driverParam: unknown;
889
+ notNull: false;
890
+ hasDefault: false;
891
+ isPrimaryKey: false;
892
+ isAutoincrement: false;
893
+ hasRuntimeDefault: false;
894
+ enumValues: undefined;
895
+ baseColumn: never;
896
+ identity: undefined;
897
+ generated: undefined;
898
+ }, {}, {
899
+ $type: Record<string, unknown>;
900
+ }>;
901
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
902
+ name: "created_at";
903
+ tableName: "person_documents";
904
+ dataType: "date";
905
+ columnType: "PgTimestamp";
906
+ data: Date;
907
+ driverParam: string;
908
+ notNull: true;
909
+ hasDefault: true;
910
+ isPrimaryKey: false;
911
+ isAutoincrement: false;
912
+ hasRuntimeDefault: false;
913
+ enumValues: undefined;
914
+ baseColumn: never;
915
+ identity: undefined;
916
+ generated: undefined;
917
+ }, {}, {}>;
918
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
919
+ name: "updated_at";
920
+ tableName: "person_documents";
921
+ dataType: "date";
922
+ columnType: "PgTimestamp";
923
+ data: Date;
924
+ driverParam: string;
925
+ notNull: true;
926
+ hasDefault: true;
927
+ isPrimaryKey: false;
928
+ isAutoincrement: false;
929
+ hasRuntimeDefault: false;
930
+ enumValues: undefined;
931
+ baseColumn: never;
932
+ identity: undefined;
933
+ generated: undefined;
934
+ }, {}, {}>;
935
+ }, "single", Record<"person_documents", "not-null">, false, "where" | "orderBy", {
936
+ id: string;
937
+ personId: string;
938
+ type: "passport" | "visa" | "other" | "id_card" | "driver_license";
939
+ numberEncrypted: {
940
+ enc: string;
941
+ } | null;
942
+ issuingAuthority: string | null;
943
+ issuingCountry: string | null;
944
+ issueDate: string | null;
945
+ expiryDate: string | null;
946
+ attachmentId: string | null;
947
+ isPrimary: boolean;
948
+ notes: string | null;
949
+ metadata: Record<string, unknown> | null;
950
+ createdAt: Date;
951
+ updatedAt: Date;
952
+ }[], {
953
+ id: import("drizzle-orm/pg-core").PgColumn<{
954
+ name: string;
955
+ tableName: "person_documents";
956
+ dataType: "string";
957
+ columnType: "PgText";
958
+ data: string;
959
+ driverParam: string;
960
+ notNull: true;
961
+ hasDefault: true;
962
+ isPrimaryKey: true;
963
+ isAutoincrement: false;
964
+ hasRuntimeDefault: true;
965
+ enumValues: [string, ...string[]];
966
+ baseColumn: never;
967
+ identity: undefined;
968
+ generated: undefined;
969
+ }, {}, {}>;
970
+ personId: import("drizzle-orm/pg-core").PgColumn<{
971
+ name: string;
972
+ tableName: "person_documents";
973
+ dataType: "string";
974
+ columnType: "PgText";
975
+ data: string;
976
+ driverParam: string;
977
+ notNull: true;
978
+ hasDefault: false;
979
+ isPrimaryKey: false;
980
+ isAutoincrement: false;
981
+ hasRuntimeDefault: false;
982
+ enumValues: [string, ...string[]];
983
+ baseColumn: never;
984
+ identity: undefined;
985
+ generated: undefined;
986
+ }, {}, {}>;
987
+ type: import("drizzle-orm/pg-core").PgColumn<{
988
+ name: "type";
989
+ tableName: "person_documents";
990
+ dataType: "string";
991
+ columnType: "PgEnumColumn";
992
+ data: "passport" | "visa" | "other" | "id_card" | "driver_license";
993
+ driverParam: string;
994
+ notNull: true;
995
+ hasDefault: false;
996
+ isPrimaryKey: false;
997
+ isAutoincrement: false;
998
+ hasRuntimeDefault: false;
999
+ enumValues: ["passport", "id_card", "driver_license", "visa", "other"];
1000
+ baseColumn: never;
1001
+ identity: undefined;
1002
+ generated: undefined;
1003
+ }, {}, {}>;
1004
+ numberEncrypted: import("drizzle-orm/pg-core").PgColumn<{
1005
+ name: "number_encrypted";
1006
+ tableName: "person_documents";
1007
+ dataType: "json";
1008
+ columnType: "PgJsonb";
1009
+ data: {
1010
+ enc: string;
1011
+ } | null;
1012
+ driverParam: unknown;
1013
+ notNull: false;
1014
+ hasDefault: false;
1015
+ isPrimaryKey: false;
1016
+ isAutoincrement: false;
1017
+ hasRuntimeDefault: false;
1018
+ enumValues: undefined;
1019
+ baseColumn: never;
1020
+ identity: undefined;
1021
+ generated: undefined;
1022
+ }, {}, {
1023
+ $type: {
1024
+ enc: string;
1025
+ } | null;
1026
+ }>;
1027
+ issuingAuthority: import("drizzle-orm/pg-core").PgColumn<{
1028
+ name: "issuing_authority";
1029
+ tableName: "person_documents";
1030
+ dataType: "string";
1031
+ columnType: "PgText";
1032
+ data: string;
1033
+ driverParam: string;
1034
+ notNull: false;
1035
+ hasDefault: false;
1036
+ isPrimaryKey: false;
1037
+ isAutoincrement: false;
1038
+ hasRuntimeDefault: false;
1039
+ enumValues: [string, ...string[]];
1040
+ baseColumn: never;
1041
+ identity: undefined;
1042
+ generated: undefined;
1043
+ }, {}, {}>;
1044
+ issuingCountry: import("drizzle-orm/pg-core").PgColumn<{
1045
+ name: "issuing_country";
1046
+ tableName: "person_documents";
1047
+ dataType: "string";
1048
+ columnType: "PgText";
1049
+ data: string;
1050
+ driverParam: string;
1051
+ notNull: false;
1052
+ hasDefault: false;
1053
+ isPrimaryKey: false;
1054
+ isAutoincrement: false;
1055
+ hasRuntimeDefault: false;
1056
+ enumValues: [string, ...string[]];
1057
+ baseColumn: never;
1058
+ identity: undefined;
1059
+ generated: undefined;
1060
+ }, {}, {}>;
1061
+ issueDate: import("drizzle-orm/pg-core").PgColumn<{
1062
+ name: "issue_date";
1063
+ tableName: "person_documents";
1064
+ dataType: "string";
1065
+ columnType: "PgDateString";
1066
+ data: string;
1067
+ driverParam: string;
1068
+ notNull: false;
1069
+ hasDefault: false;
1070
+ isPrimaryKey: false;
1071
+ isAutoincrement: false;
1072
+ hasRuntimeDefault: false;
1073
+ enumValues: undefined;
1074
+ baseColumn: never;
1075
+ identity: undefined;
1076
+ generated: undefined;
1077
+ }, {}, {}>;
1078
+ expiryDate: import("drizzle-orm/pg-core").PgColumn<{
1079
+ name: "expiry_date";
1080
+ tableName: "person_documents";
1081
+ dataType: "string";
1082
+ columnType: "PgDateString";
1083
+ data: string;
1084
+ driverParam: string;
1085
+ notNull: false;
1086
+ hasDefault: false;
1087
+ isPrimaryKey: false;
1088
+ isAutoincrement: false;
1089
+ hasRuntimeDefault: false;
1090
+ enumValues: undefined;
1091
+ baseColumn: never;
1092
+ identity: undefined;
1093
+ generated: undefined;
1094
+ }, {}, {}>;
1095
+ attachmentId: import("drizzle-orm/pg-core").PgColumn<{
1096
+ name: "attachment_id";
1097
+ tableName: "person_documents";
1098
+ dataType: "string";
1099
+ columnType: "PgText";
1100
+ data: string;
1101
+ driverParam: string;
1102
+ notNull: false;
1103
+ hasDefault: false;
1104
+ isPrimaryKey: false;
1105
+ isAutoincrement: false;
1106
+ hasRuntimeDefault: false;
1107
+ enumValues: [string, ...string[]];
1108
+ baseColumn: never;
1109
+ identity: undefined;
1110
+ generated: undefined;
1111
+ }, {}, {}>;
1112
+ isPrimary: import("drizzle-orm/pg-core").PgColumn<{
1113
+ name: "is_primary";
1114
+ tableName: "person_documents";
1115
+ dataType: "boolean";
1116
+ columnType: "PgBoolean";
1117
+ data: boolean;
1118
+ driverParam: boolean;
1119
+ notNull: true;
1120
+ hasDefault: true;
1121
+ isPrimaryKey: false;
1122
+ isAutoincrement: false;
1123
+ hasRuntimeDefault: false;
1124
+ enumValues: undefined;
1125
+ baseColumn: never;
1126
+ identity: undefined;
1127
+ generated: undefined;
1128
+ }, {}, {}>;
1129
+ notes: import("drizzle-orm/pg-core").PgColumn<{
1130
+ name: "notes";
1131
+ tableName: "person_documents";
1132
+ dataType: "string";
1133
+ columnType: "PgText";
1134
+ data: string;
1135
+ driverParam: string;
1136
+ notNull: false;
1137
+ hasDefault: false;
1138
+ isPrimaryKey: false;
1139
+ isAutoincrement: false;
1140
+ hasRuntimeDefault: false;
1141
+ enumValues: [string, ...string[]];
1142
+ baseColumn: never;
1143
+ identity: undefined;
1144
+ generated: undefined;
1145
+ }, {}, {}>;
1146
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
1147
+ name: "metadata";
1148
+ tableName: "person_documents";
1149
+ dataType: "json";
1150
+ columnType: "PgJsonb";
1151
+ data: Record<string, unknown>;
1152
+ driverParam: unknown;
1153
+ notNull: false;
1154
+ hasDefault: false;
1155
+ isPrimaryKey: false;
1156
+ isAutoincrement: false;
1157
+ hasRuntimeDefault: false;
1158
+ enumValues: undefined;
1159
+ baseColumn: never;
1160
+ identity: undefined;
1161
+ generated: undefined;
1162
+ }, {}, {
1163
+ $type: Record<string, unknown>;
1164
+ }>;
1165
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1166
+ name: "created_at";
1167
+ tableName: "person_documents";
1168
+ dataType: "date";
1169
+ columnType: "PgTimestamp";
1170
+ data: Date;
1171
+ driverParam: string;
1172
+ notNull: true;
1173
+ hasDefault: true;
1174
+ isPrimaryKey: false;
1175
+ isAutoincrement: false;
1176
+ hasRuntimeDefault: false;
1177
+ enumValues: undefined;
1178
+ baseColumn: never;
1179
+ identity: undefined;
1180
+ generated: undefined;
1181
+ }, {}, {}>;
1182
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
1183
+ name: "updated_at";
1184
+ tableName: "person_documents";
1185
+ dataType: "date";
1186
+ columnType: "PgTimestamp";
1187
+ data: Date;
1188
+ driverParam: string;
1189
+ notNull: true;
1190
+ hasDefault: true;
1191
+ isPrimaryKey: false;
1192
+ isAutoincrement: false;
1193
+ hasRuntimeDefault: false;
1194
+ enumValues: undefined;
1195
+ baseColumn: never;
1196
+ identity: undefined;
1197
+ generated: undefined;
1198
+ }, {}, {}>;
1199
+ }>, "where" | "orderBy">;
1200
+ };
1201
+ //# sourceMappingURL=person-documents.d.ts.map