@coinbase-sample/prime-sdk-ts 0.6.2 → 0.6.4
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 +207 -67
- package/dist/addressBooks/index.js +2 -2
- package/dist/allocations/index.js +3 -3
- package/dist/client-manual.js +84 -0
- package/dist/client-modular.js +57 -0
- package/dist/client-only.js +31 -0
- package/dist/{client.js → clients/client.js} +12 -2
- package/dist/clients/clientWithServices.js +323 -0
- package/dist/{types/client.d.ts → clients/clientWithServicesTypes.js} +3 -6
- package/dist/clients/index.js +28 -0
- package/dist/clients/types.js +2 -0
- package/dist/constants.js +1 -1
- package/dist/futures/index.js +4 -4
- package/dist/index.js +27 -18
- package/dist/model/enumPrefixes.js +330 -0
- package/dist/onchainAddressBook/index.js +4 -4
- package/dist/orders/index.js +6 -6
- package/dist/paymentMethods/index.js +2 -1
- package/dist/services.js +75 -0
- package/dist/shared/dynamicEnumValidation.js +184 -0
- package/dist/shared/dynamicEnumValidation.old.js +746 -0
- package/dist/shared/enumHelpers.js +219 -0
- package/dist/shared/enumRegistry.js +153 -0
- package/dist/shared/enumValidationCore.js +194 -0
- package/dist/shared/enumValidators.js +115 -0
- package/dist/shared/envUtils.js +66 -0
- package/dist/shared/fieldMapping.js +242 -0
- package/dist/shared/serviceContext.js +157 -0
- package/dist/staking/index.js +5 -5
- package/dist/transactions/index.js +5 -5
- package/dist/types/activities/index.d.ts +2 -3
- package/dist/types/addressBooks/index.d.ts +2 -3
- package/dist/types/allocations/index.d.ts +2 -3
- package/dist/types/assets/index.d.ts +2 -3
- package/dist/types/balances/index.d.ts +2 -3
- package/dist/types/balances/types.d.ts +1 -1
- package/dist/types/client-manual.d.ts +58 -0
- package/dist/types/client-modular.d.ts +39 -0
- package/dist/types/client-only.d.ts +18 -0
- package/dist/types/clients/client.d.ts +27 -0
- package/dist/types/clients/clientWithServices.d.ts +229 -0
- package/dist/types/clients/clientWithServicesTypes.d.ts +115 -0
- package/dist/types/clients/index.d.ts +19 -0
- package/dist/types/clients/types.d.ts +48 -0
- package/dist/types/commission/index.d.ts +2 -3
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/financing/index.d.ts +2 -3
- package/dist/types/futures/index.d.ts +2 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/invoices/index.d.ts +2 -3
- package/dist/types/model/enumPrefixes.d.ts +206 -0
- package/dist/types/onchainAddressBook/index.d.ts +2 -3
- package/dist/types/orders/index.d.ts +2 -3
- package/dist/types/paymentMethods/index.d.ts +2 -3
- package/dist/types/paymentMethods/types.d.ts +1 -0
- package/dist/types/portfolios/index.d.ts +2 -3
- package/dist/types/positions/index.d.ts +2 -3
- package/dist/types/products/index.d.ts +2 -3
- package/dist/types/services.d.ts +39 -0
- package/dist/types/shared/dynamicEnumValidation.d.ts +48 -0
- package/dist/types/shared/dynamicEnumValidation.old.d.ts +143 -0
- package/dist/types/shared/enumHelpers.d.ts +135 -0
- package/dist/types/shared/enumRegistry.d.ts +74 -0
- package/dist/types/shared/enumValidationCore.d.ts +68 -0
- package/dist/types/shared/enumValidators.d.ts +117 -0
- package/dist/types/shared/envUtils.d.ts +36 -0
- package/dist/types/shared/fieldMapping.d.ts +35 -0
- package/dist/types/shared/paginatedResponse.d.ts +3 -4
- package/dist/types/shared/serviceContext.d.ts +46 -0
- package/dist/types/staking/index.d.ts +2 -3
- package/dist/types/transactions/index.d.ts +2 -3
- package/dist/types/types.d.ts +37 -0
- package/dist/types/users/index.d.ts +2 -3
- package/dist/types/wallets/index.d.ts +2 -3
- package/dist/types.js +39 -0
- package/dist/wallets/index.js +3 -3
- package/package.json +33 -2
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
4
|
+
*
|
|
5
|
+
* This file is auto-generated during the type generation process.
|
|
6
|
+
* Do not edit manually - regenerate by running: npm run generate-types
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ENUM_ANALYSIS = exports.GENERATED_ENUM_PREFIXES = void 0;
|
|
22
|
+
/**
|
|
23
|
+
* Auto-generated enum prefix patterns extracted from OpenAPI specification
|
|
24
|
+
* Total enums analyzed: 43
|
|
25
|
+
* Prefix patterns discovered: 77
|
|
26
|
+
*/
|
|
27
|
+
exports.GENERATED_ENUM_PREFIXES = [
|
|
28
|
+
'ACTION_',
|
|
29
|
+
'ACTIVITY_CATEGORY_',
|
|
30
|
+
'ACTIVITY_LEVEL_',
|
|
31
|
+
'ACTIVITY_SECONDARY_',
|
|
32
|
+
'ACTIVITY_STATUS_',
|
|
33
|
+
'ACTIVITY_TYPE_',
|
|
34
|
+
'ADDRESS_BOOK_',
|
|
35
|
+
'ALLOCATION_STATUS_',
|
|
36
|
+
'BALANCE_',
|
|
37
|
+
'BENCHMARK_',
|
|
38
|
+
'BILATERAL_',
|
|
39
|
+
'BILLING_',
|
|
40
|
+
'CHANGE_',
|
|
41
|
+
'CLAIM_',
|
|
42
|
+
'COINBASE_',
|
|
43
|
+
'COMPLETE_',
|
|
44
|
+
'CONCENTRATION_',
|
|
45
|
+
'COUNTERPARTY_',
|
|
46
|
+
'CRYPTO_',
|
|
47
|
+
'DEPOSIT_',
|
|
48
|
+
'DESTINATION_',
|
|
49
|
+
'DESTINATION_PAYMENT_',
|
|
50
|
+
'FCM_FUTURES_',
|
|
51
|
+
'FCM_MARGIN_',
|
|
52
|
+
'FCM_POSITION_',
|
|
53
|
+
'FILL_OR_',
|
|
54
|
+
'FULL_',
|
|
55
|
+
'GOOD_UNTIL_',
|
|
56
|
+
'HIERARCHY_TYPE_',
|
|
57
|
+
'IMMEDIATE_OR_',
|
|
58
|
+
'INTERNAL_',
|
|
59
|
+
'INVOICE_STATE_',
|
|
60
|
+
'INVOICE_TYPE_',
|
|
61
|
+
'ITEM_',
|
|
62
|
+
'ITEM_APPROVAL_',
|
|
63
|
+
'LOAN_TYPE_',
|
|
64
|
+
'MACRO_',
|
|
65
|
+
'MARGIN_ADD_',
|
|
66
|
+
'METHOD_',
|
|
67
|
+
'MULTIPLE_',
|
|
68
|
+
'NETWORK_FAMILY_',
|
|
69
|
+
'NETWORK_TYPE_',
|
|
70
|
+
'NO_SECONDARY_',
|
|
71
|
+
'ONCHAIN_',
|
|
72
|
+
'OTHER_',
|
|
73
|
+
'OTHER_ACTIVITY_',
|
|
74
|
+
'OTHER_TRANSACTION_',
|
|
75
|
+
'PAYMENT_',
|
|
76
|
+
'PORTFOLIO_',
|
|
77
|
+
'POSITION_REFERENCE_',
|
|
78
|
+
'PRIME_CUSTODY_',
|
|
79
|
+
'PRODUCT_PERMISSION_',
|
|
80
|
+
'PROXY_',
|
|
81
|
+
'RATE_TYPE_',
|
|
82
|
+
'REMOVE_AUTHORIZED_',
|
|
83
|
+
'SHORT_',
|
|
84
|
+
'SHORT_BIASED_',
|
|
85
|
+
'SHORT_COLLATERAL_',
|
|
86
|
+
'SINGLE_COIN_',
|
|
87
|
+
'STAKE_ACCOUNT_',
|
|
88
|
+
'STAKE_AUTHORIZE_',
|
|
89
|
+
'STOP_',
|
|
90
|
+
'SWEEP_',
|
|
91
|
+
'TEAM_',
|
|
92
|
+
'TOTAL_',
|
|
93
|
+
'TRADE_',
|
|
94
|
+
'TRADING_',
|
|
95
|
+
'TRANSACTION_',
|
|
96
|
+
'TRANSACTION_IMPORT_',
|
|
97
|
+
'TRANSACTION_TYPE_',
|
|
98
|
+
'UNIFIED_TOTAL_',
|
|
99
|
+
'VAULT_',
|
|
100
|
+
'VOTE_',
|
|
101
|
+
'WALLET_TYPE_',
|
|
102
|
+
'WALLET_VISIBILITY_',
|
|
103
|
+
'WITHDRAWAL_',
|
|
104
|
+
'WITHDRAW_',
|
|
105
|
+
];
|
|
106
|
+
/**
|
|
107
|
+
* Detailed enum analysis for debugging and insights
|
|
108
|
+
*/
|
|
109
|
+
exports.ENUM_ANALYSIS = {
|
|
110
|
+
totalEnums: 43,
|
|
111
|
+
discoveredPrefixes: 77,
|
|
112
|
+
prefixPatterns: exports.GENERATED_ENUM_PREFIXES,
|
|
113
|
+
enumDetails: [
|
|
114
|
+
{
|
|
115
|
+
name: 'CoinbaseCustodyApiActivityType',
|
|
116
|
+
valueCount: 29,
|
|
117
|
+
file: 'coinbaseCustodyApiActivityType.ts',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'CoinbaseCustodyApiAddressBookType',
|
|
121
|
+
valueCount: 3,
|
|
122
|
+
file: 'coinbaseCustodyApiAddressBookType.ts',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'CoinbasePublicRestApiAction',
|
|
126
|
+
valueCount: 5,
|
|
127
|
+
file: 'coinbasePublicRestApiAction.ts',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'CoinbasePublicRestApiActivityCategory',
|
|
131
|
+
valueCount: 7,
|
|
132
|
+
file: 'coinbasePublicRestApiActivityCategory.ts',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'CoinbasePublicRestApiActivityLevel',
|
|
136
|
+
valueCount: 3,
|
|
137
|
+
file: 'coinbasePublicRestApiActivityLevel.ts',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'CoinbasePublicRestApiActivitySecondaryType',
|
|
141
|
+
valueCount: 7,
|
|
142
|
+
file: 'coinbasePublicRestApiActivitySecondaryType.ts',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'CoinbasePublicRestApiActivityStatus',
|
|
146
|
+
valueCount: 7,
|
|
147
|
+
file: 'coinbasePublicRestApiActivityStatus.ts',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'CoinbasePublicRestApiActivityType',
|
|
151
|
+
valueCount: 42,
|
|
152
|
+
file: 'coinbasePublicRestApiActivityType.ts',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'CoinbasePublicRestApiAllocationSizeType',
|
|
156
|
+
valueCount: 3,
|
|
157
|
+
file: 'coinbasePublicRestApiAllocationSizeType.ts',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'CoinbasePublicRestApiAllocationStatus',
|
|
161
|
+
valueCount: 5,
|
|
162
|
+
file: 'coinbasePublicRestApiAllocationStatus.ts',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'CoinbasePublicRestApiAssetChangeType',
|
|
166
|
+
valueCount: 5,
|
|
167
|
+
file: 'coinbasePublicRestApiAssetChangeType.ts',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'CoinbasePublicRestApiBenchmark',
|
|
171
|
+
valueCount: 5,
|
|
172
|
+
file: 'coinbasePublicRestApiBenchmark.ts',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'CoinbasePublicRestApiDestinationType',
|
|
176
|
+
valueCount: 4,
|
|
177
|
+
file: 'coinbasePublicRestApiDestinationType.ts',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'CoinbasePublicRestApiFcmFuturesSweepStatus',
|
|
181
|
+
valueCount: 5,
|
|
182
|
+
file: 'coinbasePublicRestApiFcmFuturesSweepStatus.ts',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'CoinbasePublicRestApiFcmMarginCallState',
|
|
186
|
+
valueCount: 5,
|
|
187
|
+
file: 'coinbasePublicRestApiFcmMarginCallState.ts',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'CoinbasePublicRestApiFcmMarginCallType',
|
|
191
|
+
valueCount: 3,
|
|
192
|
+
file: 'coinbasePublicRestApiFcmMarginCallType.ts',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'CoinbasePublicRestApiFcmPositionSide',
|
|
196
|
+
valueCount: 3,
|
|
197
|
+
file: 'coinbasePublicRestApiFcmPositionSide.ts',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'CoinbasePublicRestApiHierarchyType',
|
|
201
|
+
valueCount: 3,
|
|
202
|
+
file: 'coinbasePublicRestApiHierarchyType.ts',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'CoinbasePublicRestApiInvoiceState',
|
|
206
|
+
valueCount: 5,
|
|
207
|
+
file: 'coinbasePublicRestApiInvoiceState.ts',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'CoinbasePublicRestApiInvoiceType',
|
|
211
|
+
valueCount: 6,
|
|
212
|
+
file: 'coinbasePublicRestApiInvoiceType.ts',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'CoinbasePublicRestApiLoanType',
|
|
216
|
+
valueCount: 6,
|
|
217
|
+
file: 'coinbasePublicRestApiLoanType.ts',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: 'CoinbasePublicRestApiMarginAddOnType',
|
|
221
|
+
valueCount: 5,
|
|
222
|
+
file: 'coinbasePublicRestApiMarginAddOnType.ts',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'CoinbasePublicRestApiNetworkFamily',
|
|
226
|
+
valueCount: 3,
|
|
227
|
+
file: 'coinbasePublicRestApiNetworkFamily.ts',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'CoinbasePublicRestApiNetworkType',
|
|
231
|
+
valueCount: 3,
|
|
232
|
+
file: 'coinbasePublicRestApiNetworkType.ts',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: 'CoinbasePublicRestApiOrderSide',
|
|
236
|
+
valueCount: 2,
|
|
237
|
+
file: 'coinbasePublicRestApiOrderSide.ts',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: 'CoinbasePublicRestApiOrderStatus',
|
|
241
|
+
valueCount: 6,
|
|
242
|
+
file: 'coinbasePublicRestApiOrderStatus.ts',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'CoinbasePublicRestApiOrderType',
|
|
246
|
+
valueCount: 7,
|
|
247
|
+
file: 'coinbasePublicRestApiOrderType.ts',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: 'CoinbasePublicRestApiPaymentMethodType',
|
|
251
|
+
valueCount: 3,
|
|
252
|
+
file: 'coinbasePublicRestApiPaymentMethodType.ts',
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'CoinbasePublicRestApiPortfolioBalanceType',
|
|
256
|
+
valueCount: 5,
|
|
257
|
+
file: 'coinbasePublicRestApiPortfolioBalanceType.ts',
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'CoinbasePublicRestApiPositionReferenceType',
|
|
261
|
+
valueCount: 3,
|
|
262
|
+
file: 'coinbasePublicRestApiPositionReferenceType.ts',
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: 'CoinbasePublicRestApiProductPermissions',
|
|
266
|
+
valueCount: 3,
|
|
267
|
+
file: 'coinbasePublicRestApiProductPermissions.ts',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'CoinbasePublicRestApiRateType',
|
|
271
|
+
valueCount: 5,
|
|
272
|
+
file: 'coinbasePublicRestApiRateType.ts',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'CoinbasePublicRestApiSigningStatus',
|
|
276
|
+
valueCount: 2,
|
|
277
|
+
file: 'coinbasePublicRestApiSigningStatus.ts',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'CoinbasePublicRestApiSortDirection',
|
|
281
|
+
valueCount: 2,
|
|
282
|
+
file: 'coinbasePublicRestApiSortDirection.ts',
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: 'CoinbasePublicRestApiTimeInForceType',
|
|
286
|
+
valueCount: 4,
|
|
287
|
+
file: 'coinbasePublicRestApiTimeInForceType.ts',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: 'CoinbasePublicRestApiTransactionStatus',
|
|
291
|
+
valueCount: 21,
|
|
292
|
+
file: 'coinbasePublicRestApiTransactionStatus.ts',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'CoinbasePublicRestApiTransactionType',
|
|
296
|
+
valueCount: 33,
|
|
297
|
+
file: 'coinbasePublicRestApiTransactionType.ts',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'CoinbasePublicRestApiTransferLocationType',
|
|
301
|
+
valueCount: 6,
|
|
302
|
+
file: 'coinbasePublicRestApiTransferLocationType.ts',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'CoinbasePublicRestApiUserRole',
|
|
306
|
+
valueCount: 9,
|
|
307
|
+
file: 'coinbasePublicRestApiUserRole.ts',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'CoinbasePublicRestApiVisibilityStatus',
|
|
311
|
+
valueCount: 3,
|
|
312
|
+
file: 'coinbasePublicRestApiVisibilityStatus.ts',
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: 'CoinbasePublicRestApiWalletDepositInstructionType',
|
|
316
|
+
valueCount: 5,
|
|
317
|
+
file: 'coinbasePublicRestApiWalletDepositInstructionType.ts',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: 'CoinbasePublicRestApiWalletType',
|
|
321
|
+
valueCount: 5,
|
|
322
|
+
file: 'coinbasePublicRestApiWalletType.ts',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
name: 'CoinbasePublicRestApiWalletVisibility',
|
|
326
|
+
valueCount: 3,
|
|
327
|
+
file: 'coinbasePublicRestApiWalletVisibility.ts',
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
};
|
|
@@ -25,7 +25,7 @@ exports.OnchainAddressBookService = void 0;
|
|
|
25
25
|
* See the License for the specific language governing permissions and
|
|
26
26
|
* limitations under the License.
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
28
|
+
const clients_1 = require("../clients");
|
|
29
29
|
class OnchainAddressBookService {
|
|
30
30
|
constructor(client) {
|
|
31
31
|
this.client = client;
|
|
@@ -44,7 +44,7 @@ class OnchainAddressBookService {
|
|
|
44
44
|
const response = yield this.client.request({
|
|
45
45
|
url: `portfolios/${request.portfolioId}/onchain_address_group`,
|
|
46
46
|
bodyParams: Object.assign(Object.assign({}, request), { portfolioId: undefined }),
|
|
47
|
-
method:
|
|
47
|
+
method: clients_1.Method.POST,
|
|
48
48
|
callOptions: options,
|
|
49
49
|
});
|
|
50
50
|
return response.data;
|
|
@@ -55,7 +55,7 @@ class OnchainAddressBookService {
|
|
|
55
55
|
const response = yield this.client.request({
|
|
56
56
|
url: `portfolios/${request.portfolioId}/onchain_address_group`,
|
|
57
57
|
bodyParams: Object.assign(Object.assign({}, request), { portfolioId: undefined }),
|
|
58
|
-
method:
|
|
58
|
+
method: clients_1.Method.PUT,
|
|
59
59
|
callOptions: options,
|
|
60
60
|
});
|
|
61
61
|
return response.data;
|
|
@@ -65,7 +65,7 @@ class OnchainAddressBookService {
|
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const response = yield this.client.request({
|
|
67
67
|
url: `portfolios/${request.portfolioId}/onchain_address_group/${request.addressGroupId}`,
|
|
68
|
-
method:
|
|
68
|
+
method: clients_1.Method.DELETE,
|
|
69
69
|
callOptions: options,
|
|
70
70
|
});
|
|
71
71
|
return response.data;
|
package/dist/orders/index.js
CHANGED
|
@@ -36,7 +36,7 @@ exports.OrdersService = void 0;
|
|
|
36
36
|
* See the License for the specific language governing permissions and
|
|
37
37
|
* limitations under the License.
|
|
38
38
|
*/
|
|
39
|
-
const
|
|
39
|
+
const clients_1 = require("../clients");
|
|
40
40
|
const paginatedResponse_1 = require("../shared/paginatedResponse");
|
|
41
41
|
class OrdersService {
|
|
42
42
|
constructor(client) {
|
|
@@ -122,7 +122,7 @@ class OrdersService {
|
|
|
122
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
123
|
const response = yield this.client.request({
|
|
124
124
|
url: `portfolios/${request.portfolioId}/order_preview`,
|
|
125
|
-
method:
|
|
125
|
+
method: clients_1.Method.POST,
|
|
126
126
|
bodyParams: request,
|
|
127
127
|
callOptions: options,
|
|
128
128
|
});
|
|
@@ -133,7 +133,7 @@ class OrdersService {
|
|
|
133
133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
134
134
|
const response = yield this.client.request({
|
|
135
135
|
url: `portfolios/${request.portfolioId}/orders/${request.orderId}/cancel`,
|
|
136
|
-
method:
|
|
136
|
+
method: clients_1.Method.POST,
|
|
137
137
|
callOptions: options,
|
|
138
138
|
});
|
|
139
139
|
return response.data;
|
|
@@ -143,7 +143,7 @@ class OrdersService {
|
|
|
143
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
144
|
const response = yield this.client.request({
|
|
145
145
|
url: `portfolios/${request.portfolioId}/order`,
|
|
146
|
-
method:
|
|
146
|
+
method: clients_1.Method.POST,
|
|
147
147
|
bodyParams: request,
|
|
148
148
|
callOptions: options,
|
|
149
149
|
});
|
|
@@ -154,7 +154,7 @@ class OrdersService {
|
|
|
154
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
155
155
|
const response = yield this.client.request({
|
|
156
156
|
url: `portfolios/${request.portfolioId}/rfq`,
|
|
157
|
-
method:
|
|
157
|
+
method: clients_1.Method.POST,
|
|
158
158
|
bodyParams: request,
|
|
159
159
|
callOptions: options,
|
|
160
160
|
});
|
|
@@ -165,7 +165,7 @@ class OrdersService {
|
|
|
165
165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
166
166
|
const response = yield this.client.request({
|
|
167
167
|
url: `portfolios/${request.portfolioId}/accept_quote`,
|
|
168
|
-
method:
|
|
168
|
+
method: clients_1.Method.POST,
|
|
169
169
|
bodyParams: request,
|
|
170
170
|
callOptions: options,
|
|
171
171
|
});
|
|
@@ -14,6 +14,7 @@ class PaymentMethodsService {
|
|
|
14
14
|
constructor(client) {
|
|
15
15
|
this.client = client;
|
|
16
16
|
}
|
|
17
|
+
// TODO: rename me to remove Entity in a minor version change
|
|
17
18
|
listEntityPaymentMethods(request, options) {
|
|
18
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
20
|
const response = yield this.client.request({
|
|
@@ -26,7 +27,7 @@ class PaymentMethodsService {
|
|
|
26
27
|
getPaymentMethod(request, options) {
|
|
27
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
29
|
const response = yield this.client.request({
|
|
29
|
-
url: `entities/${request.entityId}/payment-methods`,
|
|
30
|
+
url: `entities/${request.entityId}/payment-methods/${request.paymentMethodId}`,
|
|
30
31
|
callOptions: options,
|
|
31
32
|
});
|
|
32
33
|
return response.data;
|
package/dist/services.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.WalletsService = exports.UsersService = exports.TransactionsService = exports.StakingService = exports.ProductsService = exports.PositionsService = exports.PortfoliosService = exports.PaymentMethodsService = exports.OrdersService = exports.OnchainAddressBookService = exports.InvoicesService = exports.FuturesService = exports.FinancingService = exports.CommissionService = exports.BalancesService = exports.AssetsService = exports.AllocationService = exports.AddressBooksService = exports.ActivitiesService = void 0;
|
|
33
|
+
// Services-only entry point - for users who want to import specific services
|
|
34
|
+
// without pulling in client classes. Ideal for custom client implementations
|
|
35
|
+
// or when using dependency injection frameworks.
|
|
36
|
+
// Export all service classes and interfaces
|
|
37
|
+
var activities_1 = require("./activities");
|
|
38
|
+
Object.defineProperty(exports, "ActivitiesService", { enumerable: true, get: function () { return activities_1.ActivitiesService; } });
|
|
39
|
+
var addressBooks_1 = require("./addressBooks");
|
|
40
|
+
Object.defineProperty(exports, "AddressBooksService", { enumerable: true, get: function () { return addressBooks_1.AddressBooksService; } });
|
|
41
|
+
var allocations_1 = require("./allocations");
|
|
42
|
+
Object.defineProperty(exports, "AllocationService", { enumerable: true, get: function () { return allocations_1.AllocationService; } });
|
|
43
|
+
var assets_1 = require("./assets");
|
|
44
|
+
Object.defineProperty(exports, "AssetsService", { enumerable: true, get: function () { return assets_1.AssetsService; } });
|
|
45
|
+
var balances_1 = require("./balances");
|
|
46
|
+
Object.defineProperty(exports, "BalancesService", { enumerable: true, get: function () { return balances_1.BalancesService; } });
|
|
47
|
+
var commission_1 = require("./commission");
|
|
48
|
+
Object.defineProperty(exports, "CommissionService", { enumerable: true, get: function () { return commission_1.CommissionService; } });
|
|
49
|
+
var financing_1 = require("./financing");
|
|
50
|
+
Object.defineProperty(exports, "FinancingService", { enumerable: true, get: function () { return financing_1.FinancingService; } });
|
|
51
|
+
var futures_1 = require("./futures");
|
|
52
|
+
Object.defineProperty(exports, "FuturesService", { enumerable: true, get: function () { return futures_1.FuturesService; } });
|
|
53
|
+
var invoices_1 = require("./invoices");
|
|
54
|
+
Object.defineProperty(exports, "InvoicesService", { enumerable: true, get: function () { return invoices_1.InvoicesService; } });
|
|
55
|
+
var onchainAddressBook_1 = require("./onchainAddressBook");
|
|
56
|
+
Object.defineProperty(exports, "OnchainAddressBookService", { enumerable: true, get: function () { return onchainAddressBook_1.OnchainAddressBookService; } });
|
|
57
|
+
var orders_1 = require("./orders");
|
|
58
|
+
Object.defineProperty(exports, "OrdersService", { enumerable: true, get: function () { return orders_1.OrdersService; } });
|
|
59
|
+
var paymentMethods_1 = require("./paymentMethods");
|
|
60
|
+
Object.defineProperty(exports, "PaymentMethodsService", { enumerable: true, get: function () { return paymentMethods_1.PaymentMethodsService; } });
|
|
61
|
+
var portfolios_1 = require("./portfolios");
|
|
62
|
+
Object.defineProperty(exports, "PortfoliosService", { enumerable: true, get: function () { return portfolios_1.PortfoliosService; } });
|
|
63
|
+
var positions_1 = require("./positions");
|
|
64
|
+
Object.defineProperty(exports, "PositionsService", { enumerable: true, get: function () { return positions_1.PositionsService; } });
|
|
65
|
+
var products_1 = require("./products");
|
|
66
|
+
Object.defineProperty(exports, "ProductsService", { enumerable: true, get: function () { return products_1.ProductsService; } });
|
|
67
|
+
var staking_1 = require("./staking");
|
|
68
|
+
Object.defineProperty(exports, "StakingService", { enumerable: true, get: function () { return staking_1.StakingService; } });
|
|
69
|
+
var transactions_1 = require("./transactions");
|
|
70
|
+
Object.defineProperty(exports, "TransactionsService", { enumerable: true, get: function () { return transactions_1.TransactionsService; } });
|
|
71
|
+
var users_1 = require("./users");
|
|
72
|
+
Object.defineProperty(exports, "UsersService", { enumerable: true, get: function () { return users_1.UsersService; } });
|
|
73
|
+
var wallets_1 = require("./wallets");
|
|
74
|
+
Object.defineProperty(exports, "WalletsService", { enumerable: true, get: function () { return wallets_1.WalletsService; } });
|
|
75
|
+
__exportStar(require("./model/enums/"), exports);
|