@cobo/cobo-waas2 1.3.0 → 1.5.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 +22 -10
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +105 -0
- package/dist/api/DevelopersWebhooksApi.js +43 -0
- package/dist/api/OAuthApi.js +18 -18
- package/dist/api/TransactionsApi.js +14 -14
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsExchangeWalletApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +10 -10
- package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
- package/dist/index.js +108 -31
- package/dist/model/AddressBook.js +217 -0
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/ApiLogDetails.js +238 -0
- package/dist/model/ApiLogSummary.js +161 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
- package/dist/model/CoboSafeDelegate.js +2 -2
- package/dist/model/ContractCallSource.js +0 -6
- package/dist/model/CreateKeyShareHolder.js +2 -2
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +2 -2
- package/dist/model/EstimateTransferFeeParams.js +2 -2
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/ExchangeId.js +10 -0
- package/dist/model/ExtendedTokenInfo.js +17 -4
- package/dist/model/GetToken200Response.js +4 -4
- package/dist/model/KeyShareHolder.js +1 -1
- package/dist/model/ListAddressBooks200Response.js +123 -0
- package/dist/model/MPCDelegate.js +4 -4
- package/dist/model/MessageSignParams.js +1 -1
- package/dist/model/MpcContractCallSource.js +0 -9
- package/dist/model/{RefreshToken200Response.js → RefreshToken201Response.js} +25 -25
- package/dist/model/RefreshTokenRequest.js +2 -2
- package/dist/model/SafeWalletDelegates.js +210 -0
- package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
- package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
- package/dist/model/TSSRequestStatus.js +5 -0
- package/dist/model/TokenAssetModelType.js +61 -0
- package/dist/model/TokenBalanceBalance.js +6 -6
- package/dist/model/TokenInfo.js +11 -2
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionDestination.js +50 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionEvmCalldataInfo.js +177 -0
- package/dist/model/TransactionEvmContractDestination.js +16 -0
- package/dist/model/TransactionEvmContractMethod.js +136 -0
- package/dist/model/TransactionRawMessageSignDestination.js +120 -0
- package/dist/model/TransactionSignatureResult.js +1 -1
- package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
- package/dist/model/TransactionStatus.js +0 -5
- package/dist/model/TransactionSubStatus.js +40 -5
- package/dist/model/TransactionTokeApproval.js +17 -4
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TransferDestination.js +2 -2
- package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
- package/dist/model/{WalletBalanceSnapshot.js → TriggerTestWebhookEventRequest.js} +31 -36
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AddressBook.md +17 -0
- package/docs/AddressBooksApi.md +71 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/ApiLogDetails.md +18 -0
- package/docs/ApiLogSummary.md +13 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/CoboSafeDelegate.md +2 -2
- package/docs/ContractCallSource.md +0 -1
- package/docs/CreateKeyShareHolder.md +2 -2
- package/docs/DevelopersWebhooksApi.md +53 -0
- package/docs/ErrorResponse.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/ExchangeId.md +4 -0
- package/docs/ExtendedTokenInfo.md +3 -2
- package/docs/GetToken200Response.md +4 -4
- package/docs/KeyShareHolder.md +1 -1
- package/docs/ListAddressBooks200Response.md +10 -0
- package/docs/MPCDelegate.md +2 -2
- package/docs/MessageSignParams.md +1 -1
- package/docs/MpcContractCallSource.md +0 -1
- package/docs/OAuthApi.md +11 -11
- package/docs/RefreshToken201Response.md +13 -0
- package/docs/RefreshTokenRequest.md +2 -2
- package/docs/SafeWalletDelegates.md +14 -0
- package/docs/SafeWalletDelegatesContractCall.md +12 -0
- package/docs/SafeWalletDelegatesTransfer.md +12 -0
- package/docs/TSSRequestStatus.md +2 -0
- package/docs/TokenAssetModelType.md +12 -0
- package/docs/TokenBalanceBalance.md +4 -4
- package/docs/TokenInfo.md +3 -2
- package/docs/Transaction.md +1 -1
- package/docs/TransactionDestination.md +4 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionEvmCalldataInfo.md +16 -0
- package/docs/TransactionEvmContractDestination.md +1 -0
- package/docs/TransactionEvmContractMethod.md +13 -0
- package/docs/TransactionRawMessageSignDestination.md +10 -0
- package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
- package/docs/TransactionSource.md +1 -1
- package/docs/TransactionStatus.md +0 -2
- package/docs/TransactionSubStatus.md +16 -2
- package/docs/TransactionTokeApproval.md +3 -2
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +8 -8
- package/docs/TransferDestination.md +2 -2
- package/docs/TriggerTestWebhookEvent201Response.md +9 -0
- package/docs/TriggerTestWebhookEventRequest.md +10 -0
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +5 -5
- package/docs/WalletsSmartContractWalletsApi.md +63 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +2 -2
- package/dist/model/BookkeepingRecord.js +0 -243
- package/docs/BookkeepingRecord.md +0 -19
- package/docs/BookkeepingSummary.md +0 -12
- package/docs/RefreshToken200Response.md +0 -13
- package/docs/WalletBalanceSnapshot.md +0 -10
- package/docs/WalletBalanceSnapshotRecord.md +0 -13
|
@@ -0,0 +1,217 @@
|
|
|
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 _WalletType = _interopRequireDefault(require("./WalletType"));
|
|
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 AddressBook model module.
|
|
30
|
+
* @module model/AddressBook
|
|
31
|
+
*/
|
|
32
|
+
var AddressBook = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>AddressBook</code>.
|
|
35
|
+
* The information of an address book entry.
|
|
36
|
+
* @alias module:model/AddressBook
|
|
37
|
+
* @param org_id {String} The organization ID.
|
|
38
|
+
* @param entry_id {String} The entry ID.
|
|
39
|
+
* @param address {String} The wallet address.
|
|
40
|
+
* @param label {String} The address label.
|
|
41
|
+
*/
|
|
42
|
+
function AddressBook(org_id, entry_id, address, label) {
|
|
43
|
+
_classCallCheck(this, AddressBook);
|
|
44
|
+
AddressBook.initialize(this, org_id, entry_id, address, label);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(AddressBook, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, org_id, entry_id, address, label) {
|
|
55
|
+
obj['org_id'] = org_id;
|
|
56
|
+
obj['entry_id'] = entry_id;
|
|
57
|
+
obj['address'] = address;
|
|
58
|
+
obj['label'] = label;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>AddressBook</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/AddressBook} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/AddressBook} The populated <code>AddressBook</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new AddressBook();
|
|
73
|
+
if (data.hasOwnProperty('org_id')) {
|
|
74
|
+
obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('entry_id')) {
|
|
77
|
+
obj['entry_id'] = _ApiClient["default"].convertToType(data['entry_id'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('address')) {
|
|
80
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('memo')) {
|
|
83
|
+
obj['memo'] = _ApiClient["default"].convertToType(data['memo'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('wallet_name')) {
|
|
86
|
+
obj['wallet_name'] = _ApiClient["default"].convertToType(data['wallet_name'], 'String');
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('wallet_type')) {
|
|
89
|
+
obj['wallet_type'] = _WalletType["default"].constructFromObject(data['wallet_type']);
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('label')) {
|
|
92
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('chain_ids')) {
|
|
95
|
+
obj['chain_ids'] = _ApiClient["default"].convertToType(data['chain_ids'], ['String']);
|
|
96
|
+
}
|
|
97
|
+
if (data.hasOwnProperty('email')) {
|
|
98
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return obj;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Validates the JSON data with respect to <code>AddressBook</code>.
|
|
106
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
107
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AddressBook</code>.
|
|
108
|
+
*/
|
|
109
|
+
}, {
|
|
110
|
+
key: "validateJSON",
|
|
111
|
+
value: function validateJSON(data) {
|
|
112
|
+
// check to make sure all required properties are present in the JSON string
|
|
113
|
+
var _iterator = _createForOfIteratorHelper(AddressBook.RequiredProperties),
|
|
114
|
+
_step;
|
|
115
|
+
try {
|
|
116
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
117
|
+
var property = _step.value;
|
|
118
|
+
if (!data.hasOwnProperty(property)) {
|
|
119
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// ensure the json data is a string
|
|
123
|
+
} catch (err) {
|
|
124
|
+
_iterator.e(err);
|
|
125
|
+
} finally {
|
|
126
|
+
_iterator.f();
|
|
127
|
+
}
|
|
128
|
+
if (data['org_id'] && !(typeof data['org_id'] === 'string' || data['org_id'] instanceof String)) {
|
|
129
|
+
throw new Error("Expected the field `org_id` to be a primitive type in the JSON string but got " + data['org_id']);
|
|
130
|
+
}
|
|
131
|
+
// ensure the json data is a string
|
|
132
|
+
if (data['entry_id'] && !(typeof data['entry_id'] === 'string' || data['entry_id'] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `entry_id` to be a primitive type in the JSON string but got " + data['entry_id']);
|
|
134
|
+
}
|
|
135
|
+
// ensure the json data is a string
|
|
136
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
137
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
138
|
+
}
|
|
139
|
+
// ensure the json data is a string
|
|
140
|
+
if (data['memo'] && !(typeof data['memo'] === 'string' || data['memo'] instanceof String)) {
|
|
141
|
+
throw new Error("Expected the field `memo` to be a primitive type in the JSON string but got " + data['memo']);
|
|
142
|
+
}
|
|
143
|
+
// ensure the json data is a string
|
|
144
|
+
if (data['wallet_name'] && !(typeof data['wallet_name'] === 'string' || data['wallet_name'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `wallet_name` to be a primitive type in the JSON string but got " + data['wallet_name']);
|
|
146
|
+
}
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
150
|
+
}
|
|
151
|
+
// ensure the json data is an array
|
|
152
|
+
if (!Array.isArray(data['chain_ids'])) {
|
|
153
|
+
throw new Error("Expected the field `chain_ids` to be an array in the JSON data but got " + data['chain_ids']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
158
|
+
}
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
}]);
|
|
162
|
+
}();
|
|
163
|
+
AddressBook.RequiredProperties = ["org_id", "entry_id", "address", "label"];
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The organization ID.
|
|
167
|
+
* @member {String} org_id
|
|
168
|
+
*/
|
|
169
|
+
AddressBook.prototype['org_id'] = undefined;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The entry ID.
|
|
173
|
+
* @member {String} entry_id
|
|
174
|
+
*/
|
|
175
|
+
AddressBook.prototype['entry_id'] = undefined;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The wallet address.
|
|
179
|
+
* @member {String} address
|
|
180
|
+
*/
|
|
181
|
+
AddressBook.prototype['address'] = undefined;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The memo.
|
|
185
|
+
* @member {String} memo
|
|
186
|
+
*/
|
|
187
|
+
AddressBook.prototype['memo'] = undefined;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The wallet name.
|
|
191
|
+
* @member {String} wallet_name
|
|
192
|
+
*/
|
|
193
|
+
AddressBook.prototype['wallet_name'] = undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @member {module:model/WalletType} wallet_type
|
|
197
|
+
*/
|
|
198
|
+
AddressBook.prototype['wallet_type'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The address label.
|
|
202
|
+
* @member {String} label
|
|
203
|
+
*/
|
|
204
|
+
AddressBook.prototype['label'] = undefined;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* A list of chain IDs.
|
|
208
|
+
* @member {Array.<String>} chain_ids
|
|
209
|
+
*/
|
|
210
|
+
AddressBook.prototype['chain_ids'] = undefined;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The email of the address owner.
|
|
214
|
+
* @member {String} email
|
|
215
|
+
*/
|
|
216
|
+
AddressBook.prototype['email'] = undefined;
|
|
217
|
+
var _default = exports["default"] = AddressBook;
|
|
@@ -171,13 +171,13 @@ AddressTransferDestination.prototype['utxo_outputs'] = undefined;
|
|
|
171
171
|
AddressTransferDestination.prototype['change_address'] = undefined;
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
|
-
* Whether the transaction request must be executed as a
|
|
174
|
+
* Whether the transaction request must be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must be executed as a Cobo Loop transfer. - `false`: The transaction request may not be executed as a Cobo Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`.
|
|
175
175
|
* @member {Boolean} force_internal
|
|
176
176
|
*/
|
|
177
177
|
AddressTransferDestination.prototype['force_internal'] = undefined;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
* Whether the transaction request must not be executed as a
|
|
180
|
+
* Whether the transaction request must not be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must not be executed as a Cobo Loop transfer. - `false`: The transaction request can be executed as a Cobo Loop transfer. Please do not set both `force_internal` and `force_internal` as `true`.
|
|
181
181
|
* @member {Boolean} force_external
|
|
182
182
|
*/
|
|
183
183
|
AddressTransferDestination.prototype['force_external'] = undefined;
|
|
@@ -0,0 +1,238 @@
|
|
|
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 ApiLogDetails model module.
|
|
29
|
+
* @module model/ApiLogDetails
|
|
30
|
+
*/
|
|
31
|
+
var ApiLogDetails = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>ApiLogDetails</code>.
|
|
34
|
+
* The information about an API log.
|
|
35
|
+
* @alias module:model/ApiLogDetails
|
|
36
|
+
* @param log_id {String} A unique identifier for the API log, used for tracking.
|
|
37
|
+
* @param api_method {String} The HTTP method used for the API request.
|
|
38
|
+
* @param api_endpoint {String} The endpoint of the API request.
|
|
39
|
+
* @param status_code {Number} The HTTP status code returned by the API request.
|
|
40
|
+
* @param ip_address {String} The client's IP address that made the API request.
|
|
41
|
+
* @param request_timestamp {Number} The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
42
|
+
* @param api_key {String} The API key used to call the API. For more details, refer to [API key](/v2/guides/overview/cobo-auth#api-key).
|
|
43
|
+
* @param response_body {String} The response body of the API request.
|
|
44
|
+
* @param query_params {String} The query parameters of the API request.
|
|
45
|
+
* @param request_body {String} The request body of the API request.
|
|
46
|
+
*/
|
|
47
|
+
function ApiLogDetails(log_id, api_method, api_endpoint, status_code, ip_address, request_timestamp, api_key, response_body, query_params, request_body) {
|
|
48
|
+
_classCallCheck(this, ApiLogDetails);
|
|
49
|
+
ApiLogDetails.initialize(this, log_id, api_method, api_endpoint, status_code, ip_address, request_timestamp, api_key, response_body, query_params, request_body);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initializes the fields of this object.
|
|
54
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
55
|
+
* Only for internal use.
|
|
56
|
+
*/
|
|
57
|
+
return _createClass(ApiLogDetails, null, [{
|
|
58
|
+
key: "initialize",
|
|
59
|
+
value: function initialize(obj, log_id, api_method, api_endpoint, status_code, ip_address, request_timestamp, api_key, response_body, query_params, request_body) {
|
|
60
|
+
obj['log_id'] = log_id;
|
|
61
|
+
obj['api_method'] = api_method;
|
|
62
|
+
obj['api_endpoint'] = api_endpoint;
|
|
63
|
+
obj['status_code'] = status_code;
|
|
64
|
+
obj['ip_address'] = ip_address;
|
|
65
|
+
obj['request_timestamp'] = request_timestamp;
|
|
66
|
+
obj['api_key'] = api_key;
|
|
67
|
+
obj['response_body'] = response_body;
|
|
68
|
+
obj['query_params'] = query_params;
|
|
69
|
+
obj['request_body'] = request_body;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Constructs a <code>ApiLogDetails</code> from a plain JavaScript object, optionally creating a new instance.
|
|
74
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
75
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
76
|
+
* @param {module:model/ApiLogDetails} obj Optional instance to populate.
|
|
77
|
+
* @return {module:model/ApiLogDetails} The populated <code>ApiLogDetails</code> instance.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "constructFromObject",
|
|
81
|
+
value: function constructFromObject(data, obj) {
|
|
82
|
+
if (data) {
|
|
83
|
+
obj = obj || new ApiLogDetails();
|
|
84
|
+
if (data.hasOwnProperty('log_id')) {
|
|
85
|
+
obj['log_id'] = _ApiClient["default"].convertToType(data['log_id'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('api_method')) {
|
|
88
|
+
obj['api_method'] = _ApiClient["default"].convertToType(data['api_method'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('api_endpoint')) {
|
|
91
|
+
obj['api_endpoint'] = _ApiClient["default"].convertToType(data['api_endpoint'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('status_code')) {
|
|
94
|
+
obj['status_code'] = _ApiClient["default"].convertToType(data['status_code'], 'Number');
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('ip_address')) {
|
|
97
|
+
obj['ip_address'] = _ApiClient["default"].convertToType(data['ip_address'], 'String');
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('request_timestamp')) {
|
|
100
|
+
obj['request_timestamp'] = _ApiClient["default"].convertToType(data['request_timestamp'], 'Number');
|
|
101
|
+
}
|
|
102
|
+
if (data.hasOwnProperty('api_key')) {
|
|
103
|
+
obj['api_key'] = _ApiClient["default"].convertToType(data['api_key'], 'String');
|
|
104
|
+
}
|
|
105
|
+
if (data.hasOwnProperty('response_body')) {
|
|
106
|
+
obj['response_body'] = _ApiClient["default"].convertToType(data['response_body'], 'String');
|
|
107
|
+
}
|
|
108
|
+
if (data.hasOwnProperty('query_params')) {
|
|
109
|
+
obj['query_params'] = _ApiClient["default"].convertToType(data['query_params'], 'String');
|
|
110
|
+
}
|
|
111
|
+
if (data.hasOwnProperty('request_body')) {
|
|
112
|
+
obj['request_body'] = _ApiClient["default"].convertToType(data['request_body'], 'String');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return obj;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Validates the JSON data with respect to <code>ApiLogDetails</code>.
|
|
120
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
121
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ApiLogDetails</code>.
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "validateJSON",
|
|
125
|
+
value: function validateJSON(data) {
|
|
126
|
+
// check to make sure all required properties are present in the JSON string
|
|
127
|
+
var _iterator = _createForOfIteratorHelper(ApiLogDetails.RequiredProperties),
|
|
128
|
+
_step;
|
|
129
|
+
try {
|
|
130
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
131
|
+
var property = _step.value;
|
|
132
|
+
if (!data.hasOwnProperty(property)) {
|
|
133
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
} catch (err) {
|
|
138
|
+
_iterator.e(err);
|
|
139
|
+
} finally {
|
|
140
|
+
_iterator.f();
|
|
141
|
+
}
|
|
142
|
+
if (data['log_id'] && !(typeof data['log_id'] === 'string' || data['log_id'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `log_id` to be a primitive type in the JSON string but got " + data['log_id']);
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['api_method'] && !(typeof data['api_method'] === 'string' || data['api_method'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `api_method` to be a primitive type in the JSON string but got " + data['api_method']);
|
|
148
|
+
}
|
|
149
|
+
// ensure the json data is a string
|
|
150
|
+
if (data['api_endpoint'] && !(typeof data['api_endpoint'] === 'string' || data['api_endpoint'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `api_endpoint` to be a primitive type in the JSON string but got " + data['api_endpoint']);
|
|
152
|
+
}
|
|
153
|
+
// ensure the json data is a string
|
|
154
|
+
if (data['ip_address'] && !(typeof data['ip_address'] === 'string' || data['ip_address'] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `ip_address` to be a primitive type in the JSON string but got " + data['ip_address']);
|
|
156
|
+
}
|
|
157
|
+
// ensure the json data is a string
|
|
158
|
+
if (data['api_key'] && !(typeof data['api_key'] === 'string' || data['api_key'] instanceof String)) {
|
|
159
|
+
throw new Error("Expected the field `api_key` to be a primitive type in the JSON string but got " + data['api_key']);
|
|
160
|
+
}
|
|
161
|
+
// ensure the json data is a string
|
|
162
|
+
if (data['response_body'] && !(typeof data['response_body'] === 'string' || data['response_body'] instanceof String)) {
|
|
163
|
+
throw new Error("Expected the field `response_body` to be a primitive type in the JSON string but got " + data['response_body']);
|
|
164
|
+
}
|
|
165
|
+
// ensure the json data is a string
|
|
166
|
+
if (data['query_params'] && !(typeof data['query_params'] === 'string' || data['query_params'] instanceof String)) {
|
|
167
|
+
throw new Error("Expected the field `query_params` to be a primitive type in the JSON string but got " + data['query_params']);
|
|
168
|
+
}
|
|
169
|
+
// ensure the json data is a string
|
|
170
|
+
if (data['request_body'] && !(typeof data['request_body'] === 'string' || data['request_body'] instanceof String)) {
|
|
171
|
+
throw new Error("Expected the field `request_body` to be a primitive type in the JSON string but got " + data['request_body']);
|
|
172
|
+
}
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
}]);
|
|
176
|
+
}();
|
|
177
|
+
ApiLogDetails.RequiredProperties = ["log_id", "api_method", "api_endpoint", "status_code", "ip_address", "request_timestamp", "api_key", "response_body", "query_params", "request_body"];
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* A unique identifier for the API log, used for tracking.
|
|
181
|
+
* @member {String} log_id
|
|
182
|
+
*/
|
|
183
|
+
ApiLogDetails.prototype['log_id'] = undefined;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The HTTP method used for the API request.
|
|
187
|
+
* @member {String} api_method
|
|
188
|
+
*/
|
|
189
|
+
ApiLogDetails.prototype['api_method'] = undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The endpoint of the API request.
|
|
193
|
+
* @member {String} api_endpoint
|
|
194
|
+
*/
|
|
195
|
+
ApiLogDetails.prototype['api_endpoint'] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The HTTP status code returned by the API request.
|
|
199
|
+
* @member {Number} status_code
|
|
200
|
+
*/
|
|
201
|
+
ApiLogDetails.prototype['status_code'] = undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The client's IP address that made the API request.
|
|
205
|
+
* @member {String} ip_address
|
|
206
|
+
*/
|
|
207
|
+
ApiLogDetails.prototype['ip_address'] = undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
211
|
+
* @member {Number} request_timestamp
|
|
212
|
+
*/
|
|
213
|
+
ApiLogDetails.prototype['request_timestamp'] = undefined;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The API key used to call the API. For more details, refer to [API key](/v2/guides/overview/cobo-auth#api-key).
|
|
217
|
+
* @member {String} api_key
|
|
218
|
+
*/
|
|
219
|
+
ApiLogDetails.prototype['api_key'] = undefined;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* The response body of the API request.
|
|
223
|
+
* @member {String} response_body
|
|
224
|
+
*/
|
|
225
|
+
ApiLogDetails.prototype['response_body'] = undefined;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The query parameters of the API request.
|
|
229
|
+
* @member {String} query_params
|
|
230
|
+
*/
|
|
231
|
+
ApiLogDetails.prototype['query_params'] = undefined;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The request body of the API request.
|
|
235
|
+
* @member {String} request_body
|
|
236
|
+
*/
|
|
237
|
+
ApiLogDetails.prototype['request_body'] = undefined;
|
|
238
|
+
var _default = exports["default"] = ApiLogDetails;
|
|
@@ -0,0 +1,161 @@
|
|
|
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 ApiLogSummary model module.
|
|
29
|
+
* @module model/ApiLogSummary
|
|
30
|
+
*/
|
|
31
|
+
var ApiLogSummary = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>ApiLogSummary</code>.
|
|
34
|
+
* The information about an API log.
|
|
35
|
+
* @alias module:model/ApiLogSummary
|
|
36
|
+
* @param api_method {String} The HTTP method used for the API request.
|
|
37
|
+
* @param api_endpoint {String} The endpoint of the API request.
|
|
38
|
+
* @param request_timestamp {Number} The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
39
|
+
* @param status_code {Number} The HTTP status code returned by the API request.
|
|
40
|
+
*/
|
|
41
|
+
function ApiLogSummary(api_method, api_endpoint, request_timestamp, status_code) {
|
|
42
|
+
_classCallCheck(this, ApiLogSummary);
|
|
43
|
+
ApiLogSummary.initialize(this, api_method, api_endpoint, request_timestamp, status_code);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(ApiLogSummary, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, api_method, api_endpoint, request_timestamp, status_code) {
|
|
54
|
+
obj['api_method'] = api_method;
|
|
55
|
+
obj['api_endpoint'] = api_endpoint;
|
|
56
|
+
obj['request_timestamp'] = request_timestamp;
|
|
57
|
+
obj['status_code'] = status_code;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>ApiLogSummary</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:model/ApiLogSummary} obj Optional instance to populate.
|
|
65
|
+
* @return {module:model/ApiLogSummary} The populated <code>ApiLogSummary</code> instance.
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "constructFromObject",
|
|
69
|
+
value: function constructFromObject(data, obj) {
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new ApiLogSummary();
|
|
72
|
+
if (data.hasOwnProperty('log_id')) {
|
|
73
|
+
obj['log_id'] = _ApiClient["default"].convertToType(data['log_id'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('api_method')) {
|
|
76
|
+
obj['api_method'] = _ApiClient["default"].convertToType(data['api_method'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('api_endpoint')) {
|
|
79
|
+
obj['api_endpoint'] = _ApiClient["default"].convertToType(data['api_endpoint'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('request_timestamp')) {
|
|
82
|
+
obj['request_timestamp'] = _ApiClient["default"].convertToType(data['request_timestamp'], 'Number');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('status_code')) {
|
|
85
|
+
obj['status_code'] = _ApiClient["default"].convertToType(data['status_code'], 'Number');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return obj;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Validates the JSON data with respect to <code>ApiLogSummary</code>.
|
|
93
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
94
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ApiLogSummary</code>.
|
|
95
|
+
*/
|
|
96
|
+
}, {
|
|
97
|
+
key: "validateJSON",
|
|
98
|
+
value: function validateJSON(data) {
|
|
99
|
+
// check to make sure all required properties are present in the JSON string
|
|
100
|
+
var _iterator = _createForOfIteratorHelper(ApiLogSummary.RequiredProperties),
|
|
101
|
+
_step;
|
|
102
|
+
try {
|
|
103
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
104
|
+
var property = _step.value;
|
|
105
|
+
if (!data.hasOwnProperty(property)) {
|
|
106
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// ensure the json data is a string
|
|
110
|
+
} catch (err) {
|
|
111
|
+
_iterator.e(err);
|
|
112
|
+
} finally {
|
|
113
|
+
_iterator.f();
|
|
114
|
+
}
|
|
115
|
+
if (data['log_id'] && !(typeof data['log_id'] === 'string' || data['log_id'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `log_id` to be a primitive type in the JSON string but got " + data['log_id']);
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is a string
|
|
119
|
+
if (data['api_method'] && !(typeof data['api_method'] === 'string' || data['api_method'] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `api_method` to be a primitive type in the JSON string but got " + data['api_method']);
|
|
121
|
+
}
|
|
122
|
+
// ensure the json data is a string
|
|
123
|
+
if (data['api_endpoint'] && !(typeof data['api_endpoint'] === 'string' || data['api_endpoint'] instanceof String)) {
|
|
124
|
+
throw new Error("Expected the field `api_endpoint` to be a primitive type in the JSON string but got " + data['api_endpoint']);
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}]);
|
|
129
|
+
}();
|
|
130
|
+
ApiLogSummary.RequiredProperties = ["api_method", "api_endpoint", "request_timestamp", "status_code"];
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A unique identifier for the API log, used for tracking.
|
|
134
|
+
* @member {String} log_id
|
|
135
|
+
*/
|
|
136
|
+
ApiLogSummary.prototype['log_id'] = undefined;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The HTTP method used for the API request.
|
|
140
|
+
* @member {String} api_method
|
|
141
|
+
*/
|
|
142
|
+
ApiLogSummary.prototype['api_method'] = undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The endpoint of the API request.
|
|
146
|
+
* @member {String} api_endpoint
|
|
147
|
+
*/
|
|
148
|
+
ApiLogSummary.prototype['api_endpoint'] = undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
152
|
+
* @member {Number} request_timestamp
|
|
153
|
+
*/
|
|
154
|
+
ApiLogSummary.prototype['request_timestamp'] = undefined;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The HTTP status code returned by the API request.
|
|
158
|
+
* @member {Number} status_code
|
|
159
|
+
*/
|
|
160
|
+
ApiLogSummary.prototype['status_code'] = undefined;
|
|
161
|
+
var _default = exports["default"] = ApiLogSummary;
|
|
@@ -89,7 +89,7 @@ var CheckLoopTransfers200ResponseInner = /*#__PURE__*/function () {
|
|
|
89
89
|
CheckLoopTransfers200ResponseInner.prototype['address'] = undefined;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* Whether the transaction from the given source to the given destination address can be executed as a Loop transfer. - `true`: The transaction can be executed as a Loop transfer. - `false`: The transaction cannot be executed as a Loop transfer.
|
|
92
|
+
* Whether the transaction from the given source to the given destination address can be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction can be executed as a Cobo Loop transfer. - `false`: The transaction cannot be executed as a Cobo Loop transfer.
|
|
93
93
|
* @member {Boolean} is_loop
|
|
94
94
|
*/
|
|
95
95
|
CheckLoopTransfers200ResponseInner.prototype['is_loop'] = undefined;
|