@the-inkwell/shared 0.2.133 → 0.2.135

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.
@@ -467,160 +467,944 @@ export declare const AdminPersonSelectSchema: z.ZodObject<{
467
467
  out: {};
468
468
  in: {};
469
469
  }>;
470
- export declare const AdminPersonUpdateSchema: z.ZodObject<{
471
- id: z.ZodOptional<z.ZodUUID>;
472
- idNano: z.ZodOptional<z.ZodString>;
473
- emailIsVerified: z.ZodOptional<z.ZodBoolean>;
474
- firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
475
- lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
476
- linkedInUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
477
- phoneIsVerified: z.ZodOptional<z.ZodBoolean>;
478
- emailIsOptedOut: z.ZodOptional<z.ZodBoolean>;
479
- smsIsOptedOut: z.ZodOptional<z.ZodBoolean>;
480
- resumeUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
481
- resumeText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
482
- resumeData: z.ZodOptional<z.ZodNullable<z.ZodDate | z.ZodType<Buffer<ArrayBufferLike>, unknown> | z.ZodType<any, any> | z.ZodType<any, unknown>>>;
483
- photoUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
484
- isMember: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
485
- lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
486
- lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
487
- city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
488
- networksCommunities: z.ZodOptional<z.ZodNullable<z.ZodString>>;
489
- conferencesAttended: z.ZodOptional<z.ZodNullable<z.ZodString>>;
490
- whatsAppGroups: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
- otherCommunities: z.ZodOptional<z.ZodNullable<z.ZodString>>;
492
- state: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
493
- AL: "AL";
494
- AK: "AK";
495
- AS: "AS";
496
- AZ: "AZ";
497
- AR: "AR";
498
- CA: "CA";
499
- CO: "CO";
500
- CT: "CT";
501
- DE: "DE";
502
- DC: "DC";
503
- FM: "FM";
504
- FL: "FL";
505
- GA: "GA";
506
- GU: "GU";
507
- HI: "HI";
508
- ID: "ID";
509
- IL: "IL";
510
- IN: "IN";
511
- IA: "IA";
512
- KS: "KS";
513
- KY: "KY";
514
- LA: "LA";
515
- ME: "ME";
516
- MH: "MH";
517
- MD: "MD";
518
- MA: "MA";
519
- MI: "MI";
520
- MN: "MN";
521
- MS: "MS";
522
- MO: "MO";
523
- MT: "MT";
524
- NE: "NE";
525
- NV: "NV";
526
- NH: "NH";
527
- NJ: "NJ";
528
- NM: "NM";
529
- NY: "NY";
530
- NC: "NC";
531
- ND: "ND";
532
- MP: "MP";
533
- OH: "OH";
534
- OK: "OK";
535
- OR: "OR";
536
- PW: "PW";
537
- PA: "PA";
538
- PR: "PR";
539
- RI: "RI";
540
- SC: "SC";
541
- SD: "SD";
542
- TN: "TN";
543
- TX: "TX";
544
- UT: "UT";
545
- VT: "VT";
546
- VI: "VI";
547
- VA: "VA";
548
- WA: "WA";
549
- WV: "WV";
550
- WI: "WI";
551
- WY: "WY";
552
- AB: "AB";
553
- BC: "BC";
554
- MB: "MB";
555
- NB: "NB";
556
- NL: "NL";
557
- NS: "NS";
558
- NT: "NT";
559
- NU: "NU";
560
- ON: "ON";
561
- PE: "PE";
562
- QC: "QC";
563
- SK: "SK";
564
- YT: "YT";
565
- }>>>;
566
- postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
567
- country: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
568
- UNITED_STATES: "UNITED_STATES";
569
- CANADA: "CANADA";
570
- }>>>;
571
- additionalEmails: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
572
- additionalPhones: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
573
- source: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
574
- NETWORK: "NETWORK";
575
- WEBSITE: "WEBSITE";
576
- SOCIAL_MEDIA: "SOCIAL_MEDIA";
577
- SOURCED: "SOURCED";
578
- }>>>;
579
- sourcePersonId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
580
- sourceCampaignId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
581
- websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
582
- expectedSalary: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
583
- memberReasons: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
584
- REFER: "REFER";
585
- HIRE: "HIRE";
586
- APPLY: "APPLY";
587
- }>>>>;
588
- preferredEmploymentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
589
- FULL_TIME: "FULL_TIME";
590
- PART_TIME: "PART_TIME";
591
- }>>>;
592
- preferredEmploymentLocationType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
593
- REMOTE: "REMOTE";
594
- ONSITE: "ONSITE";
595
- HYBRID: "HYBRID";
596
- }>>>;
597
- preferredMessageChannel: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
598
- SMS: "SMS";
599
- EMAIL: "EMAIL";
600
- }>>>;
601
- isOpenToRelocate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
602
- gender: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
603
- MAN: "MAN";
604
- WOMAN: "WOMAN";
605
- NON_BINARY: "NON_BINARY";
606
- UNDISCLOSED: "UNDISCLOSED";
607
- }>>>;
608
- discoveredThrough: z.ZodOptional<z.ZodNullable<z.ZodString>>;
609
- deactivatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
610
- signedUpAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
611
- lastSignedInAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
612
- signInCount: z.ZodOptional<z.ZodInt>;
613
- clientId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
614
- deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
615
- createdAt: z.ZodOptional<z.ZodDate>;
616
- updatedAt: z.ZodOptional<z.ZodDate>;
470
+ export declare const AdminPersonUpdateSchema: import("drizzle-zod").BuildSchema<"update", {
471
+ id: import("drizzle-orm/pg-core").PgColumn<{
472
+ name: "id";
473
+ tableName: "persons";
474
+ dataType: "string";
475
+ columnType: "PgUUID";
476
+ data: string;
477
+ driverParam: string;
478
+ notNull: true;
479
+ hasDefault: true;
480
+ isPrimaryKey: true;
481
+ isAutoincrement: false;
482
+ hasRuntimeDefault: false;
483
+ enumValues: undefined;
484
+ baseColumn: never;
485
+ identity: undefined;
486
+ generated: undefined;
487
+ }, {}, {}>;
488
+ idNano: import("drizzle-orm/pg-core").PgColumn<{
489
+ name: "idNano";
490
+ tableName: "persons";
491
+ dataType: "string";
492
+ columnType: "PgText";
493
+ data: string;
494
+ driverParam: string;
495
+ notNull: true;
496
+ hasDefault: false;
497
+ isPrimaryKey: false;
498
+ isAutoincrement: false;
499
+ hasRuntimeDefault: false;
500
+ enumValues: [string, ...string[]];
501
+ baseColumn: never;
502
+ identity: undefined;
503
+ generated: undefined;
504
+ }, {}, {}>;
505
+ email: import("drizzle-orm/pg-core").PgColumn<{
506
+ name: "email";
507
+ tableName: "persons";
508
+ dataType: "string";
509
+ columnType: "PgText";
510
+ data: string;
511
+ driverParam: string;
512
+ notNull: true;
513
+ hasDefault: false;
514
+ isPrimaryKey: false;
515
+ isAutoincrement: false;
516
+ hasRuntimeDefault: false;
517
+ enumValues: [string, ...string[]];
518
+ baseColumn: never;
519
+ identity: undefined;
520
+ generated: undefined;
521
+ }, {}, {}>;
522
+ emailIsVerified: import("drizzle-orm/pg-core").PgColumn<{
523
+ name: "emailIsVerified";
524
+ tableName: "persons";
525
+ dataType: "boolean";
526
+ columnType: "PgBoolean";
527
+ data: boolean;
528
+ driverParam: boolean;
529
+ notNull: true;
530
+ hasDefault: true;
531
+ isPrimaryKey: false;
532
+ isAutoincrement: false;
533
+ hasRuntimeDefault: false;
534
+ enumValues: undefined;
535
+ baseColumn: never;
536
+ identity: undefined;
537
+ generated: undefined;
538
+ }, {}, {}>;
539
+ firstName: import("drizzle-orm/pg-core").PgColumn<{
540
+ name: "firstName";
541
+ tableName: "persons";
542
+ dataType: "string";
543
+ columnType: "PgText";
544
+ data: string;
545
+ driverParam: string;
546
+ notNull: false;
547
+ hasDefault: false;
548
+ isPrimaryKey: false;
549
+ isAutoincrement: false;
550
+ hasRuntimeDefault: false;
551
+ enumValues: [string, ...string[]];
552
+ baseColumn: never;
553
+ identity: undefined;
554
+ generated: undefined;
555
+ }, {}, {}>;
556
+ lastName: import("drizzle-orm/pg-core").PgColumn<{
557
+ name: "lastName";
558
+ tableName: "persons";
559
+ dataType: "string";
560
+ columnType: "PgText";
561
+ data: string;
562
+ driverParam: string;
563
+ notNull: false;
564
+ hasDefault: false;
565
+ isPrimaryKey: false;
566
+ isAutoincrement: false;
567
+ hasRuntimeDefault: false;
568
+ enumValues: [string, ...string[]];
569
+ baseColumn: never;
570
+ identity: undefined;
571
+ generated: undefined;
572
+ }, {}, {}>;
573
+ fullName: import("drizzle-orm/pg-core").PgColumn<{
574
+ name: "fullName";
575
+ tableName: "persons";
576
+ dataType: "string";
577
+ columnType: "PgText";
578
+ data: string;
579
+ driverParam: string;
580
+ notNull: false;
581
+ hasDefault: true;
582
+ isPrimaryKey: false;
583
+ isAutoincrement: false;
584
+ hasRuntimeDefault: false;
585
+ enumValues: [string, ...string[]];
586
+ baseColumn: never;
587
+ identity: undefined;
588
+ generated: {
589
+ type: "always";
590
+ };
591
+ }, {}, {}>;
592
+ linkedInUrl: import("drizzle-orm/pg-core").PgColumn<{
593
+ name: "linkedInUrl";
594
+ tableName: "persons";
595
+ dataType: "string";
596
+ columnType: "PgText";
597
+ data: string;
598
+ driverParam: string;
599
+ notNull: false;
600
+ hasDefault: false;
601
+ isPrimaryKey: false;
602
+ isAutoincrement: false;
603
+ hasRuntimeDefault: false;
604
+ enumValues: [string, ...string[]];
605
+ baseColumn: never;
606
+ identity: undefined;
607
+ generated: undefined;
608
+ }, {}, {}>;
609
+ phone: import("drizzle-orm/pg-core").PgColumn<{
610
+ name: "phone";
611
+ tableName: "persons";
612
+ dataType: "string";
613
+ columnType: "PgText";
614
+ data: string;
615
+ driverParam: string;
616
+ notNull: false;
617
+ hasDefault: false;
618
+ isPrimaryKey: false;
619
+ isAutoincrement: false;
620
+ hasRuntimeDefault: false;
621
+ enumValues: [string, ...string[]];
622
+ baseColumn: never;
623
+ identity: undefined;
624
+ generated: undefined;
625
+ }, {}, {}>;
626
+ phoneIsVerified: import("drizzle-orm/pg-core").PgColumn<{
627
+ name: "phoneIsVerified";
628
+ tableName: "persons";
629
+ dataType: "boolean";
630
+ columnType: "PgBoolean";
631
+ data: boolean;
632
+ driverParam: boolean;
633
+ notNull: true;
634
+ hasDefault: true;
635
+ isPrimaryKey: false;
636
+ isAutoincrement: false;
637
+ hasRuntimeDefault: false;
638
+ enumValues: undefined;
639
+ baseColumn: never;
640
+ identity: undefined;
641
+ generated: undefined;
642
+ }, {}, {}>;
643
+ emailIsOptedOut: import("drizzle-orm/pg-core").PgColumn<{
644
+ name: "emailIsOptedOut";
645
+ tableName: "persons";
646
+ dataType: "boolean";
647
+ columnType: "PgBoolean";
648
+ data: boolean;
649
+ driverParam: boolean;
650
+ notNull: true;
651
+ hasDefault: true;
652
+ isPrimaryKey: false;
653
+ isAutoincrement: false;
654
+ hasRuntimeDefault: false;
655
+ enumValues: undefined;
656
+ baseColumn: never;
657
+ identity: undefined;
658
+ generated: undefined;
659
+ }, {}, {}>;
660
+ smsIsOptedOut: import("drizzle-orm/pg-core").PgColumn<{
661
+ name: "smsIsOptedOut";
662
+ tableName: "persons";
663
+ dataType: "boolean";
664
+ columnType: "PgBoolean";
665
+ data: boolean;
666
+ driverParam: boolean;
667
+ notNull: true;
668
+ hasDefault: true;
669
+ isPrimaryKey: false;
670
+ isAutoincrement: false;
671
+ hasRuntimeDefault: false;
672
+ enumValues: undefined;
673
+ baseColumn: never;
674
+ identity: undefined;
675
+ generated: undefined;
676
+ }, {}, {}>;
677
+ resumeUri: import("drizzle-orm/pg-core").PgColumn<{
678
+ name: "resumeUri";
679
+ tableName: "persons";
680
+ dataType: "string";
681
+ columnType: "PgText";
682
+ data: string;
683
+ driverParam: string;
684
+ notNull: false;
685
+ hasDefault: false;
686
+ isPrimaryKey: false;
687
+ isAutoincrement: false;
688
+ hasRuntimeDefault: false;
689
+ enumValues: [string, ...string[]];
690
+ baseColumn: never;
691
+ identity: undefined;
692
+ generated: undefined;
693
+ }, {}, {}>;
694
+ resumeText: import("drizzle-orm/pg-core").PgColumn<{
695
+ name: "resumeText";
696
+ tableName: "persons";
697
+ dataType: "string";
698
+ columnType: "PgText";
699
+ data: string;
700
+ driverParam: string;
701
+ notNull: false;
702
+ hasDefault: false;
703
+ isPrimaryKey: false;
704
+ isAutoincrement: false;
705
+ hasRuntimeDefault: false;
706
+ enumValues: [string, ...string[]];
707
+ baseColumn: never;
708
+ identity: undefined;
709
+ generated: undefined;
710
+ }, {}, {}>;
711
+ resumeData: import("drizzle-orm/pg-core").PgColumn<{
712
+ name: "resumeData";
713
+ tableName: "persons";
714
+ dataType: "json";
715
+ columnType: "PgJsonb";
716
+ data: any;
717
+ driverParam: unknown;
718
+ notNull: false;
719
+ hasDefault: false;
720
+ isPrimaryKey: false;
721
+ isAutoincrement: false;
722
+ hasRuntimeDefault: false;
723
+ enumValues: undefined;
724
+ baseColumn: never;
725
+ identity: undefined;
726
+ generated: undefined;
727
+ }, {}, {
728
+ $type: any;
729
+ }>;
730
+ photoUri: import("drizzle-orm/pg-core").PgColumn<{
731
+ name: "photoUri";
732
+ tableName: "persons";
733
+ dataType: "string";
734
+ columnType: "PgText";
735
+ data: string;
736
+ driverParam: string;
737
+ notNull: false;
738
+ hasDefault: false;
739
+ isPrimaryKey: false;
740
+ isAutoincrement: false;
741
+ hasRuntimeDefault: false;
742
+ enumValues: [string, ...string[]];
743
+ baseColumn: never;
744
+ identity: undefined;
745
+ generated: undefined;
746
+ }, {}, {}>;
747
+ isMember: import("drizzle-orm/pg-core").PgColumn<{
748
+ name: "isMember";
749
+ tableName: "persons";
750
+ dataType: "boolean";
751
+ columnType: "PgBoolean";
752
+ data: boolean;
753
+ driverParam: boolean;
754
+ notNull: false;
755
+ hasDefault: false;
756
+ isPrimaryKey: false;
757
+ isAutoincrement: false;
758
+ hasRuntimeDefault: false;
759
+ enumValues: undefined;
760
+ baseColumn: never;
761
+ identity: undefined;
762
+ generated: undefined;
763
+ }, {}, {}>;
764
+ lat: import("drizzle-orm/pg-core").PgColumn<{
765
+ name: "lat";
766
+ tableName: "persons";
767
+ dataType: "number";
768
+ columnType: "PgDoublePrecision";
769
+ data: number;
770
+ driverParam: string | number;
771
+ notNull: false;
772
+ hasDefault: false;
773
+ isPrimaryKey: false;
774
+ isAutoincrement: false;
775
+ hasRuntimeDefault: false;
776
+ enumValues: undefined;
777
+ baseColumn: never;
778
+ identity: undefined;
779
+ generated: undefined;
780
+ }, {}, {}>;
781
+ lon: import("drizzle-orm/pg-core").PgColumn<{
782
+ name: "lon";
783
+ tableName: "persons";
784
+ dataType: "number";
785
+ columnType: "PgDoublePrecision";
786
+ data: number;
787
+ driverParam: string | number;
788
+ notNull: false;
789
+ hasDefault: false;
790
+ isPrimaryKey: false;
791
+ isAutoincrement: false;
792
+ hasRuntimeDefault: false;
793
+ enumValues: undefined;
794
+ baseColumn: never;
795
+ identity: undefined;
796
+ generated: undefined;
797
+ }, {}, {}>;
798
+ city: import("drizzle-orm/pg-core").PgColumn<{
799
+ name: "city";
800
+ tableName: "persons";
801
+ dataType: "string";
802
+ columnType: "PgText";
803
+ data: string;
804
+ driverParam: string;
805
+ notNull: false;
806
+ hasDefault: false;
807
+ isPrimaryKey: false;
808
+ isAutoincrement: false;
809
+ hasRuntimeDefault: false;
810
+ enumValues: [string, ...string[]];
811
+ baseColumn: never;
812
+ identity: undefined;
813
+ generated: undefined;
814
+ }, {}, {}>;
815
+ networksCommunities: import("drizzle-orm/pg-core").PgColumn<{
816
+ name: "networksCommunities";
817
+ tableName: "persons";
818
+ dataType: "string";
819
+ columnType: "PgText";
820
+ data: string;
821
+ driverParam: string;
822
+ notNull: false;
823
+ hasDefault: false;
824
+ isPrimaryKey: false;
825
+ isAutoincrement: false;
826
+ hasRuntimeDefault: false;
827
+ enumValues: [string, ...string[]];
828
+ baseColumn: never;
829
+ identity: undefined;
830
+ generated: undefined;
831
+ }, {}, {}>;
832
+ conferencesAttended: import("drizzle-orm/pg-core").PgColumn<{
833
+ name: "conferencesAttended";
834
+ tableName: "persons";
835
+ dataType: "string";
836
+ columnType: "PgText";
837
+ data: string;
838
+ driverParam: string;
839
+ notNull: false;
840
+ hasDefault: false;
841
+ isPrimaryKey: false;
842
+ isAutoincrement: false;
843
+ hasRuntimeDefault: false;
844
+ enumValues: [string, ...string[]];
845
+ baseColumn: never;
846
+ identity: undefined;
847
+ generated: undefined;
848
+ }, {}, {}>;
849
+ whatsAppGroups: import("drizzle-orm/pg-core").PgColumn<{
850
+ name: "whatsAppGroups";
851
+ tableName: "persons";
852
+ dataType: "string";
853
+ columnType: "PgText";
854
+ data: string;
855
+ driverParam: string;
856
+ notNull: false;
857
+ hasDefault: false;
858
+ isPrimaryKey: false;
859
+ isAutoincrement: false;
860
+ hasRuntimeDefault: false;
861
+ enumValues: [string, ...string[]];
862
+ baseColumn: never;
863
+ identity: undefined;
864
+ generated: undefined;
865
+ }, {}, {}>;
866
+ otherCommunities: import("drizzle-orm/pg-core").PgColumn<{
867
+ name: "otherCommunities";
868
+ tableName: "persons";
869
+ dataType: "string";
870
+ columnType: "PgText";
871
+ data: string;
872
+ driverParam: string;
873
+ notNull: false;
874
+ hasDefault: false;
875
+ isPrimaryKey: false;
876
+ isAutoincrement: false;
877
+ hasRuntimeDefault: false;
878
+ enumValues: [string, ...string[]];
879
+ baseColumn: never;
880
+ identity: undefined;
881
+ generated: undefined;
882
+ }, {}, {}>;
883
+ state: import("drizzle-orm/pg-core").PgColumn<{
884
+ name: "state";
885
+ tableName: "persons";
886
+ dataType: "string";
887
+ columnType: "PgEnumColumn";
888
+ data: "AL" | "AK" | "AS" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "FM" | "FL" | "GA" | "GU" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MH" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "MP" | "OH" | "OK" | "OR" | "PW" | "PA" | "PR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VI" | "VA" | "WA" | "WV" | "WI" | "WY" | "AB" | "BC" | "MB" | "NB" | "NL" | "NS" | "NT" | "NU" | "ON" | "PE" | "QC" | "SK" | "YT";
889
+ driverParam: string;
890
+ notNull: false;
891
+ hasDefault: false;
892
+ isPrimaryKey: false;
893
+ isAutoincrement: false;
894
+ hasRuntimeDefault: false;
895
+ enumValues: ["AL" | "AK" | "AS" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "FM" | "FL" | "GA" | "GU" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MH" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "MP" | "OH" | "OK" | "OR" | "PW" | "PA" | "PR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VI" | "VA" | "WA" | "WV" | "WI" | "WY" | "AB" | "BC" | "MB" | "NB" | "NL" | "NS" | "NT" | "NU" | "ON" | "PE" | "QC" | "SK" | "YT"];
896
+ baseColumn: never;
897
+ identity: undefined;
898
+ generated: undefined;
899
+ }, {}, {}>;
900
+ postalCode: import("drizzle-orm/pg-core").PgColumn<{
901
+ name: "postalCode";
902
+ tableName: "persons";
903
+ dataType: "string";
904
+ columnType: "PgText";
905
+ data: string;
906
+ driverParam: string;
907
+ notNull: false;
908
+ hasDefault: false;
909
+ isPrimaryKey: false;
910
+ isAutoincrement: false;
911
+ hasRuntimeDefault: false;
912
+ enumValues: [string, ...string[]];
913
+ baseColumn: never;
914
+ identity: undefined;
915
+ generated: undefined;
916
+ }, {}, {}>;
917
+ country: import("drizzle-orm/pg-core").PgColumn<{
918
+ name: "country";
919
+ tableName: "persons";
920
+ dataType: "string";
921
+ columnType: "PgEnumColumn";
922
+ data: "UNITED_STATES" | "CANADA";
923
+ driverParam: string;
924
+ notNull: false;
925
+ hasDefault: false;
926
+ isPrimaryKey: false;
927
+ isAutoincrement: false;
928
+ hasRuntimeDefault: false;
929
+ enumValues: ["UNITED_STATES" | "CANADA"];
930
+ baseColumn: never;
931
+ identity: undefined;
932
+ generated: undefined;
933
+ }, {}, {}>;
934
+ additionalEmails: import("drizzle-orm/pg-core").PgColumn<{
935
+ name: "additionalEmails";
936
+ tableName: "persons";
937
+ dataType: "array";
938
+ columnType: "PgArray";
939
+ data: string[];
940
+ driverParam: string | string[];
941
+ notNull: false;
942
+ hasDefault: false;
943
+ isPrimaryKey: false;
944
+ isAutoincrement: false;
945
+ hasRuntimeDefault: false;
946
+ enumValues: [string, ...string[]];
947
+ baseColumn: import("drizzle-orm").Column<{
948
+ name: "";
949
+ tableName: "persons";
950
+ dataType: "string";
951
+ columnType: "PgText";
952
+ data: string;
953
+ driverParam: string;
954
+ notNull: false;
955
+ hasDefault: false;
956
+ isPrimaryKey: false;
957
+ isAutoincrement: false;
958
+ hasRuntimeDefault: false;
959
+ enumValues: [string, ...string[]];
960
+ baseColumn: never;
961
+ identity: undefined;
962
+ generated: undefined;
963
+ }, {}, {}>;
964
+ identity: undefined;
965
+ generated: undefined;
966
+ }, {}, {
967
+ baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
968
+ name: "";
969
+ dataType: "string";
970
+ columnType: "PgText";
971
+ data: string;
972
+ enumValues: [string, ...string[]];
973
+ driverParam: string;
974
+ }, {}, {}, import("drizzle-orm").ColumnBuilderExtraConfig>;
975
+ size: undefined;
976
+ }>;
977
+ additionalPhones: import("drizzle-orm/pg-core").PgColumn<{
978
+ name: "additionalPhones";
979
+ tableName: "persons";
980
+ dataType: "array";
981
+ columnType: "PgArray";
982
+ data: string[];
983
+ driverParam: string | string[];
984
+ notNull: false;
985
+ hasDefault: false;
986
+ isPrimaryKey: false;
987
+ isAutoincrement: false;
988
+ hasRuntimeDefault: false;
989
+ enumValues: [string, ...string[]];
990
+ baseColumn: import("drizzle-orm").Column<{
991
+ name: "";
992
+ tableName: "persons";
993
+ dataType: "string";
994
+ columnType: "PgText";
995
+ data: string;
996
+ driverParam: string;
997
+ notNull: false;
998
+ hasDefault: false;
999
+ isPrimaryKey: false;
1000
+ isAutoincrement: false;
1001
+ hasRuntimeDefault: false;
1002
+ enumValues: [string, ...string[]];
1003
+ baseColumn: never;
1004
+ identity: undefined;
1005
+ generated: undefined;
1006
+ }, {}, {}>;
1007
+ identity: undefined;
1008
+ generated: undefined;
1009
+ }, {}, {
1010
+ baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
1011
+ name: "";
1012
+ dataType: "string";
1013
+ columnType: "PgText";
1014
+ data: string;
1015
+ enumValues: [string, ...string[]];
1016
+ driverParam: string;
1017
+ }, {}, {}, import("drizzle-orm").ColumnBuilderExtraConfig>;
1018
+ size: undefined;
1019
+ }>;
1020
+ source: import("drizzle-orm/pg-core").PgColumn<{
1021
+ name: "source";
1022
+ tableName: "persons";
1023
+ dataType: "string";
1024
+ columnType: "PgEnumColumn";
1025
+ data: "NETWORK" | "WEBSITE" | "SOCIAL_MEDIA" | "SOURCED";
1026
+ driverParam: string;
1027
+ notNull: false;
1028
+ hasDefault: true;
1029
+ isPrimaryKey: false;
1030
+ isAutoincrement: false;
1031
+ hasRuntimeDefault: false;
1032
+ enumValues: ["NETWORK" | "WEBSITE" | "SOCIAL_MEDIA" | "SOURCED"];
1033
+ baseColumn: never;
1034
+ identity: undefined;
1035
+ generated: undefined;
1036
+ }, {}, {}>;
1037
+ sourcePersonId: import("drizzle-orm/pg-core").PgColumn<{
1038
+ name: "sourcePersonId";
1039
+ tableName: "persons";
1040
+ dataType: "string";
1041
+ columnType: "PgUUID";
1042
+ data: string;
1043
+ driverParam: string;
1044
+ notNull: false;
1045
+ hasDefault: false;
1046
+ isPrimaryKey: false;
1047
+ isAutoincrement: false;
1048
+ hasRuntimeDefault: false;
1049
+ enumValues: undefined;
1050
+ baseColumn: never;
1051
+ identity: undefined;
1052
+ generated: undefined;
1053
+ }, {}, {}>;
1054
+ sourceCampaignId: import("drizzle-orm/pg-core").PgColumn<{
1055
+ name: "sourceCampaignId";
1056
+ tableName: "persons";
1057
+ dataType: "string";
1058
+ columnType: "PgUUID";
1059
+ data: string;
1060
+ driverParam: string;
1061
+ notNull: false;
1062
+ hasDefault: false;
1063
+ isPrimaryKey: false;
1064
+ isAutoincrement: false;
1065
+ hasRuntimeDefault: false;
1066
+ enumValues: undefined;
1067
+ baseColumn: never;
1068
+ identity: undefined;
1069
+ generated: undefined;
1070
+ }, {}, {}>;
1071
+ websiteUrl: import("drizzle-orm/pg-core").PgColumn<{
1072
+ name: "websiteUrl";
1073
+ tableName: "persons";
1074
+ dataType: "string";
1075
+ columnType: "PgText";
1076
+ data: string;
1077
+ driverParam: string;
1078
+ notNull: false;
1079
+ hasDefault: false;
1080
+ isPrimaryKey: false;
1081
+ isAutoincrement: false;
1082
+ hasRuntimeDefault: false;
1083
+ enumValues: [string, ...string[]];
1084
+ baseColumn: never;
1085
+ identity: undefined;
1086
+ generated: undefined;
1087
+ }, {}, {}>;
1088
+ expectedSalary: import("drizzle-orm/pg-core").PgColumn<{
1089
+ name: "expectedSalary";
1090
+ tableName: "persons";
1091
+ dataType: "number";
1092
+ columnType: "PgInteger";
1093
+ data: number;
1094
+ driverParam: string | number;
1095
+ notNull: false;
1096
+ hasDefault: false;
1097
+ isPrimaryKey: false;
1098
+ isAutoincrement: false;
1099
+ hasRuntimeDefault: false;
1100
+ enumValues: undefined;
1101
+ baseColumn: never;
1102
+ identity: undefined;
1103
+ generated: undefined;
1104
+ }, {}, {}>;
1105
+ memberReasons: import("drizzle-orm/pg-core").PgColumn<{
1106
+ name: "memberReasons";
1107
+ tableName: "persons";
1108
+ dataType: "array";
1109
+ columnType: "PgArray";
1110
+ data: ("REFER" | "HIRE" | "APPLY")[];
1111
+ driverParam: string | string[];
1112
+ notNull: false;
1113
+ hasDefault: false;
1114
+ isPrimaryKey: false;
1115
+ isAutoincrement: false;
1116
+ hasRuntimeDefault: false;
1117
+ enumValues: ["REFER" | "HIRE" | "APPLY"];
1118
+ baseColumn: import("drizzle-orm").Column<{
1119
+ name: "";
1120
+ tableName: "persons";
1121
+ dataType: "string";
1122
+ columnType: "PgEnumColumn";
1123
+ data: "REFER" | "HIRE" | "APPLY";
1124
+ driverParam: string;
1125
+ notNull: false;
1126
+ hasDefault: false;
1127
+ isPrimaryKey: false;
1128
+ isAutoincrement: false;
1129
+ hasRuntimeDefault: false;
1130
+ enumValues: ["REFER" | "HIRE" | "APPLY"];
1131
+ baseColumn: never;
1132
+ identity: undefined;
1133
+ generated: undefined;
1134
+ }, {}, {}>;
1135
+ identity: undefined;
1136
+ generated: undefined;
1137
+ }, {}, {
1138
+ baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
1139
+ name: "";
1140
+ dataType: "string";
1141
+ columnType: "PgEnumColumn";
1142
+ data: "REFER" | "HIRE" | "APPLY";
1143
+ enumValues: ["REFER" | "HIRE" | "APPLY"];
1144
+ driverParam: string;
1145
+ }, {}, {}, import("drizzle-orm").ColumnBuilderExtraConfig>;
1146
+ size: undefined;
1147
+ }>;
1148
+ preferredEmploymentType: import("drizzle-orm/pg-core").PgColumn<{
1149
+ name: "preferredEmploymentType";
1150
+ tableName: "persons";
1151
+ dataType: "string";
1152
+ columnType: "PgEnumColumn";
1153
+ data: "FULL_TIME" | "PART_TIME";
1154
+ driverParam: string;
1155
+ notNull: false;
1156
+ hasDefault: false;
1157
+ isPrimaryKey: false;
1158
+ isAutoincrement: false;
1159
+ hasRuntimeDefault: false;
1160
+ enumValues: ["FULL_TIME" | "PART_TIME"];
1161
+ baseColumn: never;
1162
+ identity: undefined;
1163
+ generated: undefined;
1164
+ }, {}, {}>;
1165
+ preferredEmploymentLocationType: import("drizzle-orm/pg-core").PgColumn<{
1166
+ name: "preferredEmploymentLocationType";
1167
+ tableName: "persons";
1168
+ dataType: "string";
1169
+ columnType: "PgEnumColumn";
1170
+ data: "REMOTE" | "ONSITE" | "HYBRID";
1171
+ driverParam: string;
1172
+ notNull: false;
1173
+ hasDefault: false;
1174
+ isPrimaryKey: false;
1175
+ isAutoincrement: false;
1176
+ hasRuntimeDefault: false;
1177
+ enumValues: ["REMOTE" | "ONSITE" | "HYBRID"];
1178
+ baseColumn: never;
1179
+ identity: undefined;
1180
+ generated: undefined;
1181
+ }, {}, {}>;
1182
+ preferredMessageChannel: import("drizzle-orm/pg-core").PgColumn<{
1183
+ name: "preferredMessageChannel";
1184
+ tableName: "persons";
1185
+ dataType: "string";
1186
+ columnType: "PgEnumColumn";
1187
+ data: "SMS" | "EMAIL";
1188
+ driverParam: string;
1189
+ notNull: false;
1190
+ hasDefault: false;
1191
+ isPrimaryKey: false;
1192
+ isAutoincrement: false;
1193
+ hasRuntimeDefault: false;
1194
+ enumValues: ["SMS" | "EMAIL"];
1195
+ baseColumn: never;
1196
+ identity: undefined;
1197
+ generated: undefined;
1198
+ }, {}, {}>;
1199
+ isOpenToRelocate: import("drizzle-orm/pg-core").PgColumn<{
1200
+ name: "isOpenToRelocate";
1201
+ tableName: "persons";
1202
+ dataType: "boolean";
1203
+ columnType: "PgBoolean";
1204
+ data: boolean;
1205
+ driverParam: boolean;
1206
+ notNull: false;
1207
+ hasDefault: false;
1208
+ isPrimaryKey: false;
1209
+ isAutoincrement: false;
1210
+ hasRuntimeDefault: false;
1211
+ enumValues: undefined;
1212
+ baseColumn: never;
1213
+ identity: undefined;
1214
+ generated: undefined;
1215
+ }, {}, {}>;
1216
+ gender: import("drizzle-orm/pg-core").PgColumn<{
1217
+ name: "gender";
1218
+ tableName: "persons";
1219
+ dataType: "string";
1220
+ columnType: "PgEnumColumn";
1221
+ data: "MAN" | "WOMAN" | "NON_BINARY" | "UNDISCLOSED";
1222
+ driverParam: string;
1223
+ notNull: false;
1224
+ hasDefault: false;
1225
+ isPrimaryKey: false;
1226
+ isAutoincrement: false;
1227
+ hasRuntimeDefault: false;
1228
+ enumValues: ["MAN" | "WOMAN" | "NON_BINARY" | "UNDISCLOSED"];
1229
+ baseColumn: never;
1230
+ identity: undefined;
1231
+ generated: undefined;
1232
+ }, {}, {}>;
1233
+ discoveredThrough: import("drizzle-orm/pg-core").PgColumn<{
1234
+ name: "discoveredThrough";
1235
+ tableName: "persons";
1236
+ dataType: "string";
1237
+ columnType: "PgText";
1238
+ data: string;
1239
+ driverParam: string;
1240
+ notNull: false;
1241
+ hasDefault: false;
1242
+ isPrimaryKey: false;
1243
+ isAutoincrement: false;
1244
+ hasRuntimeDefault: false;
1245
+ enumValues: [string, ...string[]];
1246
+ baseColumn: never;
1247
+ identity: undefined;
1248
+ generated: undefined;
1249
+ }, {}, {}>;
1250
+ deactivatedAt: import("drizzle-orm/pg-core").PgColumn<{
1251
+ name: "deactivatedAt";
1252
+ tableName: "persons";
1253
+ dataType: "date";
1254
+ columnType: "PgTimestamp";
1255
+ data: Date;
1256
+ driverParam: string;
1257
+ notNull: false;
1258
+ hasDefault: false;
1259
+ isPrimaryKey: false;
1260
+ isAutoincrement: false;
1261
+ hasRuntimeDefault: false;
1262
+ enumValues: undefined;
1263
+ baseColumn: never;
1264
+ identity: undefined;
1265
+ generated: undefined;
1266
+ }, {}, {}>;
1267
+ signedUpAt: import("drizzle-orm/pg-core").PgColumn<{
1268
+ name: "signedUpAt";
1269
+ tableName: "persons";
1270
+ dataType: "date";
1271
+ columnType: "PgTimestamp";
1272
+ data: Date;
1273
+ driverParam: string;
1274
+ notNull: false;
1275
+ hasDefault: false;
1276
+ isPrimaryKey: false;
1277
+ isAutoincrement: false;
1278
+ hasRuntimeDefault: false;
1279
+ enumValues: undefined;
1280
+ baseColumn: never;
1281
+ identity: undefined;
1282
+ generated: undefined;
1283
+ }, {}, {}>;
1284
+ lastSignedInAt: import("drizzle-orm/pg-core").PgColumn<{
1285
+ name: "lastSignedInAt";
1286
+ tableName: "persons";
1287
+ dataType: "date";
1288
+ columnType: "PgTimestamp";
1289
+ data: Date;
1290
+ driverParam: string;
1291
+ notNull: false;
1292
+ hasDefault: false;
1293
+ isPrimaryKey: false;
1294
+ isAutoincrement: false;
1295
+ hasRuntimeDefault: false;
1296
+ enumValues: undefined;
1297
+ baseColumn: never;
1298
+ identity: undefined;
1299
+ generated: undefined;
1300
+ }, {}, {}>;
1301
+ signInCount: import("drizzle-orm/pg-core").PgColumn<{
1302
+ name: "signInCount";
1303
+ tableName: "persons";
1304
+ dataType: "number";
1305
+ columnType: "PgInteger";
1306
+ data: number;
1307
+ driverParam: string | number;
1308
+ notNull: true;
1309
+ hasDefault: true;
1310
+ isPrimaryKey: false;
1311
+ isAutoincrement: false;
1312
+ hasRuntimeDefault: false;
1313
+ enumValues: undefined;
1314
+ baseColumn: never;
1315
+ identity: undefined;
1316
+ generated: undefined;
1317
+ }, {}, {}>;
1318
+ clientId: import("drizzle-orm/pg-core").PgColumn<{
1319
+ name: "clientId";
1320
+ tableName: "persons";
1321
+ dataType: "string";
1322
+ columnType: "PgUUID";
1323
+ data: string;
1324
+ driverParam: string;
1325
+ notNull: false;
1326
+ hasDefault: false;
1327
+ isPrimaryKey: false;
1328
+ isAutoincrement: false;
1329
+ hasRuntimeDefault: false;
1330
+ enumValues: undefined;
1331
+ baseColumn: never;
1332
+ identity: undefined;
1333
+ generated: undefined;
1334
+ }, {}, {}>;
1335
+ addedAt: import("drizzle-orm/pg-core").PgColumn<{
1336
+ name: "addedAt";
1337
+ tableName: "persons";
1338
+ dataType: "date";
1339
+ columnType: "PgTimestamp";
1340
+ data: Date;
1341
+ driverParam: string;
1342
+ notNull: true;
1343
+ hasDefault: true;
1344
+ isPrimaryKey: false;
1345
+ isAutoincrement: false;
1346
+ hasRuntimeDefault: false;
1347
+ enumValues: undefined;
1348
+ baseColumn: never;
1349
+ identity: undefined;
1350
+ generated: undefined;
1351
+ }, {}, {}>;
1352
+ deletedAt: import("drizzle-orm/pg-core").PgColumn<{
1353
+ name: "deletedAt";
1354
+ tableName: "persons";
1355
+ dataType: "date";
1356
+ columnType: "PgTimestamp";
1357
+ data: Date;
1358
+ driverParam: string;
1359
+ notNull: false;
1360
+ hasDefault: false;
1361
+ isPrimaryKey: false;
1362
+ isAutoincrement: false;
1363
+ hasRuntimeDefault: false;
1364
+ enumValues: undefined;
1365
+ baseColumn: never;
1366
+ identity: undefined;
1367
+ generated: undefined;
1368
+ }, {}, {}>;
1369
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
1370
+ name: "createdAt";
1371
+ tableName: "persons";
1372
+ dataType: "date";
1373
+ columnType: "PgTimestamp";
1374
+ data: Date;
1375
+ driverParam: string;
1376
+ notNull: true;
1377
+ hasDefault: true;
1378
+ isPrimaryKey: false;
1379
+ isAutoincrement: false;
1380
+ hasRuntimeDefault: false;
1381
+ enumValues: undefined;
1382
+ baseColumn: never;
1383
+ identity: undefined;
1384
+ generated: undefined;
1385
+ }, {}, {}>;
1386
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
1387
+ name: "updatedAt";
1388
+ tableName: "persons";
1389
+ dataType: "date";
1390
+ columnType: "PgTimestamp";
1391
+ data: Date;
1392
+ driverParam: string;
1393
+ notNull: true;
1394
+ hasDefault: true;
1395
+ isPrimaryKey: false;
1396
+ isAutoincrement: false;
1397
+ hasRuntimeDefault: false;
1398
+ enumValues: undefined;
1399
+ baseColumn: never;
1400
+ identity: undefined;
1401
+ generated: undefined;
1402
+ }, {}, {}>;
1403
+ }, {
617
1404
  email: z.ZodOptional<z.ZodEmail>;
618
1405
  addedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
619
- phone: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodString>>>;
620
- }, {
621
- out: {};
622
- in: {};
623
- }>;
1406
+ phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
1407
+ }, undefined>;
624
1408
  export declare const AdminPersonParamsSchema: z.ZodObject<{
625
1409
  id: z.ZodUUID;
626
1410
  }, {
@@ -759,6 +1543,13 @@ export declare const AdminPersonConnectionsResultSchema: z.ZodObject<{
759
1543
  in: {};
760
1544
  }>;
761
1545
  }, z.core.$strip>>;
