@cobo/cobo-waas2 1.4.0 → 1.6.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 +32 -10
- package/dist/ApiClient.js +1 -1
- package/dist/ServerDemo.js +80 -0
- package/dist/api/AddressBooksApi.js +105 -0
- package/dist/api/DevelopersApi.js +79 -0
- package/dist/api/DevelopersWebhooksApi.js +43 -0
- package/dist/api/OAuthApi.js +10 -10
- package/dist/api/TransactionsApi.js +12 -12
- package/dist/api/WalletsApi.js +60 -59
- package/dist/api/WalletsExchangeWalletApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
- package/dist/index.js +181 -34
- package/dist/model/AddressBook.js +25 -10
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
- package/dist/model/ApiLogDetails.js +238 -0
- package/dist/model/ApiLogSummary.js +161 -0
- package/dist/model/BabylonStakeEstimatedFee.js +118 -0
- package/dist/model/BabylonValidator.js +5 -0
- package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
- package/dist/model/CoboSafeDelegate.js +2 -2
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +42 -8
- package/dist/model/CreateUnstakeActivity.js +16 -0
- package/dist/model/CreateUnstakeActivityExtra.js +159 -0
- package/dist/model/CreateUnstakeActivityRequest.js +20 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +5 -7
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +5 -9
- package/dist/model/EstimateUnstakeFee.js +20 -0
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EthStakeEstimatedFee.js +112 -0
- package/dist/model/EthStakeExtra.js +131 -0
- package/dist/model/EthStakingExtra.js +131 -0
- package/dist/model/EthUnstakeExtra.js +131 -0
- package/dist/model/ExchangeId.js +10 -0
- package/dist/model/ExtendedTokenInfo.js +17 -4
- package/dist/model/FeeGasLimit.js +1 -2
- package/dist/model/GetApiKeyInfo200Response.js +251 -0
- package/dist/model/GetStakingEstimationFee201Response.js +144 -43
- package/dist/model/GetStakingEstimationFeeRequest.js +2 -2
- package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
- package/dist/model/GetToken4XXResponse.js +12 -10
- package/dist/model/ListAddressBooks200Response.js +123 -0
- package/dist/model/MPCDelegate.js +5 -5
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/{RefreshToken200Response.js → RefreshToken2XXResponse.js} +21 -21
- package/dist/model/{WalletBalanceSnapshot.js → RoleScopes.js} +42 -34
- 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/Scopes.js +142 -0
- package/dist/model/SmartContractWalletInfo.js +1 -1
- package/dist/model/StakingPoolType.js +5 -0
- package/dist/model/StakingsExtra.js +36 -8
- 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/TransactionEvmEip1559Fee.js +2 -4
- package/dist/model/TransactionEvmLegacyFee.js +2 -4
- package/dist/model/TransactionFee.js +1 -2
- package/dist/model/TransactionRawMessageSignDestination.js +120 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -2
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -2
- package/dist/model/TransactionRequestFee.js +1 -2
- package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
- package/dist/model/TransactionSource.js +1 -1
- package/dist/model/TransactionTokeApproval.js +17 -4
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TransferDestination.js +2 -2
- package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
- package/dist/model/TriggerTestWebhookEventRequest.js +115 -0
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AddressBook.md +8 -7
- package/docs/AddressBooksApi.md +71 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
- package/docs/ApiLogDetails.md +18 -0
- package/docs/ApiLogSummary.md +13 -0
- package/docs/BabylonStakeEstimatedFee.md +12 -0
- package/docs/BabylonValidator.md +2 -0
- package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/CoboSafeDelegate.md +2 -2
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateUnstakeActivityExtra.md +10 -0
- package/docs/CreateUnstakeActivityRequest.md +1 -0
- package/docs/DevelopersApi.md +55 -0
- 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 +2 -2
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
- package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EthStakeEstimatedFee.md +11 -0
- package/docs/EthStakeExtra.md +10 -0
- package/docs/EthStakingExtra.md +10 -0
- package/docs/EthUnstakeExtra.md +10 -0
- package/docs/ExchangeId.md +4 -0
- package/docs/ExtendedTokenInfo.md +3 -2
- package/docs/FeeGasLimit.md +1 -1
- package/docs/GetApiKeyInfo200Response.md +30 -0
- package/docs/GetStakingEstimationFee201Response.md +3 -0
- package/docs/GetStakingEstimationFeeRequest.md +1 -1
- package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
- package/docs/GetToken4XXResponse.md +1 -1
- package/docs/ListAddressBooks200Response.md +10 -0
- package/docs/MPCDelegate.md +2 -2
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +5 -5
- package/docs/PoolDetailsAllOfValidatorsInfo.md +2 -0
- package/docs/{RefreshToken200Response.md → RefreshToken2XXResponse.md} +1 -1
- package/docs/RoleScopes.md +10 -0
- package/docs/SafeWalletDelegates.md +14 -0
- package/docs/SafeWalletDelegatesContractCall.md +12 -0
- package/docs/SafeWalletDelegatesTransfer.md +12 -0
- package/docs/Scopes.md +13 -0
- package/docs/StakingPoolType.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/TransactionEvmEip1559Fee.md +1 -1
- package/docs/TransactionEvmLegacyFee.md +1 -1
- package/docs/TransactionFee.md +1 -1
- package/docs/TransactionRawMessageSignDestination.md +10 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
- package/docs/TransactionRequestEvmLegacyFee.md +1 -1
- package/docs/TransactionRequestFee.md +1 -1
- package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
- package/docs/TransactionSource.md +1 -1
- package/docs/TransactionTokeApproval.md +3 -2
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +7 -7
- package/docs/TransferDestination.md +2 -2
- package/docs/TriggerTestWebhookEvent201Response.md +9 -0
- package/docs/TriggerTestWebhookEventRequest.md +10 -0
- package/docs/WalletsApi.md +55 -55
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +4 -4
- package/docs/WalletsSmartContractWalletsApi.md +63 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +3 -2
- package/dist/model/BookkeepingRecord.js +0 -243
- package/docs/BookkeepingRecord.md +0 -19
- package/docs/BookkeepingSummary.md +0 -12
- package/docs/WalletBalanceSnapshot.md +0 -10
- package/docs/WalletBalanceSnapshotRecord.md +0 -13
|
@@ -0,0 +1,251 @@
|
|
|
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 _RoleScopes = _interopRequireDefault(require("./RoleScopes"));
|
|
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 GetApiKeyInfo200Response model module.
|
|
30
|
+
* @module model/GetApiKeyInfo200Response
|
|
31
|
+
*/
|
|
32
|
+
var GetApiKeyInfo200Response = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>GetApiKeyInfo200Response</code>.
|
|
35
|
+
* @alias module:model/GetApiKeyInfo200Response
|
|
36
|
+
* @param name {String} The API key name.
|
|
37
|
+
* @param curve_type {module:model/GetApiKeyInfo200Response.CurveTypeEnum} The curve type used for the API key, which determines the cryptographic algorithm for key generation and signing. Possible values include: - `ED25519`: Ed25519 - `SECP256K1`: Secp256k1
|
|
38
|
+
* @param key {String} The API key value.
|
|
39
|
+
* @param created_timestamp {Number} The time when the API key was registered, in Unix timestamp format, measured in milliseconds.
|
|
40
|
+
* @param updated_timestamp {Number} The time when the API key information was last updated, in Unix timestamp format, measured in milliseconds.
|
|
41
|
+
*/
|
|
42
|
+
function GetApiKeyInfo200Response(name, curve_type, key, created_timestamp, updated_timestamp) {
|
|
43
|
+
_classCallCheck(this, GetApiKeyInfo200Response);
|
|
44
|
+
GetApiKeyInfo200Response.initialize(this, name, curve_type, key, created_timestamp, updated_timestamp);
|
|
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(GetApiKeyInfo200Response, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, name, curve_type, key, created_timestamp, updated_timestamp) {
|
|
55
|
+
obj['name'] = name;
|
|
56
|
+
obj['curve_type'] = curve_type;
|
|
57
|
+
obj['key'] = key;
|
|
58
|
+
obj['created_timestamp'] = created_timestamp;
|
|
59
|
+
obj['updated_timestamp'] = updated_timestamp;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructs a <code>GetApiKeyInfo200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @param {module:model/GetApiKeyInfo200Response} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/GetApiKeyInfo200Response} The populated <code>GetApiKeyInfo200Response</code> instance.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value: function constructFromObject(data, obj) {
|
|
72
|
+
if (data) {
|
|
73
|
+
obj = obj || new GetApiKeyInfo200Response();
|
|
74
|
+
if (data.hasOwnProperty('name')) {
|
|
75
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('curve_type')) {
|
|
78
|
+
obj['curve_type'] = _ApiClient["default"].convertToType(data['curve_type'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('key')) {
|
|
81
|
+
obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('callback_url')) {
|
|
84
|
+
obj['callback_url'] = _ApiClient["default"].convertToType(data['callback_url'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('valid_ips')) {
|
|
87
|
+
obj['valid_ips'] = _ApiClient["default"].convertToType(data['valid_ips'], ['String']);
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
90
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
93
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('expired_timestamp')) {
|
|
96
|
+
obj['expired_timestamp'] = _ApiClient["default"].convertToType(data['expired_timestamp'], 'Number');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('role_scopes')) {
|
|
99
|
+
obj['role_scopes'] = _ApiClient["default"].convertToType(data['role_scopes'], [_RoleScopes["default"]]);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return obj;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Validates the JSON data with respect to <code>GetApiKeyInfo200Response</code>.
|
|
107
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
108
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetApiKeyInfo200Response</code>.
|
|
109
|
+
*/
|
|
110
|
+
}, {
|
|
111
|
+
key: "validateJSON",
|
|
112
|
+
value: function validateJSON(data) {
|
|
113
|
+
// check to make sure all required properties are present in the JSON string
|
|
114
|
+
var _iterator = _createForOfIteratorHelper(GetApiKeyInfo200Response.RequiredProperties),
|
|
115
|
+
_step;
|
|
116
|
+
try {
|
|
117
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
118
|
+
var property = _step.value;
|
|
119
|
+
if (!data.hasOwnProperty(property)) {
|
|
120
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// ensure the json data is a string
|
|
124
|
+
} catch (err) {
|
|
125
|
+
_iterator.e(err);
|
|
126
|
+
} finally {
|
|
127
|
+
_iterator.f();
|
|
128
|
+
}
|
|
129
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data['curve_type'] && !(typeof data['curve_type'] === 'string' || data['curve_type'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `curve_type` to be a primitive type in the JSON string but got " + data['curve_type']);
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
|
|
138
|
+
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
|
|
139
|
+
}
|
|
140
|
+
// ensure the json data is a string
|
|
141
|
+
if (data['callback_url'] && !(typeof data['callback_url'] === 'string' || data['callback_url'] instanceof String)) {
|
|
142
|
+
throw new Error("Expected the field `callback_url` to be a primitive type in the JSON string but got " + data['callback_url']);
|
|
143
|
+
}
|
|
144
|
+
// ensure the json data is an array
|
|
145
|
+
if (!Array.isArray(data['valid_ips'])) {
|
|
146
|
+
throw new Error("Expected the field `valid_ips` to be an array in the JSON data but got " + data['valid_ips']);
|
|
147
|
+
}
|
|
148
|
+
if (data['role_scopes']) {
|
|
149
|
+
// data not null
|
|
150
|
+
// ensure the json data is an array
|
|
151
|
+
if (!Array.isArray(data['role_scopes'])) {
|
|
152
|
+
throw new Error("Expected the field `role_scopes` to be an array in the JSON data but got " + data['role_scopes']);
|
|
153
|
+
}
|
|
154
|
+
// validate the optional field `role_scopes` (array)
|
|
155
|
+
var _iterator2 = _createForOfIteratorHelper(data['role_scopes']),
|
|
156
|
+
_step2;
|
|
157
|
+
try {
|
|
158
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
159
|
+
var item = _step2.value;
|
|
160
|
+
_RoleScopes["default"].validateJSON(item);
|
|
161
|
+
}
|
|
162
|
+
} catch (err) {
|
|
163
|
+
_iterator2.e(err);
|
|
164
|
+
} finally {
|
|
165
|
+
_iterator2.f();
|
|
166
|
+
}
|
|
167
|
+
;
|
|
168
|
+
}
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
}]);
|
|
172
|
+
}();
|
|
173
|
+
GetApiKeyInfo200Response.RequiredProperties = ["name", "curve_type", "key", "created_timestamp", "updated_timestamp"];
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The API key name.
|
|
177
|
+
* @member {String} name
|
|
178
|
+
*/
|
|
179
|
+
GetApiKeyInfo200Response.prototype['name'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The curve type used for the API key, which determines the cryptographic algorithm for key generation and signing. Possible values include: - `ED25519`: Ed25519 - `SECP256K1`: Secp256k1
|
|
183
|
+
* @member {module:model/GetApiKeyInfo200Response.CurveTypeEnum} curve_type
|
|
184
|
+
*/
|
|
185
|
+
GetApiKeyInfo200Response.prototype['curve_type'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The API key value.
|
|
189
|
+
* @member {String} key
|
|
190
|
+
*/
|
|
191
|
+
GetApiKeyInfo200Response.prototype['key'] = undefined;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The URL of the callback endpoint that receives callback messages triggered by this API key.
|
|
195
|
+
* @member {String} callback_url
|
|
196
|
+
*/
|
|
197
|
+
GetApiKeyInfo200Response.prototype['callback_url'] = undefined;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* (Applicable to permanent API keys only) The list of IP addresses that are allowed to use this API key.
|
|
201
|
+
* @member {Array.<String>} valid_ips
|
|
202
|
+
*/
|
|
203
|
+
GetApiKeyInfo200Response.prototype['valid_ips'] = undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The time when the API key was registered, in Unix timestamp format, measured in milliseconds.
|
|
207
|
+
* @member {Number} created_timestamp
|
|
208
|
+
*/
|
|
209
|
+
GetApiKeyInfo200Response.prototype['created_timestamp'] = undefined;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The time when the API key information was last updated, in Unix timestamp format, measured in milliseconds.
|
|
213
|
+
* @member {Number} updated_timestamp
|
|
214
|
+
*/
|
|
215
|
+
GetApiKeyInfo200Response.prototype['updated_timestamp'] = undefined;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* The time when the API key expires, in Unix timestamp format, measured in milliseconds. For permanent API keys, this property value is `null`.
|
|
219
|
+
* @member {Number} expired_timestamp
|
|
220
|
+
*/
|
|
221
|
+
GetApiKeyInfo200Response.prototype['expired_timestamp'] = undefined;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The list of user roles and wallet scopes associated with the API key.
|
|
225
|
+
* @member {Array.<module:model/RoleScopes>} role_scopes
|
|
226
|
+
*/
|
|
227
|
+
GetApiKeyInfo200Response.prototype['role_scopes'] = undefined;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Allowed values for the <code>curve_type</code> property.
|
|
231
|
+
* @enum {String}
|
|
232
|
+
* @readonly
|
|
233
|
+
*/
|
|
234
|
+
GetApiKeyInfo200Response['CurveTypeEnum'] = {
|
|
235
|
+
/**
|
|
236
|
+
* value: "ED25519"
|
|
237
|
+
* @const
|
|
238
|
+
*/
|
|
239
|
+
"ED25519": "ED25519",
|
|
240
|
+
/**
|
|
241
|
+
* value: "SECP256K1"
|
|
242
|
+
* @const
|
|
243
|
+
*/
|
|
244
|
+
"SECP256K1": "SECP256K1",
|
|
245
|
+
/**
|
|
246
|
+
* value: "unknown_default_open_api"
|
|
247
|
+
* @const
|
|
248
|
+
*/
|
|
249
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
250
|
+
};
|
|
251
|
+
var _default = exports["default"] = GetApiKeyInfo200Response;
|
|
@@ -5,12 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _BabylonStakeEstimatedFee = _interopRequireDefault(require("./BabylonStakeEstimatedFee"));
|
|
9
|
+
var _EstimatedFee = _interopRequireDefault(require("./EstimatedFee"));
|
|
10
|
+
var _EthStakeEstimatedFee = _interopRequireDefault(require("./EthStakeEstimatedFee"));
|
|
8
11
|
var _FeeType = _interopRequireDefault(require("./FeeType"));
|
|
12
|
+
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
13
|
+
var _GetStakingEstimationFee201Response;
|
|
9
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
15
|
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
16
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
17
|
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); } }
|
|
13
18
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
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
20
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
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); } /**
|
|
16
22
|
* Cobo Wallet as a Service 2.0
|
|
@@ -30,66 +36,160 @@ var GetStakingEstimationFee201Response = /*#__PURE__*/function () {
|
|
|
30
36
|
/**
|
|
31
37
|
* Constructs a new <code>GetStakingEstimationFee201Response</code>.
|
|
32
38
|
* @alias module:model/GetStakingEstimationFee201Response
|
|
39
|
+
* @param {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} instance The actual instance to initialize GetStakingEstimationFee201Response.
|
|
33
40
|
*/
|
|
34
41
|
function GetStakingEstimationFee201Response() {
|
|
42
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
35
43
|
_classCallCheck(this, GetStakingEstimationFee201Response);
|
|
36
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Returns the JSON representation of the actual instance.
|
|
46
|
+
* @return {string}
|
|
47
|
+
*/
|
|
48
|
+
_defineProperty(this, "toJSON", function () {
|
|
49
|
+
return this.getActualInstance();
|
|
50
|
+
});
|
|
51
|
+
if (instance === null) {
|
|
52
|
+
this.actualInstance = null;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
var match = 0;
|
|
56
|
+
var errorMessages = [];
|
|
57
|
+
var discriminatorValue = instance["pool_type"];
|
|
58
|
+
if (discriminatorValue) {
|
|
59
|
+
switch (discriminatorValue) {
|
|
60
|
+
case "Babylon":
|
|
61
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
62
|
+
match++;
|
|
63
|
+
break;
|
|
64
|
+
case "ETHBeacon":
|
|
65
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
66
|
+
match++;
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
if (instance instanceof _EthStakeEstimatedFee["default"]) {
|
|
76
|
+
this.actualInstance = instance;
|
|
77
|
+
} else if (!!_EthStakeEstimatedFee["default"].validateJSON && _EthStakeEstimatedFee["default"].validateJSON(instance)) {
|
|
78
|
+
// plain JS object
|
|
79
|
+
// create EthStakeEstimatedFee from JS object
|
|
80
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
81
|
+
} else {
|
|
82
|
+
if (_EthStakeEstimatedFee["default"].constructFromObject(instance)) {
|
|
83
|
+
if (!!_EthStakeEstimatedFee["default"].constructFromObject(instance).toJSON) {
|
|
84
|
+
if (_EthStakeEstimatedFee["default"].constructFromObject(instance).toJSON()) {
|
|
85
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
match++;
|
|
93
|
+
} catch (err) {
|
|
94
|
+
// json data failed to deserialize into EthStakeEstimatedFee
|
|
95
|
+
errorMessages.push("Failed to construct EthStakeEstimatedFee: " + err);
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
if (instance instanceof _BabylonStakeEstimatedFee["default"]) {
|
|
99
|
+
this.actualInstance = instance;
|
|
100
|
+
} else if (!!_BabylonStakeEstimatedFee["default"].validateJSON && _BabylonStakeEstimatedFee["default"].validateJSON(instance)) {
|
|
101
|
+
// plain JS object
|
|
102
|
+
// create BabylonStakeEstimatedFee from JS object
|
|
103
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
104
|
+
} else {
|
|
105
|
+
if (_BabylonStakeEstimatedFee["default"].constructFromObject(instance)) {
|
|
106
|
+
if (!!_BabylonStakeEstimatedFee["default"].constructFromObject(instance).toJSON) {
|
|
107
|
+
if (_BabylonStakeEstimatedFee["default"].constructFromObject(instance).toJSON()) {
|
|
108
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
match++;
|
|
116
|
+
} catch (err) {
|
|
117
|
+
// json data failed to deserialize into BabylonStakeEstimatedFee
|
|
118
|
+
errorMessages.push("Failed to construct BabylonStakeEstimatedFee: " + err);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// if (match > 1) {
|
|
122
|
+
// throw new Error("Multiple matches found constructing `GetStakingEstimationFee201Response` with oneOf schemas BabylonStakeEstimatedFee, EthStakeEstimatedFee. Input: " + JSON.stringify(instance));
|
|
123
|
+
// } else
|
|
124
|
+
if (match === 0) {
|
|
125
|
+
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
126
|
+
// throw new Error("No match found constructing `GetStakingEstimationFee201Response` with oneOf schemas BabylonStakeEstimatedFee, EthStakeEstimatedFee. Details: " +
|
|
127
|
+
// errorMessages.join(", "));
|
|
128
|
+
return;
|
|
129
|
+
} else {// only 1 match
|
|
130
|
+
// the input is valid
|
|
131
|
+
}
|
|
37
132
|
}
|
|
38
133
|
|
|
39
134
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
135
|
+
* Constructs a <code>GetStakingEstimationFee201Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
136
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
137
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
138
|
+
* @param {module:model/GetStakingEstimationFee201Response} obj Optional instance to populate.
|
|
139
|
+
* @return {module:model/GetStakingEstimationFee201Response} The populated <code>GetStakingEstimationFee201Response</code> instance.
|
|
43
140
|
*/
|
|
44
|
-
return _createClass(GetStakingEstimationFee201Response,
|
|
45
|
-
key: "
|
|
46
|
-
value:
|
|
47
|
-
|
|
141
|
+
return _createClass(GetStakingEstimationFee201Response, [{
|
|
142
|
+
key: "getActualInstance",
|
|
143
|
+
value:
|
|
48
144
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
-
* @param {module:model/GetStakingEstimationFee201Response} obj Optional instance to populate.
|
|
53
|
-
* @return {module:model/GetStakingEstimationFee201Response} The populated <code>GetStakingEstimationFee201Response</code> instance.
|
|
145
|
+
* Gets the actual instance, which can be <code>BabylonStakeEstimatedFee</code>, <code>EthStakeEstimatedFee</code>.
|
|
146
|
+
* @return {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} The actual instance.
|
|
54
147
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
value: function constructFromObject(data, obj) {
|
|
58
|
-
if (data) {
|
|
59
|
-
obj = obj || new GetStakingEstimationFee201Response();
|
|
60
|
-
if (data.hasOwnProperty('fee_type')) {
|
|
61
|
-
obj['fee_type'] = _FeeType["default"].constructFromObject(data['fee_type']);
|
|
62
|
-
}
|
|
63
|
-
if (data.hasOwnProperty('fee_amount')) {
|
|
64
|
-
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
65
|
-
}
|
|
66
|
-
if (data.hasOwnProperty('token_id')) {
|
|
67
|
-
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return obj;
|
|
148
|
+
function getActualInstance() {
|
|
149
|
+
return this.actualInstance;
|
|
71
150
|
}
|
|
72
151
|
|
|
73
152
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @param {
|
|
76
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetStakingEstimationFee201Response</code>.
|
|
153
|
+
* Sets the actual instance, which can be <code>BabylonStakeEstimatedFee</code>, <code>EthStakeEstimatedFee</code>.
|
|
154
|
+
* @param {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} obj The actual instance.
|
|
77
155
|
*/
|
|
78
156
|
}, {
|
|
79
|
-
key: "
|
|
80
|
-
value: function
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
88
|
-
}
|
|
89
|
-
return true;
|
|
157
|
+
key: "setActualInstance",
|
|
158
|
+
value: function setActualInstance(obj) {
|
|
159
|
+
this.actualInstance = GetStakingEstimationFee201Response.constructFromObject(obj).getActualInstance();
|
|
160
|
+
}
|
|
161
|
+
}], [{
|
|
162
|
+
key: "constructFromObject",
|
|
163
|
+
value: function constructFromObject(data, obj) {
|
|
164
|
+
return new GetStakingEstimationFee201Response(data);
|
|
90
165
|
}
|
|
91
166
|
}]);
|
|
92
167
|
}();
|
|
168
|
+
/**
|
|
169
|
+
* @member {module:model/StakingPoolType} pool_type
|
|
170
|
+
*/
|
|
171
|
+
_GetStakingEstimationFee201Response = GetStakingEstimationFee201Response;
|
|
172
|
+
/**
|
|
173
|
+
* Create an instance of GetStakingEstimationFee201Response from a JSON string.
|
|
174
|
+
* @param {string} json_string JSON string.
|
|
175
|
+
* @return {module:model/GetStakingEstimationFee201Response} An instance of GetStakingEstimationFee201Response.
|
|
176
|
+
*/
|
|
177
|
+
_defineProperty(GetStakingEstimationFee201Response, "fromJSON", function (json_string) {
|
|
178
|
+
return _GetStakingEstimationFee201Response.constructFromObject(JSON.parse(json_string));
|
|
179
|
+
});
|
|
180
|
+
GetStakingEstimationFee201Response.prototype['pool_type'] = undefined;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @member {module:model/EstimatedFee} fee
|
|
184
|
+
*/
|
|
185
|
+
GetStakingEstimationFee201Response.prototype['fee'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* A list of public keys associated with the Ethereum validators for this staking operation.
|
|
189
|
+
* @member {Array.<String>} validator_pubkeys
|
|
190
|
+
*/
|
|
191
|
+
GetStakingEstimationFee201Response.prototype['validator_pubkeys'] = undefined;
|
|
192
|
+
|
|
93
193
|
/**
|
|
94
194
|
* @member {module:model/FeeType} fee_type
|
|
95
195
|
*/
|
|
@@ -106,4 +206,5 @@ GetStakingEstimationFee201Response.prototype['fee_amount'] = undefined;
|
|
|
106
206
|
* @member {String} token_id
|
|
107
207
|
*/
|
|
108
208
|
GetStakingEstimationFee201Response.prototype['token_id'] = undefined;
|
|
209
|
+
GetStakingEstimationFee201Response.OneOf = ["BabylonStakeEstimatedFee", "EthStakeEstimatedFee"];
|
|
109
210
|
var _default = exports["default"] = GetStakingEstimationFee201Response;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ActivityType = _interopRequireDefault(require("./ActivityType"));
|
|
9
|
-
var
|
|
9
|
+
var _CreateUnstakeActivityExtra = _interopRequireDefault(require("./CreateUnstakeActivityExtra"));
|
|
10
10
|
var _EstimateStakeFee = _interopRequireDefault(require("./EstimateStakeFee"));
|
|
11
11
|
var _EstimateUnstakeFee = _interopRequireDefault(require("./EstimateUnstakeFee"));
|
|
12
12
|
var _EstimateWithdrawFee = _interopRequireDefault(require("./EstimateWithdrawFee"));
|
|
@@ -237,7 +237,7 @@ GetStakingEstimationFeeRequest.prototype['amount'] = undefined;
|
|
|
237
237
|
GetStakingEstimationFeeRequest.prototype['fee'] = undefined;
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
|
-
* @member {module:model/
|
|
240
|
+
* @member {module:model/CreateUnstakeActivityExtra} extra
|
|
241
241
|
*/
|
|
242
242
|
GetStakingEstimationFeeRequest.prototype['extra'] = undefined;
|
|
243
243
|
|
|
@@ -22,17 +22,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
26
|
-
* @module model/
|
|
25
|
+
* The GetToken2XXResponse model module.
|
|
26
|
+
* @module model/GetToken2XXResponse
|
|
27
27
|
*/
|
|
28
|
-
var
|
|
28
|
+
var GetToken2XXResponse = /*#__PURE__*/function () {
|
|
29
29
|
/**
|
|
30
|
-
* Constructs a new <code>
|
|
31
|
-
* @alias module:model/
|
|
30
|
+
* Constructs a new <code>GetToken2XXResponse</code>.
|
|
31
|
+
* @alias module:model/GetToken2XXResponse
|
|
32
32
|
*/
|
|
33
|
-
function
|
|
34
|
-
_classCallCheck(this,
|
|
35
|
-
|
|
33
|
+
function GetToken2XXResponse() {
|
|
34
|
+
_classCallCheck(this, GetToken2XXResponse);
|
|
35
|
+
GetToken2XXResponse.initialize(this);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -40,22 +40,22 @@ var GetToken200Response = /*#__PURE__*/function () {
|
|
|
40
40
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
41
41
|
* Only for internal use.
|
|
42
42
|
*/
|
|
43
|
-
return _createClass(
|
|
43
|
+
return _createClass(GetToken2XXResponse, null, [{
|
|
44
44
|
key: "initialize",
|
|
45
45
|
value: function initialize(obj) {}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Constructs a <code>
|
|
48
|
+
* Constructs a <code>GetToken2XXResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
49
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
50
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
-
* @param {module:model/
|
|
52
|
-
* @return {module:model/
|
|
51
|
+
* @param {module:model/GetToken2XXResponse} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/GetToken2XXResponse} The populated <code>GetToken2XXResponse</code> instance.
|
|
53
53
|
*/
|
|
54
54
|
}, {
|
|
55
55
|
key: "constructFromObject",
|
|
56
56
|
value: function constructFromObject(data, obj) {
|
|
57
57
|
if (data) {
|
|
58
|
-
obj = obj || new
|
|
58
|
+
obj = obj || new GetToken2XXResponse();
|
|
59
59
|
if (data.hasOwnProperty('access_token')) {
|
|
60
60
|
obj['access_token'] = _ApiClient["default"].convertToType(data['access_token'], 'String');
|
|
61
61
|
}
|
|
@@ -76,9 +76,9 @@ var GetToken200Response = /*#__PURE__*/function () {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* Validates the JSON data with respect to <code>
|
|
79
|
+
* Validates the JSON data with respect to <code>GetToken2XXResponse</code>.
|
|
80
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>
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetToken2XXResponse</code>.
|
|
82
82
|
*/
|
|
83
83
|
}, {
|
|
84
84
|
key: "validateJSON",
|
|
@@ -107,29 +107,29 @@ var GetToken200Response = /*#__PURE__*/function () {
|
|
|
107
107
|
* The Org Access Token.
|
|
108
108
|
* @member {String} access_token
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
GetToken2XXResponse.prototype['access_token'] = undefined;
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
113
|
* The type of the tokens, which is Bearer.
|
|
114
114
|
* @member {String} token_type
|
|
115
115
|
*/
|
|
116
|
-
|
|
116
|
+
GetToken2XXResponse.prototype['token_type'] = undefined;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
119
|
* The scope of the Org Access Token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the Org Access Token is based on the permissions granted when the app user installs the app.
|
|
120
120
|
* @member {String} scope
|
|
121
121
|
*/
|
|
122
|
-
|
|
122
|
+
GetToken2XXResponse.prototype['scope'] = undefined;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* The time in seconds in which the Org Access Token expires.
|
|
126
126
|
* @member {Number} expires_in
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
GetToken2XXResponse.prototype['expires_in'] = undefined;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* The Refresh Token, used to obtain a new Org Access Token when the current Org Access Token expires. The expiration time for Refresh Tokens is currently set to 30 days and is subject to change.
|
|
132
132
|
* @member {String} refresh_token
|
|
133
133
|
*/
|
|
134
|
-
|
|
135
|
-
var _default = exports["default"] =
|
|
134
|
+
GetToken2XXResponse.prototype['refresh_token'] = undefined;
|
|
135
|
+
var _default = exports["default"] = GetToken2XXResponse;
|