@devizovaburza/mdm-sdk 0.0.14 → 0.0.16
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.cjs +812 -219
- package/dist/v1/index.d.cts +9554 -2315
- package/dist/v1/index.d.mts +9554 -2315
- package/dist/v1/index.d.ts +9554 -2315
- package/dist/v1/index.mjs +795 -221
- package/package.json +1 -1
package/dist/v1/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hc } from 'hono/client';
|
|
2
2
|
import { z as z$3, createRoute, OpenAPIHono } from '@hono/zod-openapi';
|
|
3
|
-
import { COUNTRY_CODES_2, CURRENCY_CODES, BANK_CODES, LANGUAGE_CODES } from '@develit-io/general-codes';
|
|
3
|
+
import { COUNTRY_CODES_2, CURRENCY_CODES, BANK_CODES, LANGUAGE_CODES, CZ_TRADE_LICENSE_CODES, CZ_NACE_CODES } from '@develit-io/general-codes';
|
|
4
4
|
import { z as z$1 } from 'zod/v4';
|
|
5
5
|
import { z as z$2 } from 'zod';
|
|
6
6
|
import * as z from 'zod/v4/core';
|
|
@@ -82,6 +82,92 @@ const KYC_STATUS$1 = [
|
|
|
82
82
|
const TRADER_TYPE$1 = ["PERSON", "COMPANY", "OSVC"];
|
|
83
83
|
const PRODUCT_TYPE$1 = ["TXS", "CBS"];
|
|
84
84
|
const TXS_CLIENT_TYPE$1 = ["CLIENT", "PROVIDER"];
|
|
85
|
+
const TRADING_SIDE$1 = ["SELL", "BUY", "BOTH"];
|
|
86
|
+
const EST_TXS_VOLUME_MONTH$1 = ["UP_TO_1M", "1M_TO_5M", "OVER_5M"];
|
|
87
|
+
const EST_TXS_VOLUME_YEAR$1 = [
|
|
88
|
+
"LESS_THAN_12M",
|
|
89
|
+
"12M_TO_50M",
|
|
90
|
+
"OVER_50M"
|
|
91
|
+
];
|
|
92
|
+
const TARGET_COUNTRY$1 = ["CZ", "EU", "OUTSIDE_EU"];
|
|
93
|
+
const TAX_DOMICILE$1 = ["CZ", "EU", "US", "OTHER"];
|
|
94
|
+
const MONTHLY_INCOME_RANGE$1 = [
|
|
95
|
+
"UP_TO_40K",
|
|
96
|
+
"40K_TO_80K",
|
|
97
|
+
"OVER_80K"
|
|
98
|
+
];
|
|
99
|
+
const COMPANY_TURNOVER_RANGE$1 = [
|
|
100
|
+
"LESS_THAN_50M",
|
|
101
|
+
"50M_TO_100M",
|
|
102
|
+
"OVER_100M"
|
|
103
|
+
];
|
|
104
|
+
const YEARLY_INCOME$1 = [
|
|
105
|
+
...MONTHLY_INCOME_RANGE$1,
|
|
106
|
+
...COMPANY_TURNOVER_RANGE$1
|
|
107
|
+
];
|
|
108
|
+
const INCOME_SOURCE$1 = [
|
|
109
|
+
"EMPLOYMENT",
|
|
110
|
+
"PENSION",
|
|
111
|
+
"SAVINGS",
|
|
112
|
+
"INHERITANCE",
|
|
113
|
+
"INVESTMENTS",
|
|
114
|
+
"HOUSE_SALE",
|
|
115
|
+
"CAR_SALE",
|
|
116
|
+
"AUCTION_SALE",
|
|
117
|
+
"OTHER"
|
|
118
|
+
];
|
|
119
|
+
const FINANCIAL_FUNDS_SOURCE$1 = [
|
|
120
|
+
"BUSINESS_REVENUE",
|
|
121
|
+
"INVESTMENTS",
|
|
122
|
+
"LOAN",
|
|
123
|
+
"OTHER"
|
|
124
|
+
];
|
|
125
|
+
const SERVICE_PURPOSE_FO$1 = [
|
|
126
|
+
"PURCHASE_OF_GOODS_AND_SERVICES",
|
|
127
|
+
"INVESTMENTS",
|
|
128
|
+
"OTHER"
|
|
129
|
+
];
|
|
130
|
+
const SERVICE_PURPOSE_COMPANY$1 = [
|
|
131
|
+
"PAYMENTS_TO_CUSTOMERS",
|
|
132
|
+
"PAYMENTS_TO_SUPPLIERS",
|
|
133
|
+
"FOREIGN_INVESTMENTS",
|
|
134
|
+
"OTHER"
|
|
135
|
+
];
|
|
136
|
+
const SERVICE_PURPOSE$1 = [
|
|
137
|
+
...SERVICE_PURPOSE_FO$1,
|
|
138
|
+
...SERVICE_PURPOSE_COMPANY$1
|
|
139
|
+
];
|
|
140
|
+
const OPERATING_COUNTRY$1 = ["CZ", "EU", "OUTSIDE_EU"];
|
|
141
|
+
const YES_NO_UNKNOWN = ["YES", "NO", "UNKNOWN"];
|
|
142
|
+
const SIGNATURE_METHOD$1 = [
|
|
143
|
+
"IN_PERSON",
|
|
144
|
+
"REMOTE",
|
|
145
|
+
"COURIER",
|
|
146
|
+
"POWER_OF_ATTORNEY"
|
|
147
|
+
];
|
|
148
|
+
const EXISTENCE_PERIOD$1 = [
|
|
149
|
+
"OVER_24_MONTHS",
|
|
150
|
+
"OVER_16_MONTHS",
|
|
151
|
+
"LESS_THAN_12_MONTHS",
|
|
152
|
+
"LESS_THAN_6_MONTHS"
|
|
153
|
+
];
|
|
154
|
+
const REPUTATION$1 = [
|
|
155
|
+
"NO_NEGATIVE_RECORDS",
|
|
156
|
+
"BUSINESS_INCREASES_RISK",
|
|
157
|
+
"NEGATIVE_RECORDS",
|
|
158
|
+
"SANCTIONS_LIST_HIT"
|
|
159
|
+
];
|
|
160
|
+
const RISK_BUSINESS_AREA$1 = [
|
|
161
|
+
"PAWN_SHOPS",
|
|
162
|
+
"USED_CAR_DEALERS",
|
|
163
|
+
"CASINOS",
|
|
164
|
+
"REAL_ESTATE_AGENCIES",
|
|
165
|
+
"PRECIOUS_METALS_AND_GEMS",
|
|
166
|
+
"WEAPONS_AND_AMMUNITION",
|
|
167
|
+
"NON_BANK_CREDIT_INSTITUTIONS",
|
|
168
|
+
"CURRENCY_EXCHANGE",
|
|
169
|
+
"VIRTUAL_ASSET_SERVICES"
|
|
170
|
+
];
|
|
85
171
|
|
|
86
172
|
const ADDRESS_TYPE = [
|
|
87
173
|
"PERMANENT_ADDRESS",
|
|
@@ -138,6 +224,91 @@ const KYC_STATUS = [
|
|
|
138
224
|
];
|
|
139
225
|
const TRADER_TYPE = ["PERSON", "COMPANY", "OSVC"];
|
|
140
226
|
const PRODUCT_TYPE = ["TXS", "CBS"];
|
|
227
|
+
const TRADING_SIDE = ["SELL", "BUY", "BOTH"];
|
|
228
|
+
const EST_TXS_VOLUME_MONTH = ["UP_TO_1M", "1M_TO_5M", "OVER_5M"];
|
|
229
|
+
const EST_TXS_VOLUME_YEAR = [
|
|
230
|
+
"LESS_THAN_12M",
|
|
231
|
+
"12M_TO_50M",
|
|
232
|
+
"OVER_50M"
|
|
233
|
+
];
|
|
234
|
+
const TARGET_COUNTRY = ["CZ", "EU", "OUTSIDE_EU"];
|
|
235
|
+
const TAX_DOMICILE = ["CZ", "EU", "US", "OTHER"];
|
|
236
|
+
const MONTHLY_INCOME_RANGE = [
|
|
237
|
+
"UP_TO_40K",
|
|
238
|
+
"40K_TO_80K",
|
|
239
|
+
"OVER_80K"
|
|
240
|
+
];
|
|
241
|
+
const COMPANY_TURNOVER_RANGE = [
|
|
242
|
+
"LESS_THAN_50M",
|
|
243
|
+
"50M_TO_100M",
|
|
244
|
+
"OVER_100M"
|
|
245
|
+
];
|
|
246
|
+
const YEARLY_INCOME = [
|
|
247
|
+
...MONTHLY_INCOME_RANGE,
|
|
248
|
+
...COMPANY_TURNOVER_RANGE
|
|
249
|
+
];
|
|
250
|
+
const INCOME_SOURCE = [
|
|
251
|
+
"EMPLOYMENT",
|
|
252
|
+
"PENSION",
|
|
253
|
+
"SAVINGS",
|
|
254
|
+
"INHERITANCE",
|
|
255
|
+
"INVESTMENTS",
|
|
256
|
+
"HOUSE_SALE",
|
|
257
|
+
"CAR_SALE",
|
|
258
|
+
"AUCTION_SALE",
|
|
259
|
+
"OTHER"
|
|
260
|
+
];
|
|
261
|
+
const FINANCIAL_FUNDS_SOURCE = [
|
|
262
|
+
"BUSINESS_REVENUE",
|
|
263
|
+
"INVESTMENTS",
|
|
264
|
+
"LOAN",
|
|
265
|
+
"OTHER"
|
|
266
|
+
];
|
|
267
|
+
const SERVICE_PURPOSE_FO = [
|
|
268
|
+
"PURCHASE_OF_GOODS_AND_SERVICES",
|
|
269
|
+
"INVESTMENTS",
|
|
270
|
+
"OTHER"
|
|
271
|
+
];
|
|
272
|
+
const SERVICE_PURPOSE_COMPANY = [
|
|
273
|
+
"PAYMENTS_TO_CUSTOMERS",
|
|
274
|
+
"PAYMENTS_TO_SUPPLIERS",
|
|
275
|
+
"FOREIGN_INVESTMENTS",
|
|
276
|
+
"OTHER"
|
|
277
|
+
];
|
|
278
|
+
const SERVICE_PURPOSE = [
|
|
279
|
+
...SERVICE_PURPOSE_FO,
|
|
280
|
+
...SERVICE_PURPOSE_COMPANY
|
|
281
|
+
];
|
|
282
|
+
const OPERATING_COUNTRY = ["CZ", "EU", "OUTSIDE_EU"];
|
|
283
|
+
const SIGNATURE_METHOD = [
|
|
284
|
+
"IN_PERSON",
|
|
285
|
+
"REMOTE",
|
|
286
|
+
"COURIER",
|
|
287
|
+
"POWER_OF_ATTORNEY"
|
|
288
|
+
];
|
|
289
|
+
const EXISTENCE_PERIOD = [
|
|
290
|
+
"OVER_24_MONTHS",
|
|
291
|
+
"OVER_16_MONTHS",
|
|
292
|
+
"LESS_THAN_12_MONTHS",
|
|
293
|
+
"LESS_THAN_6_MONTHS"
|
|
294
|
+
];
|
|
295
|
+
const REPUTATION = [
|
|
296
|
+
"NO_NEGATIVE_RECORDS",
|
|
297
|
+
"BUSINESS_INCREASES_RISK",
|
|
298
|
+
"NEGATIVE_RECORDS",
|
|
299
|
+
"SANCTIONS_LIST_HIT"
|
|
300
|
+
];
|
|
301
|
+
const RISK_BUSINESS_AREA = [
|
|
302
|
+
"PAWN_SHOPS",
|
|
303
|
+
"USED_CAR_DEALERS",
|
|
304
|
+
"CASINOS",
|
|
305
|
+
"REAL_ESTATE_AGENCIES",
|
|
306
|
+
"PRECIOUS_METALS_AND_GEMS",
|
|
307
|
+
"WEAPONS_AND_AMMUNITION",
|
|
308
|
+
"NON_BANK_CREDIT_INSTITUTIONS",
|
|
309
|
+
"CURRENCY_EXCHANGE",
|
|
310
|
+
"VIRTUAL_ASSET_SERVICES"
|
|
311
|
+
];
|
|
141
312
|
|
|
142
313
|
const entityKind = Symbol.for("drizzle:entityKind");
|
|
143
314
|
function is(value, type) {
|
|
@@ -12323,7 +12494,7 @@ const party = sqliteTable("party", {
|
|
|
12323
12494
|
partyType: text("party_type", { enum: PARTY_TYPE }).notNull(),
|
|
12324
12495
|
language: text("language", { enum: LANGUAGE_CODES }).notNull(),
|
|
12325
12496
|
countryCode: text("country_code", { enum: COUNTRY_CODES_2 }),
|
|
12326
|
-
|
|
12497
|
+
isRoot: integer("is_root", { mode: "boolean" }).notNull().default(false),
|
|
12327
12498
|
legacyId: text("legacy_id")
|
|
12328
12499
|
});
|
|
12329
12500
|
|
|
@@ -12386,7 +12557,7 @@ const individual = sqliteTable("individual", {
|
|
|
12386
12557
|
citizenshipOther: text("citizenship_other", { enum: COUNTRY_CODES_2 }),
|
|
12387
12558
|
employer: text("employer"),
|
|
12388
12559
|
employerCountry: text("employer_country", { enum: COUNTRY_CODES_2 }),
|
|
12389
|
-
registeredNumber: text("registered_number")
|
|
12560
|
+
registeredNumber: text("registered_number"),
|
|
12390
12561
|
isPep: integer("is_pep", { mode: "boolean" }).notNull(),
|
|
12391
12562
|
titleBefore: text("title_before"),
|
|
12392
12563
|
titleAfter: text("title_after"),
|
|
@@ -12416,8 +12587,7 @@ const organization = sqliteTable("organization", {
|
|
|
12416
12587
|
monthlyVolumeOut: integer("monthly_volume_out").notNull(),
|
|
12417
12588
|
ownedBy: text("owned_by").notNull(),
|
|
12418
12589
|
// UBO, skutecny majitel, podle Marianovy tabulky by toto mela byt mozna relace na party
|
|
12419
|
-
companyObjects: text("company_objects").notNull(),
|
|
12420
|
-
// predmet cinnosti
|
|
12590
|
+
companyObjects: text("company_objects", { mode: "json" }).$type().notNull(),
|
|
12421
12591
|
companyObjectsDescription: text("company_objects_description").notNull(),
|
|
12422
12592
|
turnover3years: integer("turnover_3_years").notNull(),
|
|
12423
12593
|
operationCountries: text("operation_countries").notNull(),
|
|
@@ -12443,7 +12613,7 @@ const partyRelationship = sqliteTable("party_relationship", {
|
|
|
12443
12613
|
internalId: text("internal_id"),
|
|
12444
12614
|
relationshipType: text("relationship_type", {
|
|
12445
12615
|
enum: PARTY_RELATIONSHIP_TYPE
|
|
12446
|
-
}),
|
|
12616
|
+
}).notNull(),
|
|
12447
12617
|
fromPartyId: text("from_party_id").references(() => party.id),
|
|
12448
12618
|
toPartyId: text("to_party_id").references(() => party.id),
|
|
12449
12619
|
fromDate: integer("from_date", { mode: "timestamp_ms" }),
|
|
@@ -12487,24 +12657,37 @@ const aml = sqliteTable("aml", {
|
|
|
12487
12657
|
...base,
|
|
12488
12658
|
internalId: text("internal_id"),
|
|
12489
12659
|
partyId: text("party_id").notNull().unique().references(() => party.id),
|
|
12490
|
-
sourceOfWealth: text("source_of_wealth").notNull(),
|
|
12491
|
-
yearlyIncome: text("yearly_income").notNull(),
|
|
12492
|
-
|
|
12493
|
-
|
|
12660
|
+
sourceOfWealth: text("source_of_wealth", { mode: "json" }).$type().notNull(),
|
|
12661
|
+
yearlyIncome: text("yearly_income", { enum: YEARLY_INCOME }).notNull(),
|
|
12662
|
+
sourceOfIncome: text("source_of_income", { mode: "json" }).$type().notNull(),
|
|
12663
|
+
incomeSourceOther: text("income_source_other"),
|
|
12664
|
+
servicePurposes: text("service_purposes", { mode: "json" }).$type(),
|
|
12665
|
+
servicePurposesOther: text("service_purposes_other"),
|
|
12666
|
+
taxDomicile: text("tax_domicile", { enum: TAX_DOMICILE }),
|
|
12667
|
+
taxDomicileCountry: text("tax_domicile_country", { enum: COUNTRY_CODES_2 }),
|
|
12494
12668
|
transactionType: text("transaction_type"),
|
|
12495
12669
|
transactionTypeExpiry: integer("transaction_type_expiry", {
|
|
12496
12670
|
mode: "timestamp_ms"
|
|
12497
12671
|
}),
|
|
12498
|
-
estTxsVolumeMonth: text("est_txs_volume_month"
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12672
|
+
estTxsVolumeMonth: text("est_txs_volume_month", {
|
|
12673
|
+
enum: EST_TXS_VOLUME_MONTH
|
|
12674
|
+
}).notNull(),
|
|
12675
|
+
estTxsVolumeYear: text("est_txs_volume_year", {
|
|
12676
|
+
enum: EST_TXS_VOLUME_YEAR
|
|
12677
|
+
}).notNull(),
|
|
12678
|
+
estTxsCountMonth: integer("est_txs_count_month"),
|
|
12679
|
+
tradingCountries: text("trading_countries", { mode: "json" }).$type().notNull(),
|
|
12680
|
+
tradingCountriesOther: text("trading_countries_other", {
|
|
12681
|
+
mode: "json"
|
|
12682
|
+
}).$type(),
|
|
12683
|
+
tradingSide: text("trading_side", { enum: TRADING_SIDE }).notNull(),
|
|
12502
12684
|
acceptedAMLTermsAndConditions: integer("accepted_aml_terms_and_conditions", {
|
|
12503
12685
|
mode: "boolean"
|
|
12504
12686
|
}).notNull(),
|
|
12505
|
-
signatureMethod: text("signature_method"),
|
|
12506
|
-
existencePeriod: text("existence_period"),
|
|
12507
|
-
reputation: text("reputation"),
|
|
12687
|
+
signatureMethod: text("signature_method", { enum: SIGNATURE_METHOD }),
|
|
12688
|
+
existencePeriod: text("existence_period", { enum: EXISTENCE_PERIOD }),
|
|
12689
|
+
reputation: text("reputation", { enum: REPUTATION }),
|
|
12690
|
+
riskBusinessAreas: text("risk_business_areas", { mode: "json" }).$type(),
|
|
12508
12691
|
isDistraint: integer("is_distraint", { mode: "boolean" }).notNull().default(false),
|
|
12509
12692
|
riskLevel: text("risk_level", { enum: AML_SCORE_TYPE }).notNull(),
|
|
12510
12693
|
kycStatus: text("kyc_status", { enum: KYC_STATUS })
|
|
@@ -12615,51 +12798,148 @@ const addressSelectSchema = z$3.object({
|
|
|
12615
12798
|
|
|
12616
12799
|
createInsertSchema(aml);
|
|
12617
12800
|
createUpdateSchema(aml);
|
|
12618
|
-
|
|
12801
|
+
createSelectSchema(aml);
|
|
12802
|
+
const businessPartnerSchema = z$3.object({
|
|
12803
|
+
name: z$3.string(),
|
|
12804
|
+
country: z$3.string(),
|
|
12805
|
+
cooperationReason: z$3.string().nullable()
|
|
12806
|
+
});
|
|
12807
|
+
const foSourceOfWealthSchema = z$3.object({
|
|
12808
|
+
incomeSources: z$3.array(z$3.enum(INCOME_SOURCE)).min(1),
|
|
12809
|
+
incomeSourceOther: z$3.string().nullable(),
|
|
12810
|
+
monthlyIncome: z$3.enum(MONTHLY_INCOME_RANGE),
|
|
12811
|
+
employer: z$3.string().nullable(),
|
|
12812
|
+
employerCountry: z$3.string().nullable()
|
|
12813
|
+
});
|
|
12814
|
+
const businessSourceOfWealthSchema = z$3.object({
|
|
12815
|
+
financialFundsSources: z$3.array(z$3.enum(FINANCIAL_FUNDS_SOURCE)).min(1),
|
|
12816
|
+
financialFundsSourceOther: z$3.string().nullable(),
|
|
12817
|
+
mainBusinessSubjects: z$3.array(z$3.enum(CZ_TRADE_LICENSE_CODES)).min(1),
|
|
12818
|
+
companyTurnover: z$3.enum(COMPANY_TURNOVER_RANGE),
|
|
12819
|
+
operatingCountries: z$3.array(z$3.enum(OPERATING_COUNTRY)).min(1),
|
|
12820
|
+
operatingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).nullable(),
|
|
12821
|
+
businessPartners: z$3.array(businessPartnerSchema).nullable(),
|
|
12822
|
+
businessActivitiesNote: z$3.string().nullable()
|
|
12823
|
+
});
|
|
12824
|
+
const sourceOfWealthSchema = z$3.union([
|
|
12825
|
+
foSourceOfWealthSchema,
|
|
12826
|
+
businessSourceOfWealthSchema
|
|
12827
|
+
]);
|
|
12828
|
+
const businessPartnerOutputSchema$1 = z$3.object({
|
|
12829
|
+
name: z$3.string(),
|
|
12830
|
+
country: z$3.string(),
|
|
12831
|
+
cooperationReason: z$3.string().nullable()
|
|
12832
|
+
});
|
|
12833
|
+
const foSourceOfWealthOutputSchema$1 = z$3.object({
|
|
12834
|
+
incomeSources: z$3.array(z$3.enum(INCOME_SOURCE)),
|
|
12835
|
+
incomeSourceOther: z$3.string().nullable(),
|
|
12836
|
+
monthlyIncome: z$3.enum(MONTHLY_INCOME_RANGE),
|
|
12837
|
+
employer: z$3.string().nullable(),
|
|
12838
|
+
employerCountry: z$3.string().nullable()
|
|
12839
|
+
});
|
|
12840
|
+
const businessSourceOfWealthOutputSchema$1 = z$3.object({
|
|
12841
|
+
financialFundsSources: z$3.array(z$3.enum(FINANCIAL_FUNDS_SOURCE)),
|
|
12842
|
+
financialFundsSourceOther: z$3.string().nullable(),
|
|
12843
|
+
mainBusinessSubjects: z$3.array(z$3.enum(CZ_TRADE_LICENSE_CODES)),
|
|
12844
|
+
companyTurnover: z$3.enum(COMPANY_TURNOVER_RANGE),
|
|
12845
|
+
operatingCountries: z$3.array(z$3.enum(OPERATING_COUNTRY)),
|
|
12846
|
+
operatingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).nullable(),
|
|
12847
|
+
businessPartners: z$3.array(businessPartnerOutputSchema$1).nullable(),
|
|
12848
|
+
businessActivitiesNote: z$3.string().nullable()
|
|
12849
|
+
});
|
|
12850
|
+
const sourceOfWealthOutputSchema = z$3.union([
|
|
12851
|
+
foSourceOfWealthOutputSchema$1,
|
|
12852
|
+
businessSourceOfWealthOutputSchema$1
|
|
12853
|
+
]);
|
|
12619
12854
|
const amlInsertSchema = z$3.object({
|
|
12620
12855
|
partyId: z$3.uuid(),
|
|
12621
|
-
internalId: z$3.string().optional()
|
|
12622
|
-
sourceOfWealth:
|
|
12623
|
-
yearlyIncome: z$3.
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12856
|
+
internalId: z$3.string().optional(),
|
|
12857
|
+
sourceOfWealth: sourceOfWealthSchema,
|
|
12858
|
+
yearlyIncome: z$3.enum(YEARLY_INCOME),
|
|
12859
|
+
sourceOfIncome: z$3.array(z$3.enum(INCOME_SOURCE)).min(1),
|
|
12860
|
+
incomeSourceOther: z$3.string().optional(),
|
|
12861
|
+
servicePurposes: z$3.array(z$3.enum(SERVICE_PURPOSE)).optional(),
|
|
12862
|
+
servicePurposesOther: z$3.string().optional(),
|
|
12863
|
+
taxDomicile: z$3.enum(TAX_DOMICILE).optional(),
|
|
12864
|
+
taxDomicileCountry: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
12865
|
+
transactionType: z$3.string().optional(),
|
|
12866
|
+
transactionTypeExpiry: z$3.date().optional(),
|
|
12628
12867
|
isDistraint: z$3.boolean().default(false),
|
|
12629
|
-
estTxsVolumeMonth: z$3.
|
|
12630
|
-
estTxsVolumeYear: z$3.
|
|
12631
|
-
|
|
12632
|
-
|
|
12868
|
+
estTxsVolumeMonth: z$3.enum(EST_TXS_VOLUME_MONTH),
|
|
12869
|
+
estTxsVolumeYear: z$3.enum(EST_TXS_VOLUME_YEAR),
|
|
12870
|
+
estTxsCountMonth: z$3.number().int().optional(),
|
|
12871
|
+
tradingCountries: z$3.array(z$3.enum(TARGET_COUNTRY)).min(1),
|
|
12872
|
+
tradingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).optional(),
|
|
12873
|
+
tradingSide: z$3.enum(TRADING_SIDE),
|
|
12633
12874
|
acceptedAMLTermsAndConditions: z$3.boolean(),
|
|
12634
|
-
signatureMethod: z$3.
|
|
12635
|
-
existencePeriod: z$3.
|
|
12636
|
-
reputation: z$3.
|
|
12637
|
-
|
|
12638
|
-
|
|
12875
|
+
signatureMethod: z$3.enum(SIGNATURE_METHOD).optional(),
|
|
12876
|
+
existencePeriod: z$3.enum(EXISTENCE_PERIOD).optional(),
|
|
12877
|
+
reputation: z$3.enum(REPUTATION).optional(),
|
|
12878
|
+
riskBusinessAreas: z$3.array(z$3.enum(RISK_BUSINESS_AREA)).optional(),
|
|
12879
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE).optional(),
|
|
12880
|
+
kycStatus: z$3.enum(KYC_STATUS).optional()
|
|
12639
12881
|
});
|
|
12640
12882
|
const amlUpdateSchema = z$3.object({
|
|
12641
12883
|
id: z$3.uuid(),
|
|
12642
12884
|
partyId: z$3.uuid().optional(),
|
|
12643
|
-
internalId: z$3.string().optional()
|
|
12644
|
-
sourceOfWealth:
|
|
12645
|
-
yearlyIncome: z$3.
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12885
|
+
internalId: z$3.string().optional(),
|
|
12886
|
+
sourceOfWealth: sourceOfWealthSchema.optional(),
|
|
12887
|
+
yearlyIncome: z$3.enum(YEARLY_INCOME).optional(),
|
|
12888
|
+
sourceOfIncome: z$3.array(z$3.enum(INCOME_SOURCE)).min(1).optional(),
|
|
12889
|
+
incomeSourceOther: z$3.string().optional(),
|
|
12890
|
+
servicePurposes: z$3.array(z$3.enum(SERVICE_PURPOSE)).optional(),
|
|
12891
|
+
servicePurposesOther: z$3.string().optional(),
|
|
12892
|
+
taxDomicile: z$3.enum(TAX_DOMICILE).optional(),
|
|
12893
|
+
taxDomicileCountry: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
12894
|
+
transactionType: z$3.string().optional(),
|
|
12895
|
+
transactionTypeExpiry: z$3.date().optional(),
|
|
12650
12896
|
isDistraint: z$3.boolean().optional(),
|
|
12651
|
-
estTxsVolumeMonth: z$3.
|
|
12652
|
-
estTxsVolumeYear: z$3.
|
|
12653
|
-
|
|
12654
|
-
|
|
12897
|
+
estTxsVolumeMonth: z$3.enum(EST_TXS_VOLUME_MONTH).optional(),
|
|
12898
|
+
estTxsVolumeYear: z$3.enum(EST_TXS_VOLUME_YEAR).optional(),
|
|
12899
|
+
estTxsCountMonth: z$3.number().int().optional(),
|
|
12900
|
+
tradingCountries: z$3.array(z$3.enum(TARGET_COUNTRY)).min(1).optional(),
|
|
12901
|
+
tradingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).optional(),
|
|
12902
|
+
tradingSide: z$3.enum(TRADING_SIDE).optional(),
|
|
12903
|
+
acceptedAMLTermsAndConditions: z$3.boolean().optional(),
|
|
12904
|
+
signatureMethod: z$3.enum(SIGNATURE_METHOD).optional(),
|
|
12905
|
+
existencePeriod: z$3.enum(EXISTENCE_PERIOD).optional(),
|
|
12906
|
+
reputation: z$3.enum(REPUTATION).optional(),
|
|
12907
|
+
riskBusinessAreas: z$3.array(z$3.enum(RISK_BUSINESS_AREA)).optional(),
|
|
12908
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE).optional(),
|
|
12909
|
+
kycStatus: z$3.enum(KYC_STATUS).optional()
|
|
12910
|
+
});
|
|
12911
|
+
const amlSelectSchema = z$3.object({
|
|
12912
|
+
id: z$3.string(),
|
|
12913
|
+
partyId: z$3.string(),
|
|
12914
|
+
internalId: z$3.string().nullable(),
|
|
12915
|
+
sourceOfWealth: sourceOfWealthOutputSchema,
|
|
12916
|
+
yearlyIncome: z$3.enum(YEARLY_INCOME),
|
|
12917
|
+
sourceOfIncome: z$3.array(z$3.enum(INCOME_SOURCE)),
|
|
12918
|
+
incomeSourceOther: z$3.string().nullable(),
|
|
12919
|
+
servicePurposes: z$3.array(z$3.enum(SERVICE_PURPOSE)).nullable(),
|
|
12920
|
+
servicePurposesOther: z$3.string().nullable(),
|
|
12921
|
+
taxDomicile: z$3.enum(TAX_DOMICILE).nullable(),
|
|
12922
|
+
taxDomicileCountry: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
12923
|
+
transactionType: z$3.string().nullable(),
|
|
12924
|
+
transactionTypeExpiry: z$3.date().nullable(),
|
|
12925
|
+
isDistraint: z$3.boolean(),
|
|
12926
|
+
estTxsVolumeMonth: z$3.enum(EST_TXS_VOLUME_MONTH),
|
|
12927
|
+
estTxsVolumeYear: z$3.enum(EST_TXS_VOLUME_YEAR),
|
|
12928
|
+
estTxsCountMonth: z$3.number().int().nullable(),
|
|
12929
|
+
tradingCountries: z$3.array(z$3.enum(TARGET_COUNTRY)),
|
|
12930
|
+
tradingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).nullable(),
|
|
12931
|
+
tradingSide: z$3.enum(TRADING_SIDE),
|
|
12655
12932
|
acceptedAMLTermsAndConditions: z$3.boolean(),
|
|
12656
|
-
signatureMethod: z$3.
|
|
12657
|
-
existencePeriod: z$3.
|
|
12658
|
-
reputation: z$3.
|
|
12659
|
-
|
|
12660
|
-
|
|
12933
|
+
signatureMethod: z$3.enum(SIGNATURE_METHOD).nullable(),
|
|
12934
|
+
existencePeriod: z$3.enum(EXISTENCE_PERIOD).nullable(),
|
|
12935
|
+
reputation: z$3.enum(REPUTATION).nullable(),
|
|
12936
|
+
riskBusinessAreas: z$3.array(z$3.enum(RISK_BUSINESS_AREA)).nullable(),
|
|
12937
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE),
|
|
12938
|
+
kycStatus: z$3.enum(KYC_STATUS).nullable(),
|
|
12939
|
+
createdAt: z$3.date().nullable(),
|
|
12940
|
+
updatedAt: z$3.date().nullable(),
|
|
12941
|
+
deletedAt: z$3.date().nullable()
|
|
12661
12942
|
});
|
|
12662
|
-
const amlSelectSchema = amlBaseSelectSchema;
|
|
12663
12943
|
|
|
12664
12944
|
const bankAccountBaseInsertSchema = createInsertSchema(bankAccount);
|
|
12665
12945
|
createUpdateSchema(bankAccount);
|
|
@@ -12693,95 +12973,42 @@ const contactUpdateSchema = z$3.object({
|
|
|
12693
12973
|
phoneNumber: z$3.string().optional()
|
|
12694
12974
|
});
|
|
12695
12975
|
|
|
12696
|
-
|
|
12697
|
-
createUpdateSchema(individual);
|
|
12698
|
-
createSelectSchema(individual);
|
|
12699
|
-
const individualInsertSchema$1 = z$3.object({
|
|
12700
|
-
partyId: z$3.uuid(),
|
|
12701
|
-
name: z$3.string(),
|
|
12702
|
-
surname: z$3.string(),
|
|
12703
|
-
email: z$3.email("Invalid email format").optional().nullable(),
|
|
12704
|
-
phone: z$3.string().optional().nullable(),
|
|
12705
|
-
birthDate: z$3.string().optional().nullable(),
|
|
12706
|
-
birthPlace: z$3.string(),
|
|
12707
|
-
countryOfBirth: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12708
|
-
personalId: z$3.string(),
|
|
12709
|
-
gender: z$3.enum(GENDER),
|
|
12710
|
-
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
12711
|
-
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12712
|
-
employer: z$3.string().optional().nullable(),
|
|
12713
|
-
employerCountry: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12714
|
-
registeredNumber: z$3.string(),
|
|
12715
|
-
isPep: z$3.boolean(),
|
|
12716
|
-
titleBefore: z$3.string().optional().nullable(),
|
|
12717
|
-
titleAfter: z$3.string().optional().nullable(),
|
|
12718
|
-
birthSurname: z$3.string().optional().nullable(),
|
|
12719
|
-
vocativeTitle: z$3.string().optional().nullable(),
|
|
12720
|
-
deathDate: z$3.date().optional().nullable(),
|
|
12721
|
-
deathNotification: z$3.date().optional().nullable(),
|
|
12722
|
-
pin: z$3.string().optional().nullable(),
|
|
12723
|
-
stayAbroad: z$3.boolean().optional().nullable(),
|
|
12724
|
-
stayAbroadCountries: z$3.enum(COUNTRY_CODES_2).optional().nullable()
|
|
12725
|
-
});
|
|
12726
|
-
const individualUpdateSchema$1 = z$3.object({
|
|
12727
|
-
partyId: z$3.uuid(),
|
|
12976
|
+
const insertOverrides = {
|
|
12728
12977
|
id: z$3.uuid(),
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
birthDate: z$3.string().optional().nullable(),
|
|
12734
|
-
birthPlace: z$3.string().optional(),
|
|
12735
|
-
countryOfBirth: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12736
|
-
personalId: z$3.string().optional(),
|
|
12737
|
-
gender: z$3.enum(GENDER).optional(),
|
|
12738
|
-
citizenship: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
12739
|
-
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12740
|
-
employer: z$3.string().optional().nullable(),
|
|
12741
|
-
employerCountry: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12742
|
-
registeredNumber: z$3.string().optional(),
|
|
12743
|
-
isPep: z$3.boolean().optional(),
|
|
12744
|
-
titleBefore: z$3.string().optional().nullable(),
|
|
12745
|
-
titleAfter: z$3.string().optional().nullable(),
|
|
12746
|
-
birthSurname: z$3.string().optional().nullable(),
|
|
12747
|
-
vocativeTitle: z$3.string().optional().nullable(),
|
|
12748
|
-
deathDate: z$3.date().optional().nullable(),
|
|
12749
|
-
deathNotification: z$3.date().optional().nullable(),
|
|
12750
|
-
pin: z$3.string().optional().nullable(),
|
|
12751
|
-
stayAbroad: z$3.boolean().optional().nullable(),
|
|
12752
|
-
stayAbroadCountries: z$3.enum(COUNTRY_CODES_2).optional().nullable()
|
|
12753
|
-
});
|
|
12754
|
-
const individualSelectSchema = z$3.object({
|
|
12978
|
+
partyId: z$3.uuid(),
|
|
12979
|
+
email: z$3.email("Invalid email format").optional()
|
|
12980
|
+
};
|
|
12981
|
+
const selectOverrides = {
|
|
12755
12982
|
id: z$3.uuid(),
|
|
12756
12983
|
partyId: z$3.uuid(),
|
|
12757
|
-
internalId: z$3.string().nullable(),
|
|
12758
|
-
name: z$3.string(),
|
|
12759
|
-
surname: z$3.string(),
|
|
12760
|
-
email: z$3.string().nullable(),
|
|
12761
|
-
phone: z$3.string().nullable(),
|
|
12762
|
-
birthDate: z$3.string().nullable(),
|
|
12763
|
-
birthPlace: z$3.string(),
|
|
12764
|
-
countryOfBirth: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
12765
|
-
personalId: z$3.string(),
|
|
12766
|
-
gender: z$3.enum(GENDER),
|
|
12767
|
-
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
12768
|
-
citizenshipOther: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
12769
|
-
employer: z$3.string().nullable(),
|
|
12770
|
-
employerCountry: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
12771
|
-
registeredNumber: z$3.string(),
|
|
12772
|
-
isPep: z$3.boolean(),
|
|
12773
|
-
titleBefore: z$3.string().nullable(),
|
|
12774
|
-
titleAfter: z$3.string().nullable(),
|
|
12775
|
-
birthSurname: z$3.string().nullable(),
|
|
12776
|
-
vocativeTitle: z$3.string().nullable(),
|
|
12777
12984
|
deathDate: z$3.coerce.date().nullable(),
|
|
12778
12985
|
deathNotification: z$3.coerce.date().nullable(),
|
|
12779
|
-
pin: z$3.string().nullable(),
|
|
12780
|
-
stayAbroad: z$3.boolean().nullable(),
|
|
12781
|
-
stayAbroadCountries: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
12782
12986
|
createdAt: z$3.coerce.date().nullable(),
|
|
12783
12987
|
updatedAt: z$3.coerce.date().nullable()
|
|
12988
|
+
};
|
|
12989
|
+
const individualBaseInsertSchema = createInsertSchema(
|
|
12990
|
+
individual,
|
|
12991
|
+
insertOverrides
|
|
12992
|
+
);
|
|
12993
|
+
createUpdateSchema(
|
|
12994
|
+
individual,
|
|
12995
|
+
insertOverrides
|
|
12996
|
+
);
|
|
12997
|
+
const individualBaseSelectSchema = createSelectSchema(
|
|
12998
|
+
individual,
|
|
12999
|
+
selectOverrides
|
|
13000
|
+
);
|
|
13001
|
+
const individualInsertSchema$1 = individualBaseInsertSchema.omit({
|
|
13002
|
+
id: true,
|
|
13003
|
+
internalId: true,
|
|
13004
|
+
createdAt: true,
|
|
13005
|
+
updatedAt: true
|
|
12784
13006
|
});
|
|
13007
|
+
const individualUpdateSchema$1 = individualInsertSchema$1.partial().extend({
|
|
13008
|
+
partyId: z$3.uuid(),
|
|
13009
|
+
id: z$3.uuid()
|
|
13010
|
+
});
|
|
13011
|
+
const individualSelectSchema = individualBaseSelectSchema;
|
|
12785
13012
|
|
|
12786
13013
|
createInsertSchema(organization);
|
|
12787
13014
|
createUpdateSchema(organization);
|
|
@@ -12798,7 +13025,7 @@ const organizationInsertSchema = z$3.object({
|
|
|
12798
13025
|
monthlyVolumeIn: z$3.number(),
|
|
12799
13026
|
monthlyVolumeOut: z$3.number(),
|
|
12800
13027
|
ownedBy: z$3.string(),
|
|
12801
|
-
companyObjects: z$3.
|
|
13028
|
+
companyObjects: z$3.array(z$3.enum(CZ_NACE_CODES)).min(1),
|
|
12802
13029
|
annualTurnover: z$3.number(),
|
|
12803
13030
|
numberOfEmployees: z$3.number().optional().nullable(),
|
|
12804
13031
|
prosecuted: z$3.string().optional().nullable(),
|
|
@@ -12824,7 +13051,7 @@ const organizationUpdateSchema$1 = z$3.object({
|
|
|
12824
13051
|
monthlyVolumeIn: z$3.number().optional(),
|
|
12825
13052
|
monthlyVolumeOut: z$3.number().optional(),
|
|
12826
13053
|
ownedBy: z$3.string().optional(),
|
|
12827
|
-
companyObjects: z$3.
|
|
13054
|
+
companyObjects: z$3.array(z$3.enum(CZ_NACE_CODES)).min(1).optional(),
|
|
12828
13055
|
annualTurnover: z$3.number().optional(),
|
|
12829
13056
|
numberOfEmployees: z$3.number().optional().nullable(),
|
|
12830
13057
|
prosecuted: z$3.string().optional().nullable(),
|
|
@@ -12851,7 +13078,7 @@ const organizationOutputSchema = z$3.object({
|
|
|
12851
13078
|
monthlyVolumeIn: z$3.number(),
|
|
12852
13079
|
monthlyVolumeOut: z$3.number(),
|
|
12853
13080
|
ownedBy: z$3.string(),
|
|
12854
|
-
companyObjects: z$3.
|
|
13081
|
+
companyObjects: z$3.array(z$3.enum(CZ_NACE_CODES)),
|
|
12855
13082
|
annualTurnover: z$3.number(),
|
|
12856
13083
|
numberOfEmployees: z$3.number().nullable(),
|
|
12857
13084
|
prosecuted: z$3.string().nullable(),
|
|
@@ -12884,14 +13111,16 @@ z$3.discriminatedUnion("partyType", [
|
|
|
12884
13111
|
const disponentCreateSchema = z$3.discriminatedUnion("partyType", [
|
|
12885
13112
|
z$3.object({
|
|
12886
13113
|
partyType: z$3.literal("INDIVIDUAL"),
|
|
13114
|
+
relationshipType: z$3.enum(PARTY_RELATIONSHIP_TYPE).optional(),
|
|
12887
13115
|
data: individualInsertSchema$1.omit({ partyId: true })
|
|
12888
13116
|
}),
|
|
12889
13117
|
z$3.object({
|
|
12890
13118
|
partyType: z$3.literal("ORGANIZATION"),
|
|
13119
|
+
relationshipType: z$3.enum(PARTY_RELATIONSHIP_TYPE).optional(),
|
|
12891
13120
|
data: organizationInsertSchema.omit({ partyId: true })
|
|
12892
13121
|
})
|
|
12893
13122
|
]);
|
|
12894
|
-
const disponentUpdateSchema
|
|
13123
|
+
const disponentUpdateSchema = z$3.discriminatedUnion("partyType", [
|
|
12895
13124
|
z$3.object({
|
|
12896
13125
|
partyType: z$3.literal("INDIVIDUAL"),
|
|
12897
13126
|
data: individualUpdateSchema$1
|
|
@@ -12901,6 +13130,18 @@ const disponentUpdateSchema$1 = z$3.discriminatedUnion("partyType", [
|
|
|
12901
13130
|
data: organizationUpdateSchema$1
|
|
12902
13131
|
})
|
|
12903
13132
|
]);
|
|
13133
|
+
const disponentSyncSchema$1 = z$3.discriminatedUnion("partyType", [
|
|
13134
|
+
z$3.object({
|
|
13135
|
+
partyType: z$3.literal("INDIVIDUAL"),
|
|
13136
|
+
relationshipType: z$3.enum(PARTY_RELATIONSHIP_TYPE).optional(),
|
|
13137
|
+
data: individualInsertSchema$1.omit({ partyId: true }).extend({ id: z$3.uuid().optional() })
|
|
13138
|
+
}),
|
|
13139
|
+
z$3.object({
|
|
13140
|
+
partyType: z$3.literal("ORGANIZATION"),
|
|
13141
|
+
relationshipType: z$3.enum(PARTY_RELATIONSHIP_TYPE).optional(),
|
|
13142
|
+
data: organizationInsertSchema.omit({ partyId: true }).extend({ id: z$3.uuid().optional() })
|
|
13143
|
+
})
|
|
13144
|
+
]);
|
|
12904
13145
|
const disponentSelectSchema = z$3.discriminatedUnion("partyType", [
|
|
12905
13146
|
z$3.object({
|
|
12906
13147
|
partyType: z$3.literal("INDIVIDUAL"),
|
|
@@ -12912,7 +13153,7 @@ const disponentSelectSchema = z$3.discriminatedUnion("partyType", [
|
|
|
12912
13153
|
})
|
|
12913
13154
|
]);
|
|
12914
13155
|
z$3.array(disponentSelectSchema).optional();
|
|
12915
|
-
z$3.array(disponentUpdateSchema
|
|
13156
|
+
z$3.array(disponentUpdateSchema).optional();
|
|
12916
13157
|
|
|
12917
13158
|
createInsertSchema(idDocument);
|
|
12918
13159
|
createUpdateSchema(idDocument);
|
|
@@ -13009,6 +13250,7 @@ const partySchema$2 = z$3.object({
|
|
|
13009
13250
|
note: z$3.string().optional(),
|
|
13010
13251
|
countryCode: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13011
13252
|
customerStatus: z$3.enum(CUSTOMER_STATUS).optional(),
|
|
13253
|
+
isRoot: z$3.boolean().optional(),
|
|
13012
13254
|
legacyId: z$3.string().optional()
|
|
13013
13255
|
});
|
|
13014
13256
|
const partyOutputSchema$1 = z$3.object({
|
|
@@ -13019,7 +13261,7 @@ const partyOutputSchema$1 = z$3.object({
|
|
|
13019
13261
|
id: z$3.uuid(),
|
|
13020
13262
|
note: z$3.string().nullable(),
|
|
13021
13263
|
countryCode: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
13022
|
-
|
|
13264
|
+
isRoot: z$3.boolean(),
|
|
13023
13265
|
createdAt: z$3.date().nullable(),
|
|
13024
13266
|
updatedAt: z$3.date().nullable()
|
|
13025
13267
|
});
|
|
@@ -13033,19 +13275,21 @@ z$3.object({
|
|
|
13033
13275
|
disponents: z$3.array(disponentCreateSchema).nullable(),
|
|
13034
13276
|
addresses: z$3.array(addressInsertSchema.omit({ partyId: true })),
|
|
13035
13277
|
aml: amlInsertSchema.omit({ partyId: true }),
|
|
13036
|
-
products: productsInputSchema$2.optional()
|
|
13278
|
+
products: productsInputSchema$2.optional(),
|
|
13279
|
+
traderIds: z$3.array(z$3.uuid()).optional()
|
|
13037
13280
|
});
|
|
13038
13281
|
z$3.object({
|
|
13039
13282
|
partyId: z$3.uuid(),
|
|
13040
13283
|
party: partySchema$2,
|
|
13041
13284
|
personalData: individualUpdateSchema$1.optional(),
|
|
13042
13285
|
organizationData: organizationUpdateSchema$1.optional(),
|
|
13043
|
-
bankAccounts: z$3.array(bankAccountUpsertSchema).optional(),
|
|
13044
|
-
recipients: z$3.array(recipientUpsertSchema).optional(),
|
|
13045
|
-
disponents: z$3.array(
|
|
13046
|
-
addresses: z$3.array(
|
|
13286
|
+
bankAccounts: z$3.array(bankAccountUpsertSchema.partial({ id: true })).optional(),
|
|
13287
|
+
recipients: z$3.array(recipientUpsertSchema.partial({ id: true })).optional(),
|
|
13288
|
+
disponents: z$3.array(disponentSyncSchema$1).optional(),
|
|
13289
|
+
addresses: z$3.array(addressInsertSchema).optional(),
|
|
13047
13290
|
aml: amlUpdateSchema.optional(),
|
|
13048
|
-
products: productsInputSchema$2.optional()
|
|
13291
|
+
products: productsInputSchema$2.optional(),
|
|
13292
|
+
traderIds: z$3.array(z$3.uuid()).optional()
|
|
13049
13293
|
});
|
|
13050
13294
|
const partySelectOutputSchema = z$3.object({
|
|
13051
13295
|
party: partyOutputSchema$1.nullable(),
|
|
@@ -13056,7 +13300,8 @@ const partySelectOutputSchema = z$3.object({
|
|
|
13056
13300
|
disponents: z$3.array(disponentSelectSchema).nullable(),
|
|
13057
13301
|
addresses: z$3.array(addressSelectSchema).nullable(),
|
|
13058
13302
|
recipients: z$3.array(recipientSelectSchema).nullable(),
|
|
13059
|
-
products: productsOutputSchema$1.nullable()
|
|
13303
|
+
products: productsOutputSchema$1.nullable(),
|
|
13304
|
+
traderIds: z$3.array(z$3.uuid()).nullable()
|
|
13060
13305
|
});
|
|
13061
13306
|
z$3.array(partySelectOutputSchema);
|
|
13062
13307
|
const partySelectDataSchema = z$3.object({
|
|
@@ -13074,7 +13319,8 @@ const partySelectArrayDataSchema = z$3.object({
|
|
|
13074
13319
|
z$3.object({
|
|
13075
13320
|
...partySelectDataSchema.shape,
|
|
13076
13321
|
...partySelectArrayDataSchema.shape,
|
|
13077
|
-
products: productsOutputSchema$1.nullable()
|
|
13322
|
+
products: productsOutputSchema$1.nullable(),
|
|
13323
|
+
traderIds: z$3.array(z$3.uuid()).nullable()
|
|
13078
13324
|
});
|
|
13079
13325
|
|
|
13080
13326
|
createInsertSchema(partyChange);
|
|
@@ -13428,7 +13674,7 @@ const individualInsertSchema = z$3.object({
|
|
|
13428
13674
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13429
13675
|
employer: z$3.string().optional(),
|
|
13430
13676
|
employerCountry: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13431
|
-
registeredNumber: z$3.string(),
|
|
13677
|
+
registeredNumber: z$3.string().optional(),
|
|
13432
13678
|
isPep: z$3.boolean(),
|
|
13433
13679
|
titleBefore: z$3.string().optional(),
|
|
13434
13680
|
titleAfter: z$3.string().optional(),
|
|
@@ -13452,7 +13698,7 @@ const createOrganizationInputSchema = z$3.object({
|
|
|
13452
13698
|
monthlyVolumeIn: z$3.number(),
|
|
13453
13699
|
monthlyVolumeOut: z$3.number(),
|
|
13454
13700
|
ownedBy: z$3.string(),
|
|
13455
|
-
companyObjects: z$3.
|
|
13701
|
+
companyObjects: z$3.array(z$3.enum(CZ_NACE_CODES)).min(1),
|
|
13456
13702
|
annualTurnover: z$3.number(),
|
|
13457
13703
|
numberOfEmployees: z$3.number(),
|
|
13458
13704
|
prosecuted: z$3.string().optional(),
|
|
@@ -13465,7 +13711,7 @@ const createOrganizationInputSchema = z$3.object({
|
|
|
13465
13711
|
operationCountries: z$3.string(),
|
|
13466
13712
|
riskyBusinessType: z$3.string().optional()
|
|
13467
13713
|
});
|
|
13468
|
-
const updateBankAccountSchema
|
|
13714
|
+
const updateBankAccountSchema = z$3.object({
|
|
13469
13715
|
...bankAccountMetadataSchema.shape,
|
|
13470
13716
|
partyId: z$3.uuid(),
|
|
13471
13717
|
internalId: z$3.string().optional(),
|
|
@@ -13475,7 +13721,7 @@ const updateBankAccountSchema$1 = z$3.object({
|
|
|
13475
13721
|
countryCode: bankAccountMetadataSchema.shape.countryCode.nonoptional(),
|
|
13476
13722
|
id: bankAccountMetadataSchema.shape.id.nonoptional()
|
|
13477
13723
|
});
|
|
13478
|
-
const bankAccountInputSchema = updateBankAccountSchema
|
|
13724
|
+
const bankAccountInputSchema = updateBankAccountSchema.required({
|
|
13479
13725
|
holderName: true,
|
|
13480
13726
|
currency: true,
|
|
13481
13727
|
countryCode: true
|
|
@@ -13504,23 +13750,55 @@ const createAddressInputSchema = z$3.object({
|
|
|
13504
13750
|
countryCode: z$3.enum(COUNTRY_CODES_2),
|
|
13505
13751
|
ruianCode: z$3.string().optional()
|
|
13506
13752
|
});
|
|
13753
|
+
const businessPartnerInputSchema$1 = z$3.object({
|
|
13754
|
+
name: z$3.string(),
|
|
13755
|
+
country: z$3.string(),
|
|
13756
|
+
cooperationReason: z$3.string().nullable()
|
|
13757
|
+
});
|
|
13758
|
+
const foSourceOfWealthInputSchema$1 = z$3.object({
|
|
13759
|
+
incomeSources: z$3.array(z$3.enum(INCOME_SOURCE)).min(1),
|
|
13760
|
+
incomeSourceOther: z$3.string().nullable(),
|
|
13761
|
+
monthlyIncome: z$3.enum(MONTHLY_INCOME_RANGE),
|
|
13762
|
+
employer: z$3.string().nullable(),
|
|
13763
|
+
employerCountry: z$3.string().nullable()
|
|
13764
|
+
});
|
|
13765
|
+
const businessSourceOfWealthInputSchema$1 = z$3.object({
|
|
13766
|
+
financialFundsSources: z$3.array(z$3.enum(FINANCIAL_FUNDS_SOURCE)).min(1),
|
|
13767
|
+
financialFundsSourceOther: z$3.string().nullable(),
|
|
13768
|
+
mainBusinessSubjects: z$3.array(z$3.enum(CZ_TRADE_LICENSE_CODES)).min(1),
|
|
13769
|
+
companyTurnover: z$3.enum(COMPANY_TURNOVER_RANGE),
|
|
13770
|
+
operatingCountries: z$3.array(z$3.enum(OPERATING_COUNTRY)).min(1),
|
|
13771
|
+
operatingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).nullable(),
|
|
13772
|
+
businessPartners: z$3.array(businessPartnerInputSchema$1).nullable(),
|
|
13773
|
+
businessActivitiesNote: z$3.string().nullable()
|
|
13774
|
+
});
|
|
13507
13775
|
const createAmlInputSchema = z$3.object({
|
|
13508
13776
|
internalId: z$3.string().optional(),
|
|
13509
|
-
sourceOfWealth: z$3.
|
|
13510
|
-
|
|
13511
|
-
|
|
13512
|
-
|
|
13777
|
+
sourceOfWealth: z$3.union([
|
|
13778
|
+
foSourceOfWealthInputSchema$1,
|
|
13779
|
+
businessSourceOfWealthInputSchema$1
|
|
13780
|
+
]),
|
|
13781
|
+
yearlyIncome: z$3.enum(YEARLY_INCOME),
|
|
13782
|
+
sourceOfIncome: z$3.array(z$3.enum(INCOME_SOURCE)).min(1),
|
|
13783
|
+
incomeSourceOther: z$3.string().optional(),
|
|
13784
|
+
servicePurposes: z$3.array(z$3.enum(SERVICE_PURPOSE)).optional(),
|
|
13785
|
+
servicePurposesOther: z$3.string().optional(),
|
|
13786
|
+
taxDomicile: z$3.enum(TAX_DOMICILE).optional(),
|
|
13787
|
+
taxDomicileCountry: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13513
13788
|
transactionType: z$3.string().optional(),
|
|
13514
13789
|
transactionTypeExpiry: z$3.date().optional(),
|
|
13515
13790
|
isDistraint: z$3.boolean().default(false),
|
|
13516
|
-
estTxsVolumeMonth: z$3.
|
|
13517
|
-
estTxsVolumeYear: z$3.
|
|
13518
|
-
|
|
13519
|
-
|
|
13791
|
+
estTxsVolumeMonth: z$3.enum(EST_TXS_VOLUME_MONTH),
|
|
13792
|
+
estTxsVolumeYear: z$3.enum(EST_TXS_VOLUME_YEAR),
|
|
13793
|
+
estTxsCountMonth: z$3.number().int().optional(),
|
|
13794
|
+
tradingCountries: z$3.array(z$3.enum(TARGET_COUNTRY)).min(1),
|
|
13795
|
+
tradingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).optional(),
|
|
13796
|
+
tradingSide: z$3.enum(TRADING_SIDE),
|
|
13520
13797
|
acceptedAMLTermsAndConditions: z$3.boolean(),
|
|
13521
|
-
signatureMethod: z$3.
|
|
13522
|
-
existencePeriod: z$3.
|
|
13523
|
-
reputation: z$3.
|
|
13798
|
+
signatureMethod: z$3.enum(SIGNATURE_METHOD).optional(),
|
|
13799
|
+
existencePeriod: z$3.enum(EXISTENCE_PERIOD).optional(),
|
|
13800
|
+
reputation: z$3.enum(REPUTATION).optional(),
|
|
13801
|
+
riskBusinessAreas: z$3.array(z$3.enum(RISK_BUSINESS_AREA)).optional(),
|
|
13524
13802
|
riskLevel: z$3.enum(AML_SCORE_TYPE).optional(),
|
|
13525
13803
|
kycStatus: z$3.enum(KYC_STATUS).optional()
|
|
13526
13804
|
});
|
|
@@ -13533,6 +13811,48 @@ const productsInputSchema$1 = z$3.object({
|
|
|
13533
13811
|
}).optional(),
|
|
13534
13812
|
cbs: z$3.object({}).optional()
|
|
13535
13813
|
});
|
|
13814
|
+
const ownerInputSchema = z$3.object({
|
|
13815
|
+
titleBefore: z$3.string().optional(),
|
|
13816
|
+
name: z$3.string(),
|
|
13817
|
+
surname: z$3.string(),
|
|
13818
|
+
titleAfter: z$3.string().optional(),
|
|
13819
|
+
birthDate: z$3.string(),
|
|
13820
|
+
birthPlace: z$3.string(),
|
|
13821
|
+
personalId: z$3.string(),
|
|
13822
|
+
gender: z$3.enum(GENDER),
|
|
13823
|
+
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
13824
|
+
isPep: z$3.boolean(),
|
|
13825
|
+
address: createAddressInputSchema,
|
|
13826
|
+
sharePercentage: z$3.number().max(100),
|
|
13827
|
+
shareEstablishedAt: z$3.date()
|
|
13828
|
+
});
|
|
13829
|
+
const idDocumentInputSchema$1 = z$3.object({
|
|
13830
|
+
idDocType: z$3.enum(ID_DOC_TYPE),
|
|
13831
|
+
idDocNumber: z$3.string(),
|
|
13832
|
+
issueDate: z$3.date().optional(),
|
|
13833
|
+
expirationDate: z$3.date().optional(),
|
|
13834
|
+
issuer: z$3.string().optional(),
|
|
13835
|
+
frontImageUri: z$3.string().optional(),
|
|
13836
|
+
backImageUri: z$3.string().optional()
|
|
13837
|
+
});
|
|
13838
|
+
const legalRepresentativeInputSchema = z$3.object({
|
|
13839
|
+
titleBefore: z$3.string().optional(),
|
|
13840
|
+
name: z$3.string(),
|
|
13841
|
+
surname: z$3.string(),
|
|
13842
|
+
titleAfter: z$3.string().optional(),
|
|
13843
|
+
birthDate: z$3.string(),
|
|
13844
|
+
birthPlace: z$3.string(),
|
|
13845
|
+
personalId: z$3.string(),
|
|
13846
|
+
gender: z$3.enum(GENDER),
|
|
13847
|
+
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
13848
|
+
isPep: z$3.boolean(),
|
|
13849
|
+
phone: z$3.string().optional(),
|
|
13850
|
+
email: z$3.string().optional(),
|
|
13851
|
+
pin: z$3.string().optional(),
|
|
13852
|
+
identityDocuments: z$3.array(idDocumentInputSchema$1).optional(),
|
|
13853
|
+
address: createAddressInputSchema,
|
|
13854
|
+
dateOfEstablishment: z$3.date()
|
|
13855
|
+
});
|
|
13536
13856
|
const createPartyInputSchema = z$3.object({
|
|
13537
13857
|
party: partySchema$1.omit({ id: true }),
|
|
13538
13858
|
personalData: individualInsertSchema.nullable(),
|
|
@@ -13540,9 +13860,12 @@ const createPartyInputSchema = z$3.object({
|
|
|
13540
13860
|
bankAccounts: z$3.array(bankAccountInputSchema),
|
|
13541
13861
|
disponents: z$3.array(disponentSchema),
|
|
13542
13862
|
addresses: z$3.array(createAddressInputSchema),
|
|
13863
|
+
owners: z$3.array(ownerInputSchema).optional(),
|
|
13864
|
+
legalRepresentatives: z$3.array(legalRepresentativeInputSchema).optional(),
|
|
13543
13865
|
aml: createAmlInputSchema,
|
|
13544
13866
|
recipients: z$3.array(bankAccountInputSchema),
|
|
13545
|
-
products: productsInputSchema$1.optional()
|
|
13867
|
+
products: productsInputSchema$1.optional(),
|
|
13868
|
+
traderIds: z$3.array(z$3.uuid()).optional()
|
|
13546
13869
|
});
|
|
13547
13870
|
const partyCreateOutputSchema = z$3.object({
|
|
13548
13871
|
customerStatus: z$3.enum(CUSTOMER_STATUS),
|
|
@@ -13562,8 +13885,9 @@ const responseBodySchema$5 = z$3.object({
|
|
|
13562
13885
|
const createPartyRoute = createRoute({
|
|
13563
13886
|
method: "post",
|
|
13564
13887
|
path: "/",
|
|
13565
|
-
summary: "Create
|
|
13888
|
+
summary: "Create Party",
|
|
13566
13889
|
tags: ["Parties"],
|
|
13890
|
+
description: "Creates a new party with all associated data \u2014 personal/organization data, bank accounts, addresses, disponents, AML records, recipients, and product configuration. The party type determines whether individual or organization data is required.",
|
|
13567
13891
|
request: {
|
|
13568
13892
|
body: {
|
|
13569
13893
|
content: {
|
|
@@ -13589,8 +13913,11 @@ const createPartyRoute = createRoute({
|
|
|
13589
13913
|
new OpenAPIHono().openapi(
|
|
13590
13914
|
createPartyRoute,
|
|
13591
13915
|
async (context) => {
|
|
13592
|
-
const
|
|
13593
|
-
const { data: partyData, error } = await context.env.MASTER_DATA_MANAGEMENT_SERVICE.createParty(
|
|
13916
|
+
const { owners, legalRepresentatives, ...partyInput } = context.req.valid("json");
|
|
13917
|
+
const { data: partyData, error } = await context.env.MASTER_DATA_MANAGEMENT_SERVICE.createParty({
|
|
13918
|
+
...partyInput,
|
|
13919
|
+
party: { ...partyInput.party, isRoot: true }
|
|
13920
|
+
});
|
|
13594
13921
|
if (!partyData || error) {
|
|
13595
13922
|
return context.json(
|
|
13596
13923
|
{
|
|
@@ -13599,6 +13926,85 @@ new OpenAPIHono().openapi(
|
|
|
13599
13926
|
500
|
|
13600
13927
|
);
|
|
13601
13928
|
}
|
|
13929
|
+
const mdm = context.env.MASTER_DATA_MANAGEMENT_SERVICE;
|
|
13930
|
+
if (owners?.length) {
|
|
13931
|
+
for (const owner of owners) {
|
|
13932
|
+
const { address, sharePercentage, shareEstablishedAt, ...individual } = owner;
|
|
13933
|
+
const { data: ownerParty, error: ownerError } = await mdm.createParty({
|
|
13934
|
+
party: {
|
|
13935
|
+
partyType: "INDIVIDUAL",
|
|
13936
|
+
language: partyInput.party.language,
|
|
13937
|
+
customerStatus: "NEW"
|
|
13938
|
+
},
|
|
13939
|
+
personalData: individual,
|
|
13940
|
+
organizationData: null,
|
|
13941
|
+
bankAccounts: null,
|
|
13942
|
+
recipients: null,
|
|
13943
|
+
disponents: null,
|
|
13944
|
+
addresses: [{ ...address, addressType: "PERMANENT_ADDRESS" }],
|
|
13945
|
+
aml: partyInput.aml
|
|
13946
|
+
});
|
|
13947
|
+
if (ownerParty && !ownerError) {
|
|
13948
|
+
await mdm.linkPartyToParty({
|
|
13949
|
+
fromPartyId: ownerParty.id,
|
|
13950
|
+
toPartyId: partyData.id,
|
|
13951
|
+
relationshipType: "UBO",
|
|
13952
|
+
sharePercentage,
|
|
13953
|
+
fromDate: shareEstablishedAt
|
|
13954
|
+
});
|
|
13955
|
+
}
|
|
13956
|
+
}
|
|
13957
|
+
}
|
|
13958
|
+
if (legalRepresentatives?.length) {
|
|
13959
|
+
for (const rep of legalRepresentatives) {
|
|
13960
|
+
const {
|
|
13961
|
+
address,
|
|
13962
|
+
identityDocuments,
|
|
13963
|
+
dateOfEstablishment,
|
|
13964
|
+
...individual
|
|
13965
|
+
} = rep;
|
|
13966
|
+
const { data: repParty, error: repError } = await mdm.createParty({
|
|
13967
|
+
party: {
|
|
13968
|
+
partyType: "INDIVIDUAL",
|
|
13969
|
+
language: partyInput.party.language,
|
|
13970
|
+
customerStatus: "NEW"
|
|
13971
|
+
},
|
|
13972
|
+
personalData: individual,
|
|
13973
|
+
organizationData: null,
|
|
13974
|
+
bankAccounts: null,
|
|
13975
|
+
recipients: null,
|
|
13976
|
+
disponents: null,
|
|
13977
|
+
addresses: [{ ...address, addressType: "PERMANENT_ADDRESS" }],
|
|
13978
|
+
aml: partyInput.aml
|
|
13979
|
+
});
|
|
13980
|
+
if (repParty && !repError) {
|
|
13981
|
+
await mdm.linkPartyToParty({
|
|
13982
|
+
fromPartyId: repParty.id,
|
|
13983
|
+
toPartyId: partyData.id,
|
|
13984
|
+
relationshipType: "BOARD_MEMBER",
|
|
13985
|
+
fromDate: dateOfEstablishment
|
|
13986
|
+
});
|
|
13987
|
+
if (identityDocuments?.length) {
|
|
13988
|
+
for (const doc of identityDocuments) {
|
|
13989
|
+
await mdm.createIdDocument({
|
|
13990
|
+
partyId: repParty.id,
|
|
13991
|
+
idDocument: {
|
|
13992
|
+
partyId: repParty.id,
|
|
13993
|
+
idDocType: doc.idDocType,
|
|
13994
|
+
idDocNumber: doc.idDocNumber,
|
|
13995
|
+
idDocHolderName: `${individual.name} ${individual.surname}`,
|
|
13996
|
+
issueDate: doc.issueDate,
|
|
13997
|
+
expirationDate: doc.expirationDate,
|
|
13998
|
+
issuer: doc.issuer,
|
|
13999
|
+
frontImageUri: doc.frontImageUri,
|
|
14000
|
+
backImageUri: doc.backImageUri
|
|
14001
|
+
}
|
|
14002
|
+
});
|
|
14003
|
+
}
|
|
14004
|
+
}
|
|
14005
|
+
}
|
|
14006
|
+
}
|
|
14007
|
+
}
|
|
13602
14008
|
return context.json(
|
|
13603
14009
|
{
|
|
13604
14010
|
message: "party created",
|
|
@@ -13660,7 +14066,7 @@ const organizationUpdateSchema = z$3.object({
|
|
|
13660
14066
|
monthlyVolumeIn: z$3.number().optional(),
|
|
13661
14067
|
monthlyVolumeOut: z$3.number().optional(),
|
|
13662
14068
|
ownedBy: z$3.string().optional(),
|
|
13663
|
-
companyObjects: z$3.
|
|
14069
|
+
companyObjects: z$3.array(z$3.enum(CZ_NACE_CODES)).min(1).optional(),
|
|
13664
14070
|
annualTurnover: z$3.number().optional(),
|
|
13665
14071
|
numberOfEmployees: z$3.number().optional(),
|
|
13666
14072
|
prosecuted: z$3.string().optional(),
|
|
@@ -13673,7 +14079,7 @@ const organizationUpdateSchema = z$3.object({
|
|
|
13673
14079
|
operationCountries: z$3.string(),
|
|
13674
14080
|
riskyBusinessType: z$3.string().optional()
|
|
13675
14081
|
});
|
|
13676
|
-
const
|
|
14082
|
+
const syncBankAccountSchema = z$3.object({
|
|
13677
14083
|
...bankAccountMetadataSchema.shape,
|
|
13678
14084
|
partyId: z$3.uuid(),
|
|
13679
14085
|
internalId: z$3.string().optional(),
|
|
@@ -13681,20 +14087,72 @@ const updateBankAccountSchema = z$3.object({
|
|
|
13681
14087
|
number: z$3.string().optional(),
|
|
13682
14088
|
currency: bankAccountMetadataSchema.shape.currency.nonoptional(),
|
|
13683
14089
|
countryCode: bankAccountMetadataSchema.shape.countryCode.nonoptional(),
|
|
13684
|
-
id:
|
|
14090
|
+
id: z$3.uuid().optional()
|
|
13685
14091
|
});
|
|
13686
|
-
const
|
|
14092
|
+
const disponentIndividualSyncDataSchema = z$3.object({
|
|
14093
|
+
id: z$3.uuid().optional(),
|
|
14094
|
+
name: z$3.string(),
|
|
14095
|
+
surname: z$3.string(),
|
|
14096
|
+
email: z$3.string().optional(),
|
|
14097
|
+
phone: z$3.string().optional(),
|
|
14098
|
+
birthDate: z$3.string().optional(),
|
|
14099
|
+
birthPlace: z$3.string(),
|
|
14100
|
+
countryOfBirth: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
14101
|
+
personalId: z$3.string(),
|
|
14102
|
+
gender: z$3.enum(GENDER),
|
|
14103
|
+
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
14104
|
+
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
14105
|
+
employer: z$3.string().optional(),
|
|
14106
|
+
employerCountry: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
14107
|
+
registeredNumber: z$3.string().optional(),
|
|
14108
|
+
isPep: z$3.boolean(),
|
|
14109
|
+
titleBefore: z$3.string().optional(),
|
|
14110
|
+
titleAfter: z$3.string().optional(),
|
|
14111
|
+
birthSurname: z$3.string().optional(),
|
|
14112
|
+
vocativeTitle: z$3.string().optional(),
|
|
14113
|
+
deathDate: z$3.date().optional(),
|
|
14114
|
+
deathNotification: z$3.date().optional(),
|
|
14115
|
+
pin: z$3.string().optional(),
|
|
14116
|
+
stayAbroad: z$3.boolean().optional(),
|
|
14117
|
+
stayAbroadCountries: z$3.enum(COUNTRY_CODES_2).optional()
|
|
14118
|
+
});
|
|
14119
|
+
const disponentOrganizationSyncDataSchema = z$3.object({
|
|
14120
|
+
id: z$3.uuid().optional(),
|
|
14121
|
+
businessName: z$3.string(),
|
|
14122
|
+
email: z$3.email("Invalid email format").optional(),
|
|
14123
|
+
phone: z$3.string().optional(),
|
|
14124
|
+
registeredNumber: z$3.string(),
|
|
14125
|
+
registeredIn: z$3.enum(COUNTRY_CODES_2),
|
|
14126
|
+
operatesIn: z$3.enum(COUNTRY_CODES_2),
|
|
14127
|
+
presentIn: z$3.enum(COUNTRY_CODES_2),
|
|
14128
|
+
monthlyVolumeIn: z$3.number(),
|
|
14129
|
+
monthlyVolumeOut: z$3.number(),
|
|
14130
|
+
ownedBy: z$3.string(),
|
|
14131
|
+
companyObjects: z$3.array(z$3.enum(CZ_NACE_CODES)).min(1),
|
|
14132
|
+
annualTurnover: z$3.number(),
|
|
14133
|
+
numberOfEmployees: z$3.number().optional(),
|
|
14134
|
+
prosecuted: z$3.string().optional(),
|
|
14135
|
+
location: z$3.string().optional(),
|
|
14136
|
+
fileNumber: z$3.string().optional(),
|
|
14137
|
+
websiteUrl: z$3.url("Invalid website URL").optional(),
|
|
14138
|
+
vatPayer: z$3.boolean(),
|
|
14139
|
+
companyObjectsDescription: z$3.string(),
|
|
14140
|
+
turnover3years: z$3.number(),
|
|
14141
|
+
operationCountries: z$3.string(),
|
|
14142
|
+
riskyBusinessType: z$3.string().optional()
|
|
14143
|
+
});
|
|
14144
|
+
const disponentSyncSchema = z$3.discriminatedUnion("partyType", [
|
|
13687
14145
|
z$3.object({
|
|
13688
14146
|
partyType: z$3.literal("INDIVIDUAL"),
|
|
13689
|
-
data:
|
|
14147
|
+
data: disponentIndividualSyncDataSchema
|
|
13690
14148
|
}),
|
|
13691
14149
|
z$3.object({
|
|
13692
14150
|
partyType: z$3.literal("ORGANIZATION"),
|
|
13693
|
-
data:
|
|
14151
|
+
data: disponentOrganizationSyncDataSchema
|
|
13694
14152
|
})
|
|
13695
14153
|
]);
|
|
13696
|
-
const
|
|
13697
|
-
id: z$3.uuid(),
|
|
14154
|
+
const syncAddressInputSchema = z$3.object({
|
|
14155
|
+
id: z$3.uuid().optional(),
|
|
13698
14156
|
partyId: z$3.uuid(),
|
|
13699
14157
|
internalId: z$3.string().optional(),
|
|
13700
14158
|
addressType: z$3.enum(ADDRESS_TYPE),
|
|
@@ -13709,25 +14167,54 @@ const updateAddressInputSchema = z$3.object({
|
|
|
13709
14167
|
countryCode: z$3.enum(COUNTRY_CODES_2),
|
|
13710
14168
|
ruianCode: z$3.string().optional()
|
|
13711
14169
|
});
|
|
14170
|
+
const businessPartnerInputSchema = z$3.object({
|
|
14171
|
+
name: z$3.string(),
|
|
14172
|
+
country: z$3.string(),
|
|
14173
|
+
cooperationReason: z$3.string().nullable()
|
|
14174
|
+
});
|
|
14175
|
+
const foSourceOfWealthInputSchema = z$3.object({
|
|
14176
|
+
incomeSources: z$3.array(z$3.enum(INCOME_SOURCE)).min(1),
|
|
14177
|
+
incomeSourceOther: z$3.string().nullable(),
|
|
14178
|
+
monthlyIncome: z$3.enum(MONTHLY_INCOME_RANGE),
|
|
14179
|
+
employer: z$3.string().nullable(),
|
|
14180
|
+
employerCountry: z$3.string().nullable()
|
|
14181
|
+
});
|
|
14182
|
+
const businessSourceOfWealthInputSchema = z$3.object({
|
|
14183
|
+
financialFundsSources: z$3.array(z$3.enum(FINANCIAL_FUNDS_SOURCE)).min(1),
|
|
14184
|
+
financialFundsSourceOther: z$3.string().nullable(),
|
|
14185
|
+
mainBusinessSubjects: z$3.array(z$3.enum(CZ_TRADE_LICENSE_CODES)).min(1),
|
|
14186
|
+
companyTurnover: z$3.enum(COMPANY_TURNOVER_RANGE),
|
|
14187
|
+
operatingCountries: z$3.array(z$3.enum(OPERATING_COUNTRY)).min(1),
|
|
14188
|
+
operatingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).nullable(),
|
|
14189
|
+
businessPartners: z$3.array(businessPartnerInputSchema).nullable(),
|
|
14190
|
+
businessActivitiesNote: z$3.string().nullable()
|
|
14191
|
+
});
|
|
13712
14192
|
const updateAmlInputSchema = z$3.object({
|
|
13713
14193
|
id: z$3.uuid(),
|
|
13714
14194
|
partyId: z$3.uuid().optional(),
|
|
13715
14195
|
internalId: z$3.string().optional(),
|
|
13716
|
-
sourceOfWealth: z$3.
|
|
13717
|
-
yearlyIncome: z$3.
|
|
13718
|
-
|
|
13719
|
-
|
|
14196
|
+
sourceOfWealth: z$3.union([foSourceOfWealthInputSchema, businessSourceOfWealthInputSchema]).optional(),
|
|
14197
|
+
yearlyIncome: z$3.enum(YEARLY_INCOME).optional(),
|
|
14198
|
+
sourceOfIncome: z$3.array(z$3.enum(INCOME_SOURCE)).min(1).optional(),
|
|
14199
|
+
incomeSourceOther: z$3.string().optional(),
|
|
14200
|
+
servicePurposes: z$3.array(z$3.enum(SERVICE_PURPOSE)).optional(),
|
|
14201
|
+
servicePurposesOther: z$3.string().optional(),
|
|
14202
|
+
taxDomicile: z$3.enum(TAX_DOMICILE).optional(),
|
|
14203
|
+
taxDomicileCountry: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13720
14204
|
transactionType: z$3.string().optional(),
|
|
13721
14205
|
transactionTypeExpiry: z$3.date().optional(),
|
|
13722
14206
|
isDistraint: z$3.boolean().optional(),
|
|
13723
|
-
estTxsVolumeMonth: z$3.
|
|
13724
|
-
estTxsVolumeYear: z$3.
|
|
13725
|
-
|
|
13726
|
-
|
|
14207
|
+
estTxsVolumeMonth: z$3.enum(EST_TXS_VOLUME_MONTH),
|
|
14208
|
+
estTxsVolumeYear: z$3.enum(EST_TXS_VOLUME_YEAR),
|
|
14209
|
+
estTxsCountMonth: z$3.number().int().optional(),
|
|
14210
|
+
tradingCountries: z$3.array(z$3.enum(TARGET_COUNTRY)).min(1),
|
|
14211
|
+
tradingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).optional(),
|
|
14212
|
+
tradingSide: z$3.enum(TRADING_SIDE),
|
|
13727
14213
|
acceptedAMLTermsAndConditions: z$3.boolean(),
|
|
13728
|
-
signatureMethod: z$3.
|
|
13729
|
-
existencePeriod: z$3.
|
|
13730
|
-
reputation: z$3.
|
|
14214
|
+
signatureMethod: z$3.enum(SIGNATURE_METHOD).optional(),
|
|
14215
|
+
existencePeriod: z$3.enum(EXISTENCE_PERIOD).optional(),
|
|
14216
|
+
reputation: z$3.enum(REPUTATION).optional(),
|
|
14217
|
+
riskBusinessAreas: z$3.array(z$3.enum(RISK_BUSINESS_AREA)).optional(),
|
|
13731
14218
|
riskLevel: z$3.enum(AML_SCORE_TYPE).optional(),
|
|
13732
14219
|
kycStatus: z$3.enum(KYC_STATUS).optional()
|
|
13733
14220
|
});
|
|
@@ -13740,16 +14227,63 @@ const productsInputSchema = z$3.object({
|
|
|
13740
14227
|
}).optional(),
|
|
13741
14228
|
cbs: z$3.object({}).optional()
|
|
13742
14229
|
});
|
|
14230
|
+
const ownerSyncSchema = z$3.object({
|
|
14231
|
+
id: z$3.uuid().optional(),
|
|
14232
|
+
titleBefore: z$3.string().optional(),
|
|
14233
|
+
name: z$3.string(),
|
|
14234
|
+
surname: z$3.string(),
|
|
14235
|
+
titleAfter: z$3.string().optional(),
|
|
14236
|
+
birthDate: z$3.string(),
|
|
14237
|
+
birthPlace: z$3.string(),
|
|
14238
|
+
personalId: z$3.string(),
|
|
14239
|
+
gender: z$3.enum(GENDER),
|
|
14240
|
+
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
14241
|
+
isPep: z$3.boolean(),
|
|
14242
|
+
address: syncAddressInputSchema,
|
|
14243
|
+
sharePercentage: z$3.number().max(100),
|
|
14244
|
+
shareEstablishedAt: z$3.date()
|
|
14245
|
+
});
|
|
14246
|
+
const idDocumentInputSchema = z$3.object({
|
|
14247
|
+
idDocType: z$3.enum(ID_DOC_TYPE),
|
|
14248
|
+
idDocNumber: z$3.string(),
|
|
14249
|
+
issueDate: z$3.date().optional(),
|
|
14250
|
+
expirationDate: z$3.date().optional(),
|
|
14251
|
+
issuer: z$3.string().optional(),
|
|
14252
|
+
frontImageUri: z$3.string().optional(),
|
|
14253
|
+
backImageUri: z$3.string().optional()
|
|
14254
|
+
});
|
|
14255
|
+
const legalRepresentativeSyncSchema = z$3.object({
|
|
14256
|
+
id: z$3.uuid().optional(),
|
|
14257
|
+
titleBefore: z$3.string().optional(),
|
|
14258
|
+
name: z$3.string(),
|
|
14259
|
+
surname: z$3.string(),
|
|
14260
|
+
titleAfter: z$3.string().optional(),
|
|
14261
|
+
birthDate: z$3.string(),
|
|
14262
|
+
birthPlace: z$3.string(),
|
|
14263
|
+
personalId: z$3.string(),
|
|
14264
|
+
gender: z$3.enum(GENDER),
|
|
14265
|
+
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
14266
|
+
isPep: z$3.boolean(),
|
|
14267
|
+
phone: z$3.string().optional(),
|
|
14268
|
+
email: z$3.string().optional(),
|
|
14269
|
+
pin: z$3.string().optional(),
|
|
14270
|
+
identityDocuments: z$3.array(idDocumentInputSchema).optional(),
|
|
14271
|
+
address: syncAddressInputSchema,
|
|
14272
|
+
dateOfEstablishment: z$3.date()
|
|
14273
|
+
});
|
|
13743
14274
|
const partyUpdateInputSchema = z$3.object({
|
|
13744
14275
|
party: partySchema,
|
|
13745
14276
|
personalData: individualUpdateSchema.nullable(),
|
|
13746
14277
|
organizationData: organizationUpdateSchema.nullable(),
|
|
13747
|
-
bankAccounts: z$3.array(
|
|
13748
|
-
disponents: z$3.array(
|
|
13749
|
-
addresses: z$3.array(
|
|
13750
|
-
|
|
14278
|
+
bankAccounts: z$3.array(syncBankAccountSchema),
|
|
14279
|
+
disponents: z$3.array(disponentSyncSchema).optional(),
|
|
14280
|
+
addresses: z$3.array(syncAddressInputSchema),
|
|
14281
|
+
owners: z$3.array(ownerSyncSchema).optional(),
|
|
14282
|
+
legalRepresentatives: z$3.array(legalRepresentativeSyncSchema).optional(),
|
|
14283
|
+
recipients: z$3.array(syncBankAccountSchema).nullable(),
|
|
13751
14284
|
aml: updateAmlInputSchema.optional(),
|
|
13752
|
-
products: productsInputSchema.optional()
|
|
14285
|
+
products: productsInputSchema.optional(),
|
|
14286
|
+
traderIds: z$3.array(z$3.uuid()).optional()
|
|
13753
14287
|
});
|
|
13754
14288
|
const updatePartyOuputSchema = z$3.object({
|
|
13755
14289
|
id: z$3.uuid(),
|
|
@@ -13765,9 +14299,10 @@ const responseBodySchema$4 = z$3.object({
|
|
|
13765
14299
|
});
|
|
13766
14300
|
const updatePartyRoute = createRoute({
|
|
13767
14301
|
method: "put",
|
|
13768
|
-
path: "/
|
|
13769
|
-
summary: "Update
|
|
14302
|
+
path: "/",
|
|
14303
|
+
summary: "Update Party",
|
|
13770
14304
|
tags: ["Parties"],
|
|
14305
|
+
description: "Updates an existing party and its associated child entities. All updatable fields can be provided \u2014 personal/organization data, bank accounts, addresses, disponents, AML, recipients, and products.",
|
|
13771
14306
|
security: [
|
|
13772
14307
|
{
|
|
13773
14308
|
JwtAuth: []
|
|
@@ -13811,7 +14346,8 @@ new OpenAPIHono().openapi(
|
|
|
13811
14346
|
addresses: party.addresses ?? void 0,
|
|
13812
14347
|
recipients: party.recipients ?? void 0,
|
|
13813
14348
|
aml: party.aml ?? void 0,
|
|
13814
|
-
products: party.products ?? void 0
|
|
14349
|
+
products: party.products ?? void 0,
|
|
14350
|
+
traderIds: party.traderIds ?? void 0
|
|
13815
14351
|
});
|
|
13816
14352
|
if (!updatedParty || partyError) {
|
|
13817
14353
|
return context.json({ message: "Could not update a Party" }, 404);
|
|
@@ -13836,7 +14372,7 @@ const partyBaseOutputSchema = z$3.object({
|
|
|
13836
14372
|
countryCode: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
13837
14373
|
createdAt: z$3.date().nullable(),
|
|
13838
14374
|
updatedAt: z$3.date().nullable(),
|
|
13839
|
-
|
|
14375
|
+
isRoot: z$3.boolean()
|
|
13840
14376
|
});
|
|
13841
14377
|
const individualOutputSchema = z$3.object({
|
|
13842
14378
|
id: z$3.uuid(),
|
|
@@ -13855,7 +14391,7 @@ const individualOutputSchema = z$3.object({
|
|
|
13855
14391
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
13856
14392
|
employer: z$3.string().nullable(),
|
|
13857
14393
|
employerCountry: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
13858
|
-
registeredNumber: z$3.string(),
|
|
14394
|
+
registeredNumber: z$3.string().nullable(),
|
|
13859
14395
|
isPep: z$3.boolean(),
|
|
13860
14396
|
titleBefore: z$3.string().nullable(),
|
|
13861
14397
|
titleAfter: z$3.string().nullable(),
|
|
@@ -13882,7 +14418,7 @@ const createOrganizationOutputSchema = z$3.object({
|
|
|
13882
14418
|
monthlyVolumeIn: z$3.number(),
|
|
13883
14419
|
monthlyVolumeOut: z$3.number(),
|
|
13884
14420
|
ownedBy: z$3.string(),
|
|
13885
|
-
companyObjects: z$3.
|
|
14421
|
+
companyObjects: z$3.array(z$3.enum(CZ_NACE_CODES)),
|
|
13886
14422
|
annualTurnover: z$3.number(),
|
|
13887
14423
|
numberOfEmployees: z$3.number().nullable(),
|
|
13888
14424
|
prosecuted: z$3.string().nullable(),
|
|
@@ -13943,25 +14479,57 @@ const createAddressOutputSchema = z$3.object({
|
|
|
13943
14479
|
createdAt: z$3.date().nullable(),
|
|
13944
14480
|
updatedAt: z$3.date().nullable()
|
|
13945
14481
|
});
|
|
14482
|
+
const businessPartnerOutputSchema = z$3.object({
|
|
14483
|
+
name: z$3.string(),
|
|
14484
|
+
country: z$3.string(),
|
|
14485
|
+
cooperationReason: z$3.string().nullable()
|
|
14486
|
+
});
|
|
14487
|
+
const foSourceOfWealthOutputSchema = z$3.object({
|
|
14488
|
+
incomeSources: z$3.array(z$3.enum(INCOME_SOURCE)),
|
|
14489
|
+
incomeSourceOther: z$3.string().nullable(),
|
|
14490
|
+
monthlyIncome: z$3.enum(MONTHLY_INCOME_RANGE),
|
|
14491
|
+
employer: z$3.string().nullable(),
|
|
14492
|
+
employerCountry: z$3.string().nullable()
|
|
14493
|
+
});
|
|
14494
|
+
const businessSourceOfWealthOutputSchema = z$3.object({
|
|
14495
|
+
financialFundsSources: z$3.array(z$3.enum(FINANCIAL_FUNDS_SOURCE)),
|
|
14496
|
+
financialFundsSourceOther: z$3.string().nullable(),
|
|
14497
|
+
mainBusinessSubjects: z$3.array(z$3.enum(CZ_TRADE_LICENSE_CODES)),
|
|
14498
|
+
companyTurnover: z$3.enum(COMPANY_TURNOVER_RANGE),
|
|
14499
|
+
operatingCountries: z$3.array(z$3.enum(OPERATING_COUNTRY)),
|
|
14500
|
+
operatingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).nullable(),
|
|
14501
|
+
businessPartners: z$3.array(businessPartnerOutputSchema).nullable(),
|
|
14502
|
+
businessActivitiesNote: z$3.string().nullable()
|
|
14503
|
+
});
|
|
13946
14504
|
const createAmlOutputSchema = z$3.object({
|
|
13947
14505
|
id: z$3.uuid(),
|
|
13948
14506
|
partyId: z$3.uuid(),
|
|
13949
14507
|
internalId: z$3.string().nullable(),
|
|
13950
|
-
sourceOfWealth: z$3.
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
|
|
14508
|
+
sourceOfWealth: z$3.union([
|
|
14509
|
+
foSourceOfWealthOutputSchema,
|
|
14510
|
+
businessSourceOfWealthOutputSchema
|
|
14511
|
+
]),
|
|
14512
|
+
yearlyIncome: z$3.enum(YEARLY_INCOME),
|
|
14513
|
+
sourceOfIncome: z$3.array(z$3.enum(INCOME_SOURCE)),
|
|
14514
|
+
incomeSourceOther: z$3.string().nullable(),
|
|
14515
|
+
servicePurposes: z$3.array(z$3.enum(SERVICE_PURPOSE)).nullable(),
|
|
14516
|
+
servicePurposesOther: z$3.string().nullable(),
|
|
14517
|
+
taxDomicile: z$3.enum(TAX_DOMICILE).nullable(),
|
|
14518
|
+
taxDomicileCountry: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
13954
14519
|
transactionType: z$3.string().nullable(),
|
|
13955
14520
|
transactionTypeExpiry: z$3.date().nullable(),
|
|
13956
14521
|
isDistraint: z$3.boolean(),
|
|
13957
|
-
estTxsVolumeMonth: z$3.
|
|
13958
|
-
estTxsVolumeYear: z$3.
|
|
13959
|
-
|
|
13960
|
-
|
|
14522
|
+
estTxsVolumeMonth: z$3.enum(EST_TXS_VOLUME_MONTH),
|
|
14523
|
+
estTxsVolumeYear: z$3.enum(EST_TXS_VOLUME_YEAR),
|
|
14524
|
+
estTxsCountMonth: z$3.number().int().nullable(),
|
|
14525
|
+
tradingCountries: z$3.array(z$3.enum(TARGET_COUNTRY)),
|
|
14526
|
+
tradingCountriesOther: z$3.array(z$3.enum(COUNTRY_CODES_2)).nullable(),
|
|
14527
|
+
tradingSide: z$3.enum(TRADING_SIDE),
|
|
13961
14528
|
acceptedAMLTermsAndConditions: z$3.boolean(),
|
|
13962
|
-
signatureMethod: z$3.
|
|
13963
|
-
existencePeriod: z$3.
|
|
13964
|
-
reputation: z$3.
|
|
14529
|
+
signatureMethod: z$3.enum(SIGNATURE_METHOD).nullable(),
|
|
14530
|
+
existencePeriod: z$3.enum(EXISTENCE_PERIOD).nullable(),
|
|
14531
|
+
reputation: z$3.enum(REPUTATION).nullable(),
|
|
14532
|
+
riskBusinessAreas: z$3.array(z$3.enum(RISK_BUSINESS_AREA)).nullable(),
|
|
13965
14533
|
riskLevel: z$3.enum(AML_SCORE_TYPE),
|
|
13966
14534
|
kycStatus: z$3.enum(KYC_STATUS).nullable(),
|
|
13967
14535
|
createdAt: z$3.date().nullable(),
|
|
@@ -13985,7 +14553,8 @@ const partyOutputSchema = z$3.object({
|
|
|
13985
14553
|
addresses: z$3.array(createAddressOutputSchema).nullable(),
|
|
13986
14554
|
aml: createAmlOutputSchema.nullable(),
|
|
13987
14555
|
recipients: z$3.array(bankAccountOutputSchema).nullable(),
|
|
13988
|
-
products: productsOutputSchema.nullable()
|
|
14556
|
+
products: productsOutputSchema.nullable(),
|
|
14557
|
+
traderIds: z$3.array(z$3.uuid()).nullable()
|
|
13989
14558
|
});
|
|
13990
14559
|
const responseBodySchema$3 = z$3.object({
|
|
13991
14560
|
message: z$3.string(),
|
|
@@ -13993,9 +14562,10 @@ const responseBodySchema$3 = z$3.object({
|
|
|
13993
14562
|
});
|
|
13994
14563
|
const getPartyByPartyIdRoute = createRoute({
|
|
13995
14564
|
method: "get",
|
|
13996
|
-
path: "/
|
|
13997
|
-
summary: "Get
|
|
14565
|
+
path: "/",
|
|
14566
|
+
summary: "Get Party",
|
|
13998
14567
|
tags: ["Parties"],
|
|
14568
|
+
description: "Retrieves a single party aggregate by its ID, including all related data \u2014 personal/organization info, bank accounts, addresses, disponents, AML, recipients, and products.",
|
|
13999
14569
|
request: {
|
|
14000
14570
|
params: z$3.object({ partyId: z$3.uuid() })
|
|
14001
14571
|
},
|
|
@@ -14053,8 +14623,9 @@ const partiesOutputDataSchema = z$3.array(partyOutputSchema);
|
|
|
14053
14623
|
const getPartiesRoute = createRoute({
|
|
14054
14624
|
method: "get",
|
|
14055
14625
|
path: "/",
|
|
14056
|
-
summary: "List
|
|
14626
|
+
summary: "List Parties",
|
|
14057
14627
|
tags: ["Parties"],
|
|
14628
|
+
description: "Returns a paginated list of all parties. Supports sorting, pagination, filtering by IDs, and full-text search.",
|
|
14058
14629
|
request: { query: paginationAndSearchSchema },
|
|
14059
14630
|
responses: {
|
|
14060
14631
|
500: {
|
|
@@ -14172,9 +14743,10 @@ const responseBodySchema$2 = z$3.object({
|
|
|
14172
14743
|
});
|
|
14173
14744
|
const createDocumentRoute = createRoute({
|
|
14174
14745
|
method: "post",
|
|
14175
|
-
path: "/
|
|
14176
|
-
summary: "Create ID
|
|
14177
|
-
tags: ["Documents"],
|
|
14746
|
+
path: "/",
|
|
14747
|
+
summary: "Create ID Document",
|
|
14748
|
+
tags: ["ID Documents"],
|
|
14749
|
+
description: "Creates a new identification document for the specified party and uploads the document image (front or back side). Accepts multipart form data with the document metadata as a JSON string and the file as a binary attachment.",
|
|
14178
14750
|
// middleware: [jwt, signature(), idempotency()],
|
|
14179
14751
|
// security: [{ JwtAuth: [] }],
|
|
14180
14752
|
request: {
|
|
@@ -14224,7 +14796,7 @@ new OpenAPIHono().openapi(
|
|
|
14224
14796
|
createDocumentRoute,
|
|
14225
14797
|
async (context) => {
|
|
14226
14798
|
const rawBody = await context.req.parseBody();
|
|
14227
|
-
const { partyId } =
|
|
14799
|
+
const { partyId } = context.req.valid("param");
|
|
14228
14800
|
const idDocumentRaw = rawBody.idDocument;
|
|
14229
14801
|
const documentSide = rawBody.documentSide;
|
|
14230
14802
|
const file = rawBody.file;
|
|
@@ -14324,9 +14896,10 @@ const responseBodySchema$1 = z$3.object({
|
|
|
14324
14896
|
});
|
|
14325
14897
|
const getIdDocumentsListRoute = createRoute({
|
|
14326
14898
|
method: "get",
|
|
14327
|
-
path: "/
|
|
14328
|
-
summary: "List
|
|
14329
|
-
tags: ["Documents"],
|
|
14899
|
+
path: "/",
|
|
14900
|
+
summary: "List ID Documents",
|
|
14901
|
+
tags: ["ID Documents"],
|
|
14902
|
+
description: "Returns a paginated list of identification documents for the specified party. Supports filtering by party ID and issuer.",
|
|
14330
14903
|
request: {
|
|
14331
14904
|
params: paramsSchema$1,
|
|
14332
14905
|
query: querySchema
|
|
@@ -14602,9 +15175,10 @@ const responseBodySchema = z$3.object({
|
|
|
14602
15175
|
});
|
|
14603
15176
|
const updateIdDocumentRoute = createRoute({
|
|
14604
15177
|
method: "put",
|
|
14605
|
-
path: "/
|
|
14606
|
-
summary: "Update
|
|
14607
|
-
tags: ["Documents"],
|
|
15178
|
+
path: "/",
|
|
15179
|
+
summary: "Update ID Document",
|
|
15180
|
+
tags: ["ID Documents"],
|
|
15181
|
+
description: "Updates an existing identification document. Supports partial updates \u2014 only provided fields are changed. Merges the patch with the existing document data.",
|
|
14608
15182
|
middleware: [jwt, signature(), idempotency()],
|
|
14609
15183
|
security: [{ JwtAuth: [] }],
|
|
14610
15184
|
request: {
|
|
@@ -14684,4 +15258,4 @@ const messageResponseSchema = z$3.object({
|
|
|
14684
15258
|
message: z$3.string()
|
|
14685
15259
|
});
|
|
14686
15260
|
|
|
14687
|
-
export { ADDRESS_TYPE$1 as ADDRESS_TYPE, AML_SCORE_TYPE$1 as AML_SCORE_TYPE, CLIENT_STATUS_ACTION, CONTACT_TYPE$1 as CONTACT_TYPE, CUSTOMER_STATUS$1 as CUSTOMER_STATUS, DOCUMENT_SIDE, GENDER$1 as GENDER, IDENTIFICATION_TYPE, ID_DOC_STATUS$1 as ID_DOC_STATUS, ID_DOC_TYPE$1 as ID_DOC_TYPE, KYC_STATUS$1 as KYC_STATUS, PARTY_RELATIONSHIP_TYPE$1 as PARTY_RELATIONSHIP_TYPE, PARTY_TYPE$1 as PARTY_TYPE, PRODUCT_TYPE$1 as PRODUCT_TYPE, TRADER_TYPE$1 as TRADER_TYPE, TXS_CLIENT_TYPE$1 as TXS_CLIENT_TYPE, createMdmClient, createPartyInputSchema, idDocumentCreateInputSchema, idDocumentMultipartSchema, idDocumentOutputSchema, idDocumentUpdateInputSchema, idDocumentsListOutputSchema, messageResponseSchema, partiesOutputDataSchema, partyCreateOutputSchema, partyOutputSchema, partySchema$1 as partySchema, partyUpdateInputSchema, productsInputSchema$1 as productsInputSchema, productsOutputSchema, updatePartyOuputSchema };
|
|
15261
|
+
export { ADDRESS_TYPE$1 as ADDRESS_TYPE, AML_SCORE_TYPE$1 as AML_SCORE_TYPE, CLIENT_STATUS_ACTION, COMPANY_TURNOVER_RANGE$1 as COMPANY_TURNOVER_RANGE, CONTACT_TYPE$1 as CONTACT_TYPE, CUSTOMER_STATUS$1 as CUSTOMER_STATUS, DOCUMENT_SIDE, EST_TXS_VOLUME_MONTH$1 as EST_TXS_VOLUME_MONTH, EST_TXS_VOLUME_YEAR$1 as EST_TXS_VOLUME_YEAR, EXISTENCE_PERIOD$1 as EXISTENCE_PERIOD, FINANCIAL_FUNDS_SOURCE$1 as FINANCIAL_FUNDS_SOURCE, GENDER$1 as GENDER, IDENTIFICATION_TYPE, ID_DOC_STATUS$1 as ID_DOC_STATUS, ID_DOC_TYPE$1 as ID_DOC_TYPE, INCOME_SOURCE$1 as INCOME_SOURCE, KYC_STATUS$1 as KYC_STATUS, MONTHLY_INCOME_RANGE$1 as MONTHLY_INCOME_RANGE, OPERATING_COUNTRY$1 as OPERATING_COUNTRY, PARTY_RELATIONSHIP_TYPE$1 as PARTY_RELATIONSHIP_TYPE, PARTY_TYPE$1 as PARTY_TYPE, PRODUCT_TYPE$1 as PRODUCT_TYPE, REPUTATION$1 as REPUTATION, RISK_BUSINESS_AREA$1 as RISK_BUSINESS_AREA, SERVICE_PURPOSE$1 as SERVICE_PURPOSE, SERVICE_PURPOSE_COMPANY$1 as SERVICE_PURPOSE_COMPANY, SERVICE_PURPOSE_FO$1 as SERVICE_PURPOSE_FO, SIGNATURE_METHOD$1 as SIGNATURE_METHOD, TARGET_COUNTRY$1 as TARGET_COUNTRY, TAX_DOMICILE$1 as TAX_DOMICILE, TRADER_TYPE$1 as TRADER_TYPE, TRADING_SIDE$1 as TRADING_SIDE, TXS_CLIENT_TYPE$1 as TXS_CLIENT_TYPE, YEARLY_INCOME$1 as YEARLY_INCOME, YES_NO_UNKNOWN, createMdmClient, createPartyInputSchema, idDocumentCreateInputSchema, idDocumentMultipartSchema, idDocumentOutputSchema, idDocumentUpdateInputSchema, idDocumentsListOutputSchema, messageResponseSchema, partiesOutputDataSchema, partyCreateOutputSchema, partyOutputSchema, partySchema$1 as partySchema, partyUpdateInputSchema, productsInputSchema$1 as productsInputSchema, productsOutputSchema, updatePartyOuputSchema };
|