@dakkitor/api-contracts 1.1.11 → 1.1.12
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/actives/actives.contract.d.ts +75 -76
- package/dist/actives/actives.contract.d.ts.map +1 -1
- package/dist/actives/actives.contract.js +13 -13
- package/dist/agent-client-links/agent-client-links.contract.d.ts +320 -316
- package/dist/agent-client-links/agent-client-links.contract.d.ts.map +1 -1
- package/dist/agent-client-links/agent-client-links.contract.js +6 -6
- package/dist/auth/auth.contract.d.ts +2 -2
- package/dist/bookings/bookings.contract.d.ts +328 -328
- package/dist/call-history/call-history.contract.d.ts +205 -205
- package/dist/client-contacts/client-contacts.contract.d.ts +334 -332
- package/dist/client-contacts/client-contacts.contract.d.ts.map +1 -1
- package/dist/client-contacts/client-contacts.contract.js +3 -3
- package/dist/clients/clients.contract.d.ts +196 -196
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +404 -404
- package/dist/collaborations/collaborations.contract.d.ts +379 -379
- package/dist/common/error-schemas.d.ts +7 -7
- package/dist/common/error-schemas.d.ts.map +1 -1
- package/dist/companies/companies.contract.d.ts +214 -214
- package/dist/cron-executions/cron-executions.contract.d.ts +206 -206
- package/dist/curated-workers/curated-workers.contract.d.ts +213 -213
- package/dist/dashboards/agent-daily-metrics.contract.d.ts +124 -124
- package/dist/files/files.contract.d.ts +216 -216
- package/dist/health/health.contract.d.ts +22 -22
- package/dist/index.d.ts +971 -971
- package/dist/jobs/jobs.contract.d.ts +210 -210
- package/dist/lead-assignments/lead-assignments.contract.d.ts +248 -248
- package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +40 -40
- package/dist/lead-distribution/lead-distribution-config.contract.d.ts +153 -153
- package/dist/leads/leads.contract.d.ts +246 -246
- package/dist/locations/locations.contract.d.ts +143 -143
- package/dist/postcodes/postcodes.contract.d.ts +56 -56
- package/dist/qualifications/qualifications.contract.d.ts +248 -248
- package/dist/trades/trades.contract.d.ts +156 -156
- package/dist/users/users.contract.d.ts +68 -64
- package/dist/users/users.contract.d.ts.map +1 -1
- package/dist/users/users.contract.js +8 -8
- package/dist/workers/workers.contract.d.ts +226 -226
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AutocompleteQuerySchema } from '../common/common-schemas';
|
|
3
|
+
export declare const UserRoleSchema: z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>;
|
|
4
|
+
export declare const UserSortableFieldsSchema: z.ZodEnum<["lastName", "firstName", "email", "phone", "createdAt"]>;
|
|
3
5
|
export declare const RolesFilterSchema: z.ZodObject<{
|
|
4
6
|
values: z.ZodOptional<z.ZodArray<z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>, "many">>;
|
|
5
7
|
requireAll: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -20,21 +22,21 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
20
22
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
21
23
|
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
22
24
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
id: string;
|
|
24
|
-
firstName: string;
|
|
25
25
|
lastName: string;
|
|
26
|
+
firstName: string;
|
|
26
27
|
email: string;
|
|
27
28
|
phone: string;
|
|
28
29
|
createdAt: string;
|
|
30
|
+
id: string;
|
|
29
31
|
updatedAt: string;
|
|
30
32
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
31
33
|
}, {
|
|
32
|
-
id: string;
|
|
33
|
-
firstName: string;
|
|
34
34
|
lastName: string;
|
|
35
|
+
firstName: string;
|
|
35
36
|
email: string;
|
|
36
37
|
phone: string;
|
|
37
38
|
createdAt: string | Date;
|
|
39
|
+
id: string;
|
|
38
40
|
updatedAt: string | Date;
|
|
39
41
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
40
42
|
}>;
|
|
@@ -46,15 +48,15 @@ export declare const CreateUserSchema: z.ZodObject<{
|
|
|
46
48
|
password: z.ZodOptional<z.ZodString>;
|
|
47
49
|
roles: z.ZodOptional<z.ZodArray<z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>, "many">>;
|
|
48
50
|
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
firstName: string;
|
|
50
51
|
lastName: string;
|
|
52
|
+
firstName: string;
|
|
51
53
|
email: string;
|
|
52
54
|
phone: string;
|
|
53
55
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
54
56
|
password?: string | undefined;
|
|
55
57
|
}, {
|
|
56
|
-
firstName: string;
|
|
57
58
|
lastName: string;
|
|
59
|
+
firstName: string;
|
|
58
60
|
email: string;
|
|
59
61
|
phone: string;
|
|
60
62
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
@@ -68,15 +70,15 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
68
70
|
password: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
69
71
|
roles: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>, "many">>>;
|
|
70
72
|
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
firstName?: string | undefined;
|
|
72
73
|
lastName?: string | undefined;
|
|
74
|
+
firstName?: string | undefined;
|
|
73
75
|
email?: string | undefined;
|
|
74
76
|
phone?: string | undefined;
|
|
75
77
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
76
78
|
password?: string | undefined;
|
|
77
79
|
}, {
|
|
78
|
-
firstName?: string | undefined;
|
|
79
80
|
lastName?: string | undefined;
|
|
81
|
+
firstName?: string | undefined;
|
|
80
82
|
email?: string | undefined;
|
|
81
83
|
phone?: string | undefined;
|
|
82
84
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
@@ -111,7 +113,7 @@ export declare const FilterUserSchema: z.ZodObject<{
|
|
|
111
113
|
requireAll?: boolean | undefined;
|
|
112
114
|
} | undefined;
|
|
113
115
|
name?: string | undefined;
|
|
114
|
-
sortBy?: "
|
|
116
|
+
sortBy?: "lastName" | "firstName" | "email" | "phone" | "createdAt" | undefined;
|
|
115
117
|
sortOrder?: "ASC" | "DESC" | undefined;
|
|
116
118
|
}, {
|
|
117
119
|
email?: string | undefined;
|
|
@@ -123,7 +125,7 @@ export declare const FilterUserSchema: z.ZodObject<{
|
|
|
123
125
|
limit?: number | undefined;
|
|
124
126
|
page?: number | undefined;
|
|
125
127
|
name?: string | undefined;
|
|
126
|
-
sortBy?: "
|
|
128
|
+
sortBy?: "lastName" | "firstName" | "email" | "phone" | "createdAt" | undefined;
|
|
127
129
|
sortOrder?: "ASC" | "DESC" | undefined;
|
|
128
130
|
}>;
|
|
129
131
|
export declare const ProfileSchema: z.ZodObject<{
|
|
@@ -134,17 +136,17 @@ export declare const ProfileSchema: z.ZodObject<{
|
|
|
134
136
|
phone: z.ZodOptional<z.ZodString>;
|
|
135
137
|
roles: z.ZodOptional<z.ZodArray<z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>, "many">>;
|
|
136
138
|
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
id: string;
|
|
138
139
|
email: string;
|
|
139
|
-
|
|
140
|
+
id: string;
|
|
140
141
|
lastName?: string | undefined;
|
|
142
|
+
firstName?: string | undefined;
|
|
141
143
|
phone?: string | undefined;
|
|
142
144
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
143
145
|
}, {
|
|
144
|
-
id: string;
|
|
145
146
|
email: string;
|
|
146
|
-
|
|
147
|
+
id: string;
|
|
147
148
|
lastName?: string | undefined;
|
|
149
|
+
firstName?: string | undefined;
|
|
148
150
|
phone?: string | undefined;
|
|
149
151
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
150
152
|
}>;
|
|
@@ -153,26 +155,26 @@ export declare const UserAutocompleteResponseSchema: z.ZodObject<{
|
|
|
153
155
|
firstName: z.ZodString;
|
|
154
156
|
lastName: z.ZodString;
|
|
155
157
|
}, "strip", z.ZodTypeAny, {
|
|
156
|
-
id: string;
|
|
157
|
-
firstName: string;
|
|
158
158
|
lastName: string;
|
|
159
|
-
}, {
|
|
160
|
-
id: string;
|
|
161
159
|
firstName: string;
|
|
160
|
+
id: string;
|
|
161
|
+
}, {
|
|
162
162
|
lastName: string;
|
|
163
|
+
firstName: string;
|
|
164
|
+
id: string;
|
|
163
165
|
}>;
|
|
164
166
|
export declare const UserAutocompleteArraySchema: z.ZodArray<z.ZodObject<{
|
|
165
167
|
id: z.ZodString;
|
|
166
168
|
firstName: z.ZodString;
|
|
167
169
|
lastName: z.ZodString;
|
|
168
170
|
}, "strip", z.ZodTypeAny, {
|
|
169
|
-
id: string;
|
|
170
|
-
firstName: string;
|
|
171
171
|
lastName: string;
|
|
172
|
-
}, {
|
|
173
|
-
id: string;
|
|
174
172
|
firstName: string;
|
|
173
|
+
id: string;
|
|
174
|
+
}, {
|
|
175
175
|
lastName: string;
|
|
176
|
+
firstName: string;
|
|
177
|
+
id: string;
|
|
176
178
|
}>, "many">;
|
|
177
179
|
export declare const PaginatedUserResponseSchema: z.ZodObject<{
|
|
178
180
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -185,21 +187,21 @@ export declare const PaginatedUserResponseSchema: z.ZodObject<{
|
|
|
185
187
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
186
188
|
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
187
189
|
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
id: string;
|
|
189
|
-
firstName: string;
|
|
190
190
|
lastName: string;
|
|
191
|
+
firstName: string;
|
|
191
192
|
email: string;
|
|
192
193
|
phone: string;
|
|
193
194
|
createdAt: string;
|
|
195
|
+
id: string;
|
|
194
196
|
updatedAt: string;
|
|
195
197
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
196
198
|
}, {
|
|
197
|
-
id: string;
|
|
198
|
-
firstName: string;
|
|
199
199
|
lastName: string;
|
|
200
|
+
firstName: string;
|
|
200
201
|
email: string;
|
|
201
202
|
phone: string;
|
|
202
203
|
createdAt: string | Date;
|
|
204
|
+
id: string;
|
|
203
205
|
updatedAt: string | Date;
|
|
204
206
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
205
207
|
}>, "many">;
|
|
@@ -211,12 +213,12 @@ export declare const PaginatedUserResponseSchema: z.ZodObject<{
|
|
|
211
213
|
}, "strip", z.ZodTypeAny, {
|
|
212
214
|
limit: number;
|
|
213
215
|
items: {
|
|
214
|
-
id: string;
|
|
215
|
-
firstName: string;
|
|
216
216
|
lastName: string;
|
|
217
|
+
firstName: string;
|
|
217
218
|
email: string;
|
|
218
219
|
phone: string;
|
|
219
220
|
createdAt: string;
|
|
221
|
+
id: string;
|
|
220
222
|
updatedAt: string;
|
|
221
223
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
222
224
|
}[];
|
|
@@ -227,12 +229,12 @@ export declare const PaginatedUserResponseSchema: z.ZodObject<{
|
|
|
227
229
|
}, {
|
|
228
230
|
limit: number;
|
|
229
231
|
items: {
|
|
230
|
-
id: string;
|
|
231
|
-
firstName: string;
|
|
232
232
|
lastName: string;
|
|
233
|
+
firstName: string;
|
|
233
234
|
email: string;
|
|
234
235
|
phone: string;
|
|
235
236
|
createdAt: string | Date;
|
|
237
|
+
id: string;
|
|
236
238
|
updatedAt: string | Date;
|
|
237
239
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
238
240
|
}[];
|
|
@@ -242,6 +244,8 @@ export declare const PaginatedUserResponseSchema: z.ZodObject<{
|
|
|
242
244
|
totalPages: number;
|
|
243
245
|
}>;
|
|
244
246
|
export type User = z.infer<typeof UserSchema>;
|
|
247
|
+
export type UserRole = z.infer<typeof UserRoleSchema>;
|
|
248
|
+
export type UserSortableFields = z.infer<typeof UserSortableFieldsSchema>;
|
|
245
249
|
export type CreateUser = z.infer<typeof CreateUserSchema>;
|
|
246
250
|
export type UpdateUser = z.infer<typeof UpdateUserSchema>;
|
|
247
251
|
export type RolesFilter = z.infer<typeof RolesFilterSchema>;
|
|
@@ -266,15 +270,15 @@ export declare const usersContract: {
|
|
|
266
270
|
password: z.ZodOptional<z.ZodString>;
|
|
267
271
|
roles: z.ZodOptional<z.ZodArray<z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>, "many">>;
|
|
268
272
|
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
firstName: string;
|
|
270
273
|
lastName: string;
|
|
274
|
+
firstName: string;
|
|
271
275
|
email: string;
|
|
272
276
|
phone: string;
|
|
273
277
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
274
278
|
password?: string | undefined;
|
|
275
279
|
}, {
|
|
276
|
-
firstName: string;
|
|
277
280
|
lastName: string;
|
|
281
|
+
firstName: string;
|
|
278
282
|
email: string;
|
|
279
283
|
phone: string;
|
|
280
284
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
@@ -392,21 +396,21 @@ export declare const usersContract: {
|
|
|
392
396
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
393
397
|
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
394
398
|
}, "strip", z.ZodTypeAny, {
|
|
395
|
-
id: string;
|
|
396
|
-
firstName: string;
|
|
397
399
|
lastName: string;
|
|
400
|
+
firstName: string;
|
|
398
401
|
email: string;
|
|
399
402
|
phone: string;
|
|
400
403
|
createdAt: string;
|
|
404
|
+
id: string;
|
|
401
405
|
updatedAt: string;
|
|
402
406
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
403
407
|
}, {
|
|
404
|
-
id: string;
|
|
405
|
-
firstName: string;
|
|
406
408
|
lastName: string;
|
|
409
|
+
firstName: string;
|
|
407
410
|
email: string;
|
|
408
411
|
phone: string;
|
|
409
412
|
createdAt: string | Date;
|
|
413
|
+
id: string;
|
|
410
414
|
updatedAt: string | Date;
|
|
411
415
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
412
416
|
}>;
|
|
@@ -470,7 +474,7 @@ export declare const usersContract: {
|
|
|
470
474
|
requireAll?: boolean | undefined;
|
|
471
475
|
} | undefined;
|
|
472
476
|
name?: string | undefined;
|
|
473
|
-
sortBy?: "
|
|
477
|
+
sortBy?: "lastName" | "firstName" | "email" | "phone" | "createdAt" | undefined;
|
|
474
478
|
sortOrder?: "ASC" | "DESC" | undefined;
|
|
475
479
|
}, {
|
|
476
480
|
email?: string | undefined;
|
|
@@ -482,7 +486,7 @@ export declare const usersContract: {
|
|
|
482
486
|
limit?: number | undefined;
|
|
483
487
|
page?: number | undefined;
|
|
484
488
|
name?: string | undefined;
|
|
485
|
-
sortBy?: "
|
|
489
|
+
sortBy?: "lastName" | "firstName" | "email" | "phone" | "createdAt" | undefined;
|
|
486
490
|
sortOrder?: "ASC" | "DESC" | undefined;
|
|
487
491
|
}>;
|
|
488
492
|
summary: "Get all users";
|
|
@@ -600,21 +604,21 @@ export declare const usersContract: {
|
|
|
600
604
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
601
605
|
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
602
606
|
}, "strip", z.ZodTypeAny, {
|
|
603
|
-
id: string;
|
|
604
|
-
firstName: string;
|
|
605
607
|
lastName: string;
|
|
608
|
+
firstName: string;
|
|
606
609
|
email: string;
|
|
607
610
|
phone: string;
|
|
608
611
|
createdAt: string;
|
|
612
|
+
id: string;
|
|
609
613
|
updatedAt: string;
|
|
610
614
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
611
615
|
}, {
|
|
612
|
-
id: string;
|
|
613
|
-
firstName: string;
|
|
614
616
|
lastName: string;
|
|
617
|
+
firstName: string;
|
|
615
618
|
email: string;
|
|
616
619
|
phone: string;
|
|
617
620
|
createdAt: string | Date;
|
|
621
|
+
id: string;
|
|
618
622
|
updatedAt: string | Date;
|
|
619
623
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
620
624
|
}>, "many">;
|
|
@@ -626,12 +630,12 @@ export declare const usersContract: {
|
|
|
626
630
|
}, "strip", z.ZodTypeAny, {
|
|
627
631
|
limit: number;
|
|
628
632
|
items: {
|
|
629
|
-
id: string;
|
|
630
|
-
firstName: string;
|
|
631
633
|
lastName: string;
|
|
634
|
+
firstName: string;
|
|
632
635
|
email: string;
|
|
633
636
|
phone: string;
|
|
634
637
|
createdAt: string;
|
|
638
|
+
id: string;
|
|
635
639
|
updatedAt: string;
|
|
636
640
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
637
641
|
}[];
|
|
@@ -642,12 +646,12 @@ export declare const usersContract: {
|
|
|
642
646
|
}, {
|
|
643
647
|
limit: number;
|
|
644
648
|
items: {
|
|
645
|
-
id: string;
|
|
646
|
-
firstName: string;
|
|
647
649
|
lastName: string;
|
|
650
|
+
firstName: string;
|
|
648
651
|
email: string;
|
|
649
652
|
phone: string;
|
|
650
653
|
createdAt: string | Date;
|
|
654
|
+
id: string;
|
|
651
655
|
updatedAt: string | Date;
|
|
652
656
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
653
657
|
}[];
|
|
@@ -781,13 +785,13 @@ export declare const usersContract: {
|
|
|
781
785
|
firstName: z.ZodString;
|
|
782
786
|
lastName: z.ZodString;
|
|
783
787
|
}, "strip", z.ZodTypeAny, {
|
|
784
|
-
id: string;
|
|
785
|
-
firstName: string;
|
|
786
788
|
lastName: string;
|
|
787
|
-
}, {
|
|
788
|
-
id: string;
|
|
789
789
|
firstName: string;
|
|
790
|
+
id: string;
|
|
791
|
+
}, {
|
|
790
792
|
lastName: string;
|
|
793
|
+
firstName: string;
|
|
794
|
+
id: string;
|
|
791
795
|
}>, "many">;
|
|
792
796
|
};
|
|
793
797
|
};
|
|
@@ -907,17 +911,17 @@ export declare const usersContract: {
|
|
|
907
911
|
phone: z.ZodOptional<z.ZodString>;
|
|
908
912
|
roles: z.ZodOptional<z.ZodArray<z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>, "many">>;
|
|
909
913
|
}, "strip", z.ZodTypeAny, {
|
|
910
|
-
id: string;
|
|
911
914
|
email: string;
|
|
912
|
-
|
|
915
|
+
id: string;
|
|
913
916
|
lastName?: string | undefined;
|
|
917
|
+
firstName?: string | undefined;
|
|
914
918
|
phone?: string | undefined;
|
|
915
919
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
916
920
|
}, {
|
|
917
|
-
id: string;
|
|
918
921
|
email: string;
|
|
919
|
-
|
|
922
|
+
id: string;
|
|
920
923
|
lastName?: string | undefined;
|
|
924
|
+
firstName?: string | undefined;
|
|
921
925
|
phone?: string | undefined;
|
|
922
926
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
923
927
|
}>;
|
|
@@ -1048,21 +1052,21 @@ export declare const usersContract: {
|
|
|
1048
1052
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
1049
1053
|
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
1050
1054
|
}, "strip", z.ZodTypeAny, {
|
|
1051
|
-
id: string;
|
|
1052
|
-
firstName: string;
|
|
1053
1055
|
lastName: string;
|
|
1056
|
+
firstName: string;
|
|
1054
1057
|
email: string;
|
|
1055
1058
|
phone: string;
|
|
1056
1059
|
createdAt: string;
|
|
1060
|
+
id: string;
|
|
1057
1061
|
updatedAt: string;
|
|
1058
1062
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
1059
1063
|
}, {
|
|
1060
|
-
id: string;
|
|
1061
|
-
firstName: string;
|
|
1062
1064
|
lastName: string;
|
|
1065
|
+
firstName: string;
|
|
1063
1066
|
email: string;
|
|
1064
1067
|
phone: string;
|
|
1065
1068
|
createdAt: string | Date;
|
|
1069
|
+
id: string;
|
|
1066
1070
|
updatedAt: string | Date;
|
|
1067
1071
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
1068
1072
|
}>;
|
|
@@ -1114,15 +1118,15 @@ export declare const usersContract: {
|
|
|
1114
1118
|
password: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1115
1119
|
roles: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<["ADMIN", "SECOND_AGENT", "FIRST_AGENT", "COMPANY_CHECKING"]>, "many">>>;
|
|
1116
1120
|
}, "strip", z.ZodTypeAny, {
|
|
1117
|
-
firstName?: string | undefined;
|
|
1118
1121
|
lastName?: string | undefined;
|
|
1122
|
+
firstName?: string | undefined;
|
|
1119
1123
|
email?: string | undefined;
|
|
1120
1124
|
phone?: string | undefined;
|
|
1121
1125
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
1122
1126
|
password?: string | undefined;
|
|
1123
1127
|
}, {
|
|
1124
|
-
firstName?: string | undefined;
|
|
1125
1128
|
lastName?: string | undefined;
|
|
1129
|
+
firstName?: string | undefined;
|
|
1126
1130
|
email?: string | undefined;
|
|
1127
1131
|
phone?: string | undefined;
|
|
1128
1132
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
@@ -1240,21 +1244,21 @@ export declare const usersContract: {
|
|
|
1240
1244
|
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
1241
1245
|
updatedAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, string, string | Date>;
|
|
1242
1246
|
}, "strip", z.ZodTypeAny, {
|
|
1243
|
-
id: string;
|
|
1244
|
-
firstName: string;
|
|
1245
1247
|
lastName: string;
|
|
1248
|
+
firstName: string;
|
|
1246
1249
|
email: string;
|
|
1247
1250
|
phone: string;
|
|
1248
1251
|
createdAt: string;
|
|
1252
|
+
id: string;
|
|
1249
1253
|
updatedAt: string;
|
|
1250
1254
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
1251
1255
|
}, {
|
|
1252
|
-
id: string;
|
|
1253
|
-
firstName: string;
|
|
1254
1256
|
lastName: string;
|
|
1257
|
+
firstName: string;
|
|
1255
1258
|
email: string;
|
|
1256
1259
|
phone: string;
|
|
1257
1260
|
createdAt: string | Date;
|
|
1261
|
+
id: string;
|
|
1258
1262
|
updatedAt: string | Date;
|
|
1259
1263
|
roles?: ("ADMIN" | "SECOND_AGENT" | "FIRST_AGENT" | "COMPANY_CHECKING")[] | undefined;
|
|
1260
1264
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.contract.d.ts","sourceRoot":"","sources":["../../contracts/users/users.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,uBAAuB,EAExB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"users.contract.d.ts","sourceRoot":"","sources":["../../contracts/users/users.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,uBAAuB,EAExB,MAAM,0BAA0B,CAAC;AAOlC,eAAO,MAAM,cAAc,yEAKzB,CAAC;AAEH,eAAO,MAAM,wBAAwB,qEAMnC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAW5B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;EAerB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;EASM,CAAC;AAEpC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB3B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;EAYM,CAAC;AAEjC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FzB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usersContract = exports.PaginatedUserResponseSchema = exports.UserAutocompleteArraySchema = exports.UserAutocompleteResponseSchema = exports.ProfileSchema = exports.FilterUserSchema = exports.UpdateUserSchema = exports.CreateUserSchema = exports.UserSchema = exports.RolesFilterSchema = void 0;
|
|
3
|
+
exports.usersContract = exports.PaginatedUserResponseSchema = exports.UserAutocompleteArraySchema = exports.UserAutocompleteResponseSchema = exports.ProfileSchema = exports.FilterUserSchema = exports.UpdateUserSchema = exports.CreateUserSchema = exports.UserSchema = exports.RolesFilterSchema = exports.UserSortableFieldsSchema = exports.UserRoleSchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@anatine/zod-openapi");
|
|
5
5
|
const core_1 = require("@ts-rest/core");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -9,13 +9,13 @@ const error_schemas_1 = require("../common/error-schemas");
|
|
|
9
9
|
const pagination_query_schema_1 = require("../common/pagination-query.schema");
|
|
10
10
|
const pagination_schema_1 = require("../common/pagination.schema");
|
|
11
11
|
(0, zod_openapi_1.extendZodWithOpenApi)(zod_1.z);
|
|
12
|
-
|
|
12
|
+
exports.UserRoleSchema = zod_1.z.enum([
|
|
13
13
|
'ADMIN',
|
|
14
14
|
'SECOND_AGENT',
|
|
15
15
|
'FIRST_AGENT',
|
|
16
16
|
'COMPANY_CHECKING',
|
|
17
17
|
]);
|
|
18
|
-
|
|
18
|
+
exports.UserSortableFieldsSchema = zod_1.z.enum([
|
|
19
19
|
'lastName',
|
|
20
20
|
'firstName',
|
|
21
21
|
'email',
|
|
@@ -24,7 +24,7 @@ const UserSortableFieldsSchema = zod_1.z.enum([
|
|
|
24
24
|
]);
|
|
25
25
|
exports.RolesFilterSchema = zod_1.z.object({
|
|
26
26
|
values: zod_1.z
|
|
27
|
-
.array(UserRoleSchema)
|
|
27
|
+
.array(exports.UserRoleSchema)
|
|
28
28
|
.optional()
|
|
29
29
|
.describe('Array of roles to filter by'),
|
|
30
30
|
requireAll: zod_1.z
|
|
@@ -38,7 +38,7 @@ exports.UserSchema = zod_1.z.object({
|
|
|
38
38
|
lastName: zod_1.z.string().describe("The user's last name."),
|
|
39
39
|
email: zod_1.z.string().email().describe("The user's email address."),
|
|
40
40
|
phone: zod_1.z.string().describe("The user's phone number."),
|
|
41
|
-
roles: zod_1.z.array(UserRoleSchema).optional().describe("The user's roles."),
|
|
41
|
+
roles: zod_1.z.array(exports.UserRoleSchema).optional().describe("The user's roles."),
|
|
42
42
|
createdAt: zod_1.z
|
|
43
43
|
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
44
44
|
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
@@ -55,7 +55,7 @@ exports.CreateUserSchema = zod_1.z
|
|
|
55
55
|
email: zod_1.z.string().email().describe('Enter email address'),
|
|
56
56
|
phone: zod_1.z.string().min(1).describe('Enter phone number'), // Basic validation, can be enhanced
|
|
57
57
|
password: zod_1.z.string().min(8).optional().describe('Enter password'),
|
|
58
|
-
roles: zod_1.z.array(UserRoleSchema).optional().describe('Select roles'),
|
|
58
|
+
roles: zod_1.z.array(exports.UserRoleSchema).optional().describe('Select roles'),
|
|
59
59
|
})
|
|
60
60
|
.openapi({ title: 'CreateUser' });
|
|
61
61
|
exports.UpdateUserSchema = exports.CreateUserSchema.partial().openapi({
|
|
@@ -75,7 +75,7 @@ exports.FilterUserSchema = pagination_query_schema_1.PaginationQuerySchema.exten
|
|
|
75
75
|
.optional()
|
|
76
76
|
.describe('Filter users by phone number (partial match)'),
|
|
77
77
|
roles: exports.RolesFilterSchema.optional().describe('Filter users by roles.'),
|
|
78
|
-
sortBy: UserSortableFieldsSchema.optional().describe('Field to sort users by.'),
|
|
78
|
+
sortBy: exports.UserSortableFieldsSchema.optional().describe('Field to sort users by.'),
|
|
79
79
|
sortOrder: common_schemas_1.SortOrderSchema.optional().describe('Sort order (ASC or DESC)'),
|
|
80
80
|
});
|
|
81
81
|
exports.ProfileSchema = zod_1.z
|
|
@@ -86,7 +86,7 @@ exports.ProfileSchema = zod_1.z
|
|
|
86
86
|
lastName: zod_1.z.string().optional().describe('The last name of the user.'),
|
|
87
87
|
phone: zod_1.z.string().optional().describe('The phone number of the user.'),
|
|
88
88
|
roles: zod_1.z
|
|
89
|
-
.array(UserRoleSchema)
|
|
89
|
+
.array(exports.UserRoleSchema)
|
|
90
90
|
.optional()
|
|
91
91
|
.describe('The roles assigned to the user.'),
|
|
92
92
|
})
|