@devizovaburza/mdm-sdk 2.4.1-canary.2e982a23 → 2.4.1-canary.3a8de3bf
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 +30 -1
- package/dist/v1/index.d.ts +30 -1
- package/dist/v1/index.mjs +18 -8
- package/package.json +1 -1
package/dist/v1/index.d.mts
CHANGED
|
@@ -540,6 +540,35 @@ declare const partnerApi: OpenAPIHono<AppEnv, hono_types.MergeSchemaPath<{
|
|
|
540
540
|
};
|
|
541
541
|
};
|
|
542
542
|
}, "/v1/documents/:documentId"> & hono_types.MergeSchemaPath<{
|
|
543
|
+
"/": {
|
|
544
|
+
$post: {
|
|
545
|
+
input: {};
|
|
546
|
+
output: {
|
|
547
|
+
message: string;
|
|
548
|
+
documentId: string;
|
|
549
|
+
uploadUrl: string;
|
|
550
|
+
storageUrl: string;
|
|
551
|
+
expiresIn: number;
|
|
552
|
+
};
|
|
553
|
+
outputFormat: "json";
|
|
554
|
+
status: 200;
|
|
555
|
+
} | {
|
|
556
|
+
input: {};
|
|
557
|
+
output: {
|
|
558
|
+
message: string;
|
|
559
|
+
};
|
|
560
|
+
outputFormat: "json";
|
|
561
|
+
status: 400;
|
|
562
|
+
} | {
|
|
563
|
+
input: {};
|
|
564
|
+
output: {
|
|
565
|
+
message: string;
|
|
566
|
+
};
|
|
567
|
+
outputFormat: "json";
|
|
568
|
+
status: 500;
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
}, "/v1/documents/upload-url"> & hono_types.MergeSchemaPath<{
|
|
543
572
|
"/": {
|
|
544
573
|
$post: {
|
|
545
574
|
input: {};
|
|
@@ -18014,7 +18043,7 @@ declare const partyUpdateInputSchema: z.ZodObject<{
|
|
|
18014
18043
|
prosecuted: z.ZodOptional<z.ZodString>;
|
|
18015
18044
|
location: z.ZodOptional<z.ZodString>;
|
|
18016
18045
|
fileNumber: z.ZodOptional<z.ZodString>;
|
|
18017
|
-
websiteUrl: z.ZodOptional<z.
|
|
18046
|
+
websiteUrl: z.ZodOptional<z.ZodString>;
|
|
18018
18047
|
vatPayer: z.ZodOptional<z.ZodBoolean>;
|
|
18019
18048
|
companyObjectsDescription: z.ZodOptional<z.ZodString>;
|
|
18020
18049
|
turnover3years: z.ZodOptional<z.ZodNumber>;
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -540,6 +540,35 @@ declare const partnerApi: OpenAPIHono<AppEnv, hono_types.MergeSchemaPath<{
|
|
|
540
540
|
};
|
|
541
541
|
};
|
|
542
542
|
}, "/v1/documents/:documentId"> & hono_types.MergeSchemaPath<{
|
|
543
|
+
"/": {
|
|
544
|
+
$post: {
|
|
545
|
+
input: {};
|
|
546
|
+
output: {
|
|
547
|
+
message: string;
|
|
548
|
+
documentId: string;
|
|
549
|
+
uploadUrl: string;
|
|
550
|
+
storageUrl: string;
|
|
551
|
+
expiresIn: number;
|
|
552
|
+
};
|
|
553
|
+
outputFormat: "json";
|
|
554
|
+
status: 200;
|
|
555
|
+
} | {
|
|
556
|
+
input: {};
|
|
557
|
+
output: {
|
|
558
|
+
message: string;
|
|
559
|
+
};
|
|
560
|
+
outputFormat: "json";
|
|
561
|
+
status: 400;
|
|
562
|
+
} | {
|
|
563
|
+
input: {};
|
|
564
|
+
output: {
|
|
565
|
+
message: string;
|
|
566
|
+
};
|
|
567
|
+
outputFormat: "json";
|
|
568
|
+
status: 500;
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
}, "/v1/documents/upload-url"> & hono_types.MergeSchemaPath<{
|
|
543
572
|
"/": {
|
|
544
573
|
$post: {
|
|
545
574
|
input: {};
|
|
@@ -18014,7 +18043,7 @@ declare const partyUpdateInputSchema: z.ZodObject<{
|
|
|
18014
18043
|
prosecuted: z.ZodOptional<z.ZodString>;
|
|
18015
18044
|
location: z.ZodOptional<z.ZodString>;
|
|
18016
18045
|
fileNumber: z.ZodOptional<z.ZodString>;
|
|
18017
|
-
websiteUrl: z.ZodOptional<z.
|
|
18046
|
+
websiteUrl: z.ZodOptional<z.ZodString>;
|
|
18018
18047
|
vatPayer: z.ZodOptional<z.ZodBoolean>;
|
|
18019
18048
|
companyObjectsDescription: z.ZodOptional<z.ZodString>;
|
|
18020
18049
|
turnover3years: z.ZodOptional<z.ZodNumber>;
|
package/dist/v1/index.mjs
CHANGED
|
@@ -385,6 +385,16 @@ const requireRoutableAccount = (data, ctx, basePath = []) => {
|
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
+
const zipCodeRegex = /^\d{3}\s?\d{2}$/;
|
|
389
|
+
const refineCzZipCode = (data, ctx) => {
|
|
390
|
+
if (data.countryCode === "CZ" && data.zipCode && !zipCodeRegex.test(data.zipCode)) {
|
|
391
|
+
ctx.addIssue({
|
|
392
|
+
code: "custom",
|
|
393
|
+
path: ["zipCode"],
|
|
394
|
+
message: "PS\u010C je v nespr\xE1vn\xE9m form\xE1tu"
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
};
|
|
388
398
|
|
|
389
399
|
z.object({
|
|
390
400
|
message: z.string(),
|
|
@@ -519,8 +529,7 @@ const disponentSchema = z.object({
|
|
|
519
529
|
partyType: z.literal("INDIVIDUAL"),
|
|
520
530
|
data: individualInsertSchema
|
|
521
531
|
});
|
|
522
|
-
const
|
|
523
|
-
const createAddressInputSchema = z.object({
|
|
532
|
+
const createAddressInputBaseSchema = z.object({
|
|
524
533
|
addressType: z.enum(ADDRESS_TYPE),
|
|
525
534
|
internalId: z.string().optional(),
|
|
526
535
|
street: z.string().min(1, "Adresa je povinn\xE1"),
|
|
@@ -528,20 +537,21 @@ const createAddressInputSchema = z.object({
|
|
|
528
537
|
descriptiveNumber: z.string().max(20, "\u010C\xEDslo popisn\xE9 je mimo povolen\xFD rozsah").optional(),
|
|
529
538
|
municipality: z.string().min(1, "M\u011Bsto je povinn\xE9").max(255),
|
|
530
539
|
municipalityPart: z.string().optional(),
|
|
531
|
-
|
|
540
|
+
// CZ-only format applied via superRefine below so foreign zips are accepted.
|
|
541
|
+
zipCode: z.string().min(1, "PS\u010C je povinn\xE9").max(20),
|
|
532
542
|
district: z.string().max(255),
|
|
533
543
|
region: z.string().max(255),
|
|
534
544
|
countryCode: z.enum(COUNTRY_CODES, "St\xE1t je povinn\xFD"),
|
|
535
545
|
ruianCode: z.string().optional()
|
|
536
546
|
});
|
|
537
|
-
const
|
|
547
|
+
const createAddressInputSchema = createAddressInputBaseSchema.superRefine(refineCzZipCode);
|
|
548
|
+
const ownerAddressInputBaseSchema = createAddressInputBaseSchema.extend({
|
|
538
549
|
addressType: z.enum(ADDRESS_TYPE).default("PERMANENT_ADDRESS"),
|
|
539
550
|
district: z.string().max(255).nullish(),
|
|
540
551
|
region: z.string().max(255).nullish()
|
|
541
552
|
});
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
});
|
|
553
|
+
const ownerAddressInputSchema = ownerAddressInputBaseSchema.superRefine(refineCzZipCode);
|
|
554
|
+
const legalRepresentativeAddressInputSchema = ownerAddressInputBaseSchema.extend({ street: z.string().optional() }).superRefine(refineCzZipCode);
|
|
545
555
|
const ownerIndividualInputSchema = individualInsertSchema.extend({
|
|
546
556
|
email: z.email("E-mail je povinn\xFD").optional()
|
|
547
557
|
});
|
|
@@ -1061,7 +1071,7 @@ const organizationUpdateSchema = z.object({
|
|
|
1061
1071
|
prosecuted: z.string().optional(),
|
|
1062
1072
|
location: z.string().optional(),
|
|
1063
1073
|
fileNumber: z.string().optional(),
|
|
1064
|
-
websiteUrl: z.
|
|
1074
|
+
websiteUrl: z.string().optional(),
|
|
1065
1075
|
vatPayer: z.boolean().optional(),
|
|
1066
1076
|
companyObjectsDescription: z.string().optional(),
|
|
1067
1077
|
turnover3years: z.number().optional(),
|