@voyantjs/crm 0.19.0 → 0.21.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.
@@ -2188,7 +2188,9 @@ export declare const crmService: {
2188
2188
  id: string;
2189
2189
  organizationId: string | null;
2190
2190
  firstName: string;
2191
+ middleName: string | null;
2191
2192
  lastName: string;
2193
+ gender: string | null;
2192
2194
  jobTitle: string | null;
2193
2195
  relation: "partner" | "supplier" | "other" | "client" | null;
2194
2196
  preferredLanguage: string | null;
@@ -2212,7 +2214,9 @@ export declare const crmService: {
2212
2214
  id: string;
2213
2215
  organizationId: string | null;
2214
2216
  firstName: string;
2217
+ middleName: string | null;
2215
2218
  lastName: string;
2219
+ gender: string | null;
2216
2220
  jobTitle: string | null;
2217
2221
  relation: "partner" | "supplier" | "other" | "client" | null;
2218
2222
  preferredLanguage: string | null;
@@ -2232,7 +2236,9 @@ export declare const crmService: {
2232
2236
  id: string;
2233
2237
  organizationId: string | null;
2234
2238
  firstName: string;
2239
+ middleName: string | null;
2235
2240
  lastName: string;
2241
+ gender: string | null;
2236
2242
  jobTitle: string | null;
2237
2243
  relation: "partner" | "supplier" | "other" | "client" | null;
2238
2244
  preferredLanguage: string | null;
@@ -2252,7 +2258,9 @@ export declare const crmService: {
2252
2258
  id: string;
2253
2259
  organizationId: string | null;
2254
2260
  firstName: string;
2261
+ middleName: string | null;
2255
2262
  lastName: string;
2263
+ gender: string | null;
2256
2264
  jobTitle: string | null;
2257
2265
  relation: "partner" | "supplier" | "other" | "client" | null;
2258
2266
  preferredLanguage: string | null;
@@ -2768,6 +2776,396 @@ export declare const crmService: {
2768
2776
  authorId: string;
2769
2777
  content: string;
2770
2778
  } | null>;
2779
+ listPersonPaymentMethods(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"person_payment_methods", {
2780
+ id: import("drizzle-orm/pg-core").PgColumn<{
2781
+ name: string;
2782
+ tableName: "person_payment_methods";
2783
+ dataType: "string";
2784
+ columnType: "PgText";
2785
+ data: string;
2786
+ driverParam: string;
2787
+ notNull: true;
2788
+ hasDefault: true;
2789
+ isPrimaryKey: true;
2790
+ isAutoincrement: false;
2791
+ hasRuntimeDefault: true;
2792
+ enumValues: [string, ...string[]];
2793
+ baseColumn: never;
2794
+ identity: undefined;
2795
+ generated: undefined;
2796
+ }, {}, {}>;
2797
+ personId: import("drizzle-orm/pg-core").PgColumn<{
2798
+ name: string;
2799
+ tableName: "person_payment_methods";
2800
+ dataType: "string";
2801
+ columnType: "PgText";
2802
+ data: string;
2803
+ driverParam: string;
2804
+ notNull: true;
2805
+ hasDefault: false;
2806
+ isPrimaryKey: false;
2807
+ isAutoincrement: false;
2808
+ hasRuntimeDefault: false;
2809
+ enumValues: [string, ...string[]];
2810
+ baseColumn: never;
2811
+ identity: undefined;
2812
+ generated: undefined;
2813
+ }, {}, {}>;
2814
+ brand: import("drizzle-orm/pg-core").PgColumn<{
2815
+ name: "brand";
2816
+ tableName: "person_payment_methods";
2817
+ dataType: "string";
2818
+ columnType: "PgText";
2819
+ data: string;
2820
+ driverParam: string;
2821
+ notNull: true;
2822
+ hasDefault: false;
2823
+ isPrimaryKey: false;
2824
+ isAutoincrement: false;
2825
+ hasRuntimeDefault: false;
2826
+ enumValues: [string, ...string[]];
2827
+ baseColumn: never;
2828
+ identity: undefined;
2829
+ generated: undefined;
2830
+ }, {}, {}>;
2831
+ last4: import("drizzle-orm/pg-core").PgColumn<{
2832
+ name: "last4";
2833
+ tableName: "person_payment_methods";
2834
+ dataType: "string";
2835
+ columnType: "PgText";
2836
+ data: string;
2837
+ driverParam: string;
2838
+ notNull: false;
2839
+ hasDefault: false;
2840
+ isPrimaryKey: false;
2841
+ isAutoincrement: false;
2842
+ hasRuntimeDefault: false;
2843
+ enumValues: [string, ...string[]];
2844
+ baseColumn: never;
2845
+ identity: undefined;
2846
+ generated: undefined;
2847
+ }, {}, {}>;
2848
+ holderName: import("drizzle-orm/pg-core").PgColumn<{
2849
+ name: "holder_name";
2850
+ tableName: "person_payment_methods";
2851
+ dataType: "string";
2852
+ columnType: "PgText";
2853
+ data: string;
2854
+ driverParam: string;
2855
+ notNull: false;
2856
+ hasDefault: false;
2857
+ isPrimaryKey: false;
2858
+ isAutoincrement: false;
2859
+ hasRuntimeDefault: false;
2860
+ enumValues: [string, ...string[]];
2861
+ baseColumn: never;
2862
+ identity: undefined;
2863
+ generated: undefined;
2864
+ }, {}, {}>;
2865
+ expMonth: import("drizzle-orm/pg-core").PgColumn<{
2866
+ name: "exp_month";
2867
+ tableName: "person_payment_methods";
2868
+ dataType: "number";
2869
+ columnType: "PgInteger";
2870
+ data: number;
2871
+ driverParam: string | number;
2872
+ notNull: false;
2873
+ hasDefault: false;
2874
+ isPrimaryKey: false;
2875
+ isAutoincrement: false;
2876
+ hasRuntimeDefault: false;
2877
+ enumValues: undefined;
2878
+ baseColumn: never;
2879
+ identity: undefined;
2880
+ generated: undefined;
2881
+ }, {}, {}>;
2882
+ expYear: import("drizzle-orm/pg-core").PgColumn<{
2883
+ name: "exp_year";
2884
+ tableName: "person_payment_methods";
2885
+ dataType: "number";
2886
+ columnType: "PgInteger";
2887
+ data: number;
2888
+ driverParam: string | number;
2889
+ notNull: false;
2890
+ hasDefault: false;
2891
+ isPrimaryKey: false;
2892
+ isAutoincrement: false;
2893
+ hasRuntimeDefault: false;
2894
+ enumValues: undefined;
2895
+ baseColumn: never;
2896
+ identity: undefined;
2897
+ generated: undefined;
2898
+ }, {}, {}>;
2899
+ processorToken: import("drizzle-orm/pg-core").PgColumn<{
2900
+ name: "processor_token";
2901
+ tableName: "person_payment_methods";
2902
+ dataType: "string";
2903
+ columnType: "PgText";
2904
+ data: string;
2905
+ driverParam: string;
2906
+ notNull: true;
2907
+ hasDefault: false;
2908
+ isPrimaryKey: false;
2909
+ isAutoincrement: false;
2910
+ hasRuntimeDefault: false;
2911
+ enumValues: [string, ...string[]];
2912
+ baseColumn: never;
2913
+ identity: undefined;
2914
+ generated: undefined;
2915
+ }, {}, {}>;
2916
+ isDefault: import("drizzle-orm/pg-core").PgColumn<{
2917
+ name: "is_default";
2918
+ tableName: "person_payment_methods";
2919
+ dataType: "boolean";
2920
+ columnType: "PgBoolean";
2921
+ data: boolean;
2922
+ driverParam: boolean;
2923
+ notNull: true;
2924
+ hasDefault: true;
2925
+ isPrimaryKey: false;
2926
+ isAutoincrement: false;
2927
+ hasRuntimeDefault: false;
2928
+ enumValues: undefined;
2929
+ baseColumn: never;
2930
+ identity: undefined;
2931
+ generated: undefined;
2932
+ }, {}, {}>;
2933
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
2934
+ name: "created_at";
2935
+ tableName: "person_payment_methods";
2936
+ dataType: "date";
2937
+ columnType: "PgTimestamp";
2938
+ data: Date;
2939
+ driverParam: string;
2940
+ notNull: true;
2941
+ hasDefault: true;
2942
+ isPrimaryKey: false;
2943
+ isAutoincrement: false;
2944
+ hasRuntimeDefault: false;
2945
+ enumValues: undefined;
2946
+ baseColumn: never;
2947
+ identity: undefined;
2948
+ generated: undefined;
2949
+ }, {}, {}>;
2950
+ }, "single", Record<"person_payment_methods", "not-null">, false, "where" | "orderBy", {
2951
+ id: string;
2952
+ personId: string;
2953
+ brand: string;
2954
+ last4: string | null;
2955
+ holderName: string | null;
2956
+ expMonth: number | null;
2957
+ expYear: number | null;
2958
+ processorToken: string;
2959
+ isDefault: boolean;
2960
+ createdAt: Date;
2961
+ }[], {
2962
+ id: import("drizzle-orm/pg-core").PgColumn<{
2963
+ name: string;
2964
+ tableName: "person_payment_methods";
2965
+ dataType: "string";
2966
+ columnType: "PgText";
2967
+ data: string;
2968
+ driverParam: string;
2969
+ notNull: true;
2970
+ hasDefault: true;
2971
+ isPrimaryKey: true;
2972
+ isAutoincrement: false;
2973
+ hasRuntimeDefault: true;
2974
+ enumValues: [string, ...string[]];
2975
+ baseColumn: never;
2976
+ identity: undefined;
2977
+ generated: undefined;
2978
+ }, {}, {}>;
2979
+ personId: import("drizzle-orm/pg-core").PgColumn<{
2980
+ name: string;
2981
+ tableName: "person_payment_methods";
2982
+ dataType: "string";
2983
+ columnType: "PgText";
2984
+ data: string;
2985
+ driverParam: string;
2986
+ notNull: true;
2987
+ hasDefault: false;
2988
+ isPrimaryKey: false;
2989
+ isAutoincrement: false;
2990
+ hasRuntimeDefault: false;
2991
+ enumValues: [string, ...string[]];
2992
+ baseColumn: never;
2993
+ identity: undefined;
2994
+ generated: undefined;
2995
+ }, {}, {}>;
2996
+ brand: import("drizzle-orm/pg-core").PgColumn<{
2997
+ name: "brand";
2998
+ tableName: "person_payment_methods";
2999
+ dataType: "string";
3000
+ columnType: "PgText";
3001
+ data: string;
3002
+ driverParam: string;
3003
+ notNull: true;
3004
+ hasDefault: false;
3005
+ isPrimaryKey: false;
3006
+ isAutoincrement: false;
3007
+ hasRuntimeDefault: false;
3008
+ enumValues: [string, ...string[]];
3009
+ baseColumn: never;
3010
+ identity: undefined;
3011
+ generated: undefined;
3012
+ }, {}, {}>;
3013
+ last4: import("drizzle-orm/pg-core").PgColumn<{
3014
+ name: "last4";
3015
+ tableName: "person_payment_methods";
3016
+ dataType: "string";
3017
+ columnType: "PgText";
3018
+ data: string;
3019
+ driverParam: string;
3020
+ notNull: false;
3021
+ hasDefault: false;
3022
+ isPrimaryKey: false;
3023
+ isAutoincrement: false;
3024
+ hasRuntimeDefault: false;
3025
+ enumValues: [string, ...string[]];
3026
+ baseColumn: never;
3027
+ identity: undefined;
3028
+ generated: undefined;
3029
+ }, {}, {}>;
3030
+ holderName: import("drizzle-orm/pg-core").PgColumn<{
3031
+ name: "holder_name";
3032
+ tableName: "person_payment_methods";
3033
+ dataType: "string";
3034
+ columnType: "PgText";
3035
+ data: string;
3036
+ driverParam: string;
3037
+ notNull: false;
3038
+ hasDefault: false;
3039
+ isPrimaryKey: false;
3040
+ isAutoincrement: false;
3041
+ hasRuntimeDefault: false;
3042
+ enumValues: [string, ...string[]];
3043
+ baseColumn: never;
3044
+ identity: undefined;
3045
+ generated: undefined;
3046
+ }, {}, {}>;
3047
+ expMonth: import("drizzle-orm/pg-core").PgColumn<{
3048
+ name: "exp_month";
3049
+ tableName: "person_payment_methods";
3050
+ dataType: "number";
3051
+ columnType: "PgInteger";
3052
+ data: number;
3053
+ driverParam: string | number;
3054
+ notNull: false;
3055
+ hasDefault: false;
3056
+ isPrimaryKey: false;
3057
+ isAutoincrement: false;
3058
+ hasRuntimeDefault: false;
3059
+ enumValues: undefined;
3060
+ baseColumn: never;
3061
+ identity: undefined;
3062
+ generated: undefined;
3063
+ }, {}, {}>;
3064
+ expYear: import("drizzle-orm/pg-core").PgColumn<{
3065
+ name: "exp_year";
3066
+ tableName: "person_payment_methods";
3067
+ dataType: "number";
3068
+ columnType: "PgInteger";
3069
+ data: number;
3070
+ driverParam: string | number;
3071
+ notNull: false;
3072
+ hasDefault: false;
3073
+ isPrimaryKey: false;
3074
+ isAutoincrement: false;
3075
+ hasRuntimeDefault: false;
3076
+ enumValues: undefined;
3077
+ baseColumn: never;
3078
+ identity: undefined;
3079
+ generated: undefined;
3080
+ }, {}, {}>;
3081
+ processorToken: import("drizzle-orm/pg-core").PgColumn<{
3082
+ name: "processor_token";
3083
+ tableName: "person_payment_methods";
3084
+ dataType: "string";
3085
+ columnType: "PgText";
3086
+ data: string;
3087
+ driverParam: string;
3088
+ notNull: true;
3089
+ hasDefault: false;
3090
+ isPrimaryKey: false;
3091
+ isAutoincrement: false;
3092
+ hasRuntimeDefault: false;
3093
+ enumValues: [string, ...string[]];
3094
+ baseColumn: never;
3095
+ identity: undefined;
3096
+ generated: undefined;
3097
+ }, {}, {}>;
3098
+ isDefault: import("drizzle-orm/pg-core").PgColumn<{
3099
+ name: "is_default";
3100
+ tableName: "person_payment_methods";
3101
+ dataType: "boolean";
3102
+ columnType: "PgBoolean";
3103
+ data: boolean;
3104
+ driverParam: boolean;
3105
+ notNull: true;
3106
+ hasDefault: true;
3107
+ isPrimaryKey: false;
3108
+ isAutoincrement: false;
3109
+ hasRuntimeDefault: false;
3110
+ enumValues: undefined;
3111
+ baseColumn: never;
3112
+ identity: undefined;
3113
+ generated: undefined;
3114
+ }, {}, {}>;
3115
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
3116
+ name: "created_at";
3117
+ tableName: "person_payment_methods";
3118
+ dataType: "date";
3119
+ columnType: "PgTimestamp";
3120
+ data: Date;
3121
+ driverParam: string;
3122
+ notNull: true;
3123
+ hasDefault: true;
3124
+ isPrimaryKey: false;
3125
+ isAutoincrement: false;
3126
+ hasRuntimeDefault: false;
3127
+ enumValues: undefined;
3128
+ baseColumn: never;
3129
+ identity: undefined;
3130
+ generated: undefined;
3131
+ }, {}, {}>;
3132
+ }>, "where" | "orderBy">;
3133
+ createPersonPaymentMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, data: import("../validation.js").InsertPersonPaymentMethodInput): Promise<{
3134
+ id: string;
3135
+ brand: string;
3136
+ createdAt: Date;
3137
+ personId: string;
3138
+ last4: string | null;
3139
+ holderName: string | null;
3140
+ expMonth: number | null;
3141
+ expYear: number | null;
3142
+ processorToken: string;
3143
+ isDefault: boolean;
3144
+ } | null>;
3145
+ updatePersonPaymentMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("../validation.js").UpdatePersonPaymentMethodInput): Promise<{
3146
+ id: string;
3147
+ personId: string;
3148
+ brand: string;
3149
+ last4: string | null;
3150
+ holderName: string | null;
3151
+ expMonth: number | null;
3152
+ expYear: number | null;
3153
+ processorToken: string;
3154
+ isDefault: boolean;
3155
+ createdAt: Date;
3156
+ } | null>;
3157
+ deletePersonPaymentMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
3158
+ id: string;
3159
+ brand: string;
3160
+ createdAt: Date;
3161
+ personId: string;
3162
+ last4: string | null;
3163
+ holderName: string | null;
3164
+ expMonth: number | null;
3165
+ expYear: number | null;
3166
+ processorToken: string;
3167
+ isDefault: boolean;
3168
+ } | null>;
2771
3169
  updateOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, content: string): Promise<{
2772
3170
  id: string;
2773
3171
  organizationId: string;
@@ -3052,6 +3450,7 @@ export declare const crmService: {
3052
3450
  name: string;
3053
3451
  legalName: string | null;
3054
3452
  website: string | null;
3453
+ vatNumber: string | null;
3055
3454
  industry: string | null;
3056
3455
  relation: "partner" | "supplier" | "other" | "client" | null;
3057
3456
  ownerId: string | null;
@@ -3076,6 +3475,7 @@ export declare const crmService: {
3076
3475
  name: string;
3077
3476
  legalName: string | null;
3078
3477
  website: string | null;
3478
+ vatNumber: string | null;
3079
3479
  industry: string | null;
3080
3480
  relation: "partner" | "supplier" | "other" | "client" | null;
3081
3481
  ownerId: string | null;
@@ -3102,6 +3502,7 @@ export declare const crmService: {
3102
3502
  notes: string | null;
3103
3503
  website: string | null;
3104
3504
  legalName: string | null;
3505
+ vatNumber: string | null;
3105
3506
  industry: string | null;
3106
3507
  ownerId: string | null;
3107
3508
  defaultCurrency: string | null;
@@ -3116,6 +3517,7 @@ export declare const crmService: {
3116
3517
  name: string;
3117
3518
  legalName: string | null;
3118
3519
  website: string | null;
3520
+ vatNumber: string | null;
3119
3521
  industry: string | null;
3120
3522
  relation: "partner" | "supplier" | "other" | "client" | null;
3121
3523
  ownerId: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOtB,CAAA"}
@@ -84,6 +84,7 @@ export declare const organizationCoreSchema: z.ZodObject<{
84
84
  name: z.ZodString;
85
85
  legalName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
86
  website: z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>;
87
+ vatNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
88
  industry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
89
  relation: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
89
90
  partner: "partner";
@@ -109,6 +110,7 @@ export declare const insertOrganizationSchema: z.ZodObject<{
109
110
  name: z.ZodString;
110
111
  legalName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
112
  website: z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>;
113
+ vatNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
114
  industry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
115
  relation: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
114
116
  partner: "partner";
@@ -134,6 +136,7 @@ export declare const updateOrganizationSchema: z.ZodObject<{
134
136
  name: z.ZodOptional<z.ZodString>;
135
137
  legalName: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
136
138
  website: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>>;
139
+ vatNumber: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
137
140
  industry: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
138
141
  relation: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
139
142
  partner: "partner";
@@ -175,7 +178,13 @@ export declare const organizationListQuerySchema: z.ZodObject<{
175
178
  export declare const personCoreSchema: z.ZodObject<{
176
179
  organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
180
  firstName: z.ZodString;
181
+ middleName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
182
  lastName: z.ZodString;
183
+ gender: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
184
+ M: "M";
185
+ F: "F";
186
+ X: "X";
187
+ }>>>;
179
188
  jobTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
189
  relation: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
181
190
  partner: "partner";
@@ -203,7 +212,13 @@ export declare const personCoreSchema: z.ZodObject<{
203
212
  export declare const insertPersonSchema: z.ZodObject<{
204
213
  organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
214
  firstName: z.ZodString;
215
+ middleName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
216
  lastName: z.ZodString;
217
+ gender: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
218
+ M: "M";
219
+ F: "F";
220
+ X: "X";
221
+ }>>>;
207
222
  jobTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
223
  relation: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
209
224
  partner: "partner";
@@ -231,7 +246,13 @@ export declare const insertPersonSchema: z.ZodObject<{
231
246
  export declare const updatePersonSchema: z.ZodObject<{
232
247
  organizationId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
233
248
  firstName: z.ZodOptional<z.ZodString>;
249
+ middleName: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
234
250
  lastName: z.ZodOptional<z.ZodString>;
251
+ gender: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
252
+ M: "M";
253
+ F: "F";
254
+ X: "X";
255
+ }>>>>;
235
256
  jobTitle: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
236
257
  relation: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
237
258
  partner: "partner";
@@ -804,6 +825,45 @@ export declare const updatePersonNoteSchema: z.ZodObject<{
804
825
  export declare const insertOrganizationNoteSchema: z.ZodObject<{
805
826
  content: z.ZodString;
806
827
  }, z.core.$strip>;
828
+ export declare const paymentMethodBrandSchema: z.ZodEnum<{
829
+ visa: "visa";
830
+ mastercard: "mastercard";
831
+ amex: "amex";
832
+ revolut: "revolut";
833
+ bank_transfer: "bank_transfer";
834
+ }>;
835
+ export declare const insertPersonPaymentMethodSchema: z.ZodObject<{
836
+ brand: z.ZodEnum<{
837
+ visa: "visa";
838
+ mastercard: "mastercard";
839
+ amex: "amex";
840
+ revolut: "revolut";
841
+ bank_transfer: "bank_transfer";
842
+ }>;
843
+ last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
844
+ holderName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
845
+ expMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
846
+ expYear: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
847
+ processorToken: z.ZodString;
848
+ isDefault: z.ZodDefault<z.ZodBoolean>;
849
+ }, z.core.$strip>;
850
+ export declare const updatePersonPaymentMethodSchema: z.ZodObject<{
851
+ brand: z.ZodOptional<z.ZodEnum<{
852
+ visa: "visa";
853
+ mastercard: "mastercard";
854
+ amex: "amex";
855
+ revolut: "revolut";
856
+ bank_transfer: "bank_transfer";
857
+ }>>;
858
+ last4: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
859
+ holderName: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
860
+ expMonth: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
861
+ expYear: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
862
+ processorToken: z.ZodOptional<z.ZodString>;
863
+ isDefault: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
864
+ }, z.core.$strip>;
865
+ export type InsertPersonPaymentMethodInput = z.infer<typeof insertPersonPaymentMethodSchema>;
866
+ export type UpdatePersonPaymentMethodInput = z.infer<typeof updatePersonPaymentMethodSchema>;
807
867
  export declare const updateOrganizationNoteSchema: z.ZodObject<{
808
868
  content: z.ZodString;
809
869
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,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,MA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AO,MAAM,4BAA4B;;iBAEvC,CAAA;AAIF,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAA;AAYF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;iBAA0B,CAAA;AACtE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;iBAAoC,CAAA;AAEhF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAC5F,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE5F,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AAIF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;iBAOvC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;iBAKvC,CAAA;AAIF,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAA"}
@@ -63,6 +63,7 @@ export const organizationCoreSchema = z.object({
63
63
  .optional()
64
64
  .or(z.literal(""))
65
65
  .transform((v) => v || null),
66
+ vatNumber: z.string().nullable().optional(),
66
67
  industry: z.string().nullable().optional(),
67
68
  relation: relationTypeSchema.nullable().optional(),
68
69
  ownerId: z.string().nullable().optional(),
@@ -86,7 +87,9 @@ export const organizationListQuerySchema = paginationSchema.extend({
86
87
  export const personCoreSchema = z.object({
87
88
  organizationId: z.string().nullable().optional(),
88
89
  firstName: z.string().min(1),
90
+ middleName: z.string().nullable().optional(),
89
91
  lastName: z.string().min(1),
92
+ gender: z.enum(["M", "F", "X"]).nullable().optional(),
90
93
  jobTitle: z.string().nullable().optional(),
91
94
  relation: relationTypeSchema.nullable().optional(),
92
95
  preferredLanguage: z.string().nullable().optional(),
@@ -286,6 +289,25 @@ export const updatePersonNoteSchema = z.object({
286
289
  export const insertOrganizationNoteSchema = z.object({
287
290
  content: z.string().min(1).max(10000),
288
291
  });
292
+ // ---------- payment methods ----------
293
+ export const paymentMethodBrandSchema = z.enum([
294
+ "visa",
295
+ "mastercard",
296
+ "amex",
297
+ "revolut",
298
+ "bank_transfer",
299
+ ]);
300
+ const paymentMethodCoreSchema = z.object({
301
+ brand: paymentMethodBrandSchema,
302
+ last4: z.string().min(2).max(8).nullable().optional(),
303
+ holderName: z.string().nullable().optional(),
304
+ expMonth: z.number().int().min(1).max(12).nullable().optional(),
305
+ expYear: z.number().int().min(2000).max(2100).nullable().optional(),
306
+ processorToken: z.string().min(1),
307
+ isDefault: z.boolean().default(false),
308
+ });
309
+ export const insertPersonPaymentMethodSchema = paymentMethodCoreSchema;
310
+ export const updatePersonPaymentMethodSchema = paymentMethodCoreSchema.partial();
289
311
  export const updateOrganizationNoteSchema = z.object({
290
312
  content: z.string().min(1).max(10000),
291
313
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/crm",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -34,10 +34,10 @@
34
34
  "drizzle-orm": "^0.45.2",
35
35
  "hono": "^4.12.10",
36
36
  "zod": "^4.3.6",
37
- "@voyantjs/core": "0.19.0",
38
- "@voyantjs/db": "0.19.0",
39
- "@voyantjs/hono": "0.19.0",
40
- "@voyantjs/identity": "0.19.0"
37
+ "@voyantjs/core": "0.21.0",
38
+ "@voyantjs/db": "0.21.0",
39
+ "@voyantjs/hono": "0.21.0",
40
+ "@voyantjs/identity": "0.21.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^6.0.2",