@devizovaburza/mdm-sdk 0.0.13 → 0.0.14
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 +255 -104
- package/dist/v1/index.d.cts +557 -391
- package/dist/v1/index.d.mts +557 -391
- package/dist/v1/index.d.ts +557 -391
- package/dist/v1/index.mjs +240 -93
- package/package.json +1 -1
package/dist/v1/index.mjs
CHANGED
|
@@ -14,31 +14,31 @@ const createMdmClient = (baseUrl, options) => {
|
|
|
14
14
|
return hc(baseUrl, options);
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const ADDRESS_TYPE$1 = [
|
|
18
18
|
"PERMANENT_ADDRESS",
|
|
19
19
|
"REGISTERED_OFFICE",
|
|
20
20
|
"CONTACT_ADDRESS"
|
|
21
21
|
];
|
|
22
|
-
const
|
|
22
|
+
const CONTACT_TYPE$1 = [
|
|
23
23
|
"EMAIL",
|
|
24
24
|
"PHONE_AUTH",
|
|
25
25
|
"PHONE_CONTACT",
|
|
26
26
|
"PHONE_WORK"
|
|
27
27
|
];
|
|
28
|
-
const
|
|
29
|
-
const
|
|
28
|
+
const ID_DOC_TYPE$1 = ["PASSPORT", "ID", "DRIVING_LICENSE"];
|
|
29
|
+
const ID_DOC_STATUS$1 = [
|
|
30
30
|
"ACTIVE",
|
|
31
31
|
"EXPIRED",
|
|
32
32
|
"EXPIRE_SOON",
|
|
33
33
|
"REVOKED"
|
|
34
34
|
];
|
|
35
|
-
const
|
|
35
|
+
const PARTY_RELATIONSHIP_TYPE$1 = [
|
|
36
36
|
"AUTHORIZED_SIGNATORY",
|
|
37
37
|
"POA_HOLDER",
|
|
38
38
|
"BOARD_MEMBER",
|
|
39
39
|
"UBO"
|
|
40
40
|
];
|
|
41
|
-
const
|
|
41
|
+
const CUSTOMER_STATUS$1 = [
|
|
42
42
|
// 'LEAD',
|
|
43
43
|
"NEW",
|
|
44
44
|
"ACTIVE",
|
|
@@ -47,7 +47,7 @@ const CustomerStatusZod$1 = [
|
|
|
47
47
|
// 'FORMER',
|
|
48
48
|
// 'DECEASED',
|
|
49
49
|
];
|
|
50
|
-
const
|
|
50
|
+
const CLIENT_STATUS_ACTION = [
|
|
51
51
|
"ON_CUSTOMER_FORM_COMPLETED",
|
|
52
52
|
"ON_MANUAL_KYC_VERIFICATION_COMPLETED",
|
|
53
53
|
"ON_MANUAL_RISK_ASSESSMENT_COMPLETED",
|
|
@@ -55,12 +55,12 @@ const ClientStatusActionZod = [
|
|
|
55
55
|
"ON_CLOSE_CLIENT",
|
|
56
56
|
"ON_UNBLOCK_CLIENT"
|
|
57
57
|
];
|
|
58
|
-
const
|
|
58
|
+
const PARTY_TYPE$1 = [
|
|
59
59
|
"INDIVIDUAL",
|
|
60
60
|
"SELF_EMPLOYED",
|
|
61
61
|
"ORGANIZATION"
|
|
62
62
|
];
|
|
63
|
-
const
|
|
63
|
+
const AML_SCORE_TYPE$1 = [
|
|
64
64
|
"LOW",
|
|
65
65
|
"MEDIUM",
|
|
66
66
|
"HIGH",
|
|
@@ -68,44 +68,46 @@ const AmlScoreTypeZod$1 = [
|
|
|
68
68
|
"UNVERIFIED",
|
|
69
69
|
"UNCLASSIFIED"
|
|
70
70
|
];
|
|
71
|
-
const
|
|
71
|
+
const IDENTIFICATION_TYPE = [
|
|
72
72
|
"FACE_TO_FACE",
|
|
73
73
|
"REMOTE_IDENTIFICATION"
|
|
74
74
|
];
|
|
75
|
-
const
|
|
76
|
-
const
|
|
75
|
+
const GENDER$1 = ["M", "F", "OTHER"];
|
|
76
|
+
const KYC_STATUS$1 = [
|
|
77
77
|
"NOT_APPROVED",
|
|
78
78
|
"VERIFIED",
|
|
79
79
|
"UNVERIFIED",
|
|
80
80
|
"REJECTED"
|
|
81
81
|
];
|
|
82
82
|
const TRADER_TYPE$1 = ["PERSON", "COMPANY", "OSVC"];
|
|
83
|
+
const PRODUCT_TYPE$1 = ["TXS", "CBS"];
|
|
84
|
+
const TXS_CLIENT_TYPE$1 = ["CLIENT", "PROVIDER"];
|
|
83
85
|
|
|
84
|
-
const
|
|
86
|
+
const ADDRESS_TYPE = [
|
|
85
87
|
"PERMANENT_ADDRESS",
|
|
86
88
|
"REGISTERED_OFFICE",
|
|
87
89
|
"CONTACT_ADDRESS"
|
|
88
90
|
];
|
|
89
|
-
const
|
|
91
|
+
const CONTACT_TYPE = [
|
|
90
92
|
"EMAIL",
|
|
91
93
|
"PHONE_AUTH",
|
|
92
94
|
"PHONE_CONTACT",
|
|
93
95
|
"PHONE_WORK"
|
|
94
96
|
];
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
+
const ID_DOC_TYPE = ["PASSPORT", "ID", "DRIVING_LICENSE"];
|
|
98
|
+
const ID_DOC_STATUS = [
|
|
97
99
|
"ACTIVE",
|
|
98
100
|
"EXPIRED",
|
|
99
101
|
"EXPIRE_SOON",
|
|
100
102
|
"REVOKED"
|
|
101
103
|
];
|
|
102
|
-
const
|
|
104
|
+
const PARTY_RELATIONSHIP_TYPE = [
|
|
103
105
|
"AUTHORIZED_SIGNATORY",
|
|
104
106
|
"POA_HOLDER",
|
|
105
107
|
"BOARD_MEMBER",
|
|
106
108
|
"UBO"
|
|
107
109
|
];
|
|
108
|
-
const
|
|
110
|
+
const CUSTOMER_STATUS = [
|
|
109
111
|
// 'LEAD',
|
|
110
112
|
"NEW",
|
|
111
113
|
"ACTIVE",
|
|
@@ -114,12 +116,12 @@ const CustomerStatusZod = [
|
|
|
114
116
|
// 'FORMER',
|
|
115
117
|
// 'DECEASED',
|
|
116
118
|
];
|
|
117
|
-
const
|
|
119
|
+
const PARTY_TYPE = [
|
|
118
120
|
"INDIVIDUAL",
|
|
119
121
|
"SELF_EMPLOYED",
|
|
120
122
|
"ORGANIZATION"
|
|
121
123
|
];
|
|
122
|
-
const
|
|
124
|
+
const AML_SCORE_TYPE = [
|
|
123
125
|
"LOW",
|
|
124
126
|
"MEDIUM",
|
|
125
127
|
"HIGH",
|
|
@@ -127,14 +129,15 @@ const AmlScoreTypeZod = [
|
|
|
127
129
|
"UNVERIFIED",
|
|
128
130
|
"UNCLASSIFIED"
|
|
129
131
|
];
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
+
const GENDER = ["M", "F", "OTHER"];
|
|
133
|
+
const KYC_STATUS = [
|
|
132
134
|
"NOT_APPROVED",
|
|
133
135
|
"VERIFIED",
|
|
134
136
|
"UNVERIFIED",
|
|
135
137
|
"REJECTED"
|
|
136
138
|
];
|
|
137
139
|
const TRADER_TYPE = ["PERSON", "COMPANY", "OSVC"];
|
|
140
|
+
const PRODUCT_TYPE = ["TXS", "CBS"];
|
|
138
141
|
|
|
139
142
|
const entityKind = Symbol.for("drizzle:entityKind");
|
|
140
143
|
function is(value, type) {
|
|
@@ -1338,12 +1341,60 @@ function sqliteTableBase(name, columns, extraConfig, schema, baseName = name) {
|
|
|
1338
1341
|
const table = Object.assign(rawTable, builtColumns);
|
|
1339
1342
|
table[Table.Symbol.Columns] = builtColumns;
|
|
1340
1343
|
table[Table.Symbol.ExtraConfigColumns] = builtColumns;
|
|
1344
|
+
if (extraConfig) {
|
|
1345
|
+
table[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
|
1346
|
+
}
|
|
1341
1347
|
return table;
|
|
1342
1348
|
}
|
|
1343
1349
|
const sqliteTable = (name, columns, extraConfig) => {
|
|
1344
|
-
return sqliteTableBase(name, columns);
|
|
1350
|
+
return sqliteTableBase(name, columns, extraConfig);
|
|
1345
1351
|
};
|
|
1346
1352
|
|
|
1353
|
+
class IndexBuilderOn {
|
|
1354
|
+
constructor(name, unique) {
|
|
1355
|
+
this.name = name;
|
|
1356
|
+
this.unique = unique;
|
|
1357
|
+
}
|
|
1358
|
+
static [entityKind] = "SQLiteIndexBuilderOn";
|
|
1359
|
+
on(...columns) {
|
|
1360
|
+
return new IndexBuilder(this.name, columns, this.unique);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
class IndexBuilder {
|
|
1364
|
+
static [entityKind] = "SQLiteIndexBuilder";
|
|
1365
|
+
/** @internal */
|
|
1366
|
+
config;
|
|
1367
|
+
constructor(name, columns, unique) {
|
|
1368
|
+
this.config = {
|
|
1369
|
+
name,
|
|
1370
|
+
columns,
|
|
1371
|
+
unique,
|
|
1372
|
+
where: void 0
|
|
1373
|
+
};
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Condition for partial index.
|
|
1377
|
+
*/
|
|
1378
|
+
where(condition) {
|
|
1379
|
+
this.config.where = condition;
|
|
1380
|
+
return this;
|
|
1381
|
+
}
|
|
1382
|
+
/** @internal */
|
|
1383
|
+
build(table) {
|
|
1384
|
+
return new Index(this.config, table);
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
class Index {
|
|
1388
|
+
static [entityKind] = "SQLiteIndex";
|
|
1389
|
+
config;
|
|
1390
|
+
constructor(config, table) {
|
|
1391
|
+
this.config = { ...config, table };
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
function uniqueIndex(name) {
|
|
1395
|
+
return new IndexBuilderOn(name, true);
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1347
1398
|
const CONSTANTS = {
|
|
1348
1399
|
INT8_MIN: -128,
|
|
1349
1400
|
INT8_MAX: 127,
|
|
@@ -1640,15 +1691,15 @@ const createSelectSchema = (entity, refine) => {
|
|
|
1640
1691
|
return handleEnum(entity);
|
|
1641
1692
|
}
|
|
1642
1693
|
const columns = getColumns(entity);
|
|
1643
|
-
return handleColumns(columns, {}, selectConditions);
|
|
1694
|
+
return handleColumns(columns, refine ?? {}, selectConditions);
|
|
1644
1695
|
};
|
|
1645
1696
|
const createInsertSchema = (entity, refine) => {
|
|
1646
1697
|
const columns = getColumns(entity);
|
|
1647
|
-
return handleColumns(columns, {}, insertConditions);
|
|
1698
|
+
return handleColumns(columns, refine ?? {}, insertConditions);
|
|
1648
1699
|
};
|
|
1649
1700
|
const createUpdateSchema = (entity, refine) => {
|
|
1650
1701
|
const columns = getColumns(entity);
|
|
1651
|
-
return handleColumns(columns, {}, updateConditions);
|
|
1702
|
+
return handleColumns(columns, refine ?? {}, updateConditions);
|
|
1652
1703
|
};
|
|
1653
1704
|
|
|
1654
1705
|
var esprima$1 = {exports: {}};
|
|
@@ -12267,9 +12318,9 @@ const party = sqliteTable("party", {
|
|
|
12267
12318
|
internalId: text("internal_id"),
|
|
12268
12319
|
note: text("note"),
|
|
12269
12320
|
customerStatus: text("customer_status", {
|
|
12270
|
-
enum:
|
|
12321
|
+
enum: CUSTOMER_STATUS
|
|
12271
12322
|
}).notNull(),
|
|
12272
|
-
partyType: text("party_type", { enum:
|
|
12323
|
+
partyType: text("party_type", { enum: PARTY_TYPE }).notNull(),
|
|
12273
12324
|
language: text("language", { enum: LANGUAGE_CODES }).notNull(),
|
|
12274
12325
|
countryCode: text("country_code", { enum: COUNTRY_CODES_2 }),
|
|
12275
12326
|
isClient: integer("is_client", { mode: "boolean" }).notNull().default(false),
|
|
@@ -12281,7 +12332,7 @@ const address = sqliteTable("address", {
|
|
|
12281
12332
|
internalId: text("internal_id"),
|
|
12282
12333
|
partyId: text("party_id").notNull().references(() => party.id),
|
|
12283
12334
|
ruianCode: text("ruian_code"),
|
|
12284
|
-
addressType: text("address_type", { enum:
|
|
12335
|
+
addressType: text("address_type", { enum: ADDRESS_TYPE }).notNull(),
|
|
12285
12336
|
street: text("street"),
|
|
12286
12337
|
orientationNumber: text("orientation_number"),
|
|
12287
12338
|
descriptiveNumber: text("descriptive_number"),
|
|
@@ -12297,7 +12348,7 @@ const contact = sqliteTable("contact", {
|
|
|
12297
12348
|
...base,
|
|
12298
12349
|
internalId: text("internal_id"),
|
|
12299
12350
|
partyId: text("party_id").notNull().references(() => party.id),
|
|
12300
|
-
contactType: text("contact_type", { enum:
|
|
12351
|
+
contactType: text("contact_type", { enum: CONTACT_TYPE }),
|
|
12301
12352
|
email: text("email").notNull(),
|
|
12302
12353
|
phoneNumber: text("phone_number").notNull()
|
|
12303
12354
|
});
|
|
@@ -12306,7 +12357,7 @@ const idDocument = sqliteTable("id_document", {
|
|
|
12306
12357
|
...base,
|
|
12307
12358
|
internalId: text("internal_id"),
|
|
12308
12359
|
partyId: text("party_id").notNull().references(() => party.id),
|
|
12309
|
-
idDocType: text("id_doc_type", { enum:
|
|
12360
|
+
idDocType: text("id_doc_type", { enum: ID_DOC_TYPE }).notNull(),
|
|
12310
12361
|
idDocNumber: text("id_doc_number").notNull(),
|
|
12311
12362
|
idDocHolderName: text("id_doc_holder_name").notNull(),
|
|
12312
12363
|
issueDate: integer("issue_date", { mode: "timestamp_ms" }),
|
|
@@ -12315,7 +12366,7 @@ const idDocument = sqliteTable("id_document", {
|
|
|
12315
12366
|
countryOfIssue: text("country_of_issue", { enum: COUNTRY_CODES_2 }),
|
|
12316
12367
|
frontImageUri: text("front_image_uri"),
|
|
12317
12368
|
backImageUri: text("back_image_uri"),
|
|
12318
|
-
idDocStatus: text("id_doc_status", { enum:
|
|
12369
|
+
idDocStatus: text("id_doc_status", { enum: ID_DOC_STATUS })
|
|
12319
12370
|
});
|
|
12320
12371
|
|
|
12321
12372
|
const individual = sqliteTable("individual", {
|
|
@@ -12330,7 +12381,7 @@ const individual = sqliteTable("individual", {
|
|
|
12330
12381
|
birthPlace: text("birth_place").notNull(),
|
|
12331
12382
|
countryOfBirth: text("country_of_birth", { enum: COUNTRY_CODES_2 }),
|
|
12332
12383
|
personalId: text("personal_id").notNull(),
|
|
12333
|
-
gender: text("gender", { enum:
|
|
12384
|
+
gender: text("gender", { enum: GENDER }).notNull(),
|
|
12334
12385
|
citizenship: text("citizenship", { enum: COUNTRY_CODES_2 }).notNull(),
|
|
12335
12386
|
citizenshipOther: text("citizenship_other", { enum: COUNTRY_CODES_2 }),
|
|
12336
12387
|
employer: text("employer"),
|
|
@@ -12391,7 +12442,7 @@ const partyRelationship = sqliteTable("party_relationship", {
|
|
|
12391
12442
|
...base,
|
|
12392
12443
|
internalId: text("internal_id"),
|
|
12393
12444
|
relationshipType: text("relationship_type", {
|
|
12394
|
-
enum:
|
|
12445
|
+
enum: PARTY_RELATIONSHIP_TYPE
|
|
12395
12446
|
}),
|
|
12396
12447
|
fromPartyId: text("from_party_id").references(() => party.id),
|
|
12397
12448
|
toPartyId: text("to_party_id").references(() => party.id),
|
|
@@ -12455,8 +12506,8 @@ const aml = sqliteTable("aml", {
|
|
|
12455
12506
|
existencePeriod: text("existence_period"),
|
|
12456
12507
|
reputation: text("reputation"),
|
|
12457
12508
|
isDistraint: integer("is_distraint", { mode: "boolean" }).notNull().default(false),
|
|
12458
|
-
riskLevel: text("risk_level", { enum:
|
|
12459
|
-
kycStatus: text("kyc_status", { enum:
|
|
12509
|
+
riskLevel: text("risk_level", { enum: AML_SCORE_TYPE }).notNull(),
|
|
12510
|
+
kycStatus: text("kyc_status", { enum: KYC_STATUS })
|
|
12460
12511
|
});
|
|
12461
12512
|
|
|
12462
12513
|
const recipient = sqliteTable("recipient", {
|
|
@@ -12487,8 +12538,26 @@ sqliteTable("trader_client", {
|
|
|
12487
12538
|
legacyId: text("legacy_id")
|
|
12488
12539
|
});
|
|
12489
12540
|
|
|
12541
|
+
const partyProduct = sqliteTable(
|
|
12542
|
+
"party_product",
|
|
12543
|
+
{
|
|
12544
|
+
...base,
|
|
12545
|
+
partyId: text("party_id").notNull().references(() => party.id),
|
|
12546
|
+
product: text("product", { enum: PRODUCT_TYPE }).notNull(),
|
|
12547
|
+
config: text("config", { mode: "json" }).$type()
|
|
12548
|
+
},
|
|
12549
|
+
(table) => [
|
|
12550
|
+
uniqueIndex("party_product_party_id_product_unique").on(
|
|
12551
|
+
table.partyId,
|
|
12552
|
+
table.product
|
|
12553
|
+
)
|
|
12554
|
+
]
|
|
12555
|
+
);
|
|
12556
|
+
|
|
12490
12557
|
sqliteTable("base", baseMdmSqlite);
|
|
12491
12558
|
|
|
12559
|
+
const TXS_CLIENT_TYPE = ["CLIENT", "PROVIDER"];
|
|
12560
|
+
|
|
12492
12561
|
createInsertSchema(address);
|
|
12493
12562
|
createUpdateSchema(address);
|
|
12494
12563
|
createSelectSchema(address);
|
|
@@ -12497,7 +12566,7 @@ const addressInsertSchema = z$3.object({
|
|
|
12497
12566
|
partyId: z$3.uuid(),
|
|
12498
12567
|
internalId: z$3.string().optional().nullable(),
|
|
12499
12568
|
ruianCode: z$3.string().optional().nullable(),
|
|
12500
|
-
addressType: z$3.enum(
|
|
12569
|
+
addressType: z$3.enum(ADDRESS_TYPE),
|
|
12501
12570
|
street: z$3.string().optional().nullable(),
|
|
12502
12571
|
orientationNumber: z$3.string().optional().nullable(),
|
|
12503
12572
|
descriptiveNumber: z$3.string().optional().nullable(),
|
|
@@ -12513,7 +12582,7 @@ const addressUpdateSchema = z$3.object({
|
|
|
12513
12582
|
partyId: z$3.uuid().optional(),
|
|
12514
12583
|
internalId: z$3.string().optional().nullable(),
|
|
12515
12584
|
ruianCode: z$3.string().optional().nullable(),
|
|
12516
|
-
addressType: z$3.enum(
|
|
12585
|
+
addressType: z$3.enum(ADDRESS_TYPE).optional(),
|
|
12517
12586
|
street: z$3.string().optional().nullable(),
|
|
12518
12587
|
orientationNumber: z$3.string().optional().nullable(),
|
|
12519
12588
|
descriptiveNumber: z$3.string().optional().nullable(),
|
|
@@ -12530,7 +12599,7 @@ const addressSelectSchema = z$3.object({
|
|
|
12530
12599
|
partyId: z$3.uuid(),
|
|
12531
12600
|
internalId: z$3.string().nullable(),
|
|
12532
12601
|
ruianCode: z$3.string().nullable(),
|
|
12533
|
-
addressType: z$3.enum(
|
|
12602
|
+
addressType: z$3.enum(ADDRESS_TYPE),
|
|
12534
12603
|
street: z$3.string().nullable(),
|
|
12535
12604
|
orientationNumber: z$3.string().nullable(),
|
|
12536
12605
|
descriptiveNumber: z$3.string().nullable(),
|
|
@@ -12565,8 +12634,8 @@ const amlInsertSchema = z$3.object({
|
|
|
12565
12634
|
signatureMethod: z$3.string().nullable().optional(),
|
|
12566
12635
|
existencePeriod: z$3.string().nullable().optional(),
|
|
12567
12636
|
reputation: z$3.string().nullable().optional(),
|
|
12568
|
-
riskLevel: z$3.enum(
|
|
12569
|
-
kycStatus: z$3.enum(
|
|
12637
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE).nullable().optional(),
|
|
12638
|
+
kycStatus: z$3.enum(KYC_STATUS).nullable().optional()
|
|
12570
12639
|
});
|
|
12571
12640
|
const amlUpdateSchema = z$3.object({
|
|
12572
12641
|
id: z$3.uuid(),
|
|
@@ -12587,8 +12656,8 @@ const amlUpdateSchema = z$3.object({
|
|
|
12587
12656
|
signatureMethod: z$3.string().nullable().optional(),
|
|
12588
12657
|
existencePeriod: z$3.string().nullable().optional(),
|
|
12589
12658
|
reputation: z$3.string().nullable().optional(),
|
|
12590
|
-
riskLevel: z$3.enum(
|
|
12591
|
-
kycStatus: z$3.enum(
|
|
12659
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE).nullable().optional(),
|
|
12660
|
+
kycStatus: z$3.enum(KYC_STATUS).nullable().optional()
|
|
12592
12661
|
});
|
|
12593
12662
|
const amlSelectSchema = amlBaseSelectSchema;
|
|
12594
12663
|
|
|
@@ -12611,7 +12680,7 @@ createSelectSchema(contact);
|
|
|
12611
12680
|
const contactInsertSchema = z$3.object({
|
|
12612
12681
|
partyId: z$3.uuid(),
|
|
12613
12682
|
internalId: z$3.string().optional().nullable(),
|
|
12614
|
-
contactType: z$3.enum(
|
|
12683
|
+
contactType: z$3.enum(CONTACT_TYPE).optional(),
|
|
12615
12684
|
email: z$3.email("Invalid email format"),
|
|
12616
12685
|
phoneNumber: z$3.string()
|
|
12617
12686
|
});
|
|
@@ -12619,7 +12688,7 @@ const contactUpdateSchema = z$3.object({
|
|
|
12619
12688
|
id: z$3.uuid(),
|
|
12620
12689
|
partyId: z$3.uuid().optional(),
|
|
12621
12690
|
internalId: z$3.string().optional().nullable(),
|
|
12622
|
-
contactType: z$3.enum(
|
|
12691
|
+
contactType: z$3.enum(CONTACT_TYPE).optional(),
|
|
12623
12692
|
email: z$3.email("Invalid email format").optional(),
|
|
12624
12693
|
phoneNumber: z$3.string().optional()
|
|
12625
12694
|
});
|
|
@@ -12637,7 +12706,7 @@ const individualInsertSchema$1 = z$3.object({
|
|
|
12637
12706
|
birthPlace: z$3.string(),
|
|
12638
12707
|
countryOfBirth: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12639
12708
|
personalId: z$3.string(),
|
|
12640
|
-
gender: z$3.enum(
|
|
12709
|
+
gender: z$3.enum(GENDER),
|
|
12641
12710
|
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
12642
12711
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12643
12712
|
employer: z$3.string().optional().nullable(),
|
|
@@ -12665,7 +12734,7 @@ const individualUpdateSchema$1 = z$3.object({
|
|
|
12665
12734
|
birthPlace: z$3.string().optional(),
|
|
12666
12735
|
countryOfBirth: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12667
12736
|
personalId: z$3.string().optional(),
|
|
12668
|
-
gender: z$3.enum(
|
|
12737
|
+
gender: z$3.enum(GENDER).optional(),
|
|
12669
12738
|
citizenship: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
12670
12739
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12671
12740
|
employer: z$3.string().optional().nullable(),
|
|
@@ -12694,7 +12763,7 @@ const individualSelectSchema = z$3.object({
|
|
|
12694
12763
|
birthPlace: z$3.string(),
|
|
12695
12764
|
countryOfBirth: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
12696
12765
|
personalId: z$3.string(),
|
|
12697
|
-
gender: z$3.enum(
|
|
12766
|
+
gender: z$3.enum(GENDER),
|
|
12698
12767
|
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
12699
12768
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
12700
12769
|
employer: z$3.string().nullable(),
|
|
@@ -12851,7 +12920,7 @@ createSelectSchema(idDocument);
|
|
|
12851
12920
|
const idDocumentInsertSchema = z$3.object({
|
|
12852
12921
|
partyId: z$3.uuid(),
|
|
12853
12922
|
internalId: z$3.string().optional().nullable(),
|
|
12854
|
-
idDocType: z$3.enum(
|
|
12923
|
+
idDocType: z$3.enum(ID_DOC_TYPE),
|
|
12855
12924
|
idDocNumber: z$3.string(),
|
|
12856
12925
|
idDocHolderName: z$3.string(),
|
|
12857
12926
|
issueDate: z$3.date().optional().nullable(),
|
|
@@ -12860,13 +12929,13 @@ const idDocumentInsertSchema = z$3.object({
|
|
|
12860
12929
|
countryOfIssue: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12861
12930
|
frontImageUri: z$3.url().optional().nullable(),
|
|
12862
12931
|
backImageUri: z$3.url().optional().nullable(),
|
|
12863
|
-
idDocStatus: z$3.enum(
|
|
12932
|
+
idDocStatus: z$3.enum(ID_DOC_STATUS).optional().nullable()
|
|
12864
12933
|
});
|
|
12865
12934
|
const idDocumentUpdateSchema = z$3.object({
|
|
12866
12935
|
id: z$3.uuid(),
|
|
12867
12936
|
partyId: z$3.uuid().optional(),
|
|
12868
12937
|
internalId: z$3.string().optional().nullable(),
|
|
12869
|
-
idDocType: z$3.enum(
|
|
12938
|
+
idDocType: z$3.enum(ID_DOC_TYPE).optional(),
|
|
12870
12939
|
idDocNumber: z$3.string().optional(),
|
|
12871
12940
|
idDocHolderName: z$3.string().optional(),
|
|
12872
12941
|
issueDate: z$3.date().optional().nullable(),
|
|
@@ -12875,7 +12944,7 @@ const idDocumentUpdateSchema = z$3.object({
|
|
|
12875
12944
|
countryOfIssue: z$3.enum(COUNTRY_CODES_2).optional().nullable(),
|
|
12876
12945
|
frontImageUri: z$3.url("Invalid URL format").optional().nullable(),
|
|
12877
12946
|
backImageUri: z$3.url("Invalid URL format").optional().nullable(),
|
|
12878
|
-
idDocStatus: z$3.enum(
|
|
12947
|
+
idDocStatus: z$3.enum(ID_DOC_STATUS).optional().nullable()
|
|
12879
12948
|
});
|
|
12880
12949
|
|
|
12881
12950
|
const recipientBaseInsertSchema = createInsertSchema(recipient);
|
|
@@ -12888,21 +12957,64 @@ const recipientInsertSchema = bankAccountInsertSchema;
|
|
|
12888
12957
|
const recipientUpdateSchema = bankAccountUpdateSchema;
|
|
12889
12958
|
const recipientSelectSchema = bankAccountSelectSchema;
|
|
12890
12959
|
|
|
12960
|
+
const productTxsConfigSchema = z$3.object({
|
|
12961
|
+
fee: z$3.number(),
|
|
12962
|
+
margin: z$3.number(),
|
|
12963
|
+
reportingEmail: z$3.string().optional(),
|
|
12964
|
+
clientType: z$3.enum(TXS_CLIENT_TYPE).optional()
|
|
12965
|
+
});
|
|
12966
|
+
const productCbsConfigSchema = z$3.object({});
|
|
12967
|
+
const productConfigSchema = z$3.union([
|
|
12968
|
+
productTxsConfigSchema,
|
|
12969
|
+
productCbsConfigSchema
|
|
12970
|
+
]);
|
|
12971
|
+
const partyProductBaseInsertSchema = createInsertSchema(partyProduct, {
|
|
12972
|
+
config: () => productConfigSchema.nullable()
|
|
12973
|
+
});
|
|
12974
|
+
createUpdateSchema(partyProduct, {
|
|
12975
|
+
config: () => productConfigSchema.nullable()
|
|
12976
|
+
});
|
|
12977
|
+
createSelectSchema(partyProduct, {
|
|
12978
|
+
config: () => productConfigSchema.nullable()
|
|
12979
|
+
});
|
|
12980
|
+
const partyProductUpdateSchema = partyProductBaseInsertSchema.extend({
|
|
12981
|
+
partyId: z$3.uuid()
|
|
12982
|
+
});
|
|
12983
|
+
partyProductUpdateSchema.omit({
|
|
12984
|
+
id: true
|
|
12985
|
+
});
|
|
12986
|
+
const partyProductSelectSchema = partyProductUpdateSchema.required();
|
|
12987
|
+
z$3.array(partyProductSelectSchema);
|
|
12988
|
+
const productsInputSchema$2 = z$3.object({
|
|
12989
|
+
txs: productTxsConfigSchema.optional(),
|
|
12990
|
+
cbs: productCbsConfigSchema.optional()
|
|
12991
|
+
});
|
|
12992
|
+
const productTxsConfigOutputSchema = z$3.object({
|
|
12993
|
+
fee: z$3.number(),
|
|
12994
|
+
margin: z$3.number(),
|
|
12995
|
+
reportingEmail: z$3.string().nullable(),
|
|
12996
|
+
clientType: z$3.enum(TXS_CLIENT_TYPE).nullable()
|
|
12997
|
+
});
|
|
12998
|
+
const productsOutputSchema$1 = z$3.object({
|
|
12999
|
+
txs: productTxsConfigOutputSchema.nullable(),
|
|
13000
|
+
cbs: productCbsConfigSchema.nullable()
|
|
13001
|
+
});
|
|
13002
|
+
|
|
12891
13003
|
createInsertSchema(party);
|
|
12892
13004
|
createUpdateSchema(party);
|
|
12893
13005
|
const partySchema$2 = z$3.object({
|
|
12894
|
-
partyType: z$3.enum(
|
|
13006
|
+
partyType: z$3.enum(PARTY_TYPE),
|
|
12895
13007
|
language: z$3.enum(LANGUAGE_CODES),
|
|
12896
13008
|
id: z$3.uuid().nullable(),
|
|
12897
13009
|
note: z$3.string().optional(),
|
|
12898
13010
|
countryCode: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
12899
|
-
customerStatus: z$3.enum(
|
|
13011
|
+
customerStatus: z$3.enum(CUSTOMER_STATUS).optional(),
|
|
12900
13012
|
legacyId: z$3.string().optional()
|
|
12901
13013
|
});
|
|
12902
13014
|
const partyOutputSchema$1 = z$3.object({
|
|
12903
13015
|
internalId: z$3.string().nullable(),
|
|
12904
|
-
customerStatus: z$3.enum(
|
|
12905
|
-
partyType: z$3.enum(
|
|
13016
|
+
customerStatus: z$3.enum(CUSTOMER_STATUS),
|
|
13017
|
+
partyType: z$3.enum(PARTY_TYPE),
|
|
12906
13018
|
language: z$3.enum(LANGUAGE_CODES),
|
|
12907
13019
|
id: z$3.uuid(),
|
|
12908
13020
|
note: z$3.string().nullable(),
|
|
@@ -12920,7 +13032,8 @@ z$3.object({
|
|
|
12920
13032
|
recipients: z$3.array(recipientInsertSchema.omit({ partyId: true })).nullable(),
|
|
12921
13033
|
disponents: z$3.array(disponentCreateSchema).nullable(),
|
|
12922
13034
|
addresses: z$3.array(addressInsertSchema.omit({ partyId: true })),
|
|
12923
|
-
aml: amlInsertSchema.omit({ partyId: true })
|
|
13035
|
+
aml: amlInsertSchema.omit({ partyId: true }),
|
|
13036
|
+
products: productsInputSchema$2.optional()
|
|
12924
13037
|
});
|
|
12925
13038
|
z$3.object({
|
|
12926
13039
|
partyId: z$3.uuid(),
|
|
@@ -12931,7 +13044,8 @@ z$3.object({
|
|
|
12931
13044
|
recipients: z$3.array(recipientUpsertSchema).optional(),
|
|
12932
13045
|
disponents: z$3.array(disponentUpdateSchema$1).optional(),
|
|
12933
13046
|
addresses: z$3.array(addressUpdateSchema).optional(),
|
|
12934
|
-
aml: amlUpdateSchema.optional()
|
|
13047
|
+
aml: amlUpdateSchema.optional(),
|
|
13048
|
+
products: productsInputSchema$2.optional()
|
|
12935
13049
|
});
|
|
12936
13050
|
const partySelectOutputSchema = z$3.object({
|
|
12937
13051
|
party: partyOutputSchema$1.nullable(),
|
|
@@ -12941,7 +13055,8 @@ const partySelectOutputSchema = z$3.object({
|
|
|
12941
13055
|
bankAccounts: z$3.array(bankAccountSelectSchema).nullable(),
|
|
12942
13056
|
disponents: z$3.array(disponentSelectSchema).nullable(),
|
|
12943
13057
|
addresses: z$3.array(addressSelectSchema).nullable(),
|
|
12944
|
-
recipients: z$3.array(recipientSelectSchema).nullable()
|
|
13058
|
+
recipients: z$3.array(recipientSelectSchema).nullable(),
|
|
13059
|
+
products: productsOutputSchema$1.nullable()
|
|
12945
13060
|
});
|
|
12946
13061
|
z$3.array(partySelectOutputSchema);
|
|
12947
13062
|
const partySelectDataSchema = z$3.object({
|
|
@@ -12958,7 +13073,8 @@ const partySelectArrayDataSchema = z$3.object({
|
|
|
12958
13073
|
});
|
|
12959
13074
|
z$3.object({
|
|
12960
13075
|
...partySelectDataSchema.shape,
|
|
12961
|
-
...partySelectArrayDataSchema.shape
|
|
13076
|
+
...partySelectArrayDataSchema.shape,
|
|
13077
|
+
products: productsOutputSchema$1.nullable()
|
|
12962
13078
|
});
|
|
12963
13079
|
|
|
12964
13080
|
createInsertSchema(partyChange);
|
|
@@ -12986,7 +13102,7 @@ createInsertSchema(partyRelationship);
|
|
|
12986
13102
|
createUpdateSchema(partyRelationship);
|
|
12987
13103
|
createSelectSchema(partyRelationship);
|
|
12988
13104
|
z$3.object({
|
|
12989
|
-
relationshipType: z$3.enum(
|
|
13105
|
+
relationshipType: z$3.enum(PARTY_RELATIONSHIP_TYPE).optional(),
|
|
12990
13106
|
frompartyId: z$3.uuid().optional().nullable(),
|
|
12991
13107
|
internalId: z$3.string().optional().nullable(),
|
|
12992
13108
|
topartyId: z$3.uuid().optional().nullable(),
|
|
@@ -12995,7 +13111,7 @@ z$3.object({
|
|
|
12995
13111
|
});
|
|
12996
13112
|
z$3.object({
|
|
12997
13113
|
id: z$3.uuid(),
|
|
12998
|
-
relationshipType: z$3.enum(
|
|
13114
|
+
relationshipType: z$3.enum(PARTY_RELATIONSHIP_TYPE).optional(),
|
|
12999
13115
|
frompartyId: z$3.uuid().optional().nullable(),
|
|
13000
13116
|
internalId: z$3.string().optional().nullable(),
|
|
13001
13117
|
topartyId: z$3.uuid().optional().nullable(),
|
|
@@ -13290,7 +13406,7 @@ const errorResponse = (entityName, action = "creation") => ({
|
|
|
13290
13406
|
});
|
|
13291
13407
|
|
|
13292
13408
|
const partySchema$1 = z$3.object({
|
|
13293
|
-
partyType: z$3.enum(
|
|
13409
|
+
partyType: z$3.enum(PARTY_TYPE),
|
|
13294
13410
|
language: z$3.enum(LANGUAGE_CODES),
|
|
13295
13411
|
id: z$3.uuid(),
|
|
13296
13412
|
internalId: z$3.string().optional(),
|
|
@@ -13307,7 +13423,7 @@ const individualInsertSchema = z$3.object({
|
|
|
13307
13423
|
birthPlace: z$3.string(),
|
|
13308
13424
|
countryOfBirth: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13309
13425
|
personalId: z$3.string(),
|
|
13310
|
-
gender: z$3.enum(
|
|
13426
|
+
gender: z$3.enum(GENDER),
|
|
13311
13427
|
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
13312
13428
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13313
13429
|
employer: z$3.string().optional(),
|
|
@@ -13375,7 +13491,7 @@ const disponentSchema = z$3.discriminatedUnion("partyType", [
|
|
|
13375
13491
|
})
|
|
13376
13492
|
]);
|
|
13377
13493
|
const createAddressInputSchema = z$3.object({
|
|
13378
|
-
addressType: z$3.enum(
|
|
13494
|
+
addressType: z$3.enum(ADDRESS_TYPE),
|
|
13379
13495
|
internalId: z$3.string().optional(),
|
|
13380
13496
|
street: z$3.string(),
|
|
13381
13497
|
orientationNumber: z$3.string().optional(),
|
|
@@ -13405,8 +13521,17 @@ const createAmlInputSchema = z$3.object({
|
|
|
13405
13521
|
signatureMethod: z$3.string().optional(),
|
|
13406
13522
|
existencePeriod: z$3.string().optional(),
|
|
13407
13523
|
reputation: z$3.string().optional(),
|
|
13408
|
-
riskLevel: z$3.enum(
|
|
13409
|
-
kycStatus: z$3.enum(
|
|
13524
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE).optional(),
|
|
13525
|
+
kycStatus: z$3.enum(KYC_STATUS).optional()
|
|
13526
|
+
});
|
|
13527
|
+
const productsInputSchema$1 = z$3.object({
|
|
13528
|
+
txs: z$3.object({
|
|
13529
|
+
fee: z$3.number(),
|
|
13530
|
+
margin: z$3.number(),
|
|
13531
|
+
reportingEmail: z$3.string().optional(),
|
|
13532
|
+
clientType: z$3.enum(TXS_CLIENT_TYPE).optional()
|
|
13533
|
+
}).optional(),
|
|
13534
|
+
cbs: z$3.object({}).optional()
|
|
13410
13535
|
});
|
|
13411
13536
|
const createPartyInputSchema = z$3.object({
|
|
13412
13537
|
party: partySchema$1.omit({ id: true }),
|
|
@@ -13416,11 +13541,12 @@ const createPartyInputSchema = z$3.object({
|
|
|
13416
13541
|
disponents: z$3.array(disponentSchema),
|
|
13417
13542
|
addresses: z$3.array(createAddressInputSchema),
|
|
13418
13543
|
aml: createAmlInputSchema,
|
|
13419
|
-
recipients: z$3.array(bankAccountInputSchema)
|
|
13544
|
+
recipients: z$3.array(bankAccountInputSchema),
|
|
13545
|
+
products: productsInputSchema$1.optional()
|
|
13420
13546
|
});
|
|
13421
13547
|
const partyCreateOutputSchema = z$3.object({
|
|
13422
|
-
customerStatus: z$3.enum(
|
|
13423
|
-
partyType: z$3.enum(
|
|
13548
|
+
customerStatus: z$3.enum(CUSTOMER_STATUS),
|
|
13549
|
+
partyType: z$3.enum(PARTY_TYPE),
|
|
13424
13550
|
language: z$3.enum(LANGUAGE_CODES),
|
|
13425
13551
|
id: z$3.uuid(),
|
|
13426
13552
|
internalId: z$3.string().nullable(),
|
|
@@ -13484,7 +13610,7 @@ new OpenAPIHono().openapi(
|
|
|
13484
13610
|
);
|
|
13485
13611
|
|
|
13486
13612
|
const partySchema = z$3.object({
|
|
13487
|
-
partyType: z$3.enum(
|
|
13613
|
+
partyType: z$3.enum(PARTY_TYPE),
|
|
13488
13614
|
language: z$3.enum(LANGUAGE_CODES),
|
|
13489
13615
|
id: z$3.uuid(),
|
|
13490
13616
|
internalId: z$3.string().optional(),
|
|
@@ -13503,7 +13629,7 @@ const individualUpdateSchema = z$3.object({
|
|
|
13503
13629
|
birthPlace: z$3.string().optional(),
|
|
13504
13630
|
countryOfBirth: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13505
13631
|
personalId: z$3.string().optional(),
|
|
13506
|
-
gender: z$3.enum(
|
|
13632
|
+
gender: z$3.enum(GENDER).optional(),
|
|
13507
13633
|
citizenship: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13508
13634
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13509
13635
|
employer: z$3.string().optional(),
|
|
@@ -13571,7 +13697,7 @@ const updateAddressInputSchema = z$3.object({
|
|
|
13571
13697
|
id: z$3.uuid(),
|
|
13572
13698
|
partyId: z$3.uuid(),
|
|
13573
13699
|
internalId: z$3.string().optional(),
|
|
13574
|
-
addressType: z$3.enum(
|
|
13700
|
+
addressType: z$3.enum(ADDRESS_TYPE),
|
|
13575
13701
|
street: z$3.string(),
|
|
13576
13702
|
orientationNumber: z$3.string().optional(),
|
|
13577
13703
|
descriptiveNumber: z$3.string().optional(),
|
|
@@ -13602,8 +13728,17 @@ const updateAmlInputSchema = z$3.object({
|
|
|
13602
13728
|
signatureMethod: z$3.string().optional(),
|
|
13603
13729
|
existencePeriod: z$3.string().optional(),
|
|
13604
13730
|
reputation: z$3.string().optional(),
|
|
13605
|
-
riskLevel: z$3.enum(
|
|
13606
|
-
kycStatus: z$3.enum(
|
|
13731
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE).optional(),
|
|
13732
|
+
kycStatus: z$3.enum(KYC_STATUS).optional()
|
|
13733
|
+
});
|
|
13734
|
+
const productsInputSchema = z$3.object({
|
|
13735
|
+
txs: z$3.object({
|
|
13736
|
+
fee: z$3.number(),
|
|
13737
|
+
margin: z$3.number(),
|
|
13738
|
+
reportingEmail: z$3.string().optional(),
|
|
13739
|
+
clientType: z$3.enum(TXS_CLIENT_TYPE).optional()
|
|
13740
|
+
}).optional(),
|
|
13741
|
+
cbs: z$3.object({}).optional()
|
|
13607
13742
|
});
|
|
13608
13743
|
const partyUpdateInputSchema = z$3.object({
|
|
13609
13744
|
party: partySchema,
|
|
@@ -13613,12 +13748,13 @@ const partyUpdateInputSchema = z$3.object({
|
|
|
13613
13748
|
disponents: z$3.array(disponentUpdateSchema).optional(),
|
|
13614
13749
|
addresses: z$3.array(updateAddressInputSchema),
|
|
13615
13750
|
recipients: z$3.array(updateBankAccountSchema).nullable(),
|
|
13616
|
-
aml: updateAmlInputSchema.optional()
|
|
13751
|
+
aml: updateAmlInputSchema.optional(),
|
|
13752
|
+
products: productsInputSchema.optional()
|
|
13617
13753
|
});
|
|
13618
13754
|
const updatePartyOuputSchema = z$3.object({
|
|
13619
13755
|
id: z$3.uuid(),
|
|
13620
|
-
customerStatus: z$3.enum(
|
|
13621
|
-
partyType: z$3.enum(
|
|
13756
|
+
customerStatus: z$3.enum(CUSTOMER_STATUS),
|
|
13757
|
+
partyType: z$3.enum(PARTY_TYPE),
|
|
13622
13758
|
language: z$3.enum(LANGUAGE_CODES),
|
|
13623
13759
|
note: z$3.string().nullable(),
|
|
13624
13760
|
countryCode: z$3.enum(COUNTRY_CODES_2).nullable()
|
|
@@ -13674,7 +13810,8 @@ new OpenAPIHono().openapi(
|
|
|
13674
13810
|
disponents: party.disponents ?? void 0,
|
|
13675
13811
|
addresses: party.addresses ?? void 0,
|
|
13676
13812
|
recipients: party.recipients ?? void 0,
|
|
13677
|
-
aml: party.aml ?? void 0
|
|
13813
|
+
aml: party.aml ?? void 0,
|
|
13814
|
+
products: party.products ?? void 0
|
|
13678
13815
|
});
|
|
13679
13816
|
if (!updatedParty || partyError) {
|
|
13680
13817
|
return context.json({ message: "Could not update a Party" }, 404);
|
|
@@ -13690,8 +13827,8 @@ new OpenAPIHono().openapi(
|
|
|
13690
13827
|
);
|
|
13691
13828
|
|
|
13692
13829
|
const partyBaseOutputSchema = z$3.object({
|
|
13693
|
-
customerStatus: z$3.enum(
|
|
13694
|
-
partyType: z$3.enum(
|
|
13830
|
+
customerStatus: z$3.enum(CUSTOMER_STATUS),
|
|
13831
|
+
partyType: z$3.enum(PARTY_TYPE),
|
|
13695
13832
|
language: z$3.enum(LANGUAGE_CODES),
|
|
13696
13833
|
id: z$3.uuid(),
|
|
13697
13834
|
internalId: z$3.string().nullable(),
|
|
@@ -13713,7 +13850,7 @@ const individualOutputSchema = z$3.object({
|
|
|
13713
13850
|
birthPlace: z$3.string(),
|
|
13714
13851
|
countryOfBirth: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
13715
13852
|
personalId: z$3.string(),
|
|
13716
|
-
gender: z$3.enum(
|
|
13853
|
+
gender: z$3.enum(GENDER),
|
|
13717
13854
|
citizenship: z$3.enum(COUNTRY_CODES_2),
|
|
13718
13855
|
citizenshipOther: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
13719
13856
|
employer: z$3.string().nullable(),
|
|
@@ -13792,7 +13929,7 @@ const createAddressOutputSchema = z$3.object({
|
|
|
13792
13929
|
id: z$3.uuid(),
|
|
13793
13930
|
partyId: z$3.uuid(),
|
|
13794
13931
|
internalId: z$3.string().nullable(),
|
|
13795
|
-
addressType: z$3.enum(
|
|
13932
|
+
addressType: z$3.enum(ADDRESS_TYPE),
|
|
13796
13933
|
street: z$3.string().nullable(),
|
|
13797
13934
|
orientationNumber: z$3.string().nullable(),
|
|
13798
13935
|
descriptiveNumber: z$3.string().nullable(),
|
|
@@ -13825,11 +13962,20 @@ const createAmlOutputSchema = z$3.object({
|
|
|
13825
13962
|
signatureMethod: z$3.string().nullable(),
|
|
13826
13963
|
existencePeriod: z$3.string().nullable(),
|
|
13827
13964
|
reputation: z$3.string().nullable(),
|
|
13828
|
-
riskLevel: z$3.enum(
|
|
13829
|
-
kycStatus: z$3.enum(
|
|
13965
|
+
riskLevel: z$3.enum(AML_SCORE_TYPE),
|
|
13966
|
+
kycStatus: z$3.enum(KYC_STATUS).nullable(),
|
|
13830
13967
|
createdAt: z$3.date().nullable(),
|
|
13831
13968
|
updatedAt: z$3.date().nullable()
|
|
13832
13969
|
});
|
|
13970
|
+
const productsOutputSchema = z$3.object({
|
|
13971
|
+
txs: z$3.object({
|
|
13972
|
+
fee: z$3.number(),
|
|
13973
|
+
margin: z$3.number(),
|
|
13974
|
+
reportingEmail: z$3.string().nullable(),
|
|
13975
|
+
clientType: z$3.enum(TXS_CLIENT_TYPE).nullable()
|
|
13976
|
+
}).nullable(),
|
|
13977
|
+
cbs: z$3.object({}).nullable()
|
|
13978
|
+
});
|
|
13833
13979
|
const partyOutputSchema = z$3.object({
|
|
13834
13980
|
party: partyBaseOutputSchema.nullable(),
|
|
13835
13981
|
personalData: individualOutputSchema.nullable(),
|
|
@@ -13838,7 +13984,8 @@ const partyOutputSchema = z$3.object({
|
|
|
13838
13984
|
disponents: z$3.array(disponentOutputSchema).nullable(),
|
|
13839
13985
|
addresses: z$3.array(createAddressOutputSchema).nullable(),
|
|
13840
13986
|
aml: createAmlOutputSchema.nullable(),
|
|
13841
|
-
recipients: z$3.array(bankAccountOutputSchema).nullable()
|
|
13987
|
+
recipients: z$3.array(bankAccountOutputSchema).nullable(),
|
|
13988
|
+
products: productsOutputSchema.nullable()
|
|
13842
13989
|
});
|
|
13843
13990
|
const responseBodySchema$3 = z$3.object({
|
|
13844
13991
|
message: z$3.string(),
|
|
@@ -13978,14 +14125,14 @@ const paramsSchema$2 = z$3.object({
|
|
|
13978
14125
|
});
|
|
13979
14126
|
const idDocumentCreateInputSchema = z$3.object({
|
|
13980
14127
|
partyId: z$3.uuid(),
|
|
13981
|
-
idDocType: z$3.enum(
|
|
14128
|
+
idDocType: z$3.enum(ID_DOC_TYPE),
|
|
13982
14129
|
idDocNumber: z$3.string(),
|
|
13983
14130
|
idDocHolderName: z$3.string(),
|
|
13984
14131
|
issueDate: z$3.coerce.date().optional(),
|
|
13985
14132
|
expirationDate: z$3.coerce.date().optional(),
|
|
13986
14133
|
issuer: z$3.string().optional(),
|
|
13987
14134
|
countryOfIssue: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
13988
|
-
idDocStatus: z$3.enum(
|
|
14135
|
+
idDocStatus: z$3.enum(ID_DOC_STATUS).optional()
|
|
13989
14136
|
});
|
|
13990
14137
|
const idDocumentMultipartSchema = z$3.object({
|
|
13991
14138
|
idDocument: z$3.string(),
|
|
@@ -14008,7 +14155,7 @@ const idDocumentOutputSchema = z$3.object({
|
|
|
14008
14155
|
updatedAt: z$3.iso.datetime().nullable(),
|
|
14009
14156
|
deletedAt: z$3.iso.datetime().nullable(),
|
|
14010
14157
|
partyId: z$3.uuid(),
|
|
14011
|
-
idDocType: z$3.enum(
|
|
14158
|
+
idDocType: z$3.enum(ID_DOC_TYPE),
|
|
14012
14159
|
idDocNumber: z$3.string(),
|
|
14013
14160
|
idDocHolderName: z$3.string(),
|
|
14014
14161
|
issueDate: z$3.iso.datetime().nullable(),
|
|
@@ -14017,7 +14164,7 @@ const idDocumentOutputSchema = z$3.object({
|
|
|
14017
14164
|
countryOfIssue: z$3.enum(COUNTRY_CODES_2).nullable(),
|
|
14018
14165
|
frontImageUri: z$3.string().nullable(),
|
|
14019
14166
|
backImageUri: z$3.string().nullable(),
|
|
14020
|
-
idDocStatus: z$3.enum(
|
|
14167
|
+
idDocStatus: z$3.enum(ID_DOC_STATUS).nullable()
|
|
14021
14168
|
});
|
|
14022
14169
|
const responseBodySchema$2 = z$3.object({
|
|
14023
14170
|
message: z$3.string(),
|
|
@@ -14438,7 +14585,7 @@ const paramsSchema = z$3.object({
|
|
|
14438
14585
|
});
|
|
14439
14586
|
const idDocumentUpdateInputSchema = z$3.object({
|
|
14440
14587
|
partyId: z$3.uuid().optional(),
|
|
14441
|
-
idDocType: z$3.enum(
|
|
14588
|
+
idDocType: z$3.enum(ID_DOC_TYPE).optional(),
|
|
14442
14589
|
idDocNumber: z$3.string().optional(),
|
|
14443
14590
|
idDocHolderName: z$3.string().optional(),
|
|
14444
14591
|
issueDate: z$3.coerce.date().optional(),
|
|
@@ -14447,7 +14594,7 @@ const idDocumentUpdateInputSchema = z$3.object({
|
|
|
14447
14594
|
countryOfIssue: z$3.enum(COUNTRY_CODES_2).optional(),
|
|
14448
14595
|
frontImageUri: z$3.string().optional(),
|
|
14449
14596
|
backImageUri: z$3.string().optional(),
|
|
14450
|
-
idDocStatus: z$3.enum(
|
|
14597
|
+
idDocStatus: z$3.enum(ID_DOC_STATUS).optional()
|
|
14451
14598
|
});
|
|
14452
14599
|
const responseBodySchema = z$3.object({
|
|
14453
14600
|
message: z$3.string(),
|
|
@@ -14537,4 +14684,4 @@ const messageResponseSchema = z$3.object({
|
|
|
14537
14684
|
message: z$3.string()
|
|
14538
14685
|
});
|
|
14539
14686
|
|
|
14540
|
-
export {
|
|
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 };
|