@dakkitor/api-contracts 1.1.57 → 1.1.59
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.
|
@@ -31,7 +31,7 @@ export declare const CreateWorkerPhoneNumberSchema: z.ZodObject<{
|
|
|
31
31
|
description?: string | undefined;
|
|
32
32
|
isPrimary?: boolean | undefined;
|
|
33
33
|
}>;
|
|
34
|
-
export declare const UpsertWorkerPhoneNumberSchema: z.ZodObject<{
|
|
34
|
+
export declare const UpsertWorkerPhoneNumberSchema: z.ZodEffects<z.ZodObject<{
|
|
35
35
|
id: z.ZodOptional<z.ZodString>;
|
|
36
36
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
37
37
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -46,6 +46,16 @@ export declare const UpsertWorkerPhoneNumberSchema: z.ZodObject<{
|
|
|
46
46
|
phoneNumber?: string | undefined;
|
|
47
47
|
description?: string | undefined;
|
|
48
48
|
isPrimary?: boolean | undefined;
|
|
49
|
+
}>, {
|
|
50
|
+
id?: string | undefined;
|
|
51
|
+
phoneNumber?: string | undefined;
|
|
52
|
+
description?: string | undefined;
|
|
53
|
+
isPrimary?: boolean | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
id?: string | undefined;
|
|
56
|
+
phoneNumber?: string | undefined;
|
|
57
|
+
description?: string | undefined;
|
|
58
|
+
isPrimary?: boolean | undefined;
|
|
49
59
|
}>;
|
|
50
60
|
export declare const WorkerTradeSchema: z.ZodObject<{
|
|
51
61
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -544,7 +554,7 @@ export declare const UpdateWorkerSchema: z.ZodObject<{
|
|
|
544
554
|
firstName: z.ZodOptional<z.ZodString>;
|
|
545
555
|
lastName: z.ZodOptional<z.ZodString>;
|
|
546
556
|
email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
547
|
-
phoneNumbers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
557
|
+
phoneNumbers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
548
558
|
id: z.ZodOptional<z.ZodString>;
|
|
549
559
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
550
560
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -559,6 +569,16 @@ export declare const UpdateWorkerSchema: z.ZodObject<{
|
|
|
559
569
|
phoneNumber?: string | undefined;
|
|
560
570
|
description?: string | undefined;
|
|
561
571
|
isPrimary?: boolean | undefined;
|
|
572
|
+
}>, {
|
|
573
|
+
id?: string | undefined;
|
|
574
|
+
phoneNumber?: string | undefined;
|
|
575
|
+
description?: string | undefined;
|
|
576
|
+
isPrimary?: boolean | undefined;
|
|
577
|
+
}, {
|
|
578
|
+
id?: string | undefined;
|
|
579
|
+
phoneNumber?: string | undefined;
|
|
580
|
+
description?: string | undefined;
|
|
581
|
+
isPrimary?: boolean | undefined;
|
|
562
582
|
}>, "many">>;
|
|
563
583
|
nino: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
564
584
|
dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
|
|
@@ -2671,7 +2691,7 @@ export declare const workersContractRouter: {
|
|
|
2671
2691
|
firstName: z.ZodOptional<z.ZodString>;
|
|
2672
2692
|
lastName: z.ZodOptional<z.ZodString>;
|
|
2673
2693
|
email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2674
|
-
phoneNumbers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2694
|
+
phoneNumbers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
2675
2695
|
id: z.ZodOptional<z.ZodString>;
|
|
2676
2696
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
2677
2697
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2686,6 +2706,16 @@ export declare const workersContractRouter: {
|
|
|
2686
2706
|
phoneNumber?: string | undefined;
|
|
2687
2707
|
description?: string | undefined;
|
|
2688
2708
|
isPrimary?: boolean | undefined;
|
|
2709
|
+
}>, {
|
|
2710
|
+
id?: string | undefined;
|
|
2711
|
+
phoneNumber?: string | undefined;
|
|
2712
|
+
description?: string | undefined;
|
|
2713
|
+
isPrimary?: boolean | undefined;
|
|
2714
|
+
}, {
|
|
2715
|
+
id?: string | undefined;
|
|
2716
|
+
phoneNumber?: string | undefined;
|
|
2717
|
+
description?: string | undefined;
|
|
2718
|
+
isPrimary?: boolean | undefined;
|
|
2689
2719
|
}>, "many">>;
|
|
2690
2720
|
nino: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2691
2721
|
dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>>;
|
|
@@ -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
|
|
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;;;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ional(),
|
|
47
|
+
description: zod_1.z.string().max(100).optional(),
|
|
48
48
|
isPrimary: zod_1.z.boolean().optional(),
|
|
49
|
+
})
|
|
50
|
+
.refine((data) => {
|
|
51
|
+
// If no id (new phone number), phoneNumber and isPrimary are required
|
|
52
|
+
if (!data.id) {
|
|
53
|
+
return data.phoneNumber !== undefined && data.isPrimary !== undefined;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}, {
|
|
57
|
+
message: 'New phone numbers (without id) require phoneNumber and isPrimary fields',
|
|
49
58
|
})
|
|
50
59
|
.openapi({ title: 'UpsertWorkerPhoneNumber' });
|
|
51
60
|
exports.WorkerTradeSchema = zod_1.z
|
|
@@ -226,7 +235,7 @@ exports.UpdateWorkerSchema = zod_1.z
|
|
|
226
235
|
email: zod_1.z.string().email().optional().nullable().describe('Email'),
|
|
227
236
|
phoneNumbers: zod_1.z
|
|
228
237
|
.array(exports.UpsertWorkerPhoneNumberSchema)
|
|
229
|
-
.min(1)
|
|
238
|
+
.min(1, { message: 'Must have at least one phone number' })
|
|
230
239
|
.optional()
|
|
231
240
|
.describe('Phone Numbers'),
|
|
232
241
|
nino: zod_1.z
|