@devizovaburza/mdm-sdk 2.4.1-canary.f5c68c0c → 2.4.1-canary.fc0e4d1c
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 +31 -2
- package/dist/v1/index.d.ts +31 -2
- package/dist/v1/index.mjs +33 -20
- 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: {};
|
|
@@ -8880,7 +8909,7 @@ declare const createPartyInputSchema: z.ZodObject<{
|
|
|
8880
8909
|
organizationData: z.ZodNullable<z.ZodObject<{
|
|
8881
8910
|
internalId: z.ZodOptional<z.ZodString>;
|
|
8882
8911
|
businessName: z.ZodString;
|
|
8883
|
-
email: z.ZodOptional<z.
|
|
8912
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
8884
8913
|
phone: z.ZodOptional<z.ZodString>;
|
|
8885
8914
|
registeredNumber: z.ZodString;
|
|
8886
8915
|
registeredIn: z.ZodEnum<{
|
|
@@ -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: {};
|
|
@@ -8880,7 +8909,7 @@ declare const createPartyInputSchema: z.ZodObject<{
|
|
|
8880
8909
|
organizationData: z.ZodNullable<z.ZodObject<{
|
|
8881
8910
|
internalId: z.ZodOptional<z.ZodString>;
|
|
8882
8911
|
businessName: z.ZodString;
|
|
8883
|
-
email: z.ZodOptional<z.
|
|
8912
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
8884
8913
|
phone: z.ZodOptional<z.ZodString>;
|
|
8885
8914
|
registeredNumber: z.ZodString;
|
|
8886
8915
|
registeredIn: z.ZodEnum<{
|
|
@@ -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(),
|
|
@@ -471,7 +481,7 @@ const individualInsertSchema = z.object({
|
|
|
471
481
|
const createOrganizationInputSchema = z.object({
|
|
472
482
|
internalId: z.string().optional(),
|
|
473
483
|
businessName: z.string(),
|
|
474
|
-
email: z.
|
|
484
|
+
email: z.email("Invalid email format").optional(),
|
|
475
485
|
phone: z.string().optional(),
|
|
476
486
|
registeredNumber: z.string(),
|
|
477
487
|
registeredIn: z.enum(COUNTRY_CODES),
|
|
@@ -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
|
});
|
|
@@ -1015,8 +1025,8 @@ const individualUpdateSchema = z.object({
|
|
|
1015
1025
|
id: z.uuid(),
|
|
1016
1026
|
partyId: z.uuid(),
|
|
1017
1027
|
internalId: z.string().optional(),
|
|
1018
|
-
name: z.string().optional(),
|
|
1019
|
-
surname: z.string().optional(),
|
|
1028
|
+
name: z.string().min(1, "Jm\xE9no je povinn\xE9").optional(),
|
|
1029
|
+
surname: z.string().min(1, "P\u0159\xEDjmen\xED je povinn\xE9").optional(),
|
|
1020
1030
|
email: z.email("E-mail je povinn\xFD").optional(),
|
|
1021
1031
|
phone: z.string().optional(),
|
|
1022
1032
|
birthDate: z.string().min(1, "Datum narozen\xED je povinn\xE9").optional(),
|
|
@@ -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(),
|
|
@@ -1084,8 +1094,8 @@ const syncBankAccountSchema = z.object({
|
|
|
1084
1094
|
});
|
|
1085
1095
|
const disponentIndividualSyncDataSchema = z.object({
|
|
1086
1096
|
id: z.uuid().optional(),
|
|
1087
|
-
name: z.string(),
|
|
1088
|
-
surname: z.string(),
|
|
1097
|
+
name: z.string().min(1, "Jm\xE9no je povinn\xE9"),
|
|
1098
|
+
surname: z.string().min(1, "P\u0159\xEDjmen\xED je povinn\xE9"),
|
|
1089
1099
|
email: z.email("E-mail je povinn\xFD").optional(),
|
|
1090
1100
|
phone: z.string().optional(),
|
|
1091
1101
|
birthDate: z.string().min(1, "Datum narozen\xED je povinn\xE9").optional(),
|
|
@@ -1120,8 +1130,8 @@ const syncAddressInputSchema = z.object({
|
|
|
1120
1130
|
internalId: z.string().optional(),
|
|
1121
1131
|
addressType: z.enum(ADDRESS_TYPE),
|
|
1122
1132
|
street: z.string().optional(),
|
|
1123
|
-
orientationNumber: z.string().optional(),
|
|
1124
|
-
descriptiveNumber: z.string().optional(),
|
|
1133
|
+
orientationNumber: z.string().max(20, "\u010C\xEDslo orienta\u010Dn\xED je mimo povolen\xFD rozsah").optional(),
|
|
1134
|
+
descriptiveNumber: z.string().max(20, "\u010C\xEDslo popisn\xE9 je mimo povolen\xFD rozsah").optional(),
|
|
1125
1135
|
municipality: z.string().min(1).max(255).optional(),
|
|
1126
1136
|
municipalityPart: z.string().optional(),
|
|
1127
1137
|
zipCode: z.string().min(1).max(20).optional(),
|
|
@@ -1176,7 +1186,10 @@ const updateAmlInputSchema = z.object({
|
|
|
1176
1186
|
tradingCountries: z.array(z.enum(TARGET_COUNTRY)).min(1),
|
|
1177
1187
|
tradingCountriesOther: z.array(z.enum(COUNTRY_CODES)).optional(),
|
|
1178
1188
|
tradingSide: z.enum(TRADING_SIDE),
|
|
1179
|
-
acceptedAMLTermsAndConditions: z.boolean(),
|
|
1189
|
+
acceptedAMLTermsAndConditions: z.boolean().refine((v) => v === true, {
|
|
1190
|
+
message: "Mus\xEDte potvrdit souhlas s prohl\xE1\u0161en\xEDm",
|
|
1191
|
+
path: ["acceptedAMLTermsAndConditions"]
|
|
1192
|
+
}),
|
|
1180
1193
|
signatureMethod: z.enum(SIGNATURE_METHOD).optional(),
|
|
1181
1194
|
existencePeriod: z.enum(EXISTENCE_PERIOD).optional(),
|
|
1182
1195
|
reputation: z.enum(REPUTATION).optional(),
|
|
@@ -1204,8 +1217,8 @@ const productsInputSchema = z.object({
|
|
|
1204
1217
|
const ownerSyncSchema = z.object({
|
|
1205
1218
|
id: z.uuid().optional(),
|
|
1206
1219
|
titleBefore: z.string().optional(),
|
|
1207
|
-
name: z.string(),
|
|
1208
|
-
surname: z.string(),
|
|
1220
|
+
name: z.string().min(1, "Jm\xE9no je povinn\xE9"),
|
|
1221
|
+
surname: z.string().min(1, "P\u0159\xEDjmen\xED je povinn\xE9"),
|
|
1209
1222
|
titleAfter: z.string().optional(),
|
|
1210
1223
|
email: z.email("E-mail je povinn\xFD").optional(),
|
|
1211
1224
|
birthDate: z.string().min(1, "Datum narozen\xED je povinn\xE9").optional(),
|
|
@@ -1221,8 +1234,8 @@ const ownerSyncSchema = z.object({
|
|
|
1221
1234
|
const legalRepresentativeSyncSchema = z.object({
|
|
1222
1235
|
id: z.uuid().optional(),
|
|
1223
1236
|
titleBefore: z.string().optional(),
|
|
1224
|
-
name: z.string(),
|
|
1225
|
-
surname: z.string(),
|
|
1237
|
+
name: z.string().min(1, "Jm\xE9no je povinn\xE9"),
|
|
1238
|
+
surname: z.string().min(1, "P\u0159\xEDjmen\xED je povinn\xE9"),
|
|
1226
1239
|
titleAfter: z.string().optional(),
|
|
1227
1240
|
email: z.email("E-mail je povinn\xFD").optional(),
|
|
1228
1241
|
birthDate: z.string().min(1, "Datum narozen\xED je povinn\xE9").optional(),
|