1546
+ client: z.ZodNullable<z.ZodObject<{
1547
+ name: z.ZodString;
1548
+ id: z.ZodUUID;
1549
+ }, {
1550
+ out: {};
1551
+ in: {};
1552
+ }>>;
762
1553
  }, z.core.$strip>>;
763
1554
  candidacies: z.ZodArray<z.ZodObject<{
764
1555
  referral: z.ZodNullable<z.ZodObject<{
@@ -99,10 +99,10 @@ exports.AdminPersonSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.p
99
99
  slug: true
100
100
  }))
101
101
  });
102
- exports.AdminPersonUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.person).extend({
103
- email: emailSchema.optional(),
102
+ exports.AdminPersonUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.person, {
103
+ email: utils_1.EmailSchema.optional(),
104
104
  addedAt: v4_1.z.coerce.date().optional(),
105
- phone: phoneSchema.optional()
105
+ phone: utils_1.OptionalPhoneSchema
106
106
  });
107
107
  exports.AdminPersonParamsSchema = exports.AdminPersonSelectSchema.pick({
108
108
  id: true
@@ -184,6 +184,12 @@ exports.AdminPersonConnectionsResultSchema = v4_1.z.object({
184
184
  referrals: v4_1.z.array(v4_1.z.object({
185
185
  candidacy: v4_1.z
186
186
  .object({ person: exports.AdminPersonConnectionsPersonSchema })
187
+ .nullable(),
188
+ client: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
189
+ .pick({
190
+ id: true,
191
+ name: true
192
+ })
187
193
  .nullable()
188
194
  })),
189
195
  candidacies: v4_1.z.array(v4_1.z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/persons/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAIoB;AACpB,qCAUmB;AACnB,0CAAmE;AACnE,+BAA0B;AAC1B,kDAG2B;AAC3B,kDAAyB;AAEzB,eAAe;AAEf,MAAM,WAAW,GAAG,MAAC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;AAClD,MAAM,WAAW,GAAG,MAAC;KAClB,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,eAAK,EAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC;KACjD,IAAI,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAChC,QAAQ,EAAE,CAAA;AAEA,QAAA,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,gBAAS,EAAE;IAC5E,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IACpD,WAAW,EAAE,MAAC;SACX,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,mDAAmD,CAAC;CACjE,CAAC,CAAC,IAAI,CAAC;IACN,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;CAClB,CAAC,CAAA;AAEW,QAAA,iCAAiC,GAAG,IAAA,gCAAkB,EACjE,iBAAU,EACV;IACE,SAAS,E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,MAAM,EAAE,0CAAkC,EAAE,CAAC;aACtD,QAAQ,EAAE;KACd,CAAC,CACH;IACD,WAAW,EAAE,MAAC,CAAC,KAAK,CAClB,MAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,MAAC;aACR,MAAM,CAAC,EAAE,QAAQ,EAAE,0CAAkC,EAAE,CAAC;aACxD,QAAQ,EAAE;KACd,CAAC,CACH;CACF,CAAC,CAAA;AA+CW,QAAA,kBAAkB,GAAG,+BAAuB,CAAC,IAAI,CAAC;IAC7D,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC,MAAM,CAAC;IACR,MAAM,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAC,CAAC,KAAK,CAClB,yCAAiC,CAAC,MAAM,CAAC;QACvC,WAAW,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC,CACH;CACF,CAAC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n campaign,\n client,\n education,\n experience,\n industry,\n jobFunction,\n person,\n skill,\n tag\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\nimport {\n LIST_REQUEST_SORT_DIRECTIONS,\n PERSON_LIST_OPERATORS\n} from '../../../constants'\nimport phone from 'phone'\n\n//// validators\n\nconst emailSchema = z.email().trim().toLowerCase()\nconst phoneSchema = z\n .string()\n .transform((val) => phone(val.trim()).phoneNumber)\n .pipe(z.string().startsWith('+'))\n .nullable()\n\nexport const AdminPersonEducationSelectSchema = createSelectSchema(education, {\n field: (schema) => schema.describe('Field of study'),\n graduatedAt: z\n .date()\n .nullable()\n .describe('Graduation date, use June 1 if exact date unknown')\n}).pick({\n id: true,\n degree: true,\n field: true,\n school: true,\n graduatedAt: true\n})\n\nexport const AdminPersonExperienceSelectSchema = createSelectSchema(\n experience,\n {\n startDate: z.date().nullable(),\n endDate: z.date().nullable()\n }\n)\n .pick({\n id: true,\n title: true,\n company: true,\n level: true,\n salary: true,\n startDate: true,\n endDate: true,\n isCurrent: true\n })\n .extend({\n jobFunction: z.string().nullable(),\n industry: z.string().nullable()\n })\n\nexport const AdminPersonCreateSchema = createInsertSchema(person)\n .extend({\n email: emailSchema\n })\n .omit({\n idNano: true\n })\nexport const AdminPersonSelectSchema = createSelectSchema(person).extend({\n skills: z.array(\n createSelectSchema(skill).pick({\n id: true,\n name: true\n })\n ),\n tags: z.array(\n createSelectSchema(tag).pick({\n id: true,\n name: true\n })\n ),\n sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n client: createSelectSchema(client).pick({\n id: true,\n name: true\n }),\n educations: z.array(AdminPersonEducationSelectSchema),\n experiences: z.array(AdminPersonExperienceSelectSchema),\n _referralsCount: z.number().nullable().optional(),\n _referredIndustries: z.array(z.string()).nullable().optional(),\n _referredLocations: z.array(z.string()).nullable().optional(),\n _referredSkills: z.array(z.string()).nullable().optional(),\n _currentTitle: z.string().nullable().optional(),\n _currentEmployer: z.string().nullable().optional(),\n _currentSalary: z.number().nullable().optional(),\n _careerLevel: z.number().nullable().optional(),\n _currentJobFunction: z.string().nullable().optional(),\n _currentIndustry: z.string().nullable().optional(),\n _calculatedIsMember: z.boolean().optional(),\n industries: z.array(\n createSelectSchema(industry).pick({\n id: true,\n name: true,\n slug: true\n })\n ),\n jobFunctions: z.array(\n createSelectSchema(jobFunction).pick({\n id: true,\n name: true,\n slug: true\n })\n )\n})\n\nexport const AdminPersonUpdateSchema = createUpdateSchema(person).extend({\n email: emailSchema.optional(),\n addedAt: z.coerce.date().optional(),\n phone: phoneSchema.optional()\n})\n\nexport const AdminPersonParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonByEmailParamsSchema = AdminPersonSelectSchema.pick({\n email: true\n})\nexport const AdminPersonByPhoneParamsSchema = z.object({\n phone: z.string()\n})\nexport const AdminPersonByIdNanoSchema = z.object({\n idNano: z.string()\n})\n\nexport const AdminPersonUpdateParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nexport const AdminPersonDeleteParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nconst FilterSchema = z.object({\n field: z.string(),\n isDynamicColumn: z.boolean(),\n operator: z.enum(PERSON_LIST_OPERATORS),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\nconst GeoSchema = z.object({\n operator: z.string(),\n referenceLat: z.number(),\n referenceLon: z.number(),\n radius: z.number()\n})\nconst CustomQuerySchema = z.object({\n custom: z.string(),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\n// TODO - add type\nconst NestedFilterSchema: z.ZodType<any> = z.lazy(() =>\n z.object({\n and: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional(),\n or: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional()\n })\n)\n\nexport const AdminPersonListQuerySchema = ListQuerySchema.extend({\n sort: z\n .array(\n z.object({\n field: z.string(),\n direction: z.enum(LIST_REQUEST_SORT_DIRECTIONS)\n })\n )\n .optional(),\n filter: z\n .union([FilterSchema, GeoSchema, CustomQuerySchema, NestedFilterSchema])\n .optional()\n})\n\nexport const AdminPersonConnectionsParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonConnectionsPersonSchema = AdminPersonSelectSchema.pick({\n id: true,\n email: true,\n fullName: true\n})\nexport const AdminPersonConnectionsResultSchema = z.object({\n sourcedPersons: z.array(AdminPersonConnectionsPersonSchema),\n sourcedBy: AdminPersonConnectionsPersonSchema.nullable(),\n bestPersons: z.array(\n z.object({ bestPerson: AdminPersonConnectionsPersonSchema })\n ),\n bestiedBy: z.array(\n z.object({ bestiedBy: AdminPersonConnectionsPersonSchema })\n ),\n referrals: z.array(\n z.object({\n candidacy: z\n .object({ person: AdminPersonConnectionsPersonSchema })\n .nullable()\n })\n ),\n candidacies: z.array(\n z.object({\n referral: z\n .object({ referrer: AdminPersonConnectionsPersonSchema })\n .nullable()\n })\n )\n})\n\n//// types\n\ntype AdminPerson = z.infer<typeof AdminPersonSelectSchema>\n\nexport type AdminPersonExperienceResult = z.infer<\n typeof AdminPersonExperienceSelectSchema\n>\nexport type AdminPersonEducationResult = z.infer<\n typeof AdminPersonEducationSelectSchema\n>\n\n// detail\nexport type AdminPersonParams = z.infer<typeof AdminPersonParamsSchema>\nexport type AdminPersonByEmailParams = z.infer<\n typeof AdminPersonByEmailParamsSchema\n>\nexport type AdminPersonByPhoneParams = z.infer<\n typeof AdminPersonByPhoneParamsSchema\n>\nexport type AdminPersonByIdNanoParams = z.infer<\n typeof AdminPersonByIdNanoSchema\n>\nexport type AdminPersonResult = AdminPerson\n\n// list\nexport type AdminPersonListQuery = z.infer<typeof AdminPersonListQuerySchema>\nexport type AdminPersonListResult = ListResponse<\n z.infer<typeof AdminPersonSelectSchema>\n>\n\n// create\nexport type AdminPersonCreateInput = z.infer<typeof AdminPersonCreateSchema>\nexport type AdminPersonCreateResult = Pick<AdminPerson, 'id'>\n\n// update\nexport type AdminPersonUpdateParams = z.infer<\n typeof AdminPersonUpdateParamsSchema\n>\nexport type AdminPersonUpdateInput = Partial<AdminPerson>\n\n// delete\nexport type AdminPersonDeleteParams = z.infer<\n typeof AdminPersonDeleteParamsSchema\n>\n\nexport const ResumeParserSchema = AdminPersonSelectSchema.pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n city: true,\n state: true,\n country: true,\n gender: true,\n linkedInUrl: true,\n websiteUrl: true,\n skills: true,\n experiences: true,\n educations: true\n}).extend({\n skills: z.array(z.string()),\n experiences: z.array(\n AdminPersonExperienceSelectSchema.extend({\n jobFunction: z.string().nullable()\n })\n )\n})\n\nexport type AdminPersonResumeParseResult = z.infer<typeof ResumeParserSchema>\n\nexport type AdminPersonConnectionsParams = z.infer<\n typeof AdminPersonConnectionsParamsSchema\n>\nexport type AdminPersonConnectionsPerson = z.infer<\n typeof AdminPersonConnectionsPersonSchema\n>\nexport type AdminPersonConnectionsResult = z.infer<\n typeof AdminPersonConnectionsResultSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/persons/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAIoB;AACpB,qCAUmB;AACnB,0CAKuB;AACvB,+BAA0B;AAC1B,kDAG2B;AAC3B,kDAAyB;AAGzB,eAAe;AAEf,MAAM,WAAW,GAAG,MAAC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;AAClD,MAAM,WAAW,GAAG,MAAC;KAClB,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,eAAK,EAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC;KACjD,IAAI,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAChC,QAAQ,EAAE,CAAA;AAEA,QAAA,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,gBAAS,EAAE;IAC5E,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IACpD,WAAW,EAAE,MAAC;SACX,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QA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ACnC,CAAC,CACH;CACF,CAAC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n campaign,\n client,\n education,\n experience,\n industry,\n jobFunction,\n person,\n skill,\n tag\n} from '../../core'\nimport {\n EmailSchema,\n ListQuerySchema,\n OptionalPhoneSchema,\n type ListResponse\n} from '../../../utils'\nimport { z } from 'zod/v4'\nimport {\n LIST_REQUEST_SORT_DIRECTIONS,\n PERSON_LIST_OPERATORS\n} from '../../../constants'\nimport phone from 'phone'\nimport { create } from 'domain'\n\n//// validators\n\nconst emailSchema = z.email().trim().toLowerCase()\nconst phoneSchema = z\n .string()\n .transform((val) => phone(val.trim()).phoneNumber)\n .pipe(z.string().startsWith('+'))\n .nullable()\n\nexport const AdminPersonEducationSelectSchema = createSelectSchema(education, {\n field: (schema) => schema.describe('Field of study'),\n graduatedAt: z\n .date()\n .nullable()\n .describe('Graduation date, use June 1 if exact date unknown')\n}).pick({\n id: true,\n degree: true,\n field: true,\n school: true,\n graduatedAt: true\n})\n\nexport const AdminPersonExperienceSelectSchema = createSelectSchema(\n experience,\n {\n startDate: z.date().nullable(),\n endDate: z.date().nullable()\n }\n)\n .pick({\n id: true,\n title: true,\n company: true,\n level: true,\n salary: true,\n startDate: true,\n endDate: true,\n isCurrent: true\n })\n .extend({\n jobFunction: z.string().nullable(),\n industry: z.string().nullable()\n })\n\nexport const AdminPersonCreateSchema = createInsertSchema(person)\n .extend({\n email: emailSchema\n })\n .omit({\n idNano: true\n })\nexport const AdminPersonSelectSchema = createSelectSchema(person).extend({\n skills: z.array(\n createSelectSchema(skill).pick({\n id: true,\n name: true\n })\n ),\n tags: z.array(\n createSelectSchema(tag).pick({\n id: true,\n name: true\n })\n ),\n sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n client: createSelectSchema(client).pick({\n id: true,\n name: true\n }),\n educations: z.array(AdminPersonEducationSelectSchema),\n experiences: z.array(AdminPersonExperienceSelectSchema),\n _referralsCount: z.number().nullable().optional(),\n _referredIndustries: z.array(z.string()).nullable().optional(),\n _referredLocations: z.array(z.string()).nullable().optional(),\n _referredSkills: z.array(z.string()).nullable().optional(),\n _currentTitle: z.string().nullable().optional(),\n _currentEmployer: z.string().nullable().optional(),\n _currentSalary: z.number().nullable().optional(),\n _careerLevel: z.number().nullable().optional(),\n _currentJobFunction: z.string().nullable().optional(),\n _currentIndustry: z.string().nullable().optional(),\n _calculatedIsMember: z.boolean().optional(),\n industries: z.array(\n createSelectSchema(industry).pick({\n id: true,\n name: true,\n slug: true\n })\n ),\n jobFunctions: z.array(\n createSelectSchema(jobFunction).pick({\n id: true,\n name: true,\n slug: true\n })\n )\n})\n\nexport const AdminPersonUpdateSchema = createUpdateSchema(person, {\n email: EmailSchema.optional(),\n addedAt: z.coerce.date().optional(),\n phone: OptionalPhoneSchema\n})\n\nexport const AdminPersonParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonByEmailParamsSchema = AdminPersonSelectSchema.pick({\n email: true\n})\nexport const AdminPersonByPhoneParamsSchema = z.object({\n phone: z.string()\n})\nexport const AdminPersonByIdNanoSchema = z.object({\n idNano: z.string()\n})\n\nexport const AdminPersonUpdateParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nexport const AdminPersonDeleteParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nconst FilterSchema = z.object({\n field: z.string(),\n isDynamicColumn: z.boolean(),\n operator: z.enum(PERSON_LIST_OPERATORS),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\nconst GeoSchema = z.object({\n operator: z.string(),\n referenceLat: z.number(),\n referenceLon: z.number(),\n radius: z.number()\n})\nconst CustomQuerySchema = z.object({\n custom: z.string(),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\n// TODO - add type\nconst NestedFilterSchema: z.ZodType<any> = z.lazy(() =>\n z.object({\n and: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional(),\n or: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional()\n })\n)\n\nexport const AdminPersonListQuerySchema = ListQuerySchema.extend({\n sort: z\n .array(\n z.object({\n field: z.string(),\n direction: z.enum(LIST_REQUEST_SORT_DIRECTIONS)\n })\n )\n .optional(),\n filter: z\n .union([FilterSchema, GeoSchema, CustomQuerySchema, NestedFilterSchema])\n .optional()\n})\n\nexport const AdminPersonConnectionsParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonConnectionsPersonSchema = AdminPersonSelectSchema.pick({\n id: true,\n email: true,\n fullName: true\n})\nexport const AdminPersonConnectionsResultSchema = z.object({\n sourcedPersons: z.array(AdminPersonConnectionsPersonSchema),\n sourcedBy: AdminPersonConnectionsPersonSchema.nullable(),\n bestPersons: z.array(\n z.object({ bestPerson: AdminPersonConnectionsPersonSchema })\n ),\n bestiedBy: z.array(\n z.object({ bestiedBy: AdminPersonConnectionsPersonSchema })\n ),\n referrals: z.array(\n z.object({\n candidacy: z\n .object({ person: AdminPersonConnectionsPersonSchema })\n .nullable(),\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n })\n ),\n candidacies: z.array(\n z.object({\n referral: z\n .object({ referrer: AdminPersonConnectionsPersonSchema })\n .nullable()\n })\n )\n})\n\n//// types\n\ntype AdminPerson = z.infer<typeof AdminPersonSelectSchema>\n\nexport type AdminPersonExperienceResult = z.infer<\n typeof AdminPersonExperienceSelectSchema\n>\nexport type AdminPersonEducationResult = z.infer<\n typeof AdminPersonEducationSelectSchema\n>\n\n// detail\nexport type AdminPersonParams = z.infer<typeof AdminPersonParamsSchema>\nexport type AdminPersonByEmailParams = z.infer<\n typeof AdminPersonByEmailParamsSchema\n>\nexport type AdminPersonByPhoneParams = z.infer<\n typeof AdminPersonByPhoneParamsSchema\n>\nexport type AdminPersonByIdNanoParams = z.infer<\n typeof AdminPersonByIdNanoSchema\n>\nexport type AdminPersonResult = AdminPerson\n\n// list\nexport type AdminPersonListQuery = z.infer<typeof AdminPersonListQuerySchema>\nexport type AdminPersonListResult = ListResponse<\n z.infer<typeof AdminPersonSelectSchema>\n>\n\n// create\nexport type AdminPersonCreateInput = z.infer<typeof AdminPersonCreateSchema>\nexport type AdminPersonCreateResult = Pick<AdminPerson, 'id'>\n\n// update\nexport type AdminPersonUpdateParams = z.infer<\n typeof AdminPersonUpdateParamsSchema\n>\nexport type AdminPersonUpdateInput = Partial<AdminPerson>\n\n// delete\nexport type AdminPersonDeleteParams = z.infer<\n typeof AdminPersonDeleteParamsSchema\n>\n\nexport const ResumeParserSchema = AdminPersonSelectSchema.pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n city: true,\n state: true,\n country: true,\n gender: true,\n linkedInUrl: true,\n websiteUrl: true,\n skills: true,\n experiences: true,\n educations: true\n}).extend({\n skills: z.array(z.string()),\n experiences: z.array(\n AdminPersonExperienceSelectSchema.extend({\n jobFunction: z.string().nullable()\n })\n )\n})\n\nexport type AdminPersonResumeParseResult = z.infer<typeof ResumeParserSchema>\n\nexport type AdminPersonConnectionsParams = z.infer<\n typeof AdminPersonConnectionsParamsSchema\n>\nexport type AdminPersonConnectionsPerson = z.infer<\n typeof AdminPersonConnectionsPersonSchema\n>\nexport type AdminPersonConnectionsResult = z.infer<\n typeof AdminPersonConnectionsResultSchema\n>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.133",
3
+ "version": "0.2.135",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",