@cobo/cobo-waas2 1.22.0 → 1.23.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 +39 -14
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +200 -21
- package/dist/api/AutoSweepApi.js +26 -26
- package/dist/api/ComplianceApi.js +214 -0
- package/dist/api/PaymentApi.js +16 -16
- package/dist/api/TokenizationApi.js +2 -2
- package/dist/api/TransactionsApi.js +16 -16
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +2 -2
- package/dist/index.js +105 -7
- package/dist/model/AddressBook.js +12 -12
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/ApprovalDetail.js +4 -4
- package/dist/model/ApprovalResult.js +6 -11
- package/dist/model/ApprovalTemplate.js +4 -4
- package/dist/model/ApprovalTransactionResult.js +8 -8
- package/dist/model/ApprovalUserDetail.js +95 -24
- package/dist/model/AutoSweepTask.js +9 -9
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/ChainInfo.js +14 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
- package/dist/model/CreateAddressBookParam.js +165 -0
- package/dist/model/CreateAddressBooks201Response.js +107 -0
- package/dist/model/CreateAddressBooksParam.js +128 -0
- package/dist/model/CreateAutoSweepTask.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +3 -3
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateSweepToAddress.js +1 -1
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/DeleteAddressBookById201Response.js +106 -0
- package/dist/model/DispositionEventData.js +170 -0
- package/dist/model/DispositionQueryResponse.js +146 -0
- package/dist/model/DispositionResponse.js +122 -0
- package/dist/model/DispositionStatus.js +116 -0
- package/dist/model/DispositionType.js +66 -0
- package/dist/model/IsolateDisposition.js +167 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +1 -1
- package/dist/model/MerchantBalance.js +7 -7
- package/dist/model/OrgInfo.js +9 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentOrderEventData.js +8 -3
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PaymentWalletBalance.js +6 -6
- package/dist/model/PspBalance.js +7 -7
- package/dist/model/ReceivedAmountPerAddress.js +5 -5
- package/dist/model/RefundDisposition.js +167 -0
- package/dist/model/RoleDetail.js +41 -6
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SweepToAddress.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UnfreezeDisposition.js +111 -0
- package/dist/model/UpdateAddressBookParam.js +150 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +62 -10
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressBook.md +7 -7
- package/docs/AddressBooksApi.md +218 -8
- package/docs/AddressesEventData.md +3 -1
- package/docs/ApprovalDetail.md +3 -3
- package/docs/ApprovalResult.md +3 -5
- package/docs/ApprovalTemplate.md +3 -3
- package/docs/ApprovalTransactionResult.md +4 -4
- package/docs/ApprovalUserDetail.md +15 -9
- package/docs/AutoSweepApi.md +18 -18
- package/docs/AutoSweepTask.md +5 -5
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/ChainInfo.md +2 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceApi.md +218 -0
- package/docs/ComplianceDispositionUpdateEventData.md +56 -0
- package/docs/CreateAddressBookParam.md +13 -0
- package/docs/CreateAddressBooks201Response.md +9 -0
- package/docs/CreateAddressBooksParam.md +9 -0
- package/docs/CreateAutoSweepTask.md +2 -2
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateRefundRequest.md +1 -1
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateWalletParams.md +1 -1
- package/docs/DeleteAddressBookById201Response.md +9 -0
- package/docs/DispositionEventData.md +14 -0
- package/docs/DispositionQueryResponse.md +12 -0
- package/docs/DispositionResponse.md +10 -0
- package/docs/DispositionStatus.md +34 -0
- package/docs/DispositionType.md +14 -0
- package/docs/IsolateDisposition.md +13 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +1 -1
- package/docs/MerchantBalance.md +6 -6
- package/docs/OrgInfo.md +1 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +10 -10
- package/docs/PaymentOrderEventData.md +3 -1
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PaymentWalletBalance.md +5 -5
- package/docs/PspBalance.md +6 -6
- package/docs/ReceivedAmountPerAddress.md +2 -2
- package/docs/RefundDisposition.md +13 -0
- package/docs/RoleDetail.md +4 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokenizationApi.md +2 -2
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +10 -10
- package/docs/UnfreezeDisposition.md +9 -0
- package/docs/UpdateAddressBookParam.md +12 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +8 -2
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/dist/model/ApprovalShowInfo.js +0 -140
- package/docs/ApprovalShowInfo.md +0 -13
|
@@ -0,0 +1,321 @@
|
|
|
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 _DispositionEventData = _interopRequireDefault(require("./DispositionEventData"));
|
|
9
|
+
var _DispositionStatus = _interopRequireDefault(require("./DispositionStatus"));
|
|
10
|
+
var _DispositionType = _interopRequireDefault(require("./DispositionType"));
|
|
11
|
+
var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; } } }; }
|
|
15
|
+
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; } }
|
|
16
|
+
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; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
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); } /**
|
|
22
|
+
* Cobo Wallet as a Service 2.0
|
|
23
|
+
*
|
|
24
|
+
* Contact: help@cobo.com
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The ComplianceDispositionUpdateEventData model module.
|
|
33
|
+
* @module model/ComplianceDispositionUpdateEventData
|
|
34
|
+
*/
|
|
35
|
+
var ComplianceDispositionUpdateEventData = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>ComplianceDispositionUpdateEventData</code>.
|
|
38
|
+
* @alias module:model/ComplianceDispositionUpdateEventData
|
|
39
|
+
* @implements module:model/WebhookEventDataType
|
|
40
|
+
* @implements module:model/DispositionEventData
|
|
41
|
+
* @param data_type {module:model/ComplianceDispositionUpdateEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
42
|
+
* @param transaction_id {String} The transaction ID.
|
|
43
|
+
* @param disposition_type {module:model/DispositionType}
|
|
44
|
+
* @param disposition_status {module:model/DispositionStatus}
|
|
45
|
+
* @param updated_timestamp {Number} The time when the disposition was updated, in Unix timestamp format, measured in milliseconds.
|
|
46
|
+
*/
|
|
47
|
+
function ComplianceDispositionUpdateEventData(data_type, transaction_id, disposition_type, disposition_status, updated_timestamp) {
|
|
48
|
+
_classCallCheck(this, ComplianceDispositionUpdateEventData);
|
|
49
|
+
_WebhookEventDataType["default"].initialize(this, data_type);
|
|
50
|
+
_DispositionEventData["default"].initialize(this, transaction_id, disposition_type, disposition_status, updated_timestamp);
|
|
51
|
+
ComplianceDispositionUpdateEventData.initialize(this, data_type, transaction_id, disposition_type, disposition_status, updated_timestamp);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Initializes the fields of this object.
|
|
56
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
57
|
+
* Only for internal use.
|
|
58
|
+
*/
|
|
59
|
+
return _createClass(ComplianceDispositionUpdateEventData, null, [{
|
|
60
|
+
key: "initialize",
|
|
61
|
+
value: function initialize(obj, data_type, transaction_id, disposition_type, disposition_status, updated_timestamp) {
|
|
62
|
+
obj['data_type'] = data_type;
|
|
63
|
+
obj['transaction_id'] = transaction_id;
|
|
64
|
+
obj['disposition_type'] = disposition_type;
|
|
65
|
+
obj['disposition_status'] = disposition_status;
|
|
66
|
+
obj['updated_timestamp'] = updated_timestamp;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Constructs a <code>ComplianceDispositionUpdateEventData</code> from a plain JavaScript object, optionally creating a new instance.
|
|
71
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
72
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
73
|
+
* @param {module:model/ComplianceDispositionUpdateEventData} obj Optional instance to populate.
|
|
74
|
+
* @return {module:model/ComplianceDispositionUpdateEventData} The populated <code>ComplianceDispositionUpdateEventData</code> instance.
|
|
75
|
+
*/
|
|
76
|
+
}, {
|
|
77
|
+
key: "constructFromObject",
|
|
78
|
+
value: function constructFromObject(data, obj) {
|
|
79
|
+
if (data) {
|
|
80
|
+
obj = obj || new ComplianceDispositionUpdateEventData();
|
|
81
|
+
_WebhookEventDataType["default"].constructFromObject(data, obj);
|
|
82
|
+
_DispositionEventData["default"].constructFromObject(data, obj);
|
|
83
|
+
if (data.hasOwnProperty('data_type')) {
|
|
84
|
+
obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
87
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('disposition_type')) {
|
|
90
|
+
obj['disposition_type'] = _DispositionType["default"].constructFromObject(data['disposition_type']);
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('disposition_status')) {
|
|
93
|
+
obj['disposition_status'] = _DispositionStatus["default"].constructFromObject(data['disposition_status']);
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('destination_address')) {
|
|
96
|
+
obj['destination_address'] = _ApiClient["default"].convertToType(data['destination_address'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('disposition_amount')) {
|
|
99
|
+
obj['disposition_amount'] = _ApiClient["default"].convertToType(data['disposition_amount'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
102
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return obj;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Validates the JSON data with respect to <code>ComplianceDispositionUpdateEventData</code>.
|
|
110
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
111
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ComplianceDispositionUpdateEventData</code>.
|
|
112
|
+
*/
|
|
113
|
+
}, {
|
|
114
|
+
key: "validateJSON",
|
|
115
|
+
value: function validateJSON(data) {
|
|
116
|
+
// check to make sure all required properties are present in the JSON string
|
|
117
|
+
var _iterator = _createForOfIteratorHelper(ComplianceDispositionUpdateEventData.RequiredProperties),
|
|
118
|
+
_step;
|
|
119
|
+
try {
|
|
120
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
121
|
+
var property = _step.value;
|
|
122
|
+
if (!data.hasOwnProperty(property)) {
|
|
123
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// ensure the json data is a string
|
|
127
|
+
} catch (err) {
|
|
128
|
+
_iterator.e(err);
|
|
129
|
+
} finally {
|
|
130
|
+
_iterator.f();
|
|
131
|
+
}
|
|
132
|
+
if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
|
|
134
|
+
}
|
|
135
|
+
// ensure the json data is a string
|
|
136
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
137
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
138
|
+
}
|
|
139
|
+
// ensure the json data is a string
|
|
140
|
+
if (data['destination_address'] && !(typeof data['destination_address'] === 'string' || data['destination_address'] instanceof String)) {
|
|
141
|
+
throw new Error("Expected the field `destination_address` to be a primitive type in the JSON string but got " + data['destination_address']);
|
|
142
|
+
}
|
|
143
|
+
// ensure the json data is a string
|
|
144
|
+
if (data['disposition_amount'] && !(typeof data['disposition_amount'] === 'string' || data['disposition_amount'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `disposition_amount` to be a primitive type in the JSON string but got " + data['disposition_amount']);
|
|
146
|
+
}
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
}]);
|
|
150
|
+
}();
|
|
151
|
+
ComplianceDispositionUpdateEventData.RequiredProperties = ["data_type", "transaction_id", "disposition_type", "disposition_status", "updated_timestamp"];
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
155
|
+
* @member {module:model/ComplianceDispositionUpdateEventData.DataTypeEnum} data_type
|
|
156
|
+
*/
|
|
157
|
+
ComplianceDispositionUpdateEventData.prototype['data_type'] = undefined;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The transaction ID.
|
|
161
|
+
* @member {String} transaction_id
|
|
162
|
+
*/
|
|
163
|
+
ComplianceDispositionUpdateEventData.prototype['transaction_id'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @member {module:model/DispositionType} disposition_type
|
|
167
|
+
*/
|
|
168
|
+
ComplianceDispositionUpdateEventData.prototype['disposition_type'] = undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @member {module:model/DispositionStatus} disposition_status
|
|
172
|
+
*/
|
|
173
|
+
ComplianceDispositionUpdateEventData.prototype['disposition_status'] = undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The blockchain address to receive the refunded/isolated funds.
|
|
177
|
+
* @member {String} destination_address
|
|
178
|
+
*/
|
|
179
|
+
ComplianceDispositionUpdateEventData.prototype['destination_address'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The amount to be refunded/isolated from the original transaction, specified as a numeric string. This value cannot exceed the total amount of the original transaction.
|
|
183
|
+
* @member {String} disposition_amount
|
|
184
|
+
*/
|
|
185
|
+
ComplianceDispositionUpdateEventData.prototype['disposition_amount'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The time when the disposition was updated, in Unix timestamp format, measured in milliseconds.
|
|
189
|
+
* @member {Number} updated_timestamp
|
|
190
|
+
*/
|
|
191
|
+
ComplianceDispositionUpdateEventData.prototype['updated_timestamp'] = undefined;
|
|
192
|
+
|
|
193
|
+
// Implement WebhookEventDataType interface:
|
|
194
|
+
/**
|
|
195
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
196
|
+
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
197
|
+
*/
|
|
198
|
+
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
199
|
+
// Implement DispositionEventData interface:
|
|
200
|
+
/**
|
|
201
|
+
* The transaction ID.
|
|
202
|
+
* @member {String} transaction_id
|
|
203
|
+
*/
|
|
204
|
+
_DispositionEventData["default"].prototype['transaction_id'] = undefined;
|
|
205
|
+
/**
|
|
206
|
+
* @member {module:model/DispositionType} disposition_type
|
|
207
|
+
*/
|
|
208
|
+
_DispositionEventData["default"].prototype['disposition_type'] = undefined;
|
|
209
|
+
/**
|
|
210
|
+
* @member {module:model/DispositionStatus} disposition_status
|
|
211
|
+
*/
|
|
212
|
+
_DispositionEventData["default"].prototype['disposition_status'] = undefined;
|
|
213
|
+
/**
|
|
214
|
+
* The blockchain address to receive the refunded/isolated funds.
|
|
215
|
+
* @member {String} destination_address
|
|
216
|
+
*/
|
|
217
|
+
_DispositionEventData["default"].prototype['destination_address'] = undefined;
|
|
218
|
+
/**
|
|
219
|
+
* The amount to be refunded/isolated from the original transaction, specified as a numeric string. This value cannot exceed the total amount of the original transaction.
|
|
220
|
+
* @member {String} disposition_amount
|
|
221
|
+
*/
|
|
222
|
+
_DispositionEventData["default"].prototype['disposition_amount'] = undefined;
|
|
223
|
+
/**
|
|
224
|
+
* The time when the disposition was updated, in Unix timestamp format, measured in milliseconds.
|
|
225
|
+
* @member {Number} updated_timestamp
|
|
226
|
+
*/
|
|
227
|
+
_DispositionEventData["default"].prototype['updated_timestamp'] = undefined;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Allowed values for the <code>data_type</code> property.
|
|
231
|
+
* @enum {String}
|
|
232
|
+
* @readonly
|
|
233
|
+
*/
|
|
234
|
+
ComplianceDispositionUpdateEventData['DataTypeEnum'] = {
|
|
235
|
+
/**
|
|
236
|
+
* value: "Transaction"
|
|
237
|
+
* @const
|
|
238
|
+
*/
|
|
239
|
+
"Transaction": "Transaction",
|
|
240
|
+
/**
|
|
241
|
+
* value: "TSSRequest"
|
|
242
|
+
* @const
|
|
243
|
+
*/
|
|
244
|
+
"TSSRequest": "TSSRequest",
|
|
245
|
+
/**
|
|
246
|
+
* value: "Addresses"
|
|
247
|
+
* @const
|
|
248
|
+
*/
|
|
249
|
+
"Addresses": "Addresses",
|
|
250
|
+
/**
|
|
251
|
+
* value: "WalletInfo"
|
|
252
|
+
* @const
|
|
253
|
+
*/
|
|
254
|
+
"WalletInfo": "WalletInfo",
|
|
255
|
+
/**
|
|
256
|
+
* value: "MPCVault"
|
|
257
|
+
* @const
|
|
258
|
+
*/
|
|
259
|
+
"MPCVault": "MPCVault",
|
|
260
|
+
/**
|
|
261
|
+
* value: "Chains"
|
|
262
|
+
* @const
|
|
263
|
+
*/
|
|
264
|
+
"Chains": "Chains",
|
|
265
|
+
/**
|
|
266
|
+
* value: "Tokens"
|
|
267
|
+
* @const
|
|
268
|
+
*/
|
|
269
|
+
"Tokens": "Tokens",
|
|
270
|
+
/**
|
|
271
|
+
* value: "TokenListing"
|
|
272
|
+
* @const
|
|
273
|
+
*/
|
|
274
|
+
"TokenListing": "TokenListing",
|
|
275
|
+
/**
|
|
276
|
+
* value: "PaymentOrder"
|
|
277
|
+
* @const
|
|
278
|
+
*/
|
|
279
|
+
"PaymentOrder": "PaymentOrder",
|
|
280
|
+
/**
|
|
281
|
+
* value: "PaymentRefund"
|
|
282
|
+
* @const
|
|
283
|
+
*/
|
|
284
|
+
"PaymentRefund": "PaymentRefund",
|
|
285
|
+
/**
|
|
286
|
+
* value: "PaymentSettlement"
|
|
287
|
+
* @const
|
|
288
|
+
*/
|
|
289
|
+
"PaymentSettlement": "PaymentSettlement",
|
|
290
|
+
/**
|
|
291
|
+
* value: "PaymentTransaction"
|
|
292
|
+
* @const
|
|
293
|
+
*/
|
|
294
|
+
"PaymentTransaction": "PaymentTransaction",
|
|
295
|
+
/**
|
|
296
|
+
* value: "PaymentAddressUpdate"
|
|
297
|
+
* @const
|
|
298
|
+
*/
|
|
299
|
+
"PaymentAddressUpdate": "PaymentAddressUpdate",
|
|
300
|
+
/**
|
|
301
|
+
* value: "BalanceUpdateInfo"
|
|
302
|
+
* @const
|
|
303
|
+
*/
|
|
304
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
305
|
+
/**
|
|
306
|
+
* value: "SuspendedToken"
|
|
307
|
+
* @const
|
|
308
|
+
*/
|
|
309
|
+
"SuspendedToken": "SuspendedToken",
|
|
310
|
+
/**
|
|
311
|
+
* value: "ComplianceDisposition"
|
|
312
|
+
* @const
|
|
313
|
+
*/
|
|
314
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
315
|
+
/**
|
|
316
|
+
* value: "unknown_default_open_api"
|
|
317
|
+
* @const
|
|
318
|
+
*/
|
|
319
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
320
|
+
};
|
|
321
|
+
var _default = exports["default"] = ComplianceDispositionUpdateEventData;
|
|
@@ -0,0 +1,165 @@
|
|
|
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 CreateAddressBookParam model module.
|
|
29
|
+
* @module model/CreateAddressBookParam
|
|
30
|
+
*/
|
|
31
|
+
var CreateAddressBookParam = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>CreateAddressBookParam</code>.
|
|
34
|
+
* The request body to add an address to your Address Book.
|
|
35
|
+
* @alias module:model/CreateAddressBookParam
|
|
36
|
+
* @param chain_ids {Array.<String>} A list of chain IDs.
|
|
37
|
+
* @param address {String} The wallet address.
|
|
38
|
+
*/
|
|
39
|
+
function CreateAddressBookParam(chain_ids, address) {
|
|
40
|
+
_classCallCheck(this, CreateAddressBookParam);
|
|
41
|
+
CreateAddressBookParam.initialize(this, chain_ids, address);
|
|
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(CreateAddressBookParam, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, chain_ids, address) {
|
|
52
|
+
obj['chain_ids'] = chain_ids;
|
|
53
|
+
obj['address'] = address;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>CreateAddressBookParam</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/CreateAddressBookParam} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/CreateAddressBookParam} The populated <code>CreateAddressBookParam</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new CreateAddressBookParam();
|
|
68
|
+
if (data.hasOwnProperty('chain_ids')) {
|
|
69
|
+
obj['chain_ids'] = _ApiClient["default"].convertToType(data['chain_ids'], ['String']);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('address')) {
|
|
72
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('memo')) {
|
|
75
|
+
obj['memo'] = _ApiClient["default"].convertToType(data['memo'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('label')) {
|
|
78
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('email')) {
|
|
81
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Validates the JSON data with respect to <code>CreateAddressBookParam</code>.
|
|
89
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
90
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateAddressBookParam</code>.
|
|
91
|
+
*/
|
|
92
|
+
}, {
|
|
93
|
+
key: "validateJSON",
|
|
94
|
+
value: function validateJSON(data) {
|
|
95
|
+
// check to make sure all required properties are present in the JSON string
|
|
96
|
+
var _iterator = _createForOfIteratorHelper(CreateAddressBookParam.RequiredProperties),
|
|
97
|
+
_step;
|
|
98
|
+
try {
|
|
99
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
100
|
+
var property = _step.value;
|
|
101
|
+
if (!data.hasOwnProperty(property)) {
|
|
102
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is an array
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_iterator.e(err);
|
|
108
|
+
} finally {
|
|
109
|
+
_iterator.f();
|
|
110
|
+
}
|
|
111
|
+
if (!Array.isArray(data['chain_ids'])) {
|
|
112
|
+
throw new Error("Expected the field `chain_ids` to be an array in the JSON data but got " + data['chain_ids']);
|
|
113
|
+
}
|
|
114
|
+
// ensure the json data is a string
|
|
115
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is a string
|
|
119
|
+
if (data['memo'] && !(typeof data['memo'] === 'string' || data['memo'] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `memo` to be a primitive type in the JSON string but got " + data['memo']);
|
|
121
|
+
}
|
|
122
|
+
// ensure the json data is a string
|
|
123
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
124
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
125
|
+
}
|
|
126
|
+
// ensure the json data is a string
|
|
127
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
128
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
}]);
|
|
133
|
+
}();
|
|
134
|
+
CreateAddressBookParam.RequiredProperties = ["chain_ids", "address"];
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* A list of chain IDs.
|
|
138
|
+
* @member {Array.<String>} chain_ids
|
|
139
|
+
*/
|
|
140
|
+
CreateAddressBookParam.prototype['chain_ids'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The wallet address.
|
|
144
|
+
* @member {String} address
|
|
145
|
+
*/
|
|
146
|
+
CreateAddressBookParam.prototype['address'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Optional memo or tag required by some chains.
|
|
150
|
+
* @member {String} memo
|
|
151
|
+
*/
|
|
152
|
+
CreateAddressBookParam.prototype['memo'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A user-defined label for the address.
|
|
156
|
+
* @member {String} label
|
|
157
|
+
*/
|
|
158
|
+
CreateAddressBookParam.prototype['label'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The email of the address owner.
|
|
162
|
+
* @member {String} email
|
|
163
|
+
*/
|
|
164
|
+
CreateAddressBookParam.prototype['email'] = undefined;
|
|
165
|
+
var _default = exports["default"] = CreateAddressBookParam;
|
|
@@ -0,0 +1,107 @@
|
|
|
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 _AddressBook = _interopRequireDefault(require("./AddressBook"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
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); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The CreateAddressBooks201Response model module.
|
|
30
|
+
* @module model/CreateAddressBooks201Response
|
|
31
|
+
*/
|
|
32
|
+
var CreateAddressBooks201Response = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CreateAddressBooks201Response</code>.
|
|
35
|
+
* @alias module:model/CreateAddressBooks201Response
|
|
36
|
+
*/
|
|
37
|
+
function CreateAddressBooks201Response() {
|
|
38
|
+
_classCallCheck(this, CreateAddressBooks201Response);
|
|
39
|
+
CreateAddressBooks201Response.initialize(this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(CreateAddressBooks201Response, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>CreateAddressBooks201Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/CreateAddressBooks201Response} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/CreateAddressBooks201Response} The populated <code>CreateAddressBooks201Response</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new CreateAddressBooks201Response();
|
|
63
|
+
if (data.hasOwnProperty('data')) {
|
|
64
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AddressBook["default"]]);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return obj;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Validates the JSON data with respect to <code>CreateAddressBooks201Response</code>.
|
|
72
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
73
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateAddressBooks201Response</code>.
|
|
74
|
+
*/
|
|
75
|
+
}, {
|
|
76
|
+
key: "validateJSON",
|
|
77
|
+
value: function validateJSON(data) {
|
|
78
|
+
if (data['data']) {
|
|
79
|
+
// data not null
|
|
80
|
+
// ensure the json data is an array
|
|
81
|
+
if (!Array.isArray(data['data'])) {
|
|
82
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
83
|
+
}
|
|
84
|
+
// validate the optional field `data` (array)
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var item = _step.value;
|
|
90
|
+
_AddressBook["default"].validateJSON(item);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator.f();
|
|
96
|
+
}
|
|
97
|
+
;
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
}();
|
|
103
|
+
/**
|
|
104
|
+
* @member {Array.<module:model/AddressBook>} data
|
|
105
|
+
*/
|
|
106
|
+
CreateAddressBooks201Response.prototype['data'] = undefined;
|
|
107
|
+
var _default = exports["default"] = CreateAddressBooks201Response;
|