@voyantjs/crm 0.28.1 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routes/accounts.d.ts +2 -2
- package/dist/routes/activities.d.ts +4 -4
- package/dist/routes/custom-fields.d.ts +4 -4
- package/dist/routes/index.d.ts +20 -20
- package/dist/routes/person-relationships.d.ts +8 -8
- package/dist/routes/pipelines.d.ts +2 -2
- package/dist/schema-accounts.d.ts +2 -2
- package/dist/schema-activities.d.ts +2 -2
- package/dist/service/accounts-organizations.d.ts +1 -1
- package/dist/service/accounts-organizations.d.ts.map +1 -1
- package/dist/service/accounts-organizations.js +19 -2
- package/dist/service/accounts-people.d.ts +1 -1
- package/dist/service/accounts-people.d.ts.map +1 -1
- package/dist/service/accounts-people.js +18 -2
- package/dist/service/accounts.d.ts +2 -2
- package/dist/service/activities.d.ts +4 -4
- package/dist/service/custom-fields.d.ts +4 -4
- package/dist/service/index.d.ts +29 -29
- package/dist/service/person-relationships.d.ts +12 -12
- package/dist/service/pipelines.d.ts +2 -2
- package/dist/validation.d.ts +97 -51
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +30 -6
- package/package.json +6 -6
package/dist/validation.d.ts
CHANGED
|
@@ -53,8 +53,8 @@ export declare const activityTypeSchema: z.ZodEnum<{
|
|
|
53
53
|
}>;
|
|
54
54
|
export declare const activityStatusSchema: z.ZodEnum<{
|
|
55
55
|
done: "done";
|
|
56
|
-
planned: "planned";
|
|
57
56
|
cancelled: "cancelled";
|
|
57
|
+
planned: "planned";
|
|
58
58
|
}>;
|
|
59
59
|
export declare const participantRoleSchema: z.ZodEnum<{
|
|
60
60
|
other: "other";
|
|
@@ -70,10 +70,10 @@ export declare const activityLinkRoleSchema: z.ZodEnum<{
|
|
|
70
70
|
export declare const customFieldTypeSchema: z.ZodEnum<{
|
|
71
71
|
boolean: "boolean";
|
|
72
72
|
json: "json";
|
|
73
|
+
text: "text";
|
|
73
74
|
date: "date";
|
|
74
75
|
set: "set";
|
|
75
76
|
enum: "enum";
|
|
76
|
-
text: "text";
|
|
77
77
|
phone: "phone";
|
|
78
78
|
varchar: "varchar";
|
|
79
79
|
double: "double";
|
|
@@ -158,6 +158,18 @@ export declare const updateOrganizationSchema: z.ZodObject<{
|
|
|
158
158
|
tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
159
159
|
notes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
160
160
|
}, z.core.$strip>;
|
|
161
|
+
export declare const organizationListSortFieldSchema: z.ZodEnum<{
|
|
162
|
+
relation: "relation";
|
|
163
|
+
name: "name";
|
|
164
|
+
createdAt: "createdAt";
|
|
165
|
+
updatedAt: "updatedAt";
|
|
166
|
+
status: "status";
|
|
167
|
+
industry: "industry";
|
|
168
|
+
}>;
|
|
169
|
+
export declare const organizationListSortDirSchema: z.ZodEnum<{
|
|
170
|
+
asc: "asc";
|
|
171
|
+
desc: "desc";
|
|
172
|
+
}>;
|
|
161
173
|
export declare const organizationListQuerySchema: z.ZodObject<{
|
|
162
174
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
163
175
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -174,6 +186,18 @@ export declare const organizationListQuerySchema: z.ZodObject<{
|
|
|
174
186
|
archived: "archived";
|
|
175
187
|
}>>;
|
|
176
188
|
search: z.ZodOptional<z.ZodString>;
|
|
189
|
+
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
190
|
+
relation: "relation";
|
|
191
|
+
name: "name";
|
|
192
|
+
createdAt: "createdAt";
|
|
193
|
+
updatedAt: "updatedAt";
|
|
194
|
+
status: "status";
|
|
195
|
+
industry: "industry";
|
|
196
|
+
}>>;
|
|
197
|
+
sortDir: z.ZodDefault<z.ZodEnum<{
|
|
198
|
+
asc: "asc";
|
|
199
|
+
desc: "desc";
|
|
200
|
+
}>>;
|
|
177
201
|
}, z.core.$strip>;
|
|
178
202
|
export declare const personCoreSchema: z.ZodObject<{
|
|
179
203
|
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -205,18 +229,18 @@ export declare const personCoreSchema: z.ZodObject<{
|
|
|
205
229
|
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
206
230
|
birthday: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
231
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
208
|
-
accessibilityEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
232
|
+
accessibilityEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
209
233
|
enc: z.ZodString;
|
|
210
|
-
}, z.core.$strip
|
|
211
|
-
dietaryEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
234
|
+
}, z.core.$strip>>>>;
|
|
235
|
+
dietaryEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
212
236
|
enc: z.ZodString;
|
|
213
|
-
}, z.core.$strip
|
|
214
|
-
loyaltyEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
237
|
+
}, z.core.$strip>>>>;
|
|
238
|
+
loyaltyEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
215
239
|
enc: z.ZodString;
|
|
216
|
-
}, z.core.$strip
|
|
217
|
-
insuranceEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
240
|
+
}, z.core.$strip>>>>;
|
|
241
|
+
insuranceEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
218
242
|
enc: z.ZodString;
|
|
219
|
-
}, z.core.$strip
|
|
243
|
+
}, z.core.$strip>>>>;
|
|
220
244
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
221
245
|
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
222
246
|
website: z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -251,18 +275,18 @@ export declare const insertPersonSchema: z.ZodObject<{
|
|
|
251
275
|
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
252
276
|
birthday: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
253
277
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
254
|
-
accessibilityEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
278
|
+
accessibilityEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
255
279
|
enc: z.ZodString;
|
|
256
|
-
}, z.core.$strip
|
|
257
|
-
dietaryEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
280
|
+
}, z.core.$strip>>>>;
|
|
281
|
+
dietaryEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
258
282
|
enc: z.ZodString;
|
|
259
|
-
}, z.core.$strip
|
|
260
|
-
loyaltyEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
283
|
+
}, z.core.$strip>>>>;
|
|
284
|
+
loyaltyEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
261
285
|
enc: z.ZodString;
|
|
262
|
-
}, z.core.$strip
|
|
263
|
-
insuranceEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
286
|
+
}, z.core.$strip>>>>;
|
|
287
|
+
insuranceEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
264
288
|
enc: z.ZodString;
|
|
265
|
-
}, z.core.$strip
|
|
289
|
+
}, z.core.$strip>>>>;
|
|
266
290
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
291
|
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
292
|
website: z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -297,22 +321,33 @@ export declare const updatePersonSchema: z.ZodObject<{
|
|
|
297
321
|
tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
298
322
|
birthday: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
299
323
|
notes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
300
|
-
accessibilityEncrypted: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
324
|
+
accessibilityEncrypted: z.ZodOptional<z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
301
325
|
enc: z.ZodString;
|
|
302
|
-
}, z.core.$strip
|
|
303
|
-
dietaryEncrypted: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
326
|
+
}, z.core.$strip>>>>>;
|
|
327
|
+
dietaryEncrypted: z.ZodOptional<z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
304
328
|
enc: z.ZodString;
|
|
305
|
-
}, z.core.$strip
|
|
306
|
-
loyaltyEncrypted: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
329
|
+
}, z.core.$strip>>>>>;
|
|
330
|
+
loyaltyEncrypted: z.ZodOptional<z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
307
331
|
enc: z.ZodString;
|
|
308
|
-
}, z.core.$strip
|
|
309
|
-
insuranceEncrypted: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
332
|
+
}, z.core.$strip>>>>>;
|
|
333
|
+
insuranceEncrypted: z.ZodOptional<z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
310
334
|
enc: z.ZodString;
|
|
311
|
-
}, z.core.$strip
|
|
335
|
+
}, z.core.$strip>>>>>;
|
|
312
336
|
email: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
313
337
|
phone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
314
338
|
website: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>>;
|
|
315
339
|
}, z.core.$strip>;
|
|
340
|
+
export declare const personListSortFieldSchema: z.ZodEnum<{
|
|
341
|
+
relation: "relation";
|
|
342
|
+
name: "name";
|
|
343
|
+
createdAt: "createdAt";
|
|
344
|
+
updatedAt: "updatedAt";
|
|
345
|
+
status: "status";
|
|
346
|
+
}>;
|
|
347
|
+
export declare const personListSortDirSchema: z.ZodEnum<{
|
|
348
|
+
asc: "asc";
|
|
349
|
+
desc: "desc";
|
|
350
|
+
}>;
|
|
316
351
|
export declare const personListQuerySchema: z.ZodObject<{
|
|
317
352
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
318
353
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -330,6 +365,17 @@ export declare const personListQuerySchema: z.ZodObject<{
|
|
|
330
365
|
archived: "archived";
|
|
331
366
|
}>>;
|
|
332
367
|
search: z.ZodOptional<z.ZodString>;
|
|
368
|
+
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
369
|
+
relation: "relation";
|
|
370
|
+
name: "name";
|
|
371
|
+
createdAt: "createdAt";
|
|
372
|
+
updatedAt: "updatedAt";
|
|
373
|
+
status: "status";
|
|
374
|
+
}>>;
|
|
375
|
+
sortDir: z.ZodDefault<z.ZodEnum<{
|
|
376
|
+
asc: "asc";
|
|
377
|
+
desc: "desc";
|
|
378
|
+
}>>;
|
|
333
379
|
}, z.core.$strip>;
|
|
334
380
|
export declare const pipelineCoreSchema: z.ZodObject<{
|
|
335
381
|
entityType: z.ZodDefault<z.ZodEnum<{
|
|
@@ -626,8 +672,8 @@ export declare const activityCoreSchema: z.ZodObject<{
|
|
|
626
672
|
ownerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
627
673
|
status: z.ZodDefault<z.ZodEnum<{
|
|
628
674
|
done: "done";
|
|
629
|
-
planned: "planned";
|
|
630
675
|
cancelled: "cancelled";
|
|
676
|
+
planned: "planned";
|
|
631
677
|
}>>;
|
|
632
678
|
dueAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
633
679
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -647,8 +693,8 @@ export declare const insertActivitySchema: z.ZodObject<{
|
|
|
647
693
|
ownerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
648
694
|
status: z.ZodDefault<z.ZodEnum<{
|
|
649
695
|
done: "done";
|
|
650
|
-
planned: "planned";
|
|
651
696
|
cancelled: "cancelled";
|
|
697
|
+
planned: "planned";
|
|
652
698
|
}>>;
|
|
653
699
|
dueAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
654
700
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -668,8 +714,8 @@ export declare const updateActivitySchema: z.ZodObject<{
|
|
|
668
714
|
ownerId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
669
715
|
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
670
716
|
done: "done";
|
|
671
|
-
planned: "planned";
|
|
672
717
|
cancelled: "cancelled";
|
|
718
|
+
planned: "planned";
|
|
673
719
|
}>>>;
|
|
674
720
|
dueAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
675
721
|
completedAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -682,8 +728,8 @@ export declare const activityListQuerySchema: z.ZodObject<{
|
|
|
682
728
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
683
729
|
status: z.ZodOptional<z.ZodEnum<{
|
|
684
730
|
done: "done";
|
|
685
|
-
planned: "planned";
|
|
686
731
|
cancelled: "cancelled";
|
|
732
|
+
planned: "planned";
|
|
687
733
|
}>>;
|
|
688
734
|
type: z.ZodOptional<z.ZodEnum<{
|
|
689
735
|
email: "email";
|
|
@@ -734,10 +780,10 @@ export declare const customFieldDefinitionCoreSchema: z.ZodObject<{
|
|
|
734
780
|
fieldType: z.ZodEnum<{
|
|
735
781
|
boolean: "boolean";
|
|
736
782
|
json: "json";
|
|
783
|
+
text: "text";
|
|
737
784
|
date: "date";
|
|
738
785
|
set: "set";
|
|
739
786
|
enum: "enum";
|
|
740
|
-
text: "text";
|
|
741
787
|
phone: "phone";
|
|
742
788
|
varchar: "varchar";
|
|
743
789
|
double: "double";
|
|
@@ -764,10 +810,10 @@ export declare const insertCustomFieldDefinitionSchema: z.ZodObject<{
|
|
|
764
810
|
fieldType: z.ZodEnum<{
|
|
765
811
|
boolean: "boolean";
|
|
766
812
|
json: "json";
|
|
813
|
+
text: "text";
|
|
767
814
|
date: "date";
|
|
768
815
|
set: "set";
|
|
769
816
|
enum: "enum";
|
|
770
|
-
text: "text";
|
|
771
817
|
phone: "phone";
|
|
772
818
|
varchar: "varchar";
|
|
773
819
|
double: "double";
|
|
@@ -794,10 +840,10 @@ export declare const updateCustomFieldDefinitionSchema: z.ZodObject<{
|
|
|
794
840
|
fieldType: z.ZodOptional<z.ZodEnum<{
|
|
795
841
|
boolean: "boolean";
|
|
796
842
|
json: "json";
|
|
843
|
+
text: "text";
|
|
797
844
|
date: "date";
|
|
798
845
|
set: "set";
|
|
799
846
|
enum: "enum";
|
|
800
|
-
text: "text";
|
|
801
847
|
phone: "phone";
|
|
802
848
|
varchar: "varchar";
|
|
803
849
|
double: "double";
|
|
@@ -867,9 +913,9 @@ export declare const personDocumentCoreSchema: z.ZodObject<{
|
|
|
867
913
|
id_card: "id_card";
|
|
868
914
|
driver_license: "driver_license";
|
|
869
915
|
}>;
|
|
870
|
-
numberEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
916
|
+
numberEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
871
917
|
enc: z.ZodString;
|
|
872
|
-
}, z.core.$strip
|
|
918
|
+
}, z.core.$strip>>>>;
|
|
873
919
|
issuingAuthority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
874
920
|
issuingCountry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
875
921
|
issueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -887,9 +933,9 @@ export declare const insertPersonDocumentSchema: z.ZodObject<{
|
|
|
887
933
|
id_card: "id_card";
|
|
888
934
|
driver_license: "driver_license";
|
|
889
935
|
}>;
|
|
890
|
-
numberEncrypted: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
936
|
+
numberEncrypted: z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
891
937
|
enc: z.ZodString;
|
|
892
|
-
}, z.core.$strip
|
|
938
|
+
}, z.core.$strip>>>>;
|
|
893
939
|
issuingAuthority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
894
940
|
issuingCountry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
895
941
|
issueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -907,9 +953,9 @@ export declare const updatePersonDocumentSchema: z.ZodObject<{
|
|
|
907
953
|
id_card: "id_card";
|
|
908
954
|
driver_license: "driver_license";
|
|
909
955
|
}>>;
|
|
910
|
-
numberEncrypted: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
956
|
+
numberEncrypted: z.ZodOptional<z.ZodOptional<z.ZodLazy<z.ZodNullable<z.ZodObject<{
|
|
911
957
|
enc: z.ZodString;
|
|
912
|
-
}, z.core.$strip
|
|
958
|
+
}, z.core.$strip>>>>>;
|
|
913
959
|
issuingAuthority: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
914
960
|
issuingCountry: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
915
961
|
issueDate: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -1126,10 +1172,10 @@ export type CustomerSignalListQueryInput = z.infer<typeof customerSignalListQuer
|
|
|
1126
1172
|
export type ResolveCustomerSignalInput = z.infer<typeof resolveCustomerSignalSchema>;
|
|
1127
1173
|
export declare const personRelationshipKindSchema: z.ZodEnum<{
|
|
1128
1174
|
partner: "partner";
|
|
1129
|
-
other: "other";
|
|
1130
|
-
spouse: "spouse";
|
|
1131
1175
|
parent: "parent";
|
|
1132
1176
|
child: "child";
|
|
1177
|
+
other: "other";
|
|
1178
|
+
spouse: "spouse";
|
|
1133
1179
|
sibling: "sibling";
|
|
1134
1180
|
guardian: "guardian";
|
|
1135
1181
|
ward: "ward";
|
|
@@ -1141,10 +1187,10 @@ export declare const insertPersonRelationshipSchema: z.ZodObject<{
|
|
|
1141
1187
|
toPersonId: z.ZodString;
|
|
1142
1188
|
kind: z.ZodEnum<{
|
|
1143
1189
|
partner: "partner";
|
|
1144
|
-
other: "other";
|
|
1145
|
-
spouse: "spouse";
|
|
1146
1190
|
parent: "parent";
|
|
1147
1191
|
child: "child";
|
|
1192
|
+
other: "other";
|
|
1193
|
+
spouse: "spouse";
|
|
1148
1194
|
sibling: "sibling";
|
|
1149
1195
|
guardian: "guardian";
|
|
1150
1196
|
ward: "ward";
|
|
@@ -1154,10 +1200,10 @@ export declare const insertPersonRelationshipSchema: z.ZodObject<{
|
|
|
1154
1200
|
}>;
|
|
1155
1201
|
inverseKind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1156
1202
|
partner: "partner";
|
|
1157
|
-
other: "other";
|
|
1158
|
-
spouse: "spouse";
|
|
1159
1203
|
parent: "parent";
|
|
1160
1204
|
child: "child";
|
|
1205
|
+
other: "other";
|
|
1206
|
+
spouse: "spouse";
|
|
1161
1207
|
sibling: "sibling";
|
|
1162
1208
|
guardian: "guardian";
|
|
1163
1209
|
ward: "ward";
|
|
@@ -1179,10 +1225,10 @@ export declare const updatePersonRelationshipSchema: z.ZodObject<{
|
|
|
1179
1225
|
notes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1180
1226
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
1181
1227
|
partner: "partner";
|
|
1182
|
-
other: "other";
|
|
1183
|
-
spouse: "spouse";
|
|
1184
1228
|
parent: "parent";
|
|
1185
1229
|
child: "child";
|
|
1230
|
+
other: "other";
|
|
1231
|
+
spouse: "spouse";
|
|
1186
1232
|
sibling: "sibling";
|
|
1187
1233
|
guardian: "guardian";
|
|
1188
1234
|
ward: "ward";
|
|
@@ -1193,10 +1239,10 @@ export declare const updatePersonRelationshipSchema: z.ZodObject<{
|
|
|
1193
1239
|
isPrimary: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1194
1240
|
inverseKind: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1195
1241
|
partner: "partner";
|
|
1196
|
-
other: "other";
|
|
1197
|
-
spouse: "spouse";
|
|
1198
1242
|
parent: "parent";
|
|
1199
1243
|
child: "child";
|
|
1244
|
+
other: "other";
|
|
1245
|
+
spouse: "spouse";
|
|
1200
1246
|
sibling: "sibling";
|
|
1201
1247
|
guardian: "guardian";
|
|
1202
1248
|
ward: "ward";
|
|
@@ -1210,10 +1256,10 @@ export declare const personRelationshipListQuerySchema: z.ZodObject<{
|
|
|
1210
1256
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1211
1257
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
1212
1258
|
partner: "partner";
|
|
1213
|
-
other: "other";
|
|
1214
|
-
spouse: "spouse";
|
|
1215
1259
|
parent: "parent";
|
|
1216
1260
|
child: "child";
|
|
1261
|
+
other: "other";
|
|
1262
|
+
spouse: "spouse";
|
|
1217
1263
|
sibling: "sibling";
|
|
1218
1264
|
guardian: "guardian";
|
|
1219
1265
|
ward: "ward";
|
package/dist/validation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,eAAO,MAAM,gBAAgB;;;;;;EAM3B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;EAA6C,CAAA;AAC5E,eAAO,MAAM,kBAAkB;;;;;EAAqD,CAAA;AACpF,eAAO,MAAM,0BAA0B;;;;;;;EAOrC,CAAA;AACF,eAAO,MAAM,4BAA4B;;;EAAkC,CAAA;AAC3E,eAAO,MAAM,uBAAuB;;;;;EAA8C,CAAA;AAClF,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAA;AACF,eAAO,MAAM,kBAAkB;;;;;;;EAAoE,CAAA;AACnG,eAAO,MAAM,oBAAoB;;;;EAA2C,CAAA;AAC5E,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAA;AACF,eAAO,MAAM,sBAAsB;;;EAAiC,CAAA;AACpE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAYhC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBjC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyB,CAAA;AAC9D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;iBAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,eAAO,MAAM,gBAAgB;;;;;;EAM3B,CAAA;AAEF,eAAO,MAAM,kBAAkB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@ export const organizationCoreSchema = z.object({
|
|
|
79
79
|
});
|
|
80
80
|
export const insertOrganizationSchema = organizationCoreSchema;
|
|
81
81
|
export const updateOrganizationSchema = organizationCoreSchema.partial();
|
|
82
|
+
export const organizationListSortFieldSchema = z.enum([
|
|
83
|
+
"name",
|
|
84
|
+
"industry",
|
|
85
|
+
"relation",
|
|
86
|
+
"status",
|
|
87
|
+
"createdAt",
|
|
88
|
+
"updatedAt",
|
|
89
|
+
]);
|
|
90
|
+
export const organizationListSortDirSchema = z.enum(["asc", "desc"]);
|
|
82
91
|
export const organizationListQuerySchema = paginationSchema.extend({
|
|
83
92
|
ownerId: z.string().optional(),
|
|
84
93
|
relation: relationTypeSchema.optional(),
|
|
85
94
|
status: recordStatusSchema.optional(),
|
|
86
95
|
search: z.string().optional(),
|
|
96
|
+
sortBy: organizationListSortFieldSchema.default("updatedAt"),
|
|
97
|
+
sortDir: organizationListSortDirSchema.default("desc"),
|
|
87
98
|
});
|
|
88
99
|
export const personCoreSchema = z.object({
|
|
89
100
|
organizationId: z.string().nullable().optional(),
|
|
@@ -102,11 +113,13 @@ export const personCoreSchema = z.object({
|
|
|
102
113
|
tags: z.array(z.string()).default([]),
|
|
103
114
|
birthday: z.string().date().nullable().optional(),
|
|
104
115
|
notes: z.string().nullable().optional(),
|
|
105
|
-
// Encrypted PII slots (canonical store; documents live in person_documents)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
// Encrypted PII slots (canonical store; documents live in person_documents).
|
|
117
|
+
// `z.lazy(() => …)` defers cross-package schema dereferencing until
|
|
118
|
+
// first parse — see #501 for the bundler chunk-init hazard otherwise.
|
|
119
|
+
accessibilityEncrypted: z.lazy(() => kmsEnvelopeSchema).optional(),
|
|
120
|
+
dietaryEncrypted: z.lazy(() => kmsEnvelopeSchema).optional(),
|
|
121
|
+
loyaltyEncrypted: z.lazy(() => kmsEnvelopeSchema).optional(),
|
|
122
|
+
insuranceEncrypted: z.lazy(() => kmsEnvelopeSchema).optional(),
|
|
110
123
|
// Inline identity fields — synced to identity module on create/update
|
|
111
124
|
email: z.string().email().nullable().optional(),
|
|
112
125
|
phone: z.string().nullable().optional(),
|
|
@@ -120,12 +133,22 @@ export const personCoreSchema = z.object({
|
|
|
120
133
|
});
|
|
121
134
|
export const insertPersonSchema = personCoreSchema;
|
|
122
135
|
export const updatePersonSchema = personCoreSchema.partial();
|
|
136
|
+
export const personListSortFieldSchema = z.enum([
|
|
137
|
+
"name",
|
|
138
|
+
"relation",
|
|
139
|
+
"status",
|
|
140
|
+
"createdAt",
|
|
141
|
+
"updatedAt",
|
|
142
|
+
]);
|
|
143
|
+
export const personListSortDirSchema = z.enum(["asc", "desc"]);
|
|
123
144
|
export const personListQuerySchema = paginationSchema.extend({
|
|
124
145
|
organizationId: z.string().optional(),
|
|
125
146
|
ownerId: z.string().optional(),
|
|
126
147
|
relation: relationTypeSchema.optional(),
|
|
127
148
|
status: recordStatusSchema.optional(),
|
|
128
149
|
search: z.string().optional(),
|
|
150
|
+
sortBy: personListSortFieldSchema.default("updatedAt"),
|
|
151
|
+
sortDir: personListSortDirSchema.default("desc"),
|
|
129
152
|
});
|
|
130
153
|
export const pipelineCoreSchema = z.object({
|
|
131
154
|
entityType: entityTypeSchema.default("opportunity"),
|
|
@@ -295,7 +318,8 @@ export const personDocumentTypeSchema = z.enum([
|
|
|
295
318
|
]);
|
|
296
319
|
export const personDocumentCoreSchema = z.object({
|
|
297
320
|
type: personDocumentTypeSchema,
|
|
298
|
-
|
|
321
|
+
// `z.lazy` for cross-package init-cycle protection — see #501.
|
|
322
|
+
numberEncrypted: z.lazy(() => kmsEnvelopeSchema).optional(),
|
|
299
323
|
issuingAuthority: z.string().nullable().optional(),
|
|
300
324
|
issuingCountry: z.string().nullable().optional(),
|
|
301
325
|
issueDate: z.string().date().nullable().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/crm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"drizzle-orm": "^0.45.2",
|
|
35
35
|
"hono": "^4.12.10",
|
|
36
36
|
"zod": "^4.3.6",
|
|
37
|
-
"@voyantjs/core": "0.
|
|
38
|
-
"@voyantjs/db": "0.
|
|
39
|
-
"@voyantjs/hono": "0.
|
|
40
|
-
"@voyantjs/identity": "0.
|
|
41
|
-
"@voyantjs/utils": "0.
|
|
37
|
+
"@voyantjs/core": "0.29.0",
|
|
38
|
+
"@voyantjs/db": "0.29.0",
|
|
39
|
+
"@voyantjs/hono": "0.29.0",
|
|
40
|
+
"@voyantjs/identity": "0.29.0",
|
|
41
|
+
"@voyantjs/utils": "0.29.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "^6.0.2",
|