@nexeraid/identity-schemas 2.74.0-dev → 2.76.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/{CoinMarketCap.schema-a0e3284a.cjs.prod.cjs → CoinMarketCap.schema-4716bd1c.cjs.prod.cjs} +18 -3
- package/dist/{CoinMarketCap.schema-73597e44.cjs.dev.cjs → CoinMarketCap.schema-7b93e4c3.cjs.dev.cjs} +18 -3
- package/dist/{CoinMarketCap.schema-55b8c72b.esm.mjs → CoinMarketCap.schema-a3f7532d.esm.mjs} +17 -4
- package/dist/declarations/src/identity/app-requests.schema.d.ts +27 -27
- package/dist/declarations/src/identity/identity-v2.schema.d.ts +7 -7
- package/dist/declarations/src/identity/kyc.schema.d.ts +7 -7
- package/dist/declarations/src/identity/query.schema.d.ts +77 -0
- package/dist/declarations/src/identity/query.schema.d.ts.map +1 -1
- package/dist/declarations/src/identity/scenario.schema.d.ts +597 -10
- package/dist/declarations/src/identity/scenario.schema.d.ts.map +1 -1
- package/dist/declarations/src/identity-ids.schema.d.ts +6 -2
- package/dist/declarations/src/identity-ids.schema.d.ts.map +1 -1
- package/dist/declarations/src/providers/customers.schema.d.ts +33 -0
- package/dist/declarations/src/providers/customers.schema.d.ts.map +1 -1
- package/dist/declarations/src/providers/kyc-sessions.schema.d.ts +57 -20
- package/dist/declarations/src/providers/kyc-sessions.schema.d.ts.map +1 -1
- package/dist/declarations/src/vault/schemas/Customer.zod.d.ts +10 -0
- package/dist/declarations/src/vault/schemas/Customer.zod.d.ts.map +1 -1
- package/dist/declarations/src/vault/schemas/generated/Customer.schema.json.d.ts +5 -0
- package/dist/declarations/src/vault/schemas/generated/Customer.type.d.ts +2 -0
- package/dist/declarations/src/vault/schemas/generated/Customer.type.d.ts.map +1 -1
- package/dist/declarations/src/vault/vault.schema.d.ts +14 -0
- package/dist/declarations/src/vault/vault.schema.d.ts.map +1 -1
- package/dist/declarations/src/webhooks/alert.schema.d.ts +2 -2
- package/dist/declarations/src/webhooks/alert.schema.d.ts.map +1 -1
- package/dist/declarations/src/webhooks/alert.webhooks.schema.d.ts +3 -3
- package/dist/declarations/src/webhooks/scenario-webhook.schema.d.ts +3 -3
- package/dist/declarations/src/webhooks/svix.webhooks.schema.d.ts +180 -180
- package/dist/{identity-api.schema-698da711.esm.mjs → identity-api.schema-3a704c7f.esm.mjs} +130 -80
- package/dist/{identity-api.schema-f273d197.cjs.dev.cjs → identity-api.schema-58bf8f00.cjs.dev.cjs} +154 -79
- package/dist/{identity-api.schema-86cf92dd.cjs.prod.cjs → identity-api.schema-bc5ea73e.cjs.prod.cjs} +154 -79
- package/dist/nexeraid-identity-schemas.cjs.dev.cjs +16 -3
- package/dist/nexeraid-identity-schemas.cjs.prod.cjs +16 -3
- package/dist/nexeraid-identity-schemas.esm.mjs +4 -4
- package/dist/package.json +2 -2
- package/dist/{tfhe-utilities-2bc50d3e.cjs.prod.cjs → tfhe-utilities-b500085b.cjs.prod.cjs} +2 -2
- package/dist/{tfhe-utilities-36b44d38.cjs.dev.cjs → tfhe-utilities-ca4bf29e.cjs.dev.cjs} +2 -2
- package/dist/{tfhe-utilities-ca582b5e.esm.mjs → tfhe-utilities-eef7ff5b.esm.mjs} +2 -2
- package/dist/{vault.schema-03f54b78.cjs.dev.cjs → vault.schema-01e66371.cjs.prod.cjs} +23 -1
- package/dist/{vault.schema-4c134301.esm.mjs → vault.schema-4acec510.esm.mjs} +22 -2
- package/dist/{vault.schema-6c801a7d.cjs.prod.cjs → vault.schema-f3a557c2.cjs.dev.cjs} +23 -1
- package/identity/dist/nexeraid-identity-schemas-identity.cjs.dev.cjs +13 -2
- package/identity/dist/nexeraid-identity-schemas-identity.cjs.prod.cjs +13 -2
- package/identity/dist/nexeraid-identity-schemas-identity.esm.mjs +2 -2
- package/package.json +2 -2
- package/providers/dist/nexeraid-identity-schemas-providers.cjs.dev.cjs +5 -3
- package/providers/dist/nexeraid-identity-schemas-providers.cjs.prod.cjs +5 -3
- package/providers/dist/nexeraid-identity-schemas-providers.esm.mjs +3 -3
- package/vault/dist/nexeraid-identity-schemas-vault.cjs.dev.cjs +1 -1
- package/vault/dist/nexeraid-identity-schemas-vault.cjs.prod.cjs +1 -1
- package/vault/dist/nexeraid-identity-schemas-vault.esm.mjs +1 -1
- 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/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.esm.mjs +3 -3
- package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.dev.cjs +21 -48
- package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.prod.cjs +21 -48
- package/webhooks/dist/nexeraid-identity-schemas-webhooks.esm.mjs +5 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { d1 as IDImageCredentialSubjectSchema, d3 as ProofOfResidenceCredentialSubjectSchema, d2 as SelfieImageCredentialSubjectSchema, d0 as IDInformationCredentialSubjectSchema, c$ as IDInformationTfheCredentialSubjectSchema, c_ as OLD_AMLScreeningsResultsCredentialSubjectSchema, cS as ID3CredentialSubjectSchema, cT as IDScanCredentialSubjectSchema, cV as IDScanSelfieCredentialSubjectSchema, cU as IDScanPassportCredentialSubjectSchema, ed as _defineProperty, e4 as VaultMetadataLinkZodSchema, cg as QueryId, ch as QueryGroupId, aS as UuidString, dv as TransactionReviewStatus, ar as BlockchainAddress, ce as ScenarioId, cJ as WorkspaceId, as as String0x, aN as BlockchainSignature, aa as TxHash, cK as WorkflowId, g as EvmChainId, a9 as AddressSchema, aD as EIP155Signature, T as TezosChainId, ah as TezosContractAddress, aP as TezosEntrypointName, ag as TezosImplicitAddress, aI as EdSignature, av as BlockchainNamespace, d4 as GenericVerifiableCredentialSchema, ax as SupportedBlockchainNamespaceForSignatureAuth, B as BlockchainId, cM as ExternalCustomerId, cH as AdditionalCustomerInformationParams, a8 as PublicKey } from './vault.schema-4acec510.esm.mjs';
|
|
3
3
|
|
|
4
4
|
var CredentialSchemas = {
|
|
5
5
|
ProofOfResidence: ProofOfResidenceCredentialSubjectSchema,
|
|
@@ -222,7 +222,7 @@ var OPERATORS = ["$noop",
|
|
|
222
222
|
];
|
|
223
223
|
var Operator = z["enum"](OPERATORS);
|
|
224
224
|
var ZKPOperator = z["enum"](OPERATORS).exclude(["$lte", "$gte", "$has", "$nhas"]);
|
|
225
|
-
var operatorDisplayMap = (_operatorDisplayMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_operatorDisplayMap, Operator["enum"].$eq, "is equal to"), Operator["enum"].$ne, "is not equal to"), Operator["enum"].$gt, "is greater than"), Operator["enum"].$lt, "is lower than"), Operator["enum"].$gte, "is greater than or equal to"), Operator["enum"].$lte, "is
|
|
225
|
+
var operatorDisplayMap = (_operatorDisplayMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_operatorDisplayMap, Operator["enum"].$eq, "is equal to"), Operator["enum"].$ne, "is not equal to"), Operator["enum"].$gt, "is greater than"), Operator["enum"].$lt, "is lower than"), Operator["enum"].$gte, "is greater than or equal to"), Operator["enum"].$lte, "is lower than or equal to"), Operator["enum"].$in, "is in"), Operator["enum"].$nin, "is not in"), Operator["enum"].$has, "has"), Operator["enum"].$nhas, "has not"), _defineProperty(_defineProperty(_operatorDisplayMap, Operator["enum"].$noop, "noop"), Operator["enum"].$exists, "exists"));
|
|
226
226
|
var ARRAY_OPERATORS = [Operator["enum"].$has, Operator["enum"].$nhas];
|
|
227
227
|
var ArrayOperator = z["enum"](ARRAY_OPERATORS);
|
|
228
228
|
var STRING_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$in, Operator["enum"].$nin, Operator["enum"].$exists];
|
|
@@ -282,6 +282,11 @@ var QueryConfigSimplified = z.object({
|
|
|
282
282
|
// TODO: Make the value type dynamic based on the attribute type
|
|
283
283
|
operator: Operator // TODO: Make the operator type dynamic based on the attribute type
|
|
284
284
|
});
|
|
285
|
+
var QueryGroupConfigSimplified = z.object({
|
|
286
|
+
id: QueryGroupId.describe("Unique ID for the query group").optional(),
|
|
287
|
+
operator: QueryLogicOperator,
|
|
288
|
+
queries: z.array(QueryConfigSimplified)
|
|
289
|
+
});
|
|
285
290
|
var RuleResultQueryConfig = QueryConfigSimplified.extend({
|
|
286
291
|
attribute: z.union([z.string(), VaultMetadataLinkZodSchema]),
|
|
287
292
|
// string for backwards compatibility
|
|
@@ -379,9 +384,120 @@ function oldCredentialPathToDataLink(path, credentialType) {
|
|
|
379
384
|
};
|
|
380
385
|
}
|
|
381
386
|
|
|
387
|
+
// Risk Score
|
|
388
|
+
var RiskScoreTypes = ["Low", "Medium", "High", "No risk"];
|
|
389
|
+
var RiskScoreType = z["enum"](RiskScoreTypes);
|
|
390
|
+
// Customer Type
|
|
391
|
+
var CustomerTypes = ["Individual", "Company"];
|
|
392
|
+
var CustomerType = z["enum"](CustomerTypes);
|
|
393
|
+
// KYC Onboarding Level
|
|
394
|
+
var KycOnboardingLevels = ["Sign-up", "AML screening", "KYC", "Questionaire", "Onboarded"];
|
|
395
|
+
var KycOnboardingLevel = z["enum"](KycOnboardingLevels);
|
|
396
|
+
// KYB Onboarding Level
|
|
397
|
+
var KybOnboardingLevels = ["Onboarding", "KYB", "Onboarded"];
|
|
398
|
+
var KybOnboardingLevel = z["enum"](KybOnboardingLevels);
|
|
399
|
+
var CustomerOnboardingLevels = [].concat(KycOnboardingLevels, KybOnboardingLevels);
|
|
400
|
+
var CustomerOnboardingLevel = z["enum"](CustomerOnboardingLevels);
|
|
401
|
+
// Customer Status
|
|
402
|
+
var CustomerStatuses = ["Active", "Rejected", "Dormant", "To be reviewed", "Failed", "Escalated", "Terminated", "No status"];
|
|
403
|
+
var CustomerStatus = z["enum"](CustomerStatuses);
|
|
404
|
+
var BasicCustomerContactInformation = z.object({
|
|
405
|
+
email: z.string().email(),
|
|
406
|
+
phone: z.string().min(4),
|
|
407
|
+
twitter: z.string(),
|
|
408
|
+
discord: z.string(),
|
|
409
|
+
telegram: z.string()
|
|
410
|
+
}).partial();
|
|
411
|
+
var CUSTOMERS_CHARTS = ["totalCustomers", "onboarded", "active", "dormant", "rejected", "topCountriesByCustomersCount", "customersRiskLevel", "customersByStatus", "trendOfStatusesOverTime"];
|
|
412
|
+
var CustomersChartType = z["enum"](CUSTOMERS_CHARTS);
|
|
413
|
+
var CUSTOMER_TABLE_COLUMNS = ["selected", "wallets", "type", "country_of_residence", "risk_score", "onboarding_level", "open_alerts_count", "status", "date_onboarded"];
|
|
414
|
+
var CustomerTableColumn = z["enum"](CUSTOMER_TABLE_COLUMNS);
|
|
415
|
+
var CUSTOMER_AUTOMATION_REASONS = {
|
|
416
|
+
"rule-engine": {
|
|
417
|
+
fail: "Rules engine verification failed",
|
|
418
|
+
pass: "Rules engine verification passed"
|
|
419
|
+
},
|
|
420
|
+
kyc: {
|
|
421
|
+
green: {
|
|
422
|
+
"final": "Passed KYC"
|
|
423
|
+
},
|
|
424
|
+
yellow: {
|
|
425
|
+
retry: "User rejected by the KYC provider with possibility to retry",
|
|
426
|
+
fail: "User rejected by the KYC provider"
|
|
427
|
+
},
|
|
428
|
+
red: {
|
|
429
|
+
retry: "User rejected by the KYC provider with possibility to retry",
|
|
430
|
+
fail: "User rejected by the KYC provider"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
kyb: {
|
|
434
|
+
green: {
|
|
435
|
+
"final": "Passed KYB"
|
|
436
|
+
},
|
|
437
|
+
yellow: {
|
|
438
|
+
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
439
|
+
fail: "Company rejected by the KYB provider"
|
|
440
|
+
},
|
|
441
|
+
red: {
|
|
442
|
+
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
443
|
+
fail: "Company rejected by the KYB provider"
|
|
444
|
+
},
|
|
445
|
+
beneficiaryOnToBeReviewState: "One or more beneficiaries are on 'To be reviewed' state"
|
|
446
|
+
},
|
|
447
|
+
"aml-screening": {
|
|
448
|
+
fail: "AML screening hits received during onboarding",
|
|
449
|
+
ongoingMonitoringFail: "AML screening hits received during ongoing monitoring",
|
|
450
|
+
pass: "Passed AML screening"
|
|
451
|
+
},
|
|
452
|
+
offchain_zkp: {
|
|
453
|
+
fail: "Offchain ZKP verification failed",
|
|
454
|
+
pass: "Offchain ZKP verification passed"
|
|
455
|
+
},
|
|
456
|
+
tfhe: {
|
|
457
|
+
fail: "TFHE verification failed",
|
|
458
|
+
pass: "TFHE verification passed"
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
// Alert Statuses
|
|
463
|
+
var AlertStatuses = ["Open", "Under Investigation", "Pending", "Closed", "Escalated"];
|
|
464
|
+
var AlertStatus = z["enum"](AlertStatuses);
|
|
465
|
+
// Alert Types
|
|
466
|
+
var AlertTypes = ["AML Screening", "IP Screening", "Email Screening", "KYC Drop-off", "Onchain Monitoring", "Fraud", "Transaction Monitoring", "Duplicate", "Individual Monitoring"];
|
|
467
|
+
var AlertType = z["enum"](AlertTypes);
|
|
468
|
+
// Alert Severities
|
|
469
|
+
var AlertSeverities = ["Low", "Medium", "High"];
|
|
470
|
+
var AlertSeverity = z["enum"](AlertSeverities);
|
|
471
|
+
// Alert Categories
|
|
472
|
+
var AlertCategories = ["Onboarding", "Ongoing monitoring"];
|
|
473
|
+
var AlertCategory = z["enum"](AlertCategories);
|
|
474
|
+
var ALERT_CHART_TYPES = ["total", "new", "opened", "closed", "inProgress", "unassigned", "escalated", "overdue", "avgClosureTime", "ageOfOldest", "alertTrendsOverTime", "alertsByType", "ageOfOpenAlerts", "alertsPerOfficer", "alertsSeverity"];
|
|
475
|
+
var AlertChartType = z["enum"](ALERT_CHART_TYPES);
|
|
476
|
+
var ALERT_TABLE_COLUMNS = ["selected", "createdAt", "overdue", "id", "severity", "type", "description", "assignedTo", "country", "status"];
|
|
477
|
+
var AlertTableColumn = z["enum"](ALERT_TABLE_COLUMNS);
|
|
478
|
+
var UserInfoForDuplicate = z.object({
|
|
479
|
+
customerId: UuidString,
|
|
480
|
+
customerInfo: z.string().nullish(),
|
|
481
|
+
profilePicture: z.string().nullish(),
|
|
482
|
+
idDocumentUrl: z.string().nullish()
|
|
483
|
+
});
|
|
484
|
+
var DuplicateData = z.object({
|
|
485
|
+
original: UserInfoForDuplicate,
|
|
486
|
+
duplicate: UserInfoForDuplicate
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
var SCENARIO_ACTION_TYPES = ["SET_CUSTOMER_RISK_LEVEL", "SET_CUSTOMER_STATUS", "SET_ALERT_RISK_LEVEL", "SET_TRANSACTION_RISK_LEVEL", "SET_TRANSACTION_STATUS", "ASSIGN_COMPLIANCE_OFFICER", "CREATE_ALERT"];
|
|
490
|
+
var ActionType = z["enum"](SCENARIO_ACTION_TYPES);
|
|
491
|
+
var ACTION_TRIGGERS = ["ON_TRUE", "ON_FALSE", "ALWAYS"];
|
|
492
|
+
var ActionTrigger = z["enum"](ACTION_TRIGGERS);
|
|
493
|
+
var ACTION_STATUSES = ["ENABLED", "DISABLED"];
|
|
494
|
+
var ActionStatus = z["enum"](ACTION_STATUSES);
|
|
495
|
+
var ActionValue = z.union([RiskScoreType, CustomerStatus, TransactionReviewStatus, AlertType]);
|
|
382
496
|
var ScenarioTypes = ["PrivacyPreservingMonitoring", "IndividualMonitoring", "TransactionMonitoring", "TFHE" // TODO integrate TFHE verification
|
|
383
497
|
];
|
|
384
498
|
var ScenarioType = z["enum"](ScenarioTypes);
|
|
499
|
+
var ScenarioModes = ["INTERNAL", "EXTERNAL"];
|
|
500
|
+
var ScenarioMode = z["enum"](ScenarioModes);
|
|
385
501
|
var ScenarioStatuses = ["enabled", "disabled"];
|
|
386
502
|
var ScenarioStatus = z["enum"](ScenarioStatuses);
|
|
387
503
|
var ScenarioSchema = z.object({
|
|
@@ -424,9 +540,9 @@ var RuleEngineResponse = z.object({
|
|
|
424
540
|
scenarioId: z.string()
|
|
425
541
|
});
|
|
426
542
|
var ScenarioExecutionResponse = z.array(RuleEngineResponse);
|
|
427
|
-
var RuleResultStatuses = ["valid", "not-valid", "error", "unknown"];
|
|
543
|
+
var RuleResultStatuses = ["valid", "not-valid", "skipped", "error", "unknown"];
|
|
428
544
|
var RuleResultStatus = z["enum"](RuleResultStatuses);
|
|
429
|
-
var RuleResultStatusLabels = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, RuleResultStatus.Enum.valid, "Valid"), RuleResultStatus.Enum["not-valid"], "Not Valid"), RuleResultStatus.Enum.error, "Error"), RuleResultStatus.Enum.unknown, "Unknown");
|
|
545
|
+
var RuleResultStatusLabels = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, RuleResultStatus.Enum.valid, "Valid"), RuleResultStatus.Enum["not-valid"], "Not Valid"), RuleResultStatus.Enum.skipped, "Skipped"), RuleResultStatus.Enum.error, "Error"), RuleResultStatus.Enum.unknown, "Unknown");
|
|
430
546
|
var SdkVerificationOutput = z.object({
|
|
431
547
|
customerId: z.string().optional(),
|
|
432
548
|
// for v1
|
|
@@ -443,12 +559,21 @@ var VerificationOutput = z.object({
|
|
|
443
559
|
verificationResult: SdkVerificationOutput.nullable(),
|
|
444
560
|
status: VerificationSessionStatus
|
|
445
561
|
});
|
|
562
|
+
var Action = z.object({
|
|
563
|
+
type: ActionType,
|
|
564
|
+
trigger: ActionTrigger,
|
|
565
|
+
status: ActionStatus,
|
|
566
|
+
value: ActionValue
|
|
567
|
+
});
|
|
446
568
|
var Scenario = z.object({
|
|
447
569
|
id: ScenarioId,
|
|
448
570
|
name: z.string(),
|
|
449
571
|
description: z.string().nullish(),
|
|
450
572
|
queries: z.array(QueryConfigSimplified),
|
|
573
|
+
queryGroups: z.array(QueryGroupConfigSimplified),
|
|
574
|
+
actions: z.array(Action),
|
|
451
575
|
type: ScenarioType,
|
|
576
|
+
mode: ScenarioMode,
|
|
452
577
|
workspaceId: WorkspaceId,
|
|
453
578
|
vcsIncluded: z.array(CredentialType).nullish()
|
|
454
579
|
});
|
|
@@ -813,81 +938,6 @@ var GetTxAuthSigResponseTezos = z.object({
|
|
|
813
938
|
var HostRequestMessage = z.union([GetCredentialsRequest, PolygonIdRequest, StartFlowRequest, IsVerifiedRequest, GetTxAuthSigRequest, GetTxAuthSigRequestTezos]);
|
|
814
939
|
var IdentityResponseMessage = z.union([GetCredentialsResponse, PolygonIdResponse, IsVerifiedResponse, GetTxAuthSigResponse, GetTxAuthSigResponseTezos]);
|
|
815
940
|
|
|
816
|
-
// Risk Score
|
|
817
|
-
var RiskScoreTypes = ["Low", "Medium", "High", "No risk"];
|
|
818
|
-
var RiskScoreType = z["enum"](RiskScoreTypes);
|
|
819
|
-
// Customer Type
|
|
820
|
-
var CustomerTypes = ["Individual", "Company"];
|
|
821
|
-
var CustomerType = z["enum"](CustomerTypes);
|
|
822
|
-
// KYC Onboarding Level
|
|
823
|
-
var KycOnboardingLevels = ["Sign-up", "AML screening", "KYC", "Questionaire", "Onboarded"];
|
|
824
|
-
var KycOnboardingLevel = z["enum"](KycOnboardingLevels);
|
|
825
|
-
// KYB Onboarding Level
|
|
826
|
-
var KybOnboardingLevels = ["Onboarding", "KYB", "Onboarded"];
|
|
827
|
-
var KybOnboardingLevel = z["enum"](KybOnboardingLevels);
|
|
828
|
-
var CustomerOnboardingLevels = [].concat(KycOnboardingLevels, KybOnboardingLevels);
|
|
829
|
-
var CustomerOnboardingLevel = z["enum"](CustomerOnboardingLevels);
|
|
830
|
-
// Customer Status
|
|
831
|
-
var CustomerStatuses = ["Active", "Rejected", "Dormant", "To be reviewed", "Failed", "Escalated", "Terminated", "No status"];
|
|
832
|
-
var CustomerStatus = z["enum"](CustomerStatuses);
|
|
833
|
-
var BasicCustomerContactInformation = z.object({
|
|
834
|
-
email: z.string().email(),
|
|
835
|
-
phone: z.string().min(4),
|
|
836
|
-
twitter: z.string(),
|
|
837
|
-
discord: z.string(),
|
|
838
|
-
telegram: z.string()
|
|
839
|
-
}).partial();
|
|
840
|
-
var CUSTOMERS_CHARTS = ["totalCustomers", "onboarded", "active", "dormant", "rejected", "topCountriesByCustomersCount", "customersRiskLevel", "customersByStatus", "trendOfStatusesOverTime"];
|
|
841
|
-
var CustomersChartType = z["enum"](CUSTOMERS_CHARTS);
|
|
842
|
-
var CUSTOMER_TABLE_COLUMNS = ["selected", "wallets", "type", "country_of_residence", "risk_score", "onboarding_level", "open_alerts_count", "status", "date_onboarded"];
|
|
843
|
-
var CustomerTableColumn = z["enum"](CUSTOMER_TABLE_COLUMNS);
|
|
844
|
-
var CUSTOMER_AUTOMATION_REASONS = {
|
|
845
|
-
"rule-engine": {
|
|
846
|
-
fail: "Rules engine verification failed",
|
|
847
|
-
pass: "Rules engine verification passed"
|
|
848
|
-
},
|
|
849
|
-
kyc: {
|
|
850
|
-
green: {
|
|
851
|
-
"final": "Passed KYC"
|
|
852
|
-
},
|
|
853
|
-
yellow: {
|
|
854
|
-
retry: "User rejected by the KYC provider with possibility to retry",
|
|
855
|
-
fail: "User rejected by the KYC provider"
|
|
856
|
-
},
|
|
857
|
-
red: {
|
|
858
|
-
retry: "User rejected by the KYC provider with possibility to retry",
|
|
859
|
-
fail: "User rejected by the KYC provider"
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
kyb: {
|
|
863
|
-
green: {
|
|
864
|
-
"final": "Passed KYB"
|
|
865
|
-
},
|
|
866
|
-
yellow: {
|
|
867
|
-
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
868
|
-
fail: "Company rejected by the KYB provider"
|
|
869
|
-
},
|
|
870
|
-
red: {
|
|
871
|
-
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
872
|
-
fail: "Company rejected by the KYB provider"
|
|
873
|
-
},
|
|
874
|
-
beneficiaryOnToBeReviewState: "One or more beneficiaries are on 'To be reviewed' state"
|
|
875
|
-
},
|
|
876
|
-
"aml-screening": {
|
|
877
|
-
fail: "AML screening hits received during onboarding",
|
|
878
|
-
ongoingMonitoringFail: "AML screening hits received during ongoing monitoring",
|
|
879
|
-
pass: "Passed AML screening"
|
|
880
|
-
},
|
|
881
|
-
offchain_zkp: {
|
|
882
|
-
fail: "Offchain ZKP verification failed",
|
|
883
|
-
pass: "Offchain ZKP verification passed"
|
|
884
|
-
},
|
|
885
|
-
tfhe: {
|
|
886
|
-
fail: "TFHE verification failed",
|
|
887
|
-
pass: "TFHE verification passed"
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
|
|
891
941
|
/**
|
|
892
942
|
* Wallet challenge parameters
|
|
893
943
|
*/
|
|
@@ -1112,4 +1162,4 @@ var VerifyWalletChallengeRequest = WalletSignatureResponse.and(z.object({
|
|
|
1112
1162
|
blockchainId: BlockchainId.optional()
|
|
1113
1163
|
}));
|
|
1114
1164
|
|
|
1115
|
-
export {
|
|
1165
|
+
export { ScenarioTypes as $, InitialDataRequest as A, BasicCustomerContactInformation as B, CredentialTypes as C, SignatureRequest as D, SendTransactionRequest as E, IdentityRequestMessage as F, AVAILABLE_FLOWS as G, AvailableFlow as H, IsVerifiedNotification as I, DataAvailableOnStart as J, KycOnboardingLevels as K, InitialDataResponse as L, SignatureResponse as M, TransactionResponse as N, OffChainScenarioExecutionData as O, PolygonIdInitialized as P, HostResponseMessage as Q, RiskScoreTypes as R, ScenarioAuthorizationData as S, TransactionData as T, SCENARIO_ACTION_TYPES as U, ActionType as V, ACTION_TRIGGERS as W, ActionTrigger as X, ACTION_STATUSES as Y, ActionStatus as Z, ActionValue as _, RiskScoreType as a, CircuitId as a$, ScenarioType as a0, ScenarioModes as a1, ScenarioMode as a2, ScenarioStatuses as a3, ScenarioStatus as a4, ScenarioSchema as a5, BackwardsCompatibleScenarioTypes as a6, BackwardsCompatibleScenarioType as a7, BaseQueryResponse as a8, OffChainZKPRuleResult as a9, GetTxAuthSigRequest as aA, GetTxAuthSigResponse as aB, GetTxAuthSigRequestTezos as aC, GetTxAuthSigResponseTezos as aD, HostRequestMessage as aE, IdentityResponseMessage as aF, GenerateWalletChallengeRequest as aG, AuthSession as aH, AuthSessionData as aI, ChallengeResponse as aJ, WalletSignResponse as aK, TxAuthDataSignatureGatingRequest as aL, GetCustomerStatusRequest as aM, IdentitySdkMessage as aN, IdentitySdkMessageWithIdentifier as aO, TxAuthDataSignatureResponse as aP, TxAuthDataSignatureGatingError as aQ, GetCustomerStatusResponse as aR, IdentityAppMessage as aS, IdentityWallet as aT, HostMessage as aU, IdentityMessage as aV, RequiredDataRowSchema as aW, RequiredVerificationData as aX, MediaType as aY, MediaTypePID as aZ, CIRCUIT_IDS as a_, ExecuteQueryResponse as aa, RuleEngineResponse as ab, ScenarioExecutionResponse as ac, RuleResultStatuses as ad, RuleResultStatus as ae, RuleResultStatusLabels as af, SdkVerificationOutput as ag, VerificationSessionStatuses as ah, VerificationSessionStatus as ai, VerificationOutput as aj, Action as ak, Scenario as al, AbbreviatedWorkflowScenario as am, TemplateScenario as an, CreateTemplateScenario as ao, ComplianceImplementationStepsInput as ap, SimplifiedCredential as aq, GetCredentialsRequest as ar, GetCredentialsResponse as as, PolygonIdRequestData as at, PolygonIdRequest as au, PolygonIdResponseData as av, PolygonIdResponse as aw, StartFlowRequest as ax, IsVerifiedRequest as ay, IsVerifiedResponse as az, CustomerTypes as b, ExtendedTxAuthInput as b$, ZeroKnowledgeProofRequest as b0, AUTHORIZATION_REQUEST_MESSAGE_TYPES as b1, AuthorizationRequestMessageTypes as b2, AuthorizationRequestMessageType as b3, AuthorizationRequestMessage as b4, ProofData as b5, ZeroKnowledgeProofResponse as b6, AuthorizationResponseMessage as b7, CredentialQrCodeData as b8, AuthQrCodeData as b9, QueryConfigTfhe as bA, QueryConfigSimplified as bB, QueryGroupConfigSimplified as bC, RuleResultQueryConfig as bD, PartialQueryConfigSimplified as bE, OLD_ChallengeQuerySchema as bF, QueryCredentialTypes as bG, QueryCredentialType as bH, ChallengeQuerySchema as bI, OLD_CHALLENGE_QUERY_OPERATORS as bJ, OLD_ChallengeQueryOperator as bK, OperatorMappings as bL, OperatorToOLD_ChallengeQueryOperator as bM, OLD_ChallengeQueryOperatorToOperator as bN, OLD_QueryCredentialTypes as bO, OLD_QueryCredentialType as bP, getOldCredentialType as bQ, getOldCredentialPath as bR, oldCredentialPathToDataLink as bS, TxAuthInput as bT, ApiTxAuthInput as bU, TxSignatureResponse as bV, GetTxAuthDataSignatureResponse as bW, TezosTxAuthInput as bX, ApiTezosTxAuthInput as bY, TezosTxSignatureResponse as bZ, GetTezosTxAuthDataSignatureResponse as b_, QrCodeLinkWithSchemaType as ba, parseIden3Message as bb, parseSessionIdFromUrl as bc, QUERY_LOGIC_OPERATOR as bd, QueryLogicOperator as be, OPERATORS as bf, Operator as bg, ZKPOperator as bh, operatorDisplayMap as bi, ARRAY_OPERATORS as bj, ArrayOperator as bk, STRING_OPERATORS as bl, StringOperator as bm, NUMERIC_OPERATORS as bn, NumericOperator as bo, BOOLEAN_OPERATORS as bp, BooleanOperator as bq, DATE_OPERATORS as br, DateOperator as bs, SUPPORTED_TYPES as bt, SupportedType as bu, SupportedTypes as bv, IDInformationTfhe as bw, AllCredentialValues as bx, QueriesOptions as by, QueryType as bz, CustomerType as c, ExtendedTezosTxAuthInput as c0, ExtendedTxAuthDataSignatureResponse as c1, ExtendedTezosTxAuthDataSignatureResponse as c2, AnyTxAuthDataSignatureResponse as c3, Eip155TxAuthInputJsSdk as c4, TezosTxAuthInputJsSdk as c5, AnyTxAuthInputJsSdk as c6, ZKPRequest as c7, ZKPRequestFromZKVerifier as c8, PrivacyPreservingMonitoring as c9, DuplicateData as cA, CreateAuthRequestProps as ca, AllScenarioExecutionAuthorizationData as cb, SCENARIO_AUTHORIZATION_STATUSES as cc, ScenarioAuthorizationStatus as cd, WalletSignatureResponse as ce, VerifyWalletChallengeRequest as cf, CredentialSchemas as cg, CredentialNames as ch, NexeraCredentialType as ci, getCredentialName as cj, CredentialType as ck, VerifiableCredential as cl, CredentialMediaType as cm, AlertSeverity as cn, AlertCategory as co, AlertType as cp, AlertStatus as cq, AlertStatuses as cr, AlertTypes as cs, AlertSeverities as ct, AlertCategories as cu, ALERT_CHART_TYPES as cv, AlertChartType as cw, ALERT_TABLE_COLUMNS as cx, AlertTableColumn as cy, UserInfoForDuplicate as cz, KycOnboardingLevel as d, KybOnboardingLevels as e, KybOnboardingLevel as f, CustomerOnboardingLevels as g, CustomerOnboardingLevel as h, CustomerStatuses as i, CustomerStatus as j, CUSTOMERS_CHARTS as k, CustomersChartType as l, CUSTOMER_TABLE_COLUMNS as m, CustomerTableColumn as n, CUSTOMER_AUTOMATION_REASONS as o, SdkVerificationResponseSchema as p, CloseScreenNotification as q, KycCompletionData as r, KycCompletionNotification as s, RuleEngineScenarioExecutionData as t, OnChainScenarioExecutionData as u, ScenarioExecutionData as v, ScenarioExecutionNotification as w, OcvSdkInitialized as x, StartCompletedNotification as y, IdentityNotificationMessage as z };
|
package/dist/{identity-api.schema-f273d197.cjs.dev.cjs → identity-api.schema-58bf8f00.cjs.dev.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var zod = require('zod');
|
|
4
|
-
var vault_schema = require('./vault.schema-
|
|
4
|
+
var vault_schema = require('./vault.schema-f3a557c2.cjs.dev.cjs');
|
|
5
5
|
|
|
6
6
|
var CredentialSchemas = {
|
|
7
7
|
ProofOfResidence: vault_schema.ProofOfResidenceCredentialSubjectSchema,
|
|
@@ -224,7 +224,7 @@ var OPERATORS = ["$noop",
|
|
|
224
224
|
];
|
|
225
225
|
var Operator = zod.z["enum"](OPERATORS);
|
|
226
226
|
var ZKPOperator = zod.z["enum"](OPERATORS).exclude(["$lte", "$gte", "$has", "$nhas"]);
|
|
227
|
-
var operatorDisplayMap = (_operatorDisplayMap = {}, vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(_operatorDisplayMap, Operator["enum"].$eq, "is equal to"), Operator["enum"].$ne, "is not equal to"), Operator["enum"].$gt, "is greater than"), Operator["enum"].$lt, "is lower than"), Operator["enum"].$gte, "is greater than or equal to"), Operator["enum"].$lte, "is
|
|
227
|
+
var operatorDisplayMap = (_operatorDisplayMap = {}, vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(_operatorDisplayMap, Operator["enum"].$eq, "is equal to"), Operator["enum"].$ne, "is not equal to"), Operator["enum"].$gt, "is greater than"), Operator["enum"].$lt, "is lower than"), Operator["enum"].$gte, "is greater than or equal to"), Operator["enum"].$lte, "is lower than or equal to"), Operator["enum"].$in, "is in"), Operator["enum"].$nin, "is not in"), Operator["enum"].$has, "has"), Operator["enum"].$nhas, "has not"), vault_schema._defineProperty(vault_schema._defineProperty(_operatorDisplayMap, Operator["enum"].$noop, "noop"), Operator["enum"].$exists, "exists"));
|
|
228
228
|
var ARRAY_OPERATORS = [Operator["enum"].$has, Operator["enum"].$nhas];
|
|
229
229
|
var ArrayOperator = zod.z["enum"](ARRAY_OPERATORS);
|
|
230
230
|
var STRING_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$in, Operator["enum"].$nin, Operator["enum"].$exists];
|
|
@@ -284,6 +284,11 @@ var QueryConfigSimplified = zod.z.object({
|
|
|
284
284
|
// TODO: Make the value type dynamic based on the attribute type
|
|
285
285
|
operator: Operator // TODO: Make the operator type dynamic based on the attribute type
|
|
286
286
|
});
|
|
287
|
+
var QueryGroupConfigSimplified = zod.z.object({
|
|
288
|
+
id: vault_schema.QueryGroupId.describe("Unique ID for the query group").optional(),
|
|
289
|
+
operator: QueryLogicOperator,
|
|
290
|
+
queries: zod.z.array(QueryConfigSimplified)
|
|
291
|
+
});
|
|
287
292
|
var RuleResultQueryConfig = QueryConfigSimplified.extend({
|
|
288
293
|
attribute: zod.z.union([zod.z.string(), vault_schema.VaultMetadataLinkZodSchema]),
|
|
289
294
|
// string for backwards compatibility
|
|
@@ -381,9 +386,120 @@ function oldCredentialPathToDataLink(path, credentialType) {
|
|
|
381
386
|
};
|
|
382
387
|
}
|
|
383
388
|
|
|
389
|
+
// Risk Score
|
|
390
|
+
var RiskScoreTypes = ["Low", "Medium", "High", "No risk"];
|
|
391
|
+
var RiskScoreType = zod.z["enum"](RiskScoreTypes);
|
|
392
|
+
// Customer Type
|
|
393
|
+
var CustomerTypes = ["Individual", "Company"];
|
|
394
|
+
var CustomerType = zod.z["enum"](CustomerTypes);
|
|
395
|
+
// KYC Onboarding Level
|
|
396
|
+
var KycOnboardingLevels = ["Sign-up", "AML screening", "KYC", "Questionaire", "Onboarded"];
|
|
397
|
+
var KycOnboardingLevel = zod.z["enum"](KycOnboardingLevels);
|
|
398
|
+
// KYB Onboarding Level
|
|
399
|
+
var KybOnboardingLevels = ["Onboarding", "KYB", "Onboarded"];
|
|
400
|
+
var KybOnboardingLevel = zod.z["enum"](KybOnboardingLevels);
|
|
401
|
+
var CustomerOnboardingLevels = [].concat(KycOnboardingLevels, KybOnboardingLevels);
|
|
402
|
+
var CustomerOnboardingLevel = zod.z["enum"](CustomerOnboardingLevels);
|
|
403
|
+
// Customer Status
|
|
404
|
+
var CustomerStatuses = ["Active", "Rejected", "Dormant", "To be reviewed", "Failed", "Escalated", "Terminated", "No status"];
|
|
405
|
+
var CustomerStatus = zod.z["enum"](CustomerStatuses);
|
|
406
|
+
var BasicCustomerContactInformation = zod.z.object({
|
|
407
|
+
email: zod.z.string().email(),
|
|
408
|
+
phone: zod.z.string().min(4),
|
|
409
|
+
twitter: zod.z.string(),
|
|
410
|
+
discord: zod.z.string(),
|
|
411
|
+
telegram: zod.z.string()
|
|
412
|
+
}).partial();
|
|
413
|
+
var CUSTOMERS_CHARTS = ["totalCustomers", "onboarded", "active", "dormant", "rejected", "topCountriesByCustomersCount", "customersRiskLevel", "customersByStatus", "trendOfStatusesOverTime"];
|
|
414
|
+
var CustomersChartType = zod.z["enum"](CUSTOMERS_CHARTS);
|
|
415
|
+
var CUSTOMER_TABLE_COLUMNS = ["selected", "wallets", "type", "country_of_residence", "risk_score", "onboarding_level", "open_alerts_count", "status", "date_onboarded"];
|
|
416
|
+
var CustomerTableColumn = zod.z["enum"](CUSTOMER_TABLE_COLUMNS);
|
|
417
|
+
var CUSTOMER_AUTOMATION_REASONS = {
|
|
418
|
+
"rule-engine": {
|
|
419
|
+
fail: "Rules engine verification failed",
|
|
420
|
+
pass: "Rules engine verification passed"
|
|
421
|
+
},
|
|
422
|
+
kyc: {
|
|
423
|
+
green: {
|
|
424
|
+
"final": "Passed KYC"
|
|
425
|
+
},
|
|
426
|
+
yellow: {
|
|
427
|
+
retry: "User rejected by the KYC provider with possibility to retry",
|
|
428
|
+
fail: "User rejected by the KYC provider"
|
|
429
|
+
},
|
|
430
|
+
red: {
|
|
431
|
+
retry: "User rejected by the KYC provider with possibility to retry",
|
|
432
|
+
fail: "User rejected by the KYC provider"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
kyb: {
|
|
436
|
+
green: {
|
|
437
|
+
"final": "Passed KYB"
|
|
438
|
+
},
|
|
439
|
+
yellow: {
|
|
440
|
+
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
441
|
+
fail: "Company rejected by the KYB provider"
|
|
442
|
+
},
|
|
443
|
+
red: {
|
|
444
|
+
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
445
|
+
fail: "Company rejected by the KYB provider"
|
|
446
|
+
},
|
|
447
|
+
beneficiaryOnToBeReviewState: "One or more beneficiaries are on 'To be reviewed' state"
|
|
448
|
+
},
|
|
449
|
+
"aml-screening": {
|
|
450
|
+
fail: "AML screening hits received during onboarding",
|
|
451
|
+
ongoingMonitoringFail: "AML screening hits received during ongoing monitoring",
|
|
452
|
+
pass: "Passed AML screening"
|
|
453
|
+
},
|
|
454
|
+
offchain_zkp: {
|
|
455
|
+
fail: "Offchain ZKP verification failed",
|
|
456
|
+
pass: "Offchain ZKP verification passed"
|
|
457
|
+
},
|
|
458
|
+
tfhe: {
|
|
459
|
+
fail: "TFHE verification failed",
|
|
460
|
+
pass: "TFHE verification passed"
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
// Alert Statuses
|
|
465
|
+
var AlertStatuses = ["Open", "Under Investigation", "Pending", "Closed", "Escalated"];
|
|
466
|
+
var AlertStatus = zod.z["enum"](AlertStatuses);
|
|
467
|
+
// Alert Types
|
|
468
|
+
var AlertTypes = ["AML Screening", "IP Screening", "Email Screening", "KYC Drop-off", "Onchain Monitoring", "Fraud", "Transaction Monitoring", "Duplicate", "Individual Monitoring"];
|
|
469
|
+
var AlertType = zod.z["enum"](AlertTypes);
|
|
470
|
+
// Alert Severities
|
|
471
|
+
var AlertSeverities = ["Low", "Medium", "High"];
|
|
472
|
+
var AlertSeverity = zod.z["enum"](AlertSeverities);
|
|
473
|
+
// Alert Categories
|
|
474
|
+
var AlertCategories = ["Onboarding", "Ongoing monitoring"];
|
|
475
|
+
var AlertCategory = zod.z["enum"](AlertCategories);
|
|
476
|
+
var ALERT_CHART_TYPES = ["total", "new", "opened", "closed", "inProgress", "unassigned", "escalated", "overdue", "avgClosureTime", "ageOfOldest", "alertTrendsOverTime", "alertsByType", "ageOfOpenAlerts", "alertsPerOfficer", "alertsSeverity"];
|
|
477
|
+
var AlertChartType = zod.z["enum"](ALERT_CHART_TYPES);
|
|
478
|
+
var ALERT_TABLE_COLUMNS = ["selected", "createdAt", "overdue", "id", "severity", "type", "description", "assignedTo", "country", "status"];
|
|
479
|
+
var AlertTableColumn = zod.z["enum"](ALERT_TABLE_COLUMNS);
|
|
480
|
+
var UserInfoForDuplicate = zod.z.object({
|
|
481
|
+
customerId: vault_schema.UuidString,
|
|
482
|
+
customerInfo: zod.z.string().nullish(),
|
|
483
|
+
profilePicture: zod.z.string().nullish(),
|
|
484
|
+
idDocumentUrl: zod.z.string().nullish()
|
|
485
|
+
});
|
|
486
|
+
var DuplicateData = zod.z.object({
|
|
487
|
+
original: UserInfoForDuplicate,
|
|
488
|
+
duplicate: UserInfoForDuplicate
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
var SCENARIO_ACTION_TYPES = ["SET_CUSTOMER_RISK_LEVEL", "SET_CUSTOMER_STATUS", "SET_ALERT_RISK_LEVEL", "SET_TRANSACTION_RISK_LEVEL", "SET_TRANSACTION_STATUS", "ASSIGN_COMPLIANCE_OFFICER", "CREATE_ALERT"];
|
|
492
|
+
var ActionType = zod.z["enum"](SCENARIO_ACTION_TYPES);
|
|
493
|
+
var ACTION_TRIGGERS = ["ON_TRUE", "ON_FALSE", "ALWAYS"];
|
|
494
|
+
var ActionTrigger = zod.z["enum"](ACTION_TRIGGERS);
|
|
495
|
+
var ACTION_STATUSES = ["ENABLED", "DISABLED"];
|
|
496
|
+
var ActionStatus = zod.z["enum"](ACTION_STATUSES);
|
|
497
|
+
var ActionValue = zod.z.union([RiskScoreType, CustomerStatus, vault_schema.TransactionReviewStatus, AlertType]);
|
|
384
498
|
var ScenarioTypes = ["PrivacyPreservingMonitoring", "IndividualMonitoring", "TransactionMonitoring", "TFHE" // TODO integrate TFHE verification
|
|
385
499
|
];
|
|
386
500
|
var ScenarioType = zod.z["enum"](ScenarioTypes);
|
|
501
|
+
var ScenarioModes = ["INTERNAL", "EXTERNAL"];
|
|
502
|
+
var ScenarioMode = zod.z["enum"](ScenarioModes);
|
|
387
503
|
var ScenarioStatuses = ["enabled", "disabled"];
|
|
388
504
|
var ScenarioStatus = zod.z["enum"](ScenarioStatuses);
|
|
389
505
|
var ScenarioSchema = zod.z.object({
|
|
@@ -426,9 +542,9 @@ var RuleEngineResponse = zod.z.object({
|
|
|
426
542
|
scenarioId: zod.z.string()
|
|
427
543
|
});
|
|
428
544
|
var ScenarioExecutionResponse = zod.z.array(RuleEngineResponse);
|
|
429
|
-
var RuleResultStatuses = ["valid", "not-valid", "error", "unknown"];
|
|
545
|
+
var RuleResultStatuses = ["valid", "not-valid", "skipped", "error", "unknown"];
|
|
430
546
|
var RuleResultStatus = zod.z["enum"](RuleResultStatuses);
|
|
431
|
-
var RuleResultStatusLabels = vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, RuleResultStatus.Enum.valid, "Valid"), RuleResultStatus.Enum["not-valid"], "Not Valid"), RuleResultStatus.Enum.error, "Error"), RuleResultStatus.Enum.unknown, "Unknown");
|
|
547
|
+
var RuleResultStatusLabels = vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, RuleResultStatus.Enum.valid, "Valid"), RuleResultStatus.Enum["not-valid"], "Not Valid"), RuleResultStatus.Enum.skipped, "Skipped"), RuleResultStatus.Enum.error, "Error"), RuleResultStatus.Enum.unknown, "Unknown");
|
|
432
548
|
var SdkVerificationOutput = zod.z.object({
|
|
433
549
|
customerId: zod.z.string().optional(),
|
|
434
550
|
// for v1
|
|
@@ -445,12 +561,21 @@ var VerificationOutput = zod.z.object({
|
|
|
445
561
|
verificationResult: SdkVerificationOutput.nullable(),
|
|
446
562
|
status: VerificationSessionStatus
|
|
447
563
|
});
|
|
564
|
+
var Action = zod.z.object({
|
|
565
|
+
type: ActionType,
|
|
566
|
+
trigger: ActionTrigger,
|
|
567
|
+
status: ActionStatus,
|
|
568
|
+
value: ActionValue
|
|
569
|
+
});
|
|
448
570
|
var Scenario = zod.z.object({
|
|
449
571
|
id: vault_schema.ScenarioId,
|
|
450
572
|
name: zod.z.string(),
|
|
451
573
|
description: zod.z.string().nullish(),
|
|
452
574
|
queries: zod.z.array(QueryConfigSimplified),
|
|
575
|
+
queryGroups: zod.z.array(QueryGroupConfigSimplified),
|
|
576
|
+
actions: zod.z.array(Action),
|
|
453
577
|
type: ScenarioType,
|
|
578
|
+
mode: ScenarioMode,
|
|
454
579
|
workspaceId: vault_schema.WorkspaceId,
|
|
455
580
|
vcsIncluded: zod.z.array(CredentialType).nullish()
|
|
456
581
|
});
|
|
@@ -815,81 +940,6 @@ var GetTxAuthSigResponseTezos = zod.z.object({
|
|
|
815
940
|
var HostRequestMessage = zod.z.union([GetCredentialsRequest, PolygonIdRequest, StartFlowRequest, IsVerifiedRequest, GetTxAuthSigRequest, GetTxAuthSigRequestTezos]);
|
|
816
941
|
var IdentityResponseMessage = zod.z.union([GetCredentialsResponse, PolygonIdResponse, IsVerifiedResponse, GetTxAuthSigResponse, GetTxAuthSigResponseTezos]);
|
|
817
942
|
|
|
818
|
-
// Risk Score
|
|
819
|
-
var RiskScoreTypes = ["Low", "Medium", "High", "No risk"];
|
|
820
|
-
var RiskScoreType = zod.z["enum"](RiskScoreTypes);
|
|
821
|
-
// Customer Type
|
|
822
|
-
var CustomerTypes = ["Individual", "Company"];
|
|
823
|
-
var CustomerType = zod.z["enum"](CustomerTypes);
|
|
824
|
-
// KYC Onboarding Level
|
|
825
|
-
var KycOnboardingLevels = ["Sign-up", "AML screening", "KYC", "Questionaire", "Onboarded"];
|
|
826
|
-
var KycOnboardingLevel = zod.z["enum"](KycOnboardingLevels);
|
|
827
|
-
// KYB Onboarding Level
|
|
828
|
-
var KybOnboardingLevels = ["Onboarding", "KYB", "Onboarded"];
|
|
829
|
-
var KybOnboardingLevel = zod.z["enum"](KybOnboardingLevels);
|
|
830
|
-
var CustomerOnboardingLevels = [].concat(KycOnboardingLevels, KybOnboardingLevels);
|
|
831
|
-
var CustomerOnboardingLevel = zod.z["enum"](CustomerOnboardingLevels);
|
|
832
|
-
// Customer Status
|
|
833
|
-
var CustomerStatuses = ["Active", "Rejected", "Dormant", "To be reviewed", "Failed", "Escalated", "Terminated", "No status"];
|
|
834
|
-
var CustomerStatus = zod.z["enum"](CustomerStatuses);
|
|
835
|
-
var BasicCustomerContactInformation = zod.z.object({
|
|
836
|
-
email: zod.z.string().email(),
|
|
837
|
-
phone: zod.z.string().min(4),
|
|
838
|
-
twitter: zod.z.string(),
|
|
839
|
-
discord: zod.z.string(),
|
|
840
|
-
telegram: zod.z.string()
|
|
841
|
-
}).partial();
|
|
842
|
-
var CUSTOMERS_CHARTS = ["totalCustomers", "onboarded", "active", "dormant", "rejected", "topCountriesByCustomersCount", "customersRiskLevel", "customersByStatus", "trendOfStatusesOverTime"];
|
|
843
|
-
var CustomersChartType = zod.z["enum"](CUSTOMERS_CHARTS);
|
|
844
|
-
var CUSTOMER_TABLE_COLUMNS = ["selected", "wallets", "type", "country_of_residence", "risk_score", "onboarding_level", "open_alerts_count", "status", "date_onboarded"];
|
|
845
|
-
var CustomerTableColumn = zod.z["enum"](CUSTOMER_TABLE_COLUMNS);
|
|
846
|
-
var CUSTOMER_AUTOMATION_REASONS = {
|
|
847
|
-
"rule-engine": {
|
|
848
|
-
fail: "Rules engine verification failed",
|
|
849
|
-
pass: "Rules engine verification passed"
|
|
850
|
-
},
|
|
851
|
-
kyc: {
|
|
852
|
-
green: {
|
|
853
|
-
"final": "Passed KYC"
|
|
854
|
-
},
|
|
855
|
-
yellow: {
|
|
856
|
-
retry: "User rejected by the KYC provider with possibility to retry",
|
|
857
|
-
fail: "User rejected by the KYC provider"
|
|
858
|
-
},
|
|
859
|
-
red: {
|
|
860
|
-
retry: "User rejected by the KYC provider with possibility to retry",
|
|
861
|
-
fail: "User rejected by the KYC provider"
|
|
862
|
-
}
|
|
863
|
-
},
|
|
864
|
-
kyb: {
|
|
865
|
-
green: {
|
|
866
|
-
"final": "Passed KYB"
|
|
867
|
-
},
|
|
868
|
-
yellow: {
|
|
869
|
-
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
870
|
-
fail: "Company rejected by the KYB provider"
|
|
871
|
-
},
|
|
872
|
-
red: {
|
|
873
|
-
retry: "Company rejected by the KYB provider with possibility to retry",
|
|
874
|
-
fail: "Company rejected by the KYB provider"
|
|
875
|
-
},
|
|
876
|
-
beneficiaryOnToBeReviewState: "One or more beneficiaries are on 'To be reviewed' state"
|
|
877
|
-
},
|
|
878
|
-
"aml-screening": {
|
|
879
|
-
fail: "AML screening hits received during onboarding",
|
|
880
|
-
ongoingMonitoringFail: "AML screening hits received during ongoing monitoring",
|
|
881
|
-
pass: "Passed AML screening"
|
|
882
|
-
},
|
|
883
|
-
offchain_zkp: {
|
|
884
|
-
fail: "Offchain ZKP verification failed",
|
|
885
|
-
pass: "Offchain ZKP verification passed"
|
|
886
|
-
},
|
|
887
|
-
tfhe: {
|
|
888
|
-
fail: "TFHE verification failed",
|
|
889
|
-
pass: "TFHE verification passed"
|
|
890
|
-
}
|
|
891
|
-
};
|
|
892
|
-
|
|
893
943
|
/**
|
|
894
944
|
* Wallet challenge parameters
|
|
895
945
|
*/
|
|
@@ -1114,10 +1164,29 @@ var VerifyWalletChallengeRequest = WalletSignatureResponse.and(zod.z.object({
|
|
|
1114
1164
|
blockchainId: vault_schema.BlockchainId.optional()
|
|
1115
1165
|
}));
|
|
1116
1166
|
|
|
1167
|
+
exports.ACTION_STATUSES = ACTION_STATUSES;
|
|
1168
|
+
exports.ACTION_TRIGGERS = ACTION_TRIGGERS;
|
|
1169
|
+
exports.ALERT_CHART_TYPES = ALERT_CHART_TYPES;
|
|
1170
|
+
exports.ALERT_TABLE_COLUMNS = ALERT_TABLE_COLUMNS;
|
|
1117
1171
|
exports.ARRAY_OPERATORS = ARRAY_OPERATORS;
|
|
1118
1172
|
exports.AUTHORIZATION_REQUEST_MESSAGE_TYPES = AUTHORIZATION_REQUEST_MESSAGE_TYPES;
|
|
1119
1173
|
exports.AVAILABLE_FLOWS = AVAILABLE_FLOWS;
|
|
1120
1174
|
exports.AbbreviatedWorkflowScenario = AbbreviatedWorkflowScenario;
|
|
1175
|
+
exports.Action = Action;
|
|
1176
|
+
exports.ActionStatus = ActionStatus;
|
|
1177
|
+
exports.ActionTrigger = ActionTrigger;
|
|
1178
|
+
exports.ActionType = ActionType;
|
|
1179
|
+
exports.ActionValue = ActionValue;
|
|
1180
|
+
exports.AlertCategories = AlertCategories;
|
|
1181
|
+
exports.AlertCategory = AlertCategory;
|
|
1182
|
+
exports.AlertChartType = AlertChartType;
|
|
1183
|
+
exports.AlertSeverities = AlertSeverities;
|
|
1184
|
+
exports.AlertSeverity = AlertSeverity;
|
|
1185
|
+
exports.AlertStatus = AlertStatus;
|
|
1186
|
+
exports.AlertStatuses = AlertStatuses;
|
|
1187
|
+
exports.AlertTableColumn = AlertTableColumn;
|
|
1188
|
+
exports.AlertType = AlertType;
|
|
1189
|
+
exports.AlertTypes = AlertTypes;
|
|
1121
1190
|
exports.AllCredentialValues = AllCredentialValues;
|
|
1122
1191
|
exports.AllScenarioExecutionAuthorizationData = AllScenarioExecutionAuthorizationData;
|
|
1123
1192
|
exports.AnyTxAuthDataSignatureResponse = AnyTxAuthDataSignatureResponse;
|
|
@@ -1167,6 +1236,7 @@ exports.CustomersChartType = CustomersChartType;
|
|
|
1167
1236
|
exports.DATE_OPERATORS = DATE_OPERATORS;
|
|
1168
1237
|
exports.DataAvailableOnStart = DataAvailableOnStart;
|
|
1169
1238
|
exports.DateOperator = DateOperator;
|
|
1239
|
+
exports.DuplicateData = DuplicateData;
|
|
1170
1240
|
exports.Eip155TxAuthInputJsSdk = Eip155TxAuthInputJsSdk;
|
|
1171
1241
|
exports.ExecuteQueryResponse = ExecuteQueryResponse;
|
|
1172
1242
|
exports.ExtendedTezosTxAuthDataSignatureResponse = ExtendedTezosTxAuthDataSignatureResponse;
|
|
@@ -1241,6 +1311,7 @@ exports.QueryConfigSimplified = QueryConfigSimplified;
|
|
|
1241
1311
|
exports.QueryConfigTfhe = QueryConfigTfhe;
|
|
1242
1312
|
exports.QueryCredentialType = QueryCredentialType;
|
|
1243
1313
|
exports.QueryCredentialTypes = QueryCredentialTypes;
|
|
1314
|
+
exports.QueryGroupConfigSimplified = QueryGroupConfigSimplified;
|
|
1244
1315
|
exports.QueryLogicOperator = QueryLogicOperator;
|
|
1245
1316
|
exports.QueryType = QueryType;
|
|
1246
1317
|
exports.RequiredDataRowSchema = RequiredDataRowSchema;
|
|
@@ -1253,6 +1324,7 @@ exports.RuleResultQueryConfig = RuleResultQueryConfig;
|
|
|
1253
1324
|
exports.RuleResultStatus = RuleResultStatus;
|
|
1254
1325
|
exports.RuleResultStatusLabels = RuleResultStatusLabels;
|
|
1255
1326
|
exports.RuleResultStatuses = RuleResultStatuses;
|
|
1327
|
+
exports.SCENARIO_ACTION_TYPES = SCENARIO_ACTION_TYPES;
|
|
1256
1328
|
exports.SCENARIO_AUTHORIZATION_STATUSES = SCENARIO_AUTHORIZATION_STATUSES;
|
|
1257
1329
|
exports.STRING_OPERATORS = STRING_OPERATORS;
|
|
1258
1330
|
exports.SUPPORTED_TYPES = SUPPORTED_TYPES;
|
|
@@ -1262,6 +1334,8 @@ exports.ScenarioAuthorizationStatus = ScenarioAuthorizationStatus;
|
|
|
1262
1334
|
exports.ScenarioExecutionData = ScenarioExecutionData;
|
|
1263
1335
|
exports.ScenarioExecutionNotification = ScenarioExecutionNotification;
|
|
1264
1336
|
exports.ScenarioExecutionResponse = ScenarioExecutionResponse;
|
|
1337
|
+
exports.ScenarioMode = ScenarioMode;
|
|
1338
|
+
exports.ScenarioModes = ScenarioModes;
|
|
1265
1339
|
exports.ScenarioSchema = ScenarioSchema;
|
|
1266
1340
|
exports.ScenarioStatus = ScenarioStatus;
|
|
1267
1341
|
exports.ScenarioStatuses = ScenarioStatuses;
|
|
@@ -1289,6 +1363,7 @@ exports.TxAuthDataSignatureGatingRequest = TxAuthDataSignatureGatingRequest;
|
|
|
1289
1363
|
exports.TxAuthDataSignatureResponse = TxAuthDataSignatureResponse;
|
|
1290
1364
|
exports.TxAuthInput = TxAuthInput;
|
|
1291
1365
|
exports.TxSignatureResponse = TxSignatureResponse;
|
|
1366
|
+
exports.UserInfoForDuplicate = UserInfoForDuplicate;
|
|
1292
1367
|
exports.VerifiableCredential = VerifiableCredential;
|
|
1293
1368
|
exports.VerificationOutput = VerificationOutput;
|
|
1294
1369
|
exports.VerificationSessionStatus = VerificationSessionStatus;
|