@cobo/cobo-waas2 1.36.0 → 1.38.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.
Files changed (92) hide show
  1. package/README.md +9 -1
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/PaymentApi.js +77 -0
  4. package/dist/index.js +49 -0
  5. package/dist/model/AddressesEventData.js +18 -3
  6. package/dist/model/ApprovalUserDetail.js +13 -0
  7. package/dist/model/BalanceUpdateInfoEventData.js +18 -3
  8. package/dist/model/ChainsEventData.js +18 -3
  9. package/dist/model/ComplianceDispositionUpdateEventData.js +18 -3
  10. package/dist/model/ComplianceKyaScreeningsUpdateEventData.js +18 -3
  11. package/dist/model/ComplianceKytScreeningsUpdateEventData.js +18 -3
  12. package/dist/model/CreateBulkSendRequest.js +1 -1
  13. package/dist/model/CreateBulkSendRequestPayoutParamsInner.js +1 -1
  14. package/dist/model/EstimatedSOLFeeSlow.js +2 -2
  15. package/dist/model/FiatTransactionEventData.js +436 -0
  16. package/dist/model/MPCVaultEventData.js +18 -3
  17. package/dist/model/OrganizationEventData.js +275 -0
  18. package/dist/model/PaymentAccountBalanceUpdateEventData.js +418 -0
  19. package/dist/model/PaymentAddressUpdateEventData.js +31 -3
  20. package/dist/model/PaymentBalanceChange.js +248 -0
  21. package/dist/model/PaymentBalanceChangeResponse.js +125 -0
  22. package/dist/model/PaymentBalanceChangeSourceType.js +106 -0
  23. package/dist/model/PaymentBalanceFlowDirection.js +61 -0
  24. package/dist/model/PaymentBulkSend.js +17 -0
  25. package/dist/model/PaymentBulkSendEvent.js +40 -3
  26. package/dist/model/PaymentBulkSendItem.js +13 -0
  27. package/dist/model/PaymentOrderEventData.js +18 -3
  28. package/dist/model/PaymentPayout.js +1 -1
  29. package/dist/model/PaymentPayoutDetail.js +2 -2
  30. package/dist/model/PaymentPayoutEvent.js +20 -5
  31. package/dist/model/PaymentPayoutRecipientInfo.js +1 -1
  32. package/dist/model/PaymentRefundEventData.js +21 -4
  33. package/dist/model/PaymentSettlementEvent.js +18 -3
  34. package/dist/model/PaymentTransactionEventData.js +57 -3
  35. package/dist/model/Refund.js +2 -1
  36. package/dist/model/SOLBase.js +1 -1
  37. package/dist/model/SuspendedTokenEventData.js +18 -3
  38. package/dist/model/TSSRequestWebhookEventData.js +18 -3
  39. package/dist/model/TokenListingEventData.js +18 -3
  40. package/dist/model/TokensEventData.js +18 -3
  41. package/dist/model/TransactionFee.js +1 -1
  42. package/dist/model/TransactionSOLFee.js +3 -3
  43. package/dist/model/TransactionWebhookEventData.js +18 -3
  44. package/dist/model/WalletInfoEventData.js +18 -3
  45. package/dist/model/WebhookEventData.js +195 -20
  46. package/dist/model/WebhookEventDataType.js +17 -2
  47. package/dist/model/WebhookEventType.js +25 -0
  48. package/docs/AddressesEventData.md +7 -1
  49. package/docs/ApprovalUserDetail.md +1 -0
  50. package/docs/BalanceUpdateInfoEventData.md +7 -1
  51. package/docs/ChainsEventData.md +7 -1
  52. package/docs/ComplianceDispositionUpdateEventData.md +7 -1
  53. package/docs/ComplianceKyaScreeningsUpdateEventData.md +7 -1
  54. package/docs/ComplianceKytScreeningsUpdateEventData.md +7 -1
  55. package/docs/CreateBulkSendRequest.md +1 -1
  56. package/docs/CreateBulkSendRequestPayoutParamsInner.md +1 -1
  57. package/docs/EstimatedSOLFeeSlow.md +1 -1
  58. package/docs/FiatTransactionEventData.md +86 -0
  59. package/docs/MPCVaultEventData.md +7 -1
  60. package/docs/OrganizationEventData.md +66 -0
  61. package/docs/PaymentAccountBalanceUpdateEventData.md +76 -0
  62. package/docs/PaymentAddressUpdateEventData.md +8 -1
  63. package/docs/PaymentApi.md +71 -0
  64. package/docs/PaymentBalanceChange.md +19 -0
  65. package/docs/PaymentBalanceChangeResponse.md +10 -0
  66. package/docs/PaymentBalanceChangeSourceType.md +30 -0
  67. package/docs/PaymentBalanceFlowDirection.md +12 -0
  68. package/docs/PaymentBulkSend.md +1 -0
  69. package/docs/PaymentBulkSendEvent.md +8 -1
  70. package/docs/PaymentBulkSendItem.md +1 -0
  71. package/docs/PaymentOrderEventData.md +7 -1
  72. package/docs/PaymentPayout.md +1 -1
  73. package/docs/PaymentPayoutDetail.md +1 -1
  74. package/docs/PaymentPayoutEvent.md +8 -2
  75. package/docs/PaymentPayoutRecipientInfo.md +1 -1
  76. package/docs/PaymentRefundEventData.md +8 -2
  77. package/docs/PaymentSettlementEvent.md +7 -1
  78. package/docs/PaymentTransactionEventData.md +10 -1
  79. package/docs/Refund.md +1 -1
  80. package/docs/SOLBase.md +1 -1
  81. package/docs/SuspendedTokenEventData.md +7 -1
  82. package/docs/TSSRequestWebhookEventData.md +7 -1
  83. package/docs/TokenListingEventData.md +7 -1
  84. package/docs/TokensEventData.md +7 -1
  85. package/docs/TransactionFee.md +1 -1
  86. package/docs/TransactionSOLFee.md +2 -2
  87. package/docs/TransactionWebhookEventData.md +7 -1
  88. package/docs/WalletInfoEventData.md +7 -1
  89. package/docs/WebhookEventData.md +45 -11
  90. package/docs/WebhookEventDataType.md +7 -1
  91. package/docs/WebhookEventType.md +10 -0
  92. package/package.json +1 -1
