@dakkitor/api-contracts 1.1.69 → 1.1.71

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.
@@ -401,8 +401,8 @@ export declare const WorkerSchema: z.ZodObject<{
401
401
  export declare const CreateWorkerSchema: z.ZodObject<{
402
402
  firstName: z.ZodString;
403
403
  lastName: z.ZodString;
404
- email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
405
- phoneNumbers: z.ZodArray<z.ZodObject<{
404
+ email: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, string | null | undefined, string | null | undefined>;
405
+ phoneNumbers: z.ZodEffects<z.ZodArray<z.ZodObject<{
406
406
  phoneNumber: z.ZodString;
407
407
  description: z.ZodOptional<z.ZodString>;
408
408
  isPrimary: z.ZodDefault<z.ZodBoolean>;
@@ -414,12 +414,20 @@ export declare const CreateWorkerSchema: z.ZodObject<{
414
414
  phoneNumber: string;
415
415
  description?: string | undefined;
416
416
  isPrimary?: boolean | undefined;
417
- }>, "many">;
417
+ }>, "many">, {
418
+ phoneNumber: string;
419
+ isPrimary: boolean;
420
+ description?: string | undefined;
421
+ }[], {
422
+ phoneNumber: string;
423
+ description?: string | undefined;
424
+ isPrimary?: boolean | undefined;
425
+ }[]>;
418
426
  nino: z.ZodNullable<z.ZodOptional<z.ZodString>>;
419
427
  dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
420
428
  bio: z.ZodNullable<z.ZodOptional<z.ZodString>>;
421
429
  availability: z.ZodDefault<z.ZodOptional<z.ZodEnum<["AVAILABLE", "PARTIALLY_AVAILABLE", "UNAVAILABLE"]>>>;
422
- trades: z.ZodArray<z.ZodObject<{
430
+ trades: z.ZodEffects<z.ZodArray<z.ZodObject<{
423
431
  tradeId: z.ZodString;
424
432
  mainTrade: z.ZodDefault<z.ZodBoolean>;
425
433
  }, "strip", z.ZodTypeAny, {
@@ -428,7 +436,13 @@ export declare const CreateWorkerSchema: z.ZodObject<{
428
436
  }, {
429
437
  tradeId: string;
430
438
  mainTrade?: boolean | undefined;
431
- }>, "many">;
439
+ }>, "many">, {
440
+ tradeId: string;
441
+ mainTrade: boolean;
442
+ }[], {
443
+ tradeId: string;
444
+ mainTrade?: boolean | undefined;
445
+ }[]>;
432
446
  qualifications: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
433
447
  qualificationId: z.ZodString;
434
448
  qualificationTypeId: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | null | undefined, unknown>;
@@ -553,8 +567,8 @@ export declare const CreateWorkerSchema: z.ZodObject<{
553
567
  export declare const UpdateWorkerSchema: z.ZodObject<{
554
568
  firstName: z.ZodOptional<z.ZodString>;
555
569
  lastName: z.ZodOptional<z.ZodString>;
556
- email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
557
- phoneNumbers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
570
+ email: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, string | null | undefined, string | null | undefined>;
571
+ phoneNumbers: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
558
572
  id: z.ZodOptional<z.ZodString>;
559
573
  phoneNumber: z.ZodOptional<z.ZodString>;
560
574
  description: z.ZodOptional<z.ZodString>;
@@ -579,12 +593,22 @@ export declare const UpdateWorkerSchema: z.ZodObject<{
579
593
  phoneNumber?: string | undefined;
580
594
  description?: string | undefined;
581
595
  isPrimary?: boolean | undefined;
582
- }>, "many">>;
596
+ }>, "many">, {
597
+ id?: string | undefined;
598
+ phoneNumber?: string | undefined;
599
+ description?: string | undefined;
600
+ isPrimary?: boolean | undefined;
601
+ }[], {
602
+ id?: string | undefined;
603
+ phoneNumber?: string | undefined;
604
+ description?: string | undefined;
605
+ isPrimary?: boolean | undefined;
606
+ }[]>>;
583
607
  nino: z.ZodNullable<z.ZodOptional<z.ZodString>>;
584
608
  dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
585
609
  bio: z.ZodNullable<z.ZodOptional<z.ZodString>>;
586
610
  availability: z.ZodOptional<z.ZodEnum<["AVAILABLE", "PARTIALLY_AVAILABLE", "UNAVAILABLE"]>>;
587
- trades: z.ZodOptional<z.ZodArray<z.ZodObject<{
611
+ trades: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
588
612
  id: z.ZodOptional<z.ZodString>;
589
613
  tradeId: z.ZodString;
590
614
  mainTrade: z.ZodDefault<z.ZodBoolean>;
@@ -596,7 +620,15 @@ export declare const UpdateWorkerSchema: z.ZodObject<{
596
620
  tradeId: string;
597
621
  id?: string | undefined;
598
622
  mainTrade?: boolean | undefined;
599
- }>, "many">>;
623
+ }>, "many">, {
624
+ tradeId: string;
625
+ mainTrade: boolean;
626
+ id?: string | undefined;
627
+ }[], {
628
+ tradeId: string;
629
+ id?: string | undefined;
630
+ mainTrade?: boolean | undefined;
631
+ }[]>>;
600
632
  qualifications: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
601
633
  id: z.ZodOptional<z.ZodString>;
602
634
  qualificationId: z.ZodString;
@@ -1211,8 +1243,8 @@ export declare const workersContractRouter: {
1211
1243
  body: z.ZodObject<{
1212
1244
  firstName: z.ZodString;
1213
1245
  lastName: z.ZodString;
1214
- email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1215
- phoneNumbers: z.ZodArray<z.ZodObject<{
1246
+ email: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, string | null | undefined, string | null | undefined>;
1247
+ phoneNumbers: z.ZodEffects<z.ZodArray<z.ZodObject<{
1216
1248
  phoneNumber: z.ZodString;
1217
1249
  description: z.ZodOptional<z.ZodString>;
1218
1250
  isPrimary: z.ZodDefault<z.ZodBoolean>;
@@ -1224,12 +1256,20 @@ export declare const workersContractRouter: {
1224
1256
  phoneNumber: string;
1225
1257
  description?: string | undefined;
1226
1258
  isPrimary?: boolean | undefined;
1227
- }>, "many">;
1259
+ }>, "many">, {
1260
+ phoneNumber: string;
1261
+ isPrimary: boolean;
1262
+ description?: string | undefined;
1263
+ }[], {
1264
+ phoneNumber: string;
1265
+ description?: string | undefined;
1266
+ isPrimary?: boolean | undefined;
1267
+ }[]>;
1228
1268
  nino: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1229
1269
  dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
1230
1270
  bio: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1231
1271
  availability: z.ZodDefault<z.ZodOptional<z.ZodEnum<["AVAILABLE", "PARTIALLY_AVAILABLE", "UNAVAILABLE"]>>>;
1232
- trades: z.ZodArray<z.ZodObject<{
1272
+ trades: z.ZodEffects<z.ZodArray<z.ZodObject<{
1233
1273
  tradeId: z.ZodString;
1234
1274
  mainTrade: z.ZodDefault<z.ZodBoolean>;
1235
1275
  }, "strip", z.ZodTypeAny, {
@@ -1238,7 +1278,13 @@ export declare const workersContractRouter: {
1238
1278
  }, {
1239
1279
  tradeId: string;
1240
1280
  mainTrade?: boolean | undefined;
1241
- }>, "many">;
1281
+ }>, "many">, {
1282
+ tradeId: string;
1283
+ mainTrade: boolean;
1284
+ }[], {
1285
+ tradeId: string;
1286
+ mainTrade?: boolean | undefined;
1287
+ }[]>;
1242
1288
  qualifications: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
1243
1289
  qualificationId: z.ZodString;
1244
1290
  qualificationTypeId: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | null | undefined, unknown>;
@@ -2690,8 +2736,8 @@ export declare const workersContractRouter: {
2690
2736
  body: z.ZodObject<{
2691
2737
  firstName: z.ZodOptional<z.ZodString>;
2692
2738
  lastName: z.ZodOptional<z.ZodString>;
2693
- email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2694
- phoneNumbers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
2739
+ email: z.ZodEffects<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, string | null | undefined, string | null | undefined>;
2740
+ phoneNumbers: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
2695
2741
  id: z.ZodOptional<z.ZodString>;
2696
2742
  phoneNumber: z.ZodOptional<z.ZodString>;
2697
2743
  description: z.ZodOptional<z.ZodString>;
@@ -2716,12 +2762,22 @@ export declare const workersContractRouter: {
2716
2762
  phoneNumber?: string | undefined;
2717
2763
  description?: string | undefined;
2718
2764
  isPrimary?: boolean | undefined;
2719
- }>, "many">>;
2765
+ }>, "many">, {
2766
+ id?: string | undefined;
2767
+ phoneNumber?: string | undefined;
2768
+ description?: string | undefined;
2769
+ isPrimary?: boolean | undefined;
2770
+ }[], {
2771
+ id?: string | undefined;
2772
+ phoneNumber?: string | undefined;
2773
+ description?: string | undefined;
2774
+ isPrimary?: boolean | undefined;
2775
+ }[]>>;
2720
2776
  nino: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2721
2777
  dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
2722
2778
  bio: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2723
2779
  availability: z.ZodOptional<z.ZodEnum<["AVAILABLE", "PARTIALLY_AVAILABLE", "UNAVAILABLE"]>>;
2724
- trades: z.ZodOptional<z.ZodArray<z.ZodObject<{
2780
+ trades: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
2725
2781
  id: z.ZodOptional<z.ZodString>;
2726
2782
  tradeId: z.ZodString;
2727
2783
  mainTrade: z.ZodDefault<z.ZodBoolean>;
@@ -2733,7 +2789,15 @@ export declare const workersContractRouter: {
2733
2789
  tradeId: string;
2734
2790
  id?: string | undefined;
2735
2791
  mainTrade?: boolean | undefined;
2736
- }>, "many">>;
2792
+ }>, "many">, {
2793
+ tradeId: string;
2794
+ mainTrade: boolean;
2795
+ id?: string | undefined;
2796
+ }[], {
2797
+ tradeId: string;
2798
+ id?: string | undefined;
2799
+ mainTrade?: boolean | undefined;
2800
+ }[]>>;
2737
2801
  qualifications: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
2738
2802
  id: z.ZodOptional<z.ZodString>;
2739
2803
  qualificationId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"workers.contract.d.ts","sourceRoot":"","sources":["../../contracts/workers/workers.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,kBAAkB,gEAI7B,CAAC;AAIH,eAAO,MAAM,0BAA0B,yEAEM,CAAC;AAE9C,eAAO,MAAM,mBAAmB,+DAGM,CAAC;AAIvC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAOM,CAAC;AAE3C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAMM,CAAC;AAEjD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;EAoBM,CAAC;AAEjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAMM,CAAC;AAErC,eAAO,MAAM,uBAAuB;;;;;;;;;EAKM,CAAC;AAE3C,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;EAyBM,CAAC;AAE7C,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;EAYM,CAAC;AAEnD,eAAO,MAAM,eAAe;;;;;;;;;EAsBxB,CAAC;AAEL,eAAO,MAAM,iBAAiB;;;;;;;;;EAQM,CAAC;AAErC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAIH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFjC,CAAC"}
@@ -66,7 +66,7 @@ exports.WorkerTradeSchema = zod_1.z
66
66
  .openapi({ title: 'WorkerTrade' });
67
67
  exports.CreateWorkerTradeSchema = zod_1.z
68
68
  .object({
69
- tradeId: zod_1.z.string().uuid(),
69
+ tradeId: zod_1.z.string().uuid({ message: 'Trade must be selected' }),
70
70
  mainTrade: zod_1.z.boolean().default(false),
71
71
  })
72
72
  .openapi({ title: 'CreateWorkerTrade' });
@@ -195,10 +195,19 @@ exports.CreateWorkerSchema = zod_1.z
195
195
  .object({
196
196
  firstName: zod_1.z.string().min(3).max(100).describe('First Name'),
197
197
  lastName: zod_1.z.string().min(3).max(100).describe('Last Name'),
198
- email: zod_1.z.string().email().optional().nullable().describe('Email'),
198
+ email: zod_1.z
199
+ .string()
200
+ .email()
201
+ .nullish()
202
+ .or(zod_1.z.literal(''))
203
+ .transform((val) => (val === '' ? undefined : val))
204
+ .describe('Email'),
199
205
  phoneNumbers: zod_1.z
200
206
  .array(exports.CreateWorkerPhoneNumberSchema)
201
- .min(1)
207
+ .min(1, { message: 'At least one phone number is required' })
208
+ .refine((phoneNumbers) => phoneNumbers.some((phone) => phone.isPrimary), {
209
+ message: 'Must have at least one primary phone number',
210
+ })
202
211
  .describe('Phone Numbers'),
203
212
  nino: zod_1.z
204
213
  .string()
@@ -215,7 +224,14 @@ exports.CreateWorkerSchema = zod_1.z
215
224
  availability: exports.AvailabilitySchema.optional()
216
225
  .default('AVAILABLE')
217
226
  .describe('Availability'),
218
- trades: zod_1.z.array(exports.CreateWorkerTradeSchema).min(1).max(10).describe('Trades'),
227
+ trades: zod_1.z
228
+ .array(exports.CreateWorkerTradeSchema)
229
+ .min(1, { message: 'At least one trade must be selected' })
230
+ .max(10)
231
+ .refine((trades) => trades.some((trade) => trade.mainTrade), {
232
+ message: 'Exactly one trade must be marked as the main trade',
233
+ })
234
+ .describe('Trades'),
219
235
  qualifications: zod_1.z
220
236
  .array(exports.CreateWorkerQualificationSchema)
221
237
  .optional()
@@ -237,10 +253,19 @@ exports.UpdateWorkerSchema = zod_1.z
237
253
  .object({
238
254
  firstName: zod_1.z.string().min(3).max(100).optional().describe('First Name'),
239
255
  lastName: zod_1.z.string().min(3).max(100).optional().describe('Last Name'),
240
- email: zod_1.z.string().email().optional().nullable().describe('Email'),
256
+ email: zod_1.z
257
+ .string()
258
+ .email()
259
+ .nullish()
260
+ .or(zod_1.z.literal(''))
261
+ .transform((val) => (val === '' ? undefined : val))
262
+ .describe('Email'),
241
263
  phoneNumbers: zod_1.z
242
264
  .array(exports.UpsertWorkerPhoneNumberSchema)
243
- .min(1, { message: 'Must have at least one phone number' })
265
+ .min(1, { message: 'At least one phone number is required' })
266
+ .refine((phoneNumbers) => phoneNumbers.some((phone) => phone.isPrimary), {
267
+ message: 'Must have at least one primary phone number',
268
+ })
244
269
  .optional()
245
270
  .describe('Phone Numbers'),
246
271
  nino: zod_1.z
@@ -256,7 +281,14 @@ exports.UpdateWorkerSchema = zod_1.z
256
281
  .describe('Date of Birth'),
257
282
  bio: zod_1.z.string().optional().nullable().describe('Bio'),
258
283
  availability: exports.AvailabilitySchema.optional().describe('Availability'),
259
- trades: zod_1.z.array(exports.WorkerTradeSchema).optional().describe('Trades'),
284
+ trades: zod_1.z
285
+ .array(exports.WorkerTradeSchema)
286
+ .min(1, { message: 'At least one trade must be selected' })
287
+ .refine((trades) => trades.some((trade) => trade.mainTrade), {
288
+ message: 'Exactly one trade must be marked as the main trade',
289
+ })
290
+ .optional()
291
+ .describe('Trades'),
260
292
  qualifications: zod_1.z
261
293
  .array(exports.WorkerQualificationSchema)
262
294
  .optional()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dakkitor/api-contracts",
3
- "version": "1.1.69",
3
+ "version": "1.1.71",
4
4
  "description": "TypeScript API contracts using ts-rest and Zod",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",