@cobo/cobo-waas2 1.28.0 → 1.30.0
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/README.md +88 -16
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +2 -2
- package/dist/api/ComplianceApi.js +144 -4
- package/dist/api/FeeStationApi.js +2 -2
- package/dist/api/GraphQLApi.js +85 -0
- package/dist/api/PaymentApi.js +1161 -154
- package/dist/api/StakingsApi.js +2 -2
- package/dist/api/SwapsApi.js +3 -0
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +18 -18
- package/dist/index.js +357 -28
- package/dist/model/AddressRiskLevel.js +71 -0
- package/dist/model/AddressesEventData.js +13 -3
- package/dist/model/{AllocationRecord.js → AllocationItem.js} +38 -35
- package/dist/model/{AllocationRequest.js → AllocationParam.js} +29 -26
- package/dist/model/BalanceUpdateInfoEventData.js +13 -3
- package/dist/model/BatchAllocation.js +12 -12
- package/dist/model/BatchAllocationDetail.js +15 -17
- package/dist/model/BridgingFee.js +3 -3
- package/dist/model/ChainsEventData.js +13 -3
- package/dist/model/CommissionFee.js +2 -2
- package/dist/model/ComplianceDispositionUpdateEventData.js +13 -3
- package/dist/model/ComplianceKyaScreeningsUpdateEventData.js +346 -0
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +13 -3
- package/dist/model/ContractCallParams.js +3 -3
- package/dist/model/CounterpartyWalletAddressDetail.js +2 -2
- package/dist/model/CreateBatchAllocationRequest.js +19 -19
- package/dist/model/CreateBulkSendRequest.js +167 -0
- package/dist/model/CreateBulkSendRequestPayoutParamsInner.js +153 -0
- package/dist/model/CreateCounterpartyEntry201Response.js +143 -0
- package/dist/model/CreateCounterpartyEntryRequest.js +141 -0
- package/dist/model/CreateDestinationEntry201Response.js +172 -0
- package/dist/model/CreateDestinationEntryRequest.js +172 -0
- package/dist/model/CreateKyaScreeningsBody.js +129 -0
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +17 -15
- package/dist/model/CreatePayoutRequest.js +35 -28
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateReportRequest.js +156 -0
- package/dist/model/CreateTopUpAddresses.js +139 -0
- package/dist/model/CreateTopUpAddresses201Response.js +107 -0
- package/dist/model/CreateWalletAddress.js +2 -2
- package/dist/model/DeleteCounterpartyById200Response.js +110 -0
- package/dist/model/DeleteCounterpartyEntry200Response.js +110 -0
- package/dist/model/DeleteDestinationById200Response.js +110 -0
- package/dist/model/DeleteDestinationEntry200Response.js +110 -0
- package/dist/model/EntryType.js +61 -0
- package/dist/model/GetCounterpartyEntry200Response.js +90 -0
- package/dist/model/GetDestinationEntry200Response.js +106 -0
- package/dist/model/{ListPayoutItems200Response.js → GetReports200Response.js} +22 -22
- package/dist/model/KyaRiskAssessment.js +151 -0
- package/dist/model/KyaRiskDetail.js +126 -0
- package/dist/model/KyaRiskLevel.js +66 -0
- package/dist/model/KyaScreeningRequest.js +154 -0
- package/dist/model/KyaScreeningResult.js +222 -0
- package/dist/model/KyaScreeningResultRiskAssessment.js +171 -0
- package/dist/model/KyaScreeningStatus.js +71 -0
- package/dist/model/KyaScreeningsEventData.js +174 -0
- package/dist/model/LinkDisplayInfo.js +1 -1
- package/dist/model/{ListAllocations200Response.js → ListAllocationItems200Response.js} +22 -22
- package/dist/model/ListBulkSendItems200Response.js +123 -0
- package/dist/model/ListCounterpartyEntries200Response.js +123 -0
- package/dist/model/ListDestinationEntries200Response.js +153 -0
- package/dist/model/ListKyaScreenings200Response.js +145 -0
- package/dist/model/MPCVaultEventData.js +13 -3
- package/dist/model/MerchantBalance.js +4 -4
- package/dist/model/Order.js +10 -10
- package/dist/model/OrderLinkBusinessInfo.js +22 -16
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +2 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +4 -4
- package/dist/model/PaymentAddressUpdateEventData.js +13 -3
- package/dist/model/PaymentAllocationAmount.js +2 -2
- package/dist/model/PaymentBulkSend.js +182 -0
- package/dist/model/PaymentBulkSendEvent.js +359 -0
- package/dist/model/PaymentBulkSendExecutionMode.js +61 -0
- package/dist/model/PaymentBulkSendItem.js +190 -0
- package/dist/model/{PaymentPayoutItemStatus.js → PaymentBulkSendItemStatus.js} +11 -11
- package/dist/model/PaymentBulkSendItemValidationStatus.js +66 -0
- package/dist/model/PaymentBulkSendStatus.js +81 -0
- package/dist/model/PaymentEstimateFeeRequest.js +13 -0
- package/dist/model/PaymentFeeType.js +15 -0
- package/dist/model/PaymentOrderEventData.js +31 -21
- package/dist/model/PaymentPayout.js +64 -46
- package/dist/model/PaymentPayoutDetail.js +166 -52
- package/dist/model/PaymentPayoutEvent.js +152 -80
- package/dist/model/PaymentPayoutItem.js +9 -166
- package/dist/model/PaymentPayoutParam.js +6 -46
- package/dist/model/PaymentPayoutRecipientInfo.js +126 -0
- package/dist/model/PaymentPayoutStatus.js +9 -4
- package/dist/model/PaymentRefundEventData.js +13 -3
- package/dist/model/PaymentSettlementEvent.js +13 -3
- package/dist/model/PaymentTransactionEventData.js +13 -3
- package/dist/model/PspBalance.js +4 -4
- package/dist/model/RefundLinkBusinessInfo.js +1 -1
- package/dist/model/Report.js +209 -0
- package/dist/model/ReportExportFormat.js +66 -0
- package/dist/model/ReportStatus.js +61 -0
- package/dist/model/ReportType.js +121 -0
- package/dist/model/SuspendedTokenEventData.js +13 -3
- package/dist/model/TSSRequestWebhookEventData.js +13 -3
- package/dist/model/TokenListingEventData.js +13 -3
- package/dist/model/TokensEventData.js +13 -3
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionExtraType.js +5 -0
- package/dist/model/TransactionWalletConnectInfo.js +146 -0
- package/dist/model/TransactionWebhookEventData.js +13 -3
- package/dist/model/TransferParams.js +2 -2
- package/dist/model/UpdateCounterpartyRequest.js +160 -0
- package/dist/model/UpdateDestinationEntry200Response.js +90 -0
- package/dist/model/UpdateDestinationEntryRequest.js +135 -0
- package/dist/model/UpdateDestinationRequest.js +173 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletAddress.js +20 -2
- package/dist/model/WalletInfoEventData.js +13 -3
- package/dist/model/WebhookEventData.js +121 -28
- package/dist/model/WebhookEventDataType.js +12 -2
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/AddressRiskLevel.md +16 -0
- package/docs/AddressesEventData.md +5 -1
- package/docs/AllocationItem.md +15 -0
- package/docs/AllocationParam.md +13 -0
- package/docs/AutoSweepApi.md +1 -1
- package/docs/BalanceUpdateInfoEventData.md +5 -1
- package/docs/BatchAllocation.md +2 -2
- package/docs/BatchAllocationDetail.md +1 -1
- package/docs/BridgingFee.md +2 -2
- package/docs/ChainsEventData.md +5 -1
- package/docs/CommissionFee.md +1 -1
- package/docs/ComplianceApi.md +163 -0
- package/docs/ComplianceDispositionUpdateEventData.md +5 -1
- package/docs/ComplianceKyaScreeningsUpdateEventData.md +64 -0
- package/docs/ComplianceKytScreeningsUpdateEventData.md +5 -1
- package/docs/ContractCallParams.md +2 -2
- package/docs/CounterpartyWalletAddressDetail.md +1 -1
- package/docs/CreateBatchAllocationRequest.md +2 -2
- package/docs/CreateBulkSendRequest.md +12 -0
- package/docs/CreateBulkSendRequestPayoutParamsInner.md +12 -0
- package/docs/CreateCounterpartyEntry201Response.md +10 -0
- package/docs/CreateCounterpartyEntryRequest.md +10 -0
- package/docs/CreateDestinationEntry201Response.md +11 -0
- package/docs/CreateDestinationEntryRequest.md +11 -0
- package/docs/CreateKyaScreeningsBody.md +9 -0
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +11 -11
- package/docs/CreatePayoutRequest.md +4 -4
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateReportRequest.md +13 -0
- package/docs/CreateTopUpAddresses.md +11 -0
- package/docs/CreateTopUpAddresses201Response.md +9 -0
- package/docs/CreateWalletAddress.md +1 -1
- package/docs/DeleteCounterpartyById200Response.md +9 -0
- package/docs/DeleteCounterpartyEntry200Response.md +9 -0
- package/docs/DeleteDestinationById200Response.md +9 -0
- package/docs/DeleteDestinationEntry200Response.md +9 -0
- package/docs/EntryType.md +12 -0
- package/docs/FeeStationApi.md +1 -1
- package/docs/GetCounterpartyEntry200Response.md +9 -0
- package/docs/GetDestinationEntry200Response.md +10 -0
- package/docs/{ListAllocations200Response.md → GetReports200Response.md} +2 -2
- package/docs/GraphQLApi.md +61 -0
- package/docs/KyaRiskAssessment.md +11 -0
- package/docs/KyaRiskDetail.md +10 -0
- package/docs/KyaRiskLevel.md +14 -0
- package/docs/KyaScreeningRequest.md +12 -0
- package/docs/KyaScreeningResult.md +17 -0
- package/docs/KyaScreeningResultRiskAssessment.md +11 -0
- package/docs/KyaScreeningStatus.md +16 -0
- package/docs/KyaScreeningsEventData.md +14 -0
- package/docs/LinkDisplayInfo.md +1 -1
- package/docs/{ListPayoutItems200Response.md → ListAllocationItems200Response.md} +2 -2
- package/docs/ListBulkSendItems200Response.md +10 -0
- package/docs/ListCounterpartyEntries200Response.md +10 -0
- package/docs/ListDestinationEntries200Response.md +11 -0
- package/docs/ListKyaScreenings200Response.md +10 -0
- package/docs/MPCVaultEventData.md +5 -1
- package/docs/MerchantBalance.md +4 -4
- package/docs/Order.md +8 -8
- package/docs/OrderLinkBusinessInfo.md +11 -11
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +2 -2
- package/docs/PaymentAddressUpdateEventData.md +5 -1
- package/docs/PaymentAllocationAmount.md +1 -1
- package/docs/PaymentApi.md +1296 -198
- package/docs/PaymentBulkSend.md +15 -0
- package/docs/PaymentBulkSendEvent.md +65 -0
- package/docs/PaymentBulkSendExecutionMode.md +12 -0
- package/docs/PaymentBulkSendItem.md +15 -0
- package/docs/{PaymentPayoutItemStatus.md → PaymentBulkSendItemStatus.md} +3 -3
- package/docs/PaymentBulkSendItemValidationStatus.md +14 -0
- package/docs/PaymentBulkSendStatus.md +20 -0
- package/docs/PaymentEstimateFeeRequest.md +1 -0
- package/docs/PaymentFeeType.md +6 -0
- package/docs/PaymentOrderEventData.md +13 -9
- package/docs/PaymentPayout.md +8 -7
- package/docs/PaymentPayoutDetail.md +10 -8
- package/docs/PaymentPayoutEvent.md +15 -9
- package/docs/PaymentPayoutItem.md +2 -13
- package/docs/PaymentPayoutParam.md +1 -4
- package/docs/PaymentPayoutRecipientInfo.md +12 -0
- package/docs/PaymentPayoutStatus.md +4 -2
- package/docs/PaymentRefundEventData.md +5 -1
- package/docs/PaymentSettlementEvent.md +5 -1
- package/docs/PaymentTransactionEventData.md +5 -1
- package/docs/PspBalance.md +4 -4
- package/docs/RefundLinkBusinessInfo.md +1 -1
- package/docs/Report.md +17 -0
- package/docs/ReportExportFormat.md +14 -0
- package/docs/ReportStatus.md +12 -0
- package/docs/ReportType.md +36 -0
- package/docs/StakingsApi.md +1 -1
- package/docs/SuspendedTokenEventData.md +5 -1
- package/docs/SwapsApi.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +5 -1
- package/docs/TokenListingEventData.md +5 -1
- package/docs/TokensEventData.md +5 -1
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionExtraType.md +2 -0
- package/docs/TransactionWalletConnectInfo.md +12 -0
- package/docs/TransactionWebhookEventData.md +5 -1
- package/docs/TransactionsApi.md +3 -3
- package/docs/TransferParams.md +1 -1
- package/docs/UpdateCounterpartyRequest.md +13 -0
- package/docs/UpdateDestinationEntry200Response.md +9 -0
- package/docs/UpdateDestinationEntryRequest.md +11 -0
- package/docs/UpdateDestinationRequest.md +14 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletAddress.md +3 -1
- package/docs/WalletInfoEventData.md +5 -1
- package/docs/WalletsApi.md +9 -9
- package/docs/WebhookEventData.md +28 -18
- package/docs/WebhookEventDataType.md +5 -1
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/dist/model/PaymentPayoutItemDetail.js +0 -298
- package/docs/AllocationRecord.md +0 -15
- package/docs/AllocationRequest.md +0 -13
- package/docs/PaymentPayoutItemDetail.md +0 -22
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The KyaRiskDetail model module.
|
|
29
|
+
* @module model/KyaRiskDetail
|
|
30
|
+
*/
|
|
31
|
+
var KyaRiskDetail = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>KyaRiskDetail</code>.
|
|
34
|
+
* Individual risk category assessment detail.
|
|
35
|
+
* @alias module:model/KyaRiskDetail
|
|
36
|
+
* @param category {String} The risk category (e.g., sanctions, fraud, theft, etc.).
|
|
37
|
+
* @param exposure {String} The exposure level for this risk category (e.g., high, medium, low, none, indirect).
|
|
38
|
+
*/
|
|
39
|
+
function KyaRiskDetail(category, exposure) {
|
|
40
|
+
_classCallCheck(this, KyaRiskDetail);
|
|
41
|
+
KyaRiskDetail.initialize(this, category, exposure);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initializes the fields of this object.
|
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
+
* Only for internal use.
|
|
48
|
+
*/
|
|
49
|
+
return _createClass(KyaRiskDetail, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, category, exposure) {
|
|
52
|
+
obj['category'] = category;
|
|
53
|
+
obj['exposure'] = exposure;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>KyaRiskDetail</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/KyaRiskDetail} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/KyaRiskDetail} The populated <code>KyaRiskDetail</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new KyaRiskDetail();
|
|
68
|
+
if (data.hasOwnProperty('category')) {
|
|
69
|
+
obj['category'] = _ApiClient["default"].convertToType(data['category'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('exposure')) {
|
|
72
|
+
obj['exposure'] = _ApiClient["default"].convertToType(data['exposure'], 'String');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>KyaRiskDetail</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>KyaRiskDetail</code>.
|
|
82
|
+
*/
|
|
83
|
+
}, {
|
|
84
|
+
key: "validateJSON",
|
|
85
|
+
value: function validateJSON(data) {
|
|
86
|
+
// check to make sure all required properties are present in the JSON string
|
|
87
|
+
var _iterator = _createForOfIteratorHelper(KyaRiskDetail.RequiredProperties),
|
|
88
|
+
_step;
|
|
89
|
+
try {
|
|
90
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
91
|
+
var property = _step.value;
|
|
92
|
+
if (!data.hasOwnProperty(property)) {
|
|
93
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
} catch (err) {
|
|
98
|
+
_iterator.e(err);
|
|
99
|
+
} finally {
|
|
100
|
+
_iterator.f();
|
|
101
|
+
}
|
|
102
|
+
if (data['category'] && !(typeof data['category'] === 'string' || data['category'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `category` to be a primitive type in the JSON string but got " + data['category']);
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is a string
|
|
106
|
+
if (data['exposure'] && !(typeof data['exposure'] === 'string' || data['exposure'] instanceof String)) {
|
|
107
|
+
throw new Error("Expected the field `exposure` to be a primitive type in the JSON string but got " + data['exposure']);
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
}]);
|
|
112
|
+
}();
|
|
113
|
+
KyaRiskDetail.RequiredProperties = ["category", "exposure"];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The risk category (e.g., sanctions, fraud, theft, etc.).
|
|
117
|
+
* @member {String} category
|
|
118
|
+
*/
|
|
119
|
+
KyaRiskDetail.prototype['category'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The exposure level for this risk category (e.g., high, medium, low, none, indirect).
|
|
123
|
+
* @member {String} exposure
|
|
124
|
+
*/
|
|
125
|
+
KyaRiskDetail.prototype['exposure'] = undefined;
|
|
126
|
+
var _default = exports["default"] = KyaRiskDetail;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class KyaRiskLevel.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var KyaRiskLevel = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function KyaRiskLevel() {
|
|
32
|
+
_classCallCheck(this, KyaRiskLevel);
|
|
33
|
+
/**
|
|
34
|
+
* value: "High"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "High", "High");
|
|
38
|
+
/**
|
|
39
|
+
* value: "Medium"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "Medium", "Medium");
|
|
43
|
+
/**
|
|
44
|
+
* value: "Low"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "Low", "Low");
|
|
48
|
+
/**
|
|
49
|
+
* value: "unknown_default_open_api"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
53
|
+
}
|
|
54
|
+
return _createClass(KyaRiskLevel, null, [{
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value:
|
|
57
|
+
/**
|
|
58
|
+
* Returns a <code>KyaRiskLevel</code> enum value from a Javascript object name.
|
|
59
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
60
|
+
* @return {module:model/KyaRiskLevel} The enum <code>KyaRiskLevel</code> value.
|
|
61
|
+
*/
|
|
62
|
+
function constructFromObject(object) {
|
|
63
|
+
return object;
|
|
64
|
+
}
|
|
65
|
+
}]);
|
|
66
|
+
}();
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The KyaScreeningRequest model module.
|
|
29
|
+
* @module model/KyaScreeningRequest
|
|
30
|
+
*/
|
|
31
|
+
var KyaScreeningRequest = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>KyaScreeningRequest</code>.
|
|
34
|
+
* Individual address screening request.
|
|
35
|
+
* @alias module:model/KyaScreeningRequest
|
|
36
|
+
* @param request_id {String} The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization. This ID is used for idempotency to prevent duplicate submissions and for troubleshooting purposes.
|
|
37
|
+
* @param address {String} The blockchain address to be screened. For chains requiring memo (XRP, EOS, XLM, IOST, BNB_BNB, ATOM, LUNA, TON), append the memo to the address using \"|\" separator (e.g., \"address|memo\").
|
|
38
|
+
* @param chain_id {String} The chain identifier (e.g., ETH, BTC, TRON).
|
|
39
|
+
*/
|
|
40
|
+
function KyaScreeningRequest(request_id, address, chain_id) {
|
|
41
|
+
_classCallCheck(this, KyaScreeningRequest);
|
|
42
|
+
KyaScreeningRequest.initialize(this, request_id, address, chain_id);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(KyaScreeningRequest, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, request_id, address, chain_id) {
|
|
53
|
+
obj['request_id'] = request_id;
|
|
54
|
+
obj['address'] = address;
|
|
55
|
+
obj['chain_id'] = chain_id;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>KyaScreeningRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
60
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
61
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
62
|
+
* @param {module:model/KyaScreeningRequest} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/KyaScreeningRequest} The populated <code>KyaScreeningRequest</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new KyaScreeningRequest();
|
|
70
|
+
if (data.hasOwnProperty('request_id')) {
|
|
71
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('address')) {
|
|
74
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
77
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('note')) {
|
|
80
|
+
obj['note'] = _ApiClient["default"].convertToType(data['note'], 'String');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Validates the JSON data with respect to <code>KyaScreeningRequest</code>.
|
|
88
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
89
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>KyaScreeningRequest</code>.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "validateJSON",
|
|
93
|
+
value: function validateJSON(data) {
|
|
94
|
+
// check to make sure all required properties are present in the JSON string
|
|
95
|
+
var _iterator = _createForOfIteratorHelper(KyaScreeningRequest.RequiredProperties),
|
|
96
|
+
_step;
|
|
97
|
+
try {
|
|
98
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
99
|
+
var property = _step.value;
|
|
100
|
+
if (!data.hasOwnProperty(property)) {
|
|
101
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// ensure the json data is a string
|
|
105
|
+
} catch (err) {
|
|
106
|
+
_iterator.e(err);
|
|
107
|
+
} finally {
|
|
108
|
+
_iterator.f();
|
|
109
|
+
}
|
|
110
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
111
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
112
|
+
}
|
|
113
|
+
// ensure the json data is a string
|
|
114
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
115
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is a string
|
|
118
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
119
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
120
|
+
}
|
|
121
|
+
// ensure the json data is a string
|
|
122
|
+
if (data['note'] && !(typeof data['note'] === 'string' || data['note'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `note` to be a primitive type in the JSON string but got " + data['note']);
|
|
124
|
+
}
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
}]);
|
|
128
|
+
}();
|
|
129
|
+
KyaScreeningRequest.RequiredProperties = ["request_id", "address", "chain_id"];
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization. This ID is used for idempotency to prevent duplicate submissions and for troubleshooting purposes.
|
|
133
|
+
* @member {String} request_id
|
|
134
|
+
*/
|
|
135
|
+
KyaScreeningRequest.prototype['request_id'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The blockchain address to be screened. For chains requiring memo (XRP, EOS, XLM, IOST, BNB_BNB, ATOM, LUNA, TON), append the memo to the address using \"|\" separator (e.g., \"address|memo\").
|
|
139
|
+
* @member {String} address
|
|
140
|
+
*/
|
|
141
|
+
KyaScreeningRequest.prototype['address'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The chain identifier (e.g., ETH, BTC, TRON).
|
|
145
|
+
* @member {String} chain_id
|
|
146
|
+
*/
|
|
147
|
+
KyaScreeningRequest.prototype['chain_id'] = undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Optional note for this address screening.
|
|
151
|
+
* @member {String} note
|
|
152
|
+
*/
|
|
153
|
+
KyaScreeningRequest.prototype['note'] = undefined;
|
|
154
|
+
var _default = exports["default"] = KyaScreeningRequest;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _KyaScreeningResultRiskAssessment = _interopRequireDefault(require("./KyaScreeningResultRiskAssessment"));
|
|
9
|
+
var _KyaScreeningStatus = _interopRequireDefault(require("./KyaScreeningStatus"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The KyaScreeningResult model module.
|
|
31
|
+
* @module model/KyaScreeningResult
|
|
32
|
+
*/
|
|
33
|
+
var KyaScreeningResult = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>KyaScreeningResult</code>.
|
|
36
|
+
* Complete address screening result including risk assessment.
|
|
37
|
+
* @alias module:model/KyaScreeningResult
|
|
38
|
+
* @param request_id {String} The idempotency identifier from the request, unique within your organization, used for tracking and troubleshooting. Only present in create response.
|
|
39
|
+
* @param screening_id {String} The unique system-generated identifier for this screening request (UUID format, fixed 36 characters).
|
|
40
|
+
* @param address {String} The screened blockchain address.
|
|
41
|
+
* @param chain_id {String} The chain identifier.
|
|
42
|
+
* @param created_timestamp {Number} The time when the screening request was created, in Unix timestamp format, measured in milliseconds.
|
|
43
|
+
* @param requested_by {String} The identifier of the user or application that created this screening request.
|
|
44
|
+
* @param status {module:model/KyaScreeningStatus}
|
|
45
|
+
*/
|
|
46
|
+
function KyaScreeningResult(request_id, screening_id, address, chain_id, created_timestamp, requested_by, status) {
|
|
47
|
+
_classCallCheck(this, KyaScreeningResult);
|
|
48
|
+
KyaScreeningResult.initialize(this, request_id, screening_id, address, chain_id, created_timestamp, requested_by, status);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Initializes the fields of this object.
|
|
53
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
54
|
+
* Only for internal use.
|
|
55
|
+
*/
|
|
56
|
+
return _createClass(KyaScreeningResult, null, [{
|
|
57
|
+
key: "initialize",
|
|
58
|
+
value: function initialize(obj, request_id, screening_id, address, chain_id, created_timestamp, requested_by, status) {
|
|
59
|
+
obj['request_id'] = request_id;
|
|
60
|
+
obj['screening_id'] = screening_id;
|
|
61
|
+
obj['address'] = address;
|
|
62
|
+
obj['chain_id'] = chain_id;
|
|
63
|
+
obj['created_timestamp'] = created_timestamp;
|
|
64
|
+
obj['requested_by'] = requested_by;
|
|
65
|
+
obj['status'] = status;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Constructs a <code>KyaScreeningResult</code> from a plain JavaScript object, optionally creating a new instance.
|
|
70
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @param {module:model/KyaScreeningResult} obj Optional instance to populate.
|
|
73
|
+
* @return {module:model/KyaScreeningResult} The populated <code>KyaScreeningResult</code> instance.
|
|
74
|
+
*/
|
|
75
|
+
}, {
|
|
76
|
+
key: "constructFromObject",
|
|
77
|
+
value: function constructFromObject(data, obj) {
|
|
78
|
+
if (data) {
|
|
79
|
+
obj = obj || new KyaScreeningResult();
|
|
80
|
+
if (data.hasOwnProperty('request_id')) {
|
|
81
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('screening_id')) {
|
|
84
|
+
obj['screening_id'] = _ApiClient["default"].convertToType(data['screening_id'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('address')) {
|
|
87
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
90
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('note')) {
|
|
93
|
+
obj['note'] = _ApiClient["default"].convertToType(data['note'], 'String');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
96
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('requested_by')) {
|
|
99
|
+
obj['requested_by'] = _ApiClient["default"].convertToType(data['requested_by'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('status')) {
|
|
102
|
+
obj['status'] = _KyaScreeningStatus["default"].constructFromObject(data['status']);
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('risk_assessment')) {
|
|
105
|
+
obj['risk_assessment'] = _KyaScreeningResultRiskAssessment["default"].constructFromObject(data['risk_assessment']);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return obj;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Validates the JSON data with respect to <code>KyaScreeningResult</code>.
|
|
113
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
114
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>KyaScreeningResult</code>.
|
|
115
|
+
*/
|
|
116
|
+
}, {
|
|
117
|
+
key: "validateJSON",
|
|
118
|
+
value: function validateJSON(data) {
|
|
119
|
+
// check to make sure all required properties are present in the JSON string
|
|
120
|
+
var _iterator = _createForOfIteratorHelper(KyaScreeningResult.RequiredProperties),
|
|
121
|
+
_step;
|
|
122
|
+
try {
|
|
123
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
124
|
+
var property = _step.value;
|
|
125
|
+
if (!data.hasOwnProperty(property)) {
|
|
126
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
} catch (err) {
|
|
131
|
+
_iterator.e(err);
|
|
132
|
+
} finally {
|
|
133
|
+
_iterator.f();
|
|
134
|
+
}
|
|
135
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
136
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
137
|
+
}
|
|
138
|
+
// ensure the json data is a string
|
|
139
|
+
if (data['screening_id'] && !(typeof data['screening_id'] === 'string' || data['screening_id'] instanceof String)) {
|
|
140
|
+
throw new Error("Expected the field `screening_id` to be a primitive type in the JSON string but got " + data['screening_id']);
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is a string
|
|
143
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
144
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
145
|
+
}
|
|
146
|
+
// ensure the json data is a string
|
|
147
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
148
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
149
|
+
}
|
|
150
|
+
// ensure the json data is a string
|
|
151
|
+
if (data['note'] && !(typeof data['note'] === 'string' || data['note'] instanceof String)) {
|
|
152
|
+
throw new Error("Expected the field `note` to be a primitive type in the JSON string but got " + data['note']);
|
|
153
|
+
}
|
|
154
|
+
// ensure the json data is a string
|
|
155
|
+
if (data['requested_by'] && !(typeof data['requested_by'] === 'string' || data['requested_by'] instanceof String)) {
|
|
156
|
+
throw new Error("Expected the field `requested_by` to be a primitive type in the JSON string but got " + data['requested_by']);
|
|
157
|
+
}
|
|
158
|
+
// validate the optional field `risk_assessment`
|
|
159
|
+
if (data['risk_assessment']) {
|
|
160
|
+
// data not null
|
|
161
|
+
if (!!_KyaScreeningResultRiskAssessment["default"].validateJSON) {
|
|
162
|
+
_KyaScreeningResultRiskAssessment["default"].validateJSON(data['risk_assessment']);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
}]);
|
|
168
|
+
}();
|
|
169
|
+
KyaScreeningResult.RequiredProperties = ["request_id", "screening_id", "address", "chain_id", "created_timestamp", "requested_by", "status"];
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The idempotency identifier from the request, unique within your organization, used for tracking and troubleshooting. Only present in create response.
|
|
173
|
+
* @member {String} request_id
|
|
174
|
+
*/
|
|
175
|
+
KyaScreeningResult.prototype['request_id'] = undefined;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The unique system-generated identifier for this screening request (UUID format, fixed 36 characters).
|
|
179
|
+
* @member {String} screening_id
|
|
180
|
+
*/
|
|
181
|
+
KyaScreeningResult.prototype['screening_id'] = undefined;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The screened blockchain address.
|
|
185
|
+
* @member {String} address
|
|
186
|
+
*/
|
|
187
|
+
KyaScreeningResult.prototype['address'] = undefined;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The chain identifier.
|
|
191
|
+
* @member {String} chain_id
|
|
192
|
+
*/
|
|
193
|
+
KyaScreeningResult.prototype['chain_id'] = undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Optional note for this address screening.
|
|
197
|
+
* @member {String} note
|
|
198
|
+
*/
|
|
199
|
+
KyaScreeningResult.prototype['note'] = undefined;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The time when the screening request was created, in Unix timestamp format, measured in milliseconds.
|
|
203
|
+
* @member {Number} created_timestamp
|
|
204
|
+
*/
|
|
205
|
+
KyaScreeningResult.prototype['created_timestamp'] = undefined;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The identifier of the user or application that created this screening request.
|
|
209
|
+
* @member {String} requested_by
|
|
210
|
+
*/
|
|
211
|
+
KyaScreeningResult.prototype['requested_by'] = undefined;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @member {module:model/KyaScreeningStatus} status
|
|
215
|
+
*/
|
|
216
|
+
KyaScreeningResult.prototype['status'] = undefined;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @member {module:model/KyaScreeningResultRiskAssessment} risk_assessment
|
|
220
|
+
*/
|
|
221
|
+
KyaScreeningResult.prototype['risk_assessment'] = undefined;
|
|
222
|
+
var _default = exports["default"] = KyaScreeningResult;
|