@devizovaburza/mdm-sdk 2.2.0-canary.bffbab7 → 2.2.0-canary.e477f65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1/index.d.mts +4 -4
- package/dist/v1/index.d.ts +4 -4
- package/dist/v1/index.mjs +22 -3
- package/package.json +1 -1
package/dist/v1/index.d.mts
CHANGED
|
@@ -3789,7 +3789,7 @@ declare const partnerApi: OpenAPIHono<{
|
|
|
3789
3789
|
}[] | undefined;
|
|
3790
3790
|
} | null;
|
|
3791
3791
|
organizationData: {
|
|
3792
|
-
id
|
|
3792
|
+
id?: string | undefined;
|
|
3793
3793
|
partyId?: string | undefined;
|
|
3794
3794
|
internalId?: string | undefined;
|
|
3795
3795
|
businessName?: string | undefined;
|
|
@@ -4131,7 +4131,7 @@ declare const partnerApi: OpenAPIHono<{
|
|
|
4131
4131
|
}[] | undefined;
|
|
4132
4132
|
} | null;
|
|
4133
4133
|
organizationData: {
|
|
4134
|
-
id
|
|
4134
|
+
id?: string | undefined;
|
|
4135
4135
|
partyId?: string | undefined;
|
|
4136
4136
|
internalId?: string | undefined;
|
|
4137
4137
|
businessName?: string | undefined;
|
|
@@ -4473,7 +4473,7 @@ declare const partnerApi: OpenAPIHono<{
|
|
|
4473
4473
|
}[] | undefined;
|
|
4474
4474
|
} | null;
|
|
4475
4475
|
organizationData: {
|
|
4476
|
-
id
|
|
4476
|
+
id?: string | undefined;
|
|
4477
4477
|
partyId?: string | undefined;
|
|
4478
4478
|
internalId?: string | undefined;
|
|
4479
4479
|
businessName?: string | undefined;
|
|
@@ -16725,7 +16725,7 @@ declare const partyUpdateInputSchema: z.ZodObject<{
|
|
|
16725
16725
|
}, z.core.$strip>>>;
|
|
16726
16726
|
}, z.core.$strip>>;
|
|
16727
16727
|
organizationData: z.ZodNullable<z.ZodObject<{
|
|
16728
|
-
id: z.ZodUUID
|
|
16728
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
16729
16729
|
partyId: z.ZodOptional<z.ZodUUID>;
|
|
16730
16730
|
internalId: z.ZodOptional<z.ZodString>;
|
|
16731
16731
|
businessName: z.ZodOptional<z.ZodString>;
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -3789,7 +3789,7 @@ declare const partnerApi: OpenAPIHono<{
|
|
|
3789
3789
|
}[] | undefined;
|
|
3790
3790
|
} | null;
|
|
3791
3791
|
organizationData: {
|
|
3792
|
-
id
|
|
3792
|
+
id?: string | undefined;
|
|
3793
3793
|
partyId?: string | undefined;
|
|
3794
3794
|
internalId?: string | undefined;
|
|
3795
3795
|
businessName?: string | undefined;
|
|
@@ -4131,7 +4131,7 @@ declare const partnerApi: OpenAPIHono<{
|
|
|
4131
4131
|
}[] | undefined;
|
|
4132
4132
|
} | null;
|
|
4133
4133
|
organizationData: {
|
|
4134
|
-
id
|
|
4134
|
+
id?: string | undefined;
|
|
4135
4135
|
partyId?: string | undefined;
|
|
4136
4136
|
internalId?: string | undefined;
|
|
4137
4137
|
businessName?: string | undefined;
|
|
@@ -4473,7 +4473,7 @@ declare const partnerApi: OpenAPIHono<{
|
|
|
4473
4473
|
}[] | undefined;
|
|
4474
4474
|
} | null;
|
|
4475
4475
|
organizationData: {
|
|
4476
|
-
id
|
|
4476
|
+
id?: string | undefined;
|
|
4477
4477
|
partyId?: string | undefined;
|
|
4478
4478
|
internalId?: string | undefined;
|
|
4479
4479
|
businessName?: string | undefined;
|
|
@@ -16725,7 +16725,7 @@ declare const partyUpdateInputSchema: z.ZodObject<{
|
|
|
16725
16725
|
}, z.core.$strip>>>;
|
|
16726
16726
|
}, z.core.$strip>>;
|
|
16727
16727
|
organizationData: z.ZodNullable<z.ZodObject<{
|
|
16728
|
-
id: z.ZodUUID
|
|
16728
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
16729
16729
|
partyId: z.ZodOptional<z.ZodUUID>;
|
|
16730
16730
|
internalId: z.ZodOptional<z.ZodString>;
|
|
16731
16731
|
businessName: z.ZodOptional<z.ZodString>;
|
package/dist/v1/index.mjs
CHANGED
|
@@ -355,6 +355,25 @@ function logAuditEvent(context, input) {
|
|
|
355
355
|
);
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
+
const requireRoutableAccount = (data, ctx) => {
|
|
359
|
+
if (data.iban?.trim()) return;
|
|
360
|
+
if (!data.number?.trim()) {
|
|
361
|
+
ctx.addIssue({
|
|
362
|
+
code: "custom",
|
|
363
|
+
message: "Vypl\u0148te IBAN, nebo \u010D\xEDslo \xFA\u010Dtu spolu se SWIFT/BIC (alespo\u0148 jedna varianta je povinn\xE1)",
|
|
364
|
+
path: ["number"]
|
|
365
|
+
});
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
if (!data.swiftBic?.trim() && !data.bicCor?.trim()) {
|
|
369
|
+
ctx.addIssue({
|
|
370
|
+
code: "custom",
|
|
371
|
+
message: "Pro \xFA\u010Det bez IBAN je nutn\xE9 vyplnit SWIFT/BIC (banka p\u0159\xEDjemce ho pot\u0159ebuje pro sm\u011Brov\xE1n\xED platby)",
|
|
372
|
+
path: ["swiftBic"]
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
358
377
|
z.object({
|
|
359
378
|
message: z.string(),
|
|
360
379
|
data: z.null(),
|
|
@@ -483,7 +502,7 @@ const bankAccountInputSchema = updateBankAccountSchema.required({
|
|
|
483
502
|
holderName: true,
|
|
484
503
|
currency: true,
|
|
485
504
|
countryCode: true
|
|
486
|
-
}).omit({ id: true, partyId: true });
|
|
505
|
+
}).omit({ id: true, partyId: true }).superRefine(requireRoutableAccount);
|
|
487
506
|
const disponentSchema = z.object({
|
|
488
507
|
partyType: z.literal("INDIVIDUAL"),
|
|
489
508
|
data: individualInsertSchema
|
|
@@ -1001,7 +1020,7 @@ const individualUpdateSchema = z.object({
|
|
|
1001
1020
|
identityDocuments: z.array(idDocumentInputSchema).optional()
|
|
1002
1021
|
});
|
|
1003
1022
|
const organizationUpdateSchema = z.object({
|
|
1004
|
-
id: z.uuid(),
|
|
1023
|
+
id: z.uuid().optional(),
|
|
1005
1024
|
partyId: z.uuid().optional(),
|
|
1006
1025
|
internalId: z.string().optional(),
|
|
1007
1026
|
businessName: z.string().optional(),
|
|
@@ -1040,7 +1059,7 @@ const syncBankAccountSchema = z.object({
|
|
|
1040
1059
|
countryCode: bankAccountMetadataSchema.shape.countryCode.nonoptional(),
|
|
1041
1060
|
id: z.uuid().optional(),
|
|
1042
1061
|
statementUri: z.string().optional()
|
|
1043
|
-
});
|
|
1062
|
+
}).superRefine(requireRoutableAccount);
|
|
1044
1063
|
const disponentIndividualSyncDataSchema = z.object({
|
|
1045
1064
|
id: z.uuid().optional(),
|
|
1046
1065
|
name: z.string(),
|