@devizovaburza/mdm-sdk 1.2.1 → 1.2.3
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 +6483 -8270
- package/dist/v1/index.d.ts +6483 -8270
- package/dist/v1/index.mjs +97 -137
- package/package.json +1 -1
package/dist/v1/index.mjs
CHANGED
|
@@ -163,6 +163,24 @@ const RISK_BUSINESS_AREA$1 = [
|
|
|
163
163
|
"VIRTUAL_ASSET_SERVICES"
|
|
164
164
|
];
|
|
165
165
|
|
|
166
|
+
const XIdempotencyKeyHeaderSchema = z.string().openapi({
|
|
167
|
+
description: "Unique identifier header to ensure the request is processed only once.",
|
|
168
|
+
example: "4ac15c22-2bd3-426f-b915-bfd5febdb7df"
|
|
169
|
+
});
|
|
170
|
+
const XSignatureHeaderSchema = z.string().openapi({
|
|
171
|
+
description: "Payload signature header to verify request body integrity.",
|
|
172
|
+
example: "FIXAxHO6QqH3M7t4MatM8U6l/nIqWj7jIEW2U6/771MGUorSywy+GmKIG3B1mxT1jR7qPtBHQ5YSO8O53iCvOh6kIhbGXtVe/3C61dsEykLbmntV3nF4DY8/HyfF8a6c2Asc5bvgHrhosGi3s/ouoNowMpsckyq66We8H5gRbXlqJm4Bl1zWWQah4aQLX548L8DLx5+EIgArNMVVG8ryCES99aovJBKrQQMpQLwss1sSFuUZ1kdBCodtvxgTOXOugnZ1UNCmUNFXryQ6bn7wY7Punml/rwR/zTQ9j4SX07iFeQC5rgm9/zi29DBluegu+b8/G8oXrf6L4hugbMEKJfLRfKjNHCrjCooKtInoYxwNEfJyJ9mhqdBoeIBca9zgPpewdbwFLXVV82TYR+xZiywDcHKQ62IzQp07NOMCl4xArSJ3vIWUftSYpLIwomyjQEbY27oGiubUF4krEKgHnMYalCn0ruYOwFik2Pa6FEfIZo0TSXDC24UHQb5mJNPYpv2hny7U5CZPmBvjaRGMVnE+WgRUT19cwqlSL3pWAfeSn1Wro7lYBp/PmlRPgYIxl9GJwNlQ0G+NzP9cMSJbmI5fwErDNgJAaPaMwZbJ3y8ikmbBkkXNPKvQrWVGCJ4nP+/f8yYzMZq272EFx984pSoo2yAeBJnrxbW+AlZxyIo="
|
|
173
|
+
});
|
|
174
|
+
const XSignatureKeyHeaderSchema = z.string().openapi({
|
|
175
|
+
description: "Signature key identifier header to specify which key was used for payload signing.",
|
|
176
|
+
example: "ixtal"
|
|
177
|
+
});
|
|
178
|
+
const COUNTRY_CODES = COUNTRY_CODES_2;
|
|
179
|
+
const ALLOWED_ID_DOCUMENTS_FILTERS = {
|
|
180
|
+
PARTY_ID: "filterIdDocumentPartyId",
|
|
181
|
+
ISSUER: "filterIdDocumentIssuer"
|
|
182
|
+
};
|
|
183
|
+
|
|
166
184
|
const ADDRESS_TYPE = [
|
|
167
185
|
"PERMANENT_ADDRESS",
|
|
168
186
|
"REGISTERED_OFFICE",
|
|
@@ -332,7 +350,7 @@ const partySchema$1 = z.object({
|
|
|
332
350
|
id: z.uuid(),
|
|
333
351
|
internalId: z.string().optional(),
|
|
334
352
|
note: z.string().optional(),
|
|
335
|
-
countryCode: z.enum(
|
|
353
|
+
countryCode: z.enum(COUNTRY_CODES).optional()
|
|
336
354
|
});
|
|
337
355
|
const idDocumentInputSchema$1 = z.object({
|
|
338
356
|
idDocType: z.enum(ID_DOC_TYPE),
|
|
@@ -351,13 +369,13 @@ const individualInsertSchema = z.object({
|
|
|
351
369
|
phone: z.string().optional(),
|
|
352
370
|
birthDate: z.string().min(1, "Datum narozen\xED je povinn\xE9"),
|
|
353
371
|
birthPlace: z.string().optional(),
|
|
354
|
-
countryOfBirth: z.enum(
|
|
372
|
+
countryOfBirth: z.enum(COUNTRY_CODES).optional(),
|
|
355
373
|
personalId: z.string().min(1, "\u010C\xEDslo identifika\u010Dn\xEDho dokumentu je povinn\xE9"),
|
|
356
374
|
gender: z.enum(GENDER, "Pohlav\xED je povinn\xE9"),
|
|
357
|
-
citizenship: z.enum(
|
|
358
|
-
citizenshipOther: z.enum(
|
|
375
|
+
citizenship: z.enum(COUNTRY_CODES, "St\xE1t je povinn\xFD"),
|
|
376
|
+
citizenshipOther: z.enum(COUNTRY_CODES).optional(),
|
|
359
377
|
employer: z.string().optional(),
|
|
360
|
-
employerCountry: z.enum(
|
|
378
|
+
employerCountry: z.enum(COUNTRY_CODES).optional(),
|
|
361
379
|
registeredNumber: z.string().optional(),
|
|
362
380
|
isPep: z.boolean({ error: "Politicky exponovan\xE1 osoba je povinn\xE1" }),
|
|
363
381
|
titleBefore: z.string().optional(),
|
|
@@ -368,7 +386,7 @@ const individualInsertSchema = z.object({
|
|
|
368
386
|
deathNotification: z.coerce.date().optional(),
|
|
369
387
|
pin: z.string().optional(),
|
|
370
388
|
stayAbroad: z.boolean().optional(),
|
|
371
|
-
stayAbroadCountries: z.enum(
|
|
389
|
+
stayAbroadCountries: z.enum(COUNTRY_CODES).optional(),
|
|
372
390
|
identityDocuments: z.array(idDocumentInputSchema$1).optional()
|
|
373
391
|
});
|
|
374
392
|
const createOrganizationInputSchema = z.object({
|
|
@@ -377,9 +395,9 @@ const createOrganizationInputSchema = z.object({
|
|
|
377
395
|
email: z.string().optional(),
|
|
378
396
|
phone: z.string().optional(),
|
|
379
397
|
registeredNumber: z.string(),
|
|
380
|
-
registeredIn: z.enum(
|
|
381
|
-
operatesIn: z.enum(
|
|
382
|
-
presentIn: z.enum(
|
|
398
|
+
registeredIn: z.enum(COUNTRY_CODES),
|
|
399
|
+
operatesIn: z.enum(COUNTRY_CODES),
|
|
400
|
+
presentIn: z.enum(COUNTRY_CODES),
|
|
383
401
|
monthlyVolumeIn: z.number(),
|
|
384
402
|
monthlyVolumeOut: z.number(),
|
|
385
403
|
ownedBy: z.string(),
|
|
@@ -418,16 +436,10 @@ const bankAccountInputSchema = updateBankAccountSchema.required({
|
|
|
418
436
|
currency: true,
|
|
419
437
|
countryCode: true
|
|
420
438
|
}).omit({ id: true, partyId: true });
|
|
421
|
-
const disponentSchema = z.
|
|
422
|
-
z.
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}),
|
|
426
|
-
z.object({
|
|
427
|
-
partyType: z.literal("ORGANIZATION"),
|
|
428
|
-
data: createOrganizationInputSchema
|
|
429
|
-
})
|
|
430
|
-
]);
|
|
439
|
+
const disponentSchema = z.object({
|
|
440
|
+
partyType: z.literal("INDIVIDUAL"),
|
|
441
|
+
data: individualInsertSchema
|
|
442
|
+
});
|
|
431
443
|
const zipCodeRegex = /^\d{3}\s?\d{2}$/;
|
|
432
444
|
const createAddressInputSchema = z.object({
|
|
433
445
|
addressType: z.enum(ADDRESS_TYPE),
|
|
@@ -440,12 +452,12 @@ const createAddressInputSchema = z.object({
|
|
|
440
452
|
zipCode: z.string().min(1, "PS\u010C je povinn\xE9").max(20).regex(zipCodeRegex, "PS\u010C je v nespr\xE1vn\xE9m form\xE1tu"),
|
|
441
453
|
district: z.string().max(255),
|
|
442
454
|
region: z.string().max(255),
|
|
443
|
-
countryCode: z.enum(
|
|
455
|
+
countryCode: z.enum(COUNTRY_CODES, "St\xE1t je povinn\xFD"),
|
|
444
456
|
ruianCode: z.string().optional()
|
|
445
457
|
});
|
|
446
458
|
const businessPartnerInputSchema$1 = z.object({
|
|
447
459
|
name: z.string().min(1, "N\xE1zev partnera je povinn\xFD"),
|
|
448
|
-
country: z.enum(
|
|
460
|
+
country: z.enum(COUNTRY_CODES, "St\xE1t partnera je povinn\xFD"),
|
|
449
461
|
cooperationReason: z.string().nullable()
|
|
450
462
|
});
|
|
451
463
|
const foSourceOfWealthInputSchema$1 = z.object({
|
|
@@ -453,7 +465,7 @@ const foSourceOfWealthInputSchema$1 = z.object({
|
|
|
453
465
|
incomeSourceOther: z.string().nullable(),
|
|
454
466
|
monthlyIncome: z.enum(MONTHLY_INCOME_RANGE, "M\u011Bs\xED\u010Dn\xED p\u0159\xEDjem je povinn\xFD"),
|
|
455
467
|
employer: z.string().min(1, "N\xE1zev zam\u011Bstnavatele je povinn\xFD").nullable(),
|
|
456
|
-
employerCountry: z.enum(
|
|
468
|
+
employerCountry: z.enum(COUNTRY_CODES, "St\xE1t zam\u011Bstnavatele je povinn\xFD").nullable()
|
|
457
469
|
});
|
|
458
470
|
const businessSourceOfWealthInputSchema$1 = z.object({
|
|
459
471
|
financialFundsSources: z.array(z.enum(FINANCIAL_FUNDS_SOURCE)).min(1, "Zdroj finan\u010Dn\xEDch prost\u0159edk\u016F je povinn\xFD"),
|
|
@@ -464,7 +476,7 @@ const businessSourceOfWealthInputSchema$1 = z.object({
|
|
|
464
476
|
"Obrat za posledn\xED 3 roky je povinn\xFD"
|
|
465
477
|
),
|
|
466
478
|
operatingCountries: z.array(z.enum(OPERATING_COUNTRY)).min(1, "Zem\u011B p\u016Fsoben\xED je povinn\xE1"),
|
|
467
|
-
operatingCountriesOther: z.array(z.enum(
|
|
479
|
+
operatingCountriesOther: z.array(z.enum(COUNTRY_CODES)).nullable(),
|
|
468
480
|
businessPartners: z.array(businessPartnerInputSchema$1).min(1, "Alespo\u0148 jeden partner je povinn\xFD").nullable(),
|
|
469
481
|
businessActivitiesNote: z.string().min(1, "Detailn\xED popis v\u0161ech podnikatelsk\xFDch \u010Dinnost\xED je povinn\xFD").nullable()
|
|
470
482
|
});
|
|
@@ -480,7 +492,7 @@ const createAmlInputSchema = z.object({
|
|
|
480
492
|
servicePurposes: z.array(z.enum(SERVICE_PURPOSE)).min(1, "\xDA\u010Del vyu\u017E\xEDv\xE1n\xED na\u0161ich slu\u017Eeb je povinn\xFD").optional(),
|
|
481
493
|
servicePurposesOther: z.string().optional(),
|
|
482
494
|
taxDomicile: z.enum(TAX_DOMICILE, { message: "Da\u0148ov\xE1 rezidence je povinn\xE1" }).optional(),
|
|
483
|
-
taxDomicileCountry: z.enum(
|
|
495
|
+
taxDomicileCountry: z.enum(COUNTRY_CODES).optional(),
|
|
484
496
|
transactionType: z.string().optional(),
|
|
485
497
|
transactionTypeExpiry: z.coerce.date().optional(),
|
|
486
498
|
isDistraint: z.boolean().default(false),
|
|
@@ -494,7 +506,7 @@ const createAmlInputSchema = z.object({
|
|
|
494
506
|
),
|
|
495
507
|
estTxsCountMonth: z.number().int().optional(),
|
|
496
508
|
tradingCountries: z.array(z.enum(TARGET_COUNTRY)).min(1, "Vyberte alespo\u0148 jednu c\xEDlovou zemi"),
|
|
497
|
-
tradingCountriesOther: z.array(z.enum(
|
|
509
|
+
tradingCountriesOther: z.array(z.enum(COUNTRY_CODES)).optional(),
|
|
498
510
|
tradingSide: z.enum(TRADING_SIDE, "Strana obchodov\xE1n\xED je povinn\xE1"),
|
|
499
511
|
acceptedAMLTermsAndConditions: z.boolean().refine((v) => v === true, {
|
|
500
512
|
message: "Mus\xEDte potvrdit souhlas s prohl\xE1\u0161en\xEDm",
|
|
@@ -511,7 +523,7 @@ const createAmlInputSchema = z.object({
|
|
|
511
523
|
personName: z.string(),
|
|
512
524
|
personRole: z.enum(PERSON_ROLE),
|
|
513
525
|
answer: z.enum(YES_NO_UNKNOWN),
|
|
514
|
-
country: z.enum(
|
|
526
|
+
country: z.enum(COUNTRY_CODES).nullable()
|
|
515
527
|
})
|
|
516
528
|
).optional()
|
|
517
529
|
});
|
|
@@ -534,7 +546,7 @@ const ownerInputSchema = z.object({
|
|
|
534
546
|
birthPlace: z.string().optional(),
|
|
535
547
|
personalId: z.string().min(1, "Rodn\xE9 \u010D\xEDslo je povinn\xE9"),
|
|
536
548
|
gender: z.enum(GENDER, "Pohlav\xED je povinn\xE9"),
|
|
537
|
-
citizenship: z.enum(
|
|
549
|
+
citizenship: z.enum(COUNTRY_CODES, "St\xE1tn\xED p\u0159\xEDslu\u0161nost je povinn\xE1"),
|
|
538
550
|
isPep: z.boolean({ error: "Politicky exponovan\xE1 osoba je povinn\xE1" }),
|
|
539
551
|
address: createAddressInputSchema,
|
|
540
552
|
sharePercentage: z.number({ error: "Pod\xEDl na spole\u010Dnosti je povinn\xFD" }).min(1, "Pod\xEDl na spole\u010Dnosti je povinn\xFD").max(100),
|
|
@@ -550,7 +562,7 @@ const legalRepresentativeInputSchema = z.object({
|
|
|
550
562
|
birthPlace: z.string().optional(),
|
|
551
563
|
personalId: z.string().min(1, "Rodn\xE9 \u010D\xEDslo je povinn\xE9"),
|
|
552
564
|
gender: z.enum(GENDER, "Pohlav\xED je povinn\xE9"),
|
|
553
|
-
citizenship: z.enum(
|
|
565
|
+
citizenship: z.enum(COUNTRY_CODES, "St\xE1tn\xED p\u0159\xEDslu\u0161nost je povinn\xE1"),
|
|
554
566
|
isPep: z.boolean({ error: "Politicky exponovan\xE1 osoba je povinn\xE1" }),
|
|
555
567
|
phone: z.string().optional(),
|
|
556
568
|
pin: z.string().optional(),
|
|
@@ -579,7 +591,7 @@ const partyCreateOutputSchema = z.object({
|
|
|
579
591
|
id: z.uuid(),
|
|
580
592
|
internalId: z.string().nullable(),
|
|
581
593
|
note: z.string().nullable(),
|
|
582
|
-
countryCode: z.enum(
|
|
594
|
+
countryCode: z.enum(COUNTRY_CODES).nullable(),
|
|
583
595
|
createdAt: z.iso.datetime().nullable(),
|
|
584
596
|
updatedAt: z.iso.datetime().nullable()
|
|
585
597
|
});
|
|
@@ -859,7 +871,7 @@ const partySchema = z.object({
|
|
|
859
871
|
id: z.uuid(),
|
|
860
872
|
internalId: z.string().optional(),
|
|
861
873
|
note: z.string().optional(),
|
|
862
|
-
countryCode: z.enum(
|
|
874
|
+
countryCode: z.enum(COUNTRY_CODES).optional()
|
|
863
875
|
});
|
|
864
876
|
const idDocumentInputSchema = z.object({
|
|
865
877
|
id: z.uuid().optional(),
|
|
@@ -881,13 +893,13 @@ const individualUpdateSchema = z.object({
|
|
|
881
893
|
phone: z.string().optional(),
|
|
882
894
|
birthDate: z.string().min(1, "Datum narozen\xED je povinn\xE9"),
|
|
883
895
|
birthPlace: z.string().optional(),
|
|
884
|
-
countryOfBirth: z.enum(
|
|
896
|
+
countryOfBirth: z.enum(COUNTRY_CODES).optional(),
|
|
885
897
|
personalId: z.string().optional(),
|
|
886
898
|
gender: z.enum(GENDER).optional(),
|
|
887
|
-
citizenship: z.enum(
|
|
888
|
-
citizenshipOther: z.enum(
|
|
899
|
+
citizenship: z.enum(COUNTRY_CODES).optional(),
|
|
900
|
+
citizenshipOther: z.enum(COUNTRY_CODES).optional(),
|
|
889
901
|
employer: z.string().optional(),
|
|
890
|
-
employerCountry: z.enum(
|
|
902
|
+
employerCountry: z.enum(COUNTRY_CODES).optional(),
|
|
891
903
|
registeredNumber: z.string().optional(),
|
|
892
904
|
isPep: z.boolean().optional(),
|
|
893
905
|
titleBefore: z.string().optional(),
|
|
@@ -898,7 +910,7 @@ const individualUpdateSchema = z.object({
|
|
|
898
910
|
deathNotification: z.coerce.date().optional(),
|
|
899
911
|
pin: z.string().optional(),
|
|
900
912
|
stayAbroad: z.boolean().optional(),
|
|
901
|
-
stayAbroadCountries: z.enum(
|
|
913
|
+
stayAbroadCountries: z.enum(COUNTRY_CODES).optional(),
|
|
902
914
|
identityDocuments: z.array(idDocumentInputSchema).optional()
|
|
903
915
|
});
|
|
904
916
|
const organizationUpdateSchema = z.object({
|
|
@@ -909,9 +921,9 @@ const organizationUpdateSchema = z.object({
|
|
|
909
921
|
email: z.email("Invalid email format").optional(),
|
|
910
922
|
phone: z.string().optional(),
|
|
911
923
|
registeredNumber: z.string().optional(),
|
|
912
|
-
registeredIn: z.enum(
|
|
913
|
-
operatesIn: z.enum(
|
|
914
|
-
presentIn: z.enum(
|
|
924
|
+
registeredIn: z.enum(COUNTRY_CODES).optional(),
|
|
925
|
+
operatesIn: z.enum(COUNTRY_CODES).optional(),
|
|
926
|
+
presentIn: z.enum(COUNTRY_CODES).optional(),
|
|
915
927
|
monthlyVolumeIn: z.number().optional(),
|
|
916
928
|
monthlyVolumeOut: z.number().optional(),
|
|
917
929
|
ownedBy: z.string().optional(),
|
|
@@ -950,13 +962,13 @@ const disponentIndividualSyncDataSchema = z.object({
|
|
|
950
962
|
phone: z.string().optional(),
|
|
951
963
|
birthDate: z.string().min(1, "Datum narozen\xED je povinn\xE9"),
|
|
952
964
|
birthPlace: z.string().optional(),
|
|
953
|
-
countryOfBirth: z.enum(
|
|
965
|
+
countryOfBirth: z.enum(COUNTRY_CODES).optional(),
|
|
954
966
|
personalId: z.string(),
|
|
955
967
|
gender: z.enum(GENDER),
|
|
956
|
-
citizenship: z.enum(
|
|
957
|
-
citizenshipOther: z.enum(
|
|
968
|
+
citizenship: z.enum(COUNTRY_CODES),
|
|
969
|
+
citizenshipOther: z.enum(COUNTRY_CODES).optional(),
|
|
958
970
|
employer: z.string().optional(),
|
|
959
|
-
employerCountry: z.enum(
|
|
971
|
+
employerCountry: z.enum(COUNTRY_CODES).optional(),
|
|
960
972
|
registeredNumber: z.string().optional(),
|
|
961
973
|
isPep: z.boolean(),
|
|
962
974
|
titleBefore: z.string().optional(),
|
|
@@ -967,45 +979,13 @@ const disponentIndividualSyncDataSchema = z.object({
|
|
|
967
979
|
deathNotification: z.coerce.date().optional(),
|
|
968
980
|
pin: z.string().optional(),
|
|
969
981
|
stayAbroad: z.boolean().optional(),
|
|
970
|
-
stayAbroadCountries: z.enum(
|
|
982
|
+
stayAbroadCountries: z.enum(COUNTRY_CODES).optional(),
|
|
971
983
|
identityDocuments: z.array(idDocumentInputSchema).optional()
|
|
972
984
|
});
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
email: z.email("Invalid email format").optional(),
|
|
977
|
-
phone: z.string().optional(),
|
|
978
|
-
registeredNumber: z.string(),
|
|
979
|
-
registeredIn: z.enum(COUNTRY_CODES_2),
|
|
980
|
-
operatesIn: z.enum(COUNTRY_CODES_2),
|
|
981
|
-
presentIn: z.enum(COUNTRY_CODES_2),
|
|
982
|
-
monthlyVolumeIn: z.number(),
|
|
983
|
-
monthlyVolumeOut: z.number(),
|
|
984
|
-
ownedBy: z.string(),
|
|
985
|
-
companyObjects: z.array(z.enum(CZ_NACE_CODES)).min(1),
|
|
986
|
-
annualTurnover: z.number(),
|
|
987
|
-
numberOfEmployees: z.number().optional(),
|
|
988
|
-
prosecuted: z.string().optional(),
|
|
989
|
-
location: z.string().optional(),
|
|
990
|
-
fileNumber: z.string().optional(),
|
|
991
|
-
websiteUrl: z.url("Invalid website URL").optional(),
|
|
992
|
-
vatPayer: z.boolean(),
|
|
993
|
-
companyObjectsDescription: z.string(),
|
|
994
|
-
turnover3years: z.number(),
|
|
995
|
-
operationCountries: z.string(),
|
|
996
|
-
riskyBusinessType: z.string().optional(),
|
|
997
|
-
registerUri: z.string().optional()
|
|
985
|
+
const disponentSyncSchema = z.object({
|
|
986
|
+
partyType: z.literal("INDIVIDUAL"),
|
|
987
|
+
data: disponentIndividualSyncDataSchema
|
|
998
988
|
});
|
|
999
|
-
const disponentSyncSchema = z.discriminatedUnion("partyType", [
|
|
1000
|
-
z.object({
|
|
1001
|
-
partyType: z.literal("INDIVIDUAL"),
|
|
1002
|
-
data: disponentIndividualSyncDataSchema
|
|
1003
|
-
}),
|
|
1004
|
-
z.object({
|
|
1005
|
-
partyType: z.literal("ORGANIZATION"),
|
|
1006
|
-
data: disponentOrganizationSyncDataSchema
|
|
1007
|
-
})
|
|
1008
|
-
]);
|
|
1009
989
|
const syncAddressInputSchema = z.object({
|
|
1010
990
|
id: z.uuid().optional(),
|
|
1011
991
|
partyId: z.uuid(),
|
|
@@ -1019,12 +999,12 @@ const syncAddressInputSchema = z.object({
|
|
|
1019
999
|
zipCode: z.string().max(20),
|
|
1020
1000
|
district: z.string().max(255),
|
|
1021
1001
|
region: z.string().max(255),
|
|
1022
|
-
countryCode: z.enum(
|
|
1002
|
+
countryCode: z.enum(COUNTRY_CODES),
|
|
1023
1003
|
ruianCode: z.string().optional()
|
|
1024
1004
|
});
|
|
1025
1005
|
const businessPartnerInputSchema = z.object({
|
|
1026
1006
|
name: z.string().min(1, "N\xE1zev partnera je povinn\xFD"),
|
|
1027
|
-
country: z.enum(
|
|
1007
|
+
country: z.enum(COUNTRY_CODES, "St\xE1t partnera je povinn\xFD"),
|
|
1028
1008
|
cooperationReason: z.string().nullable()
|
|
1029
1009
|
});
|
|
1030
1010
|
const foSourceOfWealthInputSchema = z.object({
|
|
@@ -1032,7 +1012,7 @@ const foSourceOfWealthInputSchema = z.object({
|
|
|
1032
1012
|
incomeSourceOther: z.string().nullable(),
|
|
1033
1013
|
monthlyIncome: z.enum(MONTHLY_INCOME_RANGE, "M\u011Bs\xED\u010Dn\xED p\u0159\xEDjem je povinn\xFD"),
|
|
1034
1014
|
employer: z.string().min(1, "N\xE1zev zam\u011Bstnavatele je povinn\xFD").nullable(),
|
|
1035
|
-
employerCountry: z.enum(
|
|
1015
|
+
employerCountry: z.enum(COUNTRY_CODES, "St\xE1t zam\u011Bstnavatele je povinn\xFD").nullable()
|
|
1036
1016
|
});
|
|
1037
1017
|
const businessSourceOfWealthInputSchema = z.object({
|
|
1038
1018
|
financialFundsSources: z.array(z.enum(FINANCIAL_FUNDS_SOURCE)).min(1, "Zdroj finan\u010Dn\xEDch prost\u0159edk\u016F je povinn\xFD"),
|
|
@@ -1043,7 +1023,7 @@ const businessSourceOfWealthInputSchema = z.object({
|
|
|
1043
1023
|
"Obrat za posledn\xED 3 roky je povinn\xFD"
|
|
1044
1024
|
),
|
|
1045
1025
|
operatingCountries: z.array(z.enum(OPERATING_COUNTRY)).min(1, "Zem\u011B p\u016Fsoben\xED je povinn\xE1"),
|
|
1046
|
-
operatingCountriesOther: z.array(z.enum(
|
|
1026
|
+
operatingCountriesOther: z.array(z.enum(COUNTRY_CODES)).nullable(),
|
|
1047
1027
|
businessPartners: z.array(businessPartnerInputSchema).min(1, "Alespo\u0148 jeden partner je povinn\xFD").nullable(),
|
|
1048
1028
|
businessActivitiesNote: z.string().min(1, "Detailn\xED popis v\u0161ech podnikatelsk\xFDch \u010Dinnost\xED je povinn\xFD").nullable()
|
|
1049
1029
|
});
|
|
@@ -1058,7 +1038,7 @@ const updateAmlInputSchema = z.object({
|
|
|
1058
1038
|
servicePurposes: z.array(z.enum(SERVICE_PURPOSE)).optional(),
|
|
1059
1039
|
servicePurposesOther: z.string().optional(),
|
|
1060
1040
|
taxDomicile: z.enum(TAX_DOMICILE).optional(),
|
|
1061
|
-
taxDomicileCountry: z.enum(
|
|
1041
|
+
taxDomicileCountry: z.enum(COUNTRY_CODES).optional(),
|
|
1062
1042
|
transactionType: z.string().optional(),
|
|
1063
1043
|
transactionTypeExpiry: z.coerce.date().optional(),
|
|
1064
1044
|
isDistraint: z.boolean().optional(),
|
|
@@ -1066,7 +1046,7 @@ const updateAmlInputSchema = z.object({
|
|
|
1066
1046
|
estTxsVolumeYear: z.enum(EST_TXS_VOLUME_YEAR),
|
|
1067
1047
|
estTxsCountMonth: z.number().int().optional(),
|
|
1068
1048
|
tradingCountries: z.array(z.enum(TARGET_COUNTRY)).min(1),
|
|
1069
|
-
tradingCountriesOther: z.array(z.enum(
|
|
1049
|
+
tradingCountriesOther: z.array(z.enum(COUNTRY_CODES)).optional(),
|
|
1070
1050
|
tradingSide: z.enum(TRADING_SIDE),
|
|
1071
1051
|
acceptedAMLTermsAndConditions: z.boolean(),
|
|
1072
1052
|
signatureMethod: z.enum(SIGNATURE_METHOD).optional(),
|
|
@@ -1080,7 +1060,7 @@ const updateAmlInputSchema = z.object({
|
|
|
1080
1060
|
personName: z.string(),
|
|
1081
1061
|
personRole: z.enum(PERSON_ROLE),
|
|
1082
1062
|
answer: z.enum(YES_NO_UNKNOWN),
|
|
1083
|
-
country: z.enum(
|
|
1063
|
+
country: z.enum(COUNTRY_CODES).nullable()
|
|
1084
1064
|
})
|
|
1085
1065
|
).optional()
|
|
1086
1066
|
});
|
|
@@ -1104,7 +1084,7 @@ const ownerSyncSchema = z.object({
|
|
|
1104
1084
|
birthPlace: z.string().optional(),
|
|
1105
1085
|
personalId: z.string(),
|
|
1106
1086
|
gender: z.enum(GENDER),
|
|
1107
|
-
citizenship: z.enum(
|
|
1087
|
+
citizenship: z.enum(COUNTRY_CODES),
|
|
1108
1088
|
isPep: z.boolean(),
|
|
1109
1089
|
address: syncAddressInputSchema,
|
|
1110
1090
|
sharePercentage: z.number().max(100),
|
|
@@ -1121,7 +1101,7 @@ const legalRepresentativeSyncSchema = z.object({
|
|
|
1121
1101
|
birthPlace: z.string().optional(),
|
|
1122
1102
|
personalId: z.string(),
|
|
1123
1103
|
gender: z.enum(GENDER),
|
|
1124
|
-
citizenship: z.enum(
|
|
1104
|
+
citizenship: z.enum(COUNTRY_CODES),
|
|
1125
1105
|
isPep: z.boolean(),
|
|
1126
1106
|
phone: z.string().optional(),
|
|
1127
1107
|
pin: z.string().optional(),
|
|
@@ -1149,7 +1129,7 @@ const updatePartyOuputSchema = z.object({
|
|
|
1149
1129
|
partyType: z.enum(PARTY_TYPE),
|
|
1150
1130
|
language: z.enum(LANGUAGE_CODES),
|
|
1151
1131
|
note: z.string().nullable(),
|
|
1152
|
-
countryCode: z.enum(
|
|
1132
|
+
countryCode: z.enum(COUNTRY_CODES).nullable()
|
|
1153
1133
|
});
|
|
1154
1134
|
const responseBodySchema$4 = z.object({
|
|
1155
1135
|
message: z.string(),
|
|
@@ -1306,7 +1286,7 @@ const idDocumentCreateInputSchema = z.object({
|
|
|
1306
1286
|
issueDate: z.coerce.date().optional(),
|
|
1307
1287
|
expirationDate: z.coerce.date().optional(),
|
|
1308
1288
|
issuer: z.string().optional(),
|
|
1309
|
-
countryOfIssue: z.enum(
|
|
1289
|
+
countryOfIssue: z.enum(COUNTRY_CODES).optional(),
|
|
1310
1290
|
idDocStatus: z.enum(ID_DOC_STATUS).optional()
|
|
1311
1291
|
});
|
|
1312
1292
|
const idDocumentMultipartSchema = z.object({
|
|
@@ -1336,7 +1316,7 @@ const idDocumentOutputSchema = z.object({
|
|
|
1336
1316
|
issueDate: z.iso.datetime().nullable(),
|
|
1337
1317
|
expirationDate: z.iso.datetime().nullable(),
|
|
1338
1318
|
issuer: z.string().nullable(),
|
|
1339
|
-
countryOfIssue: z.enum(
|
|
1319
|
+
countryOfIssue: z.enum(COUNTRY_CODES).nullable(),
|
|
1340
1320
|
frontImageUri: z.string().nullable(),
|
|
1341
1321
|
backImageUri: z.string().nullable(),
|
|
1342
1322
|
idDocStatus: z.enum(ID_DOC_STATUS).nullable()
|
|
@@ -1462,7 +1442,7 @@ const partyBaseOutputSchema = z.object({
|
|
|
1462
1442
|
id: z.uuid(),
|
|
1463
1443
|
internalId: z.string().nullable(),
|
|
1464
1444
|
note: z.string().nullable(),
|
|
1465
|
-
countryCode: z.enum(
|
|
1445
|
+
countryCode: z.enum(COUNTRY_CODES).nullable(),
|
|
1466
1446
|
createdAt: z.iso.datetime().nullable(),
|
|
1467
1447
|
updatedAt: z.iso.datetime().nullable(),
|
|
1468
1448
|
deletedAt: z.iso.datetime().nullable(),
|
|
@@ -1479,13 +1459,13 @@ const individualOutputSchema = z.object({
|
|
|
1479
1459
|
phone: z.string().nullable(),
|
|
1480
1460
|
birthDate: z.string(),
|
|
1481
1461
|
birthPlace: z.string().nullable(),
|
|
1482
|
-
countryOfBirth: z.enum(
|
|
1462
|
+
countryOfBirth: z.enum(COUNTRY_CODES).nullable(),
|
|
1483
1463
|
personalId: z.string(),
|
|
1484
1464
|
gender: z.enum(GENDER),
|
|
1485
|
-
citizenship: z.enum(
|
|
1486
|
-
citizenshipOther: z.enum(
|
|
1465
|
+
citizenship: z.enum(COUNTRY_CODES),
|
|
1466
|
+
citizenshipOther: z.enum(COUNTRY_CODES).nullable(),
|
|
1487
1467
|
employer: z.string().nullable(),
|
|
1488
|
-
employerCountry: z.enum(
|
|
1468
|
+
employerCountry: z.enum(COUNTRY_CODES).nullable(),
|
|
1489
1469
|
registeredNumber: z.string().nullable(),
|
|
1490
1470
|
isPep: z.boolean(),
|
|
1491
1471
|
titleBefore: z.string().nullable(),
|
|
@@ -1496,21 +1476,22 @@ const individualOutputSchema = z.object({
|
|
|
1496
1476
|
deathNotification: z.iso.datetime().nullable(),
|
|
1497
1477
|
pin: z.string().nullable(),
|
|
1498
1478
|
stayAbroad: z.boolean().nullable(),
|
|
1499
|
-
stayAbroadCountries: z.enum(
|
|
1479
|
+
stayAbroadCountries: z.enum(COUNTRY_CODES).nullable(),
|
|
1500
1480
|
createdAt: z.iso.datetime().nullable(),
|
|
1501
1481
|
updatedAt: z.iso.datetime().nullable(),
|
|
1502
1482
|
identityDocuments: z.array(idDocumentOutputSchema).nullable()
|
|
1503
1483
|
});
|
|
1504
1484
|
const createOrganizationOutputSchema = z.object({
|
|
1485
|
+
id: z.uuid(),
|
|
1505
1486
|
partyId: z.uuid(),
|
|
1506
1487
|
internalId: z.string().nullable(),
|
|
1507
1488
|
businessName: z.string(),
|
|
1508
1489
|
email: z.string().nullable(),
|
|
1509
1490
|
phone: z.string().nullable(),
|
|
1510
1491
|
registeredNumber: z.string(),
|
|
1511
|
-
registeredIn: z.enum(
|
|
1512
|
-
operatesIn: z.enum(
|
|
1513
|
-
presentIn: z.enum(
|
|
1492
|
+
registeredIn: z.enum(COUNTRY_CODES),
|
|
1493
|
+
operatesIn: z.enum(COUNTRY_CODES),
|
|
1494
|
+
presentIn: z.enum(COUNTRY_CODES),
|
|
1514
1495
|
monthlyVolumeIn: z.number(),
|
|
1515
1496
|
monthlyVolumeOut: z.number(),
|
|
1516
1497
|
ownedBy: z.string(),
|
|
@@ -1536,9 +1517,9 @@ const bankAccountOutputSchema = z.object({
|
|
|
1536
1517
|
internalId: z.string().nullable(),
|
|
1537
1518
|
holderName: z.string(),
|
|
1538
1519
|
number: z.string().nullable(),
|
|
1539
|
-
bankCode: z.
|
|
1540
|
-
currency: z.
|
|
1541
|
-
countryCode: z.
|
|
1520
|
+
bankCode: z.enum(BANK_CODES).nullable(),
|
|
1521
|
+
currency: z.enum(CURRENCY_CODES),
|
|
1522
|
+
countryCode: z.enum(COUNTRY_CODES),
|
|
1542
1523
|
iban: z.string().nullable(),
|
|
1543
1524
|
address: z.string().nullable(),
|
|
1544
1525
|
swiftBic: z.string().nullable(),
|
|
@@ -1551,16 +1532,10 @@ const bankAccountOutputSchema = z.object({
|
|
|
1551
1532
|
updatedAt: z.iso.datetime().nullable(),
|
|
1552
1533
|
statementUri: z.string().nullable()
|
|
1553
1534
|
});
|
|
1554
|
-
const disponentOutputSchema = z.
|
|
1555
|
-
z.
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
}),
|
|
1559
|
-
z.object({
|
|
1560
|
-
partyType: z.literal("ORGANIZATION"),
|
|
1561
|
-
data: createOrganizationOutputSchema.nullable()
|
|
1562
|
-
})
|
|
1563
|
-
]);
|
|
1535
|
+
const disponentOutputSchema = z.object({
|
|
1536
|
+
partyType: z.literal("INDIVIDUAL"),
|
|
1537
|
+
data: individualOutputSchema.nullable()
|
|
1538
|
+
});
|
|
1564
1539
|
const createAddressOutputSchema = z.object({
|
|
1565
1540
|
id: z.uuid(),
|
|
1566
1541
|
partyId: z.uuid(),
|
|
@@ -1574,7 +1549,7 @@ const createAddressOutputSchema = z.object({
|
|
|
1574
1549
|
zipCode: z.string(),
|
|
1575
1550
|
district: z.string().nullable(),
|
|
1576
1551
|
region: z.string().nullable(),
|
|
1577
|
-
countryCode: z.enum(
|
|
1552
|
+
countryCode: z.enum(COUNTRY_CODES),
|
|
1578
1553
|
ruianCode: z.string().nullable(),
|
|
1579
1554
|
createdAt: z.iso.datetime().nullable(),
|
|
1580
1555
|
updatedAt: z.iso.datetime().nullable()
|
|
@@ -1597,7 +1572,7 @@ const businessSourceOfWealthOutputSchema = z.object({
|
|
|
1597
1572
|
mainBusinessSubjects: z.array(z.enum(CZ_TRADE_LICENSE_CODES)),
|
|
1598
1573
|
companyTurnover: z.enum(COMPANY_TURNOVER_RANGE),
|
|
1599
1574
|
operatingCountries: z.array(z.enum(OPERATING_COUNTRY)),
|
|
1600
|
-
operatingCountriesOther: z.array(z.enum(
|
|
1575
|
+
operatingCountriesOther: z.array(z.enum(COUNTRY_CODES)).nullable(),
|
|
1601
1576
|
businessPartners: z.array(businessPartnerOutputSchema).nullable(),
|
|
1602
1577
|
businessActivitiesNote: z.string().nullable()
|
|
1603
1578
|
});
|
|
@@ -1615,7 +1590,7 @@ const createAmlOutputSchema = z.object({
|
|
|
1615
1590
|
servicePurposes: z.array(z.enum(SERVICE_PURPOSE)).nullable(),
|
|
1616
1591
|
servicePurposesOther: z.string().nullable(),
|
|
1617
1592
|
taxDomicile: z.enum(TAX_DOMICILE).nullable(),
|
|
1618
|
-
taxDomicileCountry: z.enum(
|
|
1593
|
+
taxDomicileCountry: z.enum(COUNTRY_CODES).nullable(),
|
|
1619
1594
|
transactionType: z.string().nullable(),
|
|
1620
1595
|
transactionTypeExpiry: z.iso.datetime().nullable(),
|
|
1621
1596
|
isDistraint: z.boolean(),
|
|
@@ -1623,7 +1598,7 @@ const createAmlOutputSchema = z.object({
|
|
|
1623
1598
|
estTxsVolumeYear: z.enum(EST_TXS_VOLUME_YEAR),
|
|
1624
1599
|
estTxsCountMonth: z.number().int().nullable(),
|
|
1625
1600
|
tradingCountries: z.array(z.enum(TARGET_COUNTRY)),
|
|
1626
|
-
tradingCountriesOther: z.array(z.enum(
|
|
1601
|
+
tradingCountriesOther: z.array(z.enum(COUNTRY_CODES)).nullable(),
|
|
1627
1602
|
tradingSide: z.enum(TRADING_SIDE),
|
|
1628
1603
|
acceptedAMLTermsAndConditions: z.boolean(),
|
|
1629
1604
|
signatureMethod: z.enum(SIGNATURE_METHOD).nullable(),
|
|
@@ -1637,7 +1612,7 @@ const createAmlOutputSchema = z.object({
|
|
|
1637
1612
|
personName: z.string(),
|
|
1638
1613
|
personRole: z.enum(PERSON_ROLE),
|
|
1639
1614
|
answer: z.enum(YES_NO_UNKNOWN),
|
|
1640
|
-
country: z.enum(
|
|
1615
|
+
country: z.enum(COUNTRY_CODES).nullable()
|
|
1641
1616
|
})
|
|
1642
1617
|
).nullable(),
|
|
1643
1618
|
createdAt: z.iso.datetime().nullable(),
|
|
@@ -1654,7 +1629,7 @@ const ownerOutputSchema = z.object({
|
|
|
1654
1629
|
birthPlace: z.string().nullable(),
|
|
1655
1630
|
personalId: z.string(),
|
|
1656
1631
|
gender: z.enum(GENDER),
|
|
1657
|
-
citizenship: z.enum(
|
|
1632
|
+
citizenship: z.enum(COUNTRY_CODES),
|
|
1658
1633
|
isPep: z.boolean(),
|
|
1659
1634
|
sharePercentage: z.number().nullable(),
|
|
1660
1635
|
shareEstablishedAt: z.string().nullable(),
|
|
@@ -1671,10 +1646,12 @@ const legalRepresentativeOutputSchema = z.object({
|
|
|
1671
1646
|
birthPlace: z.string().nullable(),
|
|
1672
1647
|
personalId: z.string(),
|
|
1673
1648
|
gender: z.enum(GENDER),
|
|
1674
|
-
citizenship: z.enum(
|
|
1649
|
+
citizenship: z.enum(COUNTRY_CODES),
|
|
1675
1650
|
isPep: z.boolean(),
|
|
1676
1651
|
phone: z.string().nullable(),
|
|
1677
1652
|
pin: z.string().nullable(),
|
|
1653
|
+
employer: z.string().nullable(),
|
|
1654
|
+
employerCountry: z.enum(COUNTRY_CODES).nullable(),
|
|
1678
1655
|
dateOfEstablishment: z.string().nullable(),
|
|
1679
1656
|
address: createAddressOutputSchema.nullable()
|
|
1680
1657
|
});
|
|
@@ -1807,23 +1784,6 @@ new OpenAPIHono().openapi(
|
|
|
1807
1784
|
}
|
|
1808
1785
|
);
|
|
1809
1786
|
|
|
1810
|
-
const XIdempotencyKeyHeaderSchema = z.string().openapi({
|
|
1811
|
-
description: "Unique identifier header to ensure the request is processed only once.",
|
|
1812
|
-
example: "4ac15c22-2bd3-426f-b915-bfd5febdb7df"
|
|
1813
|
-
});
|
|
1814
|
-
const XSignatureHeaderSchema = z.string().openapi({
|
|
1815
|
-
description: "Payload signature header to verify request body integrity.",
|
|
1816
|
-
example: "FIXAxHO6QqH3M7t4MatM8U6l/nIqWj7jIEW2U6/771MGUorSywy+GmKIG3B1mxT1jR7qPtBHQ5YSO8O53iCvOh6kIhbGXtVe/3C61dsEykLbmntV3nF4DY8/HyfF8a6c2Asc5bvgHrhosGi3s/ouoNowMpsckyq66We8H5gRbXlqJm4Bl1zWWQah4aQLX548L8DLx5+EIgArNMVVG8ryCES99aovJBKrQQMpQLwss1sSFuUZ1kdBCodtvxgTOXOugnZ1UNCmUNFXryQ6bn7wY7Punml/rwR/zTQ9j4SX07iFeQC5rgm9/zi29DBluegu+b8/G8oXrf6L4hugbMEKJfLRfKjNHCrjCooKtInoYxwNEfJyJ9mhqdBoeIBca9zgPpewdbwFLXVV82TYR+xZiywDcHKQ62IzQp07NOMCl4xArSJ3vIWUftSYpLIwomyjQEbY27oGiubUF4krEKgHnMYalCn0ruYOwFik2Pa6FEfIZo0TSXDC24UHQb5mJNPYpv2hny7U5CZPmBvjaRGMVnE+WgRUT19cwqlSL3pWAfeSn1Wro7lYBp/PmlRPgYIxl9GJwNlQ0G+NzP9cMSJbmI5fwErDNgJAaPaMwZbJ3y8ikmbBkkXNPKvQrWVGCJ4nP+/f8yYzMZq272EFx984pSoo2yAeBJnrxbW+AlZxyIo="
|
|
1817
|
-
});
|
|
1818
|
-
const XSignatureKeyHeaderSchema = z.string().openapi({
|
|
1819
|
-
description: "Signature key identifier header to specify which key was used for payload signing.",
|
|
1820
|
-
example: "ixtal"
|
|
1821
|
-
});
|
|
1822
|
-
const ALLOWED_ID_DOCUMENTS_FILTERS = {
|
|
1823
|
-
PARTY_ID: "filterIdDocumentPartyId",
|
|
1824
|
-
ISSUER: "filterIdDocumentIssuer"
|
|
1825
|
-
};
|
|
1826
|
-
|
|
1827
1787
|
const idDocumentsListOutputSchema = z.object({
|
|
1828
1788
|
totalCount: z.number(),
|
|
1829
1789
|
idDocuments: z.array(idDocumentOutputSchema)
|
|
@@ -1928,7 +1888,7 @@ const idDocumentUpdateInputSchema = z.object({
|
|
|
1928
1888
|
issueDate: z.coerce.date().optional(),
|
|
1929
1889
|
expirationDate: z.coerce.date().optional(),
|
|
1930
1890
|
issuer: z.string().optional(),
|
|
1931
|
-
countryOfIssue: z.enum(
|
|
1891
|
+
countryOfIssue: z.enum(COUNTRY_CODES).optional(),
|
|
1932
1892
|
frontImageUri: z.string().optional(),
|
|
1933
1893
|
backImageUri: z.string().optional(),
|
|
1934
1894
|
idDocStatus: z.enum(ID_DOC_STATUS).optional()
|