@dakkitor/api-contracts 1.1.145 → 1.1.147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/abilities/first-agent.abilities.json +39 -0
  2. package/dist/abilities/second-agent.abilities.json +36 -0
  3. package/dist/abilities/team-leads.json +30 -0
  4. package/dist/actives/actives.contract.d.ts +8606 -8270
  5. package/dist/actives/actives.contract.d.ts.map +1 -1
  6. package/dist/agent-client-links/agent-client-links.contract.d.ts +973 -973
  7. package/dist/auth/auth.contract.d.ts +12 -12
  8. package/dist/bookings/bookings.contract.d.ts +12119 -11729
  9. package/dist/bookings/bookings.contract.d.ts.map +1 -1
  10. package/dist/bookings/bookings.contract.js +4 -6
  11. package/dist/call-history/call-history.contract.d.ts +620 -620
  12. package/dist/client-contacts/client-contacts.contract.d.ts +277 -277
  13. package/dist/clients/clients.contract.d.ts +173 -173
  14. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +1868 -1868
  15. package/dist/collaborations/collaborations.contract.d.ts +1548 -1548
  16. package/dist/common/common-schemas.d.ts +4 -4
  17. package/dist/common/common-schemas.d.ts.map +1 -1
  18. package/dist/common/common-schemas.js +9 -7
  19. package/dist/companies/companies.contract.d.ts +26 -26
  20. package/dist/crews/crews.contract.d.ts +2549 -0
  21. package/dist/crews/crews.contract.d.ts.map +1 -0
  22. package/dist/crews/crews.contract.js +203 -0
  23. package/dist/cron-executions/cron-executions.contract.d.ts +26 -26
  24. package/dist/curated-workers/curated-workers.contract.d.ts +517 -517
  25. package/dist/dashboards/dashboard-widgets.contract.d.ts +66 -66
  26. package/dist/dashboards/dashboard.contract.d.ts +26 -26
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +3 -0
  30. package/dist/jobs/jobs.contract.d.ts +4309 -4309
  31. package/dist/kpi-impersonation/kpi-impersonation.contract.d.ts +26 -26
  32. package/dist/lead-assignments/lead-assignments.contract.d.ts +498 -498
  33. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +131 -131
  34. package/dist/leads/leads.contract.d.ts +184 -184
  35. package/dist/locations/locations.contract.d.ts +28 -28
  36. package/dist/own-research/own-research.contract.d.ts +728 -728
  37. package/dist/users/users.contract.d.ts +154 -154
  38. package/dist/workers/workers.contract.d.ts +6476 -4566
  39. package/dist/workers/workers.contract.d.ts.map +1 -1
  40. package/dist/workers/workers.contract.js +217 -65
  41. package/package.json +1 -1
