@nexeraid/identity-schemas 2.164.0-dev → 2.166.0-dev
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/declarations/src/providers/index.d.ts +1 -0
- package/dist/declarations/src/providers/index.d.ts.map +1 -1
- package/dist/declarations/src/providers/trm-labs/trm.schema.d.ts +358 -0
- package/dist/declarations/src/providers/trm-labs/trm.schema.d.ts.map +1 -0
- package/dist/{identity-api.schema-073b77e8.cjs.dev.cjs → identity-api.schema-9a1b028a.cjs.dev.cjs} +446 -446
- package/dist/{identity-api.schema-b0cdf833.cjs.prod.cjs → identity-api.schema-a6843fb9.cjs.prod.cjs} +446 -446
- package/dist/nexeraid-identity-schemas.cjs.dev.cjs +59 -59
- package/dist/nexeraid-identity-schemas.cjs.prod.cjs +59 -59
- package/dist/package.json +3 -3
- package/dist/{tfhe-utilities-f68d3b85.cjs.prod.cjs → tfhe-utilities-2ff3b3c1.cjs.prod.cjs} +2 -2
- package/dist/{tfhe-utilities-7506bbe3.cjs.dev.cjs → tfhe-utilities-5af6eb2a.cjs.dev.cjs} +2 -2
- package/dist/{toArray-d4a6f7df.cjs.dev.cjs → toArray-96f8cc3a.cjs.dev.cjs} +1 -1
- package/dist/{toArray-19bbf25f.cjs.prod.cjs → toArray-f5e38cce.cjs.prod.cjs} +1 -1
- package/dist/{CoinMarketCap.schema-ab71ee5f.cjs.prod.cjs → trm.schema-2ae40855.cjs.prod.cjs} +1276 -1207
- package/dist/{CoinMarketCap.schema-0c52a356.cjs.dev.cjs → trm.schema-4556df89.cjs.dev.cjs} +1276 -1207
- package/dist/{CoinMarketCap.schema-71fcc409.esm.mjs → trm.schema-d593fe86.esm.mjs} +62 -2
- package/dist/{vault.schema-68148c82.cjs.dev.cjs → vault.schema-6368506b.cjs.dev.cjs} +1268 -1268
- package/dist/{vault.schema-83220a2a.cjs.prod.cjs → vault.schema-b41992ec.cjs.prod.cjs} +1268 -1268
- package/dist/{zod-utils-22ad76a6.cjs.prod.cjs → zod-utils-46b101c1.cjs.prod.cjs} +12 -12
- package/dist/{zod-utils-373653ad.cjs.dev.cjs → zod-utils-4e3fa4df.cjs.dev.cjs} +12 -12
- package/identity/dist/nexeraid-identity-schemas-identity.cjs.dev.cjs +2 -2
- package/identity/dist/nexeraid-identity-schemas-identity.cjs.prod.cjs +2 -2
- package/package.json +3 -3
- package/providers/dist/nexeraid-identity-schemas-providers.cjs.dev.cjs +294 -289
- package/providers/dist/nexeraid-identity-schemas-providers.cjs.prod.cjs +294 -289
- package/providers/dist/nexeraid-identity-schemas-providers.esm.mjs +1 -1
- package/vault/dist/nexeraid-identity-schemas-vault.cjs.dev.cjs +3 -3
- package/vault/dist/nexeraid-identity-schemas-vault.cjs.prod.cjs +3 -3
- package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.dev.cjs +3 -3
- package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.prod.cjs +3 -3
- package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.dev.cjs +484 -484
- package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.prod.cjs +484 -484
- package/webhooks/dist/nexeraid-identity-schemas-webhooks.esm.mjs +1 -1
package/dist/{CoinMarketCap.schema-ab71ee5f.cjs.prod.cjs → trm.schema-2ae40855.cjs.prod.cjs}
RENAMED
|
@@ -1,147 +1,151 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var vault_schema = require('./vault.schema-
|
|
5
|
-
var identityApi_schema = require('./identity-api.schema-
|
|
3
|
+
var z = require('zod');
|
|
4
|
+
var vault_schema = require('./vault.schema-b41992ec.cjs.prod.cjs');
|
|
5
|
+
var identityApi_schema = require('./identity-api.schema-a6843fb9.cjs.prod.cjs');
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var z__default = /*#__PURE__*/_interopDefault(z);
|
|
10
|
+
|
|
11
|
+
var IpQualityAnalysisRequest = z.z.object({
|
|
12
|
+
apiKey: z.z.string().nullish(),
|
|
13
|
+
ipValue: z.z.string().nullish(),
|
|
14
|
+
userEmail: z.z.string().nullish(),
|
|
15
|
+
userPhoneNumber: z.z.string().nullish()
|
|
16
|
+
});
|
|
17
|
+
var IpQualityAnalysisResponse = z.z.object({
|
|
18
|
+
success: z.z["boolean"](),
|
|
19
|
+
request_id: z.z.string(),
|
|
20
|
+
message: z.z.string().nullish(),
|
|
21
|
+
fraud_score: z.z.number()["int"]().min(0).max(100).nullish(),
|
|
22
|
+
country_code: z.z.string().nullish(),
|
|
23
|
+
region: z.z.string().nullish(),
|
|
24
|
+
city: z.z.string().nullish(),
|
|
25
|
+
ISP: z.z.string().nullish(),
|
|
26
|
+
ASN: z.z.number().nullish(),
|
|
27
|
+
organization: z.z.string().nullish(),
|
|
28
|
+
is_crawler: z.z["boolean"]().nullish(),
|
|
29
|
+
timezone: z.z.string().nullish(),
|
|
30
|
+
mobile: z.z["boolean"]().nullish(),
|
|
31
|
+
host: z.z.string().nullish(),
|
|
32
|
+
proxy: z.z["boolean"]().nullish(),
|
|
33
|
+
vpn: z.z["boolean"]().nullish(),
|
|
34
|
+
tor: z.z["boolean"]().nullish(),
|
|
35
|
+
active_vpn: z.z["boolean"]().nullish(),
|
|
36
|
+
active_tor: z.z["boolean"]().nullish(),
|
|
37
|
+
recent_abuse: z.z["boolean"]().nullish(),
|
|
38
|
+
bot_status: z.z["boolean"]().nullish(),
|
|
39
|
+
connection_type: z.z.string().nullish(),
|
|
40
|
+
abuse_velocity: z.z.string().nullish(),
|
|
41
|
+
zip_code: z.z.string().nullish(),
|
|
42
|
+
latitude: z.z.number().nullish(),
|
|
43
|
+
longitude: z.z.number().nullish()
|
|
44
|
+
});
|
|
45
|
+
var EmailVerificationAnalysisResponse = z.z.object({
|
|
46
|
+
success: z.z["boolean"](),
|
|
47
|
+
request_id: z.z.string(),
|
|
48
|
+
message: z.z.string().nullish(),
|
|
49
|
+
valid: z.z["boolean"]().nullish(),
|
|
50
|
+
timed_out: z.z["boolean"]().nullish(),
|
|
51
|
+
disposable: z.z["boolean"]().nullish(),
|
|
52
|
+
first_name: z.z.string().nullish(),
|
|
53
|
+
deliverability: z.z.string().nullish(),
|
|
54
|
+
smtp_score: z.z.number().nullish(),
|
|
55
|
+
overall_score: z.z.number().nullish(),
|
|
56
|
+
catch_all: z.z["boolean"]().nullish(),
|
|
57
|
+
generic: z.z["boolean"]().nullish(),
|
|
58
|
+
common: z.z["boolean"]().nullish(),
|
|
59
|
+
dns_valid: z.z["boolean"]().nullish(),
|
|
60
|
+
honeypot: z.z["boolean"]().nullish(),
|
|
61
|
+
frequent_complainer: z.z["boolean"]().nullish(),
|
|
62
|
+
suspect: z.z["boolean"]().nullish(),
|
|
63
|
+
recent_abuse: z.z["boolean"]().nullish(),
|
|
64
|
+
fraud_score: z.z.number().min(0).max(100).nullish(),
|
|
65
|
+
leaked: z.z["boolean"]().nullish(),
|
|
66
|
+
suggested_domain: z.z.string().nullish(),
|
|
67
|
+
domain_velocity: z.z.string().nullish(),
|
|
68
|
+
user_activity: z.z.string().nullish(),
|
|
69
|
+
associated_names: z.z.object({
|
|
70
|
+
status: z.z.string().nullish(),
|
|
71
|
+
names: z.z.array(z.z.string()).nullish()
|
|
68
72
|
}).nullish(),
|
|
69
|
-
associated_phone_numbers:
|
|
70
|
-
status:
|
|
71
|
-
phone_numbers:
|
|
73
|
+
associated_phone_numbers: z.z.object({
|
|
74
|
+
status: z.z.string().nullish(),
|
|
75
|
+
phone_numbers: z.z.array(z.z.string()).nullish()
|
|
72
76
|
}).nullish(),
|
|
73
|
-
first_seen:
|
|
74
|
-
human:
|
|
75
|
-
timestamp:
|
|
76
|
-
iso:
|
|
77
|
+
first_seen: z.z.object({
|
|
78
|
+
human: z.z.string().nullish(),
|
|
79
|
+
timestamp: z.z.number().nullish(),
|
|
80
|
+
iso: z.z.string().nullish()
|
|
77
81
|
}).nullish(),
|
|
78
|
-
domain_age:
|
|
79
|
-
human:
|
|
80
|
-
timestamp:
|
|
81
|
-
iso:
|
|
82
|
+
domain_age: z.z.object({
|
|
83
|
+
human: z.z.string().nullish(),
|
|
84
|
+
timestamp: z.z.number().nullish(),
|
|
85
|
+
iso: z.z.string().nullish()
|
|
82
86
|
}).nullish(),
|
|
83
|
-
spam_trap_score:
|
|
84
|
-
sanitized_email:
|
|
85
|
-
});
|
|
86
|
-
var PhoneVerificationAnalysisResponse =
|
|
87
|
-
success:
|
|
88
|
-
request_id:
|
|
89
|
-
message:
|
|
90
|
-
formatted:
|
|
91
|
-
local_format:
|
|
92
|
-
valid:
|
|
93
|
-
fraud_score:
|
|
94
|
-
recent_abuse:
|
|
95
|
-
VOIP:
|
|
96
|
-
prepaid:
|
|
97
|
-
risky:
|
|
98
|
-
active:
|
|
99
|
-
name:
|
|
100
|
-
carrier:
|
|
101
|
-
line_type:
|
|
102
|
-
country:
|
|
103
|
-
region:
|
|
104
|
-
city:
|
|
105
|
-
timezone:
|
|
106
|
-
zip_code:
|
|
107
|
-
dialing_code:
|
|
108
|
-
do_not_call:
|
|
109
|
-
leaked:
|
|
110
|
-
spammer:
|
|
111
|
-
active_status:
|
|
112
|
-
user_activity:
|
|
113
|
-
associated_email_addresses:
|
|
114
|
-
status:
|
|
115
|
-
emails:
|
|
87
|
+
spam_trap_score: z.z.string().nullish(),
|
|
88
|
+
sanitized_email: z.z.string().nullish()
|
|
89
|
+
});
|
|
90
|
+
var PhoneVerificationAnalysisResponse = z.z.object({
|
|
91
|
+
success: z.z["boolean"](),
|
|
92
|
+
request_id: z.z.string(),
|
|
93
|
+
message: z.z.string().nullish(),
|
|
94
|
+
formatted: z.z.string().nullish(),
|
|
95
|
+
local_format: z.z.string().nullish(),
|
|
96
|
+
valid: z.z["boolean"]().nullish(),
|
|
97
|
+
fraud_score: z.z.number().min(0).max(100).nullish(),
|
|
98
|
+
recent_abuse: z.z["boolean"]().nullish(),
|
|
99
|
+
VOIP: z.z["boolean"]().nullish(),
|
|
100
|
+
prepaid: z.z["boolean"]().nullish(),
|
|
101
|
+
risky: z.z["boolean"]().nullish(),
|
|
102
|
+
active: z.z["boolean"]().nullish(),
|
|
103
|
+
name: z.z.string().nullish(),
|
|
104
|
+
carrier: z.z.string().nullish(),
|
|
105
|
+
line_type: z.z.string().nullish(),
|
|
106
|
+
country: z.z.string().nullish(),
|
|
107
|
+
region: z.z.string().nullish(),
|
|
108
|
+
city: z.z.string().nullish(),
|
|
109
|
+
timezone: z.z.string().nullish(),
|
|
110
|
+
zip_code: z.z.string().nullish(),
|
|
111
|
+
dialing_code: z.z.number().nullish(),
|
|
112
|
+
do_not_call: z.z["boolean"]().nullish(),
|
|
113
|
+
leaked: z.z["boolean"]().nullish(),
|
|
114
|
+
spammer: z.z["boolean"]().nullish(),
|
|
115
|
+
active_status: z.z.string().nullish(),
|
|
116
|
+
user_activity: z.z.string().nullish(),
|
|
117
|
+
associated_email_addresses: z.z.object({
|
|
118
|
+
status: z.z.string().nullish(),
|
|
119
|
+
emails: z.z.array(z.z.string()).nullish()
|
|
116
120
|
}).nullish()
|
|
117
121
|
});
|
|
118
|
-
var IpQualityServiceAnalysis =
|
|
122
|
+
var IpQualityServiceAnalysis = z.z.object({
|
|
119
123
|
ipVerification: IpQualityAnalysisResponse.nullish(),
|
|
120
124
|
emailVerification: EmailVerificationAnalysisResponse.nullish(),
|
|
121
125
|
phoneVerification: PhoneVerificationAnalysisResponse.nullish(),
|
|
122
|
-
error:
|
|
126
|
+
error: z.z.string().nullish()
|
|
123
127
|
});
|
|
124
|
-
var UNAUTHORIZED_KEY =
|
|
125
|
-
success:
|
|
126
|
-
message:
|
|
127
|
-
request_id:
|
|
128
|
+
var UNAUTHORIZED_KEY = z.z.object({
|
|
129
|
+
success: z.z["boolean"](),
|
|
130
|
+
message: z.z.literal("Invalid or unauthorized key. Please check the API key and try again."),
|
|
131
|
+
request_id: z.z.string()
|
|
128
132
|
});
|
|
129
|
-
var UNKNOWN_ERROR$2 =
|
|
130
|
-
error:
|
|
131
|
-
message:
|
|
133
|
+
var UNKNOWN_ERROR$2 = z.z.object({
|
|
134
|
+
error: z.z.literal("UNKNOWN_ERROR"),
|
|
135
|
+
message: z.z.string()
|
|
132
136
|
}).describe("This is a fallback error, if IPQualityScore parser fails");
|
|
133
|
-
var RESULT_PARSER_ERROR$2 =
|
|
134
|
-
error:
|
|
135
|
-
message:
|
|
136
|
-
data:
|
|
137
|
+
var RESULT_PARSER_ERROR$2 = z.z.object({
|
|
138
|
+
error: z.z.literal("RESULT_PARSER_ERROR"),
|
|
139
|
+
message: z.z.string(),
|
|
140
|
+
data: z.z.string()
|
|
137
141
|
}).describe("This is a fallback error, if zod parse fails on result");
|
|
138
|
-
var IpQualityServiceErrorResponse =
|
|
139
|
-
var WrappedIpQualityServiceErrorResponse =
|
|
142
|
+
var IpQualityServiceErrorResponse = z.z.union([UNAUTHORIZED_KEY, UNKNOWN_ERROR$2, RESULT_PARSER_ERROR$2]);
|
|
143
|
+
var WrappedIpQualityServiceErrorResponse = z.z.object({
|
|
140
144
|
error: IpQualityServiceErrorResponse
|
|
141
145
|
});
|
|
142
|
-
var IpQualityServiceAnalysisResponse =
|
|
146
|
+
var IpQualityServiceAnalysisResponse = z.z.union([WrappedIpQualityServiceErrorResponse, IpQualityServiceAnalysis]);
|
|
143
147
|
|
|
144
|
-
var BigCryptoChain =
|
|
148
|
+
var BigCryptoChain = z.z["enum"](["btc",
|
|
145
149
|
// Bitcoin
|
|
146
150
|
"eth",
|
|
147
151
|
// Ethereum
|
|
@@ -169,10 +173,10 @@ var BigCryptoChain = zod.z["enum"](["btc",
|
|
|
169
173
|
// Ethereum Classic
|
|
170
174
|
"bsc" // Binance Smart Chain
|
|
171
175
|
]);
|
|
172
|
-
var BigPropertiesLiteral = [
|
|
176
|
+
var BigPropertiesLiteral = [z.z.literal("score").describe("BitRank Verified®score for a public key hash of an address for your chosen cryptocurrency."), z.z.literal("entities").describe("Array of entity objects associated with the address."), z.z.literal("flags").describe("Array of flags associated with the address."), z.z.literal("currency").describe("The type of cryptocurrency being queried."), z.z.literal("new_address").describe("Boolean indicating if the address is new."), z.z.literal("flags_with_category").describe("Array of flag objects with categories associated with the address."), z.z.literal("cluster").describe("Object containing information about the cluster associated with the address."), z.z.literal("first_seen_receiving").describe("Timestamp of the first time the address received funds."), z.z.literal("first_seen_sending").describe("Timestamp of the first time the address sent funds."), z.z.literal("last_seen_receiving").describe("Timestamp of the last time the address received funds."), z.z.literal("last_seen_sending").describe("Timestamp of the last time the address sent funds."), z.z.literal("received_amount").describe("Total amount of cryptocurrency received by the address in Satoshis."), z.z.literal("sent_amount").describe("Total amount of cryptocurrency sent from the address in Satoshis."), z.z.literal("number_of_transactions").describe("Total number of transactions associated with the address."), z.z.literal("received_transactions").describe("Number of transactions where the address received funds."), z.z.literal("sent_transactions").describe("Number of transactions where the address sent funds."), z.z.literal("balance").describe("Balance of cryptocurrency at the address in Satoshis."), z.z.literal("balance_fiat").describe("Balance of cryptocurrency at the address in fiat currency (JPY, EUR, USD, CAD)."), z.z.literal("bitrank_counterparty_exposure").describe("Distribution of BitRank® scores by count and volume."), z.z.literal("entity_counterparty_exposure").describe("Distribution of entities by count and volume."), z.z.literal("flag_counterparty_exposure").describe("Distribution of flags by count and volume.")];
|
|
173
177
|
var BigProperties = ["score", "entities", "flags", "currency", "new_address", "flags_with_category", "cluster", "first_seen_receiving", "first_seen_sending", "last_seen_receiving", "last_seen_sending", "received_amount", "sent_amount", "number_of_transactions", "received_transactions", "sent_transactions", "balance", "balance_fiat", "bitrank_counterparty_exposure", "entity_counterparty_exposure", "flag_counterparty_exposure"];
|
|
174
|
-
var BigProperty =
|
|
175
|
-
var RequestProperty =
|
|
178
|
+
var BigProperty = z.z["enum"](BigProperties);
|
|
179
|
+
var RequestProperty = z.z.object({
|
|
176
180
|
property: BigProperty
|
|
177
181
|
}).describe("A comma-separated list of properties that will determine if the property is in the response.");
|
|
178
182
|
|
|
@@ -192,10 +196,10 @@ var BigCSErrorCodes = new Map([["INVALID_ADDRESS", "INVALID_PARAMETER_BLOCKCHAIN
|
|
|
192
196
|
* ```
|
|
193
197
|
*
|
|
194
198
|
*/
|
|
195
|
-
var BitRankRequest =
|
|
199
|
+
var BitRankRequest = z.z.object({
|
|
196
200
|
crypto: BigCryptoChain["default"]("eth").nullish(),
|
|
197
|
-
address:
|
|
198
|
-
properties:
|
|
201
|
+
address: z.z.string().nullish(),
|
|
202
|
+
properties: z.z.array(RequestProperty).describe("Optional query parameter to specify properties to include in the response.")["default"]([{
|
|
199
203
|
property: "score"
|
|
200
204
|
}, {
|
|
201
205
|
property: "entities"
|
|
@@ -206,337 +210,337 @@ var BitRankRequest = zod.z.object({
|
|
|
206
210
|
}, {
|
|
207
211
|
property: "new_address"
|
|
208
212
|
}]).nullish(),
|
|
209
|
-
label:
|
|
210
|
-
transactionsPerPage:
|
|
211
|
-
});
|
|
212
|
-
var BitRankVerified =
|
|
213
|
-
label:
|
|
214
|
-
currency:
|
|
215
|
-
new_address:
|
|
216
|
-
score:
|
|
217
|
-
entities:
|
|
218
|
-
label:
|
|
219
|
-
type:
|
|
213
|
+
label: z.z.string().max(255).optional().describe("Optional string of up to 255 characters for labeling the search.").nullish(),
|
|
214
|
+
transactionsPerPage: z.z.number().optional().describe("Optional parameter to specify the number of transactions per page in the response.").nullish()
|
|
215
|
+
});
|
|
216
|
+
var BitRankVerified = z.z.object({
|
|
217
|
+
label: z.z.string(),
|
|
218
|
+
currency: z.z.string(),
|
|
219
|
+
new_address: z.z["boolean"](),
|
|
220
|
+
score: z.z.number(),
|
|
221
|
+
entities: z.z.array(z.z.object({
|
|
222
|
+
label: z.z.string(),
|
|
223
|
+
type: z.z.string()
|
|
220
224
|
})),
|
|
221
|
-
flags:
|
|
222
|
-
flags_with_category:
|
|
223
|
-
name:
|
|
224
|
-
category:
|
|
225
|
+
flags: z.z.array(z.z.string()),
|
|
226
|
+
flags_with_category: z.z.array(z.z.object({
|
|
227
|
+
name: z.z.string(),
|
|
228
|
+
category: z.z.string()
|
|
225
229
|
})),
|
|
226
|
-
cluster:
|
|
227
|
-
cluster_name:
|
|
228
|
-
cluster_identifier:
|
|
229
|
-
number_of_addresses_in_cluster:
|
|
230
|
+
cluster: z.z.object({
|
|
231
|
+
cluster_name: z.z.string(),
|
|
232
|
+
cluster_identifier: z.z.number(),
|
|
233
|
+
number_of_addresses_in_cluster: z.z.number()
|
|
230
234
|
}),
|
|
231
|
-
first_seen_receiving:
|
|
232
|
-
first_seen_sending:
|
|
233
|
-
last_seen_receiving:
|
|
234
|
-
last_seen_sending:
|
|
235
|
-
received_amount:
|
|
236
|
-
sent_amount:
|
|
237
|
-
number_of_transactions:
|
|
238
|
-
received_transactions:
|
|
239
|
-
sent_transactions:
|
|
240
|
-
balance:
|
|
241
|
-
balance_fiat:
|
|
242
|
-
jpy:
|
|
243
|
-
eur:
|
|
244
|
-
usd:
|
|
245
|
-
cad:
|
|
235
|
+
first_seen_receiving: z.z.number(),
|
|
236
|
+
first_seen_sending: z.z.number(),
|
|
237
|
+
last_seen_receiving: z.z.number(),
|
|
238
|
+
last_seen_sending: z.z.number(),
|
|
239
|
+
received_amount: z.z.number(),
|
|
240
|
+
sent_amount: z.z.number(),
|
|
241
|
+
number_of_transactions: z.z.number(),
|
|
242
|
+
received_transactions: z.z.number(),
|
|
243
|
+
sent_transactions: z.z.number(),
|
|
244
|
+
balance: z.z.number(),
|
|
245
|
+
balance_fiat: z.z.object({
|
|
246
|
+
jpy: z.z.number(),
|
|
247
|
+
eur: z.z.number(),
|
|
248
|
+
usd: z.z.number(),
|
|
249
|
+
cad: z.z.number()
|
|
246
250
|
}),
|
|
247
|
-
bitrank_counterparty_exposure:
|
|
248
|
-
"in":
|
|
249
|
-
updatedAt:
|
|
250
|
-
totalVolume:
|
|
251
|
-
exposure:
|
|
252
|
-
min:
|
|
253
|
-
max:
|
|
254
|
-
count:
|
|
255
|
-
volume:
|
|
251
|
+
bitrank_counterparty_exposure: z.z.object({
|
|
252
|
+
"in": z.z.object({
|
|
253
|
+
updatedAt: z.z.number(),
|
|
254
|
+
totalVolume: z.z.number(),
|
|
255
|
+
exposure: z.z.array(z.z.object({
|
|
256
|
+
min: z.z.number(),
|
|
257
|
+
max: z.z.number(),
|
|
258
|
+
count: z.z.number(),
|
|
259
|
+
volume: z.z.number()
|
|
256
260
|
}))
|
|
257
261
|
}),
|
|
258
|
-
out:
|
|
259
|
-
updatedAt:
|
|
260
|
-
totalVolume:
|
|
261
|
-
exposure:
|
|
262
|
-
min:
|
|
263
|
-
max:
|
|
264
|
-
count:
|
|
265
|
-
volume:
|
|
262
|
+
out: z.z.object({
|
|
263
|
+
updatedAt: z.z.number(),
|
|
264
|
+
totalVolume: z.z.number(),
|
|
265
|
+
exposure: z.z.array(z.z.object({
|
|
266
|
+
min: z.z.number(),
|
|
267
|
+
max: z.z.number(),
|
|
268
|
+
count: z.z.number(),
|
|
269
|
+
volume: z.z.number()
|
|
266
270
|
}))
|
|
267
271
|
})
|
|
268
272
|
}),
|
|
269
|
-
entity_counterparty_exposure:
|
|
270
|
-
"in":
|
|
271
|
-
updatedAt:
|
|
272
|
-
totalVolume:
|
|
273
|
-
exposure:
|
|
274
|
-
name:
|
|
275
|
-
count:
|
|
276
|
-
volume:
|
|
273
|
+
entity_counterparty_exposure: z.z.object({
|
|
274
|
+
"in": z.z.object({
|
|
275
|
+
updatedAt: z.z.number(),
|
|
276
|
+
totalVolume: z.z.number(),
|
|
277
|
+
exposure: z.z.array(z.z.object({
|
|
278
|
+
name: z.z.string(),
|
|
279
|
+
count: z.z.number(),
|
|
280
|
+
volume: z.z.number()
|
|
277
281
|
}))
|
|
278
282
|
}),
|
|
279
|
-
out:
|
|
280
|
-
updatedAt:
|
|
281
|
-
totalVolume:
|
|
282
|
-
exposure:
|
|
283
|
-
name:
|
|
284
|
-
count:
|
|
285
|
-
volume:
|
|
283
|
+
out: z.z.object({
|
|
284
|
+
updatedAt: z.z.number(),
|
|
285
|
+
totalVolume: z.z.number(),
|
|
286
|
+
exposure: z.z.array(z.z.object({
|
|
287
|
+
name: z.z.string(),
|
|
288
|
+
count: z.z.number(),
|
|
289
|
+
volume: z.z.number()
|
|
286
290
|
}))
|
|
287
291
|
})
|
|
288
292
|
}),
|
|
289
|
-
flag_counterparty_exposure:
|
|
290
|
-
"in":
|
|
291
|
-
updatedAt:
|
|
292
|
-
totalVolume:
|
|
293
|
-
exposure:
|
|
294
|
-
name:
|
|
295
|
-
count:
|
|
296
|
-
volume:
|
|
293
|
+
flag_counterparty_exposure: z.z.object({
|
|
294
|
+
"in": z.z.object({
|
|
295
|
+
updatedAt: z.z.number(),
|
|
296
|
+
totalVolume: z.z.number(),
|
|
297
|
+
exposure: z.z.array(z.z.object({
|
|
298
|
+
name: z.z.string(),
|
|
299
|
+
count: z.z.number(),
|
|
300
|
+
volume: z.z.number()
|
|
297
301
|
}))
|
|
298
302
|
}),
|
|
299
|
-
out:
|
|
300
|
-
updatedAt:
|
|
301
|
-
totalVolume:
|
|
302
|
-
exposure:
|
|
303
|
-
name:
|
|
304
|
-
count:
|
|
305
|
-
volume:
|
|
303
|
+
out: z.z.object({
|
|
304
|
+
updatedAt: z.z.number(),
|
|
305
|
+
totalVolume: z.z.number(),
|
|
306
|
+
exposure: z.z.array(z.z.object({
|
|
307
|
+
name: z.z.string(),
|
|
308
|
+
count: z.z.number(),
|
|
309
|
+
volume: z.z.number()
|
|
306
310
|
}))
|
|
307
311
|
})
|
|
308
312
|
}),
|
|
309
|
-
transactions:
|
|
310
|
-
hash:
|
|
311
|
-
amount:
|
|
312
|
-
fees:
|
|
313
|
+
transactions: z.z.array(z.z.object({
|
|
314
|
+
hash: z.z.string(),
|
|
315
|
+
amount: z.z.number(),
|
|
316
|
+
fees: z.z.number()
|
|
313
317
|
}))
|
|
314
318
|
}).partial();
|
|
315
|
-
var INVALID_ADDRESS =
|
|
316
|
-
statusCode:
|
|
317
|
-
errorCode:
|
|
318
|
-
message:
|
|
319
|
-
});
|
|
320
|
-
var API_KEY_NOT_FOUND =
|
|
321
|
-
statusCode:
|
|
322
|
-
errorCode:
|
|
323
|
-
message:
|
|
324
|
-
});
|
|
325
|
-
var API_KEY_ARCHIVED =
|
|
326
|
-
statusCode:
|
|
327
|
-
errorCode:
|
|
328
|
-
message:
|
|
329
|
-
});
|
|
330
|
-
var API_KEY_DISABLED =
|
|
331
|
-
statusCode:
|
|
332
|
-
errorCode:
|
|
333
|
-
message:
|
|
334
|
-
});
|
|
335
|
-
var SOURCE_IP_NOT_EQ_API_KEY_IPS =
|
|
336
|
-
statusCode:
|
|
337
|
-
errorCode:
|
|
338
|
-
message:
|
|
339
|
-
});
|
|
340
|
-
var INTERNAL_SERVER_ERROR =
|
|
341
|
-
statusCode:
|
|
342
|
-
errorCode:
|
|
343
|
-
message:
|
|
344
|
-
});
|
|
345
|
-
var UNKNOWN_ERROR$1 =
|
|
346
|
-
statusCode:
|
|
347
|
-
errorCode:
|
|
348
|
-
message:
|
|
319
|
+
var INVALID_ADDRESS = z.z.object({
|
|
320
|
+
statusCode: z.z.literal(400),
|
|
321
|
+
errorCode: z.z.literal("INVALID_ADDRESS"),
|
|
322
|
+
message: z.z.literal("The address provided isn't a valid address.")
|
|
323
|
+
});
|
|
324
|
+
var API_KEY_NOT_FOUND = z.z.object({
|
|
325
|
+
statusCode: z.z.literal(401),
|
|
326
|
+
errorCode: z.z.literal("API_KEY_NOT_FOUND"),
|
|
327
|
+
message: z.z.literal("Your API key is not found.")
|
|
328
|
+
});
|
|
329
|
+
var API_KEY_ARCHIVED = z.z.object({
|
|
330
|
+
statusCode: z.z.literal(403),
|
|
331
|
+
errorCode: z.z.literal("API_KEY_ARCHIVED"),
|
|
332
|
+
message: z.z.literal("Your API key is archived.")
|
|
333
|
+
});
|
|
334
|
+
var API_KEY_DISABLED = z.z.object({
|
|
335
|
+
statusCode: z.z.literal(403),
|
|
336
|
+
errorCode: z.z.literal("API_KEY_DISABLED"),
|
|
337
|
+
message: z.z.literal("Your API key is disabled.")
|
|
338
|
+
});
|
|
339
|
+
var SOURCE_IP_NOT_EQ_API_KEY_IPS = z.z.object({
|
|
340
|
+
statusCode: z.z.literal(403),
|
|
341
|
+
errorCode: z.z.literal("SOURCE_IP_NOT_EQ_API_KEY_IPS"),
|
|
342
|
+
message: z.z.literal("Your source IP does not match the IPs for your API key.")
|
|
343
|
+
});
|
|
344
|
+
var INTERNAL_SERVER_ERROR = z.z.object({
|
|
345
|
+
statusCode: z.z.literal(500),
|
|
346
|
+
errorCode: z.z.literal("INTERNAL_SERVER_ERROR"),
|
|
347
|
+
message: z.z.literal("INTERNAL SERVER ERROR")
|
|
348
|
+
});
|
|
349
|
+
var UNKNOWN_ERROR$1 = z.z.object({
|
|
350
|
+
statusCode: z.z.literal(500),
|
|
351
|
+
errorCode: z.z.literal("UNKNOWN_ERROR"),
|
|
352
|
+
message: z.z.string()
|
|
349
353
|
}).describe("This is a fallback error, if bit rank parser fails");
|
|
350
|
-
var RESULT_PARSER_ERROR$1 =
|
|
351
|
-
statusCode:
|
|
352
|
-
errorCode:
|
|
353
|
-
message:
|
|
354
|
-
data:
|
|
354
|
+
var RESULT_PARSER_ERROR$1 = z.z.object({
|
|
355
|
+
statusCode: z.z.literal(500),
|
|
356
|
+
errorCode: z.z.literal("RESULT_PARSER_ERROR"),
|
|
357
|
+
message: z.z.string(),
|
|
358
|
+
data: z.z.string()
|
|
355
359
|
}).describe("This is a fallback error, if zod parse fails on result");
|
|
356
|
-
var BitRankVerifiedErrorResponse =
|
|
357
|
-
var BitRankVerifiedError =
|
|
360
|
+
var BitRankVerifiedErrorResponse = z.z.union([INVALID_ADDRESS, API_KEY_NOT_FOUND, API_KEY_ARCHIVED, API_KEY_DISABLED, SOURCE_IP_NOT_EQ_API_KEY_IPS, INTERNAL_SERVER_ERROR, UNKNOWN_ERROR$1, RESULT_PARSER_ERROR$1]);
|
|
361
|
+
var BitRankVerifiedError = z.z.object({
|
|
358
362
|
error: BitRankVerifiedErrorResponse
|
|
359
363
|
});
|
|
360
|
-
var BitRankVerifiedResponse =
|
|
364
|
+
var BitRankVerifiedResponse = z.z.union([BitRankVerifiedError, BitRankVerified]);
|
|
361
365
|
|
|
362
366
|
var Statuses = ["APPROVED", "SUBMISSION_REQUIRED", "RESUBMISSION_REQUIRED", "REJECTED", "PENDING_VERIFICATION"];
|
|
363
|
-
var Status$2 =
|
|
364
|
-
var WebhookPayload =
|
|
365
|
-
reason:
|
|
366
|
-
service:
|
|
367
|
-
session_id:
|
|
367
|
+
var Status$2 = z.z["enum"](Statuses);
|
|
368
|
+
var WebhookPayload = z.z.object({
|
|
369
|
+
reason: z.z.string(),
|
|
370
|
+
service: z.z.string(),
|
|
371
|
+
session_id: z.z.string(),
|
|
368
372
|
status: Status$2.optional().nullish(),
|
|
369
|
-
step_id:
|
|
373
|
+
step_id: z.z.string()
|
|
370
374
|
});
|
|
371
|
-
var NestedSession =
|
|
372
|
-
alias:
|
|
373
|
-
id:
|
|
375
|
+
var NestedSession = z.z.object({
|
|
376
|
+
alias: z.z.string(),
|
|
377
|
+
id: z.z.string(),
|
|
374
378
|
status: Status$2,
|
|
375
|
-
sandbox:
|
|
376
|
-
steps:
|
|
377
|
-
id:
|
|
379
|
+
sandbox: z.z["boolean"](),
|
|
380
|
+
steps: z.z.array(z.z.object({
|
|
381
|
+
id: z.z.string(),
|
|
378
382
|
status: Status$2,
|
|
379
|
-
type:
|
|
383
|
+
type: z.z.string()
|
|
380
384
|
}))
|
|
381
385
|
});
|
|
382
|
-
var Session =
|
|
383
|
-
app:
|
|
384
|
-
name:
|
|
385
|
-
id:
|
|
386
|
+
var Session = z.z.object({
|
|
387
|
+
app: z.z.object({
|
|
388
|
+
name: z.z.string(),
|
|
389
|
+
id: z.z.string()
|
|
386
390
|
}),
|
|
387
391
|
session: NestedSession
|
|
388
392
|
});
|
|
389
|
-
var SessionWithoutSteps =
|
|
390
|
-
app:
|
|
391
|
-
name:
|
|
392
|
-
id:
|
|
393
|
+
var SessionWithoutSteps = z.z.object({
|
|
394
|
+
app: z.z.object({
|
|
395
|
+
name: z.z.string(),
|
|
396
|
+
id: z.z.string()
|
|
393
397
|
}),
|
|
394
398
|
session: NestedSession.omit({
|
|
395
399
|
steps: true
|
|
396
400
|
})
|
|
397
401
|
});
|
|
398
402
|
var StepTypes = ["ID_DOCUMENT", "LIVENESS", "PROOF_OF_ADDRESS", "PHONE", "EMAIL"];
|
|
399
|
-
var StepType =
|
|
403
|
+
var StepType = z.z["enum"](StepTypes);
|
|
400
404
|
var ReasonCodes = ["FORGED_REJECTION", "DOCUMENT_HIDDEN", "BAD_ENVIRONMENT", "BLACK_WHITE_PICTURE", "BAD_QUALITY", "DOCUMENT_COMPLIANCE", "IDENTITY_DOCUMENT_EXPIRED", "DOCUMENT_INVALID_FRONT_SIDE", "DOCUMENT_INVALID_BACK_SIDE", "IDENTITY_DOCUMENT_DOB_DATE_MINOR", "RESTRICTED_NATIONALITY_TYPE", "DUPLICATE_USER", ""];
|
|
401
|
-
var ReasonCode =
|
|
402
|
-
var File$1 =
|
|
403
|
-
url:
|
|
404
|
-
type:
|
|
405
|
-
size:
|
|
406
|
-
base64:
|
|
405
|
+
var ReasonCode = z.z["enum"](ReasonCodes);
|
|
406
|
+
var File$1 = z.z.object({
|
|
407
|
+
url: z.z.string(),
|
|
408
|
+
type: z.z.string(),
|
|
409
|
+
size: z.z.number(),
|
|
410
|
+
base64: z.z.string().nullish()
|
|
407
411
|
});
|
|
408
412
|
var DocumentIdTypes = ["PASSPORT", "NATIONAL_ID", "DRIVER_LICENSE", "RESIDENT_PERMIT", ""];
|
|
409
|
-
var DocumentIdType =
|
|
410
|
-
var DocumentIdMetadata =
|
|
411
|
-
country:
|
|
413
|
+
var DocumentIdType = z.z["enum"](DocumentIdTypes);
|
|
414
|
+
var DocumentIdMetadata = z.z.object({
|
|
415
|
+
country: z.z.string(),
|
|
412
416
|
type: DocumentIdType,
|
|
413
|
-
fields:
|
|
414
|
-
firstname:
|
|
415
|
-
lastname:
|
|
416
|
-
birth_date:
|
|
417
|
-
document_expiration:
|
|
418
|
-
document_number:
|
|
419
|
-
nationality:
|
|
417
|
+
fields: z.z.object({
|
|
418
|
+
firstname: z.z.string(),
|
|
419
|
+
lastname: z.z.string(),
|
|
420
|
+
birth_date: z.z.string(),
|
|
421
|
+
document_expiration: z.z.string(),
|
|
422
|
+
document_number: z.z.string(),
|
|
423
|
+
nationality: z.z.string()
|
|
420
424
|
}),
|
|
421
|
-
files:
|
|
425
|
+
files: z.z.object({
|
|
422
426
|
front: File$1.nullish(),
|
|
423
427
|
back: File$1.nullish(),
|
|
424
428
|
face: File$1.nullish()
|
|
425
429
|
}),
|
|
426
|
-
original_files:
|
|
430
|
+
original_files: z.z.object({
|
|
427
431
|
front: File$1.nullish(),
|
|
428
432
|
back: File$1.nullish()
|
|
429
433
|
})
|
|
430
434
|
});
|
|
431
435
|
var ProofOfAddressDocumentTypes = ["ELECTRICITY_BILL", "INTERNET_BILL", "LANDLINE_BILL", "WATER_BILL", "GAS_BILL", "BANK_STATEMENT"];
|
|
432
|
-
var ProofOfAddressDocumentType =
|
|
433
|
-
var ProofOfAddressMetadata =
|
|
434
|
-
country:
|
|
436
|
+
var ProofOfAddressDocumentType = z.z["enum"](ProofOfAddressDocumentTypes);
|
|
437
|
+
var ProofOfAddressMetadata = z.z.object({
|
|
438
|
+
country: z.z.string(),
|
|
435
439
|
type: ProofOfAddressDocumentType,
|
|
436
|
-
host_id_document:
|
|
437
|
-
files:
|
|
440
|
+
host_id_document: z.z.object({}),
|
|
441
|
+
files: z.z.object({
|
|
438
442
|
proof: File$1.nullish(),
|
|
439
443
|
accomodation: File$1.nullish()
|
|
440
444
|
}),
|
|
441
|
-
original_files:
|
|
445
|
+
original_files: z.z.object({
|
|
442
446
|
proof: File$1.nullish(),
|
|
443
447
|
accomodation: File$1.nullish()
|
|
444
448
|
}),
|
|
445
|
-
fields:
|
|
446
|
-
address:
|
|
447
|
-
city:
|
|
448
|
-
zipcode:
|
|
449
|
-
issuing_date:
|
|
449
|
+
fields: z.z.object({
|
|
450
|
+
address: z.z.string(),
|
|
451
|
+
city: z.z.string(),
|
|
452
|
+
zipcode: z.z.string(),
|
|
453
|
+
issuing_date: z.z.string()
|
|
450
454
|
})
|
|
451
455
|
});
|
|
452
|
-
var LivenessMetadata =
|
|
453
|
-
liveness:
|
|
456
|
+
var LivenessMetadata = z.z.object({
|
|
457
|
+
liveness: z.z.object({
|
|
454
458
|
file: File$1
|
|
455
459
|
})
|
|
456
460
|
});
|
|
457
|
-
var PhoneMetadata =
|
|
458
|
-
phone:
|
|
459
|
-
number:
|
|
460
|
-
calling_code:
|
|
461
|
-
method:
|
|
462
|
-
country:
|
|
461
|
+
var PhoneMetadata = z.z.object({
|
|
462
|
+
phone: z.z.object({
|
|
463
|
+
number: z.z.string(),
|
|
464
|
+
calling_code: z.z.string(),
|
|
465
|
+
method: z.z.string(),
|
|
466
|
+
country: z.z.string()
|
|
463
467
|
})
|
|
464
468
|
});
|
|
465
|
-
var EmailMetadata =
|
|
466
|
-
email:
|
|
467
|
-
value:
|
|
469
|
+
var EmailMetadata = z.z.object({
|
|
470
|
+
email: z.z.object({
|
|
471
|
+
value: z.z.string().email()
|
|
468
472
|
})
|
|
469
473
|
});
|
|
470
|
-
var AMLMetadata =
|
|
471
|
-
aml:
|
|
472
|
-
customer_info:
|
|
473
|
-
firstname:
|
|
474
|
-
lastname:
|
|
475
|
-
birth_date:
|
|
476
|
-
nationality:
|
|
477
|
-
country:
|
|
474
|
+
var AMLMetadata = z.z.object({
|
|
475
|
+
aml: z.z.object({
|
|
476
|
+
customer_info: z.z.object({
|
|
477
|
+
firstname: z.z.string(),
|
|
478
|
+
lastname: z.z.string(),
|
|
479
|
+
birth_date: z.z.string(),
|
|
480
|
+
nationality: z.z.string(),
|
|
481
|
+
country: z.z.string()
|
|
478
482
|
}),
|
|
479
|
-
hits:
|
|
480
|
-
fields:
|
|
481
|
-
aliases:
|
|
482
|
-
media:
|
|
483
|
-
date:
|
|
484
|
-
snippet:
|
|
485
|
-
title:
|
|
486
|
-
url:
|
|
483
|
+
hits: z.z.array(z.z.object({
|
|
484
|
+
fields: z.z.array(z.z.unknown()),
|
|
485
|
+
aliases: z.z.array(z.z.string()),
|
|
486
|
+
media: z.z.array(z.z.object({
|
|
487
|
+
date: z.z.string(),
|
|
488
|
+
snippet: z.z.string(),
|
|
489
|
+
title: z.z.string(),
|
|
490
|
+
url: z.z.string()
|
|
487
491
|
})),
|
|
488
|
-
info:
|
|
489
|
-
full_name:
|
|
490
|
-
birth_date:
|
|
491
|
-
nationality:
|
|
492
|
+
info: z.z.object({
|
|
493
|
+
full_name: z.z.string(),
|
|
494
|
+
birth_date: z.z.string(),
|
|
495
|
+
nationality: z.z.string()
|
|
492
496
|
}),
|
|
493
|
-
type:
|
|
497
|
+
type: z.z.array(z.z.string())
|
|
494
498
|
})),
|
|
495
|
-
total_hits:
|
|
496
|
-
action_required:
|
|
497
|
-
monitored:
|
|
499
|
+
total_hits: z.z.number(),
|
|
500
|
+
action_required: z.z["boolean"](),
|
|
501
|
+
monitored: z.z["boolean"]()
|
|
498
502
|
})
|
|
499
503
|
});
|
|
500
|
-
var Step =
|
|
501
|
-
id:
|
|
504
|
+
var Step = z.z.object({
|
|
505
|
+
id: z.z.string(),
|
|
502
506
|
type: StepType,
|
|
503
|
-
metadata:
|
|
504
|
-
ip:
|
|
505
|
-
user_agent:
|
|
506
|
-
platform:
|
|
507
|
-
browser_name:
|
|
508
|
-
browser_version:
|
|
509
|
-
device:
|
|
510
|
-
customer_language:
|
|
507
|
+
metadata: z.z.object({
|
|
508
|
+
ip: z.z.string(),
|
|
509
|
+
user_agent: z.z.string(),
|
|
510
|
+
platform: z.z.string(),
|
|
511
|
+
browser_name: z.z.string(),
|
|
512
|
+
browser_version: z.z.string(),
|
|
513
|
+
device: z.z.string(),
|
|
514
|
+
customer_language: z.z.string()
|
|
511
515
|
}),
|
|
512
516
|
status: Status$2,
|
|
513
|
-
reason:
|
|
517
|
+
reason: z.z.object({
|
|
514
518
|
code: ReasonCode,
|
|
515
|
-
message:
|
|
516
|
-
original:
|
|
517
|
-
translated:
|
|
519
|
+
message: z.z.object({
|
|
520
|
+
original: z.z.string(),
|
|
521
|
+
translated: z.z.string()
|
|
518
522
|
})
|
|
519
523
|
}).nullish(),
|
|
520
|
-
document:
|
|
521
|
-
verification:
|
|
524
|
+
document: z.z.union([DocumentIdMetadata, ProofOfAddressMetadata]).nullish(),
|
|
525
|
+
verification: z.z.union([LivenessMetadata, PhoneMetadata, EmailMetadata, AMLMetadata]).nullish()
|
|
522
526
|
});
|
|
523
|
-
var SynapsSessionEvent =
|
|
527
|
+
var SynapsSessionEvent = z.z.object({
|
|
524
528
|
status: Status$2,
|
|
525
|
-
alias:
|
|
526
|
-
sandbox:
|
|
529
|
+
alias: z.z.string(),
|
|
530
|
+
sandbox: z.z["boolean"]()
|
|
527
531
|
});
|
|
528
|
-
var SynapsStepEvent =
|
|
532
|
+
var SynapsStepEvent = z.z.object({
|
|
529
533
|
status: Status$2,
|
|
530
534
|
type: StepType,
|
|
531
|
-
sandbox:
|
|
532
|
-
metadata:
|
|
533
|
-
ip:
|
|
534
|
-
user_agent:
|
|
535
|
-
platform:
|
|
536
|
-
browser_name:
|
|
537
|
-
browser_version:
|
|
538
|
-
device:
|
|
539
|
-
customer_language:
|
|
535
|
+
sandbox: z.z["boolean"](),
|
|
536
|
+
metadata: z.z.object({
|
|
537
|
+
ip: z.z.string(),
|
|
538
|
+
user_agent: z.z.string(),
|
|
539
|
+
platform: z.z.string(),
|
|
540
|
+
browser_name: z.z.string(),
|
|
541
|
+
browser_version: z.z.string(),
|
|
542
|
+
device: z.z.string(),
|
|
543
|
+
customer_language: z.z.string()
|
|
540
544
|
})
|
|
541
545
|
});
|
|
542
546
|
var typeToHumanReadable = function typeToHumanReadable(type) {
|
|
@@ -555,48 +559,48 @@ var typeToHumanReadable = function typeToHumanReadable(type) {
|
|
|
555
559
|
return type;
|
|
556
560
|
}
|
|
557
561
|
};
|
|
558
|
-
var SynapsSessionRequest =
|
|
559
|
-
sessionId:
|
|
562
|
+
var SynapsSessionRequest = z.z.object({
|
|
563
|
+
sessionId: z.z.string()
|
|
560
564
|
});
|
|
561
|
-
var SESSION_NOT_FOUND =
|
|
562
|
-
code:
|
|
563
|
-
message:
|
|
565
|
+
var SESSION_NOT_FOUND = z.z.object({
|
|
566
|
+
code: z.z.number(),
|
|
567
|
+
message: z.z.literal("This session is not found")
|
|
564
568
|
});
|
|
565
|
-
var UNKNOWN_ERROR =
|
|
566
|
-
code:
|
|
567
|
-
message:
|
|
569
|
+
var UNKNOWN_ERROR = z.z.object({
|
|
570
|
+
code: z.z.literal(1),
|
|
571
|
+
message: z.z.literal("Synaps unknown error")
|
|
568
572
|
}).describe("This is a fallback error, if synaps parser fails");
|
|
569
|
-
var RESULT_PARSER_ERROR =
|
|
570
|
-
code:
|
|
571
|
-
message:
|
|
572
|
-
data:
|
|
573
|
+
var RESULT_PARSER_ERROR = z.z.object({
|
|
574
|
+
code: z.z.literal(2),
|
|
575
|
+
message: z.z.string(),
|
|
576
|
+
data: z.z.string()
|
|
573
577
|
}).describe("This is a fallback error, if zod parse fails on result");
|
|
574
|
-
var SynapsSessionErrorResponse =
|
|
575
|
-
var SynapsSessionResponse =
|
|
576
|
-
success:
|
|
578
|
+
var SynapsSessionErrorResponse = z.z.union([SESSION_NOT_FOUND, UNKNOWN_ERROR, RESULT_PARSER_ERROR]);
|
|
579
|
+
var SynapsSessionResponse = z.z.union([z.z.object({
|
|
580
|
+
success: z.z.literal(true),
|
|
577
581
|
data: Session
|
|
578
|
-
}),
|
|
579
|
-
success:
|
|
582
|
+
}), z.z.object({
|
|
583
|
+
success: z.z.literal(false),
|
|
580
584
|
error: SynapsSessionErrorResponse
|
|
581
585
|
})]);
|
|
582
|
-
var SynapsStepRequest =
|
|
583
|
-
sessionId:
|
|
584
|
-
stepId:
|
|
586
|
+
var SynapsStepRequest = z.z.object({
|
|
587
|
+
sessionId: z.z.string(),
|
|
588
|
+
stepId: z.z.string()
|
|
585
589
|
});
|
|
586
|
-
var STEP_NOT_FOUND =
|
|
587
|
-
code:
|
|
588
|
-
message:
|
|
590
|
+
var STEP_NOT_FOUND = z.z.object({
|
|
591
|
+
code: z.z.number(),
|
|
592
|
+
message: z.z.literal("This step ID is invalid")
|
|
589
593
|
});
|
|
590
|
-
var SynapsStepErrorResponse =
|
|
591
|
-
var SynapsStepResponse =
|
|
592
|
-
success:
|
|
594
|
+
var SynapsStepErrorResponse = z.z.union([STEP_NOT_FOUND, UNKNOWN_ERROR, RESULT_PARSER_ERROR]);
|
|
595
|
+
var SynapsStepResponse = z.z.union([z.z.object({
|
|
596
|
+
success: z.z.literal(true),
|
|
593
597
|
data: Step
|
|
594
|
-
}),
|
|
595
|
-
success:
|
|
598
|
+
}), z.z.object({
|
|
599
|
+
success: z.z.literal(false),
|
|
596
600
|
error: SynapsStepErrorResponse
|
|
597
601
|
})]);
|
|
598
602
|
|
|
599
|
-
var CoerceDateUTC =
|
|
603
|
+
var CoerceDateUTC = z.z.preprocess(function (value) {
|
|
600
604
|
if (value === null || value === undefined) return undefined;
|
|
601
605
|
if (value instanceof Date) {
|
|
602
606
|
return value;
|
|
@@ -611,17 +615,17 @@ var CoerceDateUTC = zod.z.preprocess(function (value) {
|
|
|
611
615
|
}
|
|
612
616
|
return undefined; // Invalid input type
|
|
613
617
|
// without forcing this ... errors between type and schema can occur.
|
|
614
|
-
},
|
|
618
|
+
}, z.z.date());
|
|
615
619
|
var SEARCH_FILTER_SANCTION_TYPE = ["sanction", "warning", "fitness-probity"];
|
|
616
|
-
var SearchFilterSanctionType =
|
|
620
|
+
var SearchFilterSanctionType = z.z["enum"](SEARCH_FILTER_SANCTION_TYPE);
|
|
617
621
|
var SEARCH_FILTER_PEP_TYPE = ["pep", "pep-class-1", "pep-class-2", "pep-class-3", "pep-class-4"];
|
|
618
|
-
var SearchFilterPepType =
|
|
622
|
+
var SearchFilterPepType = z.z["enum"](SEARCH_FILTER_PEP_TYPE);
|
|
619
623
|
var SEARCH_FILTER_ADVERSE_MEDIA_TYPE = ["adverse-media", "adverse-media-financial-crime", "adverse-media-violent-crime", "adverse-media-sexual-crime", "adverse-media-terrorism", "adverse-media-fraud", "adverse-media-narcotics", "adverse-media-general", "adverse-media-v2-property", "adverse-media-v2-financial-aml-cft", "adverse-media-v2-fraud-linked", "adverse-media-v2-narcotics-aml-cft", "adverse-media-v2-violence-aml-cft", "adverse-media-v2-terrorism", "adverse-media-v2-cybercrime", "adverse-media-v2-general-aml-cft", "adverse-media-v2-regulatory", "adverse-media-v2-financial-difficulty", "adverse-media-v2-violence-non-aml-cft", "adverse-media-v2-other-financial", "adverse-media-v2-other-serious", "adverse-media-v2-other-minor"];
|
|
620
|
-
var SearchFilterAdverseMediaType =
|
|
624
|
+
var SearchFilterAdverseMediaType = z.z["enum"](SEARCH_FILTER_ADVERSE_MEDIA_TYPE);
|
|
621
625
|
var HIGH_RISK_TYPES = ["sanction", "pep", "pep-class-1", "pep-class-2", "pep-class-3", "pep-class-4"];
|
|
622
626
|
var MEDIUM_RISK_TYPES = ["adverse-media-financial-crime", "adverse-media-violent-crime", "adverse-media-sexual-crime", "adverse-media-terrorism", "adverse-media-fraud", "adverse-media-narcotics", "adverse-media-general", "adverse-media-v2-financial-aml-cft", "adverse-media-v2-fraud-linked", "adverse-media-v2-narcotics-aml-cft", "adverse-media-v2-violence-aml-cft", "adverse-media-v2-terrorism", "adverse-media-v2-cybercrime", "adverse-media-v2-general-aml-cft", "adverse-media-v2-regulatory", "adverse-media-v2-other-financial", "adverse-media-v2-other-serious"];
|
|
623
627
|
var COMPLY_ADVANTAGE_RESPONSE_MATCH_TYPE = ["name_exact", "aka_exact", "name_fuzzy", "aka_fuzzy", "phonetic_name", "phonetic_aka", "equivalent_name", "equivalent_aka", "unknown", "year_of_birth", "removed_personal_title", "removed_personal_suffix", "removed_organisation_prefix", "removed_organisation_suffix", "removed_clerical_mark"];
|
|
624
|
-
var ComplyAdvantageResponseMatchType =
|
|
628
|
+
var ComplyAdvantageResponseMatchType = z.z["enum"](COMPLY_ADVANTAGE_RESPONSE_MATCH_TYPE);
|
|
625
629
|
var mappingMatchTypeToLabel = {
|
|
626
630
|
name_exact: "Name Exact",
|
|
627
631
|
aka_exact: "Aka Exact",
|
|
@@ -640,353 +644,353 @@ var mappingMatchTypeToLabel = {
|
|
|
640
644
|
removed_clerical_mark: "Removed Clerical Mark"
|
|
641
645
|
};
|
|
642
646
|
var COMPLY_ADVANTAGE_RESPONSE_MATCH_STATUS = ["no_match", "false_positive", "potential_match", "true_positive", "unknown", "true_positive_approve", "true_positive_reject"];
|
|
643
|
-
var ComplyAdvantageReponseMatchStatus =
|
|
647
|
+
var ComplyAdvantageReponseMatchStatus = z.z["enum"](COMPLY_ADVANTAGE_RESPONSE_MATCH_STATUS);
|
|
644
648
|
var SEARCH_FILTER_TYPES = [].concat(SEARCH_FILTER_SANCTION_TYPE, SEARCH_FILTER_PEP_TYPE, SEARCH_FILTER_ADVERSE_MEDIA_TYPE);
|
|
645
|
-
var SearchFilterType =
|
|
649
|
+
var SearchFilterType = z.z["enum"](SEARCH_FILTER_TYPES);
|
|
646
650
|
var SearchEntityTypes = ["person", "company", "organisation", "vessel", "aircraft"];
|
|
647
|
-
var SearchEntityType =
|
|
648
|
-
var SearchFilters =
|
|
649
|
-
types:
|
|
650
|
-
birth_year:
|
|
651
|
-
remove_deceased:
|
|
651
|
+
var SearchEntityType = z.z["enum"](SearchEntityTypes);
|
|
652
|
+
var SearchFilters = z.z.object({
|
|
653
|
+
types: z.z.array(SearchFilterType).nullish(),
|
|
654
|
+
birth_year: z.z.number().nullish(),
|
|
655
|
+
remove_deceased: z.z.number().min(0).max(1).nullish(),
|
|
652
656
|
entity_type: SearchEntityType.nullish(),
|
|
653
|
-
country_codes:
|
|
657
|
+
country_codes: z.z.array(vault_schema.Alpha2Country).nullish()
|
|
654
658
|
});
|
|
655
659
|
var COMPLY_ADVANTAGE_NATIONALITY_FIELD_SOURCES = ["complyadvantage", "north-atlantic-treaty-organisation", "complyadvantage-adverse-media"];
|
|
656
|
-
var ComplyAdvantageNationalityFieldSources =
|
|
660
|
+
var ComplyAdvantageNationalityFieldSources = z.z["enum"](SearchEntityTypes);
|
|
657
661
|
var COMPLY_ADVANTAGE_COUNTRY_FIELD_SOURCES = ["Belarus", "complyadvantage-adverse-media", "company-am", "complyadvantage-adverse-media", "iran-ministry-of-foreign-affairs-sanctions-list", "complyadvantage-adverse-media"];
|
|
658
|
-
var ComplyAdvantageCountryFieldSources =
|
|
662
|
+
var ComplyAdvantageCountryFieldSources = z.z["enum"](COMPLY_ADVANTAGE_COUNTRY_FIELD_SOURCES);
|
|
659
663
|
var COMPLY_ADVANTAGE_DATE_OF_BIRTH_FIELD_SOURCES = ["complyadvantage", "complyadvantage-adverse-media"];
|
|
660
|
-
var ComplyAdvantageDateOfBirthFieldSources =
|
|
664
|
+
var ComplyAdvantageDateOfBirthFieldSources = z.z["enum"](COMPLY_ADVANTAGE_DATE_OF_BIRTH_FIELD_SOURCES);
|
|
661
665
|
// https://docs.complyadvantage.com/api-docs#creating-searches
|
|
662
|
-
var CreateSearchInput =
|
|
663
|
-
search_term:
|
|
664
|
-
client_ref:
|
|
665
|
-
search_profile:
|
|
666
|
-
fuzziness:
|
|
667
|
-
offset:
|
|
668
|
-
limit:
|
|
666
|
+
var CreateSearchInput = z.z.object({
|
|
667
|
+
search_term: z.z.string().describe("represents name of the entity"),
|
|
668
|
+
client_ref: z.z.string().describe("Your reference for this person/entity for which you are searching. Used for tracking searches and auto-whitelisting recurring results"),
|
|
669
|
+
search_profile: z.z.string().nullish().describe("The Profile ID of a search profile that can be retrieved from the UI"),
|
|
670
|
+
fuzziness: z.z.number().min(0.0).max(1.0).nullish().describe("determines how closely the returned results must match the supplied name. Overridden by exact_match"),
|
|
671
|
+
offset: z.z.number().nullish().describe("match results from the database, starting form the offset value"),
|
|
672
|
+
limit: z.z.number().nullish().describe("math results from the database, taking up this many matches each search"),
|
|
669
673
|
filters: SearchFilters.optional().describe("specify filters within the search to narrow down the results"),
|
|
670
|
-
tags:
|
|
671
|
-
share_url:
|
|
672
|
-
exact_match:
|
|
674
|
+
tags: z.z.array(z.z.record(z.z.string(), z.z.string())).nullish().describe("name => value pairs, to search later using defined tags here"),
|
|
675
|
+
share_url: z.z.number().min(0).max(1).nullish().describe("include a shareable URL to access search publicly"),
|
|
676
|
+
exact_match: z.z["boolean"]().nullish().describe("Exact match disables all standard and optional matching behaviours (Honorifics, affixes, initials, glued name, name variation, equivalent names, extra words in entity,...) 0% fuzziness disables 1 letter typo matching but keeps all other matching behaviours (standard and optional)")
|
|
673
677
|
});
|
|
674
678
|
var MatchStatuses = ["unknown", "no_match", "potential_match", "false_positive", "true_positive", "true_positive_approve", "true_positive_reject"];
|
|
675
|
-
var MatchStatus =
|
|
679
|
+
var MatchStatus = z.z["enum"](MatchStatuses);
|
|
676
680
|
var RiskLevels = ["low", "medium", "high", "unknown"];
|
|
677
|
-
var RiskLevel =
|
|
681
|
+
var RiskLevel = z.z["enum"](RiskLevels);
|
|
678
682
|
// https://docs.complyadvantage.com/api-docs/#updating-searches
|
|
679
|
-
var UpdateSearchInput =
|
|
683
|
+
var UpdateSearchInput = z.z.object({
|
|
680
684
|
match_status: MatchStatus.optional(),
|
|
681
685
|
risk_level: RiskLevel.optional(),
|
|
682
|
-
assignee_id:
|
|
683
|
-
limit:
|
|
684
|
-
tags:
|
|
686
|
+
assignee_id: z.z.string().optional().describe("the ID of the user to whom the case should be assigned"),
|
|
687
|
+
limit: z.z.number().optional().describe("the number of matches retrieved (max. 100)"),
|
|
688
|
+
tags: z.z.array(z.z.record(z.z.string(), z.z.string())).optional().describe("object of name => value pairs, must be existing tags")
|
|
685
689
|
});
|
|
686
|
-
var UpdateSearchEntitiesInput =
|
|
687
|
-
entities:
|
|
690
|
+
var UpdateSearchEntitiesInput = z.z.object({
|
|
691
|
+
entities: z.z.array(z.z.string()).min(1).describe("array of entity ids to be updated"),
|
|
688
692
|
match_status: MatchStatus.optional(),
|
|
689
693
|
risk_level: RiskLevel.optional(),
|
|
690
|
-
is_whitelisted:
|
|
694
|
+
is_whitelisted: z.z["boolean"]().optional()
|
|
691
695
|
});
|
|
692
|
-
var ComplyAdvantageUser =
|
|
693
|
-
id:
|
|
694
|
-
email:
|
|
695
|
-
name:
|
|
696
|
-
phone:
|
|
696
|
+
var ComplyAdvantageUser = z.z.object({
|
|
697
|
+
id: z.z.number(),
|
|
698
|
+
email: z.z.string().email(),
|
|
699
|
+
name: z.z.string(),
|
|
700
|
+
phone: z.z.string(),
|
|
697
701
|
created_at: CoerceDateUTC,
|
|
698
|
-
user_is_active:
|
|
699
|
-
});
|
|
700
|
-
var MatchTypeDetail =
|
|
701
|
-
aml_types:
|
|
702
|
-
matching_name:
|
|
703
|
-
name_matches:
|
|
704
|
-
match_types:
|
|
705
|
-
query_term:
|
|
702
|
+
user_is_active: z.z["boolean"]()
|
|
703
|
+
});
|
|
704
|
+
var MatchTypeDetail = z.z.object({
|
|
705
|
+
aml_types: z.z.array(z.z.string()),
|
|
706
|
+
matching_name: z.z.string(),
|
|
707
|
+
name_matches: z.z.array(z.z.object({
|
|
708
|
+
match_types: z.z.array(z.z.string()),
|
|
709
|
+
query_term: z.z.string()
|
|
706
710
|
})),
|
|
707
|
-
secondary_matches:
|
|
708
|
-
sources:
|
|
711
|
+
secondary_matches: z.z.array(z.z.unknown()),
|
|
712
|
+
sources: z.z.array(z.z.string())
|
|
709
713
|
});
|
|
710
|
-
var ComplyAdvantageMedia =
|
|
714
|
+
var ComplyAdvantageMedia = z.z.array(z.z.object({
|
|
711
715
|
date: CoerceDateUTC.optional(),
|
|
712
|
-
snippet:
|
|
713
|
-
title:
|
|
714
|
-
url:
|
|
716
|
+
snippet: z.z.string(),
|
|
717
|
+
title: z.z.string(),
|
|
718
|
+
url: z.z.string().url()
|
|
715
719
|
}));
|
|
716
|
-
var ComplyAdvantageSearchDataResponseHit =
|
|
717
|
-
doc:
|
|
718
|
-
id:
|
|
720
|
+
var ComplyAdvantageSearchDataResponseHit = z.z.object({
|
|
721
|
+
doc: z.z.object({
|
|
722
|
+
id: z.z.string(),
|
|
719
723
|
last_updated_utc: CoerceDateUTC,
|
|
720
724
|
created_utc: CoerceDateUTC,
|
|
721
|
-
fields:
|
|
722
|
-
name:
|
|
723
|
-
source:
|
|
724
|
-
value:
|
|
725
|
-
locale:
|
|
726
|
-
tag:
|
|
725
|
+
fields: z.z.array(z.z.object({
|
|
726
|
+
name: z.z.string(),
|
|
727
|
+
source: z.z.string().optional(),
|
|
728
|
+
value: z.z.string(),
|
|
729
|
+
locale: z.z.string().optional(),
|
|
730
|
+
tag: z.z.string().optional()
|
|
727
731
|
})).optional(),
|
|
728
|
-
types:
|
|
729
|
-
name:
|
|
732
|
+
types: z.z.array(SearchFilterType),
|
|
733
|
+
name: z.z.string(),
|
|
730
734
|
entity_type: SearchEntityType,
|
|
731
|
-
aka:
|
|
732
|
-
name:
|
|
735
|
+
aka: z.z.array(z.z.object({
|
|
736
|
+
name: z.z.string()
|
|
733
737
|
})),
|
|
734
|
-
associates:
|
|
735
|
-
association:
|
|
736
|
-
name:
|
|
738
|
+
associates: z.z.array(z.z.object({
|
|
739
|
+
association: z.z.string(),
|
|
740
|
+
name: z.z.string()
|
|
737
741
|
})).optional(),
|
|
738
|
-
sources:
|
|
739
|
-
keywords:
|
|
742
|
+
sources: z.z.array(z.z.string()),
|
|
743
|
+
keywords: z.z.array(z.z.unknown()),
|
|
740
744
|
media: ComplyAdvantageMedia.optional(),
|
|
741
|
-
source_notes:
|
|
745
|
+
source_notes: z.z.unknown()
|
|
742
746
|
}),
|
|
743
|
-
match_types:
|
|
744
|
-
match_types_details:
|
|
745
|
-
aml_types:
|
|
746
|
-
matching_name:
|
|
747
|
-
name_matches:
|
|
748
|
-
match_types:
|
|
749
|
-
query_term:
|
|
747
|
+
match_types: z.z.array(z.z.string()),
|
|
748
|
+
match_types_details: z.z.array(z.z.object({
|
|
749
|
+
aml_types: z.z.array(z.z.string()),
|
|
750
|
+
matching_name: z.z.string(),
|
|
751
|
+
name_matches: z.z.array(z.z.object({
|
|
752
|
+
match_types: z.z.array(z.z.string()),
|
|
753
|
+
query_term: z.z.string()
|
|
750
754
|
})),
|
|
751
|
-
secondary_matches:
|
|
752
|
-
sources:
|
|
755
|
+
secondary_matches: z.z.array(z.z.unknown()),
|
|
756
|
+
sources: z.z.array(z.z.string())
|
|
753
757
|
})),
|
|
754
|
-
match_status:
|
|
755
|
-
is_whitelisted:
|
|
756
|
-
score:
|
|
757
|
-
});
|
|
758
|
-
var ComplyAdvantageSearchDataResponse =
|
|
759
|
-
client_ref:
|
|
760
|
-
id:
|
|
761
|
-
ref:
|
|
762
|
-
searcher_id:
|
|
763
|
-
assignee_id:
|
|
758
|
+
match_status: z.z.string(),
|
|
759
|
+
is_whitelisted: z.z["boolean"](),
|
|
760
|
+
score: z.z.number()
|
|
761
|
+
});
|
|
762
|
+
var ComplyAdvantageSearchDataResponse = z.z.object({
|
|
763
|
+
client_ref: z.z.string(),
|
|
764
|
+
id: z.z.number(),
|
|
765
|
+
ref: z.z.string(),
|
|
766
|
+
searcher_id: z.z.number(),
|
|
767
|
+
assignee_id: z.z.number(),
|
|
764
768
|
filters: SearchFilters.optional(),
|
|
765
769
|
match_status: MatchStatus,
|
|
766
770
|
risk_level: RiskLevel,
|
|
767
|
-
search_term:
|
|
768
|
-
submitted_term:
|
|
769
|
-
total_hits:
|
|
770
|
-
total_matches:
|
|
771
|
-
total_blacklist_hits:
|
|
771
|
+
search_term: z.z.string(),
|
|
772
|
+
submitted_term: z.z.string(),
|
|
773
|
+
total_hits: z.z.number(),
|
|
774
|
+
total_matches: z.z.number(),
|
|
775
|
+
total_blacklist_hits: z.z.number(),
|
|
772
776
|
created_at: CoerceDateUTC,
|
|
773
777
|
updated_at: CoerceDateUTC,
|
|
774
|
-
tags:
|
|
775
|
-
labels:
|
|
776
|
-
limit:
|
|
777
|
-
offset:
|
|
778
|
+
tags: z.z.array(z.z.record(z.z.string(), z.z.string())).optional(),
|
|
779
|
+
labels: z.z.array(z.z.unknown()),
|
|
780
|
+
limit: z.z.number(),
|
|
781
|
+
offset: z.z.number(),
|
|
778
782
|
searcher: ComplyAdvantageUser.optional(),
|
|
779
783
|
assignee: ComplyAdvantageUser.optional(),
|
|
780
|
-
hits:
|
|
781
|
-
blacklist_hits:
|
|
784
|
+
hits: z.z.array(ComplyAdvantageSearchDataResponseHit).optional(),
|
|
785
|
+
blacklist_hits: z.z.array(z.z.unknown()).optional()
|
|
782
786
|
});
|
|
783
|
-
var ComplyAdvantageSearchSuccessResponse =
|
|
784
|
-
status:
|
|
785
|
-
code:
|
|
786
|
-
content:
|
|
787
|
+
var ComplyAdvantageSearchSuccessResponse = z.z.object({
|
|
788
|
+
status: z.z.literal("success"),
|
|
789
|
+
code: z.z.literal(200),
|
|
790
|
+
content: z.z.object({
|
|
787
791
|
data: ComplyAdvantageSearchDataResponse
|
|
788
792
|
})
|
|
789
793
|
});
|
|
790
|
-
var ComplyAdvantageSearchErrorResponse =
|
|
791
|
-
status:
|
|
792
|
-
code:
|
|
793
|
-
message:
|
|
794
|
+
var ComplyAdvantageSearchErrorResponse = z.z.object({
|
|
795
|
+
status: z.z.literal("failure"),
|
|
796
|
+
code: z.z.number(),
|
|
797
|
+
message: z.z.string()
|
|
794
798
|
});
|
|
795
|
-
var ComplyAdvantageSearchResponse =
|
|
796
|
-
var ComplyAdvantageKeyInformation =
|
|
797
|
-
name:
|
|
799
|
+
var ComplyAdvantageSearchResponse = z.z.union([ComplyAdvantageSearchSuccessResponse, ComplyAdvantageSearchErrorResponse]);
|
|
800
|
+
var ComplyAdvantageKeyInformation = z.z.object({
|
|
801
|
+
name: z.z.string(),
|
|
798
802
|
entity_type: SearchEntityType,
|
|
799
|
-
types:
|
|
800
|
-
grouped_types:
|
|
803
|
+
types: z.z.array(SearchFilterType).nullish(),
|
|
804
|
+
grouped_types: z.z.array(z.z.object({
|
|
801
805
|
type: SearchFilterType
|
|
802
806
|
})).nullish(),
|
|
803
|
-
match_types:
|
|
804
|
-
sources:
|
|
805
|
-
source_notes:
|
|
806
|
-
aka:
|
|
807
|
-
name:
|
|
807
|
+
match_types: z.z.array(z.z.string()).nullish(),
|
|
808
|
+
sources: z.z.array(z.z.string()).nullish(),
|
|
809
|
+
source_notes: z.z.unknown().nullish(),
|
|
810
|
+
aka: z.z.array(z.z.object({
|
|
811
|
+
name: z.z.string()
|
|
808
812
|
})).nullish(),
|
|
809
|
-
date_of_birth:
|
|
810
|
-
dates_of_birth:
|
|
813
|
+
date_of_birth: z.z.string().nullish(),
|
|
814
|
+
dates_of_birth: z.z.array(z.z.string()).nullish(),
|
|
811
815
|
match_status: MatchStatus.nullish(),
|
|
812
816
|
risk_level: RiskLevel.nullish(),
|
|
813
|
-
is_whitelisted:
|
|
814
|
-
age:
|
|
815
|
-
death_age:
|
|
816
|
-
date_of_death:
|
|
817
|
-
primary_country:
|
|
818
|
-
country_names:
|
|
819
|
-
designation:
|
|
820
|
-
associates:
|
|
821
|
-
association:
|
|
822
|
-
name:
|
|
817
|
+
is_whitelisted: z.z["boolean"]().nullish(),
|
|
818
|
+
age: z.z.number().nullish(),
|
|
819
|
+
death_age: z.z.unknown().nullish(),
|
|
820
|
+
date_of_death: z.z.unknown().nullish(),
|
|
821
|
+
primary_country: z.z.unknown().nullish(),
|
|
822
|
+
country_names: z.z.string().nullish(),
|
|
823
|
+
designation: z.z.string().nullish(),
|
|
824
|
+
associates: z.z.array(z.z.object({
|
|
825
|
+
association: z.z.string(),
|
|
826
|
+
name: z.z.string()
|
|
823
827
|
})).nullish()
|
|
824
828
|
});
|
|
825
|
-
var ComplyAdvantageAmlItemSource =
|
|
826
|
-
aml_types:
|
|
827
|
-
count:
|
|
828
|
-
country_codes:
|
|
829
|
-
data:
|
|
830
|
-
name:
|
|
831
|
-
source:
|
|
832
|
-
value:
|
|
829
|
+
var ComplyAdvantageAmlItemSource = z.z.object({
|
|
830
|
+
aml_types: z.z.array(z.z.string()).nullish(),
|
|
831
|
+
count: z.z.number().nullish(),
|
|
832
|
+
country_codes: z.z.array(z.z.string()).nullish(),
|
|
833
|
+
data: z.z.array(z.z.object({
|
|
834
|
+
name: z.z.string().nullish(),
|
|
835
|
+
source: z.z.string().nullish(),
|
|
836
|
+
value: z.z.string().nullish()
|
|
833
837
|
})).nullish(),
|
|
834
|
-
disclose_sources:
|
|
835
|
-
listing_ended_utc:
|
|
836
|
-
listing_started_utc:
|
|
837
|
-
name:
|
|
838
|
-
source:
|
|
839
|
-
url:
|
|
840
|
-
});
|
|
841
|
-
var ComplyAdvantageAmlFullListing =
|
|
842
|
-
var ComplyAdvantageSearchEntitiesDataResponse =
|
|
843
|
-
id:
|
|
838
|
+
disclose_sources: z.z["boolean"]().nullish(),
|
|
839
|
+
listing_ended_utc: z.z.string().nullish(),
|
|
840
|
+
listing_started_utc: z.z.string().nullish(),
|
|
841
|
+
name: z.z.string().nullish(),
|
|
842
|
+
source: z.z.string().nullish(),
|
|
843
|
+
url: z.z.string().nullish()
|
|
844
|
+
});
|
|
845
|
+
var ComplyAdvantageAmlFullListing = z.z.record(z.z.string().nullish(), z.z.record(z.z.string().nullish(), ComplyAdvantageAmlItemSource.nullish()).nullish());
|
|
846
|
+
var ComplyAdvantageSearchEntitiesDataResponse = z.z.array(z.z.object({
|
|
847
|
+
id: z.z.string(),
|
|
844
848
|
last_updated_utc: CoerceDateUTC,
|
|
845
849
|
created_utc: CoerceDateUTC,
|
|
846
850
|
key_information: ComplyAdvantageKeyInformation.nullish(),
|
|
847
|
-
uncategorized:
|
|
848
|
-
keywords:
|
|
851
|
+
uncategorized: z.z.object({
|
|
852
|
+
keywords: z.z.array(z.z.unknown()).nullish(),
|
|
849
853
|
media: ComplyAdvantageMedia.nullish(),
|
|
850
|
-
assets:
|
|
851
|
-
match_types:
|
|
852
|
-
related:
|
|
853
|
-
fields:
|
|
854
|
+
assets: z.z.array(z.z.unknown()).nullish(),
|
|
855
|
+
match_types: z.z.array(z.z.string()).nullish(),
|
|
856
|
+
related: z.z.array(z.z.unknown()).nullish(),
|
|
857
|
+
fields: z.z.array(z.z.unknown()).nullish()
|
|
854
858
|
}).nullish(),
|
|
855
859
|
full_listing: ComplyAdvantageAmlFullListing.nullish(),
|
|
856
|
-
navigation:
|
|
857
|
-
next:
|
|
858
|
-
previous:
|
|
860
|
+
navigation: z.z.object({
|
|
861
|
+
next: z.z.unknown().nullish(),
|
|
862
|
+
previous: z.z.unknown().nullish()
|
|
859
863
|
}).nullish()
|
|
860
864
|
}));
|
|
861
|
-
var ComplyAdvantageSearchEntitiesSuccessResponse =
|
|
862
|
-
status:
|
|
863
|
-
code:
|
|
865
|
+
var ComplyAdvantageSearchEntitiesSuccessResponse = z.z.object({
|
|
866
|
+
status: z.z.literal("success"),
|
|
867
|
+
code: z.z.literal(200),
|
|
864
868
|
content: ComplyAdvantageSearchEntitiesDataResponse.nullish()
|
|
865
869
|
});
|
|
866
|
-
var ComplyAdvantageSearchEntitiesResponse =
|
|
867
|
-
var ComplyAdvantageSearchRequest =
|
|
868
|
-
customerId:
|
|
870
|
+
var ComplyAdvantageSearchEntitiesResponse = z.z.union([ComplyAdvantageSearchEntitiesSuccessResponse, ComplyAdvantageSearchErrorResponse]);
|
|
871
|
+
var ComplyAdvantageSearchRequest = z.z.object({
|
|
872
|
+
customerId: z.z.string()
|
|
869
873
|
});
|
|
870
|
-
var ComplyAdvantageSearchRequests =
|
|
871
|
-
customerIds:
|
|
872
|
-
customersFromDate:
|
|
873
|
-
customersToDate:
|
|
874
|
-
workspaceId:
|
|
874
|
+
var ComplyAdvantageSearchRequests = z.z.object({
|
|
875
|
+
customerIds: z.z.string().array().optional(),
|
|
876
|
+
customersFromDate: z.z.coerce.date().optional(),
|
|
877
|
+
customersToDate: z.z.coerce.date().optional(),
|
|
878
|
+
workspaceId: z.z.string().optional()
|
|
875
879
|
});
|
|
876
|
-
var ComplyAdvantageUpdateSearchRequest =
|
|
877
|
-
searchId:
|
|
880
|
+
var ComplyAdvantageUpdateSearchRequest = z.z.object({
|
|
881
|
+
searchId: z.z.string(),
|
|
878
882
|
matchStatus: MatchStatus.optional()
|
|
879
883
|
});
|
|
880
|
-
var ComplyAdvantageUpdateSearchEntitiesRequest =
|
|
881
|
-
searchId:
|
|
882
|
-
entities:
|
|
884
|
+
var ComplyAdvantageUpdateSearchEntitiesRequest = z.z.object({
|
|
885
|
+
searchId: z.z.string(),
|
|
886
|
+
entities: z.z.array(z.z.string()).min(1),
|
|
883
887
|
matchStatus: MatchStatus.optional(),
|
|
884
|
-
isWhitelisted:
|
|
888
|
+
isWhitelisted: z.z["boolean"]().optional()
|
|
885
889
|
});
|
|
886
|
-
var ComplyAdvantageUpdateSearchEntitiesSuccessResponse =
|
|
887
|
-
status:
|
|
888
|
-
code:
|
|
890
|
+
var ComplyAdvantageUpdateSearchEntitiesSuccessResponse = z.z.object({
|
|
891
|
+
status: z.z.literal("success"),
|
|
892
|
+
code: z.z.literal(200),
|
|
889
893
|
content: ComplyAdvantageSearchDataResponse
|
|
890
894
|
});
|
|
891
|
-
var ComplyAdvantageUpdateSearchEntitiesResponse =
|
|
892
|
-
var ComplyAdvantageMonitorSearchDataResponse =
|
|
893
|
-
searcher_id:
|
|
894
|
-
ref:
|
|
895
|
-
is_monitored:
|
|
896
|
-
monitors:
|
|
897
|
-
monitored_by:
|
|
895
|
+
var ComplyAdvantageUpdateSearchEntitiesResponse = z.z.union([ComplyAdvantageUpdateSearchEntitiesSuccessResponse, ComplyAdvantageSearchErrorResponse]);
|
|
896
|
+
var ComplyAdvantageMonitorSearchDataResponse = z.z.object({
|
|
897
|
+
searcher_id: z.z.number(),
|
|
898
|
+
ref: z.z.string(),
|
|
899
|
+
is_monitored: z.z["boolean"](),
|
|
900
|
+
monitors: z.z.array(z.z.object({
|
|
901
|
+
monitored_by: z.z.number(),
|
|
898
902
|
created_at: CoerceDateUTC,
|
|
899
903
|
updated_at: CoerceDateUTC
|
|
900
904
|
})).optional()
|
|
901
905
|
});
|
|
902
|
-
var ComplyAdvantageMonitorSearchSuccessResponse =
|
|
903
|
-
status:
|
|
904
|
-
code:
|
|
906
|
+
var ComplyAdvantageMonitorSearchSuccessResponse = z.z.object({
|
|
907
|
+
status: z.z.literal("success"),
|
|
908
|
+
code: z.z.literal(200),
|
|
905
909
|
content: ComplyAdvantageMonitorSearchDataResponse
|
|
906
910
|
});
|
|
907
|
-
var ComplyAdvantageMonitorSearchResponse =
|
|
908
|
-
var ComplyAdvantageMonitoredSearchUpdate =
|
|
909
|
-
event:
|
|
910
|
-
data:
|
|
911
|
-
search_id:
|
|
912
|
-
updated:
|
|
913
|
-
"new":
|
|
914
|
-
removed:
|
|
915
|
-
is_suspended:
|
|
911
|
+
var ComplyAdvantageMonitorSearchResponse = z.z.union([ComplyAdvantageMonitorSearchSuccessResponse, ComplyAdvantageSearchErrorResponse]);
|
|
912
|
+
var ComplyAdvantageMonitoredSearchUpdate = z.z.object({
|
|
913
|
+
event: z.z.literal("monitored_search_updated"),
|
|
914
|
+
data: z.z.object({
|
|
915
|
+
search_id: z.z.number(),
|
|
916
|
+
updated: z.z.array(z.z.string()).nullish(),
|
|
917
|
+
"new": z.z.array(z.z.string()).nullish(),
|
|
918
|
+
removed: z.z.array(z.z.string()).nullish(),
|
|
919
|
+
is_suspended: z.z["boolean"]().nullish()
|
|
916
920
|
})
|
|
917
921
|
});
|
|
918
922
|
|
|
919
|
-
var ChainalysisRequest =
|
|
920
|
-
address:
|
|
923
|
+
var ChainalysisRequest = z.z.object({
|
|
924
|
+
address: z.z.string()
|
|
921
925
|
});
|
|
922
|
-
var ChainalysisRegisterApiResponse =
|
|
923
|
-
statusCode:
|
|
924
|
-
address:
|
|
926
|
+
var ChainalysisRegisterApiResponse = z.z.object({
|
|
927
|
+
statusCode: z.z.number().nullish(),
|
|
928
|
+
address: z.z.string()
|
|
925
929
|
});
|
|
926
|
-
var ChainalysisRiskLevel =
|
|
930
|
+
var ChainalysisRiskLevel = z.z["enum"](["Severe", "High", "Medium", "Low"]);
|
|
927
931
|
// Used for error mapping
|
|
928
932
|
var ChainalysisErrorCodes = new Map([[400, "INVALID_PARAMETER_BLOCKCHAIN"], [403, "UNAUTHORIZED"], [404, "NOT_FOUND"], [406, "RESULT_PARSER_ERROR"], [409, "RESULT_PARSER_ERROR"], [429, "SERVER_ERROR"], [500, "SERVER_ERROR"], [503, "SERVER_ERROR"], [504, "SERVER_ERROR"]]);
|
|
929
|
-
var AddressType =
|
|
930
|
-
var ExposureType =
|
|
931
|
-
var Direction =
|
|
932
|
-
var Status$1 =
|
|
933
|
-
var Cluster =
|
|
934
|
-
name:
|
|
935
|
-
category:
|
|
936
|
-
});
|
|
937
|
-
var AddressIdentification =
|
|
938
|
-
name:
|
|
939
|
-
address:
|
|
940
|
-
category:
|
|
941
|
-
description:
|
|
942
|
-
url:
|
|
943
|
-
createdAt:
|
|
944
|
-
});
|
|
945
|
-
var Exposure =
|
|
946
|
-
category:
|
|
947
|
-
value:
|
|
933
|
+
var AddressType = z.z["enum"](["PRIVATE_WALLET", "LIQUIDITY_POOL", "SERVICE_PROVIDER"]);
|
|
934
|
+
var ExposureType = z.z["enum"](["direct", "indirect"]);
|
|
935
|
+
var Direction = z.z.literal("both_directions");
|
|
936
|
+
var Status$1 = z.z.literal("COMPLETE");
|
|
937
|
+
var Cluster = z.z.object({
|
|
938
|
+
name: z.z.string(),
|
|
939
|
+
category: z.z.string()
|
|
940
|
+
});
|
|
941
|
+
var AddressIdentification = z.z.object({
|
|
942
|
+
name: z.z.string(),
|
|
943
|
+
address: z.z.string(),
|
|
944
|
+
category: z.z.string(),
|
|
945
|
+
description: z.z.string(),
|
|
946
|
+
url: z.z.string().nullish(),
|
|
947
|
+
createdAt: z.z.number()
|
|
948
|
+
});
|
|
949
|
+
var Exposure = z.z.object({
|
|
950
|
+
category: z.z.string(),
|
|
951
|
+
value: z.z.number(),
|
|
948
952
|
exposureType: ExposureType,
|
|
949
953
|
direction: Direction
|
|
950
954
|
});
|
|
951
|
-
var RuleTriggered =
|
|
952
|
-
risk:
|
|
953
|
-
minThreshold:
|
|
954
|
-
maxThreshold:
|
|
955
|
+
var RuleTriggered = z.z.object({
|
|
956
|
+
risk: z.z.string(),
|
|
957
|
+
minThreshold: z.z.number(),
|
|
958
|
+
maxThreshold: z.z.number(),
|
|
955
959
|
exposureType: ExposureType,
|
|
956
960
|
direction: Direction
|
|
957
961
|
});
|
|
958
|
-
var Trigger =
|
|
959
|
-
category:
|
|
960
|
-
percentage:
|
|
961
|
-
message:
|
|
962
|
+
var Trigger = z.z.object({
|
|
963
|
+
category: z.z.string(),
|
|
964
|
+
percentage: z.z.number(),
|
|
965
|
+
message: z.z.string(),
|
|
962
966
|
ruleTriggered: RuleTriggered.nullish()
|
|
963
967
|
});
|
|
964
|
-
var PoolMetadata =
|
|
965
|
-
fees:
|
|
966
|
-
tokens:
|
|
968
|
+
var PoolMetadata = z.z.object({
|
|
969
|
+
fees: z.z.number().nullish(),
|
|
970
|
+
tokens: z.z.array(z.z.string())
|
|
967
971
|
});
|
|
968
|
-
var ChainalysisRiskAssessmentApiResponse =
|
|
969
|
-
address:
|
|
972
|
+
var ChainalysisRiskAssessmentApiResponse = z.z.object({
|
|
973
|
+
address: z.z.string(),
|
|
970
974
|
risk: ChainalysisRiskLevel,
|
|
971
|
-
riskReason:
|
|
975
|
+
riskReason: z.z.string().nullish(),
|
|
972
976
|
cluster: Cluster.nullish(),
|
|
973
977
|
addressType: AddressType,
|
|
974
|
-
addressIdentifications:
|
|
975
|
-
exposures:
|
|
976
|
-
triggers:
|
|
978
|
+
addressIdentifications: z.z.array(AddressIdentification),
|
|
979
|
+
exposures: z.z.array(Exposure).nullish(),
|
|
980
|
+
triggers: z.z.array(Trigger).nullish(),
|
|
977
981
|
status: Status$1,
|
|
978
982
|
poolMetadata: PoolMetadata.nullish()
|
|
979
983
|
});
|
|
980
|
-
var ChainalysisApiError =
|
|
981
|
-
statusCode:
|
|
982
|
-
error:
|
|
983
|
-
error:
|
|
984
|
-
message:
|
|
985
|
-
data:
|
|
984
|
+
var ChainalysisApiError = z.z.object({
|
|
985
|
+
statusCode: z.z.number().nullish(),
|
|
986
|
+
error: z.z.object({
|
|
987
|
+
error: z.z.string(),
|
|
988
|
+
message: z.z.string(),
|
|
989
|
+
data: z.z.string().nullish()
|
|
986
990
|
})
|
|
987
991
|
});
|
|
988
|
-
var ChainalysisRegisterResponse =
|
|
989
|
-
var ChainalysisRiskAssessmentResponse =
|
|
992
|
+
var ChainalysisRegisterResponse = z.z.union([ChainalysisRegisterApiResponse, ChainalysisApiError]);
|
|
993
|
+
var ChainalysisRiskAssessmentResponse = z.z.union([ChainalysisRiskAssessmentApiResponse, ChainalysisApiError]);
|
|
990
994
|
|
|
991
995
|
/**
|
|
992
996
|
* Merkle Science defines it own blockchain list, thus this list.
|
|
@@ -1118,13 +1122,13 @@ var MerkleBlockChainTypes = {
|
|
|
1118
1122
|
Aptos: "123"
|
|
1119
1123
|
};
|
|
1120
1124
|
var BlockChainNames = ["Bitcoin", "Ethereum", "Litecoin", "BitcoinCash", "Ripple", "Dogecoin", "Zilliqa", "BinanceSmartChain", "Polygon", "Tron", "Cardano", "Polkadot", "Stellar", "Hedera", "Cronos", "Optimism", "Arbitrum", "Fantom", "Monero", "Cosmos", "Zcash", "EthereumClassic", "Dash", "Solana", "AvalancheC_Chain", "Verge", "BitcoinGold", "Algorand", "Acala", "Akash", "Arweave", "Ardor", "Ark", "Astar", "Band", "BinanceNative", "Celo", "Chiliz", "Nervos", "CronosNative", "Digibyte", "Multiversx", "Enjin", "Eos", "EthereumPow", "FetchAI", "Filecoin", "Flow", "Flare", "Moonbeam", "Helium", "ICP", "Icon", "Injective", "IOTA", "IoTex", "Iris", "Kava", "Kadena", "Klaytn", "Komodo", "Kusama", "Lisk", "Terra", "Mina", "Moonriver", "Nano", "Near", "Neo3", "Oasys", "One", "Ontology", "Osmosis", "Polymesh", "QTUM", "Oasis", "Thorchain", "Ravencoin", "Siacoin", "Shiden", "Songbird", "Stratis", "Stacks", "SUI", "zkSync", "Theta", "Tomo", "VeChain", "Waves", "Wax", "WEMIX", "WaltonChain", "Chia", "Tezos", "Zcoin", "Celestia", "Neutron", "Avalanche_P", "Sei", "Avalanche_X", "Aztec", "Bittensor", "Casper", "Deso", "Juno", "PocketNetwork", "Ronin", "Vara", "XPLA", "Archway", "Axelar", "Dymension", "Starknet", "Orai", "Lukso", "bitsCrunch", "Reef", "ImmutablezkEVM", "BaseProtocol", "ArbitrumNova", "Canto", "MetisDAO", "Aptos"];
|
|
1121
|
-
var MerkleBlockChainName =
|
|
1122
|
-
var MerkleBlockChainNamesExtended =
|
|
1125
|
+
var MerkleBlockChainName = z.z["enum"](BlockChainNames);
|
|
1126
|
+
var MerkleBlockChainNamesExtended = z.z["enum"]([].concat(BlockChainNames, ["Bitcoin Cash", "Binance Smart Chain", "Ethereum Classic", "Avalanche C-Chain", "Bitcoin Gold", "Binance Native", "Cronos Native", "Ethereum Pow", "Fetch AI", "Avalanche-P", "Avalanche-X", "Pocket Network", "Immutable zkEVM", "Base Protocol", "Arbitrum Nova"]));
|
|
1123
1127
|
var BlockChainCodes = ["0", "1", "2", "3", "4", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "123"];
|
|
1124
|
-
var MerkleBlockChainCodes =
|
|
1128
|
+
var MerkleBlockChainCodes = z.z["enum"](BlockChainCodes);
|
|
1125
1129
|
// Needed as MerkleScience API response contains numerical value for blockchain
|
|
1126
1130
|
// while the value for blockchain in request is expected to be a string...
|
|
1127
|
-
var BlockChainNumericalCodes =
|
|
1131
|
+
var BlockChainNumericalCodes = z.z.number()["int"]().min(0).max(123).refine(function (arg) {
|
|
1128
1132
|
return arg !== 5;
|
|
1129
1133
|
});
|
|
1130
1134
|
var transactionType = {
|
|
@@ -1132,80 +1136,80 @@ var transactionType = {
|
|
|
1132
1136
|
// Deposit
|
|
1133
1137
|
Withdrawal: 2 // Withdrawal
|
|
1134
1138
|
};
|
|
1135
|
-
var TransactionType =
|
|
1136
|
-
var MerkleAddressRequest =
|
|
1137
|
-
identifier:
|
|
1139
|
+
var TransactionType = z.z.nativeEnum(transactionType);
|
|
1140
|
+
var MerkleAddressRequest = z.z.object({
|
|
1141
|
+
identifier: z.z.string(),
|
|
1138
1142
|
blockchain: MerkleBlockChainCodes,
|
|
1139
1143
|
customer_id: vault_schema.UuidString,
|
|
1140
1144
|
type: TransactionType,
|
|
1141
|
-
show_alerts:
|
|
1142
|
-
custom_tags:
|
|
1143
|
-
});
|
|
1144
|
-
var RiskLevelVerbose =
|
|
1145
|
-
var Originator =
|
|
1146
|
-
tag_type_verbose:
|
|
1147
|
-
tag_subtype_verbose:
|
|
1148
|
-
tag_name_verbose:
|
|
1149
|
-
total_value_usd:
|
|
1150
|
-
exposure_type:
|
|
1151
|
-
});
|
|
1152
|
-
var User =
|
|
1153
|
-
tag_type_verbose:
|
|
1154
|
-
tag_subtype_verbose:
|
|
1155
|
-
tag_name_verbose:
|
|
1156
|
-
});
|
|
1157
|
-
var DigitalAsset =
|
|
1158
|
-
name:
|
|
1159
|
-
symbol:
|
|
1160
|
-
});
|
|
1161
|
-
var MerkleAddressApiResponse =
|
|
1162
|
-
statusCode:
|
|
1163
|
-
identifier:
|
|
1145
|
+
show_alerts: z.z["boolean"]().nullish(),
|
|
1146
|
+
custom_tags: z.z.array(z.z.string()).nullish()
|
|
1147
|
+
});
|
|
1148
|
+
var RiskLevelVerbose = z.z["enum"](["No Risk Detected", "Info", "Caution", "Medium", "High", "Critical"]);
|
|
1149
|
+
var Originator = z.z.object({
|
|
1150
|
+
tag_type_verbose: z.z.string(),
|
|
1151
|
+
tag_subtype_verbose: z.z.string(),
|
|
1152
|
+
tag_name_verbose: z.z.string(),
|
|
1153
|
+
total_value_usd: z.z.number(),
|
|
1154
|
+
exposure_type: z.z.string()
|
|
1155
|
+
});
|
|
1156
|
+
var User = z.z.object({
|
|
1157
|
+
tag_type_verbose: z.z.string().nullish(),
|
|
1158
|
+
tag_subtype_verbose: z.z.string().nullish(),
|
|
1159
|
+
tag_name_verbose: z.z.string().nullish()
|
|
1160
|
+
});
|
|
1161
|
+
var DigitalAsset = z.z.object({
|
|
1162
|
+
name: z.z.string().nullish(),
|
|
1163
|
+
symbol: z.z.string().nullish()
|
|
1164
|
+
});
|
|
1165
|
+
var MerkleAddressApiResponse = z.z.object({
|
|
1166
|
+
statusCode: z.z.number().nullish(),
|
|
1167
|
+
identifier: z.z.string().nullish(),
|
|
1164
1168
|
blockchain: BlockChainNumericalCodes.nullish(),
|
|
1165
1169
|
blockchain_verbose: MerkleBlockChainNamesExtended.nullish(),
|
|
1166
1170
|
customer_id: vault_schema.UuidString.nullish(),
|
|
1167
|
-
type:
|
|
1168
|
-
type_verbose:
|
|
1169
|
-
total_incoming_value:
|
|
1170
|
-
total_incoming_value_usd:
|
|
1171
|
-
total_outgoing_value:
|
|
1172
|
-
total_outgoing_value_usd:
|
|
1173
|
-
balance:
|
|
1174
|
-
earliest_transaction_time:
|
|
1175
|
-
latest_transaction_time:
|
|
1176
|
-
risk_level:
|
|
1171
|
+
type: z.z.number().nullish(),
|
|
1172
|
+
type_verbose: z.z.string().nullish(),
|
|
1173
|
+
total_incoming_value: z.z.string().nullish(),
|
|
1174
|
+
total_incoming_value_usd: z.z.string().nullish(),
|
|
1175
|
+
total_outgoing_value: z.z.string().nullish(),
|
|
1176
|
+
total_outgoing_value_usd: z.z.string().nullish(),
|
|
1177
|
+
balance: z.z.number().nullish(),
|
|
1178
|
+
earliest_transaction_time: z.z.string().nullish(),
|
|
1179
|
+
latest_transaction_time: z.z.string().nullish(),
|
|
1180
|
+
risk_level: z.z.number()["int"]().min(0).max(5).nullish(),
|
|
1177
1181
|
risk_level_verbose: RiskLevelVerbose.nullish(),
|
|
1178
|
-
created_at:
|
|
1179
|
-
updated_at:
|
|
1180
|
-
originator:
|
|
1181
|
-
beneficiary:
|
|
1182
|
-
tags:
|
|
1182
|
+
created_at: z.z.string().nullish(),
|
|
1183
|
+
updated_at: z.z.string().nullish(),
|
|
1184
|
+
originator: z.z.array(Originator).nullish(),
|
|
1185
|
+
beneficiary: z.z.array(z.z.object({})).nullish(),
|
|
1186
|
+
tags: z.z.object({
|
|
1183
1187
|
owner: User,
|
|
1184
1188
|
user: User
|
|
1185
1189
|
}).nullish(),
|
|
1186
|
-
custom_tags:
|
|
1187
|
-
digital_assets:
|
|
1188
|
-
});
|
|
1189
|
-
var MerkleAddressApiError =
|
|
1190
|
-
error:
|
|
1191
|
-
error:
|
|
1192
|
-
message:
|
|
1193
|
-
data:
|
|
1190
|
+
custom_tags: z.z.array(z.z.string()).nullish(),
|
|
1191
|
+
digital_assets: z.z.array(DigitalAsset).nullish()
|
|
1192
|
+
});
|
|
1193
|
+
var MerkleAddressApiError = z.z.object({
|
|
1194
|
+
error: z.z.object({
|
|
1195
|
+
error: z.z.string(),
|
|
1196
|
+
message: z.z.string(),
|
|
1197
|
+
data: z.z.string().nullish()
|
|
1194
1198
|
}),
|
|
1195
|
-
risk_level:
|
|
1199
|
+
risk_level: z.z.number()["int"]().min(0).max(5).nullish(),
|
|
1196
1200
|
risk_level_verbose: RiskLevelVerbose.nullish(),
|
|
1197
|
-
identifier:
|
|
1201
|
+
identifier: z.z.string().nullish()
|
|
1198
1202
|
});
|
|
1199
|
-
var MerkleAddressResponse =
|
|
1203
|
+
var MerkleAddressResponse = z.z.union([MerkleAddressApiResponse, MerkleAddressApiError]);
|
|
1200
1204
|
|
|
1201
1205
|
// scorechain and integratedScorechain do have a config but coin and depth field are hidden
|
|
1202
1206
|
var ProviderWithoutConfig = ["chainalysis", "scorechain", "integratedScorechain"];
|
|
1203
1207
|
var IdentityProviderOptions = ["nexeraIdSSID", "nexeraIdKYB", "synaps", "ondato"];
|
|
1204
|
-
var IdentityProvider =
|
|
1208
|
+
var IdentityProvider = z.z["enum"](IdentityProviderOptions);
|
|
1205
1209
|
var DataProviderOptions = ["complyAdvantage", "big", "scorechain", "merkleScience", "chainalysis", "ipQualityScore", "integratedComplyAdvantage", "integratedScorechain", "integratedIpqualityscore"];
|
|
1206
|
-
var DataProvider =
|
|
1207
|
-
var MergedProviders =
|
|
1208
|
-
var MerkleScienceConfig =
|
|
1210
|
+
var DataProvider = z.z["enum"](DataProviderOptions);
|
|
1211
|
+
var MergedProviders = z.z["enum"]([].concat(vault_schema._toConsumableArray(IdentityProvider.options), vault_schema._toConsumableArray(DataProvider.options)));
|
|
1212
|
+
var MerkleScienceConfig = z.z.object({
|
|
1209
1213
|
blockchain: MerkleBlockChainName
|
|
1210
1214
|
});
|
|
1211
1215
|
var ChainalysisConfig = ChainalysisRequest.omit({
|
|
@@ -1217,107 +1221,107 @@ var ScorechainConfig = vault_schema.ScoringAnalysisRequest.omit({
|
|
|
1217
1221
|
var WorkflowsScorechainConfig = vault_schema.WorkflowsScoringAnalysisRequest.omit({
|
|
1218
1222
|
objectId: true // objectId is removed, because it is not stored in CMS but rather provided on the fly by the client
|
|
1219
1223
|
});
|
|
1220
|
-
var IpQualityConfig =
|
|
1221
|
-
ipVerification:
|
|
1222
|
-
emailVerification:
|
|
1223
|
-
phoneVerification:
|
|
1224
|
+
var IpQualityConfig = z.z.object({
|
|
1225
|
+
ipVerification: z.z["boolean"]().nullish()["default"](false),
|
|
1226
|
+
emailVerification: z.z["boolean"]().nullish()["default"](false),
|
|
1227
|
+
phoneVerification: z.z["boolean"]().nullish()["default"](false)
|
|
1224
1228
|
});
|
|
1225
|
-
var BigConfig =
|
|
1229
|
+
var BigConfig = z.z.object({
|
|
1226
1230
|
crypto: BigCryptoChain
|
|
1227
1231
|
});
|
|
1228
1232
|
var ProviderIntegrationTypeOptions = ["integrated", "external"];
|
|
1229
|
-
var ProviderIntegrationType =
|
|
1233
|
+
var ProviderIntegrationType = z.z["enum"](ProviderIntegrationTypeOptions);
|
|
1230
1234
|
// the following configurations are used for CMS providers
|
|
1231
1235
|
// seems like we are migrating from these to workflow provider configs
|
|
1232
1236
|
// which do not have enabled, apiKey and integrationType
|
|
1233
1237
|
// as these are now found on the providers-api microservice.
|
|
1234
1238
|
|
|
1235
|
-
var BaseProvider =
|
|
1236
|
-
enabled:
|
|
1237
|
-
apiKey:
|
|
1239
|
+
var BaseProvider = z.z.object({
|
|
1240
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1241
|
+
apiKey: z.z.string().nullish(),
|
|
1238
1242
|
integrationType: ProviderIntegrationType.nullish()
|
|
1239
1243
|
});
|
|
1240
1244
|
var NexeraIdSSIDProvider = BaseProvider;
|
|
1241
1245
|
var NexeraIdKYBProvider = BaseProvider;
|
|
1242
1246
|
var BigProvider = BaseProvider.extend({
|
|
1243
|
-
onRulesEngine:
|
|
1244
|
-
enabled:
|
|
1247
|
+
onRulesEngine: z.z.object({
|
|
1248
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1245
1249
|
config: BigConfig.array().nullish()
|
|
1246
1250
|
}).nullish(),
|
|
1247
|
-
onNewRecord:
|
|
1248
|
-
enabled:
|
|
1251
|
+
onNewRecord: z.z.object({
|
|
1252
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1249
1253
|
config: BigConfig.array().nullish()
|
|
1250
1254
|
}).nullish()
|
|
1251
1255
|
});
|
|
1252
1256
|
var ScorechainProvider = BaseProvider.extend({
|
|
1253
|
-
onRulesEngine:
|
|
1254
|
-
enabled:
|
|
1257
|
+
onRulesEngine: z.z.object({
|
|
1258
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1255
1259
|
config: ScorechainConfig.array().nullish()
|
|
1256
1260
|
}).nullish(),
|
|
1257
|
-
onNewRecord:
|
|
1258
|
-
enabled:
|
|
1261
|
+
onNewRecord: z.z.object({
|
|
1262
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1259
1263
|
config: ScorechainConfig.array().nullish()
|
|
1260
1264
|
}).nullish()
|
|
1261
1265
|
});
|
|
1262
1266
|
var MerkleScienceProvider = BaseProvider.extend({
|
|
1263
|
-
onRulesEngine:
|
|
1264
|
-
enabled:
|
|
1267
|
+
onRulesEngine: z.z.object({
|
|
1268
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1265
1269
|
config: MerkleScienceConfig.array().nullish()
|
|
1266
1270
|
}).nullish(),
|
|
1267
|
-
onNewRecord:
|
|
1268
|
-
enabled:
|
|
1271
|
+
onNewRecord: z.z.object({
|
|
1272
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1269
1273
|
config: MerkleScienceConfig.array().nullish()
|
|
1270
1274
|
}).nullish()
|
|
1271
1275
|
});
|
|
1272
1276
|
var ChainalysisProvider = BaseProvider.extend({
|
|
1273
|
-
onRulesEngine:
|
|
1274
|
-
enabled:
|
|
1277
|
+
onRulesEngine: z.z.object({
|
|
1278
|
+
enabled: z.z["boolean"]().nullish()
|
|
1275
1279
|
}).nullish(),
|
|
1276
|
-
onNewRecord:
|
|
1277
|
-
enabled:
|
|
1280
|
+
onNewRecord: z.z.object({
|
|
1281
|
+
enabled: z.z["boolean"]().nullish()
|
|
1278
1282
|
}).nullish()
|
|
1279
1283
|
});
|
|
1280
1284
|
var IpqualityscoreProvider = BaseProvider.extend({
|
|
1281
|
-
onRulesEngine:
|
|
1282
|
-
enabled:
|
|
1285
|
+
onRulesEngine: z.z.object({
|
|
1286
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1283
1287
|
config: IpQualityConfig.array().nullish()
|
|
1284
1288
|
}).nullish(),
|
|
1285
|
-
onNewRecord:
|
|
1286
|
-
enabled:
|
|
1289
|
+
onNewRecord: z.z.object({
|
|
1290
|
+
enabled: z.z["boolean"]().nullish(),
|
|
1287
1291
|
config: IpQualityConfig.array().nullish()
|
|
1288
1292
|
}).nullish()
|
|
1289
1293
|
});
|
|
1290
1294
|
// note this use of SearchFilterType
|
|
1291
1295
|
// it is assuming that data coming in may not be in the correct format.
|
|
1292
|
-
var ComplyAdvantageProviderConfigTypes =
|
|
1296
|
+
var ComplyAdvantageProviderConfigTypes = z.z.array(z.z.preprocess(function (type) {
|
|
1293
1297
|
return type.replace(/_/g, "-");
|
|
1294
1298
|
}, SearchFilterType)).nullish();
|
|
1295
|
-
var ComplyAdvantageProviderConfigFilters =
|
|
1299
|
+
var ComplyAdvantageProviderConfigFilters = z.z.object({
|
|
1296
1300
|
types: ComplyAdvantageProviderConfigTypes,
|
|
1297
|
-
removeDeceased:
|
|
1298
|
-
countryCodes:
|
|
1301
|
+
removeDeceased: z.z["boolean"]().nullish(),
|
|
1302
|
+
countryCodes: z.z.array(vault_schema.Alpha2Country).nullish()
|
|
1299
1303
|
});
|
|
1300
|
-
var ComplyAdvantageProviderConfigElement =
|
|
1301
|
-
fuzziness:
|
|
1302
|
-
exactMatch:
|
|
1304
|
+
var ComplyAdvantageProviderConfigElement = z.z.object({
|
|
1305
|
+
fuzziness: z.z.number().min(0).max(1).nullish(),
|
|
1306
|
+
exactMatch: z.z["boolean"]().nullish(),
|
|
1303
1307
|
filters: ComplyAdvantageProviderConfigFilters.nullish()
|
|
1304
1308
|
});
|
|
1305
1309
|
var ComplyAdvantageProvider = BaseProvider.extend({
|
|
1306
|
-
screenDataOnNewRecord:
|
|
1307
|
-
monitorOnTheOngoingManner:
|
|
1308
|
-
config:
|
|
1310
|
+
screenDataOnNewRecord: z.z["boolean"]().nullish(),
|
|
1311
|
+
monitorOnTheOngoingManner: z.z["boolean"]().nullish(),
|
|
1312
|
+
config: z.z.array(ComplyAdvantageProviderConfigElement).nullish()
|
|
1309
1313
|
});
|
|
1310
1314
|
var SynapsProvider = BaseProvider.extend({
|
|
1311
|
-
webhookSecret:
|
|
1315
|
+
webhookSecret: z.z.string().nullish()
|
|
1312
1316
|
});
|
|
1313
1317
|
|
|
1314
1318
|
// See comment above. --> END CMS providers
|
|
1315
1319
|
|
|
1316
|
-
var ProviderData =
|
|
1317
|
-
id:
|
|
1318
|
-
projectId:
|
|
1319
|
-
provider:
|
|
1320
|
-
type:
|
|
1320
|
+
var ProviderData = z.z.object({
|
|
1321
|
+
id: z.z.string(),
|
|
1322
|
+
projectId: z.z.string(),
|
|
1323
|
+
provider: z.z.union([IdentityProvider, DataProvider]),
|
|
1324
|
+
type: z.z["enum"](["identity", "data"]),
|
|
1321
1325
|
nexeraIdSSID: NexeraIdSSIDProvider.nullish(),
|
|
1322
1326
|
nexeraIdKYB: NexeraIdKYBProvider.nullish(),
|
|
1323
1327
|
complyAdvantage: ComplyAdvantageProvider.nullish(),
|
|
@@ -1335,18 +1339,18 @@ var ProviderData = zod.z.object({
|
|
|
1335
1339
|
var ProviderDataProject = ProviderData.omit({
|
|
1336
1340
|
projectId: true
|
|
1337
1341
|
}).extend({
|
|
1338
|
-
project:
|
|
1339
|
-
id:
|
|
1342
|
+
project: z.z.object({
|
|
1343
|
+
id: z.z.string()
|
|
1340
1344
|
})
|
|
1341
1345
|
});
|
|
1342
|
-
var GetProvidersResponse =
|
|
1346
|
+
var GetProvidersResponse = z.z.array(ProviderDataProject);
|
|
1343
1347
|
var GetProviderResponse = ProviderData;
|
|
1344
1348
|
var CreateProviderInput = ProviderData.omit({
|
|
1345
1349
|
id: true,
|
|
1346
1350
|
type: true,
|
|
1347
1351
|
projectId: true
|
|
1348
1352
|
}).extend({
|
|
1349
|
-
project:
|
|
1353
|
+
project: z.z.string()
|
|
1350
1354
|
});
|
|
1351
1355
|
var CreateProviderResponse = ProviderData.omit({
|
|
1352
1356
|
type: true,
|
|
@@ -1361,8 +1365,8 @@ var CreateProviderResponse = ProviderData.omit({
|
|
|
1361
1365
|
integratedScorechain: true,
|
|
1362
1366
|
integratedIpqualityscore: true
|
|
1363
1367
|
});
|
|
1364
|
-
var UpdateProviderInput =
|
|
1365
|
-
providerId:
|
|
1368
|
+
var UpdateProviderInput = z.z.object({
|
|
1369
|
+
providerId: z.z.string(),
|
|
1366
1370
|
input: ProviderData.omit({
|
|
1367
1371
|
id: true,
|
|
1368
1372
|
projectId: true,
|
|
@@ -1371,19 +1375,19 @@ var UpdateProviderInput = zod.z.object({
|
|
|
1371
1375
|
})
|
|
1372
1376
|
});
|
|
1373
1377
|
var UpdateProviderResponse = ProviderData;
|
|
1374
|
-
var ToggleProviderInput =
|
|
1375
|
-
providerId:
|
|
1376
|
-
enabled:
|
|
1378
|
+
var ToggleProviderInput = z.z.object({
|
|
1379
|
+
providerId: z.z.string(),
|
|
1380
|
+
enabled: z.z["boolean"]()
|
|
1377
1381
|
});
|
|
1378
|
-
var DeleteProviderInput =
|
|
1379
|
-
providerId:
|
|
1382
|
+
var DeleteProviderInput = z.z.object({
|
|
1383
|
+
providerId: z.z.string()
|
|
1380
1384
|
});
|
|
1381
|
-
var DeleteProviderResponse =
|
|
1382
|
-
providerId:
|
|
1385
|
+
var DeleteProviderResponse = z.z.object({
|
|
1386
|
+
providerId: z.z.string()
|
|
1383
1387
|
});
|
|
1384
1388
|
|
|
1385
1389
|
var SUMSUB_REVIEW_REJECT_LABELS = ["FORGERY", "DOCUMENT_TEMPLATE", "LOW_QUALITY", "SPAM", "NOT_DOCUMENT", "SELFIE_MISMATCH", "ID_INVALID", "FOREIGNER", "DUPLICATE", "BAD_AVATAR", "WRONG_USER_REGION", "INCOMPLETE_DOCUMENT", "BLACKLIST", "BLOCKLIST", "UNSATISFACTORY_PHOTOS", "DOCUMENT_PAGE_MISSING", "DOCUMENT_DAMAGED", "DIGITAL_DOCUMENT", "REGULATIONS_VIOLATIONS", "INCONSISTENT_PROFILE", "PROBLEMATIC_APPLICANT_DATA", "ADDITIONAL_DOCUMENT_REQUIRED", "AGE_REQUIREMENT_MISMATCH", "EXPERIENCE_REQUIREMENT_MISMATCH", "CRIMINAL", "WRONG_ADDRESS", "GRAPHIC_EDITOR", "DOCUMENT_DEPRIVED", "COMPROMISED_PERSONS", "PEP", "ADVERSE_MEDIA", "FRAUDULENT_PATTERNS", "SANCTIONS", "NOT_ALL_CHECKS_COMPLETED", "FRONT_SIDE_MISSING", "BACK_SIDE_MISSING", "SCREENSHOTS", "BLACK_AND_WHITE", "INCOMPATIBLE_LANGUAGE", "EXPIRATION_DATE", "UNFILLED_ID", "BAD_SELFIE", "BAD_VIDEO_SELFIE", "BAD_FACE_MATCHING", "BAD_PROOF_OF_IDENTITY", "BAD_PROOF_OF_ADDRESS", "BAD_PROOF_OF_PAYMENT", "SELFIE_WITH_PAPER", "FRAUDULENT_LIVENESS", "OTHER", "REQUESTED_DATA_MISMATCH", "OK", "COMPANY_NOT_DEFINED_STRUCTURE", "COMPANY_NOT_DEFINED_BENEFICIARIES", "COMPANY_NOT_VALIDATED_BENEFICIAL_OWNERS", "COMPANY_NOT_VALIDATED_BENEFICIARIES", "COMPANY_NOT_VALIDATED_DIRECTORS", "COMPANY_NOT_DEFINED_REPRESENTATIVES", "COMPANY_NOT_VALIDATED_REPRESENTATIVES", "COMPANY_INCORRECT_DATA", "UNSUITABLE_DOCUMENT", "OUTDATED_DOCUMENT_VERSION", "COMPANY_NOT_DEFINED_OWNERSHIP_STRUCTURE", "COMPANY_INACTIVE_ENTITY", "APPLICANT_INTERRUPTED_INTERVIEW", "DOCUMENT_MISSING", "UNSUITABLE_ENV", "CONNECTION_INTERRUPTED", "UNSUPPORTED_LANGUAGE", "THIRD_PARTY_INVOLVED", "CHECK_UNAVAILABLE", "DB_DATA_NOT_FOUND", "DB_DATA_MISMATCH", "INCORRECT_SOCIAL_NUMBER"];
|
|
1386
|
-
var SumSubReviewRejectLabel =
|
|
1390
|
+
var SumSubReviewRejectLabel = z.z["enum"](SUMSUB_REVIEW_REJECT_LABELS);
|
|
1387
1391
|
var SUMSUB_REVIEW_REJECT_LABELS_DESCRIPTION = {
|
|
1388
1392
|
FORGERY: {
|
|
1389
1393
|
defaultReviewRejectType: "FINAL",
|
|
@@ -1699,25 +1703,25 @@ var SUMSUB_REVIEW_REJECT_LABELS_DESCRIPTION = {
|
|
|
1699
1703
|
* SELFIE2 2nd selfie step.
|
|
1700
1704
|
*/
|
|
1701
1705
|
var SUMSUB_STEPS = ["PHONE_VERIFICATION", "EMAIL_VERIFICATION", "QUESTIONNAIRE", "APPLICANT_DATA", "IDENTITY", "IDENTITY2", "IDENTITY3", "IDENTITY4", "PROOF_OF_RESIDENCE", "PROOF_OF_RESIDENCE2", "SELFIE", "SELFIE2", "COMPANY", "COMPANY_DATA", "COMPANY_DOCUMENTS", "COMPANY_BENEFICIARIES"];
|
|
1702
|
-
var SumSubStep =
|
|
1706
|
+
var SumSubStep = z.z["enum"](SUMSUB_STEPS);
|
|
1703
1707
|
var SUMSUB_APPLICANT_TYPES = ["individual", "company"];
|
|
1704
|
-
var SumSubApplicantType =
|
|
1708
|
+
var SumSubApplicantType = z.z["enum"](SUMSUB_APPLICANT_TYPES);
|
|
1705
1709
|
/**
|
|
1706
1710
|
* GREEN — check was successful.
|
|
1707
1711
|
* YELLOW — user is allowed to proceed, final check result will be determined later.
|
|
1708
1712
|
* RED — user has been decisively rejected and is not allowed to proceed.
|
|
1709
1713
|
*/
|
|
1710
1714
|
var SUMSUB_REVIEW_ANSWERS = ["GREEN", "RED", "YELLOW"];
|
|
1711
|
-
var SumSubReviewAnswer =
|
|
1715
|
+
var SumSubReviewAnswer = z.z["enum"](SUMSUB_REVIEW_ANSWERS);
|
|
1712
1716
|
var SUMSUB_REVIEW_REJECT_TYPES = ["FINAL", "RETRY"];
|
|
1713
|
-
var SumSubReviewRejectType =
|
|
1714
|
-
var SumsubReviewDecision =
|
|
1717
|
+
var SumSubReviewRejectType = z.z["enum"](SUMSUB_REVIEW_REJECT_TYPES);
|
|
1718
|
+
var SumsubReviewDecision = z.z.object({
|
|
1715
1719
|
reviewAnswer: SumSubReviewAnswer.nullish(),
|
|
1716
1720
|
reviewRejectType: SumSubReviewRejectType.nullish()
|
|
1717
1721
|
});
|
|
1718
|
-
var SumsubCountryCode =
|
|
1722
|
+
var SumsubCountryCode = z.z.union([vault_schema.ISO3CountryCode, z.z.literal("RKS")]); // SumSub uses RKS for Kosovo instead of XKX
|
|
1719
1723
|
|
|
1720
|
-
var PreprocessedSumSubISO3CountryCode =
|
|
1724
|
+
var PreprocessedSumSubISO3CountryCode = z.z.preprocess(function (country) {
|
|
1721
1725
|
return country === "RKS" ? "XKX" : country;
|
|
1722
1726
|
}, vault_schema.ISO3CountryCode);
|
|
1723
1727
|
|
|
@@ -1731,13 +1735,13 @@ var PreprocessedSumSubISO3CountryCode = zod.z.preprocess(function (country) {
|
|
|
1731
1735
|
* state String Yes State name if applicable.
|
|
1732
1736
|
* #
|
|
1733
1737
|
*/
|
|
1734
|
-
var SumSubAddress =
|
|
1738
|
+
var SumSubAddress = z.z.object({
|
|
1735
1739
|
country: PreprocessedSumSubISO3CountryCode.optional(),
|
|
1736
|
-
postCode:
|
|
1737
|
-
town:
|
|
1738
|
-
street:
|
|
1739
|
-
subStreet:
|
|
1740
|
-
state:
|
|
1740
|
+
postCode: z.z.string().optional(),
|
|
1741
|
+
town: z.z.string().optional(),
|
|
1742
|
+
street: z.z.string().optional(),
|
|
1743
|
+
subStreet: z.z.string().optional(),
|
|
1744
|
+
state: z.z.string().optional()
|
|
1741
1745
|
});
|
|
1742
1746
|
var nullable = function nullable(schema) {
|
|
1743
1747
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
@@ -1749,65 +1753,65 @@ var nullable = function nullable(schema) {
|
|
|
1749
1753
|
acc[key] = value.nullable();
|
|
1750
1754
|
return acc;
|
|
1751
1755
|
}, {});
|
|
1752
|
-
return
|
|
1756
|
+
return z.z.object(newProps);
|
|
1753
1757
|
};
|
|
1754
|
-
var SumSubIdDocs = nullable(
|
|
1755
|
-
idDocType:
|
|
1756
|
-
age:
|
|
1757
|
-
placeOfBirth:
|
|
1758
|
-
stateOfBirth:
|
|
1759
|
-
country:
|
|
1760
|
-
firstName:
|
|
1761
|
-
firstNameEn:
|
|
1762
|
-
middleName:
|
|
1763
|
-
middleNameEn:
|
|
1764
|
-
lastName:
|
|
1765
|
-
lastNameEn:
|
|
1766
|
-
issuedDate:
|
|
1767
|
-
issueAuthority:
|
|
1768
|
-
validUntil:
|
|
1769
|
-
number:
|
|
1770
|
-
additionalNumber:
|
|
1771
|
-
dob:
|
|
1772
|
-
gender:
|
|
1773
|
-
nationality:
|
|
1774
|
-
address: nullable(
|
|
1775
|
-
street:
|
|
1776
|
-
streetEn:
|
|
1777
|
-
stateCode:
|
|
1778
|
-
town:
|
|
1779
|
-
townEn:
|
|
1780
|
-
country:
|
|
1781
|
-
formattedAddress:
|
|
1782
|
-
locationPosition:
|
|
1758
|
+
var SumSubIdDocs = nullable(z.z.object({
|
|
1759
|
+
idDocType: z.z.string(),
|
|
1760
|
+
age: z.z.string(),
|
|
1761
|
+
placeOfBirth: z.z.string(),
|
|
1762
|
+
stateOfBirth: z.z.string(),
|
|
1763
|
+
country: z.z.string(),
|
|
1764
|
+
firstName: z.z.string(),
|
|
1765
|
+
firstNameEn: z.z.string(),
|
|
1766
|
+
middleName: z.z.string(),
|
|
1767
|
+
middleNameEn: z.z.string(),
|
|
1768
|
+
lastName: z.z.string(),
|
|
1769
|
+
lastNameEn: z.z.string(),
|
|
1770
|
+
issuedDate: z.z.string(),
|
|
1771
|
+
issueAuthority: z.z.string(),
|
|
1772
|
+
validUntil: z.z.string(),
|
|
1773
|
+
number: z.z.string(),
|
|
1774
|
+
additionalNumber: z.z.string(),
|
|
1775
|
+
dob: z.z.string(),
|
|
1776
|
+
gender: z.z.string(),
|
|
1777
|
+
nationality: z.z.string(),
|
|
1778
|
+
address: nullable(z.z.object({
|
|
1779
|
+
street: z.z.string(),
|
|
1780
|
+
streetEn: z.z.string(),
|
|
1781
|
+
stateCode: z.z.string(),
|
|
1782
|
+
town: z.z.string(),
|
|
1783
|
+
townEn: z.z.string(),
|
|
1784
|
+
country: z.z.string(),
|
|
1785
|
+
formattedAddress: z.z.string(),
|
|
1786
|
+
locationPosition: z.z.string()
|
|
1783
1787
|
})).partial().nullish(),
|
|
1784
|
-
mrzLine1:
|
|
1785
|
-
mrzLine2:
|
|
1786
|
-
mrzLine3:
|
|
1788
|
+
mrzLine1: z.z.string(),
|
|
1789
|
+
mrzLine2: z.z.string(),
|
|
1790
|
+
mrzLine3: z.z.string()
|
|
1787
1791
|
})).partial();
|
|
1788
|
-
var SumSubApplicantInfo =
|
|
1789
|
-
firstName:
|
|
1790
|
-
lastName:
|
|
1791
|
-
middleName:
|
|
1792
|
-
firstNameEn:
|
|
1793
|
-
lastNameEn:
|
|
1794
|
-
middleNameEn:
|
|
1795
|
-
legalName:
|
|
1796
|
-
gender:
|
|
1797
|
-
dob:
|
|
1798
|
-
placeOfBirth:
|
|
1792
|
+
var SumSubApplicantInfo = z.z.object({
|
|
1793
|
+
firstName: z.z.string().optional().describe("First name."),
|
|
1794
|
+
lastName: z.z.string().optional().describe("Last name."),
|
|
1795
|
+
middleName: z.z.string().optional().describe("Middle name."),
|
|
1796
|
+
firstNameEn: z.z.string().optional().describe("Automatic transliteration of the first name."),
|
|
1797
|
+
lastNameEn: z.z.string().optional().describe("Automatic transliteration of the last name."),
|
|
1798
|
+
middleNameEn: z.z.string().optional().describe("Automatic transliteration of the middle name."),
|
|
1799
|
+
legalName: z.z.string().optional().describe("Legal name of the applicant."),
|
|
1800
|
+
gender: z.z.string().optional().describe("Male or Female"),
|
|
1801
|
+
dob: z.z.string().optional().describe("Date of birth (format YYYY-mm-dd, e.g. 2001-09-25)."),
|
|
1802
|
+
placeOfBirth: z.z.string().optional().describe("Place of birth."),
|
|
1799
1803
|
country: PreprocessedSumSubISO3CountryCode.optional(),
|
|
1800
1804
|
nationality: PreprocessedSumSubISO3CountryCode.optional(),
|
|
1801
|
-
addresses:
|
|
1802
|
-
idDocs:
|
|
1803
|
-
tin:
|
|
1805
|
+
addresses: z.z.array(SumSubAddress).optional().describe("List of addresses."),
|
|
1806
|
+
idDocs: z.z.array(SumSubIdDocs).optional().describe("Represents the set of data recognized from uploaded documents."),
|
|
1807
|
+
tin: z.z.string().optional().describe("Tax Identification Number.")
|
|
1804
1808
|
});
|
|
1805
1809
|
var INDIVIDUAL_BENEFICIARY_RELATIONS = ["director", "shareholder", "other"];
|
|
1806
|
-
var IndividualBeneficiaryRelation =
|
|
1810
|
+
var IndividualBeneficiaryRelation = z.z.union([z.z["enum"](INDIVIDUAL_BENEFICIARY_RELATIONS), z.z.string()]);
|
|
1807
1811
|
var BENEFICIARY_TYPES = ["ubo", "shareholder", "representative", "director"];
|
|
1808
|
-
var BeneficiaryType =
|
|
1809
|
-
var BeneficiaryCompanyCustomerClaims =
|
|
1810
|
-
applicantId:
|
|
1812
|
+
var BeneficiaryType = z.z["enum"](BENEFICIARY_TYPES);
|
|
1813
|
+
var BeneficiaryCompanyCustomerClaims = z.z.object({
|
|
1814
|
+
applicantId: z.z.string().nullish(),
|
|
1811
1815
|
/**
|
|
1812
1816
|
* @deprecated Types should be used instead in V2 SDK. Type is not populated in v2 sumsub sdk
|
|
1813
1817
|
*/
|
|
@@ -1816,38 +1820,38 @@ var BeneficiaryCompanyCustomerClaims = zod.z.object({
|
|
|
1816
1820
|
/**
|
|
1817
1821
|
* @deprecated Only available for Companies onboarded via Sumsub V1 SDK
|
|
1818
1822
|
*/
|
|
1819
|
-
inRegistry:
|
|
1823
|
+
inRegistry: z.z["boolean"]().nullish(),
|
|
1820
1824
|
types: BeneficiaryType.array().nullish(),
|
|
1821
1825
|
/**
|
|
1822
1826
|
* @deprecated Only available for Companies onboarded via Sumsub V1 SDK
|
|
1823
1827
|
*/
|
|
1824
|
-
positions:
|
|
1825
|
-
imageIds:
|
|
1826
|
-
shareSize:
|
|
1827
|
-
});
|
|
1828
|
-
var BeneficiaryCompanyCustomerClaimsArray =
|
|
1829
|
-
var SumSubCompanyApplicantInfo =
|
|
1830
|
-
companyName:
|
|
1831
|
-
registrationNumber:
|
|
1828
|
+
positions: z.z.array(z.z.string()).nullish(),
|
|
1829
|
+
imageIds: z.z.array(z.z.string()).nullish(),
|
|
1830
|
+
shareSize: z.z.coerce.number().nullish()
|
|
1831
|
+
});
|
|
1832
|
+
var BeneficiaryCompanyCustomerClaimsArray = z.z.array(BeneficiaryCompanyCustomerClaims);
|
|
1833
|
+
var SumSubCompanyApplicantInfo = z.z.object({
|
|
1834
|
+
companyName: z.z.string(),
|
|
1835
|
+
registrationNumber: z.z.string(),
|
|
1832
1836
|
country: PreprocessedSumSubISO3CountryCode,
|
|
1833
|
-
legalAddress:
|
|
1834
|
-
incorporatedOn:
|
|
1835
|
-
type:
|
|
1836
|
-
email:
|
|
1837
|
-
phone:
|
|
1838
|
-
controlScheme:
|
|
1839
|
-
taxId:
|
|
1840
|
-
registrationLocation:
|
|
1841
|
-
postalAddress:
|
|
1842
|
-
addresses:
|
|
1843
|
-
website:
|
|
1844
|
-
noUBOs:
|
|
1837
|
+
legalAddress: z.z.string().nullish(),
|
|
1838
|
+
incorporatedOn: z.z.coerce.date().nullish(),
|
|
1839
|
+
type: z.z.string().nullish(),
|
|
1840
|
+
email: z.z.string().nullish(),
|
|
1841
|
+
phone: z.z.string().nullish(),
|
|
1842
|
+
controlScheme: z.z.string().nullish(),
|
|
1843
|
+
taxId: z.z.string().nullish(),
|
|
1844
|
+
registrationLocation: z.z.string().nullish(),
|
|
1845
|
+
postalAddress: z.z.string().nullish(),
|
|
1846
|
+
addresses: z.z.array(z.z.string()).nullish(),
|
|
1847
|
+
website: z.z.string().nullish(),
|
|
1848
|
+
noUBOs: z.z["boolean"]().nullish(),
|
|
1845
1849
|
beneficiaries: BeneficiaryCompanyCustomerClaimsArray.nullish()
|
|
1846
1850
|
});
|
|
1847
1851
|
var SUMSUB_WEBHOOK_INTERNAL_STATUS = ["started", "handled"];
|
|
1848
|
-
var SumsubWebhookInternalStatus =
|
|
1852
|
+
var SumsubWebhookInternalStatus = z.z["enum"](SUMSUB_WEBHOOK_INTERNAL_STATUS);
|
|
1849
1853
|
var SUMSUB_REVIEW_STATUSES = ["init", "pending", "prechecked", "queued", "completed", "onHold"];
|
|
1850
|
-
var SumSubReviewStatus =
|
|
1854
|
+
var SumSubReviewStatus = z.z["enum"](SUMSUB_REVIEW_STATUSES);
|
|
1851
1855
|
/**
|
|
1852
1856
|
* Value Description
|
|
1853
1857
|
* ID_CARD An ID card
|
|
@@ -1873,11 +1877,11 @@ var SumSubReviewStatus = zod.z["enum"](SUMSUB_REVIEW_STATUSES);
|
|
|
1873
1877
|
*/
|
|
1874
1878
|
|
|
1875
1879
|
var SUMSUB_DOC_TYPES = ["ID_CARD", "PASSPORT", "DRIVERS", "RESIDENCE_PERMIT", "UTILITY_BILL", "SELFIE", "VIDEO_SELFIE", "PROFILE_IMAGE", "ID_DOC_PHOTO", "AGREEMENT", "CONTRACT", "DRIVERS_TRANSLATION", "INVESTOR_DOC", "VEHICLE_REGISTRATION_CERTIFICATE", "INCOME_SOURCE", "PAYMENT_METHOD", "BANK_CARD", "COVID_VACCINATION_FORM", "OTHER"];
|
|
1876
|
-
var SumSubDocType =
|
|
1880
|
+
var SumSubDocType = z.z["enum"](SUMSUB_DOC_TYPES);
|
|
1877
1881
|
var SUMSUB_KYC_DOC_TYPES = ["ID_CARD", "PASSPORT", "DRIVERS"];
|
|
1878
|
-
var SumSubKycDocType =
|
|
1882
|
+
var SumSubKycDocType = z.z["enum"](SUMSUB_KYC_DOC_TYPES);
|
|
1879
1883
|
var KYC_DOC_SIDES = ["FRONT_SIDE", "BACK_SIDE"];
|
|
1880
|
-
var KycDocSide =
|
|
1884
|
+
var KycDocSide = z.z["enum"](KYC_DOC_SIDES);
|
|
1881
1885
|
var SUMSUB_FLOW_LEVEL = [
|
|
1882
1886
|
// SumSub v1 flow levels - kept for backward compatibility - Delete after SumSub v2 is fully deployed
|
|
1883
1887
|
"basic-kyc-level", "basic-kyc-level-aml", "liveness-level", "id+liveness", "kyc", "phone-level", "kyc_video", "nid-idscan-selfie-por", "NID - ID Scan + Selfie + POR", "nid-idscan-selfie", "NIDKYB", "selfie", "ID Scan", "basic-kyc-level-v2-aml", "liveness-level-v2", "id-liveness-v2", "kyc-v2", "phone-level-v2", "kyc-video-v2", "nid-idscan-selfie-por-v2", "nid-idscan-selfie-por-v2", "nid-idscan-selfie-v2", "nid-kyb-v2", "kyc-video-id-selfie-v2", "kyc-video-id-selfie-por-v2", "kyc-video-id+selfie",
|
|
@@ -1885,326 +1889,326 @@ var SUMSUB_FLOW_LEVEL = [
|
|
|
1885
1889
|
|
|
1886
1890
|
// SumSub v2 flow levels - use these for new integrations
|
|
1887
1891
|
"NIDKYB-SDKV2", "basic-kyc-level-v2", "selfie-v2", "id-scan-v2", "kyc-video-id-selfie-v2"];
|
|
1888
|
-
var SumSubFlowLevel =
|
|
1889
|
-
var SumSubRequiredIdDoc =
|
|
1890
|
-
videoIdent:
|
|
1891
|
-
docSets:
|
|
1892
|
+
var SumSubFlowLevel = z.z["enum"](SUMSUB_FLOW_LEVEL);
|
|
1893
|
+
var SumSubRequiredIdDoc = z.z.object({
|
|
1894
|
+
videoIdent: z.z["boolean"]().nullish(),
|
|
1895
|
+
docSets: z.z.array(z.z.object({
|
|
1892
1896
|
idDocSetType: SumSubStep,
|
|
1893
|
-
types:
|
|
1897
|
+
types: z.z.array(SumSubDocType).nullish()
|
|
1894
1898
|
})).nullish()
|
|
1895
1899
|
});
|
|
1896
|
-
var UploadDocumentRequest =
|
|
1897
|
-
applicantId:
|
|
1900
|
+
var UploadDocumentRequest = z.z.object({
|
|
1901
|
+
applicantId: z.z.string(),
|
|
1898
1902
|
country: vault_schema.ISO3CountryCode,
|
|
1899
|
-
customerId:
|
|
1900
|
-
cmsProjectId:
|
|
1901
|
-
sessionId:
|
|
1902
|
-
file:
|
|
1903
|
+
customerId: z.z.string().uuid(),
|
|
1904
|
+
cmsProjectId: z.z.string(),
|
|
1905
|
+
sessionId: z.z.string(),
|
|
1906
|
+
file: z.z["instanceof"](File)
|
|
1903
1907
|
});
|
|
1904
1908
|
|
|
1905
|
-
var SumSubReviewResultSchema =
|
|
1909
|
+
var SumSubReviewResultSchema = z.z.object({
|
|
1906
1910
|
reviewAnswer: SumSubReviewAnswer.optional(),
|
|
1907
|
-
rejectLabels:
|
|
1911
|
+
rejectLabels: z.z.array(SumSubReviewRejectLabel).optional(),
|
|
1908
1912
|
reviewRejectType: SumSubReviewRejectType.optional(),
|
|
1909
|
-
clientComment:
|
|
1910
|
-
moderationComment:
|
|
1911
|
-
buttonIds:
|
|
1912
|
-
reviewDate:
|
|
1913
|
+
clientComment: z.z.string().optional(),
|
|
1914
|
+
moderationComment: z.z.string().optional(),
|
|
1915
|
+
buttonIds: z.z.array(z.z.string()).optional(),
|
|
1916
|
+
reviewDate: z.z.coerce.date().optional()
|
|
1913
1917
|
});
|
|
1914
|
-
var SumSubImageReviewResultSchema =
|
|
1918
|
+
var SumSubImageReviewResultSchema = z.z.object({
|
|
1915
1919
|
reviewAnswer: SumSubReviewAnswer.optional(),
|
|
1916
|
-
moderationComment:
|
|
1917
|
-
clientComment:
|
|
1918
|
-
rejectLabels:
|
|
1920
|
+
moderationComment: z.z.string().optional(),
|
|
1921
|
+
clientComment: z.z.string().optional(),
|
|
1922
|
+
rejectLabels: z.z.array(SumSubReviewRejectLabel).optional(),
|
|
1919
1923
|
reviewRejectType: SumSubReviewRejectType.optional()
|
|
1920
1924
|
});
|
|
1921
|
-
var SumSubImageStatus =
|
|
1922
|
-
imageId:
|
|
1923
|
-
idDocSubType:
|
|
1925
|
+
var SumSubImageStatus = z.z.object({
|
|
1926
|
+
imageId: z.z.number(),
|
|
1927
|
+
idDocSubType: z.z.string(),
|
|
1924
1928
|
reviewResult: SumSubImageReviewResultSchema.nullish()
|
|
1925
1929
|
});
|
|
1926
1930
|
var SumsubApplicantTypes = ["individual", "company"];
|
|
1927
|
-
var SumsubApplicantType =
|
|
1928
|
-
var SumSubIndividualApplicantSchema =
|
|
1929
|
-
id:
|
|
1930
|
-
createdAt:
|
|
1931
|
-
sourceKey:
|
|
1932
|
-
email:
|
|
1933
|
-
phone:
|
|
1934
|
-
lang:
|
|
1935
|
-
metadata:
|
|
1936
|
-
key:
|
|
1937
|
-
clientId:
|
|
1938
|
-
inspectionId:
|
|
1939
|
-
externalUserId:
|
|
1931
|
+
var SumsubApplicantType = z.z["enum"](SumsubApplicantTypes);
|
|
1932
|
+
var SumSubIndividualApplicantSchema = z.z.object({
|
|
1933
|
+
id: z.z.string().describe("An applicantId."),
|
|
1934
|
+
createdAt: z.z.string().describe("Date of creation of the applicant."),
|
|
1935
|
+
sourceKey: z.z.string().describe("If you want to separate your clients that send applicants, provide this field to distinguish between them. It also shows up at the webhook payloads.").optional(),
|
|
1936
|
+
email: z.z.string().optional(),
|
|
1937
|
+
phone: z.z.string().optional(),
|
|
1938
|
+
lang: z.z.string().optional().describe("The language in which the applicant should see the result of verification in ISO 639-1 format."),
|
|
1939
|
+
metadata: z.z.array(z.z.record(z.z.string())).optional().describe("Additional information that is not displayed to the end user"),
|
|
1940
|
+
key: z.z.string(),
|
|
1941
|
+
clientId: z.z.string(),
|
|
1942
|
+
inspectionId: z.z.string(),
|
|
1943
|
+
externalUserId: z.z.string(),
|
|
1940
1944
|
info: SumSubApplicantInfo.nullish(),
|
|
1941
1945
|
requiredIdDocs: SumSubRequiredIdDoc.nullish(),
|
|
1942
1946
|
fixedInfo: SumSubApplicantInfo.nullish(),
|
|
1943
|
-
applicantPlatform:
|
|
1944
|
-
ipCountry:
|
|
1945
|
-
agreement:
|
|
1946
|
-
createdAt:
|
|
1947
|
-
source:
|
|
1948
|
-
targets:
|
|
1949
|
-
privacyNoticeUrl:
|
|
1947
|
+
applicantPlatform: z.z.string().optional(),
|
|
1948
|
+
ipCountry: z.z.string().optional(),
|
|
1949
|
+
agreement: z.z.object({
|
|
1950
|
+
createdAt: z.z.string(),
|
|
1951
|
+
source: z.z.string(),
|
|
1952
|
+
targets: z.z.array(z.z.string()).optional(),
|
|
1953
|
+
privacyNoticeUrl: z.z.string().nullish()
|
|
1950
1954
|
}).nullish(),
|
|
1951
|
-
review:
|
|
1952
|
-
reviewId:
|
|
1953
|
-
attemptId:
|
|
1954
|
-
attemptCnt:
|
|
1955
|
-
elapsedSincePendingMs:
|
|
1956
|
-
elapsedSinceQueuedMs:
|
|
1957
|
-
reprocessing:
|
|
1958
|
-
levelName:
|
|
1959
|
-
levelAutoCheckMode:
|
|
1960
|
-
createDate:
|
|
1961
|
-
reviewDate:
|
|
1955
|
+
review: z.z.object({
|
|
1956
|
+
reviewId: z.z.string().optional(),
|
|
1957
|
+
attemptId: z.z.string().optional(),
|
|
1958
|
+
attemptCnt: z.z.number().optional(),
|
|
1959
|
+
elapsedSincePendingMs: z.z.number().optional(),
|
|
1960
|
+
elapsedSinceQueuedMs: z.z.number().optional(),
|
|
1961
|
+
reprocessing: z.z["boolean"]().optional(),
|
|
1962
|
+
levelName: z.z.string(),
|
|
1963
|
+
levelAutoCheckMode: z.z["null"]().optional(),
|
|
1964
|
+
createDate: z.z.coerce.date().optional(),
|
|
1965
|
+
reviewDate: z.z.coerce.date().optional(),
|
|
1962
1966
|
reviewResult: SumSubReviewResultSchema.optional(),
|
|
1963
1967
|
reviewStatus: SumSubReviewStatus.optional(),
|
|
1964
|
-
startDate:
|
|
1965
|
-
confirmed:
|
|
1966
|
-
priority:
|
|
1967
|
-
autoChecked:
|
|
1968
|
+
startDate: z.z.coerce.date().optional(),
|
|
1969
|
+
confirmed: z.z["boolean"]().optional(),
|
|
1970
|
+
priority: z.z.number(),
|
|
1971
|
+
autoChecked: z.z["boolean"]().optional()
|
|
1968
1972
|
}),
|
|
1969
1973
|
type: SumsubApplicantType
|
|
1970
1974
|
});
|
|
1971
|
-
var SumSubCompanyApplicantSchema =
|
|
1972
|
-
id:
|
|
1973
|
-
createdAt:
|
|
1974
|
-
inspectionId:
|
|
1975
|
-
externalUserId:
|
|
1976
|
-
info:
|
|
1977
|
-
idDocs:
|
|
1978
|
-
idDocType:
|
|
1979
|
-
country:
|
|
1975
|
+
var SumSubCompanyApplicantSchema = z.z.object({
|
|
1976
|
+
id: z.z.string(),
|
|
1977
|
+
createdAt: z.z.string(),
|
|
1978
|
+
inspectionId: z.z.string(),
|
|
1979
|
+
externalUserId: z.z.string(),
|
|
1980
|
+
info: z.z.object({
|
|
1981
|
+
idDocs: z.z.array(z.z.object({
|
|
1982
|
+
idDocType: z.z.string(),
|
|
1983
|
+
country: z.z.string()
|
|
1980
1984
|
})).nullish()
|
|
1981
1985
|
}).nullish(),
|
|
1982
|
-
fixedInfo:
|
|
1986
|
+
fixedInfo: z.z.object({
|
|
1983
1987
|
companyInfo: SumSubCompanyApplicantInfo.nullish()
|
|
1984
1988
|
// More available fields in fixedInfo https://docs.sumsub.com/reference/get-applicant-data#fixedinfo-attributes
|
|
1985
1989
|
}).nullish(),
|
|
1986
|
-
applicantPlatform:
|
|
1987
|
-
ipCountry:
|
|
1988
|
-
agreement:
|
|
1989
|
-
createdAt:
|
|
1990
|
-
acceptedAt:
|
|
1991
|
-
source:
|
|
1992
|
-
targets:
|
|
1993
|
-
privacyNoticeUrl:
|
|
1990
|
+
applicantPlatform: z.z.string(),
|
|
1991
|
+
ipCountry: z.z.string().nullish(),
|
|
1992
|
+
agreement: z.z.object({
|
|
1993
|
+
createdAt: z.z.string().optional(),
|
|
1994
|
+
acceptedAt: z.z.string().optional(),
|
|
1995
|
+
source: z.z.string().optional(),
|
|
1996
|
+
targets: z.z.array(z.z.string()).optional(),
|
|
1997
|
+
privacyNoticeUrl: z.z.string().optional()
|
|
1994
1998
|
}).nullish(),
|
|
1995
|
-
review:
|
|
1996
|
-
reviewId:
|
|
1997
|
-
attemptId:
|
|
1998
|
-
attemptCnt:
|
|
1999
|
-
elapsedSincePendingMs:
|
|
2000
|
-
elapsedSinceQueuedMs:
|
|
2001
|
-
reprocessing:
|
|
2002
|
-
levelName:
|
|
2003
|
-
levelAutoCheckMode:
|
|
2004
|
-
createDate:
|
|
2005
|
-
reviewDate:
|
|
1999
|
+
review: z.z.object({
|
|
2000
|
+
reviewId: z.z.string().optional(),
|
|
2001
|
+
attemptId: z.z.string().optional(),
|
|
2002
|
+
attemptCnt: z.z.number().optional(),
|
|
2003
|
+
elapsedSincePendingMs: z.z.number().optional(),
|
|
2004
|
+
elapsedSinceQueuedMs: z.z.number().optional(),
|
|
2005
|
+
reprocessing: z.z["boolean"]().optional(),
|
|
2006
|
+
levelName: z.z.string(),
|
|
2007
|
+
levelAutoCheckMode: z.z["null"]().optional(),
|
|
2008
|
+
createDate: z.z.coerce.date().optional(),
|
|
2009
|
+
reviewDate: z.z.coerce.date().optional(),
|
|
2006
2010
|
reviewResult: SumSubReviewResultSchema.optional(),
|
|
2007
2011
|
reviewStatus: SumSubReviewStatus.optional(),
|
|
2008
|
-
confirmed:
|
|
2009
|
-
priority:
|
|
2012
|
+
confirmed: z.z["boolean"]().optional(),
|
|
2013
|
+
priority: z.z.number()
|
|
2010
2014
|
}),
|
|
2011
|
-
lang:
|
|
2015
|
+
lang: z.z.string().nullish(),
|
|
2012
2016
|
type: SumsubApplicantType
|
|
2013
2017
|
});
|
|
2014
|
-
var SumSubImageId =
|
|
2018
|
+
var SumSubImageId = z.z.coerce.number();
|
|
2015
2019
|
var SUMSUB_COMPANY_BENEFICIARY_GROUP = ["company", "ubos", "shareholders", "representatives", "directors"];
|
|
2016
|
-
var SumsubCompanyBeneficiaryGroup =
|
|
2017
|
-
var SumsubStepStatus =
|
|
2020
|
+
var SumsubCompanyBeneficiaryGroup = z.z["enum"](SUMSUB_COMPANY_BENEFICIARY_GROUP);
|
|
2021
|
+
var SumsubStepStatus = z.z.object({
|
|
2018
2022
|
name: SumsubCompanyBeneficiaryGroup,
|
|
2019
2023
|
reviewStatus: SumSubReviewStatus.nullish(),
|
|
2020
2024
|
reviewResult: SumSubReviewResultSchema.nullish(),
|
|
2021
|
-
images:
|
|
2025
|
+
images: z.z.array(z.z.object({
|
|
2022
2026
|
imageId: SumSubImageId,
|
|
2023
|
-
idDocType:
|
|
2024
|
-
idDocSubType:
|
|
2027
|
+
idDocType: z.z.string(),
|
|
2028
|
+
idDocSubType: z.z.string()
|
|
2025
2029
|
})).nullish()
|
|
2026
2030
|
});
|
|
2027
|
-
var SumSubVerificationStepSchema =
|
|
2031
|
+
var SumSubVerificationStepSchema = z.z.object({
|
|
2028
2032
|
reviewResult: SumSubReviewResultSchema.optional(),
|
|
2029
|
-
country:
|
|
2030
|
-
idDocType:
|
|
2031
|
-
imageIds:
|
|
2032
|
-
imageReviewResults:
|
|
2033
|
-
imageStatuses:
|
|
2034
|
-
stepStatuses:
|
|
2035
|
-
});
|
|
2036
|
-
var SumSubApplicantVerificationStepSchema =
|
|
2033
|
+
country: z.z.string().nullish(),
|
|
2034
|
+
idDocType: z.z.string().nullish(),
|
|
2035
|
+
imageIds: z.z.array(SumSubImageId).nullish(),
|
|
2036
|
+
imageReviewResults: z.z.record(SumSubImageId, SumSubImageReviewResultSchema).nullish(),
|
|
2037
|
+
imageStatuses: z.z.array(SumSubImageStatus).nullish(),
|
|
2038
|
+
stepStatuses: z.z.array(SumsubStepStatus).nullish()
|
|
2039
|
+
});
|
|
2040
|
+
var SumSubApplicantVerificationStepSchema = z.z.record(SumSubStep, SumSubVerificationStepSchema.nullish()).nullish();
|
|
2037
2041
|
var SUMSUB_MEDIA_CONTENT_TYPES = ["image/jpeg", "image/png", "application/pdf", "video/mp4", "video/webm", "video/quicktime"];
|
|
2038
|
-
var SumSubMediaContentType =
|
|
2039
|
-
var DocumentMetadataSchema =
|
|
2040
|
-
country:
|
|
2041
|
-
idDocType:
|
|
2042
|
-
idDocSubType:
|
|
2043
|
-
firstName:
|
|
2044
|
-
lastName:
|
|
2045
|
-
dob:
|
|
2046
|
-
placeOfBirth:
|
|
2047
|
-
issuedDate:
|
|
2048
|
-
validUntil:
|
|
2049
|
-
number:
|
|
2050
|
-
errors:
|
|
2051
|
-
warnings:
|
|
2042
|
+
var SumSubMediaContentType = z.z["enum"](SUMSUB_MEDIA_CONTENT_TYPES);
|
|
2043
|
+
var DocumentMetadataSchema = z.z.object({
|
|
2044
|
+
country: z.z.string(),
|
|
2045
|
+
idDocType: z.z.string(),
|
|
2046
|
+
idDocSubType: z.z.string().nullish(),
|
|
2047
|
+
firstName: z.z.string().nullish(),
|
|
2048
|
+
lastName: z.z.string().nullish(),
|
|
2049
|
+
dob: z.z.string().nullish(),
|
|
2050
|
+
placeOfBirth: z.z.string().nullish(),
|
|
2051
|
+
issuedDate: z.z.string().nullish(),
|
|
2052
|
+
validUntil: z.z.string().nullish(),
|
|
2053
|
+
number: z.z.string().nullish(),
|
|
2054
|
+
errors: z.z.string().array().nullish(),
|
|
2055
|
+
warnings: z.z.string().array().nullish()
|
|
2052
2056
|
});
|
|
2053
2057
|
var DocumentSubmitResponse = DocumentMetadataSchema.extend({
|
|
2054
2058
|
imageId: SumSubImageId
|
|
2055
2059
|
});
|
|
2056
|
-
var SumSubApplicantReviewStatusSchema =
|
|
2057
|
-
createDate:
|
|
2058
|
-
reviewDate:
|
|
2059
|
-
startDate:
|
|
2060
|
+
var SumSubApplicantReviewStatusSchema = z.z.object({
|
|
2061
|
+
createDate: z.z.string().optional(),
|
|
2062
|
+
reviewDate: z.z.string().optional(),
|
|
2063
|
+
startDate: z.z.string().optional(),
|
|
2060
2064
|
reviewResult: SumSubReviewResultSchema.optional(),
|
|
2061
2065
|
reviewStatus: SumSubReviewStatus.optional(),
|
|
2062
|
-
levelName:
|
|
2063
|
-
attemptCnt:
|
|
2064
|
-
});
|
|
2065
|
-
var SumSubApplicantResetSchema =
|
|
2066
|
-
ok:
|
|
2067
|
-
});
|
|
2068
|
-
var SumSubGenerateExternalWebSdkLinkSchema =
|
|
2069
|
-
url:
|
|
2070
|
-
});
|
|
2071
|
-
var SumsubVideoCallData =
|
|
2072
|
-
id:
|
|
2073
|
-
videoIdentData:
|
|
2074
|
-
reviewStatus:
|
|
2075
|
-
roomId:
|
|
2076
|
-
modifiedAt:
|
|
2077
|
-
moderatorDisplayName:
|
|
2078
|
-
compositions:
|
|
2079
|
-
compositionSid:
|
|
2080
|
-
roomSid:
|
|
2081
|
-
roomDuration:
|
|
2082
|
-
compositionDuration:
|
|
2083
|
-
compositionMediaId:
|
|
2066
|
+
levelName: z.z.string().optional(),
|
|
2067
|
+
attemptCnt: z.z.number().optional()
|
|
2068
|
+
});
|
|
2069
|
+
var SumSubApplicantResetSchema = z.z.object({
|
|
2070
|
+
ok: z.z.literal(1)
|
|
2071
|
+
});
|
|
2072
|
+
var SumSubGenerateExternalWebSdkLinkSchema = z.z.object({
|
|
2073
|
+
url: z.z.string()
|
|
2074
|
+
});
|
|
2075
|
+
var SumsubVideoCallData = z.z.object({
|
|
2076
|
+
id: z.z.string(),
|
|
2077
|
+
videoIdentData: z.z.object({
|
|
2078
|
+
reviewStatus: z.z.string().nullish(),
|
|
2079
|
+
roomId: z.z.string().nullish(),
|
|
2080
|
+
modifiedAt: z.z.string().nullish(),
|
|
2081
|
+
moderatorDisplayName: z.z.string().nullish(),
|
|
2082
|
+
compositions: z.z.array(z.z.object({
|
|
2083
|
+
compositionSid: z.z.string(),
|
|
2084
|
+
roomSid: z.z.string(),
|
|
2085
|
+
roomDuration: z.z.number(),
|
|
2086
|
+
compositionDuration: z.z.number(),
|
|
2087
|
+
compositionMediaId: z.z.string()
|
|
2084
2088
|
}).nullish()).nullish()
|
|
2085
2089
|
}).nullish()
|
|
2086
2090
|
});
|
|
2087
|
-
var SumsubKycDataSchema =
|
|
2088
|
-
id:
|
|
2089
|
-
sumsubApplicantId:
|
|
2090
|
-
kycSessionId:
|
|
2091
|
+
var SumsubKycDataSchema = z.z.object({
|
|
2092
|
+
id: z.z.string(),
|
|
2093
|
+
sumsubApplicantId: z.z.string(),
|
|
2094
|
+
kycSessionId: z.z.string(),
|
|
2091
2095
|
applicantData: SumSubIndividualApplicantSchema,
|
|
2092
|
-
createdAt:
|
|
2093
|
-
updatedAt:
|
|
2096
|
+
createdAt: z.z.coerce.date(),
|
|
2097
|
+
updatedAt: z.z.coerce.date()
|
|
2094
2098
|
});
|
|
2095
|
-
var SumsubKybDataSchema =
|
|
2096
|
-
id:
|
|
2097
|
-
sumsubApplicantId:
|
|
2098
|
-
kybSessionId:
|
|
2099
|
+
var SumsubKybDataSchema = z.z.object({
|
|
2100
|
+
id: z.z.string(),
|
|
2101
|
+
sumsubApplicantId: z.z.string(),
|
|
2102
|
+
kybSessionId: z.z.string(),
|
|
2099
2103
|
applicantData: SumSubCompanyApplicantSchema,
|
|
2100
|
-
createdAt:
|
|
2101
|
-
updatedAt:
|
|
2104
|
+
createdAt: z.z.coerce.date(),
|
|
2105
|
+
updatedAt: z.z.coerce.date()
|
|
2102
2106
|
});
|
|
2103
|
-
var SumSubApplicantSchema =
|
|
2107
|
+
var SumSubApplicantSchema = z.z.union([SumSubIndividualApplicantSchema, SumSubCompanyApplicantSchema]);
|
|
2104
2108
|
var SUMSUB_KYB_SESSION_FLOW_SECTION_STATUS = ["pending", "success", "failed"];
|
|
2105
|
-
var SumsubKybSessionFlowSectionStatus =
|
|
2106
|
-
var SumsubKybSessionFlowSectionItem =
|
|
2107
|
-
name:
|
|
2108
|
-
detail:
|
|
2109
|
+
var SumsubKybSessionFlowSectionStatus = z.z["enum"](SUMSUB_KYB_SESSION_FLOW_SECTION_STATUS);
|
|
2110
|
+
var SumsubKybSessionFlowSectionItem = z.z.object({
|
|
2111
|
+
name: z.z.string(),
|
|
2112
|
+
detail: z.z.string(),
|
|
2109
2113
|
status: SumsubKybSessionFlowSectionStatus
|
|
2110
2114
|
});
|
|
2111
|
-
var SumsubKybSessionFlowSection =
|
|
2112
|
-
var MatchType =
|
|
2113
|
-
var SumSubSimilarApplicantSchema =
|
|
2115
|
+
var SumsubKybSessionFlowSection = z.z.array(SumsubKybSessionFlowSectionItem);
|
|
2116
|
+
var MatchType = z.z["enum"](["text", "image"]);
|
|
2117
|
+
var SumSubSimilarApplicantSchema = z.z.object({
|
|
2114
2118
|
applicant: SumSubApplicantSchema.optional(),
|
|
2115
|
-
matchedFields:
|
|
2116
|
-
exactMatch:
|
|
2117
|
-
blacklisted:
|
|
2118
|
-
sameSource:
|
|
2119
|
-
types:
|
|
2120
|
-
originalImageId:
|
|
2121
|
-
similaritySource:
|
|
2122
|
-
similarityConfidence:
|
|
2123
|
-
});
|
|
2124
|
-
var SumSubSimilarApplicantsSchema =
|
|
2125
|
-
similarApplicants:
|
|
2126
|
-
});
|
|
2127
|
-
var SumSubImageIdDocDef =
|
|
2128
|
-
country:
|
|
2129
|
-
idDocType:
|
|
2130
|
-
idDocSubType:
|
|
2131
|
-
});
|
|
2132
|
-
var SumSubImageFileMetadataResolution =
|
|
2133
|
-
width:
|
|
2134
|
-
height:
|
|
2135
|
-
});
|
|
2136
|
-
var SumSubImageFileMetadata =
|
|
2137
|
-
fileName:
|
|
2138
|
-
fileType:
|
|
2139
|
-
fileSize:
|
|
2119
|
+
matchedFields: z.z.array(z.z.string().optional()).optional(),
|
|
2120
|
+
exactMatch: z.z["boolean"]().optional(),
|
|
2121
|
+
blacklisted: z.z["boolean"]().optional(),
|
|
2122
|
+
sameSource: z.z["boolean"]().optional(),
|
|
2123
|
+
types: z.z.array(MatchType).optional(),
|
|
2124
|
+
originalImageId: z.z.number().optional(),
|
|
2125
|
+
similaritySource: z.z.any().optional(),
|
|
2126
|
+
similarityConfidence: z.z.any().optional()
|
|
2127
|
+
});
|
|
2128
|
+
var SumSubSimilarApplicantsSchema = z.z.object({
|
|
2129
|
+
similarApplicants: z.z.array(SumSubSimilarApplicantSchema).optional()
|
|
2130
|
+
});
|
|
2131
|
+
var SumSubImageIdDocDef = z.z.object({
|
|
2132
|
+
country: z.z.string().optional(),
|
|
2133
|
+
idDocType: z.z.string().optional(),
|
|
2134
|
+
idDocSubType: z.z.string()
|
|
2135
|
+
});
|
|
2136
|
+
var SumSubImageFileMetadataResolution = z.z.object({
|
|
2137
|
+
width: z.z.number().optional(),
|
|
2138
|
+
height: z.z.number().optional()
|
|
2139
|
+
});
|
|
2140
|
+
var SumSubImageFileMetadata = z.z.object({
|
|
2141
|
+
fileName: z.z.string().optional(),
|
|
2142
|
+
fileType: z.z.string().optional(),
|
|
2143
|
+
fileSize: z.z.number().optional(),
|
|
2140
2144
|
resolution: SumSubImageFileMetadataResolution.nullish()
|
|
2141
2145
|
});
|
|
2142
|
-
var ApplicantImageItem =
|
|
2143
|
-
id:
|
|
2144
|
-
previewId:
|
|
2145
|
-
addedDate:
|
|
2146
|
+
var ApplicantImageItem = z.z.object({
|
|
2147
|
+
id: z.z.string(),
|
|
2148
|
+
previewId: z.z.string().optional(),
|
|
2149
|
+
addedDate: z.z.string().optional(),
|
|
2146
2150
|
fileMetadata: SumSubImageFileMetadata.optional(),
|
|
2147
2151
|
idDocDef: SumSubImageIdDocDef,
|
|
2148
2152
|
reviewResult: SumSubImageReviewResultSchema.optional(),
|
|
2149
|
-
attemptId:
|
|
2150
|
-
source:
|
|
2151
|
-
deactivated:
|
|
2153
|
+
attemptId: z.z.string().optional(),
|
|
2154
|
+
source: z.z.string().optional(),
|
|
2155
|
+
deactivated: z.z["boolean"]().optional()
|
|
2152
2156
|
});
|
|
2153
|
-
var ApplicantImages =
|
|
2154
|
-
items:
|
|
2155
|
-
totalItems:
|
|
2157
|
+
var ApplicantImages = z.z.object({
|
|
2158
|
+
items: z.z.array(ApplicantImageItem),
|
|
2159
|
+
totalItems: z.z.number()
|
|
2156
2160
|
});
|
|
2157
2161
|
|
|
2158
2162
|
var WEBHOOK_TYPES = ["applicantReviewed", "applicantCreated", "applicantPending", "applicantOnHold", "applicantPersonalInfoChanged", "applicantPrechecked", "applicantDeleted", "applicantLevelChanged", "videoIdentStatusChanged", "applicantReset", "applicantActionPending", "applicantActionReviewed", "applicantActionOnHold", "applicantTravelRuleStatusChanged", "applicantWorkflowCompleted", "applicantTagsChanged"];
|
|
2159
|
-
var WebhookType =
|
|
2160
|
-
var ApplicantMemberOfSchema =
|
|
2161
|
-
applicantId:
|
|
2163
|
+
var WebhookType = z.z["enum"](WEBHOOK_TYPES);
|
|
2164
|
+
var ApplicantMemberOfSchema = z.z.array(z.z.object({
|
|
2165
|
+
applicantId: z.z.string()
|
|
2162
2166
|
}));
|
|
2163
|
-
var SumSubWebhookSchema =
|
|
2164
|
-
applicantId:
|
|
2165
|
-
inspectionId:
|
|
2167
|
+
var SumSubWebhookSchema = z.z.object({
|
|
2168
|
+
applicantId: z.z.string(),
|
|
2169
|
+
inspectionId: z.z.string(),
|
|
2166
2170
|
applicantType: SumSubApplicantType,
|
|
2167
2171
|
// when type is "applicantOnHold" | "applicantPersonalInfoChanged"
|
|
2168
|
-
correlationId:
|
|
2172
|
+
correlationId: z.z.string(),
|
|
2169
2173
|
levelName: SumSubFlowLevel,
|
|
2170
|
-
sandboxMode:
|
|
2171
|
-
externalUserId:
|
|
2174
|
+
sandboxMode: z.z.coerce["boolean"](),
|
|
2175
|
+
externalUserId: z.z.string(),
|
|
2172
2176
|
// should be UUID String because this is our internal user id
|
|
2173
2177
|
type: WebhookType,
|
|
2174
2178
|
reviewResult: SumSubReviewResultSchema.nullish(),
|
|
2175
2179
|
// when type is "applicantReviewed" | "applicantPersonalInfoChanged"
|
|
2176
2180
|
reviewStatus: SumSubReviewStatus,
|
|
2177
|
-
createdAtMs:
|
|
2178
|
-
clientId:
|
|
2179
|
-
videoIdentReviewStatus:
|
|
2181
|
+
createdAtMs: z.z.string().nullish(),
|
|
2182
|
+
clientId: z.z.string(),
|
|
2183
|
+
videoIdentReviewStatus: z.z.string().nullish(),
|
|
2180
2184
|
// when type is "videoIdentStatusChanged"
|
|
2181
2185
|
applicantMemberOf: ApplicantMemberOfSchema.nullish(),
|
|
2182
2186
|
// for beneficiaries related to companies
|
|
2183
|
-
sessionId:
|
|
2184
|
-
});
|
|
2185
|
-
var BaseApplicantActionSchema =
|
|
2186
|
-
applicantId:
|
|
2187
|
-
applicantActionId:
|
|
2188
|
-
inspectionId:
|
|
2189
|
-
correlationId:
|
|
2190
|
-
externalUserId:
|
|
2187
|
+
sessionId: z.z.string().nullish() //KYC/KYB session id
|
|
2188
|
+
});
|
|
2189
|
+
var BaseApplicantActionSchema = z.z.object({
|
|
2190
|
+
applicantId: z.z.string(),
|
|
2191
|
+
applicantActionId: z.z.string(),
|
|
2192
|
+
inspectionId: z.z.string(),
|
|
2193
|
+
correlationId: z.z.string(),
|
|
2194
|
+
externalUserId: z.z.string(),
|
|
2191
2195
|
// should be UUID String because this is our internal user id
|
|
2192
2196
|
type: WebhookType,
|
|
2193
2197
|
reviewStatus: SumSubReviewStatus,
|
|
2194
|
-
createdAtMs:
|
|
2195
|
-
externalApplicantActionId:
|
|
2198
|
+
createdAtMs: z.z.string(),
|
|
2199
|
+
externalApplicantActionId: z.z.string(),
|
|
2196
2200
|
applicantType: SumSubApplicantType,
|
|
2197
2201
|
reviewResult: SumSubReviewResultSchema
|
|
2198
2202
|
});
|
|
2199
2203
|
|
|
2200
2204
|
var KYC_STEP_TYPES = ["Started", "TermsAndConditionsAccepted", "EmailVerification", "Identity", "Liveness", "ProofOfResidence", "ContactInfo", "CredentialsClaimed"];
|
|
2201
|
-
var KycStep =
|
|
2205
|
+
var KycStep = z.z["enum"](KYC_STEP_TYPES);
|
|
2202
2206
|
var KycStepStatuses = ["IN_PROGRESS", "SUCCEEDED", "FAILED", "RETRYABLE"];
|
|
2203
|
-
var KycStepStatus =
|
|
2207
|
+
var KycStepStatus = z.z["enum"](KycStepStatuses);
|
|
2204
2208
|
var KYC_RESULTS = ["Passed", "ToBeManuallyChecked",
|
|
2205
2209
|
// use in case applicantReviewed event comes without reviewResult.reviewAnswer
|
|
2206
2210
|
"Rejected", "Retry"];
|
|
2207
|
-
var KycResult =
|
|
2211
|
+
var KycResult = z.z["enum"](KYC_RESULTS);
|
|
2208
2212
|
var KYC_SESSION_STATUSES = ["NotStarted",
|
|
2209
2213
|
// when we ask for current session and it does not exists
|
|
2210
2214
|
"Started",
|
|
@@ -2219,187 +2223,187 @@ var KYC_SESSION_STATUSES = ["NotStarted",
|
|
|
2219
2223
|
// once verifiable credentials were claimed
|
|
2220
2224
|
"Closed" // when we close the session at the end of the flow
|
|
2221
2225
|
];
|
|
2222
|
-
var KycSessionStatus =
|
|
2223
|
-
var EmailVerificationResponse =
|
|
2224
|
-
emailVerificationId:
|
|
2225
|
-
email:
|
|
2226
|
-
verified:
|
|
2226
|
+
var KycSessionStatus = z.z["enum"](KYC_SESSION_STATUSES);
|
|
2227
|
+
var EmailVerificationResponse = z.z.object({
|
|
2228
|
+
emailVerificationId: z.z.string().uuid(),
|
|
2229
|
+
email: z.z.string().email(),
|
|
2230
|
+
verified: z.z["boolean"]()
|
|
2227
2231
|
});
|
|
2228
|
-
var SelectKycSessionStep =
|
|
2232
|
+
var SelectKycSessionStep = z.z.object({
|
|
2229
2233
|
id: vault_schema.UuidString,
|
|
2230
2234
|
type: KycStep,
|
|
2231
2235
|
customerId: vault_schema.UuidString,
|
|
2232
2236
|
kycSessionId: vault_schema.UuidString,
|
|
2233
|
-
createdAt:
|
|
2237
|
+
createdAt: z.z.coerce.date()
|
|
2234
2238
|
});
|
|
2235
2239
|
var APPLICANT_CHECK_STATUSES = ["PENDING", "IN_PROGRESS", "COMPLETED", "FAILED"];
|
|
2236
|
-
var ApplicantCheckStatus =
|
|
2237
|
-
var SelectKycSession =
|
|
2240
|
+
var ApplicantCheckStatus = z.z["enum"](APPLICANT_CHECK_STATUSES);
|
|
2241
|
+
var SelectKycSession = z.z.object({
|
|
2238
2242
|
id: vault_schema.UuidString,
|
|
2239
2243
|
customerId: vault_schema.UuidString,
|
|
2240
2244
|
identityId: vault_schema.IdentityId.nullish(),
|
|
2241
2245
|
address: vault_schema.BlockchainAddress.nullish(),
|
|
2242
2246
|
blockchainNamespace: vault_schema.BlockchainNamespace.nullish(),
|
|
2243
|
-
sandboxSimulated:
|
|
2244
|
-
cmsProjectId:
|
|
2247
|
+
sandboxSimulated: z.z.coerce["boolean"]().nullish(),
|
|
2248
|
+
cmsProjectId: z.z.string(),
|
|
2245
2249
|
result: KycResult.nullish(),
|
|
2246
2250
|
reviewAnswer: SumSubReviewAnswer.nullish(),
|
|
2247
2251
|
reviewRejectType: SumSubReviewRejectType.nullish(),
|
|
2248
|
-
sandboxMode:
|
|
2252
|
+
sandboxMode: z.z.coerce["boolean"]().nullish(),
|
|
2249
2253
|
status: KycSessionStatus.nullish(),
|
|
2250
|
-
ip:
|
|
2251
|
-
notificationEmail:
|
|
2252
|
-
isBeneficiary:
|
|
2253
|
-
createdAt:
|
|
2254
|
-
updatedAt:
|
|
2254
|
+
ip: z.z.string().nullish(),
|
|
2255
|
+
notificationEmail: z.z.string().nullish(),
|
|
2256
|
+
isBeneficiary: z.z.coerce["boolean"]().nullish(),
|
|
2257
|
+
createdAt: z.z.coerce.date(),
|
|
2258
|
+
updatedAt: z.z.coerce.date(),
|
|
2255
2259
|
scenarioExecutions: identityApi_schema.SdkVerificationOutput.nullish(),
|
|
2256
|
-
workflowId:
|
|
2260
|
+
workflowId: z.z.string().uuid().nullable(),
|
|
2257
2261
|
workflowSessionId: vault_schema.WorkflowSessionId.nullable(),
|
|
2258
2262
|
workspaceId: vault_schema.WorkspaceId.nullish(),
|
|
2259
2263
|
organizationId: vault_schema.OrganizationId.nullish(),
|
|
2260
2264
|
applicantCheckStatus: ApplicantCheckStatus
|
|
2261
2265
|
});
|
|
2262
2266
|
var SelectKycSessionWithCompletedSteps = SelectKycSession.extend({
|
|
2263
|
-
stepsCompleted:
|
|
2267
|
+
stepsCompleted: z.z.array(SelectKycSessionStep)
|
|
2264
2268
|
});
|
|
2265
|
-
var GetKycSessionInput =
|
|
2266
|
-
projectId:
|
|
2269
|
+
var GetKycSessionInput = z.z.object({
|
|
2270
|
+
projectId: z.z.string()
|
|
2267
2271
|
});
|
|
2268
2272
|
var GetKycSessionResponse = SelectKycSession.extend({
|
|
2269
|
-
stepsCompleted:
|
|
2273
|
+
stepsCompleted: z.z.array(SelectKycSessionStep),
|
|
2270
2274
|
customerStatus: vault_schema.CustomerStatus.nullish(),
|
|
2271
|
-
sumSubReviewResult:
|
|
2275
|
+
sumSubReviewResult: z.z.object(vault_schema._defineProperty(vault_schema._defineProperty({}, SumSubStep["enum"].IDENTITY, z.z.array(SumSubReviewRejectLabel)), SumSubStep["enum"].SELFIE, z.z.array(SumSubReviewRejectLabel))).nullish()
|
|
2272
2276
|
});
|
|
2273
|
-
var UpdateKycSessionOutput =
|
|
2274
|
-
var VideoKycMetaData =
|
|
2275
|
-
id:
|
|
2276
|
-
journeyId:
|
|
2277
|
-
reviewStatus:
|
|
2278
|
-
roomId:
|
|
2279
|
-
moderatorDisplayName:
|
|
2277
|
+
var UpdateKycSessionOutput = z.z.string();
|
|
2278
|
+
var VideoKycMetaData = z.z.object({
|
|
2279
|
+
id: z.z.string(),
|
|
2280
|
+
journeyId: z.z.string(),
|
|
2281
|
+
reviewStatus: z.z.string(),
|
|
2282
|
+
roomId: z.z.string(),
|
|
2283
|
+
moderatorDisplayName: z.z.string()
|
|
2280
2284
|
});
|
|
2281
2285
|
var ProofOfResidenceMetaData = vault_schema.ProofOfResidenceCredentialSubjectSchema.omit({
|
|
2282
2286
|
base64: true,
|
|
2283
2287
|
id: true
|
|
2284
2288
|
});
|
|
2285
2289
|
var ProofOfResidenceDocumentType = ProofOfResidenceMetaData.shape.documentType;
|
|
2286
|
-
var GetCredentialsOutput =
|
|
2290
|
+
var GetCredentialsOutput = z.z.object({
|
|
2287
2291
|
IDInformation: identityApi_schema.QrCodeLinkWithSchemaType.optional(),
|
|
2288
2292
|
SelfieImage: identityApi_schema.QrCodeLinkWithSchemaType.optional(),
|
|
2289
2293
|
IDImage: identityApi_schema.QrCodeLinkWithSchemaType.optional(),
|
|
2290
2294
|
ProofOfResidence: identityApi_schema.QrCodeLinkWithSchemaType.optional()
|
|
2291
2295
|
});
|
|
2292
|
-
var CustomerContactInformationOutput =
|
|
2293
|
-
id:
|
|
2294
|
-
customerId:
|
|
2296
|
+
var CustomerContactInformationOutput = z.z.object({
|
|
2297
|
+
id: z.z.string(),
|
|
2298
|
+
customerId: z.z.string(),
|
|
2295
2299
|
information: vault_schema.BasicCustomerContactInformation,
|
|
2296
|
-
createdAt:
|
|
2297
|
-
updatedAt:
|
|
2300
|
+
createdAt: z.z.date(),
|
|
2301
|
+
updatedAt: z.z.date()
|
|
2298
2302
|
});
|
|
2299
|
-
var CredentialMetadata =
|
|
2303
|
+
var CredentialMetadata = z.z.object({
|
|
2300
2304
|
type: identityApi_schema.CredentialType,
|
|
2301
|
-
imageId:
|
|
2305
|
+
imageId: z.z.number().nullish()
|
|
2302
2306
|
});
|
|
2303
2307
|
var GetKycSessionResponseWithCredentialsMetadata = GetKycSessionResponse.extend({
|
|
2304
|
-
credentialsMetadata:
|
|
2305
|
-
applicantName:
|
|
2306
|
-
applicationDate:
|
|
2308
|
+
credentialsMetadata: z.z.array(CredentialMetadata),
|
|
2309
|
+
applicantName: z.z.string().nullish(),
|
|
2310
|
+
applicationDate: z.z.string().nullish()
|
|
2307
2311
|
});
|
|
2308
|
-
var IDImageMetaData =
|
|
2309
|
-
credentialId:
|
|
2310
|
-
journeyId:
|
|
2312
|
+
var IDImageMetaData = z.z.object({
|
|
2313
|
+
credentialId: z.z.string(),
|
|
2314
|
+
journeyId: z.z.string(),
|
|
2311
2315
|
reviewStatus: SumSubReviewAnswer,
|
|
2312
2316
|
verificationMode: vault_schema.VerificationMode,
|
|
2313
|
-
documentType:
|
|
2317
|
+
documentType: z.z["enum"](["ID_CARD", "PASSPORT", "DRIVERS", "RESIDENCE_PERMIT", "UTILITY_BILL", "SELFIE", "VIDEO_SELFIE", "PROFILE_IMAGE", "ID_DOC_PHOTO", "AGREEMENT", "CONTRACT", "DRIVERS_TRANSLATION", "INVESTOR_DOC", "VEHICLE_REGISTRATION_CERTIFICATE", "INCOME_SOURCE", "PAYMENT_METHOD", "BANK_CARD", "COVID_VACCINATION_FORM", "OTHER"])
|
|
2314
2318
|
});
|
|
2315
|
-
var SelfieImageMetaData =
|
|
2316
|
-
credentialId:
|
|
2317
|
-
journeyId:
|
|
2319
|
+
var SelfieImageMetaData = z.z.object({
|
|
2320
|
+
credentialId: z.z.string(),
|
|
2321
|
+
journeyId: z.z.string(),
|
|
2318
2322
|
reviewStatus: SumSubReviewAnswer,
|
|
2319
2323
|
verificationMode: vault_schema.VerificationMode
|
|
2320
2324
|
});
|
|
2321
|
-
var ApiErrorResponse =
|
|
2322
|
-
code:
|
|
2323
|
-
message:
|
|
2324
|
-
details:
|
|
2325
|
+
var ApiErrorResponse = z.z.object({
|
|
2326
|
+
code: z.z.string(),
|
|
2327
|
+
message: z.z.string(),
|
|
2328
|
+
details: z.z.record(z.z.any()).optional()
|
|
2325
2329
|
});
|
|
2326
|
-
var ApiErrorCommandResponse =
|
|
2327
|
-
isOk:
|
|
2330
|
+
var ApiErrorCommandResponse = z.z.object({
|
|
2331
|
+
isOk: z.z.literal(false),
|
|
2328
2332
|
data: ApiErrorResponse,
|
|
2329
|
-
timestamp:
|
|
2330
|
-
requestId:
|
|
2333
|
+
timestamp: z.z.string(),
|
|
2334
|
+
requestId: z.z.string().optional()
|
|
2331
2335
|
});
|
|
2332
2336
|
var ApiSuccessCommandResponse = function ApiSuccessCommandResponse(dataSchema) {
|
|
2333
|
-
return
|
|
2334
|
-
isOk:
|
|
2337
|
+
return z.z.object({
|
|
2338
|
+
isOk: z.z.literal(true),
|
|
2335
2339
|
data: dataSchema,
|
|
2336
|
-
timestamp:
|
|
2337
|
-
requestId:
|
|
2340
|
+
timestamp: z.z.string(),
|
|
2341
|
+
requestId: z.z.string().optional()
|
|
2338
2342
|
});
|
|
2339
2343
|
};
|
|
2340
|
-
var GetKycSessionsOutput =
|
|
2344
|
+
var GetKycSessionsOutput = z.z.discriminatedUnion("isOk", [ApiErrorCommandResponse, ApiSuccessCommandResponse(z.z.array(GetKycSessionResponseWithCredentialsMetadata))]);
|
|
2341
2345
|
|
|
2342
2346
|
var KYB_STEP_TYPES = ["Started"];
|
|
2343
|
-
var KybStep =
|
|
2347
|
+
var KybStep = z.z["enum"](KYB_STEP_TYPES);
|
|
2344
2348
|
var KYB_RESULTS = ["Passed", "ToBeManuallyChecked",
|
|
2345
2349
|
// use in case applicantReviewed event comes without reviewResult.reviewAnswer
|
|
2346
2350
|
"Rejected", "Retry"];
|
|
2347
|
-
var KybResult =
|
|
2351
|
+
var KybResult = z.z["enum"](KYB_RESULTS);
|
|
2348
2352
|
var KYB_SESSION_STATUSES = ["NotStarted", "Started", "Closed"];
|
|
2349
|
-
var KybSessionStatus =
|
|
2353
|
+
var KybSessionStatus = z.z["enum"](KYB_SESSION_STATUSES);
|
|
2350
2354
|
// TODO: @MrRaccxxn - This types now will be duplicated in sub steps workflow
|
|
2351
2355
|
|
|
2352
2356
|
var COMPANY_ID_DOC_SUBTYPES = ["INCORPORATION_CERT", "INCORPORATION_ARTICLES", "SHAREHOLDER_REGISTRY", "INFORMATION_STATEMENT", "TRUST_AGREEMENT", "STATE_REGISTRY"];
|
|
2353
|
-
var CompanyIdDocSubType =
|
|
2357
|
+
var CompanyIdDocSubType = z.z["enum"](COMPANY_ID_DOC_SUBTYPES);
|
|
2354
2358
|
var COMPANY_DOCUMENT_STATUS = ["ACCEPTED", "DECLINED", "IN_REVIEW"];
|
|
2355
|
-
var CompanyDocumentStatus =
|
|
2356
|
-
var CompanyDocumentMetaData =
|
|
2357
|
-
sumsubImageId:
|
|
2358
|
-
mediaType:
|
|
2359
|
-
journeyId:
|
|
2359
|
+
var CompanyDocumentStatus = z.z["enum"](COMPANY_DOCUMENT_STATUS);
|
|
2360
|
+
var CompanyDocumentMetaData = z.z.object({
|
|
2361
|
+
sumsubImageId: z.z.number(),
|
|
2362
|
+
mediaType: z.z["enum"](["image/jpg", "image/jpeg", "image/png", "application/pdf", "video/mp4", "video/webm", "video/quicktime"]),
|
|
2363
|
+
journeyId: z.z.string(),
|
|
2360
2364
|
documentType: CompanyIdDocSubType,
|
|
2361
|
-
name:
|
|
2362
|
-
entryDate:
|
|
2363
|
-
entryTime:
|
|
2364
|
-
isSandbox:
|
|
2365
|
+
name: z.z.string().optional(),
|
|
2366
|
+
entryDate: z.z.number()["int"](),
|
|
2367
|
+
entryTime: z.z.string(),
|
|
2368
|
+
isSandbox: z.z["boolean"](),
|
|
2365
2369
|
status: CompanyDocumentStatus.optional(),
|
|
2366
2370
|
reviewResult: SumSubImageReviewResultSchema.nullish(),
|
|
2367
|
-
deactivated:
|
|
2371
|
+
deactivated: z.z["boolean"]().optional()
|
|
2368
2372
|
});
|
|
2369
|
-
var BeneficiaryVerificationStatus =
|
|
2370
|
-
customerId:
|
|
2371
|
-
applicantId:
|
|
2372
|
-
externalUserId:
|
|
2373
|
+
var BeneficiaryVerificationStatus = z.z.object({
|
|
2374
|
+
customerId: z.z.string().uuid(),
|
|
2375
|
+
applicantId: z.z.string(),
|
|
2376
|
+
externalUserId: z.z.string(),
|
|
2373
2377
|
calculatedResult: KybResult.nullish(),
|
|
2374
2378
|
reviewAnswer: SumSubReviewAnswer.nullish(),
|
|
2375
2379
|
reviewRejectType: SumSubReviewRejectType.nullish(),
|
|
2376
2380
|
type: BeneficiaryType.nullish(),
|
|
2377
|
-
name:
|
|
2378
|
-
levelName:
|
|
2381
|
+
name: z.z.string().nullish(),
|
|
2382
|
+
levelName: z.z.string()
|
|
2379
2383
|
});
|
|
2380
|
-
var BeneficiaryVerificationStatusArray =
|
|
2381
|
-
var SelectKybSession =
|
|
2384
|
+
var BeneficiaryVerificationStatusArray = z.z.array(BeneficiaryVerificationStatus);
|
|
2385
|
+
var SelectKybSession = z.z.object({
|
|
2382
2386
|
id: vault_schema.UuidString,
|
|
2383
2387
|
customerId: vault_schema.UuidString,
|
|
2384
2388
|
address: vault_schema.BlockchainAddress.nullish(),
|
|
2385
|
-
cmsProjectId:
|
|
2389
|
+
cmsProjectId: z.z.string(),
|
|
2386
2390
|
result: KybResult.nullish(),
|
|
2387
2391
|
reviewAnswer: SumSubReviewAnswer.nullish(),
|
|
2388
2392
|
reviewRejectType: SumSubReviewRejectType.nullish(),
|
|
2389
|
-
sandboxMode:
|
|
2393
|
+
sandboxMode: z.z.coerce["boolean"]().nullish(),
|
|
2390
2394
|
status: KybSessionStatus.nullish(),
|
|
2391
|
-
ip:
|
|
2392
|
-
isBeneficiary:
|
|
2393
|
-
sandboxSimulated:
|
|
2395
|
+
ip: z.z.string().nullish(),
|
|
2396
|
+
isBeneficiary: z.z.coerce["boolean"]().nullish(),
|
|
2397
|
+
sandboxSimulated: z.z.coerce["boolean"]().nullish(),
|
|
2394
2398
|
beneficiaries: BeneficiaryVerificationStatusArray.nullish(),
|
|
2395
|
-
workflowId:
|
|
2396
|
-
createdAt:
|
|
2397
|
-
updatedAt:
|
|
2399
|
+
workflowId: z.z.string().uuid().nullable(),
|
|
2400
|
+
createdAt: z.z.coerce.date(),
|
|
2401
|
+
updatedAt: z.z.coerce.date()
|
|
2398
2402
|
// notificationEmail: z.string().nullish(),
|
|
2399
2403
|
// scenarioExecutions: SdkVerificationOutput.nullish(),
|
|
2400
2404
|
});
|
|
2401
|
-
var GetKybSessionInput =
|
|
2402
|
-
projectId:
|
|
2405
|
+
var GetKybSessionInput = z.z.object({
|
|
2406
|
+
projectId: z.z.string()
|
|
2403
2407
|
});
|
|
2404
2408
|
// export const GetKybSessionResponse = SelectKybSession.extend({
|
|
2405
2409
|
// sumSubReviewResult: z
|
|
@@ -2410,10 +2414,10 @@ var GetKybSessionInput = zod.z.object({
|
|
|
2410
2414
|
// .nullish(),
|
|
2411
2415
|
// });
|
|
2412
2416
|
var GetKybSessionResponse = SelectKybSession;
|
|
2413
|
-
var UpdateKybSessionOutput =
|
|
2417
|
+
var UpdateKybSessionOutput = z.z.string();
|
|
2414
2418
|
|
|
2415
|
-
var CustomerDocumentMetaData =
|
|
2416
|
-
var CustomerStatusResults =
|
|
2419
|
+
var CustomerDocumentMetaData = z.z.union([CompanyDocumentMetaData, ProofOfResidenceMetaData, VideoKycMetaData, IDImageMetaData, SelfieImageMetaData]);
|
|
2420
|
+
var CustomerStatusResults = z.z.union([KybResult, KycResult]);
|
|
2417
2421
|
|
|
2418
2422
|
var CoinMarketCapFiatId = {
|
|
2419
2423
|
USD: "2781",
|
|
@@ -2511,40 +2515,103 @@ var CoinMarketCapFiatId = {
|
|
|
2511
2515
|
VND: "2823"
|
|
2512
2516
|
};
|
|
2513
2517
|
|
|
2514
|
-
var CoinMarketCapRequest =
|
|
2515
|
-
amount:
|
|
2516
|
-
id:
|
|
2517
|
-
convert_id:
|
|
2518
|
-
time:
|
|
2519
|
-
});
|
|
2520
|
-
var CoinMarketCapQuote =
|
|
2521
|
-
price:
|
|
2522
|
-
last_updated:
|
|
2523
|
-
});
|
|
2524
|
-
var CoinMarketCapQuotes =
|
|
2525
|
-
var Result =
|
|
2526
|
-
id:
|
|
2527
|
-
name:
|
|
2528
|
-
symbol:
|
|
2529
|
-
amount:
|
|
2530
|
-
last_updated:
|
|
2518
|
+
var CoinMarketCapRequest = z.z.object({
|
|
2519
|
+
amount: z.z.number(),
|
|
2520
|
+
id: z.z.string(),
|
|
2521
|
+
convert_id: z.z.string(),
|
|
2522
|
+
time: z.z.coerce.date()
|
|
2523
|
+
});
|
|
2524
|
+
var CoinMarketCapQuote = z.z.object({
|
|
2525
|
+
price: z.z.number(),
|
|
2526
|
+
last_updated: z.z.coerce.date()
|
|
2527
|
+
});
|
|
2528
|
+
var CoinMarketCapQuotes = z.z.object(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, CoinMarketCapFiatId.USD, CoinMarketCapQuote.optional()), CoinMarketCapFiatId.EUR, CoinMarketCapQuote.optional()), CoinMarketCapFiatId.GBP, CoinMarketCapQuote.optional()));
|
|
2529
|
+
var Result = z.z.object({
|
|
2530
|
+
id: z.z.number(),
|
|
2531
|
+
name: z.z.string(),
|
|
2532
|
+
symbol: z.z.string(),
|
|
2533
|
+
amount: z.z.number(),
|
|
2534
|
+
last_updated: z.z.coerce.date(),
|
|
2531
2535
|
quote: CoinMarketCapQuotes
|
|
2532
2536
|
});
|
|
2533
|
-
var Status =
|
|
2534
|
-
timestamp:
|
|
2535
|
-
error_code:
|
|
2536
|
-
error_message:
|
|
2537
|
-
elapsed:
|
|
2538
|
-
credit_count:
|
|
2539
|
-
notice:
|
|
2537
|
+
var Status = z.z.object({
|
|
2538
|
+
timestamp: z.z.coerce.date(),
|
|
2539
|
+
error_code: z.z.number(),
|
|
2540
|
+
error_message: z.z.string().nullish(),
|
|
2541
|
+
elapsed: z.z.number(),
|
|
2542
|
+
credit_count: z.z.number(),
|
|
2543
|
+
notice: z.z.string().nullish()
|
|
2540
2544
|
});
|
|
2541
|
-
var CoinMarketCapApiResponse =
|
|
2545
|
+
var CoinMarketCapApiResponse = z.z.object({
|
|
2542
2546
|
data: Result.optional(),
|
|
2543
2547
|
status: Status
|
|
2544
2548
|
});
|
|
2545
2549
|
|
|
2550
|
+
var TRM_CHAINS = ["avalanche_p_chain", "avalanche_x_chain", "aleo", "algorand", "aptos", "arbitrum", "avalanche_c_chain", "b3", "base", "berachain", "binance", "binance_smart_chain", "bitcoin", "bitcoin_cash", "bitcoin_gold", "bitcoin_sv", "blast", "bytom", "cardano", "celestia", "celo", "codex", "concordium", "cosmos", "dash", "dogecoin", "dydx", "elastos", "eos", "ethereum", "ethereum_classic", "fantom", "filecoin", "flow", "gunzilla", "hedera", "hyperliquid", "icon", "internet_computer", "iost", "iota", "klaytn", "lisk", "litecoin", "mode", "monad", "monero", "elrond", "near", "nebulas", "neo", "noble", "oasis", "omni", "ontology", "optimism", "pai", "polkadot", "polygon", "plume", "qtum", "ripple", "ronin", "sei", "solana", "soneium", "sonic", "strk", "steem", "stellar", "sui", "terra", "tezos", "ton", "tron", "unichain", "worldchain", "zcash", "zilliqa", "zksync", "zora", "ALL"];
|
|
2551
|
+
var TrmChains = z__default["default"]["enum"](TRM_CHAINS);
|
|
2552
|
+
var AddressesScreeningApiRequest = z__default["default"].object({
|
|
2553
|
+
chain: TrmChains.nullish(),
|
|
2554
|
+
address: z__default["default"].string()
|
|
2555
|
+
});
|
|
2556
|
+
var TRM_RISK_SCORE_LEVEL = [0, 1, 5, 10, 15];
|
|
2557
|
+
var TRM_RISK_SCORE_LEVEL_LABEL = ["Unknown", "Low", "Medium", "High", "Severe"];
|
|
2558
|
+
var RISK_TYPE = ["COUNTERPARTY", "INDIRECT", "OWNERSHIP"];
|
|
2559
|
+
var RiskScoreLevel = z__default["default"].number().refine(function (value) {
|
|
2560
|
+
return TRM_RISK_SCORE_LEVEL.includes(value);
|
|
2561
|
+
}).nullish();
|
|
2562
|
+
var RiskScoreLevelLabel = z__default["default"]["enum"](TRM_RISK_SCORE_LEVEL_LABEL).nullish();
|
|
2563
|
+
var RiskType = z__default["default"]["enum"](RISK_TYPE);
|
|
2564
|
+
var AddressesScreening = z__default["default"].array(z__default["default"].object({
|
|
2565
|
+
accountExternalId: z__default["default"].string().nullish(),
|
|
2566
|
+
accountUuid: z__default["default"].string().nullish(),
|
|
2567
|
+
address: z__default["default"].string().nullish(),
|
|
2568
|
+
addressIncomingVolumeUsd: z__default["default"].string().nullish(),
|
|
2569
|
+
addressOutgoingVolumeUsd: z__default["default"].string().nullish(),
|
|
2570
|
+
addressHighestRiskScoreLevel: RiskScoreLevel,
|
|
2571
|
+
addressHighestRiskScoreLevelLabel: RiskScoreLevelLabel,
|
|
2572
|
+
addressRiskIndicators: z__default["default"].array(z__default["default"].object({
|
|
2573
|
+
category: z__default["default"].string().nullish(),
|
|
2574
|
+
categoryId: z__default["default"].string().nullish(),
|
|
2575
|
+
categoryRiskScoreLevel: RiskScoreLevel,
|
|
2576
|
+
categoryRiskScoreLevelLabel: RiskScoreLevelLabel,
|
|
2577
|
+
incomingVolumeUsd: z__default["default"].string().nullish(),
|
|
2578
|
+
outgoingVolumeUsd: z__default["default"].string().nullish(),
|
|
2579
|
+
riskType: RiskType.nullish(),
|
|
2580
|
+
totalVolumeUsd: z__default["default"].string().nullish(),
|
|
2581
|
+
incomingVolumePercent: z__default["default"].string().nullish(),
|
|
2582
|
+
outgoingVolumePercent: z__default["default"].string().nullish(),
|
|
2583
|
+
totalVolumePercent: z__default["default"].string().nullish()
|
|
2584
|
+
})),
|
|
2585
|
+
addressSubmitted: z__default["default"].string(),
|
|
2586
|
+
addressTotalVolumeUsd: z__default["default"].string().nullish(),
|
|
2587
|
+
chain: TrmChains.nullish(),
|
|
2588
|
+
entities: z__default["default"].array(z__default["default"].object({
|
|
2589
|
+
category: z__default["default"].string().nullish(),
|
|
2590
|
+
categoryId: z__default["default"].string().nullish(),
|
|
2591
|
+
confidenceScoreLabel: z__default["default"].string().nullish(),
|
|
2592
|
+
entity: z__default["default"].string().nullish(),
|
|
2593
|
+
riskScoreLevel: RiskScoreLevel,
|
|
2594
|
+
riskScoreLevelLabel: RiskScoreLevelLabel,
|
|
2595
|
+
trmAppUrl: z__default["default"].string().nullish(),
|
|
2596
|
+
trmUrn: z__default["default"].string().nullish()
|
|
2597
|
+
})),
|
|
2598
|
+
externalId: z__default["default"].string().nullish(),
|
|
2599
|
+
trmAppUrl: z__default["default"].string().nullish()
|
|
2600
|
+
}));
|
|
2601
|
+
var AddressesScreeningError = z__default["default"].object({
|
|
2602
|
+
name: z__default["default"].string().nullish(),
|
|
2603
|
+
message: z__default["default"].string().nullish(),
|
|
2604
|
+
code: z__default["default"].number().nullish(),
|
|
2605
|
+
className: z__default["default"].string().nullish(),
|
|
2606
|
+
errors: z__default["default"].object({}).nullish()
|
|
2607
|
+
});
|
|
2608
|
+
var AddressesScreeningResponse = z__default["default"].union([AddressesScreening, AddressesScreeningError]);
|
|
2609
|
+
|
|
2546
2610
|
exports.AMLMetadata = AMLMetadata;
|
|
2547
2611
|
exports.APPLICANT_CHECK_STATUSES = APPLICANT_CHECK_STATUSES;
|
|
2612
|
+
exports.AddressesScreening = AddressesScreening;
|
|
2613
|
+
exports.AddressesScreeningApiRequest = AddressesScreeningApiRequest;
|
|
2614
|
+
exports.AddressesScreeningResponse = AddressesScreeningResponse;
|
|
2548
2615
|
exports.ApiErrorCommandResponse = ApiErrorCommandResponse;
|
|
2549
2616
|
exports.ApiErrorResponse = ApiErrorResponse;
|
|
2550
2617
|
exports.ApiSuccessCommandResponse = ApiSuccessCommandResponse;
|
|
@@ -2812,6 +2879,8 @@ exports.SynapsStepErrorResponse = SynapsStepErrorResponse;
|
|
|
2812
2879
|
exports.SynapsStepEvent = SynapsStepEvent;
|
|
2813
2880
|
exports.SynapsStepRequest = SynapsStepRequest;
|
|
2814
2881
|
exports.SynapsStepResponse = SynapsStepResponse;
|
|
2882
|
+
exports.TRM_RISK_SCORE_LEVEL = TRM_RISK_SCORE_LEVEL;
|
|
2883
|
+
exports.TRM_RISK_SCORE_LEVEL_LABEL = TRM_RISK_SCORE_LEVEL_LABEL;
|
|
2815
2884
|
exports.ToggleProviderInput = ToggleProviderInput;
|
|
2816
2885
|
exports.UNKNOWN_ERROR = UNKNOWN_ERROR;
|
|
2817
2886
|
exports.UpdateKybSessionOutput = UpdateKybSessionOutput;
|