@@ -0,0 +1,275 @@
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 _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
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 OrganizationEventData model module.
30
+ * @module model/OrganizationEventData
31
+ */
32
+ var OrganizationEventData = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>OrganizationEventData</code>.
35
+ * @alias module:model/OrganizationEventData
36
+ * @implements module:model/WebhookEventDataType
37
+ * @param data_type {module:model/OrganizationEventData.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. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `PaymentAccountBalanceUpdate`: The Payments account balance updated event data, including account information and balance change details. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
38
+ */
39
+ function OrganizationEventData(data_type) {
40
+ _classCallCheck(this, OrganizationEventData);
41
+ _WebhookEventDataType["default"].initialize(this, data_type);
42
+ OrganizationEventData.initialize(this, data_type);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(OrganizationEventData, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, data_type) {
53
+ obj['data_type'] = data_type;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>OrganizationEventData</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/OrganizationEventData} obj Optional instance to populate.
61
+ * @return {module:model/OrganizationEventData} The populated <code>OrganizationEventData</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new OrganizationEventData();
68
+ _WebhookEventDataType["default"].constructFromObject(data, obj);
69
+ if (data.hasOwnProperty('data_type')) {
70
+ obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('org_id')) {
73
+ obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('name')) {
76
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
77
+ }
78
+ }
79
+ return obj;
80
+ }
81
+
82
+ /**
83
+ * Validates the JSON data with respect to <code>OrganizationEventData</code>.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>OrganizationEventData</code>.
86
+ */
87
+ }, {
88
+ key: "validateJSON",
89
+ value: function validateJSON(data) {
90
+ // check to make sure all required properties are present in the JSON string
91
+ var _iterator = _createForOfIteratorHelper(OrganizationEventData.RequiredProperties),
92
+ _step;
93
+ try {
94
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
95
+ var property = _step.value;
96
+ if (!data.hasOwnProperty(property)) {
97
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
98
+ }
99
+ }
100
+ // ensure the json data is a string
101
+ } catch (err) {
102
+ _iterator.e(err);
103
+ } finally {
104
+ _iterator.f();
105
+ }
106
+ if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
107
+ throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
108
+ }
109
+ // ensure the json data is a string
110
+ if (data['org_id'] && !(typeof data['org_id'] === 'string' || data['org_id'] instanceof String)) {
111
+ throw new Error("Expected the field `org_id` to be a primitive type in the JSON string but got " + data['org_id']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
115
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
116
+ }
117
+ return true;
118
+ }
119
+ }]);
120
+ }();
121
+ OrganizationEventData.RequiredProperties = ["data_type"];
122
+
123
+ /**
124
+ * 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. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `PaymentAccountBalanceUpdate`: The Payments account balance updated event data, including account information and balance change details. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
125
+ * @member {module:model/OrganizationEventData.DataTypeEnum} data_type
126
+ */
127
+ OrganizationEventData.prototype['data_type'] = undefined;
128
+
129
+ /**
130
+ * The organization ID.
131
+ * @member {String} org_id
132
+ */
133
+ OrganizationEventData.prototype['org_id'] = undefined;
134
+
135
+ /**
136
+ * The organization name.
137
+ * @member {String} name
138
+ */
139
+ OrganizationEventData.prototype['name'] = undefined;
140
+
141
+ // Implement WebhookEventDataType interface:
142
+ /**
143
+ * 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. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `PaymentAccountBalanceUpdate`: The Payments account balance updated event data, including account information and balance change details. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
144
+ * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
145
+ */
146
+ _WebhookEventDataType["default"].prototype['data_type'] = undefined;
147
+
148
+ /**
149
+ * Allowed values for the <code>data_type</code> property.
150
+ * @enum {String}
151
+ * @readonly
152
+ */
153
+ OrganizationEventData['DataTypeEnum'] = {
154
+ /**
155
+ * value: "Transaction"
156
+ * @const
157
+ */
158
+ "Transaction": "Transaction",
159
+ /**
160
+ * value: "TSSRequest"
161
+ * @const
162
+ */
163
+ "TSSRequest": "TSSRequest",
164
+ /**
165
+ * value: "Addresses"
166
+ * @const
167
+ */
168
+ "Addresses": "Addresses",
169
+ /**
170
+ * value: "WalletInfo"
171
+ * @const
172
+ */
173
+ "WalletInfo": "WalletInfo",
174
+ /**
175
+ * value: "MPCVault"
176
+ * @const
177
+ */
178
+ "MPCVault": "MPCVault",
179
+ /**
180
+ * value: "Chains"
181
+ * @const
182
+ */
183
+ "Chains": "Chains",
184
+ /**
185
+ * value: "Tokens"
186
+ * @const
187
+ */
188
+ "Tokens": "Tokens",
189
+ /**
190
+ * value: "TokenListing"
191
+ * @const
192
+ */
193
+ "TokenListing": "TokenListing",
194
+ /**
195
+ * value: "PaymentOrder"
196
+ * @const
197
+ */
198
+ "PaymentOrder": "PaymentOrder",
199
+ /**
200
+ * value: "PaymentRefund"
201
+ * @const
202
+ */
203
+ "PaymentRefund": "PaymentRefund",
204
+ /**
205
+ * value: "PaymentSettlement"
206
+ * @const
207
+ */
208
+ "PaymentSettlement": "PaymentSettlement",
209
+ /**
210
+ * value: "PaymentTransaction"
211
+ * @const
212
+ */
213
+ "PaymentTransaction": "PaymentTransaction",
214
+ /**
215
+ * value: "PaymentAddressUpdate"
216
+ * @const
217
+ */
218
+ "PaymentAddressUpdate": "PaymentAddressUpdate",
219
+ /**
220
+ * value: "PaymentPayout"
221
+ * @const
222
+ */
223
+ "PaymentPayout": "PaymentPayout",
224
+ /**
225
+ * value: "PaymentBulkSend"
226
+ * @const
227
+ */
228
+ "PaymentBulkSend": "PaymentBulkSend",
229
+ /**
230
+ * value: "PaymentAccountBalanceUpdate"
231
+ * @const
232
+ */
233
+ "PaymentAccountBalanceUpdate": "PaymentAccountBalanceUpdate",
234
+ /**
235
+ * value: "BalanceUpdateInfo"
236
+ * @const
237
+ */
238
+ "BalanceUpdateInfo": "BalanceUpdateInfo",
239
+ /**
240
+ * value: "SuspendedToken"
241
+ * @const
242
+ */
243
+ "SuspendedToken": "SuspendedToken",
244
+ /**
245
+ * value: "ComplianceDisposition"
246
+ * @const
247
+ */
248
+ "ComplianceDisposition": "ComplianceDisposition",
249
+ /**
250
+ * value: "ComplianceKytScreenings"
251
+ * @const
252
+ */
253
+ "ComplianceKytScreenings": "ComplianceKytScreenings",
254
+ /**
255
+ * value: "ComplianceKyaScreenings"
256
+ * @const
257
+ */
258
+ "ComplianceKyaScreenings": "ComplianceKyaScreenings",
259
+ /**
260
+ * value: "Organization"
261
+ * @const
262
+ */
263
+ "Organization": "Organization",
264
+ /**
265
+ * value: "FiatTransaction"
266
+ * @const
267
+ */
268
+ "FiatTransaction": "FiatTransaction",
269
+ /**
270
+ * value: "unknown_default_open_api"
271
+ * @const
272
+ */
273
+ "unknown_default_open_api": "unknown_default_open_api"
274
+ };
275
+ var _default = exports["default"] = OrganizationEventData;