@@ -0,0 +1,2549 @@
1
+ import { z } from 'zod';
2
+ export declare const CrewLeadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
3
+ export type CrewLeadType = z.infer<typeof CrewLeadType>;
4
+ export declare const SupplierSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ name: z.ZodString;
7
+ phoneNumber: z.ZodString;
8
+ email: z.ZodNullable<z.ZodString>;
9
+ company: z.ZodNullable<z.ZodString>;
10
+ notes: z.ZodNullable<z.ZodString>;
11
+ createdAt: z.ZodOptional<z.ZodString>;
12
+ updatedAt: z.ZodOptional<z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ id: string;
15
+ name: string;
16
+ company: string | null;
17
+ email: string | null;
18
+ phoneNumber: string;
19
+ notes: string | null;
20
+ updatedAt?: string | undefined;
21
+ createdAt?: string | undefined;
22
+ }, {
23
+ id: string;
24
+ name: string;
25
+ company: string | null;
26
+ email: string | null;
27
+ phoneNumber: string;
28
+ notes: string | null;
29
+ updatedAt?: string | undefined;
30
+ createdAt?: string | undefined;
31
+ }>;
32
+ export declare const CreateSupplierSchema: z.ZodObject<{
33
+ name: z.ZodString;
34
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
35
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ name: string;
40
+ phoneNumber: string;
41
+ company?: string | null | undefined;
42
+ email?: string | null | undefined;
43
+ notes?: string | null | undefined;
44
+ }, {
45
+ name: string;
46
+ phoneNumber: string;
47
+ company?: string | null | undefined;
48
+ email?: string | null | undefined;
49
+ notes?: string | null | undefined;
50
+ }>;
51
+ export type Supplier = z.infer<typeof SupplierSchema>;
52
+ export type CreateSupplier = z.infer<typeof CreateSupplierSchema>;
53
+ export declare const CrewSummarySchema: z.ZodObject<{
54
+ id: z.ZodString;
55
+ name: z.ZodString;
56
+ leadName: z.ZodString;
57
+ leadPhone: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ id: string;
60
+ name: string;
61
+ leadName: string;
62
+ leadPhone: string;
63
+ }, {
64
+ id: string;
65
+ name: string;
66
+ leadName: string;
67
+ leadPhone: string;
68
+ }>;
69
+ export type CrewSummary = z.infer<typeof CrewSummarySchema>;
70
+ export declare const CrewSchema: z.ZodObject<{
71
+ id: z.ZodString;
72
+ name: z.ZodString;
73
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
74
+ leadWorker: z.ZodNullable<z.ZodObject<{
75
+ id: z.ZodString;
76
+ firstName: z.ZodString;
77
+ lastName: z.ZodNullable<z.ZodString>;
78
+ hasPhoneNumber: z.ZodBoolean;
79
+ }, "strip", z.ZodTypeAny, {
80
+ id: string;
81
+ firstName: string;
82
+ lastName: string | null;
83
+ hasPhoneNumber: boolean;
84
+ }, {
85
+ id: string;
86
+ firstName: string;
87
+ lastName: string | null;
88
+ hasPhoneNumber: boolean;
89
+ }>>;
90
+ leadSupplier: z.ZodNullable<z.ZodObject<{
91
+ id: z.ZodString;
92
+ name: z.ZodString;
93
+ phoneNumber: z.ZodString;
94
+ email: z.ZodNullable<z.ZodString>;
95
+ company: z.ZodNullable<z.ZodString>;
96
+ notes: z.ZodNullable<z.ZodString>;
97
+ createdAt: z.ZodOptional<z.ZodString>;
98
+ updatedAt: z.ZodOptional<z.ZodString>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ id: string;
101
+ name: string;
102
+ company: string | null;
103
+ email: string | null;
104
+ phoneNumber: string;
105
+ notes: string | null;
106
+ updatedAt?: string | undefined;
107
+ createdAt?: string | undefined;
108
+ }, {
109
+ id: string;
110
+ name: string;
111
+ company: string | null;
112
+ email: string | null;
113
+ phoneNumber: string;
114
+ notes: string | null;
115
+ updatedAt?: string | undefined;
116
+ createdAt?: string | undefined;
117
+ }>>;
118
+ memberCount: z.ZodNumber;
119
+ maxMembers: z.ZodNumber;
120
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
121
+ id: z.ZodString;
122
+ firstName: z.ZodString;
123
+ lastName: z.ZodNullable<z.ZodString>;
124
+ hasPhoneNumber: z.ZodBoolean;
125
+ }, "strip", z.ZodTypeAny, {
126
+ id: string;
127
+ firstName: string;
128
+ lastName: string | null;
129
+ hasPhoneNumber: boolean;
130
+ }, {
131
+ id: string;
132
+ firstName: string;
133
+ lastName: string | null;
134
+ hasPhoneNumber: boolean;
135
+ }>, "many">>;
136
+ createdAt: z.ZodOptional<z.ZodString>;
137
+ updatedAt: z.ZodOptional<z.ZodString>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ id: string;
140
+ name: string;
141
+ leadType: "WORKER" | "SUPPLIER";
142
+ leadWorker: {
143
+ id: string;
144
+ firstName: string;
145
+ lastName: string | null;
146
+ hasPhoneNumber: boolean;
147
+ } | null;
148
+ leadSupplier: {
149
+ id: string;
150
+ name: string;
151
+ company: string | null;
152
+ email: string | null;
153
+ phoneNumber: string;
154
+ notes: string | null;
155
+ updatedAt?: string | undefined;
156
+ createdAt?: string | undefined;
157
+ } | null;
158
+ memberCount: number;
159
+ maxMembers: number;
160
+ updatedAt?: string | undefined;
161
+ createdAt?: string | undefined;
162
+ members?: {
163
+ id: string;
164
+ firstName: string;
165
+ lastName: string | null;
166
+ hasPhoneNumber: boolean;
167
+ }[] | undefined;
168
+ }, {
169
+ id: string;
170
+ name: string;
171
+ leadType: "WORKER" | "SUPPLIER";
172
+ leadWorker: {
173
+ id: string;
174
+ firstName: string;
175
+ lastName: string | null;
176
+ hasPhoneNumber: boolean;
177
+ } | null;
178
+ leadSupplier: {
179
+ id: string;
180
+ name: string;
181
+ company: string | null;
182
+ email: string | null;
183
+ phoneNumber: string;
184
+ notes: string | null;
185
+ updatedAt?: string | undefined;
186
+ createdAt?: string | undefined;
187
+ } | null;
188
+ memberCount: number;
189
+ maxMembers: number;
190
+ updatedAt?: string | undefined;
191
+ createdAt?: string | undefined;
192
+ members?: {
193
+ id: string;
194
+ firstName: string;
195
+ lastName: string | null;
196
+ hasPhoneNumber: boolean;
197
+ }[] | undefined;
198
+ }>;
199
+ export declare const CreateCrewSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
200
+ name: z.ZodString;
201
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
202
+ leadWorkerId: z.ZodOptional<z.ZodString>;
203
+ supplier: z.ZodOptional<z.ZodObject<{
204
+ name: z.ZodString;
205
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
206
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ name: string;
211
+ phoneNumber: string;
212
+ company?: string | null | undefined;
213
+ email?: string | null | undefined;
214
+ notes?: string | null | undefined;
215
+ }, {
216
+ name: string;
217
+ phoneNumber: string;
218
+ company?: string | null | undefined;
219
+ email?: string | null | undefined;
220
+ notes?: string | null | undefined;
221
+ }>>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ name: string;
224
+ leadType: "WORKER" | "SUPPLIER";
225
+ leadWorkerId?: string | undefined;
226
+ supplier?: {
227
+ name: string;
228
+ phoneNumber: string;
229
+ company?: string | null | undefined;
230
+ email?: string | null | undefined;
231
+ notes?: string | null | undefined;
232
+ } | undefined;
233
+ }, {
234
+ name: string;
235
+ leadType: "WORKER" | "SUPPLIER";
236
+ leadWorkerId?: string | undefined;
237
+ supplier?: {
238
+ name: string;
239
+ phoneNumber: string;
240
+ company?: string | null | undefined;
241
+ email?: string | null | undefined;
242
+ notes?: string | null | undefined;
243
+ } | undefined;
244
+ }>, {
245
+ name: string;
246
+ leadType: "WORKER" | "SUPPLIER";
247
+ leadWorkerId?: string | undefined;
248
+ supplier?: {
249
+ name: string;
250
+ phoneNumber: string;
251
+ company?: string | null | undefined;
252
+ email?: string | null | undefined;
253
+ notes?: string | null | undefined;
254
+ } | undefined;
255
+ }, {
256
+ name: string;
257
+ leadType: "WORKER" | "SUPPLIER";
258
+ leadWorkerId?: string | undefined;
259
+ supplier?: {
260
+ name: string;
261
+ phoneNumber: string;
262
+ company?: string | null | undefined;
263
+ email?: string | null | undefined;
264
+ notes?: string | null | undefined;
265
+ } | undefined;
266
+ }>, {
267
+ name: string;
268
+ leadType: "WORKER" | "SUPPLIER";
269
+ leadWorkerId?: string | undefined;
270
+ supplier?: {
271
+ name: string;
272
+ phoneNumber: string;
273
+ company?: string | null | undefined;
274
+ email?: string | null | undefined;
275
+ notes?: string | null | undefined;
276
+ } | undefined;
277
+ }, {
278
+ name: string;
279
+ leadType: "WORKER" | "SUPPLIER";
280
+ leadWorkerId?: string | undefined;
281
+ supplier?: {
282
+ name: string;
283
+ phoneNumber: string;
284
+ company?: string | null | undefined;
285
+ email?: string | null | undefined;
286
+ notes?: string | null | undefined;
287
+ } | undefined;
288
+ }>;
289
+ export declare const UpdateCrewSchema: z.ZodObject<{
290
+ name: z.ZodOptional<z.ZodString>;
291
+ }, "strip", z.ZodTypeAny, {
292
+ name?: string | undefined;
293
+ }, {
294
+ name?: string | undefined;
295
+ }>;
296
+ export declare const AddCrewMembersSchema: z.ZodObject<{
297
+ workerIds: z.ZodArray<z.ZodString, "many">;
298
+ }, "strip", z.ZodTypeAny, {
299
+ workerIds: string[];
300
+ }, {
301
+ workerIds: string[];
302
+ }>;
303
+ export declare const FilterCrewSchema: z.ZodObject<{
304
+ name: z.ZodOptional<z.ZodString>;
305
+ leadType: z.ZodOptional<z.ZodEnum<["WORKER", "SUPPLIER"]>>;
306
+ } & {
307
+ limit: z.ZodDefault<z.ZodNumber>;
308
+ page: z.ZodDefault<z.ZodNumber>;
309
+ }, "strip", z.ZodTypeAny, {
310
+ page: number;
311
+ limit: number;
312
+ name?: string | undefined;
313
+ leadType?: "WORKER" | "SUPPLIER" | undefined;
314
+ }, {
315
+ name?: string | undefined;
316
+ page?: number | undefined;
317
+ limit?: number | undefined;
318
+ leadType?: "WORKER" | "SUPPLIER" | undefined;
319
+ }>;
320
+ export type Crew = z.infer<typeof CrewSchema>;
321
+ export type CreateCrew = z.infer<typeof CreateCrewSchema>;
322
+ export type UpdateCrew = z.infer<typeof UpdateCrewSchema>;
323
+ export type AddCrewMembers = z.infer<typeof AddCrewMembersSchema>;
324
+ export type FilterCrew = z.infer<typeof FilterCrewSchema>;
325
+ export declare const PaginatedCrewResponseSchema: z.ZodObject<{
326
+ items: z.ZodArray<z.ZodObject<{
327
+ id: z.ZodString;
328
+ name: z.ZodString;
329
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
330
+ leadWorker: z.ZodNullable<z.ZodObject<{
331
+ id: z.ZodString;
332
+ firstName: z.ZodString;
333
+ lastName: z.ZodNullable<z.ZodString>;
334
+ hasPhoneNumber: z.ZodBoolean;
335
+ }, "strip", z.ZodTypeAny, {
336
+ id: string;
337
+ firstName: string;
338
+ lastName: string | null;
339
+ hasPhoneNumber: boolean;
340
+ }, {
341
+ id: string;
342
+ firstName: string;
343
+ lastName: string | null;
344
+ hasPhoneNumber: boolean;
345
+ }>>;
346
+ leadSupplier: z.ZodNullable<z.ZodObject<{
347
+ id: z.ZodString;
348
+ name: z.ZodString;
349
+ phoneNumber: z.ZodString;
350
+ email: z.ZodNullable<z.ZodString>;
351
+ company: z.ZodNullable<z.ZodString>;
352
+ notes: z.ZodNullable<z.ZodString>;
353
+ createdAt: z.ZodOptional<z.ZodString>;
354
+ updatedAt: z.ZodOptional<z.ZodString>;
355
+ }, "strip", z.ZodTypeAny, {
356
+ id: string;
357
+ name: string;
358
+ company: string | null;
359
+ email: string | null;
360
+ phoneNumber: string;
361
+ notes: string | null;
362
+ updatedAt?: string | undefined;
363
+ createdAt?: string | undefined;
364
+ }, {
365
+ id: string;
366
+ name: string;
367
+ company: string | null;
368
+ email: string | null;
369
+ phoneNumber: string;
370
+ notes: string | null;
371
+ updatedAt?: string | undefined;
372
+ createdAt?: string | undefined;
373
+ }>>;
374
+ memberCount: z.ZodNumber;
375
+ maxMembers: z.ZodNumber;
376
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
377
+ id: z.ZodString;
378
+ firstName: z.ZodString;
379
+ lastName: z.ZodNullable<z.ZodString>;
380
+ hasPhoneNumber: z.ZodBoolean;
381
+ }, "strip", z.ZodTypeAny, {
382
+ id: string;
383
+ firstName: string;
384
+ lastName: string | null;
385
+ hasPhoneNumber: boolean;
386
+ }, {
387
+ id: string;
388
+ firstName: string;
389
+ lastName: string | null;
390
+ hasPhoneNumber: boolean;
391
+ }>, "many">>;
392
+ createdAt: z.ZodOptional<z.ZodString>;
393
+ updatedAt: z.ZodOptional<z.ZodString>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ id: string;
396
+ name: string;
397
+ leadType: "WORKER" | "SUPPLIER";
398
+ leadWorker: {
399
+ id: string;
400
+ firstName: string;
401
+ lastName: string | null;
402
+ hasPhoneNumber: boolean;
403
+ } | null;
404
+ leadSupplier: {
405
+ id: string;
406
+ name: string;
407
+ company: string | null;
408
+ email: string | null;
409
+ phoneNumber: string;
410
+ notes: string | null;
411
+ updatedAt?: string | undefined;
412
+ createdAt?: string | undefined;
413
+ } | null;
414
+ memberCount: number;
415
+ maxMembers: number;
416
+ updatedAt?: string | undefined;
417
+ createdAt?: string | undefined;
418
+ members?: {
419
+ id: string;
420
+ firstName: string;
421
+ lastName: string | null;
422
+ hasPhoneNumber: boolean;
423
+ }[] | undefined;
424
+ }, {
425
+ id: string;
426
+ name: string;
427
+ leadType: "WORKER" | "SUPPLIER";
428
+ leadWorker: {
429
+ id: string;
430
+ firstName: string;
431
+ lastName: string | null;
432
+ hasPhoneNumber: boolean;
433
+ } | null;
434
+ leadSupplier: {
435
+ id: string;
436
+ name: string;
437
+ company: string | null;
438
+ email: string | null;
439
+ phoneNumber: string;
440
+ notes: string | null;
441
+ updatedAt?: string | undefined;
442
+ createdAt?: string | undefined;
443
+ } | null;
444
+ memberCount: number;
445
+ maxMembers: number;
446
+ updatedAt?: string | undefined;
447
+ createdAt?: string | undefined;
448
+ members?: {
449
+ id: string;
450
+ firstName: string;
451
+ lastName: string | null;
452
+ hasPhoneNumber: boolean;
453
+ }[] | undefined;
454
+ }>, "many">;
455
+ totalCount: z.ZodNumber;
456
+ limit: z.ZodNumber;
457
+ skip: z.ZodNumber;
458
+ currentPage: z.ZodNumber;
459
+ totalPages: z.ZodNumber;
460
+ }, "strip", z.ZodTypeAny, {
461
+ limit: number;
462
+ items: {
463
+ id: string;
464
+ name: string;
465
+ leadType: "WORKER" | "SUPPLIER";
466
+ leadWorker: {
467
+ id: string;
468
+ firstName: string;
469
+ lastName: string | null;
470
+ hasPhoneNumber: boolean;
471
+ } | null;
472
+ leadSupplier: {
473
+ id: string;
474
+ name: string;
475
+ company: string | null;
476
+ email: string | null;
477
+ phoneNumber: string;
478
+ notes: string | null;
479
+ updatedAt?: string | undefined;
480
+ createdAt?: string | undefined;
481
+ } | null;
482
+ memberCount: number;
483
+ maxMembers: number;
484
+ updatedAt?: string | undefined;
485
+ createdAt?: string | undefined;
486
+ members?: {
487
+ id: string;
488
+ firstName: string;
489
+ lastName: string | null;
490
+ hasPhoneNumber: boolean;
491
+ }[] | undefined;
492
+ }[];
493
+ totalCount: number;
494
+ skip: number;
495
+ currentPage: number;
496
+ totalPages: number;
497
+ }, {
498
+ limit: number;
499
+ items: {
500
+ id: string;
501
+ name: string;
502
+ leadType: "WORKER" | "SUPPLIER";
503
+ leadWorker: {
504
+ id: string;
505
+ firstName: string;
506
+ lastName: string | null;
507
+ hasPhoneNumber: boolean;
508
+ } | null;
509
+ leadSupplier: {
510
+ id: string;
511
+ name: string;
512
+ company: string | null;
513
+ email: string | null;
514
+ phoneNumber: string;
515
+ notes: string | null;
516
+ updatedAt?: string | undefined;
517
+ createdAt?: string | undefined;
518
+ } | null;
519
+ memberCount: number;
520
+ maxMembers: number;
521
+ updatedAt?: string | undefined;
522
+ createdAt?: string | undefined;
523
+ members?: {
524
+ id: string;
525
+ firstName: string;
526
+ lastName: string | null;
527
+ hasPhoneNumber: boolean;
528
+ }[] | undefined;
529
+ }[];
530
+ totalCount: number;
531
+ skip: number;
532
+ currentPage: number;
533
+ totalPages: number;
534
+ }>;
535
+ export declare const crewsContract: {
536
+ create: {
537
+ metadata: {
538
+ tags: string[];
539
+ };
540
+ summary: "Create a new crew";
541
+ method: "POST";
542
+ body: z.ZodEffects<z.ZodEffects<z.ZodObject<{
543
+ name: z.ZodString;
544
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
545
+ leadWorkerId: z.ZodOptional<z.ZodString>;
546
+ supplier: z.ZodOptional<z.ZodObject<{
547
+ name: z.ZodString;
548
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
549
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
550
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
551
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
552
+ }, "strip", z.ZodTypeAny, {
553
+ name: string;
554
+ phoneNumber: string;
555
+ company?: string | null | undefined;
556
+ email?: string | null | undefined;
557
+ notes?: string | null | undefined;
558
+ }, {
559
+ name: string;
560
+ phoneNumber: string;
561
+ company?: string | null | undefined;
562
+ email?: string | null | undefined;
563
+ notes?: string | null | undefined;
564
+ }>>;
565
+ }, "strip", z.ZodTypeAny, {
566
+ name: string;
567
+ leadType: "WORKER" | "SUPPLIER";
568
+ leadWorkerId?: string | undefined;
569
+ supplier?: {
570
+ name: string;
571
+ phoneNumber: string;
572
+ company?: string | null | undefined;
573
+ email?: string | null | undefined;
574
+ notes?: string | null | undefined;
575
+ } | undefined;
576
+ }, {
577
+ name: string;
578
+ leadType: "WORKER" | "SUPPLIER";
579
+ leadWorkerId?: string | undefined;
580
+ supplier?: {
581
+ name: string;
582
+ phoneNumber: string;
583
+ company?: string | null | undefined;
584
+ email?: string | null | undefined;
585
+ notes?: string | null | undefined;
586
+ } | undefined;
587
+ }>, {
588
+ name: string;
589
+ leadType: "WORKER" | "SUPPLIER";
590
+ leadWorkerId?: string | undefined;
591
+ supplier?: {
592
+ name: string;
593
+ phoneNumber: string;
594
+ company?: string | null | undefined;
595
+ email?: string | null | undefined;
596
+ notes?: string | null | undefined;
597
+ } | undefined;
598
+ }, {
599
+ name: string;
600
+ leadType: "WORKER" | "SUPPLIER";
601
+ leadWorkerId?: string | undefined;
602
+ supplier?: {
603
+ name: string;
604
+ phoneNumber: string;
605
+ company?: string | null | undefined;
606
+ email?: string | null | undefined;
607
+ notes?: string | null | undefined;
608
+ } | undefined;
609
+ }>, {
610
+ name: string;
611
+ leadType: "WORKER" | "SUPPLIER";
612
+ leadWorkerId?: string | undefined;
613
+ supplier?: {
614
+ name: string;
615
+ phoneNumber: string;
616
+ company?: string | null | undefined;
617
+ email?: string | null | undefined;
618
+ notes?: string | null | undefined;
619
+ } | undefined;
620
+ }, {
621
+ name: string;
622
+ leadType: "WORKER" | "SUPPLIER";
623
+ leadWorkerId?: string | undefined;
624
+ supplier?: {
625
+ name: string;
626
+ phoneNumber: string;
627
+ company?: string | null | undefined;
628
+ email?: string | null | undefined;
629
+ notes?: string | null | undefined;
630
+ } | undefined;
631
+ }>;
632
+ path: "/v2/crews";
633
+ responses: {
634
+ 500: z.ZodObject<{
635
+ statusCode: z.ZodNumber;
636
+ message: z.ZodString;
637
+ code: z.ZodString;
638
+ details: z.ZodOptional<z.ZodUnknown>;
639
+ timestamp: z.ZodString;
640
+ path: z.ZodString;
641
+ correlationId: z.ZodOptional<z.ZodString>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ code: string;
644
+ path: string;
645
+ message: string;
646
+ statusCode: number;
647
+ timestamp: string;
648
+ details?: unknown;
649
+ correlationId?: string | undefined;
650
+ }, {
651
+ code: string;
652
+ path: string;
653
+ message: string;
654
+ statusCode: number;
655
+ timestamp: string;
656
+ details?: unknown;
657
+ correlationId?: string | undefined;
658
+ }>;
659
+ 400: z.ZodObject<{
660
+ statusCode: z.ZodNumber;
661
+ message: z.ZodString;
662
+ code: z.ZodString;
663
+ details: z.ZodOptional<z.ZodUnknown>;
664
+ timestamp: z.ZodString;
665
+ path: z.ZodString;
666
+ correlationId: z.ZodOptional<z.ZodString>;
667
+ }, "strip", z.ZodTypeAny, {
668
+ code: string;
669
+ path: string;
670
+ message: string;
671
+ statusCode: number;
672
+ timestamp: string;
673
+ details?: unknown;
674
+ correlationId?: string | undefined;
675
+ }, {
676
+ code: string;
677
+ path: string;
678
+ message: string;
679
+ statusCode: number;
680
+ timestamp: string;
681
+ details?: unknown;
682
+ correlationId?: string | undefined;
683
+ }>;
684
+ 401: z.ZodObject<{
685
+ statusCode: z.ZodNumber;
686
+ message: z.ZodString;
687
+ code: z.ZodString;
688
+ details: z.ZodOptional<z.ZodUnknown>;
689
+ timestamp: z.ZodString;
690
+ path: z.ZodString;
691
+ correlationId: z.ZodOptional<z.ZodString>;
692
+ }, "strip", z.ZodTypeAny, {
693
+ code: string;
694
+ path: string;
695
+ message: string;
696
+ statusCode: number;
697
+ timestamp: string;
698
+ details?: unknown;
699
+ correlationId?: string | undefined;
700
+ }, {
701
+ code: string;
702
+ path: string;
703
+ message: string;
704
+ statusCode: number;
705
+ timestamp: string;
706
+ details?: unknown;
707
+ correlationId?: string | undefined;
708
+ }>;
709
+ 403: z.ZodObject<{
710
+ statusCode: z.ZodNumber;
711
+ message: z.ZodString;
712
+ code: z.ZodString;
713
+ details: z.ZodOptional<z.ZodUnknown>;
714
+ timestamp: z.ZodString;
715
+ path: z.ZodString;
716
+ correlationId: z.ZodOptional<z.ZodString>;
717
+ }, "strip", z.ZodTypeAny, {
718
+ code: string;
719
+ path: string;
720
+ message: string;
721
+ statusCode: number;
722
+ timestamp: string;
723
+ details?: unknown;
724
+ correlationId?: string | undefined;
725
+ }, {
726
+ code: string;
727
+ path: string;
728
+ message: string;
729
+ statusCode: number;
730
+ timestamp: string;
731
+ details?: unknown;
732
+ correlationId?: string | undefined;
733
+ }>;
734
+ 201: z.ZodObject<{
735
+ id: z.ZodString;
736
+ name: z.ZodString;
737
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
738
+ leadWorker: z.ZodNullable<z.ZodObject<{
739
+ id: z.ZodString;
740
+ firstName: z.ZodString;
741
+ lastName: z.ZodNullable<z.ZodString>;
742
+ hasPhoneNumber: z.ZodBoolean;
743
+ }, "strip", z.ZodTypeAny, {
744
+ id: string;
745
+ firstName: string;
746
+ lastName: string | null;
747
+ hasPhoneNumber: boolean;
748
+ }, {
749
+ id: string;
750
+ firstName: string;
751
+ lastName: string | null;
752
+ hasPhoneNumber: boolean;
753
+ }>>;
754
+ leadSupplier: z.ZodNullable<z.ZodObject<{
755
+ id: z.ZodString;
756
+ name: z.ZodString;
757
+ phoneNumber: z.ZodString;
758
+ email: z.ZodNullable<z.ZodString>;
759
+ company: z.ZodNullable<z.ZodString>;
760
+ notes: z.ZodNullable<z.ZodString>;
761
+ createdAt: z.ZodOptional<z.ZodString>;
762
+ updatedAt: z.ZodOptional<z.ZodString>;
763
+ }, "strip", z.ZodTypeAny, {
764
+ id: string;
765
+ name: string;
766
+ company: string | null;
767
+ email: string | null;
768
+ phoneNumber: string;
769
+ notes: string | null;
770
+ updatedAt?: string | undefined;
771
+ createdAt?: string | undefined;
772
+ }, {
773
+ id: string;
774
+ name: string;
775
+ company: string | null;
776
+ email: string | null;
777
+ phoneNumber: string;
778
+ notes: string | null;
779
+ updatedAt?: string | undefined;
780
+ createdAt?: string | undefined;
781
+ }>>;
782
+ memberCount: z.ZodNumber;
783
+ maxMembers: z.ZodNumber;
784
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
785
+ id: z.ZodString;
786
+ firstName: z.ZodString;
787
+ lastName: z.ZodNullable<z.ZodString>;
788
+ hasPhoneNumber: z.ZodBoolean;
789
+ }, "strip", z.ZodTypeAny, {
790
+ id: string;
791
+ firstName: string;
792
+ lastName: string | null;
793
+ hasPhoneNumber: boolean;
794
+ }, {
795
+ id: string;
796
+ firstName: string;
797
+ lastName: string | null;
798
+ hasPhoneNumber: boolean;
799
+ }>, "many">>;
800
+ createdAt: z.ZodOptional<z.ZodString>;
801
+ updatedAt: z.ZodOptional<z.ZodString>;
802
+ }, "strip", z.ZodTypeAny, {
803
+ id: string;
804
+ name: string;
805
+ leadType: "WORKER" | "SUPPLIER";
806
+ leadWorker: {
807
+ id: string;
808
+ firstName: string;
809
+ lastName: string | null;
810
+ hasPhoneNumber: boolean;
811
+ } | null;
812
+ leadSupplier: {
813
+ id: string;
814
+ name: string;
815
+ company: string | null;
816
+ email: string | null;
817
+ phoneNumber: string;
818
+ notes: string | null;
819
+ updatedAt?: string | undefined;
820
+ createdAt?: string | undefined;
821
+ } | null;
822
+ memberCount: number;
823
+ maxMembers: number;
824
+ updatedAt?: string | undefined;
825
+ createdAt?: string | undefined;
826
+ members?: {
827
+ id: string;
828
+ firstName: string;
829
+ lastName: string | null;
830
+ hasPhoneNumber: boolean;
831
+ }[] | undefined;
832
+ }, {
833
+ id: string;
834
+ name: string;
835
+ leadType: "WORKER" | "SUPPLIER";
836
+ leadWorker: {
837
+ id: string;
838
+ firstName: string;
839
+ lastName: string | null;
840
+ hasPhoneNumber: boolean;
841
+ } | null;
842
+ leadSupplier: {
843
+ id: string;
844
+ name: string;
845
+ company: string | null;
846
+ email: string | null;
847
+ phoneNumber: string;
848
+ notes: string | null;
849
+ updatedAt?: string | undefined;
850
+ createdAt?: string | undefined;
851
+ } | null;
852
+ memberCount: number;
853
+ maxMembers: number;
854
+ updatedAt?: string | undefined;
855
+ createdAt?: string | undefined;
856
+ members?: {
857
+ id: string;
858
+ firstName: string;
859
+ lastName: string | null;
860
+ hasPhoneNumber: boolean;
861
+ }[] | undefined;
862
+ }>;
863
+ 409: z.ZodObject<{
864
+ statusCode: z.ZodNumber;
865
+ message: z.ZodString;
866
+ code: z.ZodString;
867
+ details: z.ZodOptional<z.ZodUnknown>;
868
+ timestamp: z.ZodString;
869
+ path: z.ZodString;
870
+ correlationId: z.ZodOptional<z.ZodString>;
871
+ }, "strip", z.ZodTypeAny, {
872
+ code: string;
873
+ path: string;
874
+ message: string;
875
+ statusCode: number;
876
+ timestamp: string;
877
+ details?: unknown;
878
+ correlationId?: string | undefined;
879
+ }, {
880
+ code: string;
881
+ path: string;
882
+ message: string;
883
+ statusCode: number;
884
+ timestamp: string;
885
+ details?: unknown;
886
+ correlationId?: string | undefined;
887
+ }>;
888
+ };
889
+ };
890
+ findAll: {
891
+ metadata: {
892
+ tags: string[];
893
+ };
894
+ query: z.ZodObject<{
895
+ name: z.ZodOptional<z.ZodString>;
896
+ leadType: z.ZodOptional<z.ZodEnum<["WORKER", "SUPPLIER"]>>;
897
+ } & {
898
+ limit: z.ZodDefault<z.ZodNumber>;
899
+ page: z.ZodDefault<z.ZodNumber>;
900
+ }, "strip", z.ZodTypeAny, {
901
+ page: number;
902
+ limit: number;
903
+ name?: string | undefined;
904
+ leadType?: "WORKER" | "SUPPLIER" | undefined;
905
+ }, {
906
+ name?: string | undefined;
907
+ page?: number | undefined;
908
+ limit?: number | undefined;
909
+ leadType?: "WORKER" | "SUPPLIER" | undefined;
910
+ }>;
911
+ summary: "List all crews";
912
+ method: "GET";
913
+ path: "/v2/crews";
914
+ responses: {
915
+ 500: z.ZodObject<{
916
+ statusCode: z.ZodNumber;
917
+ message: z.ZodString;
918
+ code: z.ZodString;
919
+ details: z.ZodOptional<z.ZodUnknown>;
920
+ timestamp: z.ZodString;
921
+ path: z.ZodString;
922
+ correlationId: z.ZodOptional<z.ZodString>;
923
+ }, "strip", z.ZodTypeAny, {
924
+ code: string;
925
+ path: string;
926
+ message: string;
927
+ statusCode: number;
928
+ timestamp: string;
929
+ details?: unknown;
930
+ correlationId?: string | undefined;
931
+ }, {
932
+ code: string;
933
+ path: string;
934
+ message: string;
935
+ statusCode: number;
936
+ timestamp: string;
937
+ details?: unknown;
938
+ correlationId?: string | undefined;
939
+ }>;
940
+ 400: z.ZodObject<{
941
+ statusCode: z.ZodNumber;
942
+ message: z.ZodString;
943
+ code: z.ZodString;
944
+ details: z.ZodOptional<z.ZodUnknown>;
945
+ timestamp: z.ZodString;
946
+ path: z.ZodString;
947
+ correlationId: z.ZodOptional<z.ZodString>;
948
+ }, "strip", z.ZodTypeAny, {
949
+ code: string;
950
+ path: string;
951
+ message: string;
952
+ statusCode: number;
953
+ timestamp: string;
954
+ details?: unknown;
955
+ correlationId?: string | undefined;
956
+ }, {
957
+ code: string;
958
+ path: string;
959
+ message: string;
960
+ statusCode: number;
961
+ timestamp: string;
962
+ details?: unknown;
963
+ correlationId?: string | undefined;
964
+ }>;
965
+ 401: z.ZodObject<{
966
+ statusCode: z.ZodNumber;
967
+ message: z.ZodString;
968
+ code: z.ZodString;
969
+ details: z.ZodOptional<z.ZodUnknown>;
970
+ timestamp: z.ZodString;
971
+ path: z.ZodString;
972
+ correlationId: z.ZodOptional<z.ZodString>;
973
+ }, "strip", z.ZodTypeAny, {
974
+ code: string;
975
+ path: string;
976
+ message: string;
977
+ statusCode: number;
978
+ timestamp: string;
979
+ details?: unknown;
980
+ correlationId?: string | undefined;
981
+ }, {
982
+ code: string;
983
+ path: string;
984
+ message: string;
985
+ statusCode: number;
986
+ timestamp: string;
987
+ details?: unknown;
988
+ correlationId?: string | undefined;
989
+ }>;
990
+ 403: z.ZodObject<{
991
+ statusCode: z.ZodNumber;
992
+ message: z.ZodString;
993
+ code: z.ZodString;
994
+ details: z.ZodOptional<z.ZodUnknown>;
995
+ timestamp: z.ZodString;
996
+ path: z.ZodString;
997
+ correlationId: z.ZodOptional<z.ZodString>;
998
+ }, "strip", z.ZodTypeAny, {
999
+ code: string;
1000
+ path: string;
1001
+ message: string;
1002
+ statusCode: number;
1003
+ timestamp: string;
1004
+ details?: unknown;
1005
+ correlationId?: string | undefined;
1006
+ }, {
1007
+ code: string;
1008
+ path: string;
1009
+ message: string;
1010
+ statusCode: number;
1011
+ timestamp: string;
1012
+ details?: unknown;
1013
+ correlationId?: string | undefined;
1014
+ }>;
1015
+ 200: z.ZodObject<{
1016
+ items: z.ZodArray<z.ZodObject<{
1017
+ id: z.ZodString;
1018
+ name: z.ZodString;
1019
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
1020
+ leadWorker: z.ZodNullable<z.ZodObject<{
1021
+ id: z.ZodString;
1022
+ firstName: z.ZodString;
1023
+ lastName: z.ZodNullable<z.ZodString>;
1024
+ hasPhoneNumber: z.ZodBoolean;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ id: string;
1027
+ firstName: string;
1028
+ lastName: string | null;
1029
+ hasPhoneNumber: boolean;
1030
+ }, {
1031
+ id: string;
1032
+ firstName: string;
1033
+ lastName: string | null;
1034
+ hasPhoneNumber: boolean;
1035
+ }>>;
1036
+ leadSupplier: z.ZodNullable<z.ZodObject<{
1037
+ id: z.ZodString;
1038
+ name: z.ZodString;
1039
+ phoneNumber: z.ZodString;
1040
+ email: z.ZodNullable<z.ZodString>;
1041
+ company: z.ZodNullable<z.ZodString>;
1042
+ notes: z.ZodNullable<z.ZodString>;
1043
+ createdAt: z.ZodOptional<z.ZodString>;
1044
+ updatedAt: z.ZodOptional<z.ZodString>;
1045
+ }, "strip", z.ZodTypeAny, {
1046
+ id: string;
1047
+ name: string;
1048
+ company: string | null;
1049
+ email: string | null;
1050
+ phoneNumber: string;
1051
+ notes: string | null;
1052
+ updatedAt?: string | undefined;
1053
+ createdAt?: string | undefined;
1054
+ }, {
1055
+ id: string;
1056
+ name: string;
1057
+ company: string | null;
1058
+ email: string | null;
1059
+ phoneNumber: string;
1060
+ notes: string | null;
1061
+ updatedAt?: string | undefined;
1062
+ createdAt?: string | undefined;
1063
+ }>>;
1064
+ memberCount: z.ZodNumber;
1065
+ maxMembers: z.ZodNumber;
1066
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
1067
+ id: z.ZodString;
1068
+ firstName: z.ZodString;
1069
+ lastName: z.ZodNullable<z.ZodString>;
1070
+ hasPhoneNumber: z.ZodBoolean;
1071
+ }, "strip", z.ZodTypeAny, {
1072
+ id: string;
1073
+ firstName: string;
1074
+ lastName: string | null;
1075
+ hasPhoneNumber: boolean;
1076
+ }, {
1077
+ id: string;
1078
+ firstName: string;
1079
+ lastName: string | null;
1080
+ hasPhoneNumber: boolean;
1081
+ }>, "many">>;
1082
+ createdAt: z.ZodOptional<z.ZodString>;
1083
+ updatedAt: z.ZodOptional<z.ZodString>;
1084
+ }, "strip", z.ZodTypeAny, {
1085
+ id: string;
1086
+ name: string;
1087
+ leadType: "WORKER" | "SUPPLIER";
1088
+ leadWorker: {
1089
+ id: string;
1090
+ firstName: string;
1091
+ lastName: string | null;
1092
+ hasPhoneNumber: boolean;
1093
+ } | null;
1094
+ leadSupplier: {
1095
+ id: string;
1096
+ name: string;
1097
+ company: string | null;
1098
+ email: string | null;
1099
+ phoneNumber: string;
1100
+ notes: string | null;
1101
+ updatedAt?: string | undefined;
1102
+ createdAt?: string | undefined;
1103
+ } | null;
1104
+ memberCount: number;
1105
+ maxMembers: number;
1106
+ updatedAt?: string | undefined;
1107
+ createdAt?: string | undefined;
1108
+ members?: {
1109
+ id: string;
1110
+ firstName: string;
1111
+ lastName: string | null;
1112
+ hasPhoneNumber: boolean;
1113
+ }[] | undefined;
1114
+ }, {
1115
+ id: string;
1116
+ name: string;
1117
+ leadType: "WORKER" | "SUPPLIER";
1118
+ leadWorker: {
1119
+ id: string;
1120
+ firstName: string;
1121
+ lastName: string | null;
1122
+ hasPhoneNumber: boolean;
1123
+ } | null;
1124
+ leadSupplier: {
1125
+ id: string;
1126
+ name: string;
1127
+ company: string | null;
1128
+ email: string | null;
1129
+ phoneNumber: string;
1130
+ notes: string | null;
1131
+ updatedAt?: string | undefined;
1132
+ createdAt?: string | undefined;
1133
+ } | null;
1134
+ memberCount: number;
1135
+ maxMembers: number;
1136
+ updatedAt?: string | undefined;
1137
+ createdAt?: string | undefined;
1138
+ members?: {
1139
+ id: string;
1140
+ firstName: string;
1141
+ lastName: string | null;
1142
+ hasPhoneNumber: boolean;
1143
+ }[] | undefined;
1144
+ }>, "many">;
1145
+ totalCount: z.ZodNumber;
1146
+ limit: z.ZodNumber;
1147
+ skip: z.ZodNumber;
1148
+ currentPage: z.ZodNumber;
1149
+ totalPages: z.ZodNumber;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ limit: number;
1152
+ items: {
1153
+ id: string;
1154
+ name: string;
1155
+ leadType: "WORKER" | "SUPPLIER";
1156
+ leadWorker: {
1157
+ id: string;
1158
+ firstName: string;
1159
+ lastName: string | null;
1160
+ hasPhoneNumber: boolean;
1161
+ } | null;
1162
+ leadSupplier: {
1163
+ id: string;
1164
+ name: string;
1165
+ company: string | null;
1166
+ email: string | null;
1167
+ phoneNumber: string;
1168
+ notes: string | null;
1169
+ updatedAt?: string | undefined;
1170
+ createdAt?: string | undefined;
1171
+ } | null;
1172
+ memberCount: number;
1173
+ maxMembers: number;
1174
+ updatedAt?: string | undefined;
1175
+ createdAt?: string | undefined;
1176
+ members?: {
1177
+ id: string;
1178
+ firstName: string;
1179
+ lastName: string | null;
1180
+ hasPhoneNumber: boolean;
1181
+ }[] | undefined;
1182
+ }[];
1183
+ totalCount: number;
1184
+ skip: number;
1185
+ currentPage: number;
1186
+ totalPages: number;
1187
+ }, {
1188
+ limit: number;
1189
+ items: {
1190
+ id: string;
1191
+ name: string;
1192
+ leadType: "WORKER" | "SUPPLIER";
1193
+ leadWorker: {
1194
+ id: string;
1195
+ firstName: string;
1196
+ lastName: string | null;
1197
+ hasPhoneNumber: boolean;
1198
+ } | null;
1199
+ leadSupplier: {
1200
+ id: string;
1201
+ name: string;
1202
+ company: string | null;
1203
+ email: string | null;
1204
+ phoneNumber: string;
1205
+ notes: string | null;
1206
+ updatedAt?: string | undefined;
1207
+ createdAt?: string | undefined;
1208
+ } | null;
1209
+ memberCount: number;
1210
+ maxMembers: number;
1211
+ updatedAt?: string | undefined;
1212
+ createdAt?: string | undefined;
1213
+ members?: {
1214
+ id: string;
1215
+ firstName: string;
1216
+ lastName: string | null;
1217
+ hasPhoneNumber: boolean;
1218
+ }[] | undefined;
1219
+ }[];
1220
+ totalCount: number;
1221
+ skip: number;
1222
+ currentPage: number;
1223
+ totalPages: number;
1224
+ }>;
1225
+ };
1226
+ };
1227
+ findOne: {
1228
+ metadata: {
1229
+ tags: string[];
1230
+ };
1231
+ pathParams: z.ZodObject<{
1232
+ id: z.ZodString;
1233
+ }, "strip", z.ZodTypeAny, {
1234
+ id: string;
1235
+ }, {
1236
+ id: string;
1237
+ }>;
1238
+ summary: "Get crew detail with members";
1239
+ method: "GET";
1240
+ path: "/v2/crews/:id";
1241
+ responses: {
1242
+ 500: z.ZodObject<{
1243
+ statusCode: z.ZodNumber;
1244
+ message: z.ZodString;
1245
+ code: z.ZodString;
1246
+ details: z.ZodOptional<z.ZodUnknown>;
1247
+ timestamp: z.ZodString;
1248
+ path: z.ZodString;
1249
+ correlationId: z.ZodOptional<z.ZodString>;
1250
+ }, "strip", z.ZodTypeAny, {
1251
+ code: string;
1252
+ path: string;
1253
+ message: string;
1254
+ statusCode: number;
1255
+ timestamp: string;
1256
+ details?: unknown;
1257
+ correlationId?: string | undefined;
1258
+ }, {
1259
+ code: string;
1260
+ path: string;
1261
+ message: string;
1262
+ statusCode: number;
1263
+ timestamp: string;
1264
+ details?: unknown;
1265
+ correlationId?: string | undefined;
1266
+ }>;
1267
+ 400: z.ZodObject<{
1268
+ statusCode: z.ZodNumber;
1269
+ message: z.ZodString;
1270
+ code: z.ZodString;
1271
+ details: z.ZodOptional<z.ZodUnknown>;
1272
+ timestamp: z.ZodString;
1273
+ path: z.ZodString;
1274
+ correlationId: z.ZodOptional<z.ZodString>;
1275
+ }, "strip", z.ZodTypeAny, {
1276
+ code: string;
1277
+ path: string;
1278
+ message: string;
1279
+ statusCode: number;
1280
+ timestamp: string;
1281
+ details?: unknown;
1282
+ correlationId?: string | undefined;
1283
+ }, {
1284
+ code: string;
1285
+ path: string;
1286
+ message: string;
1287
+ statusCode: number;
1288
+ timestamp: string;
1289
+ details?: unknown;
1290
+ correlationId?: string | undefined;
1291
+ }>;
1292
+ 401: z.ZodObject<{
1293
+ statusCode: z.ZodNumber;
1294
+ message: z.ZodString;
1295
+ code: z.ZodString;
1296
+ details: z.ZodOptional<z.ZodUnknown>;
1297
+ timestamp: z.ZodString;
1298
+ path: z.ZodString;
1299
+ correlationId: z.ZodOptional<z.ZodString>;
1300
+ }, "strip", z.ZodTypeAny, {
1301
+ code: string;
1302
+ path: string;
1303
+ message: string;
1304
+ statusCode: number;
1305
+ timestamp: string;
1306
+ details?: unknown;
1307
+ correlationId?: string | undefined;
1308
+ }, {
1309
+ code: string;
1310
+ path: string;
1311
+ message: string;
1312
+ statusCode: number;
1313
+ timestamp: string;
1314
+ details?: unknown;
1315
+ correlationId?: string | undefined;
1316
+ }>;
1317
+ 403: z.ZodObject<{
1318
+ statusCode: z.ZodNumber;
1319
+ message: z.ZodString;
1320
+ code: z.ZodString;
1321
+ details: z.ZodOptional<z.ZodUnknown>;
1322
+ timestamp: z.ZodString;
1323
+ path: z.ZodString;
1324
+ correlationId: z.ZodOptional<z.ZodString>;
1325
+ }, "strip", z.ZodTypeAny, {
1326
+ code: string;
1327
+ path: string;
1328
+ message: string;
1329
+ statusCode: number;
1330
+ timestamp: string;
1331
+ details?: unknown;
1332
+ correlationId?: string | undefined;
1333
+ }, {
1334
+ code: string;
1335
+ path: string;
1336
+ message: string;
1337
+ statusCode: number;
1338
+ timestamp: string;
1339
+ details?: unknown;
1340
+ correlationId?: string | undefined;
1341
+ }>;
1342
+ 200: z.ZodObject<{
1343
+ id: z.ZodString;
1344
+ name: z.ZodString;
1345
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
1346
+ leadWorker: z.ZodNullable<z.ZodObject<{
1347
+ id: z.ZodString;
1348
+ firstName: z.ZodString;
1349
+ lastName: z.ZodNullable<z.ZodString>;
1350
+ hasPhoneNumber: z.ZodBoolean;
1351
+ }, "strip", z.ZodTypeAny, {
1352
+ id: string;
1353
+ firstName: string;
1354
+ lastName: string | null;
1355
+ hasPhoneNumber: boolean;
1356
+ }, {
1357
+ id: string;
1358
+ firstName: string;
1359
+ lastName: string | null;
1360
+ hasPhoneNumber: boolean;
1361
+ }>>;
1362
+ leadSupplier: z.ZodNullable<z.ZodObject<{
1363
+ id: z.ZodString;
1364
+ name: z.ZodString;
1365
+ phoneNumber: z.ZodString;
1366
+ email: z.ZodNullable<z.ZodString>;
1367
+ company: z.ZodNullable<z.ZodString>;
1368
+ notes: z.ZodNullable<z.ZodString>;
1369
+ createdAt: z.ZodOptional<z.ZodString>;
1370
+ updatedAt: z.ZodOptional<z.ZodString>;
1371
+ }, "strip", z.ZodTypeAny, {
1372
+ id: string;
1373
+ name: string;
1374
+ company: string | null;
1375
+ email: string | null;
1376
+ phoneNumber: string;
1377
+ notes: string | null;
1378
+ updatedAt?: string | undefined;
1379
+ createdAt?: string | undefined;
1380
+ }, {
1381
+ id: string;
1382
+ name: string;
1383
+ company: string | null;
1384
+ email: string | null;
1385
+ phoneNumber: string;
1386
+ notes: string | null;
1387
+ updatedAt?: string | undefined;
1388
+ createdAt?: string | undefined;
1389
+ }>>;
1390
+ memberCount: z.ZodNumber;
1391
+ maxMembers: z.ZodNumber;
1392
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
1393
+ id: z.ZodString;
1394
+ firstName: z.ZodString;
1395
+ lastName: z.ZodNullable<z.ZodString>;
1396
+ hasPhoneNumber: z.ZodBoolean;
1397
+ }, "strip", z.ZodTypeAny, {
1398
+ id: string;
1399
+ firstName: string;
1400
+ lastName: string | null;
1401
+ hasPhoneNumber: boolean;
1402
+ }, {
1403
+ id: string;
1404
+ firstName: string;
1405
+ lastName: string | null;
1406
+ hasPhoneNumber: boolean;
1407
+ }>, "many">>;
1408
+ createdAt: z.ZodOptional<z.ZodString>;
1409
+ updatedAt: z.ZodOptional<z.ZodString>;
1410
+ }, "strip", z.ZodTypeAny, {
1411
+ id: string;
1412
+ name: string;
1413
+ leadType: "WORKER" | "SUPPLIER";
1414
+ leadWorker: {
1415
+ id: string;
1416
+ firstName: string;
1417
+ lastName: string | null;
1418
+ hasPhoneNumber: boolean;
1419
+ } | null;
1420
+ leadSupplier: {
1421
+ id: string;
1422
+ name: string;
1423
+ company: string | null;
1424
+ email: string | null;
1425
+ phoneNumber: string;
1426
+ notes: string | null;
1427
+ updatedAt?: string | undefined;
1428
+ createdAt?: string | undefined;
1429
+ } | null;
1430
+ memberCount: number;
1431
+ maxMembers: number;
1432
+ updatedAt?: string | undefined;
1433
+ createdAt?: string | undefined;
1434
+ members?: {
1435
+ id: string;
1436
+ firstName: string;
1437
+ lastName: string | null;
1438
+ hasPhoneNumber: boolean;
1439
+ }[] | undefined;
1440
+ }, {
1441
+ id: string;
1442
+ name: string;
1443
+ leadType: "WORKER" | "SUPPLIER";
1444
+ leadWorker: {
1445
+ id: string;
1446
+ firstName: string;
1447
+ lastName: string | null;
1448
+ hasPhoneNumber: boolean;
1449
+ } | null;
1450
+ leadSupplier: {
1451
+ id: string;
1452
+ name: string;
1453
+ company: string | null;
1454
+ email: string | null;
1455
+ phoneNumber: string;
1456
+ notes: string | null;
1457
+ updatedAt?: string | undefined;
1458
+ createdAt?: string | undefined;
1459
+ } | null;
1460
+ memberCount: number;
1461
+ maxMembers: number;
1462
+ updatedAt?: string | undefined;
1463
+ createdAt?: string | undefined;
1464
+ members?: {
1465
+ id: string;
1466
+ firstName: string;
1467
+ lastName: string | null;
1468
+ hasPhoneNumber: boolean;
1469
+ }[] | undefined;
1470
+ }>;
1471
+ 404: z.ZodObject<{
1472
+ statusCode: z.ZodNumber;
1473
+ message: z.ZodString;
1474
+ code: z.ZodString;
1475
+ details: z.ZodOptional<z.ZodUnknown>;
1476
+ timestamp: z.ZodString;
1477
+ path: z.ZodString;
1478
+ correlationId: z.ZodOptional<z.ZodString>;
1479
+ }, "strip", z.ZodTypeAny, {
1480
+ code: string;
1481
+ path: string;
1482
+ message: string;
1483
+ statusCode: number;
1484
+ timestamp: string;
1485
+ details?: unknown;
1486
+ correlationId?: string | undefined;
1487
+ }, {
1488
+ code: string;
1489
+ path: string;
1490
+ message: string;
1491
+ statusCode: number;
1492
+ timestamp: string;
1493
+ details?: unknown;
1494
+ correlationId?: string | undefined;
1495
+ }>;
1496
+ };
1497
+ };
1498
+ update: {
1499
+ metadata: {
1500
+ tags: string[];
1501
+ };
1502
+ pathParams: z.ZodObject<{
1503
+ id: z.ZodString;
1504
+ }, "strip", z.ZodTypeAny, {
1505
+ id: string;
1506
+ }, {
1507
+ id: string;
1508
+ }>;
1509
+ summary: "Update a crew";
1510
+ method: "PATCH";
1511
+ body: z.ZodObject<{
1512
+ name: z.ZodOptional<z.ZodString>;
1513
+ }, "strip", z.ZodTypeAny, {
1514
+ name?: string | undefined;
1515
+ }, {
1516
+ name?: string | undefined;
1517
+ }>;
1518
+ path: "/v2/crews/:id";
1519
+ responses: {
1520
+ 500: z.ZodObject<{
1521
+ statusCode: z.ZodNumber;
1522
+ message: z.ZodString;
1523
+ code: z.ZodString;
1524
+ details: z.ZodOptional<z.ZodUnknown>;
1525
+ timestamp: z.ZodString;
1526
+ path: z.ZodString;
1527
+ correlationId: z.ZodOptional<z.ZodString>;
1528
+ }, "strip", z.ZodTypeAny, {
1529
+ code: string;
1530
+ path: string;
1531
+ message: string;
1532
+ statusCode: number;
1533
+ timestamp: string;
1534
+ details?: unknown;
1535
+ correlationId?: string | undefined;
1536
+ }, {
1537
+ code: string;
1538
+ path: string;
1539
+ message: string;
1540
+ statusCode: number;
1541
+ timestamp: string;
1542
+ details?: unknown;
1543
+ correlationId?: string | undefined;
1544
+ }>;
1545
+ 400: z.ZodObject<{
1546
+ statusCode: z.ZodNumber;
1547
+ message: z.ZodString;
1548
+ code: z.ZodString;
1549
+ details: z.ZodOptional<z.ZodUnknown>;
1550
+ timestamp: z.ZodString;
1551
+ path: z.ZodString;
1552
+ correlationId: z.ZodOptional<z.ZodString>;
1553
+ }, "strip", z.ZodTypeAny, {
1554
+ code: string;
1555
+ path: string;
1556
+ message: string;
1557
+ statusCode: number;
1558
+ timestamp: string;
1559
+ details?: unknown;
1560
+ correlationId?: string | undefined;
1561
+ }, {
1562
+ code: string;
1563
+ path: string;
1564
+ message: string;
1565
+ statusCode: number;
1566
+ timestamp: string;
1567
+ details?: unknown;
1568
+ correlationId?: string | undefined;
1569
+ }>;
1570
+ 401: z.ZodObject<{
1571
+ statusCode: z.ZodNumber;
1572
+ message: z.ZodString;
1573
+ code: z.ZodString;
1574
+ details: z.ZodOptional<z.ZodUnknown>;
1575
+ timestamp: z.ZodString;
1576
+ path: z.ZodString;
1577
+ correlationId: z.ZodOptional<z.ZodString>;
1578
+ }, "strip", z.ZodTypeAny, {
1579
+ code: string;
1580
+ path: string;
1581
+ message: string;
1582
+ statusCode: number;
1583
+ timestamp: string;
1584
+ details?: unknown;
1585
+ correlationId?: string | undefined;
1586
+ }, {
1587
+ code: string;
1588
+ path: string;
1589
+ message: string;
1590
+ statusCode: number;
1591
+ timestamp: string;
1592
+ details?: unknown;
1593
+ correlationId?: string | undefined;
1594
+ }>;
1595
+ 403: z.ZodObject<{
1596
+ statusCode: z.ZodNumber;
1597
+ message: z.ZodString;
1598
+ code: z.ZodString;
1599
+ details: z.ZodOptional<z.ZodUnknown>;
1600
+ timestamp: z.ZodString;
1601
+ path: z.ZodString;
1602
+ correlationId: z.ZodOptional<z.ZodString>;
1603
+ }, "strip", z.ZodTypeAny, {
1604
+ code: string;
1605
+ path: string;
1606
+ message: string;
1607
+ statusCode: number;
1608
+ timestamp: string;
1609
+ details?: unknown;
1610
+ correlationId?: string | undefined;
1611
+ }, {
1612
+ code: string;
1613
+ path: string;
1614
+ message: string;
1615
+ statusCode: number;
1616
+ timestamp: string;
1617
+ details?: unknown;
1618
+ correlationId?: string | undefined;
1619
+ }>;
1620
+ 200: z.ZodObject<{
1621
+ id: z.ZodString;
1622
+ name: z.ZodString;
1623
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
1624
+ leadWorker: z.ZodNullable<z.ZodObject<{
1625
+ id: z.ZodString;
1626
+ firstName: z.ZodString;
1627
+ lastName: z.ZodNullable<z.ZodString>;
1628
+ hasPhoneNumber: z.ZodBoolean;
1629
+ }, "strip", z.ZodTypeAny, {
1630
+ id: string;
1631
+ firstName: string;
1632
+ lastName: string | null;
1633
+ hasPhoneNumber: boolean;
1634
+ }, {
1635
+ id: string;
1636
+ firstName: string;
1637
+ lastName: string | null;
1638
+ hasPhoneNumber: boolean;
1639
+ }>>;
1640
+ leadSupplier: z.ZodNullable<z.ZodObject<{
1641
+ id: z.ZodString;
1642
+ name: z.ZodString;
1643
+ phoneNumber: z.ZodString;
1644
+ email: z.ZodNullable<z.ZodString>;
1645
+ company: z.ZodNullable<z.ZodString>;
1646
+ notes: z.ZodNullable<z.ZodString>;
1647
+ createdAt: z.ZodOptional<z.ZodString>;
1648
+ updatedAt: z.ZodOptional<z.ZodString>;
1649
+ }, "strip", z.ZodTypeAny, {
1650
+ id: string;
1651
+ name: string;
1652
+ company: string | null;
1653
+ email: string | null;
1654
+ phoneNumber: string;
1655
+ notes: string | null;
1656
+ updatedAt?: string | undefined;
1657
+ createdAt?: string | undefined;
1658
+ }, {
1659
+ id: string;
1660
+ name: string;
1661
+ company: string | null;
1662
+ email: string | null;
1663
+ phoneNumber: string;
1664
+ notes: string | null;
1665
+ updatedAt?: string | undefined;
1666
+ createdAt?: string | undefined;
1667
+ }>>;
1668
+ memberCount: z.ZodNumber;
1669
+ maxMembers: z.ZodNumber;
1670
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
1671
+ id: z.ZodString;
1672
+ firstName: z.ZodString;
1673
+ lastName: z.ZodNullable<z.ZodString>;
1674
+ hasPhoneNumber: z.ZodBoolean;
1675
+ }, "strip", z.ZodTypeAny, {
1676
+ id: string;
1677
+ firstName: string;
1678
+ lastName: string | null;
1679
+ hasPhoneNumber: boolean;
1680
+ }, {
1681
+ id: string;
1682
+ firstName: string;
1683
+ lastName: string | null;
1684
+ hasPhoneNumber: boolean;
1685
+ }>, "many">>;
1686
+ createdAt: z.ZodOptional<z.ZodString>;
1687
+ updatedAt: z.ZodOptional<z.ZodString>;
1688
+ }, "strip", z.ZodTypeAny, {
1689
+ id: string;
1690
+ name: string;
1691
+ leadType: "WORKER" | "SUPPLIER";
1692
+ leadWorker: {
1693
+ id: string;
1694
+ firstName: string;
1695
+ lastName: string | null;
1696
+ hasPhoneNumber: boolean;
1697
+ } | null;
1698
+ leadSupplier: {
1699
+ id: string;
1700
+ name: string;
1701
+ company: string | null;
1702
+ email: string | null;
1703
+ phoneNumber: string;
1704
+ notes: string | null;
1705
+ updatedAt?: string | undefined;
1706
+ createdAt?: string | undefined;
1707
+ } | null;
1708
+ memberCount: number;
1709
+ maxMembers: number;
1710
+ updatedAt?: string | undefined;
1711
+ createdAt?: string | undefined;
1712
+ members?: {
1713
+ id: string;
1714
+ firstName: string;
1715
+ lastName: string | null;
1716
+ hasPhoneNumber: boolean;
1717
+ }[] | undefined;
1718
+ }, {
1719
+ id: string;
1720
+ name: string;
1721
+ leadType: "WORKER" | "SUPPLIER";
1722
+ leadWorker: {
1723
+ id: string;
1724
+ firstName: string;
1725
+ lastName: string | null;
1726
+ hasPhoneNumber: boolean;
1727
+ } | null;
1728
+ leadSupplier: {
1729
+ id: string;
1730
+ name: string;
1731
+ company: string | null;
1732
+ email: string | null;
1733
+ phoneNumber: string;
1734
+ notes: string | null;
1735
+ updatedAt?: string | undefined;
1736
+ createdAt?: string | undefined;
1737
+ } | null;
1738
+ memberCount: number;
1739
+ maxMembers: number;
1740
+ updatedAt?: string | undefined;
1741
+ createdAt?: string | undefined;
1742
+ members?: {
1743
+ id: string;
1744
+ firstName: string;
1745
+ lastName: string | null;
1746
+ hasPhoneNumber: boolean;
1747
+ }[] | undefined;
1748
+ }>;
1749
+ 404: z.ZodObject<{
1750
+ statusCode: z.ZodNumber;
1751
+ message: z.ZodString;
1752
+ code: z.ZodString;
1753
+ details: z.ZodOptional<z.ZodUnknown>;
1754
+ timestamp: z.ZodString;
1755
+ path: z.ZodString;
1756
+ correlationId: z.ZodOptional<z.ZodString>;
1757
+ }, "strip", z.ZodTypeAny, {
1758
+ code: string;
1759
+ path: string;
1760
+ message: string;
1761
+ statusCode: number;
1762
+ timestamp: string;
1763
+ details?: unknown;
1764
+ correlationId?: string | undefined;
1765
+ }, {
1766
+ code: string;
1767
+ path: string;
1768
+ message: string;
1769
+ statusCode: number;
1770
+ timestamp: string;
1771
+ details?: unknown;
1772
+ correlationId?: string | undefined;
1773
+ }>;
1774
+ };
1775
+ };
1776
+ remove: {
1777
+ metadata: {
1778
+ tags: string[];
1779
+ };
1780
+ pathParams: z.ZodObject<{
1781
+ id: z.ZodString;
1782
+ }, "strip", z.ZodTypeAny, {
1783
+ id: string;
1784
+ }, {
1785
+ id: string;
1786
+ }>;
1787
+ summary: "Delete a crew (blocked if phone-less members exist)";
1788
+ method: "DELETE";
1789
+ body: typeof import("@ts-rest/core").ContractNoBody;
1790
+ path: "/v2/crews/:id";
1791
+ responses: {
1792
+ 500: z.ZodObject<{
1793
+ statusCode: z.ZodNumber;
1794
+ message: z.ZodString;
1795
+ code: z.ZodString;
1796
+ details: z.ZodOptional<z.ZodUnknown>;
1797
+ timestamp: z.ZodString;
1798
+ path: z.ZodString;
1799
+ correlationId: z.ZodOptional<z.ZodString>;
1800
+ }, "strip", z.ZodTypeAny, {
1801
+ code: string;
1802
+ path: string;
1803
+ message: string;
1804
+ statusCode: number;
1805
+ timestamp: string;
1806
+ details?: unknown;
1807
+ correlationId?: string | undefined;
1808
+ }, {
1809
+ code: string;
1810
+ path: string;
1811
+ message: string;
1812
+ statusCode: number;
1813
+ timestamp: string;
1814
+ details?: unknown;
1815
+ correlationId?: string | undefined;
1816
+ }>;
1817
+ 400: z.ZodObject<{
1818
+ statusCode: z.ZodNumber;
1819
+ message: z.ZodString;
1820
+ code: z.ZodString;
1821
+ details: z.ZodOptional<z.ZodUnknown>;
1822
+ timestamp: z.ZodString;
1823
+ path: z.ZodString;
1824
+ correlationId: z.ZodOptional<z.ZodString>;
1825
+ }, "strip", z.ZodTypeAny, {
1826
+ code: string;
1827
+ path: string;
1828
+ message: string;
1829
+ statusCode: number;
1830
+ timestamp: string;
1831
+ details?: unknown;
1832
+ correlationId?: string | undefined;
1833
+ }, {
1834
+ code: string;
1835
+ path: string;
1836
+ message: string;
1837
+ statusCode: number;
1838
+ timestamp: string;
1839
+ details?: unknown;
1840
+ correlationId?: string | undefined;
1841
+ }>;
1842
+ 401: z.ZodObject<{
1843
+ statusCode: z.ZodNumber;
1844
+ message: z.ZodString;
1845
+ code: z.ZodString;
1846
+ details: z.ZodOptional<z.ZodUnknown>;
1847
+ timestamp: z.ZodString;
1848
+ path: z.ZodString;
1849
+ correlationId: z.ZodOptional<z.ZodString>;
1850
+ }, "strip", z.ZodTypeAny, {
1851
+ code: string;
1852
+ path: string;
1853
+ message: string;
1854
+ statusCode: number;
1855
+ timestamp: string;
1856
+ details?: unknown;
1857
+ correlationId?: string | undefined;
1858
+ }, {
1859
+ code: string;
1860
+ path: string;
1861
+ message: string;
1862
+ statusCode: number;
1863
+ timestamp: string;
1864
+ details?: unknown;
1865
+ correlationId?: string | undefined;
1866
+ }>;
1867
+ 403: z.ZodObject<{
1868
+ statusCode: z.ZodNumber;
1869
+ message: z.ZodString;
1870
+ code: z.ZodString;
1871
+ details: z.ZodOptional<z.ZodUnknown>;
1872
+ timestamp: z.ZodString;
1873
+ path: z.ZodString;
1874
+ correlationId: z.ZodOptional<z.ZodString>;
1875
+ }, "strip", z.ZodTypeAny, {
1876
+ code: string;
1877
+ path: string;
1878
+ message: string;
1879
+ statusCode: number;
1880
+ timestamp: string;
1881
+ details?: unknown;
1882
+ correlationId?: string | undefined;
1883
+ }, {
1884
+ code: string;
1885
+ path: string;
1886
+ message: string;
1887
+ statusCode: number;
1888
+ timestamp: string;
1889
+ details?: unknown;
1890
+ correlationId?: string | undefined;
1891
+ }>;
1892
+ 204: z.ZodUndefined;
1893
+ 404: z.ZodObject<{
1894
+ statusCode: z.ZodNumber;
1895
+ message: z.ZodString;
1896
+ code: z.ZodString;
1897
+ details: z.ZodOptional<z.ZodUnknown>;
1898
+ timestamp: z.ZodString;
1899
+ path: z.ZodString;
1900
+ correlationId: z.ZodOptional<z.ZodString>;
1901
+ }, "strip", z.ZodTypeAny, {
1902
+ code: string;
1903
+ path: string;
1904
+ message: string;
1905
+ statusCode: number;
1906
+ timestamp: string;
1907
+ details?: unknown;
1908
+ correlationId?: string | undefined;
1909
+ }, {
1910
+ code: string;
1911
+ path: string;
1912
+ message: string;
1913
+ statusCode: number;
1914
+ timestamp: string;
1915
+ details?: unknown;
1916
+ correlationId?: string | undefined;
1917
+ }>;
1918
+ 409: z.ZodObject<{
1919
+ statusCode: z.ZodNumber;
1920
+ message: z.ZodString;
1921
+ code: z.ZodString;
1922
+ details: z.ZodOptional<z.ZodUnknown>;
1923
+ timestamp: z.ZodString;
1924
+ path: z.ZodString;
1925
+ correlationId: z.ZodOptional<z.ZodString>;
1926
+ }, "strip", z.ZodTypeAny, {
1927
+ code: string;
1928
+ path: string;
1929
+ message: string;
1930
+ statusCode: number;
1931
+ timestamp: string;
1932
+ details?: unknown;
1933
+ correlationId?: string | undefined;
1934
+ }, {
1935
+ code: string;
1936
+ path: string;
1937
+ message: string;
1938
+ statusCode: number;
1939
+ timestamp: string;
1940
+ details?: unknown;
1941
+ correlationId?: string | undefined;
1942
+ }>;
1943
+ };
1944
+ };
1945
+ addMembers: {
1946
+ metadata: {
1947
+ tags: string[];
1948
+ };
1949
+ pathParams: z.ZodObject<{
1950
+ id: z.ZodString;
1951
+ }, "strip", z.ZodTypeAny, {
1952
+ id: string;
1953
+ }, {
1954
+ id: string;
1955
+ }>;
1956
+ summary: "Add workers to a crew";
1957
+ method: "POST";
1958
+ body: z.ZodObject<{
1959
+ workerIds: z.ZodArray<z.ZodString, "many">;
1960
+ }, "strip", z.ZodTypeAny, {
1961
+ workerIds: string[];
1962
+ }, {
1963
+ workerIds: string[];
1964
+ }>;
1965
+ path: "/v2/crews/:id/members";
1966
+ responses: {
1967
+ 500: z.ZodObject<{
1968
+ statusCode: z.ZodNumber;
1969
+ message: z.ZodString;
1970
+ code: z.ZodString;
1971
+ details: z.ZodOptional<z.ZodUnknown>;
1972
+ timestamp: z.ZodString;
1973
+ path: z.ZodString;
1974
+ correlationId: z.ZodOptional<z.ZodString>;
1975
+ }, "strip", z.ZodTypeAny, {
1976
+ code: string;
1977
+ path: string;
1978
+ message: string;
1979
+ statusCode: number;
1980
+ timestamp: string;
1981
+ details?: unknown;
1982
+ correlationId?: string | undefined;
1983
+ }, {
1984
+ code: string;
1985
+ path: string;
1986
+ message: string;
1987
+ statusCode: number;
1988
+ timestamp: string;
1989
+ details?: unknown;
1990
+ correlationId?: string | undefined;
1991
+ }>;
1992
+ 400: z.ZodObject<{
1993
+ statusCode: z.ZodNumber;
1994
+ message: z.ZodString;
1995
+ code: z.ZodString;
1996
+ details: z.ZodOptional<z.ZodUnknown>;
1997
+ timestamp: z.ZodString;
1998
+ path: z.ZodString;
1999
+ correlationId: z.ZodOptional<z.ZodString>;
2000
+ }, "strip", z.ZodTypeAny, {
2001
+ code: string;
2002
+ path: string;
2003
+ message: string;
2004
+ statusCode: number;
2005
+ timestamp: string;
2006
+ details?: unknown;
2007
+ correlationId?: string | undefined;
2008
+ }, {
2009
+ code: string;
2010
+ path: string;
2011
+ message: string;
2012
+ statusCode: number;
2013
+ timestamp: string;
2014
+ details?: unknown;
2015
+ correlationId?: string | undefined;
2016
+ }>;
2017
+ 401: z.ZodObject<{
2018
+ statusCode: z.ZodNumber;
2019
+ message: z.ZodString;
2020
+ code: z.ZodString;
2021
+ details: z.ZodOptional<z.ZodUnknown>;
2022
+ timestamp: z.ZodString;
2023
+ path: z.ZodString;
2024
+ correlationId: z.ZodOptional<z.ZodString>;
2025
+ }, "strip", z.ZodTypeAny, {
2026
+ code: string;
2027
+ path: string;
2028
+ message: string;
2029
+ statusCode: number;
2030
+ timestamp: string;
2031
+ details?: unknown;
2032
+ correlationId?: string | undefined;
2033
+ }, {
2034
+ code: string;
2035
+ path: string;
2036
+ message: string;
2037
+ statusCode: number;
2038
+ timestamp: string;
2039
+ details?: unknown;
2040
+ correlationId?: string | undefined;
2041
+ }>;
2042
+ 403: z.ZodObject<{
2043
+ statusCode: z.ZodNumber;
2044
+ message: z.ZodString;
2045
+ code: z.ZodString;
2046
+ details: z.ZodOptional<z.ZodUnknown>;
2047
+ timestamp: z.ZodString;
2048
+ path: z.ZodString;
2049
+ correlationId: z.ZodOptional<z.ZodString>;
2050
+ }, "strip", z.ZodTypeAny, {
2051
+ code: string;
2052
+ path: string;
2053
+ message: string;
2054
+ statusCode: number;
2055
+ timestamp: string;
2056
+ details?: unknown;
2057
+ correlationId?: string | undefined;
2058
+ }, {
2059
+ code: string;
2060
+ path: string;
2061
+ message: string;
2062
+ statusCode: number;
2063
+ timestamp: string;
2064
+ details?: unknown;
2065
+ correlationId?: string | undefined;
2066
+ }>;
2067
+ 200: z.ZodObject<{
2068
+ id: z.ZodString;
2069
+ name: z.ZodString;
2070
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
2071
+ leadWorker: z.ZodNullable<z.ZodObject<{
2072
+ id: z.ZodString;
2073
+ firstName: z.ZodString;
2074
+ lastName: z.ZodNullable<z.ZodString>;
2075
+ hasPhoneNumber: z.ZodBoolean;
2076
+ }, "strip", z.ZodTypeAny, {
2077
+ id: string;
2078
+ firstName: string;
2079
+ lastName: string | null;
2080
+ hasPhoneNumber: boolean;
2081
+ }, {
2082
+ id: string;
2083
+ firstName: string;
2084
+ lastName: string | null;
2085
+ hasPhoneNumber: boolean;
2086
+ }>>;
2087
+ leadSupplier: z.ZodNullable<z.ZodObject<{
2088
+ id: z.ZodString;
2089
+ name: z.ZodString;
2090
+ phoneNumber: z.ZodString;
2091
+ email: z.ZodNullable<z.ZodString>;
2092
+ company: z.ZodNullable<z.ZodString>;
2093
+ notes: z.ZodNullable<z.ZodString>;
2094
+ createdAt: z.ZodOptional<z.ZodString>;
2095
+ updatedAt: z.ZodOptional<z.ZodString>;
2096
+ }, "strip", z.ZodTypeAny, {
2097
+ id: string;
2098
+ name: string;
2099
+ company: string | null;
2100
+ email: string | null;
2101
+ phoneNumber: string;
2102
+ notes: string | null;
2103
+ updatedAt?: string | undefined;
2104
+ createdAt?: string | undefined;
2105
+ }, {
2106
+ id: string;
2107
+ name: string;
2108
+ company: string | null;
2109
+ email: string | null;
2110
+ phoneNumber: string;
2111
+ notes: string | null;
2112
+ updatedAt?: string | undefined;
2113
+ createdAt?: string | undefined;
2114
+ }>>;
2115
+ memberCount: z.ZodNumber;
2116
+ maxMembers: z.ZodNumber;
2117
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
2118
+ id: z.ZodString;
2119
+ firstName: z.ZodString;
2120
+ lastName: z.ZodNullable<z.ZodString>;
2121
+ hasPhoneNumber: z.ZodBoolean;
2122
+ }, "strip", z.ZodTypeAny, {
2123
+ id: string;
2124
+ firstName: string;
2125
+ lastName: string | null;
2126
+ hasPhoneNumber: boolean;
2127
+ }, {
2128
+ id: string;
2129
+ firstName: string;
2130
+ lastName: string | null;
2131
+ hasPhoneNumber: boolean;
2132
+ }>, "many">>;
2133
+ createdAt: z.ZodOptional<z.ZodString>;
2134
+ updatedAt: z.ZodOptional<z.ZodString>;
2135
+ }, "strip", z.ZodTypeAny, {
2136
+ id: string;
2137
+ name: string;
2138
+ leadType: "WORKER" | "SUPPLIER";
2139
+ leadWorker: {
2140
+ id: string;
2141
+ firstName: string;
2142
+ lastName: string | null;
2143
+ hasPhoneNumber: boolean;
2144
+ } | null;
2145
+ leadSupplier: {
2146
+ id: string;
2147
+ name: string;
2148
+ company: string | null;
2149
+ email: string | null;
2150
+ phoneNumber: string;
2151
+ notes: string | null;
2152
+ updatedAt?: string | undefined;
2153
+ createdAt?: string | undefined;
2154
+ } | null;
2155
+ memberCount: number;
2156
+ maxMembers: number;
2157
+ updatedAt?: string | undefined;
2158
+ createdAt?: string | undefined;
2159
+ members?: {
2160
+ id: string;
2161
+ firstName: string;
2162
+ lastName: string | null;
2163
+ hasPhoneNumber: boolean;
2164
+ }[] | undefined;
2165
+ }, {
2166
+ id: string;
2167
+ name: string;
2168
+ leadType: "WORKER" | "SUPPLIER";
2169
+ leadWorker: {
2170
+ id: string;
2171
+ firstName: string;
2172
+ lastName: string | null;
2173
+ hasPhoneNumber: boolean;
2174
+ } | null;
2175
+ leadSupplier: {
2176
+ id: string;
2177
+ name: string;
2178
+ company: string | null;
2179
+ email: string | null;
2180
+ phoneNumber: string;
2181
+ notes: string | null;
2182
+ updatedAt?: string | undefined;
2183
+ createdAt?: string | undefined;
2184
+ } | null;
2185
+ memberCount: number;
2186
+ maxMembers: number;
2187
+ updatedAt?: string | undefined;
2188
+ createdAt?: string | undefined;
2189
+ members?: {
2190
+ id: string;
2191
+ firstName: string;
2192
+ lastName: string | null;
2193
+ hasPhoneNumber: boolean;
2194
+ }[] | undefined;
2195
+ }>;
2196
+ 404: z.ZodObject<{
2197
+ statusCode: z.ZodNumber;
2198
+ message: z.ZodString;
2199
+ code: z.ZodString;
2200
+ details: z.ZodOptional<z.ZodUnknown>;
2201
+ timestamp: z.ZodString;
2202
+ path: z.ZodString;
2203
+ correlationId: z.ZodOptional<z.ZodString>;
2204
+ }, "strip", z.ZodTypeAny, {
2205
+ code: string;
2206
+ path: string;
2207
+ message: string;
2208
+ statusCode: number;
2209
+ timestamp: string;
2210
+ details?: unknown;
2211
+ correlationId?: string | undefined;
2212
+ }, {
2213
+ code: string;
2214
+ path: string;
2215
+ message: string;
2216
+ statusCode: number;
2217
+ timestamp: string;
2218
+ details?: unknown;
2219
+ correlationId?: string | undefined;
2220
+ }>;
2221
+ 409: z.ZodObject<{
2222
+ statusCode: z.ZodNumber;
2223
+ message: z.ZodString;
2224
+ code: z.ZodString;
2225
+ details: z.ZodOptional<z.ZodUnknown>;
2226
+ timestamp: z.ZodString;
2227
+ path: z.ZodString;
2228
+ correlationId: z.ZodOptional<z.ZodString>;
2229
+ }, "strip", z.ZodTypeAny, {
2230
+ code: string;
2231
+ path: string;
2232
+ message: string;
2233
+ statusCode: number;
2234
+ timestamp: string;
2235
+ details?: unknown;
2236
+ correlationId?: string | undefined;
2237
+ }, {
2238
+ code: string;
2239
+ path: string;
2240
+ message: string;
2241
+ statusCode: number;
2242
+ timestamp: string;
2243
+ details?: unknown;
2244
+ correlationId?: string | undefined;
2245
+ }>;
2246
+ };
2247
+ };
2248
+ removeMember: {
2249
+ metadata: {
2250
+ tags: string[];
2251
+ };
2252
+ pathParams: z.ZodObject<{
2253
+ id: z.ZodString;
2254
+ workerId: z.ZodString;
2255
+ }, "strip", z.ZodTypeAny, {
2256
+ id: string;
2257
+ workerId: string;
2258
+ }, {
2259
+ id: string;
2260
+ workerId: string;
2261
+ }>;
2262
+ summary: "Remove a worker from a crew (blocked if worker has no phone)";
2263
+ method: "DELETE";
2264
+ body: typeof import("@ts-rest/core").ContractNoBody;
2265
+ path: "/v2/crews/:id/members/:workerId";
2266
+ responses: {
2267
+ 500: z.ZodObject<{
2268
+ statusCode: z.ZodNumber;
2269
+ message: z.ZodString;
2270
+ code: z.ZodString;
2271
+ details: z.ZodOptional<z.ZodUnknown>;
2272
+ timestamp: z.ZodString;
2273
+ path: z.ZodString;
2274
+ correlationId: z.ZodOptional<z.ZodString>;
2275
+ }, "strip", z.ZodTypeAny, {
2276
+ code: string;
2277
+ path: string;
2278
+ message: string;
2279
+ statusCode: number;
2280
+ timestamp: string;
2281
+ details?: unknown;
2282
+ correlationId?: string | undefined;
2283
+ }, {
2284
+ code: string;
2285
+ path: string;
2286
+ message: string;
2287
+ statusCode: number;
2288
+ timestamp: string;
2289
+ details?: unknown;
2290
+ correlationId?: string | undefined;
2291
+ }>;
2292
+ 400: z.ZodObject<{
2293
+ statusCode: z.ZodNumber;
2294
+ message: z.ZodString;
2295
+ code: z.ZodString;
2296
+ details: z.ZodOptional<z.ZodUnknown>;
2297
+ timestamp: z.ZodString;
2298
+ path: z.ZodString;
2299
+ correlationId: z.ZodOptional<z.ZodString>;
2300
+ }, "strip", z.ZodTypeAny, {
2301
+ code: string;
2302
+ path: string;
2303
+ message: string;
2304
+ statusCode: number;
2305
+ timestamp: string;
2306
+ details?: unknown;
2307
+ correlationId?: string | undefined;
2308
+ }, {
2309
+ code: string;
2310
+ path: string;
2311
+ message: string;
2312
+ statusCode: number;
2313
+ timestamp: string;
2314
+ details?: unknown;
2315
+ correlationId?: string | undefined;
2316
+ }>;
2317
+ 401: z.ZodObject<{
2318
+ statusCode: z.ZodNumber;
2319
+ message: z.ZodString;
2320
+ code: z.ZodString;
2321
+ details: z.ZodOptional<z.ZodUnknown>;
2322
+ timestamp: z.ZodString;
2323
+ path: z.ZodString;
2324
+ correlationId: z.ZodOptional<z.ZodString>;
2325
+ }, "strip", z.ZodTypeAny, {
2326
+ code: string;
2327
+ path: string;
2328
+ message: string;
2329
+ statusCode: number;
2330
+ timestamp: string;
2331
+ details?: unknown;
2332
+ correlationId?: string | undefined;
2333
+ }, {
2334
+ code: string;
2335
+ path: string;
2336
+ message: string;
2337
+ statusCode: number;
2338
+ timestamp: string;
2339
+ details?: unknown;
2340
+ correlationId?: string | undefined;
2341
+ }>;
2342
+ 403: z.ZodObject<{
2343
+ statusCode: z.ZodNumber;
2344
+ message: z.ZodString;
2345
+ code: z.ZodString;
2346
+ details: z.ZodOptional<z.ZodUnknown>;
2347
+ timestamp: z.ZodString;
2348
+ path: z.ZodString;
2349
+ correlationId: z.ZodOptional<z.ZodString>;
2350
+ }, "strip", z.ZodTypeAny, {
2351
+ code: string;
2352
+ path: string;
2353
+ message: string;
2354
+ statusCode: number;
2355
+ timestamp: string;
2356
+ details?: unknown;
2357
+ correlationId?: string | undefined;
2358
+ }, {
2359
+ code: string;
2360
+ path: string;
2361
+ message: string;
2362
+ statusCode: number;
2363
+ timestamp: string;
2364
+ details?: unknown;
2365
+ correlationId?: string | undefined;
2366
+ }>;
2367
+ 200: z.ZodObject<{
2368
+ id: z.ZodString;
2369
+ name: z.ZodString;
2370
+ leadType: z.ZodEnum<["WORKER", "SUPPLIER"]>;
2371
+ leadWorker: z.ZodNullable<z.ZodObject<{
2372
+ id: z.ZodString;
2373
+ firstName: z.ZodString;
2374
+ lastName: z.ZodNullable<z.ZodString>;
2375
+ hasPhoneNumber: z.ZodBoolean;
2376
+ }, "strip", z.ZodTypeAny, {
2377
+ id: string;
2378
+ firstName: string;
2379
+ lastName: string | null;
2380
+ hasPhoneNumber: boolean;
2381
+ }, {
2382
+ id: string;
2383
+ firstName: string;
2384
+ lastName: string | null;
2385
+ hasPhoneNumber: boolean;
2386
+ }>>;
2387
+ leadSupplier: z.ZodNullable<z.ZodObject<{
2388
+ id: z.ZodString;
2389
+ name: z.ZodString;
2390
+ phoneNumber: z.ZodString;
2391
+ email: z.ZodNullable<z.ZodString>;
2392
+ company: z.ZodNullable<z.ZodString>;
2393
+ notes: z.ZodNullable<z.ZodString>;
2394
+ createdAt: z.ZodOptional<z.ZodString>;
2395
+ updatedAt: z.ZodOptional<z.ZodString>;
2396
+ }, "strip", z.ZodTypeAny, {
2397
+ id: string;
2398
+ name: string;
2399
+ company: string | null;
2400
+ email: string | null;
2401
+ phoneNumber: string;
2402
+ notes: string | null;
2403
+ updatedAt?: string | undefined;
2404
+ createdAt?: string | undefined;
2405
+ }, {
2406
+ id: string;
2407
+ name: string;
2408
+ company: string | null;
2409
+ email: string | null;
2410
+ phoneNumber: string;
2411
+ notes: string | null;
2412
+ updatedAt?: string | undefined;
2413
+ createdAt?: string | undefined;
2414
+ }>>;
2415
+ memberCount: z.ZodNumber;
2416
+ maxMembers: z.ZodNumber;
2417
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
2418
+ id: z.ZodString;
2419
+ firstName: z.ZodString;
2420
+ lastName: z.ZodNullable<z.ZodString>;
2421
+ hasPhoneNumber: z.ZodBoolean;
2422
+ }, "strip", z.ZodTypeAny, {
2423
+ id: string;
2424
+ firstName: string;
2425
+ lastName: string | null;
2426
+ hasPhoneNumber: boolean;
2427
+ }, {
2428
+ id: string;
2429
+ firstName: string;
2430
+ lastName: string | null;
2431
+ hasPhoneNumber: boolean;
2432
+ }>, "many">>;
2433
+ createdAt: z.ZodOptional<z.ZodString>;
2434
+ updatedAt: z.ZodOptional<z.ZodString>;
2435
+ }, "strip", z.ZodTypeAny, {
2436
+ id: string;
2437
+ name: string;
2438
+ leadType: "WORKER" | "SUPPLIER";
2439
+ leadWorker: {
2440
+ id: string;
2441
+ firstName: string;
2442
+ lastName: string | null;
2443
+ hasPhoneNumber: boolean;
2444
+ } | null;
2445
+ leadSupplier: {
2446
+ id: string;
2447
+ name: string;
2448
+ company: string | null;
2449
+ email: string | null;
2450
+ phoneNumber: string;
2451
+ notes: string | null;
2452
+ updatedAt?: string | undefined;
2453
+ createdAt?: string | undefined;
2454
+ } | null;
2455
+ memberCount: number;
2456
+ maxMembers: number;
2457
+ updatedAt?: string | undefined;
2458
+ createdAt?: string | undefined;
2459
+ members?: {
2460
+ id: string;
2461
+ firstName: string;
2462
+ lastName: string | null;
2463
+ hasPhoneNumber: boolean;
2464
+ }[] | undefined;
2465
+ }, {
2466
+ id: string;
2467
+ name: string;
2468
+ leadType: "WORKER" | "SUPPLIER";
2469
+ leadWorker: {
2470
+ id: string;
2471
+ firstName: string;
2472
+ lastName: string | null;
2473
+ hasPhoneNumber: boolean;
2474
+ } | null;
2475
+ leadSupplier: {
2476
+ id: string;
2477
+ name: string;
2478
+ company: string | null;
2479
+ email: string | null;
2480
+ phoneNumber: string;
2481
+ notes: string | null;
2482
+ updatedAt?: string | undefined;
2483
+ createdAt?: string | undefined;
2484
+ } | null;
2485
+ memberCount: number;
2486
+ maxMembers: number;
2487
+ updatedAt?: string | undefined;
2488
+ createdAt?: string | undefined;
2489
+ members?: {
2490
+ id: string;
2491
+ firstName: string;
2492
+ lastName: string | null;
2493
+ hasPhoneNumber: boolean;
2494
+ }[] | undefined;
2495
+ }>;
2496
+ 404: z.ZodObject<{
2497
+ statusCode: z.ZodNumber;
2498
+ message: z.ZodString;
2499
+ code: z.ZodString;
2500
+ details: z.ZodOptional<z.ZodUnknown>;
2501
+ timestamp: z.ZodString;
2502
+ path: z.ZodString;
2503
+ correlationId: z.ZodOptional<z.ZodString>;
2504
+ }, "strip", z.ZodTypeAny, {
2505
+ code: string;
2506
+ path: string;
2507
+ message: string;
2508
+ statusCode: number;
2509
+ timestamp: string;
2510
+ details?: unknown;
2511
+ correlationId?: string | undefined;
2512
+ }, {
2513
+ code: string;
2514
+ path: string;
2515
+ message: string;
2516
+ statusCode: number;
2517
+ timestamp: string;
2518
+ details?: unknown;
2519
+ correlationId?: string | undefined;
2520
+ }>;
2521
+ 409: z.ZodObject<{
2522
+ statusCode: z.ZodNumber;
2523
+ message: z.ZodString;
2524
+ code: z.ZodString;
2525
+ details: z.ZodOptional<z.ZodUnknown>;
2526
+ timestamp: z.ZodString;
2527
+ path: z.ZodString;
2528
+ correlationId: z.ZodOptional<z.ZodString>;
2529
+ }, "strip", z.ZodTypeAny, {
2530
+ code: string;
2531
+ path: string;
2532
+ message: string;
2533
+ statusCode: number;
2534
+ timestamp: string;
2535
+ details?: unknown;
2536
+ correlationId?: string | undefined;
2537
+ }, {
2538
+ code: string;
2539
+ path: string;
2540
+ message: string;
2541
+ statusCode: number;
2542
+ timestamp: string;
2543
+ details?: unknown;
2544
+ correlationId?: string | undefined;
2545
+ }>;
2546
+ };
2547
+ };
2548
+ };
2549
+ //# sourceMappingURL=crews.contract.d.ts.map