diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f14285a..422737f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,31 +8,36 @@ module.exports = { plugins: [ '@typescript-eslint/eslint-plugin', 'simple-import-sort', - // 'require-extensions', // only once moved to ESM + 'require-extensions', ], extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', - // 'plugin:require-extensions/recommended', // only once moved to ESM + 'plugin:require-extensions/recommended', ], root: true, env: { node: true, jest: true, }, - ignorePatterns: ['.eslintrc.js', 'webpack.config.js'], + ignorePatterns: ['.eslintrc.js', 'webpack.config.js', 'examples/apidoc'], rules: { '@typescript-eslint/interface-name-prefix': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', + 'no-param-reassign': ['error'], '@typescript-eslint/ban-types': 'off', 'simple-import-sort/imports': 'error', 'simple-import-sort/exports': 'error', 'array-bracket-spacing': ['error', 'never'], 'linebreak-style': ['error', 'unix'], 'lines-between-class-members': ['warn', 'always'], + '@typescript-eslint/no-empty-object-type': [ + 'error', + { allowObjectTypes: 'always' }, + ], semi: ['error', 'always'], 'new-cap': 'off', 'no-console': 'off', diff --git a/.github/workflows/e2etests.yml b/.github/workflows/e2etests.yml index 90a8c89..0544eae 100644 --- a/.github/workflows/e2etests.yml +++ b/.github/workflows/e2etests.yml @@ -41,3 +41,6 @@ jobs: API_KEY_COM: ${{ secrets.API_KEY_COM }} API_SECRET_COM: ${{ secrets.API_SECRET_COM }} API_PASS_COM: ${{ secrets.API_PASS_COM }} + API_KEY_COM_V3: ${{ secrets.API_KEY_COM_V3 }} + API_SECRET_COM_V3: ${{ secrets.API_SECRET_COM_V3 }} + API_PASS_COM_V3: ${{ secrets.API_PASS_COM_V3 }} diff --git a/.nvmrc b/.nvmrc index bb8c76c..9fe0738 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v22.11.0 +v22.17.1 diff --git a/README.md b/README.md index 252ecc3..63cb1b3 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,18 @@ Updated & performant JavaScript & Node.js SDK for the Bitget V2 REST APIs and WebSockets: - Complete integration with all Bitget APIs. + - [x] Supports V1 REST APIs & WebSockets + - [x] Supports V2 REST APIs & WebSockets + - [x] Supports V3/UTA REST APIs & WebSockets + - [x] Supports order placement via V3 WebSocket API - TypeScript support (with type declarations for most API requests & responses). - Over 100 integration tests making real API calls & WebSocket connections, validating any changes before they reach npm. - Robust WebSocket integration with configurable connection heartbeats & automatic reconnect then resubscribe workflows. - Officially listed Node.js SDK in [Bitget API docs](https://bitgetlimited.github.io/apidoc/en/spot/#sdk-code-example). - Browser support (via webpack bundle - see "Browser Usage" below). +- Support all authentication methods supported by Bitget: + - [x] HMAC + - [x] RSA ## Installation @@ -64,7 +71,8 @@ Check out my related JavaScript/TypeScript/Node.js projects: Most methods pass values as-is into HTTP requests. These can be populated using parameters specified by Bitget's API documentation, or check the type definition in each class within this repository (see table below for convenient links to each class). -- [Bitget API Documentation](https://www.bitget.com/api-doc/common/intro). +- [Bitget API V2 Documentation](https://www.bitget.com/api-doc/common/intro). +- [Bitget API V3/UTA Documentation](https://www.bitget.com/api-doc/uta/intro). - [REST Endpoint Function List](./docs/endpointFunctionList.md) ## Structure @@ -85,12 +93,15 @@ The version on npm is the output from the `build` command and can be used in pro Each REST API group has a dedicated REST client. To avoid confusion, here are the available REST clients and the corresponding API groups: | Class | Description | |:------------------------------------: |:---------------------------------------------------------------------------------------------: | +| [RestClientV3](src/rest-client-v3.ts) | [V3/UTA REST APIs for Bitget's Unified Trading Account](https://www.bitget.com/api-doc/uta/intro) | +| [WebsocketClientV3](src/websocket-client-v3.ts) | Universal WS client for Bitget's V3/UTA WebSockets | +| [WebsocketAPIClient](src/websocket-api-client.ts) | Websocket API Client, for RESTlike order placement via Bitget's V3/UTA WebSocket API | | [RestClientV2](src/rest-client-v2.ts) | [V2 REST APIs](https://www.bitget.com/api-doc/common/intro) | -| [WebsocketClientV2](src/websocket-client-v2.ts) | Universal client for all Bitget's V2 Websockets | +| [WebsocketClientV2](src/websocket-client-v2.ts) | Universal WS client for all Bitget's V2 WebSockets | | [~~SpotClient~~ (deprecated, use RestClientV2)](src/spot-client.ts) | [~~Spot APIs~~](https://bitgetlimited.github.io/apidoc/en/spot/#introduction) | | [~~FuturesClient~~ (deprecated, use RestClientV2)](src/futures-client.ts) | [~~Futures APIs~~](https://bitgetlimited.github.io/apidoc/en/mix/#introduction) | | [~~BrokerClient~~ (deprecated, use RestClientV2)](src/broker-client.ts) | [~~Broker APIs~~](https://bitgetlimited.github.io/apidoc/en/broker/#introduction) | -| [~~WebsocketClient~~ (deprecated, use WebsocketClientV2)](src/websocket-client.ts) | ~~Universal client for all Bitget's V1 Websockets~~ | +| [~~WebsocketClient~~ (deprecated, use WebsocketClientV2)](src/websocket-client.ts) | ~~Universal client for all Bitget's V1 WebSockets~~ | Examples for using each client can be found in: @@ -103,27 +114,63 @@ If you're missing an example, you're welcome to request one. Priority will be gi First, create API credentials on Bitget's website. -All REST endpoints should be included in the [RestClientV2](src/rest-client-v2.ts) class. If any endpoints are missing or need improved types, pull requests are very welcome. You can also open an issue on this repo to request an improvement. Priority will be given to [github sponsors](https://github.com/sponsors/tiagosiebler). +All REST APIs are integrated in each dedicated Rest Client class. See the above table for which REST client to use. If you've upgraded to the Unified Trading Account, you should use the V3 REST APIs and WebSockets. + +#### V3 REST APIs + +These are only available if you have upgraded to the Unified Trading Account. If not, use the V2 APIs instead. + +```javascript +import { RestClientV3 } from 'bitget-api'; +// or if you prefer require: +// const { RestClientV3 } = require('bitget-api'); + +// note the single quotes, preventing special characters such as $ from being incorrectly passed +const client = new RestClientV3({ + apiKey: process.env.API_KEY_COM || 'insert_api_key_here', + apiSecret: process.env.API_SECRET_COM || 'insert_api_secret_here', + apiPass: process.env.API_PASS_COM || 'insert_api_pass_here', +}); + +(async () => { + try { + console.log(await client.getBalances()); + + const newOrder = await client.submitNewOrder({ + category: 'USDT-FUTURES', + orderType: 'market', + side: 'buy', + qty: '0.001', + symbol: 'BTCUSDT', + }); + + console.log('Order submitted: ', newOrder); + } catch (e) { + console.error('request failed: ', e); + } +})(); +``` + +#### V2 REST APIs Not sure which function to call or which parameters to use? Click the class name in the table above to look at all the function names (they are in the same order as the official API docs), and check the API docs for a list of endpoints/parameters/responses. -If you found the method you're looking for in the API docs, you can also search for the endpoint in the [RestClientV2](src/rest-client-v2.ts) class. +If you found the method you're looking for in the API docs, you can also search for the endpoint in the [RestClientV2](src/rest-client-v2.ts) class. This class has all V2 endpoints available. ```javascript -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you prefer require: +// const { RestClientV2 } = require('bitget-api'); const API_KEY = 'xxx'; const API_SECRET = 'yyy'; const API_PASS = 'zzz'; -const client = new RestClientV2( - { - apiKey: API_KEY, - apiSecret: API_SECRET, - apiPass: API_PASS, - }, - // requestLibraryOptions -); +const client = new RestClientV2({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, +}); // For public-only API calls, simply don't provide a key & secret or set them to undefined // const client = new RestClientV2(); @@ -153,6 +200,211 @@ client #### WebSockets +All WebSocket functionality is supported via the WebsocketClient. Since there are currently 3 generations of Bitget's API, there are 3 WebsocketClient classes in this Node.js, JavaScript & TypeScript SDK for Bitget. + +Use the following guidance to decide which one to use: + +- Unified Trading Account / V3 (latest generation): + - For receiving data, use the [WebsocketClientV3](./src/websocket-client-v3.ts). + - For sending orders via WebSockets, use the [WebsocketAPIClient](./src/websocket-api-client.ts). +- V2 (not upgraded to Unified Trading Account yet) + - Use the [WebsocketClientV2](./src/websocket-client-v2.ts). +- V1 (deprecated) + - This is the oldest API group supported by Bitget. You should migrate to V3 or V2 as soon as possible. + - If you're not ready to migrate, you can use the [WebsocketClientLegacyV1](./src/websocket-client-legacy-v1.ts) class in the meantime. + +Higher level examples below, while more thorough examples can be found in the examples folder on GitHub. + +##### V3 Unified Trading Account + +###### Sending orders via WebSockets + +The V3 / Unified Trading Account APIs introduce order placement via a persisted WebSocket connection. This Bitget Node.js, JavaScript & TypeScript SDK supports Bitget's full V3 API offering, including the WebSocket API. + +There are two approaches to placing orders via the Bitget WebSocket APIs. The recommended route is to use the dedicated WebsocketAPIClient class, included with this SDK. + +This integration looks & feels like a REST API client, but uses WebSockets, via the WebsocketClient's sendWSAPIRequest method. It returns promises and has end to end types. + +A simple example is below, but for a more thorough example, check the example here: [./examples/V3/ws-api-client-trade.ts](./examples/V3/ws-api-client-trade.ts) + +```typescript +import { WebsocketAPIClient } from 'bitget-api'; +// or if you prefer require: +// const { WebsocketAPIClient } = require("bitget-api"); + +// Make an instance of the WS API Client class with your API keys +const wsClient = new WebsocketAPIClient({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + + // Whether to use the demo trading wss connection + // demoTrading: true, +}); + +async function start() { + // Start using it like a REST API. All actions are sent via a persisted WebSocket connection. + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.submitNewOrder('spot', { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }); + + console.log(new Date(), 'WS API "submitNewOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "submitNewOrder()": ', e); + } +} + +start().catch((e) => console.error('Exception in example: '.e)); +``` + +###### Receiving realtime data + +Use the WebsocketClientV3 to receive data via the V3 WebSockets + +```typescript +import { WebsocketClientV3 } from "bitget-api"; +// or if you prefer require: +// const { WebsocketClientV3 } = require("bitget-api"); + +const API_KEY = "yourAPIKeyHere"; +const API_SECRET = "yourAPISecretHere; +const API_PASS = "yourAPIPassHere"; + +const wsClient = new WebsocketClientV3( + { + // Only necessary if you plan on using private/account websocket topics + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + } +); + +// Connect event handlers to process incoming events +wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); +}); + +wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); +}); +wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); +}); +wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); +}); +wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); +}); +wsClient.on('exception', (data) => { + console.log('WS error', data); +}); + +/** + * Subscribe to topics as you wish + */ + +// You can subscribe to one topic at a time +wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', // Note: all account events go on the UTA instType + }, + }, + WS_KEY_MAP.v3Private, // This parameter points to private or public +); + +// Note: all account events go on the UTA instType +const ACCOUNT_INST_TYPE = 'UTA'; +const ACCOUNT_WS_KEY = WS_KEY_MAP.v3Private; + +// Or multiple at once: +wsClient.subscribe( + [ + { + topic: 'account', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'position', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'fill', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'order', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + ], + ACCOUNT_WS_KEY, +); + +// Example public events +wsClient.subscribe( + [ + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'ETHUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'XRPUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + ], + WS_KEY_MAP.v3Public, +); +``` + For more examples, including how to use websockets with Bitget, check the [examples](./examples/) and [test](./test/) folders. --- @@ -161,15 +413,17 @@ For more examples, including how to use websockets with Bitget, check the [examp ### Customise logging -Pass a custom logger which supports the log methods `silly`, `debug`, `notice`, `info`, `warning` and `error`, or override methods from the default logger as desired. +Pass a custom logger which supports the log methods `trace`, `info` and `error`, or override methods from the default logger as desired. ```javascript -const { WebsocketClientV2, DefaultLogger } = require('bitget-api'); +import { WebsocketClientV2, DefaultLogger } from 'bitget-api'; +// or if you prefer require: +// const { WebsocketClientV2, DefaultLogger } = require('bitget-api'); -// Disable all logging on the silly level (less console logs) +// Disable all logging on the trace level (less console logs) const customLogger = { ...DefaultLogger, - silly: () => {}, + trace: () => {}, }; const ws = new WebsocketClientV2( diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index c3a99b2..b099abd 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -20,6 +20,8 @@ All REST clients are in the [src](/src) folder. For usage examples, make sure to List of clients: - [rest-client-v2](#rest-client-v2ts) +- [rest-client-v3](#rest-client-v3ts) +- [websocket-api-client](#websocket-api-clientts) If anything is missing or wrong, please open an issue or let us know in our [Node.js Traders](https://t.me/nodetraders) telegram group! @@ -305,4 +307,100 @@ This table includes all endpoints from the official Exchange API docs and corres | [getLoanPledgeRateHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2863) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/revise-history` | | [getLoanHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2869) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/borrow-history` | | [getLoanDebts()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2875) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/debts` | -| [getLoanLiquidationRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2879) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` | \ No newline at end of file +| [getLoanLiquidationRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v2.ts#L2879) | :closed_lock_with_key: | GET | `/api/v2/earn/loan/reduces` | + +# rest-client-v3.ts + +This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [rest-client-v3.ts](/src/rest-client-v3.ts). + +| Function | AUTH | HTTP Method | Endpoint | +| -------- | :------: | :------: | -------- | +| [getServerTime()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L215) | | GET | `/api/v3/public/time` | +| [getInstruments()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L232) | | GET | `/api/v3/market/instruments` | +| [getTickers()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L241) | | GET | `/api/v3/market/tickers` | +| [getOrderBook()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L248) | | GET | `/api/v3/market/orderbook` | +| [getFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L257) | | GET | `/api/v3/market/fills` | +| [getOpenInterest()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L266) | | GET | `/api/v3/market/open-interest` | +| [getCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L275) | | GET | `/api/v3/market/candles` | +| [getHistoryCandles()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L284) | | GET | `/api/v3/market/history-candles` | +| [getCurrentFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L293) | | GET | `/api/v3/market/current-fund-rate` | +| [getHistoryFundingRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L302) | | GET | `/api/v3/market/history-fund-rate` | +| [getRiskReserve()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L311) | | GET | `/api/v3/market/risk-reserve` | +| [getDiscountRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L320) | | GET | `/api/v3/market/discount-rate` | +| [getMarginLoans()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L327) | | GET | `/api/v3/market/margin-loans` | +| [getPositionTier()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L336) | | GET | `/api/v3/market/position-tier` | +| [getContractsOi()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L345) | | GET | `/api/v3/market/oi-limit` | +| [getBalances()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L360) | :closed_lock_with_key: | GET | `/api/v3/account/assets` | +| [getFundingAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L367) | :closed_lock_with_key: | GET | `/api/v3/account/funding-assets` | +| [getAccountSettings()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L376) | :closed_lock_with_key: | GET | `/api/v3/account/settings` | +| [setLeverage()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L383) | :closed_lock_with_key: | POST | `/api/v3/account/set-leverage` | +| [setHoldMode()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L390) | :closed_lock_with_key: | POST | `/api/v3/account/set-hold-mode` | +| [getFinancialRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L399) | :closed_lock_with_key: | GET | `/api/v3/account/financial-records` | +| [getRepayableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L411) | :closed_lock_with_key: | GET | `/api/v3/account/repayable-coins` | +| [getPaymentCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L423) | :closed_lock_with_key: | GET | `/api/v3/account/payment-coins` | +| [submitRepay()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L435) | :closed_lock_with_key: | POST | `/api/v3/account/repay` | +| [getConvertRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L442) | :closed_lock_with_key: | GET | `/api/v3/account/convert-records` | +| [switchDeduct()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L454) | :closed_lock_with_key: | POST | `/api/v3/account/switch-deduct` | +| [getDeductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L461) | :closed_lock_with_key: | GET | `/api/v3/account/deduct-info` | +| [getFeeRate()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L472) | :closed_lock_with_key: | GET | `/api/v3/account/fee-rate` | +| [createSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L490) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub` | +| [freezeSubAccount()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L499) | :closed_lock_with_key: | POST | `/api/v3/user/freeze-sub` | +| [getSubUnifiedAssets()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L508) | :closed_lock_with_key: | GET | `/api/v3/account/sub-unified-assets` | +| [getSubAccountList()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L517) | :closed_lock_with_key: | GET | `/api/v3/user/sub-list` | +| [createSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L530) | :closed_lock_with_key: | POST | `/api/v3/user/create-sub-api` | +| [updateSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L539) | :closed_lock_with_key: | POST | `/api/v3/user/update-sub-api` | +| [deleteSubAccountApiKey()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L548) | :closed_lock_with_key: | POST | `/api/v3/user/delete-sub-api` | +| [getSubAccountApiKeys()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L557) | :closed_lock_with_key: | GET | `/api/v3/user/sub-api-list` | +| [getTransferableCoins()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L576) | :closed_lock_with_key: | GET | `/api/v3/account/transferable-coins` | +| [submitTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L585) | :closed_lock_with_key: | POST | `/api/v3/account/transfer` | +| [subAccountTransfer()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L594) | :closed_lock_with_key: | POST | `/api/v3/account/sub-transfer` | +| [getSubTransferRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L606) | :closed_lock_with_key: | GET | `/api/v3/account/sub-transfer-record` | +| [getDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L624) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-address` | +| [getSubDepositAddress()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L633) | :closed_lock_with_key: | GET | `/api/v3/account/sub-deposit-address` | +| [getDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L642) | :closed_lock_with_key: | GET | `/api/v3/account/deposit-records` | +| [getSubDepositRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L651) | :closed_lock_with_key: | POST | `/api/v3/account/sub-deposit-records` | +| [submitWithdraw()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L666) | :closed_lock_with_key: | POST | `/api/v3/account/withdraw` | +| [getWithdrawRecords()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L675) | :closed_lock_with_key: | GET | `/api/v3/account/withdrawl-records` | +| [submitNewOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L690) | :closed_lock_with_key: | POST | `/api/v3/trade/place-order` | +| [modifyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L699) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-order` | +| [cancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L708) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-order` | +| [placeBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L717) | :closed_lock_with_key: | POST | `/api/v3/trade/place-batch` | +| [batchModifyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L726) | :closed_lock_with_key: | POST | `/api/v3/trade/batch-modify-order` | +| [cancelBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L735) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-batch` | +| [cancelAllOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L744) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-symbol-order` | +| [closeAllPositions()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L753) | :closed_lock_with_key: | POST | `/api/v3/trade/close-positions` | +| [getOrderInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L762) | :closed_lock_with_key: | GET | `/api/v3/trade/order-info` | +| [getUnfilledOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L771) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-orders` | +| [getHistoryOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L783) | :closed_lock_with_key: | GET | `/api/v3/trade/history-orders` | +| [getTradeFills()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L795) | :closed_lock_with_key: | GET | `/api/v3/trade/fills` | +| [getCurrentPosition()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L807) | :closed_lock_with_key: | GET | `/api/v3/position/current-position` | +| [getPositionHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L818) | :closed_lock_with_key: | GET | `/api/v3/position/history-position` | +| [getMaxOpenAvailable()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L830) | :closed_lock_with_key: | POST | `/api/v3/account/max-open-available` | +| [countdownCancelAll()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L839) | :closed_lock_with_key: | POST | `/api/v3/trade/countdown-cancel-all` | +| [getLoanTransfered()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L854) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/transfered` | +| [getLoanSymbols()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L863) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/symbols` | +| [getLoanRiskUnit()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L872) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/risk-unit` | +| [getLoanRepaidHistory()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L883) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/repaid-history` | +| [getLoanProductInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L892) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/product-infos` | +| [getLoanOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L901) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/loan-order` | +| [getLoanLTVConvert()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L910) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ltv-convert` | +| [getLoanMarginCoinInfo()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L919) | :closed_lock_with_key: | GET | `/api/v3/ins-loan/ensure-coins-convert` | +| [bindLoanUid()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L931) | :closed_lock_with_key: | POST | `/api/v3/ins-loan/bind-uid` | +| [submitStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L946) | :closed_lock_with_key: | POST | `/api/v3/trade/place-strategy-order` | +| [modifyStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L955) | :closed_lock_with_key: | POST | `/api/v3/trade/modify-strategy-order` | +| [cancelStrategyOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L964) | :closed_lock_with_key: | POST | `/api/v3/trade/cancel-strategy-order` | +| [getUnfilledStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L973) | :closed_lock_with_key: | GET | `/api/v3/trade/unfilled-strategy-orders` | +| [getHistoryStrategyOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/rest-client-v3.ts#L982) | :closed_lock_with_key: | GET | `/api/v3/trade/history-strategy-orders` | + +# websocket-api-client.ts + +This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [websocket-api-client.ts](/src/websocket-api-client.ts). + +This client provides WebSocket API endpoints which allow for faster interactions with the Bitget API via a WebSocket connection. + +| Function | AUTH | HTTP Method | Endpoint | +| -------- | :------: | :------: | -------- | +| [submitNewOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L78) | | WS | `place-order` | +| [placeBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L97) | | WS | `batch-place` | +| [cancelOrder()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L121) | | WS | `cancel-order` | +| [cancelBatchOrders()](https://github.com/tiagosiebler/bitget-api/blob/master/src/websocket-api-client.ts#L140) | | WS | `batch-cancel` | \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index 3da479b..e3c392e 100644 --- a/examples/README.md +++ b/examples/README.md @@ -7,7 +7,86 @@ ts-node ./examples/rest-spot-public.ts Samples that require authentication can be edited directly but also support environmental variables. E.g. on mac/unix: ``` -API_KEY_COM="yourkeyhere" API_SECRET_COM="yoursecrethere" API_PASS_COM="yourapipasshere" ts-node examples/rest-trade-futures.ts +API_KEY_COM='yourkeyhere' API_SECRET_COM='yoursecrethere' API_PASS_COM='yourapipasshere' ts-node examples/rest-trade-futures.ts ``` They can also be converted to JavaScript by changing the imports to require & removing any type annotations. + +## V3 / Unified Trading Account (UTA) + +These newer examples are for Bitget's V3 APIs and WebSockets. They can be found in the examples/V3 folder. + +Refer to the V3 / UTA API documentation for more information on the V3 APIs: +https://www.bitget.com/api-doc/uta/intro + +These APIs require your account to be permanently upgraded to the Unified Trading Account, if you plan on using the account-level REST APIs and WebSockets. Once upgraded, the V2 APIs are no longer available to you. + +### WebSocket API (WS API) + +The V3/UTA API introduces order placement via a persisted WebSocket connection. This Bitget Node.js, JavaScript & TypeScript SDK supports Bitget's full V3 API offering, including the WebSocket API. + +There are two approaches to placing orders via the Bitget WebSocket APIs + +#### WebsocketAPIClient (recommended) + +This integration looks & feels like a REST API client, but uses WebSockets, via the WebsocketClient's sendWSAPIRequest method. It returns promises and has end to end types. + +This is the recommended approach to easily start sending orders via an automatically persisted WebSocket connection. A simple example is below, but for a more thorough example, check the example here: [./V3/ws-api-client-trade.ts](./V3/ws-api-client-trade.ts) + +```typescript +import { WebsocketAPIClient } from "bitget-api"; +// or if you prefer require: +// const { WebsocketAPIClient } = require("bitget-api"); + +// Make an instance of the WS API Client class with your API keys +const wsClient = new WebsocketAPIClient( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + + // Whether to use the demo trading wss connection + // demoTrading: true, + } +); + +async function start() { + // Start using it like a REST API. All actions are sent via a persisted WebSocket connection. + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.submitNewOrder('spot', { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }); + + console.log(new Date(), 'WS API "submitNewOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "submitNewOrder()": ', e); + } +} + +start().catch(e => console.error("Exception in example: ". e)); +``` + +#### ws.sendWSAPIRequest(wsKey, command, category, operation) + +This is the "raw" integration within the existing WebSocket client. It uses an automatically persisted & authenticated connection to send events through Bitget's WebSocket API. It automatically tracks and connects outgoing requests with incoming responses, and returns promises that resolve/reject when a matching response is received. + +Refer to [V3/ws-api-trade-raw.ts](./V3/ws-api-trade-raw.ts) to see an example. + +Note: The WebsocketClient is built around this. For a more user friendly experience, it is recommended to use the WebsocketClient for WS API requests. It uses this method but has the convenience of behaving similar to a REST API (while all communication automatically happens over a persisted WebSocket connection). + +## V2 + +These examples are for Bitget's V2 APIs and WebSockets. They can be found in the examples/V2 folder. + +Refer to the V2 API documentation for more information on the V2 APIs: +https://www.bitget.com/api-doc/common/intro diff --git a/examples/rest-private-futures.ts b/examples/V2/rest-private-futures.ts similarity index 96% rename from examples/rest-private-futures.ts rename to examples/V2/rest-private-futures.ts index 7079c87..831c60c 100644 --- a/examples/rest-private-futures.ts +++ b/examples/V2/rest-private-futures.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/rest-private-spot.ts b/examples/V2/rest-private-spot.ts similarity index 95% rename from examples/rest-private-spot.ts rename to examples/V2/rest-private-spot.ts index 50465d6..7aab4d9 100644 --- a/examples/rest-private-spot.ts +++ b/examples/V2/rest-private-spot.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/rest-public-futures.ts b/examples/V2/rest-public-futures.ts similarity index 94% rename from examples/rest-public-futures.ts rename to examples/V2/rest-public-futures.ts index 5c6c02d..d6e9724 100644 --- a/examples/rest-public-futures.ts +++ b/examples/V2/rest-public-futures.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/rest-public-spot.ts b/examples/V2/rest-public-spot.ts similarity index 89% rename from examples/rest-public-spot.ts rename to examples/V2/rest-public-spot.ts index 5e282eb..6b2f52d 100644 --- a/examples/rest-public-spot.ts +++ b/examples/V2/rest-public-spot.ts @@ -1,4 +1,4 @@ -import { RestClientV2 } from '../src/index'; +import { RestClientV2 } from '../../src/index'; // or // import { RestClientV2 } from 'bitget-api'; diff --git a/examples/rest-trade-futures.ts b/examples/V2/rest-trade-futures.ts similarity index 99% rename from examples/rest-trade-futures.ts rename to examples/V2/rest-trade-futures.ts index 0553ff9..843e017 100644 --- a/examples/rest-trade-futures.ts +++ b/examples/V2/rest-trade-futures.ts @@ -2,7 +2,7 @@ import { FuturesPlaceOrderRequestV2, RestClientV2, WebsocketClientV2, -} from '../src'; +} from '../../src'; // or // import { FuturesPlaceOrderRequestV2, RestClientV2, WebsocketClientV2 } from '../src'; diff --git a/examples/rest-trade-spot.ts b/examples/V2/rest-trade-spot.ts similarity index 99% rename from examples/rest-trade-spot.ts rename to examples/V2/rest-trade-spot.ts index 555a773..feda562 100644 --- a/examples/rest-trade-spot.ts +++ b/examples/V2/rest-trade-spot.ts @@ -2,7 +2,7 @@ import { RestClientV2, SpotOrderRequestV2, WebsocketClientV2, -} from '../src/index'; +} from '../../src/index'; // import { RestClientV2, WebsocketClient } from '../src/index'; diff --git a/examples/V2/ws-demo-trading.ts b/examples/V2/ws-demo-trading.ts new file mode 100644 index 0000000..aa70424 --- /dev/null +++ b/examples/V2/ws-demo-trading.ts @@ -0,0 +1,65 @@ +import { DefaultLogger, WebsocketClientV2 } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketClientV2( + { + // restOptions: { + // optionally provide rest options, e.g. to pass through a proxy + // }, + + // Set demoTrading to true, to route all connections to the demo trading wss URLs: + demoTrading: true, + + // If using private topics, make sure to include API keys + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + }, + logger, + ); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + /** + * Public events + */ + + const symbol = 'BTCUSDT'; + wsClient.subscribeTopic('SPOT', 'ticker', symbol); + + wsClient.subscribeTopic('USDC-FUTURES', 'account'); +})(); diff --git a/examples/ws-private.ts b/examples/V2/ws-private.ts similarity index 69% rename from examples/ws-private.ts rename to examples/V2/ws-private.ts index f610e48..98fd433 100644 --- a/examples/ws-private.ts +++ b/examples/V2/ws-private.ts @@ -1,4 +1,4 @@ -import { DefaultLogger, WebsocketClientV2 } from '../src'; +import { DefaultLogger, WebsocketClientV2 } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; @@ -6,7 +6,7 @@ import { DefaultLogger, WebsocketClientV2 } from '../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; const API_KEY = process.env.API_KEY_COM; @@ -62,14 +62,15 @@ import { DefaultLogger, WebsocketClientV2 } from '../src'; // spot private // : account updates - // wsClient.subscribeTopic('SPOT', 'account'); + wsClient.subscribeTopic('SPOT', 'account'); // : order updates (note: symbol is required) // wsClient.subscribeTopic('SPOT', 'orders', 'BTCUSDT'); // futures private // : account updates - // wsClient.subscribeTopic('USDT-FUTURES', 'account'); + wsClient.subscribeTopic('USDT-FUTURES', 'account'); + wsClient.subscribeTopic('USDC-FUTURES', 'account'); // : position updates // wsClient.subscribeTopic('USDT-FUTURES', 'positions'); @@ -78,5 +79,27 @@ import { DefaultLogger, WebsocketClientV2 } from '../src'; // wsClient.subscribeTopic('USDT-FUTURES', 'orders'); // : plan order updates - wsClient.subscribeTopic('USDT-FUTURES', 'orders-algo'); + // wsClient.subscribeTopic('USDT-FUTURES', 'orders-algo'); + + // wsClient + // .getWsStore() + // .getKeys() + // .forEach((wsKey) => { + // const state = wsClient.getWsStore().get(wsKey); + // console.log(`${wsKey} state: `, state.subscribedTopics.values()); + // }); + + // setTimeout(() => { + // wsClient.unsubscribeTopic('USDT-FUTURES', 'account'); + // }, 1000 * 2); + + // setTimeout(() => { + // wsClient + // .getWsStore() + // .getKeys() + // .forEach((wsKey) => { + // const state = wsClient.getWsStore().get(wsKey); + // console.log(`${wsKey} state: `, state.subscribedTopics.values()); + // }); + // }, 1000 * 5); })(); diff --git a/examples/ws-public.ts b/examples/V2/ws-public.ts similarity index 96% rename from examples/ws-public.ts rename to examples/V2/ws-public.ts index 2a0df55..f68ac6d 100644 --- a/examples/ws-public.ts +++ b/examples/V2/ws-public.ts @@ -1,4 +1,4 @@ -import { DefaultLogger, WebsocketClientV2, WS_KEY_MAP } from '../src'; +import { DefaultLogger, WebsocketClientV2, WS_KEY_MAP } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; @@ -6,7 +6,7 @@ import { DefaultLogger, WebsocketClientV2, WS_KEY_MAP } from '../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; const wsClient = new WebsocketClientV2( diff --git a/examples/V3/rest-private.ts b/examples/V3/rest-private.ts new file mode 100644 index 0000000..79bcdf3 --- /dev/null +++ b/examples/V3/rest-private.ts @@ -0,0 +1,32 @@ +import { RestClientV3 } from '../../src/index'; + +// or +// import { RestClientV3 } from 'bitget-api'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; + +// If running from CLI in unix, you can pass env vars as such: +// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-private-futures.ts + +// note the single quotes, preventing special characters such as $ from being incorrectly passed + +const client = new RestClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +/** This is a simple script wrapped in a immediately invoked function expression, designed to check account assets for futures trading */ +(async () => { + try { + console.log(await client.getBalances()); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-public-UTA-futures.ts b/examples/V3/rest-public-UTA-futures.ts new file mode 100644 index 0000000..e7a03d3 --- /dev/null +++ b/examples/V3/rest-public-UTA-futures.ts @@ -0,0 +1,24 @@ +import { RestClientV3 } from '../../src/index'; + +// or +// import { RestClientV3 } from 'bitget-api'; + +const restClient = new RestClientV3(); + +const symbol = 'BTCUSDT'; + +(async () => { + try { + const response = await restClient.getCandles({ + symbol, + category: 'USDT-FUTURES', + interval: '1m', + }); + + console.table(response.data); + + console.log('getCandles returned ' + response.data.length + ' candles'); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-public-UTA-spot.ts b/examples/V3/rest-public-UTA-spot.ts new file mode 100644 index 0000000..9f01ff9 --- /dev/null +++ b/examples/V3/rest-public-UTA-spot.ts @@ -0,0 +1,21 @@ +import { RestClientV3 } from '../../src/index'; + +// or +// import { RestClientV3 } from 'bitget-api'; + +const restClient = new RestClientV3(); + +(async () => { + try { + const response = await restClient.getCandles({ + symbol: 'BTCUSDT', + category: 'SPOT', + interval: '1m', + }); + + console.table(response.data); + console.log('getCandles: ', response.data.length); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-trade-UTA-futures.ts b/examples/V3/rest-trade-UTA-futures.ts new file mode 100644 index 0000000..529092f --- /dev/null +++ b/examples/V3/rest-trade-UTA-futures.ts @@ -0,0 +1,185 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + PlaceOrderRequestV3, + RestClientV3, + WebsocketClientV3, +} from '../../src'; + +// or +// import { PlaceOrderRequestV3, RestClientV3, WebsocketClientV3 } from '../src'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; + +// If running from CLI in unix, you can pass env vars as such: +// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-futures.ts + +// note the single quotes, preventing special characters such as $ from being incorrectly passed + +const client = new RestClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +const wsClient = new WebsocketClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, +}); + +function logWSEvent(type, data) { + console.log(new Date(), `WS ${type} event: `, data); +} + +// simple sleep function +function promiseSleep(milliseconds) { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +} + +/** + * This is a simple script wrapped in a immediately invoked function expression (to execute the below workflow immediately). + * + * It is designed to: + * - open a private websocket channel to log account events + * - check for any available USDT balance in the account + * - immediately open a minimum sized long position on BTCUSDT + * - check active positions + * - immediately send closing orders for any active futures positions + * - check positions again + * + */ +(async () => { + try { + // Add event listeners to log websocket events on account + wsClient.on('update', (data) => logWSEvent('update', data)); + + wsClient.on('open', (data) => logWSEvent('open', data)); + wsClient.on('response', (data) => logWSEvent('response', data)); + wsClient.on('reconnect', (data) => logWSEvent('reconnect', data)); + wsClient.on('reconnected', (data) => logWSEvent('reconnected', data)); + wsClient.on('authenticated', (data) => logWSEvent('authenticated', data)); + wsClient.on('exception', (data) => logWSEvent('exception', data)); + + // Subscribe to private topics for UTA account + wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // Subscribe to position updates + wsClient.subscribe( + { + topic: 'position', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // Subscribe to order updates + wsClient.subscribe( + { + topic: 'order', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting) + await promiseSleep(2.5 * 1000); + + const symbol = 'BTCUSDT'; + + const balanceResult = await client.getBalances(); + const accountBalance = balanceResult.data; + + const usdtAsset = accountBalance.assets?.find( + (asset) => asset.coin === 'USDT', + ); + const usdtAmount = usdtAsset ? Number(usdtAsset.available) : 0; + + console.log('USDT balance: ', usdtAmount); + + if (!usdtAmount) { + console.error('No USDT to trade'); + return; + } + + const symbolRulesResult = await client.getInstruments({ + category: 'USDT-FUTURES', + symbol: symbol, + }); + const bitcoinUSDFuturesRule = symbolRulesResult.data.find( + (row) => row.symbol === symbol, + ); + + console.log('symbol rules: ', bitcoinUSDFuturesRule); + if (!bitcoinUSDFuturesRule) { + console.error('Failed to get trading rules for ' + symbol); + return; + } + + const order: PlaceOrderRequestV3 = { + category: 'USDT-FUTURES', + orderType: 'market', + side: 'buy', + qty: bitcoinUSDFuturesRule.minOrderQty, + symbol: symbol, + } as const; + + console.log('placing order: ', order); + + const result = await client.submitNewOrder(order); + + console.log('order result: ', result); + + const positionsResult = await client.getCurrentPosition({ + category: 'USDT-FUTURES', + }); + const positionsToClose = positionsResult.data.list.filter( + (pos) => pos.total !== '0', + ); + + console.log('open positions to close: ', positionsToClose); + + // Loop through any active positions and send a closing market order on each position + for (const position of positionsToClose) { + const closingSide = position.posSide === 'long' ? 'sell' : 'buy'; + const closingOrder: PlaceOrderRequestV3 = { + category: 'USDT-FUTURES', + orderType: 'market', + side: closingSide, + qty: position.total, + symbol: position.symbol, + }; + + console.log('closing position with market order: ', closingOrder); + + const result = await client.submitNewOrder(closingOrder); + console.log('position closing order result: ', result); + } + + console.log( + 'positions after closing all: ', + await client.getCurrentPosition({ + category: 'USDT-FUTURES', + }), + ); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/rest-trade-UTA-spot.ts b/examples/V3/rest-trade-UTA-spot.ts new file mode 100644 index 0000000..8096af3 --- /dev/null +++ b/examples/V3/rest-trade-UTA-spot.ts @@ -0,0 +1,129 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { + PlaceOrderRequestV3, + RestClientV3, + WebsocketClientV3, +} from '../../src/index'; + +// import { RestClientV3, WebsocketClientV3 } from '../src/index'; + +// read from environmental variables +const API_KEY = process.env.API_KEY_COM; +const API_SECRET = process.env.API_SECRET_COM; +const API_PASS = process.env.API_PASS_COM; + +// If running from CLI in unix, you can pass env vars as such: +// API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/V3/rest-trade-spot.ts + +// note the single quotes, preventing special characters such as $ from being incorrectly passed + +const client = new RestClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + // apiKey: 'apiKeyHere', + // apiSecret: 'apiSecretHere', + // apiPass: 'apiPassHere', +}); + +const wsClient = new WebsocketClientV3({ + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, +}); + +function logWSEvent(type, data) { + console.log(new Date(), `WS ${type} event: `, data); +} + +// simple sleep function +function promiseSleep(milliseconds) { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +} + +/** This is a simple script wrapped in a immediately invoked function expression, designed to check for any available BTC balance and immediately sell the full amount for USDT */ +(async () => { + try { + // Add event listeners to log websocket events on account + wsClient.on('update', (data) => logWSEvent('update', data)); + wsClient.on('open', (data) => logWSEvent('open', data)); + wsClient.on('response', (data) => logWSEvent('response', data)); + wsClient.on('reconnect', (data) => logWSEvent('reconnect', data)); + wsClient.on('reconnected', (data) => logWSEvent('reconnected', data)); + wsClient.on('authenticated', (data) => logWSEvent('authenticated', data)); + wsClient.on('exception', (data) => logWSEvent('exception', data)); + + // Subscribe to private account topics + // Account updates for UTA (unified trading account) + wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // Order updates for spot + wsClient.subscribe( + { + topic: 'order', + payload: { + instType: 'UTA', + }, + }, + 'v3Private', + ); + + // wait briefly for ws to be ready (could also use the response or authenticated events, to make sure topics are subscribed to before starting) + await promiseSleep(2.5 * 1000); + + const balanceResult = await client.getBalances(); + const allBalances = balanceResult.data; + + const balanceBTC = allBalances.assets?.find( + (bal) => bal.coin === 'BTC' || bal.coin === 'btc', + ); + const btcAmount = + Number(allBalances.usdtEquity) > 0 ? Number(balanceBTC.available) : 0; + console.log('balance: ', JSON.stringify(allBalances, null, 2)); + console.log('BTC balance result: ', balanceBTC); + + if (!btcAmount) { + console.error('No BTC to trade'); + return; + } + + console.log(`BTC available: ${btcAmount}`); + const symbol = 'BTCUSDT'; + + const symbolsResult = await client.getInstruments({ + category: 'SPOT', + symbol: symbol, + }); + const btcRules = symbolsResult.data.find((rule) => rule.symbol === symbol); + console.log('btc trading rules: ', btcRules); + if (!btcRules) { + return console.log('no rules found for trading ' + symbol); + } + + const quantity = btcRules.minOrderQty; + + const order: PlaceOrderRequestV3 = { + symbol: symbol, + side: 'sell', + orderType: 'market', + category: 'SPOT', + qty: quantity, + } as const; + + console.log('submitting order: ', order); + + const sellResult = await client.submitNewOrder(order); + + console.log('sell result: ', sellResult); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/V3/ws-api-client-trade.ts b/examples/V3/ws-api-client-trade.ts new file mode 100644 index 0000000..b280b24 --- /dev/null +++ b/examples/V3/ws-api-client-trade.ts @@ -0,0 +1,258 @@ +import { DefaultLogger } from '../../src'; +import { WebsocketAPIClient } from '../../src/websocket-api-client'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketAPIClient } from 'bitget-api'; + +// function attachEventHandlers( +// wsClient: TWSClient, +// ): void { +// wsClient.on('update', (data) => { +// console.log('raw message received ', JSON.stringify(data)); +// }); +// wsClient.on('open', (data) => { +// console.log('ws connected', data.wsKey); +// }); +// wsClient.on('reconnect', ({ wsKey }) => { +// console.log('ws automatically reconnecting.... ', wsKey); +// }); +// wsClient.on('reconnected', (data) => { +// console.log('ws has reconnected ', data?.wsKey); +// }); +// wsClient.on('authenticated', (data) => { +// console.log('ws has authenticated ', data?.wsKey); +// }); +// } + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketAPIClient( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + + // Whether to use the demo trading wss connection + // demoTrading: true, + + // If you want your own event handlers instead of the default ones with logs, + // disable this setting and see the `attachEventHandlers` example below: + // attachEventListeners: false + }, + logger, // Optional: inject a custom logger + ); + + // Optional, see above "attachEventListeners". Attach basic event handlers, so nothing is left unhandled + // attachEventHandlers(wsClient.getWSClient()); + + // Optional: prepare the WebSocket API connection in advance. + // This happens automatically but you can do this early before making any API calls, to prevent delays from a cold start. + await wsClient.getWSClient().connectWSAPI(); + + /** + * Bitget's WebSocket API be used like a REST API, through this SDK's WebsocketAPIClient. The WebsocketAPIClient is a utility class wrapped around WebsocketClientV3's sendWSAPIRequest() capabilities. + * + * Each request sent via the WebsocketAPIClient will automatically: + * - route via the active WS API connection + * - return a Promise, which automatically resolves/rejects when a matching response is received + * + * Note: this requires V3/UTA API keys! + */ + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.submitNewOrder('spot', { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }); + /** + const res = { + "event": "trade", + "id": "1750034396082", + "category": "spot", + "topic": "place-order", + "args": [ + { + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx", + "cTime": "1750034397008" + } + ], + "code": "0", + "msg": "success", + "ts": "1750034397076" + }; + */ + + console.log(new Date(), 'WS API "submitNewOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "submitNewOrder()": ', e); + } + + /** + * Batch Place Order Channel + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + */ + + try { + /** + * Note: batch place will never reject the request, even if all orders were rejected. Check the "code" and "msg" properties for individual orders in the response, to detect batch place errors. + */ + const res = await wsClient.placeBatchOrders('spot', [ + { + clientOid: 'xxxxxxxx1', + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + { + clientOid: 'xxxxxxxx2', + orderType: 'limit', + price: '100', + qty: '0.15', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + ]); + + /** + const res = { + "event": "trade", + "id": "1750035029506", + "category": "spot", + "topic": "batch-place", + "args": [ + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + }, + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750035029925" + } + */ + + console.log(new Date(), 'WS API "placeBatchOrders()" result: ', res); + } catch (e) { + console.error( + new Date(), + 'Exception with WS API "placeBatchOrders()": ', + e, + ); + } + + /** + * Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + */ + + try { + const res = await wsClient.cancelOrder('spot', { + clientOid: 'xxxxxxxx1', + }); + + /** + const res = { + "event": "trade", + "id": "1750034870205", + "topic": "cancel-order", + "args": [ + { + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750034870597" + } + */ + + console.log(new Date(), 'WS API "cancelOrder()" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "cancelOrder()": ', e); + } + + /** + * Batch Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + */ + + try { + const res = await wsClient.cancelBatchOrders('spot', [ + { + clientOid: 'xxxxxxxx1', + }, + { + orderId: '123123123', + }, + ]); + + /** + const res = { + "event": "trade", + "id": "bb553cc0-c1fa-454e-956d-c96c8d715760", + "topic": "batch-cancel", + "args": [ + { + "code": "0", + "msg": "Success", + "orderId": "xxxxxxxxxxxxx" + }, + { + "code": "25204", + "msg": "Order does not exist", + "orderId": "xxxxxxxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1751980011084" + } + */ + + console.log(new Date(), 'WS API "cancelBatchOrders()" result: ', res); + } catch (e) { + console.error( + new Date(), + 'Exception with WS API "cancelBatchOrders()": ', + e, + ); + } + + console.log(new Date(), 'Reached end of example.'); +})(); diff --git a/examples/V3/ws-api-trade-raw.ts b/examples/V3/ws-api-trade-raw.ts new file mode 100644 index 0000000..2ec816b --- /dev/null +++ b/examples/V3/ws-api-trade-raw.ts @@ -0,0 +1,259 @@ +import { DefaultLogger, WebsocketClientV3, WS_KEY_MAP } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV3 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketClientV3( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + }, + logger, + ); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + /** + * Bitget's WebSocket API can be used via the sendWSAPIRequest() method. + * + * Use the `WS_KEY_MAP.v3Private` connection key for any requests. + * + * Note: this requires V3/UTA API keys! + * Note: for a better user experience, it is recommended to use the WebsocketAPIClient. + */ + + // Use the V3 private wss connection URL + const wsConnectionKey = WS_KEY_MAP.v3Private; + + /** + * Place Order + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + */ + try { + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'place-order', + 'spot', + { + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + ); + + /** + const res = { + "event": "trade", + "id": "1750034396082", + "category": "spot", + "topic": "place-order", + "args": [ + { + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx", + "cTime": "1750034397008" + } + ], + "code": "0", + "msg": "success", + "ts": "1750034397076" + }; + */ + + console.log(new Date(), 'WS API "place-order" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "place-order": ', e); + } + + /** + * Batch Place Order Channel + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + */ + + try { + /** + * Note: batch place will never reject the request, even if all orders were rejected. Check the "code" and "msg" properties for individual orders in the response, to detect batch place errors. + */ + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'batch-place', + 'spot', + [ + { + clientOid: 'xxxxxxxx1', + orderType: 'limit', + price: '100', + qty: '0.1', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + { + clientOid: 'xxxxxxxx2', + orderType: 'limit', + price: '100', + qty: '0.15', + side: 'buy', + symbol: 'BTCUSDT', + timeInForce: 'gtc', + }, + ], + ); + + /** + const res = { + "event": "trade", + "id": "1750035029506", + "category": "spot", + "topic": "batch-place", + "args": [ + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + }, + { + "code": "0", + "msg": "Success", + "symbol": "BTCUSDT", + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750035029925" + } + */ + + console.log(new Date(), 'WS API "batch-place" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "batch-place": ', e); + } + + /** + * Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + */ + + try { + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'cancel-order', + 'spot', + { + clientOid: 'xxxxxxxx1', + }, + ); + + /** + const res = { + "event": "trade", + "id": "1750034870205", + "topic": "cancel-order", + "args": [ + { + "orderId": "xxxxxxxx", + "clientOid": "xxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1750034870597" + } + */ + + console.log(new Date(), 'WS API "cancel-order" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "cancel-order": ', e); + } + + /** + * Batch Cancel Order + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + */ + + try { + const res = await wsClient.sendWSAPIRequest( + wsConnectionKey, + 'batch-cancel', + 'spot', + [ + { + clientOid: 'xxxxxxxx1', + }, + { + orderId: '123123123', + }, + ], + ); + + /** + const res = { + "event": "trade", + "id": "bb553cc0-c1fa-454e-956d-c96c8d715760", + "topic": "batch-cancel", + "args": [ + { + "code": "0", + "msg": "Success", + "orderId": "xxxxxxxxxxxxx" + }, + { + "code": "25204", + "msg": "Order does not exist", + "orderId": "xxxxxxxxxxxxx" + } + ], + "code": "0", + "msg": "Success", + "ts": "1751980011084" + } + */ + + console.log(new Date(), 'WS API "batch-cancel" result: ', res); + } catch (e) { + console.error(new Date(), 'Exception with WS API "batch-cancel": ', e); + } + + console.log(new Date(), 'Reached end of example.'); +})(); diff --git a/examples/V3/ws-private.ts b/examples/V3/ws-private.ts new file mode 100644 index 0000000..0b9b239 --- /dev/null +++ b/examples/V3/ws-private.ts @@ -0,0 +1,102 @@ +import { DefaultLogger, WebsocketClientV3, WS_KEY_MAP } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const API_KEY = process.env.API_KEY_COM; + const API_SECRET = process.env.API_SECRET_COM; + const API_PASS = process.env.API_PASS_COM; + + // If running from CLI in unix, you can pass env vars as such: + // API_KEY_COM='lkm12n3-2ba3-1mxf-fn13-lkm12n3a' API_SECRET_COM='035B2B9637E1BDFFEE2646BFBDDB8CE4' API_PASSPHRASE_COM='ComplexPa$$!23$5^' ts-node examples/ws-private.ts + + const wsClient = new WebsocketClientV3( + { + apiKey: API_KEY, + apiSecret: API_SECRET, + apiPass: API_PASS, + }, + logger, + ); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + // You can subscribe to one topic at a time + wsClient.subscribe( + { + topic: 'account', + payload: { + instType: 'UTA', // Note: all account events go on the UTA instType + }, + }, + WS_KEY_MAP.v3Private, // This parameter points to private or public + ); + + // Note: all account events go on the UTA instType + const ACCOUNT_INST_TYPE = 'UTA'; + const ACCOUNT_WS_KEY = WS_KEY_MAP.v3Private; + + // Or multiple at once: + wsClient.subscribe( + [ + { + topic: 'account', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'position', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'fill', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + { + topic: 'order', + payload: { + instType: ACCOUNT_INST_TYPE, + }, + }, + ], + ACCOUNT_WS_KEY, + ); + + // Topics are tracked per websocket type + // The below example will pull a list of subscribed topics on that connection (e.g. all private topics), after a 5 second delay: + setTimeout(() => { + const privateTopics = wsClient.getWsStore().getTopics(WS_KEY_MAP.v3Private); + + console.log('private topics currently in state: ', privateTopics); + }, 5 * 1000); +})(); diff --git a/examples/V3/ws-public.ts b/examples/V3/ws-public.ts new file mode 100644 index 0000000..d8ba341 --- /dev/null +++ b/examples/V3/ws-public.ts @@ -0,0 +1,100 @@ +import { DefaultLogger, WebsocketClientV3, WS_KEY_MAP } from '../../src'; + +// or +// import { DefaultLogger, WS_KEY_MAP, WebsocketClientV2 } from 'bitget-api'; + +(async () => { + const logger = { + ...DefaultLogger, + trace: (...params) => console.log('trace', ...params), + }; + + const wsClient = new WebsocketClientV3({}, logger); + + wsClient.on('update', (data) => { + console.log('WS raw message received ', data); + // console.log('WS raw message received ', JSON.stringify(data, null, 2)); + }); + + wsClient.on('open', (data) => { + console.log('WS connection opened:', data.wsKey); + }); + wsClient.on('response', (data) => { + console.log('WS response: ', JSON.stringify(data, null, 2)); + }); + wsClient.on('reconnect', ({ wsKey }) => { + console.log('WS automatically reconnecting.... ', wsKey); + }); + wsClient.on('reconnected', (data) => { + console.log('WS reconnected ', data?.wsKey); + }); + wsClient.on('exception', (data) => { + console.log('WS error', data); + }); + + /** + * Public events + */ + + // You can subscribe to one topic at a time + wsClient.subscribe( + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'BTCUSDT', + }, + }, + WS_KEY_MAP.v3Public, // This parameter points to private or public + ); + + // Or multiple at once: + wsClient.subscribe( + [ + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'ETHUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'spot', + symbol: 'XRPUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + { + topic: 'ticker', + payload: { + instType: 'usdt-futures', + symbol: 'BTCUSDT', + }, + }, + ], + WS_KEY_MAP.v3Public, + ); + + // Topics are tracked per websocket type + // The below example will pull a list of subscribed topics on that connection (e.g. all public topics), after a 5 second delay: + setTimeout(() => { + const publicTopics = wsClient.getWsStore().getTopics(WS_KEY_MAP.v3Public); + + console.log('public topics: ', publicTopics); + }, 5 * 1000); +})(); diff --git a/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js index 99a29d3..7d4269a 100644 --- a/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js +++ b/examples/apidoc/RestClientV2/batchCreateVirtualSubaccountAndAPIKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/batch-create-subaccount-and-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/batch-create-subaccount-and-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/borrowLoan.js b/examples/apidoc/RestClientV2/borrowLoan.js index 6dd6dc9..a08dd40 100644 --- a/examples/apidoc/RestClientV2/borrowLoan.js +++ b/examples/apidoc/RestClientV2/borrowLoan.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/borrow - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/borrow +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js index 5b4f7e8..9db3669 100644 --- a/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js +++ b/examples/apidoc/RestClientV2/cancelSpotFollowerOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/stop-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/stop-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js index 5e69e5b..ffa1a99 100644 --- a/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js +++ b/examples/apidoc/RestClientV2/closeFuturesFollowerPositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/close-positions - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/close-positions +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js index 61cf75b..05be41c 100644 --- a/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js +++ b/examples/apidoc/RestClientV2/closeFuturesTraderOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-close-positions - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-close-positions +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/convert.js b/examples/apidoc/RestClientV2/convert.js index 4875fdb..7d5bdcd 100644 --- a/examples/apidoc/RestClientV2/convert.js +++ b/examples/apidoc/RestClientV2/convert.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/trade - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/trade +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/convertBGB.js b/examples/apidoc/RestClientV2/convertBGB.js index 6bc4662..522e4da 100644 --- a/examples/apidoc/RestClientV2/convertBGB.js +++ b/examples/apidoc/RestClientV2/convertBGB.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/bgb-convert - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/bgb-convert +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createSubaccount.js b/examples/apidoc/RestClientV2/createSubaccount.js index e3ed3e5..c0ce3e5 100644 --- a/examples/apidoc/RestClientV2/createSubaccount.js +++ b/examples/apidoc/RestClientV2/createSubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/create-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/create-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createSubaccountApiKey.js b/examples/apidoc/RestClientV2/createSubaccountApiKey.js index 7210a91..c4e31af 100644 --- a/examples/apidoc/RestClientV2/createSubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/createSubaccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/manage/create-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/manage/create-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js index f0043a2..3522061 100644 --- a/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js +++ b/examples/apidoc/RestClientV2/createSubaccountDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-address - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-address +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccount.js b/examples/apidoc/RestClientV2/createVirtualSubaccount.js index 8ef4b97..3c4acbb 100644 --- a/examples/apidoc/RestClientV2/createVirtualSubaccount.js +++ b/examples/apidoc/RestClientV2/createVirtualSubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/create-virtual-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/create-virtual-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js index 419e7f4..56835fb 100644 --- a/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js +++ b/examples/apidoc/RestClientV2/createVirtualSubaccountAPIKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/create-virtual-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/create-virtual-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/earnRedeemSavings.js b/examples/apidoc/RestClientV2/earnRedeemSavings.js index c84d16d..1ddcf7c 100644 --- a/examples/apidoc/RestClientV2/earnRedeemSavings.js +++ b/examples/apidoc/RestClientV2/earnRedeemSavings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/redeem - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/redeem +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/earnSubscribeSavings.js b/examples/apidoc/RestClientV2/earnSubscribeSavings.js index 5933bde..60f9d58 100644 --- a/examples/apidoc/RestClientV2/earnSubscribeSavings.js +++ b/examples/apidoc/RestClientV2/earnSubscribeSavings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/subscribe - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/subscribe +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js index cbe6234..36348a4 100644 --- a/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/futuresBatchCancelOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/batch-cancel-orders - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/batch-cancel-orders +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js index 679209c..88624cb 100644 --- a/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/futuresBatchSubmitOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/batch-place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/batch-place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresCancelAllOrders.js b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js index 2e547ff..c00ec44 100644 --- a/examples/apidoc/RestClientV2/futuresCancelAllOrders.js +++ b/examples/apidoc/RestClientV2/futuresCancelAllOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/cancel-all-orders - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/cancel-all-orders +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresCancelOrder.js b/examples/apidoc/RestClientV2/futuresCancelOrder.js index f4209c8..32350b7 100644 --- a/examples/apidoc/RestClientV2/futuresCancelOrder.js +++ b/examples/apidoc/RestClientV2/futuresCancelOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js index 12927ea..6fc9a55 100644 --- a/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresCancelPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/cancel-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/cancel-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresFlashClosePositions.js b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js index 23af149..5acd7c9 100644 --- a/examples/apidoc/RestClientV2/futuresFlashClosePositions.js +++ b/examples/apidoc/RestClientV2/futuresFlashClosePositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/close-positions - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/close-positions +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresModifyOrder.js b/examples/apidoc/RestClientV2/futuresModifyOrder.js index 63abe6b..3738901 100644 --- a/examples/apidoc/RestClientV2/futuresModifyOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/modify-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/modify-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js index dc3752e..552c761 100644 --- a/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/modify-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/modify-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js index fb646c3..a45b5a5 100644 --- a/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js +++ b/examples/apidoc/RestClientV2/futuresModifyTPSLPOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/modify-tpsl-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/modify-tpsl-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitOrder.js b/examples/apidoc/RestClientV2/futuresSubmitOrder.js index 87d7841..7d289fe 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js index be966c8..4ed20e3 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/place-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/place-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitReversal.js b/examples/apidoc/RestClientV2/futuresSubmitReversal.js index 7d76422..363e15c 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitReversal.js +++ b/examples/apidoc/RestClientV2/futuresSubmitReversal.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/click-backhand - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/click-backhand +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js index 28cb1a9..b3552bd 100644 --- a/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js +++ b/examples/apidoc/RestClientV2/futuresSubmitTPSLOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/place-tpsl-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/place-tpsl-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getAnnouncements.js b/examples/apidoc/RestClientV2/getAnnouncements.js index 012d9ef..049f4db 100644 --- a/examples/apidoc/RestClientV2/getAnnouncements.js +++ b/examples/apidoc/RestClientV2/getAnnouncements.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/public/annoucements - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/public/annoucements +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBalances.js b/examples/apidoc/RestClientV2/getBalances.js index 1d4d541..1545ef3 100644 --- a/examples/apidoc/RestClientV2/getBalances.js +++ b/examples/apidoc/RestClientV2/getBalances.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/account/all-account-balance - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/account/all-account-balance +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBotAccount.js b/examples/apidoc/RestClientV2/getBotAccount.js index 1148068..a778fb6 100644 --- a/examples/apidoc/RestClientV2/getBotAccount.js +++ b/examples/apidoc/RestClientV2/getBotAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/account/bot-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/account/bot-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerInfo.js b/examples/apidoc/RestClientV2/getBrokerInfo.js index eed0166..9ddbb5e 100644 --- a/examples/apidoc/RestClientV2/getBrokerInfo.js +++ b/examples/apidoc/RestClientV2/getBrokerInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerTraders.js b/examples/apidoc/RestClientV2/getBrokerTraders.js index c061bec..0f111fc 100644 --- a/examples/apidoc/RestClientV2/getBrokerTraders.js +++ b/examples/apidoc/RestClientV2/getBrokerTraders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-broker/query-traders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-broker/query-traders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js index 76113d3..c60c99d 100644 --- a/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js +++ b/examples/apidoc/RestClientV2/getBrokerTradersHistoricalOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-broker/query-history-traces - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-broker/query-history-traces +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js index 58d5a2d..3386d0d 100644 --- a/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js +++ b/examples/apidoc/RestClientV2/getBrokerTradersPendingOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-broker/query-current-traces - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-broker/query-current-traces +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertBGBCoins.js b/examples/apidoc/RestClientV2/getConvertBGBCoins.js index 9b9c363..d381266 100644 --- a/examples/apidoc/RestClientV2/getConvertBGBCoins.js +++ b/examples/apidoc/RestClientV2/getConvertBGBCoins.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/bgb-convert-coin-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/bgb-convert-coin-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertBGBHistory.js b/examples/apidoc/RestClientV2/getConvertBGBHistory.js index acd463e..6a63f73 100644 --- a/examples/apidoc/RestClientV2/getConvertBGBHistory.js +++ b/examples/apidoc/RestClientV2/getConvertBGBHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/bgb-convert-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/bgb-convert-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertCoins.js b/examples/apidoc/RestClientV2/getConvertCoins.js index c1771ec..9c82857 100644 --- a/examples/apidoc/RestClientV2/getConvertCoins.js +++ b/examples/apidoc/RestClientV2/getConvertCoins.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/currencies - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/currencies +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertHistory.js b/examples/apidoc/RestClientV2/getConvertHistory.js index 0767c9b..de401b3 100644 --- a/examples/apidoc/RestClientV2/getConvertHistory.js +++ b/examples/apidoc/RestClientV2/getConvertHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/convert-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/convert-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getConvertQuotedPrice.js b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js index d4436f8..e5282e6 100644 --- a/examples/apidoc/RestClientV2/getConvertQuotedPrice.js +++ b/examples/apidoc/RestClientV2/getConvertQuotedPrice.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/convert/quoted-price - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/convert/quoted-price +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnAccount.js b/examples/apidoc/RestClientV2/getEarnAccount.js index e79860e..b5eef4e 100644 --- a/examples/apidoc/RestClientV2/getEarnAccount.js +++ b/examples/apidoc/RestClientV2/getEarnAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/account/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/account/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAccount.js b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js index 97b1c24..e8163dd 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsAccount.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/account - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/account +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsAssets.js b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js index d11df41..b71432b 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsAssets.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsProducts.js b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js index 4754841..bfd420a 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsProducts.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsProducts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/product - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/product +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRecords.js b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js index 38d916f..80b03c8 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsRecords.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js index 8f40ebe..c1f2d06 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsRedemptionResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/redeem-result - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/redeem-result +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js index 023d131..98de670 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscription.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/subscribe-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/subscribe-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js index 2897eba..ae43c61 100644 --- a/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js +++ b/examples/apidoc/RestClientV2/getEarnSavingsSubscriptionResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/savings/subscribe-result - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/savings/subscribe-result +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFundingAssets.js b/examples/apidoc/RestClientV2/getFundingAssets.js index 9fdb0fd..b2ae81c 100644 --- a/examples/apidoc/RestClientV2/getFundingAssets.js +++ b/examples/apidoc/RestClientV2/getFundingAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/account/funding-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/account/funding-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAsset.js b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js index e1f05f7..c8c95db 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountAsset.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountAsset.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/account - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/account +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js index 5213afd..5189818 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountAssets.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/accounts - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/accounts +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAccountBills.js b/examples/apidoc/RestClientV2/getFuturesAccountBills.js index e5dae37..94dbd29 100644 --- a/examples/apidoc/RestClientV2/getFuturesAccountBills.js +++ b/examples/apidoc/RestClientV2/getFuturesAccountBills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/bill - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/bill +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js index c776593..1152034 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveBuySellVolumeData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/long-short - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/long-short +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js index 78991d5..c141837 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortAccountData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/account-long-short - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/account-long-short +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js index bf2df0d..66b3527 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveLongShortPositionData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/position-long-short - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/position-long-short +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js index 987ab6e..c1e3da0 100644 --- a/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js +++ b/examples/apidoc/RestClientV2/getFuturesActiveTakerBuySellVolumeData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/taker-buy-sell - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/taker-buy-sell +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesAllTickers.js b/examples/apidoc/RestClientV2/getFuturesAllTickers.js index ea46971..4767c80 100644 --- a/examples/apidoc/RestClientV2/getFuturesAllTickers.js +++ b/examples/apidoc/RestClientV2/getFuturesAllTickers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/tickers - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/tickers +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesCandles.js b/examples/apidoc/RestClientV2/getFuturesCandles.js index b87fef8..2b2575c 100644 --- a/examples/apidoc/RestClientV2/getFuturesCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesContractConfig.js b/examples/apidoc/RestClientV2/getFuturesContractConfig.js index 9611fa3..29e5e0d 100644 --- a/examples/apidoc/RestClientV2/getFuturesContractConfig.js +++ b/examples/apidoc/RestClientV2/getFuturesContractConfig.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/contracts - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/contracts +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js index 9052cd8..55cf34e 100644 --- a/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js +++ b/examples/apidoc/RestClientV2/getFuturesCurrentFundingRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/current-fund-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/current-fund-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesDiscountRate.js b/examples/apidoc/RestClientV2/getFuturesDiscountRate.js index 4a931f0..24dbb15 100644 --- a/examples/apidoc/RestClientV2/getFuturesDiscountRate.js +++ b/examples/apidoc/RestClientV2/getFuturesDiscountRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/discount-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/discount-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFills.js b/examples/apidoc/RestClientV2/getFuturesFills.js index 13ccea4..14610e4 100644 --- a/examples/apidoc/RestClientV2/getFuturesFills.js +++ b/examples/apidoc/RestClientV2/getFuturesFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js index d6710e4..739a99d 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerCurrentOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-current-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-current-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js index 4659cf4..24eebdb 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerFollowLimit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-quantity-limit - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-quantity-limit +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js index f360b9e..666d451 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js index 990088b..c7565d1 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-settings - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-settings +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js index 9ad859b..dc68ef8 100644 --- a/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js +++ b/examples/apidoc/RestClientV2/getFuturesFollowerTraders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/query-traders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/query-traders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js index a811862..a1de8ca 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js index c8d2969..82a0314 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricFundingRates.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-fund-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-fund-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js index adf4fee..0ac3e2f 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricIndexPriceCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-index-candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-index-candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js index 59c4961..b4be03e 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricMarkPriceCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/history-mark-candles - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/history-mark-candles +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js index 9cef3f5..a2c7660 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrderFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/fill-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/fill-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js index 7af6a47..2c18286 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js index 2d71037..b73b16e 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-plan-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-plan-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js index 623df9c..a984c45 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricPositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/position/history-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/position/history-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js index b347b03..f8dd127 100644 --- a/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js +++ b/examples/apidoc/RestClientV2/getFuturesHistoricTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/fills-history - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/fills-history +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js b/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js index 609090e..eb98422 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestExchangeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/exchange-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/exchange-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesInterestHistory.js b/examples/apidoc/RestClientV2/getFuturesInterestHistory.js index 38ba5e8..db3eafd 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/interest-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/interest-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js b/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js index fc4f08e..dc72e8b 100644 --- a/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesInterestRateHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/union-interest-rate-history - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/union-interest-rate-history +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js index ca3ad8d..f181196 100644 --- a/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js +++ b/examples/apidoc/RestClientV2/getFuturesLongShortRatio.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/long-short-ratio - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/long-short-ratio +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesMergeDepth.js b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js index 50d92b8..6a585d3 100644 --- a/examples/apidoc/RestClientV2/getFuturesMergeDepth.js +++ b/examples/apidoc/RestClientV2/getFuturesMergeDepth.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/merge-depth - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/merge-depth +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js index 1e2fb78..1cf21a0 100644 --- a/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js +++ b/examples/apidoc/RestClientV2/getFuturesNextFundingTime.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/funding-time - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/funding-time +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOpenCount.js b/examples/apidoc/RestClientV2/getFuturesOpenCount.js index bcf2cc2..3fd5511 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenCount.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenCount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/open-count - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/open-count +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOpenInterest.js b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js index 271b81e..c6b4cda 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenInterest.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenInterest.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/open-interest - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/open-interest +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOpenOrders.js b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js index fe745a5..7a53c27 100644 --- a/examples/apidoc/RestClientV2/getFuturesOpenOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-pending - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-pending +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesOrder.js b/examples/apidoc/RestClientV2/getFuturesOrder.js index cd8d709..eecf660 100644 --- a/examples/apidoc/RestClientV2/getFuturesOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/detail - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/detail +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPlanOrders.js b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js index d520320..61ab0d8 100644 --- a/examples/apidoc/RestClientV2/getFuturesPlanOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/orders-plan-pending - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/orders-plan-pending +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPosition.js b/examples/apidoc/RestClientV2/getFuturesPosition.js index 18dbd67..1709551 100644 --- a/examples/apidoc/RestClientV2/getFuturesPosition.js +++ b/examples/apidoc/RestClientV2/getFuturesPosition.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/position/single-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/position/single-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPositionTier.js b/examples/apidoc/RestClientV2/getFuturesPositionTier.js index e43e954..22557c3 100644 --- a/examples/apidoc/RestClientV2/getFuturesPositionTier.js +++ b/examples/apidoc/RestClientV2/getFuturesPositionTier.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/query-position-lever - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/query-position-lever +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesPositions.js b/examples/apidoc/RestClientV2/getFuturesPositions.js index dbc5db6..a05f81e 100644 --- a/examples/apidoc/RestClientV2/getFuturesPositions.js +++ b/examples/apidoc/RestClientV2/getFuturesPositions.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/position/all-position - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/position/all-position +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesRecentTrades.js b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js index fc3191c..6e08a9d 100644 --- a/examples/apidoc/RestClientV2/getFuturesRecentTrades.js +++ b/examples/apidoc/RestClientV2/getFuturesRecentTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/fills - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/fills +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js index fa69040..9d4e403 100644 --- a/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js +++ b/examples/apidoc/RestClientV2/getFuturesSubAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/sub-account-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/sub-account-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js index 734638f..1bbe105 100644 --- a/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js +++ b/examples/apidoc/RestClientV2/getFuturesSymbolPrice.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/symbol-price - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/symbol-price +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTicker.js b/examples/apidoc/RestClientV2/getFuturesTicker.js index 0bd69d3..5d88282 100644 --- a/examples/apidoc/RestClientV2/getFuturesTicker.js +++ b/examples/apidoc/RestClientV2/getFuturesTicker.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/ticker - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/ticker +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js index 9fa4997..c92ce3a 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderCurrentOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-current-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-current-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js index 1449322..b3c9ee4 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderFollowers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-query-followers - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-query-followers +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js index b9ed0dc..44fbdc5 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-history-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-history-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderOrder.js b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js index 1464926..8202285 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-total-detail - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-total-detail +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js index eb08282..0897edd 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profit-history-summarys - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profit-history-summarys +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js index 4e35c63..a16a5d0 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShare.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profit-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profit-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js index 58ae827..0320d94 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareGroup.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profits-group-coin-date - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profits-group-coin-date +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js index fede5be..c77d61d 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderProfitShareHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/profit-history-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/profit-history-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js index 23bfee4..8461eda 100644 --- a/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/getFuturesTraderSymbolSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-query-symbols - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-query-symbols +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js index b36bc5d..fce8584 100644 --- a/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getFuturesTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/future-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/future-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js b/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js index 72bfc28..10a1190 100644 --- a/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js +++ b/examples/apidoc/RestClientV2/getFuturesTriggerSubOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/order/plan-sub-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/order/plan-sub-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js index f0ea200..b234867 100644 --- a/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js +++ b/examples/apidoc/RestClientV2/getFuturesVIPFeeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/vip-fee-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/vip-fee-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js index ab5ac6b..b4c16a3 100644 --- a/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js +++ b/examples/apidoc/RestClientV2/getIsolatedMarginBorrowingRatio.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/isolated-borrow-rate - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/isolated-borrow-rate +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanCurrencies.js b/examples/apidoc/RestClientV2/getLoanCurrencies.js index 14c8bcf..bb89890 100644 --- a/examples/apidoc/RestClientV2/getLoanCurrencies.js +++ b/examples/apidoc/RestClientV2/getLoanCurrencies.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/public/coinInfos - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/public/coinInfos +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanDebts.js b/examples/apidoc/RestClientV2/getLoanDebts.js index a96a170..267d01d 100644 --- a/examples/apidoc/RestClientV2/getLoanDebts.js +++ b/examples/apidoc/RestClientV2/getLoanDebts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/debts - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/debts +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js index e7f957f..eef0ed4 100644 --- a/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js +++ b/examples/apidoc/RestClientV2/getLoanEstInterestAndBorrowable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/public/hour-interest - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/public/hour-interest +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanHistory.js b/examples/apidoc/RestClientV2/getLoanHistory.js index fb93e61..1562d54 100644 --- a/examples/apidoc/RestClientV2/getLoanHistory.js +++ b/examples/apidoc/RestClientV2/getLoanHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/borrow-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/borrow-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js index 4db54e8..4cd7605 100644 --- a/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js +++ b/examples/apidoc/RestClientV2/getLoanLiquidationRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/reduces - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/reduces +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js index d9b57dc..8b5c3e6 100644 --- a/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js +++ b/examples/apidoc/RestClientV2/getLoanPledgeRateHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/revise-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/revise-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginAccountAssets.js b/examples/apidoc/RestClientV2/getMarginAccountAssets.js index 2aac869..4d55c50 100644 --- a/examples/apidoc/RestClientV2/getMarginAccountAssets.js +++ b/examples/apidoc/RestClientV2/getMarginAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginBorrowHistory.js b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js index f4d2820..da08fc3 100644 --- a/examples/apidoc/RestClientV2/getMarginBorrowHistory.js +++ b/examples/apidoc/RestClientV2/getMarginBorrowHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/borrow-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/borrow-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginCurrencies.js b/examples/apidoc/RestClientV2/getMarginCurrencies.js index 2e167d1..f6a56cb 100644 --- a/examples/apidoc/RestClientV2/getMarginCurrencies.js +++ b/examples/apidoc/RestClientV2/getMarginCurrencies.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/currencies - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/currencies +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginFinancialHistory.js b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js index d644e63..06d992b 100644 --- a/examples/apidoc/RestClientV2/getMarginFinancialHistory.js +++ b/examples/apidoc/RestClientV2/getMarginFinancialHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/financial-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/financial-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js index 8091d1c..992fbb5 100644 --- a/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js +++ b/examples/apidoc/RestClientV2/getMarginFlashRepayResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/query-flash-repay-status - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/query-flash-repay-status +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js index 9975618..a968649 100644 --- a/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrderFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginHistoricOrders.js b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js index d2dc187..2b0928b 100644 --- a/examples/apidoc/RestClientV2/getMarginHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getMarginHistoricOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginInterestHistory.js b/examples/apidoc/RestClientV2/getMarginInterestHistory.js index b578841..df4c507 100644 --- a/examples/apidoc/RestClientV2/getMarginInterestHistory.js +++ b/examples/apidoc/RestClientV2/getMarginInterestHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/interest-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/interest-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js index dc2564e..ea0fb46 100644 --- a/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js +++ b/examples/apidoc/RestClientV2/getMarginInterestRateAndMaxBorrowable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/interest-rate-and-limit - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/interest-rate-and-limit +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js index 655aef1..06cbe11 100644 --- a/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js +++ b/examples/apidoc/RestClientV2/getMarginLiquidationHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/liquidation-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/liquidation-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js index a14db9f..d579b67 100644 --- a/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js +++ b/examples/apidoc/RestClientV2/getMarginLiquidationOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/liquidation-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/liquidation-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js index 1eb66fc..4f0d719 100644 --- a/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js +++ b/examples/apidoc/RestClientV2/getMarginLoanGrowthRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/market/loan-growth - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/market/loan-growth +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js index c48be91..411e117 100644 --- a/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js +++ b/examples/apidoc/RestClientV2/getMarginMaxBorrowable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/max-borrowable-amount - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/max-borrowable-amount +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginMaxTransferable.js b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js index 38704d6..edf0372 100644 --- a/examples/apidoc/RestClientV2/getMarginMaxTransferable.js +++ b/examples/apidoc/RestClientV2/getMarginMaxTransferable.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/max-transfer-out-amount - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/max-transfer-out-amount +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginOpenOrders.js b/examples/apidoc/RestClientV2/getMarginOpenOrders.js index 8e8dbbd..9205040 100644 --- a/examples/apidoc/RestClientV2/getMarginOpenOrders.js +++ b/examples/apidoc/RestClientV2/getMarginOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/open-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/open-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginRepayHistory.js b/examples/apidoc/RestClientV2/getMarginRepayHistory.js index d5d78fa..93ccea9 100644 --- a/examples/apidoc/RestClientV2/getMarginRepayHistory.js +++ b/examples/apidoc/RestClientV2/getMarginRepayHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/repay-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/repay-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginRiskRate.js b/examples/apidoc/RestClientV2/getMarginRiskRate.js index 24474d6..e02e83d 100644 --- a/examples/apidoc/RestClientV2/getMarginRiskRate.js +++ b/examples/apidoc/RestClientV2/getMarginRiskRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/risk-rate - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/risk-rate +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginTierConfiguration.js b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js index c749223..f72a4c9 100644 --- a/examples/apidoc/RestClientV2/getMarginTierConfiguration.js +++ b/examples/apidoc/RestClientV2/getMarginTierConfiguration.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/tier-data - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/tier-data +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getMarginTransactionRecords.js b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js index 2afdf6a..feb4cf1 100644 --- a/examples/apidoc/RestClientV2/getMarginTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getMarginTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/margin-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/margin-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getOngoingLoanOrders.js b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js index 39c37e3..d0b627e 100644 --- a/examples/apidoc/RestClientV2/getOngoingLoanOrders.js +++ b/examples/apidoc/RestClientV2/getOngoingLoanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/ongoing-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/ongoing-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js index 85d4dae..f935666 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantAdvertisementList.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/advList - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/advList +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantInfo.js b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js index fe99f91..7ad0459 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantInfo.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/merchantInfo - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/merchantInfo +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantList.js b/examples/apidoc/RestClientV2/getP2PMerchantList.js index 68d68ab..a5a9243 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantList.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantList.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/merchantList - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/merchantList +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PMerchantOrders.js b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js index 3830a02..f533417 100644 --- a/examples/apidoc/RestClientV2/getP2PMerchantOrders.js +++ b/examples/apidoc/RestClientV2/getP2PMerchantOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/p2p/orderList - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/p2p/orderList +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getP2PTransactionRecords.js b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js index fc9cced..2e000b0 100644 --- a/examples/apidoc/RestClientV2/getP2PTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getP2PTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/p2p-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/p2p-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getRepayHistory.js b/examples/apidoc/RestClientV2/getRepayHistory.js index fb5e97c..7a0254d 100644 --- a/examples/apidoc/RestClientV2/getRepayHistory.js +++ b/examples/apidoc/RestClientV2/getRepayHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/repay-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/repay-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getServerTime.js b/examples/apidoc/RestClientV2/getServerTime.js index 41b99c6..9aead24 100644 --- a/examples/apidoc/RestClientV2/getServerTime.js +++ b/examples/apidoc/RestClientV2/getServerTime.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/public/time - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/public/time +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinAccount.js b/examples/apidoc/RestClientV2/getSharkfinAccount.js index 0d5d7a4..0c05010 100644 --- a/examples/apidoc/RestClientV2/getSharkfinAccount.js +++ b/examples/apidoc/RestClientV2/getSharkfinAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/account - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/account +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinAssets.js b/examples/apidoc/RestClientV2/getSharkfinAssets.js index 5245599..77b7c9c 100644 --- a/examples/apidoc/RestClientV2/getSharkfinAssets.js +++ b/examples/apidoc/RestClientV2/getSharkfinAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinProducts.js b/examples/apidoc/RestClientV2/getSharkfinProducts.js index ee94787..3437067 100644 --- a/examples/apidoc/RestClientV2/getSharkfinProducts.js +++ b/examples/apidoc/RestClientV2/getSharkfinProducts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/product - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/product +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinRecords.js b/examples/apidoc/RestClientV2/getSharkfinRecords.js index 3c1a053..5a103c6 100644 --- a/examples/apidoc/RestClientV2/getSharkfinRecords.js +++ b/examples/apidoc/RestClientV2/getSharkfinRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscription.js b/examples/apidoc/RestClientV2/getSharkfinSubscription.js index 50fc624..c97d188 100644 --- a/examples/apidoc/RestClientV2/getSharkfinSubscription.js +++ b/examples/apidoc/RestClientV2/getSharkfinSubscription.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/subscribe-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/subscribe-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js index 8ba1fd4..2f86430 100644 --- a/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js +++ b/examples/apidoc/RestClientV2/getSharkfinSubscriptionResult.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/subscribe-result - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/subscribe-result +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotAccount.js b/examples/apidoc/RestClientV2/getSpotAccount.js index 6a079aa..98b8cdb 100644 --- a/examples/apidoc/RestClientV2/getSpotAccount.js +++ b/examples/apidoc/RestClientV2/getSpotAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotAccountAssets.js b/examples/apidoc/RestClientV2/getSpotAccountAssets.js index 745828b..11b804d 100644 --- a/examples/apidoc/RestClientV2/getSpotAccountAssets.js +++ b/examples/apidoc/RestClientV2/getSpotAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotAccountBills.js b/examples/apidoc/RestClientV2/getSpotAccountBills.js index cb908ae..3f29ac0 100644 --- a/examples/apidoc/RestClientV2/getSpotAccountBills.js +++ b/examples/apidoc/RestClientV2/getSpotAccountBills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/bills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/bills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js index 8071e30..2e2c8ac 100644 --- a/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js +++ b/examples/apidoc/RestClientV2/getSpotBGBDeductInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/deduct-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/deduct-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotCandles.js b/examples/apidoc/RestClientV2/getSpotCandles.js index 5473646..f7543af 100644 --- a/examples/apidoc/RestClientV2/getSpotCandles.js +++ b/examples/apidoc/RestClientV2/getSpotCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/candles - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/candles +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotCoinInfo.js b/examples/apidoc/RestClientV2/getSpotCoinInfo.js index 4616e68..b3fbd87 100644 --- a/examples/apidoc/RestClientV2/getSpotCoinInfo.js +++ b/examples/apidoc/RestClientV2/getSpotCoinInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/public/coins - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/public/coins +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js index 3191bbd..a2c497b 100644 --- a/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js +++ b/examples/apidoc/RestClientV2/getSpotCurrentPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/current-plan-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/current-plan-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotDepositAddress.js b/examples/apidoc/RestClientV2/getSpotDepositAddress.js index 94fa6a5..d74b1aa 100644 --- a/examples/apidoc/RestClientV2/getSpotDepositAddress.js +++ b/examples/apidoc/RestClientV2/getSpotDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/deposit-address - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/deposit-address +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotDepositHistory.js b/examples/apidoc/RestClientV2/getSpotDepositHistory.js index e28d743..3e34324 100644 --- a/examples/apidoc/RestClientV2/getSpotDepositHistory.js +++ b/examples/apidoc/RestClientV2/getSpotDepositHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/deposit-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/deposit-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFills.js b/examples/apidoc/RestClientV2/getSpotFills.js index 91b4290..14f9d9f 100644 --- a/examples/apidoc/RestClientV2/getSpotFills.js +++ b/examples/apidoc/RestClientV2/getSpotFills.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js index 78fe575..cfd059d 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerCurrentTraderSymbols.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-trader-symbols - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-trader-symbols +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js index 73b7a14..768ba89 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js index 289540d..6b735e0 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-current-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-current-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerSettings.js b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js index dfe790a..38d9d7e 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerSettings.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-settings - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-settings +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFollowerTraders.js b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js index ab007cf..f9f9dd5 100644 --- a/examples/apidoc/RestClientV2/getSpotFollowerTraders.js +++ b/examples/apidoc/RestClientV2/getSpotFollowerTraders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/query-traders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/query-traders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFundFlow.js b/examples/apidoc/RestClientV2/getSpotFundFlow.js index 0874441..cca7c34 100644 --- a/examples/apidoc/RestClientV2/getSpotFundFlow.js +++ b/examples/apidoc/RestClientV2/getSpotFundFlow.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fund-flow - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fund-flow +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js index 2828722..1579c4a 100644 --- a/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js +++ b/examples/apidoc/RestClientV2/getSpotFundNetFlowData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fund-net-flow - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fund-net-flow +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricCandles.js b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js index 60b4d93..a5dc0ad 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricCandles.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricCandles.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/history-candles - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/history-candles +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js index 62439c5..7ae748b 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricOrders.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/history-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/history-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js index 099f507..ff8dfa0 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/history-plan-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/history-plan-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotHistoricTrades.js b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js index acf8e04..36069c4 100644 --- a/examples/apidoc/RestClientV2/getSpotHistoricTrades.js +++ b/examples/apidoc/RestClientV2/getSpotHistoricTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fills-history - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fills-history +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js index da20b41..0af6ab4 100644 --- a/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js +++ b/examples/apidoc/RestClientV2/getSpotMainSubTransferRecord.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/sub-main-trans-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/sub-main-trans-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotMergeDepth.js b/examples/apidoc/RestClientV2/getSpotMergeDepth.js index a0be8f2..c13f589 100644 --- a/examples/apidoc/RestClientV2/getSpotMergeDepth.js +++ b/examples/apidoc/RestClientV2/getSpotMergeDepth.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/merge-depth - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/merge-depth +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotOpenOrders.js b/examples/apidoc/RestClientV2/getSpotOpenOrders.js index 6ce4bca..1b1e0b0 100644 --- a/examples/apidoc/RestClientV2/getSpotOpenOrders.js +++ b/examples/apidoc/RestClientV2/getSpotOpenOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/unfilled-orders - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/unfilled-orders +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotOrder.js b/examples/apidoc/RestClientV2/getSpotOrder.js index 03e87ee..a33112a 100644 --- a/examples/apidoc/RestClientV2/getSpotOrder.js +++ b/examples/apidoc/RestClientV2/getSpotOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/orderInfo - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/orderInfo +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js index 2e41762..7dd307a 100644 --- a/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js +++ b/examples/apidoc/RestClientV2/getSpotOrderBookDepth.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/orderbook - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/orderbook +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js index ff83738..632ff6d 100644 --- a/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js +++ b/examples/apidoc/RestClientV2/getSpotPlanSubOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/plan-sub-order - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/plan-sub-order +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotRecentTrades.js b/examples/apidoc/RestClientV2/getSpotRecentTrades.js index 5187d46..461eb00 100644 --- a/examples/apidoc/RestClientV2/getSpotRecentTrades.js +++ b/examples/apidoc/RestClientV2/getSpotRecentTrades.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/fills - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/fills +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js index eed9e02..19e4b48 100644 --- a/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js +++ b/examples/apidoc/RestClientV2/getSpotSubAccountAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/subaccount-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/subaccount-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js index 5eb8bd6..d028ba1 100644 --- a/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js +++ b/examples/apidoc/RestClientV2/getSpotSubDepositAddress.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-address - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-address +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotSymbolInfo.js b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js index e0efddd..1cb5b96 100644 --- a/examples/apidoc/RestClientV2/getSpotSymbolInfo.js +++ b/examples/apidoc/RestClientV2/getSpotSymbolInfo.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/public/symbols - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/public/symbols +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTicker.js b/examples/apidoc/RestClientV2/getSpotTicker.js index f1fee26..6bdcb19 100644 --- a/examples/apidoc/RestClientV2/getSpotTicker.js +++ b/examples/apidoc/RestClientV2/getSpotTicker.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/tickers - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/tickers +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js index 546b5ba..130318d 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js +++ b/examples/apidoc/RestClientV2/getSpotTraderConfiguration.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-query-settings - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-query-settings +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js index 03b4ee7..03a19d1 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js +++ b/examples/apidoc/RestClientV2/getSpotTraderCurrentOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-current-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-current-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderFollowers.js b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js index 2b27c95..2e545f3 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderFollowers.js +++ b/examples/apidoc/RestClientV2/getSpotTraderFollowers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-query-followers - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-query-followers +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js index 6aa48a8..92902b8 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-history-track - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-history-track +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js index fa821de..35cb978 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderHistoryProfit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/profit-history-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/profit-history-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderOrder.js b/examples/apidoc/RestClientV2/getSpotTraderOrder.js index 54aeb01..905babe 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderOrder.js +++ b/examples/apidoc/RestClientV2/getSpotTraderOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-total-detail - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-total-detail +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderProfit.js b/examples/apidoc/RestClientV2/getSpotTraderProfit.js index 2391c75..03c381c 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderProfit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/profit-summarys - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/profit-summarys +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js index fdfe74a..72ec941 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/getSpotTraderSymbolSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-setting-symbols - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-setting-symbols +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js index e516609..b4cc58a 100644 --- a/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js +++ b/examples/apidoc/RestClientV2/getSpotTraderUnrealizedProfit.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/profit-details - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/profit-details +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTransactionRecords.js b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js index 46ec672..e91ff5c 100644 --- a/examples/apidoc/RestClientV2/getSpotTransactionRecords.js +++ b/examples/apidoc/RestClientV2/getSpotTransactionRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/tax/spot-record - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/tax/spot-record +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTransferHistory.js b/examples/apidoc/RestClientV2/getSpotTransferHistory.js index 2212253..2575230 100644 --- a/examples/apidoc/RestClientV2/getSpotTransferHistory.js +++ b/examples/apidoc/RestClientV2/getSpotTransferHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/transferRecords - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/transferRecords +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotTransferableCoins.js b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js index 7d09b8e..6b0d1b4 100644 --- a/examples/apidoc/RestClientV2/getSpotTransferableCoins.js +++ b/examples/apidoc/RestClientV2/getSpotTransferableCoins.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/transfer-coin-info - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/transfer-coin-info +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js index 54bc25a..27b58e1 100644 --- a/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js +++ b/examples/apidoc/RestClientV2/getSpotVIPFeeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/vip-fee-rate - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/vip-fee-rate +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js index b6f4007..2cc4b24 100644 --- a/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js +++ b/examples/apidoc/RestClientV2/getSpotWhaleNetFlowData.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/whale-net-flow - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/whale-net-flow +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js index 3ae53e7..2687710 100644 --- a/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js +++ b/examples/apidoc/RestClientV2/getSpotWithdrawalHistory.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/withdrawal-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/withdrawal-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js index 3df92a4..4a16208 100644 --- a/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js +++ b/examples/apidoc/RestClientV2/getSubAccountDepositRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-records - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/subaccount-deposit-records +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountApiKey.js b/examples/apidoc/RestClientV2/getSubaccountApiKey.js index db4d09a..b612265 100644 --- a/examples/apidoc/RestClientV2/getSubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/getSubaccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/manage/subaccount-apikey-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/manage/subaccount-apikey-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountEmail.js b/examples/apidoc/RestClientV2/getSubaccountEmail.js index fd08413..78d7181 100644 --- a/examples/apidoc/RestClientV2/getSubaccountEmail.js +++ b/examples/apidoc/RestClientV2/getSubaccountEmail.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-email - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-email +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js index 17c8c13..624fbe3 100644 --- a/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js +++ b/examples/apidoc/RestClientV2/getSubaccountFuturesAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-future-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-future-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js index c842a8e..8797ca1 100644 --- a/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js +++ b/examples/apidoc/RestClientV2/getSubaccountSpotAssets.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-spot-assets - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-spot-assets +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getSubaccounts.js b/examples/apidoc/RestClientV2/getSubaccounts.js index e8b9cbd..e2d3fe8 100644 --- a/examples/apidoc/RestClientV2/getSubaccounts.js +++ b/examples/apidoc/RestClientV2/getSubaccounts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js index dc3f009..5492f2d 100644 --- a/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js +++ b/examples/apidoc/RestClientV2/getTradeDataSupportSymbols.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/market/support-symbols - // METHOD: GET - // PUBLIC: YES +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/market/support-symbols +// METHOD: GET +// PUBLIC: YES const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getTradeRate.js b/examples/apidoc/RestClientV2/getTradeRate.js index 4f14c7b..0398dd8 100644 --- a/examples/apidoc/RestClientV2/getTradeRate.js +++ b/examples/apidoc/RestClientV2/getTradeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/common/trade-rate - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/common/trade-rate +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js index 64daf62..40a9984 100644 --- a/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js +++ b/examples/apidoc/RestClientV2/getVirtualSubaccountAPIKeys.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/virtual-subaccount-apikey-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/virtual-subaccount-apikey-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/getVirtualSubaccounts.js b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js index eb3bfe0..7de4faa 100644 --- a/examples/apidoc/RestClientV2/getVirtualSubaccounts.js +++ b/examples/apidoc/RestClientV2/getVirtualSubaccounts.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/virtual-subaccount-list - // METHOD: GET - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/virtual-subaccount-list +// METHOD: GET +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginBatchCancelOrders.js b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js index 1e6b0e5..cfb72c7 100644 --- a/examples/apidoc/RestClientV2/marginBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/marginBatchCancelOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/batch-cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/batch-cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js index 98262c8..631c5a8 100644 --- a/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/marginBatchSubmitOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/batch-place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/batch-place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginBorrow.js b/examples/apidoc/RestClientV2/marginBorrow.js index 7e988e1..a146026 100644 --- a/examples/apidoc/RestClientV2/marginBorrow.js +++ b/examples/apidoc/RestClientV2/marginBorrow.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/borrow - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/borrow +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginCancelOrder.js b/examples/apidoc/RestClientV2/marginCancelOrder.js index 26d4849..d0ab865 100644 --- a/examples/apidoc/RestClientV2/marginCancelOrder.js +++ b/examples/apidoc/RestClientV2/marginCancelOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginFlashRepay.js b/examples/apidoc/RestClientV2/marginFlashRepay.js index ab430f9..263580d 100644 --- a/examples/apidoc/RestClientV2/marginFlashRepay.js +++ b/examples/apidoc/RestClientV2/marginFlashRepay.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/flash-repay - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/flash-repay +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginRepay.js b/examples/apidoc/RestClientV2/marginRepay.js index 913e884..979c767 100644 --- a/examples/apidoc/RestClientV2/marginRepay.js +++ b/examples/apidoc/RestClientV2/marginRepay.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/account/repay - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/account/repay +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/marginSubmitOrder.js b/examples/apidoc/RestClientV2/marginSubmitOrder.js index c221b6a..9dece15 100644 --- a/examples/apidoc/RestClientV2/marginSubmitOrder.js +++ b/examples/apidoc/RestClientV2/marginSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/margin/${marginType}/place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/margin/${marginType}/place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js index 27a5a88..a552ae6 100644 --- a/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js +++ b/examples/apidoc/RestClientV2/modifyFuturesTraderOrderTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/order-modify-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/order-modify-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js index b635cbb..b8f9793 100644 --- a/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js +++ b/examples/apidoc/RestClientV2/modifySpotTraderOrderTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-modify-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-modify-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySubaccount.js b/examples/apidoc/RestClientV2/modifySubaccount.js index 7e0ee3d..7694257 100644 --- a/examples/apidoc/RestClientV2/modifySubaccount.js +++ b/examples/apidoc/RestClientV2/modifySubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/modify-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/modify-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySubaccountApiKey.js b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js index 161b600..7837fff 100644 --- a/examples/apidoc/RestClientV2/modifySubaccountApiKey.js +++ b/examples/apidoc/RestClientV2/modifySubaccountApiKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/manage/modify-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/manage/modify-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifySubaccountEmail.js b/examples/apidoc/RestClientV2/modifySubaccountEmail.js index 5c056e5..21e2d58 100644 --- a/examples/apidoc/RestClientV2/modifySubaccountEmail.js +++ b/examples/apidoc/RestClientV2/modifySubaccountEmail.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/modify-subaccount-email - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/modify-subaccount-email +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js index 32ab1f3..7a8ceda 100644 --- a/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/modify-virtual-subaccount - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/modify-virtual-subaccount +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js index a29acf7..8219ada 100644 --- a/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js +++ b/examples/apidoc/RestClientV2/modifyVirtualSubaccountAPIKey.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/user/modify-virtual-subaccount-apikey - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/user/modify-virtual-subaccount-apikey +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js index 056aacd..2841368 100644 --- a/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js +++ b/examples/apidoc/RestClientV2/removeFuturesTraderFollower.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-remove-follower - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-remove-follower +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js index c423a29..3c8908e 100644 --- a/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js +++ b/examples/apidoc/RestClientV2/removeSpotTraderFollowers.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/config-remove-follower - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/config-remove-follower +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/repayLoan.js b/examples/apidoc/RestClientV2/repayLoan.js index ff62b04..da098b5 100644 --- a/examples/apidoc/RestClientV2/repayLoan.js +++ b/examples/apidoc/RestClientV2/repayLoan.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/repay - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/repay +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/sellSpotFollower.js b/examples/apidoc/RestClientV2/sellSpotFollower.js index f22d172..205a34c 100644 --- a/examples/apidoc/RestClientV2/sellSpotFollower.js +++ b/examples/apidoc/RestClientV2/sellSpotFollower.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/order-close-tracking - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/order-close-tracking +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/sellSpotTrader.js b/examples/apidoc/RestClientV2/sellSpotTrader.js index b1444a9..3d90803 100644 --- a/examples/apidoc/RestClientV2/sellSpotTrader.js +++ b/examples/apidoc/RestClientV2/sellSpotTrader.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-trader/order-close-tracking - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-trader/order-close-tracking +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesAssetMode.js b/examples/apidoc/RestClientV2/setFuturesAssetMode.js index 9802c37..e77e80b 100644 --- a/examples/apidoc/RestClientV2/setFuturesAssetMode.js +++ b/examples/apidoc/RestClientV2/setFuturesAssetMode.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-asset-mode - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-asset-mode +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesLeverage.js b/examples/apidoc/RestClientV2/setFuturesLeverage.js index 04734be..563312a 100644 --- a/examples/apidoc/RestClientV2/setFuturesLeverage.js +++ b/examples/apidoc/RestClientV2/setFuturesLeverage.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-leverage - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-leverage +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesMarginMode.js b/examples/apidoc/RestClientV2/setFuturesMarginMode.js index 5ca224c..91e3a65 100644 --- a/examples/apidoc/RestClientV2/setFuturesMarginMode.js +++ b/examples/apidoc/RestClientV2/setFuturesMarginMode.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-margin-mode - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-margin-mode +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js index 236f792..c4ace54 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionAutoMargin.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-auto-margin - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-auto-margin +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMargin.js b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js index 3df8d31..608690a 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionMargin.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionMargin.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-margin - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-margin +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/setFuturesPositionMode.js b/examples/apidoc/RestClientV2/setFuturesPositionMode.js index 4c7d999..7626619 100644 --- a/examples/apidoc/RestClientV2/setFuturesPositionMode.js +++ b/examples/apidoc/RestClientV2/setFuturesPositionMode.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/mix/account/set-position-mode - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/mix/account/set-position-mode +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotBatchCancelOrders.js b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js index 176ac5f..57e2192 100644 --- a/examples/apidoc/RestClientV2/spotBatchCancelOrders.js +++ b/examples/apidoc/RestClientV2/spotBatchCancelOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js b/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js index 8cec9f5..0f26eb6 100644 --- a/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotBatchCancelandSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-cancel-replace-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-cancel-replace-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js index eead0fe..7f7fb93 100644 --- a/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js +++ b/examples/apidoc/RestClientV2/spotBatchSubmitOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-orders - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-orders +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelOrder.js b/examples/apidoc/RestClientV2/spotCancelOrder.js index d85ddf5..e03f4e4 100644 --- a/examples/apidoc/RestClientV2/spotCancelOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrder.js b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js index 623894c..e140a18 100644 --- a/examples/apidoc/RestClientV2/spotCancelPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelPlanOrders.js b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js index e4c3f0c..540d305 100644 --- a/examples/apidoc/RestClientV2/spotCancelPlanOrders.js +++ b/examples/apidoc/RestClientV2/spotCancelPlanOrders.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/batch-cancel-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/batch-cancel-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js index 48c47a5..2f66c34 100644 --- a/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelSymbolOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-symbol-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-symbol-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelWithdrawal.js b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js index 7d7005c..c829959 100644 --- a/examples/apidoc/RestClientV2/spotCancelWithdrawal.js +++ b/examples/apidoc/RestClientV2/spotCancelWithdrawal.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/cancel-withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/cancel-withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js b/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js index 9e163f0..424e905 100644 --- a/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotCancelandSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/cancel-replace-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/cancel-replace-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotModifyDepositAccount.js b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js index 69bff2f..7cf2791 100644 --- a/examples/apidoc/RestClientV2/spotModifyDepositAccount.js +++ b/examples/apidoc/RestClientV2/spotModifyDepositAccount.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/modify-deposit-account - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/modify-deposit-account +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotModifyPlanOrder.js b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js index 0649d92..bf8190a 100644 --- a/examples/apidoc/RestClientV2/spotModifyPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotModifyPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/modify-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/modify-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSubTransfer.js b/examples/apidoc/RestClientV2/spotSubTransfer.js index 8156af9..bc5d2a3 100644 --- a/examples/apidoc/RestClientV2/spotSubTransfer.js +++ b/examples/apidoc/RestClientV2/spotSubTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/subaccount-transfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/subaccount-transfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSubmitOrder.js b/examples/apidoc/RestClientV2/spotSubmitOrder.js index 673860c..b9993ee 100644 --- a/examples/apidoc/RestClientV2/spotSubmitOrder.js +++ b/examples/apidoc/RestClientV2/spotSubmitOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/place-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/place-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js index 6875c7e..dd8f583 100644 --- a/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js +++ b/examples/apidoc/RestClientV2/spotSubmitPlanOrder.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/trade/place-plan-order - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/trade/place-plan-order +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js index ab29a32..3dd2e2f 100644 --- a/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js +++ b/examples/apidoc/RestClientV2/spotSwitchBGBDeduct.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/account/switch-deduct - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/account/switch-deduct +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotTransfer.js b/examples/apidoc/RestClientV2/spotTransfer.js index a07c3b8..ea1dfdb 100644 --- a/examples/apidoc/RestClientV2/spotTransfer.js +++ b/examples/apidoc/RestClientV2/spotTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/transfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/transfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/spotWithdraw.js b/examples/apidoc/RestClientV2/spotWithdraw.js index 1862419..500cfba 100644 --- a/examples/apidoc/RestClientV2/spotWithdraw.js +++ b/examples/apidoc/RestClientV2/spotWithdraw.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/spot/wallet/withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/spot/wallet/withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountDepositRecords.js b/examples/apidoc/RestClientV2/subaccountDepositRecords.js index 2957ca6..33ff86c 100644 --- a/examples/apidoc/RestClientV2/subaccountDepositRecords.js +++ b/examples/apidoc/RestClientV2/subaccountDepositRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/subaccount-deposit - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/subaccount-deposit +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js index 060412b..c20c28a 100644 --- a/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js +++ b/examples/apidoc/RestClientV2/subaccountSetAutoTransfer.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/set-subaccount-autotransfer - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/set-subaccount-autotransfer +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawal.js b/examples/apidoc/RestClientV2/subaccountWithdrawal.js index 1213c93..5755844 100644 --- a/examples/apidoc/RestClientV2/subaccountWithdrawal.js +++ b/examples/apidoc/RestClientV2/subaccountWithdrawal.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/account/subaccount-withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/account/subaccount-withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js index d8b8c76..45674e8 100644 --- a/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js +++ b/examples/apidoc/RestClientV2/subaccountWithdrawalRecords.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/broker/subaccount-withdrawal - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/broker/subaccount-withdrawal +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/subscribeSharkfin.js b/examples/apidoc/RestClientV2/subscribeSharkfin.js index 5e69da1..6bad633 100644 --- a/examples/apidoc/RestClientV2/subscribeSharkfin.js +++ b/examples/apidoc/RestClientV2/subscribeSharkfin.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/sharkfin/subscribe - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/sharkfin/subscribe +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/unfollowFuturesTrader.js b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js index 6de9d0a..b9a8a8b 100644 --- a/examples/apidoc/RestClientV2/unfollowFuturesTrader.js +++ b/examples/apidoc/RestClientV2/unfollowFuturesTrader.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/cancel-trader - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/cancel-trader +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/unfollowSpotTrader.js b/examples/apidoc/RestClientV2/unfollowSpotTrader.js index 8a0756f..aa4107e 100644 --- a/examples/apidoc/RestClientV2/unfollowSpotTrader.js +++ b/examples/apidoc/RestClientV2/unfollowSpotTrader.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/cancel-trader - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/cancel-trader +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js index 83da6cd..946e828 100644 --- a/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/settings - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/settings +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js index ee4de79..7b15169 100644 --- a/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js +++ b/examples/apidoc/RestClientV2/updateFuturesFollowerTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-follower/setting-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-follower/setting-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js index 323e120..a2e05df 100644 --- a/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesTraderGlobalSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-settings-base - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-settings-base +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js index 1420f03..004a9bd 100644 --- a/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js +++ b/examples/apidoc/RestClientV2/updateFuturesTraderSymbolSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/mix-trader/config-setting-symbols - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/mix-trader/config-setting-symbols +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateLoanPledgeRate.js b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js index d6ee388..c0aaf64 100644 --- a/examples/apidoc/RestClientV2/updateLoanPledgeRate.js +++ b/examples/apidoc/RestClientV2/updateLoanPledgeRate.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/earn/loan/revise-pledge - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/earn/loan/revise-pledge +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js index 42b21e6..8103027 100644 --- a/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js +++ b/examples/apidoc/RestClientV2/updateSpotFollowerSettings.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/settings - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/settings +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js index a2ec7e7..ea5e011 100644 --- a/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js +++ b/examples/apidoc/RestClientV2/updateSpotFollowerTPSL.js @@ -1,11 +1,13 @@ -const { RestClientV2 } = require('bitget-api'); +import { RestClientV2 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV2 } = require('bitget-api'); - // This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange - // This Bitget API SDK is available on npm via "npm install bitget-api" - // ENDPOINT: /api/v2/copy/spot-follower/setting-tpsl - // METHOD: POST - // PUBLIC: NO +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v2/copy/spot-follower/setting-tpsl +// METHOD: POST +// PUBLIC: NO const client = new RestClientV2({ apiKey: 'insert_api_key_here', diff --git a/examples/apidoc/RestClientV3/batchModifyOrders.js b/examples/apidoc/RestClientV3/batchModifyOrders.js new file mode 100644 index 0000000..fbf3169 --- /dev/null +++ b/examples/apidoc/RestClientV3/batchModifyOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/batch-modify-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.batchModifyOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/bindLoanUid.js b/examples/apidoc/RestClientV3/bindLoanUid.js new file mode 100644 index 0000000..5741df4 --- /dev/null +++ b/examples/apidoc/RestClientV3/bindLoanUid.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/bind-uid +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.bindLoanUid(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelAllOrders.js b/examples/apidoc/RestClientV3/cancelAllOrders.js new file mode 100644 index 0000000..7d777ca --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelAllOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-symbol-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelAllOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelBatchOrders.js b/examples/apidoc/RestClientV3/cancelBatchOrders.js new file mode 100644 index 0000000..3afce24 --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelBatchOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-batch +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelOrder.js b/examples/apidoc/RestClientV3/cancelOrder.js new file mode 100644 index 0000000..4e0f246 --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelOrder.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/cancelStrategyOrder.js b/examples/apidoc/RestClientV3/cancelStrategyOrder.js new file mode 100644 index 0000000..fa23cda --- /dev/null +++ b/examples/apidoc/RestClientV3/cancelStrategyOrder.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/cancel-strategy-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.cancelStrategyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/closeAllPositions.js b/examples/apidoc/RestClientV3/closeAllPositions.js new file mode 100644 index 0000000..eec79ba --- /dev/null +++ b/examples/apidoc/RestClientV3/closeAllPositions.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/close-positions +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.closeAllPositions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/countdownCancelAll.js b/examples/apidoc/RestClientV3/countdownCancelAll.js new file mode 100644 index 0000000..246ad4a --- /dev/null +++ b/examples/apidoc/RestClientV3/countdownCancelAll.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/countdown-cancel-all +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.countdownCancelAll(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/createSubAccount.js b/examples/apidoc/RestClientV3/createSubAccount.js new file mode 100644 index 0000000..d3bc636 --- /dev/null +++ b/examples/apidoc/RestClientV3/createSubAccount.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/create-sub +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.createSubAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/createSubAccountApiKey.js b/examples/apidoc/RestClientV3/createSubAccountApiKey.js new file mode 100644 index 0000000..73e09e1 --- /dev/null +++ b/examples/apidoc/RestClientV3/createSubAccountApiKey.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/create-sub-api +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.createSubAccountApiKey(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js new file mode 100644 index 0000000..f178e9a --- /dev/null +++ b/examples/apidoc/RestClientV3/deleteSubAccountApiKey.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/delete-sub-api +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.deleteSubAccountApiKey(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/freezeSubAccount.js b/examples/apidoc/RestClientV3/freezeSubAccount.js new file mode 100644 index 0000000..70f4927 --- /dev/null +++ b/examples/apidoc/RestClientV3/freezeSubAccount.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/freeze-sub +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.freezeSubAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getAccountSettings.js b/examples/apidoc/RestClientV3/getAccountSettings.js new file mode 100644 index 0000000..8cb3f1c --- /dev/null +++ b/examples/apidoc/RestClientV3/getAccountSettings.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/settings +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getAccountSettings(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getBalances.js b/examples/apidoc/RestClientV3/getBalances.js new file mode 100644 index 0000000..2097285 --- /dev/null +++ b/examples/apidoc/RestClientV3/getBalances.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/assets +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getBalances(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getCandles.js b/examples/apidoc/RestClientV3/getCandles.js new file mode 100644 index 0000000..ebf81b7 --- /dev/null +++ b/examples/apidoc/RestClientV3/getCandles.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/candles +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getCandles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getContractsOi.js b/examples/apidoc/RestClientV3/getContractsOi.js new file mode 100644 index 0000000..90b8012 --- /dev/null +++ b/examples/apidoc/RestClientV3/getContractsOi.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/oi-limit +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getContractsOi(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getConvertRecords.js b/examples/apidoc/RestClientV3/getConvertRecords.js new file mode 100644 index 0000000..e0b6887 --- /dev/null +++ b/examples/apidoc/RestClientV3/getConvertRecords.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/convert-records +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getConvertRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getCurrentFundingRate.js b/examples/apidoc/RestClientV3/getCurrentFundingRate.js new file mode 100644 index 0000000..a8d57b4 --- /dev/null +++ b/examples/apidoc/RestClientV3/getCurrentFundingRate.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/current-fund-rate +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getCurrentFundingRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getCurrentPosition.js b/examples/apidoc/RestClientV3/getCurrentPosition.js new file mode 100644 index 0000000..42df27f --- /dev/null +++ b/examples/apidoc/RestClientV3/getCurrentPosition.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/position/current-position +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getCurrentPosition(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDeductInfo.js b/examples/apidoc/RestClientV3/getDeductInfo.js new file mode 100644 index 0000000..9938b62 --- /dev/null +++ b/examples/apidoc/RestClientV3/getDeductInfo.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/deduct-info +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDeductInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDepositAddress.js b/examples/apidoc/RestClientV3/getDepositAddress.js new file mode 100644 index 0000000..58cef37 --- /dev/null +++ b/examples/apidoc/RestClientV3/getDepositAddress.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/deposit-address +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDepositAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDepositRecords.js b/examples/apidoc/RestClientV3/getDepositRecords.js new file mode 100644 index 0000000..d7b8181 --- /dev/null +++ b/examples/apidoc/RestClientV3/getDepositRecords.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/deposit-records +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDepositRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getDiscountRate.js b/examples/apidoc/RestClientV3/getDiscountRate.js new file mode 100644 index 0000000..54c711a --- /dev/null +++ b/examples/apidoc/RestClientV3/getDiscountRate.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/discount-rate +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getDiscountRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFeeRate.js b/examples/apidoc/RestClientV3/getFeeRate.js new file mode 100644 index 0000000..2b0424d --- /dev/null +++ b/examples/apidoc/RestClientV3/getFeeRate.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/fee-rate +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFeeRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFills.js b/examples/apidoc/RestClientV3/getFills.js new file mode 100644 index 0000000..92bdb84 --- /dev/null +++ b/examples/apidoc/RestClientV3/getFills.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/fills +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFinancialRecords.js b/examples/apidoc/RestClientV3/getFinancialRecords.js new file mode 100644 index 0000000..6fef79a --- /dev/null +++ b/examples/apidoc/RestClientV3/getFinancialRecords.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/financial-records +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFinancialRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getFundingAssets.js b/examples/apidoc/RestClientV3/getFundingAssets.js new file mode 100644 index 0000000..9529eeb --- /dev/null +++ b/examples/apidoc/RestClientV3/getFundingAssets.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/funding-assets +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getFundingAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryCandles.js b/examples/apidoc/RestClientV3/getHistoryCandles.js new file mode 100644 index 0000000..8790b0a --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryCandles.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/history-candles +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryCandles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryFundingRate.js b/examples/apidoc/RestClientV3/getHistoryFundingRate.js new file mode 100644 index 0000000..8d87ef3 --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryFundingRate.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/history-fund-rate +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryFundingRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryOrders.js b/examples/apidoc/RestClientV3/getHistoryOrders.js new file mode 100644 index 0000000..808c5c3 --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/history-orders +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js new file mode 100644 index 0000000..4e50b46 --- /dev/null +++ b/examples/apidoc/RestClientV3/getHistoryStrategyOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/history-strategy-orders +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getHistoryStrategyOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getInstruments.js b/examples/apidoc/RestClientV3/getInstruments.js new file mode 100644 index 0000000..a154213 --- /dev/null +++ b/examples/apidoc/RestClientV3/getInstruments.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/instruments +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getInstruments(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanLTVConvert.js b/examples/apidoc/RestClientV3/getLoanLTVConvert.js new file mode 100644 index 0000000..fa01b04 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanLTVConvert.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/ltv-convert +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanLTVConvert(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js new file mode 100644 index 0000000..92cae20 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanMarginCoinInfo.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/ensure-coins-convert +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanMarginCoinInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanOrder.js b/examples/apidoc/RestClientV3/getLoanOrder.js new file mode 100644 index 0000000..c83f1a3 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanOrder.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/loan-order +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanProductInfo.js b/examples/apidoc/RestClientV3/getLoanProductInfo.js new file mode 100644 index 0000000..9b914cc --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanProductInfo.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/product-infos +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanProductInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanRepaidHistory.js b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js new file mode 100644 index 0000000..67ceda3 --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanRepaidHistory.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/repaid-history +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanRepaidHistory(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanRiskUnit.js b/examples/apidoc/RestClientV3/getLoanRiskUnit.js new file mode 100644 index 0000000..e0b7d1e --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanRiskUnit.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/risk-unit +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanRiskUnit(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanSymbols.js b/examples/apidoc/RestClientV3/getLoanSymbols.js new file mode 100644 index 0000000..c586a3b --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanSymbols.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/symbols +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanSymbols(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getLoanTransfered.js b/examples/apidoc/RestClientV3/getLoanTransfered.js new file mode 100644 index 0000000..05e38cf --- /dev/null +++ b/examples/apidoc/RestClientV3/getLoanTransfered.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/ins-loan/transfered +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getLoanTransfered(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getMarginLoans.js b/examples/apidoc/RestClientV3/getMarginLoans.js new file mode 100644 index 0000000..ee74543 --- /dev/null +++ b/examples/apidoc/RestClientV3/getMarginLoans.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/margin-loans +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getMarginLoans(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getMaxOpenAvailable.js b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js new file mode 100644 index 0000000..7d00312 --- /dev/null +++ b/examples/apidoc/RestClientV3/getMaxOpenAvailable.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/max-open-available +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getMaxOpenAvailable(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getOpenInterest.js b/examples/apidoc/RestClientV3/getOpenInterest.js new file mode 100644 index 0000000..0577e63 --- /dev/null +++ b/examples/apidoc/RestClientV3/getOpenInterest.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/open-interest +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getOpenInterest(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getOrderBook.js b/examples/apidoc/RestClientV3/getOrderBook.js new file mode 100644 index 0000000..94da988 --- /dev/null +++ b/examples/apidoc/RestClientV3/getOrderBook.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/orderbook +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getOrderBook(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getOrderInfo.js b/examples/apidoc/RestClientV3/getOrderInfo.js new file mode 100644 index 0000000..cb7be7b --- /dev/null +++ b/examples/apidoc/RestClientV3/getOrderInfo.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/order-info +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getOrderInfo(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getPaymentCoins.js b/examples/apidoc/RestClientV3/getPaymentCoins.js new file mode 100644 index 0000000..34afb9a --- /dev/null +++ b/examples/apidoc/RestClientV3/getPaymentCoins.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/payment-coins +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getPaymentCoins(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getPositionHistory.js b/examples/apidoc/RestClientV3/getPositionHistory.js new file mode 100644 index 0000000..53d0f85 --- /dev/null +++ b/examples/apidoc/RestClientV3/getPositionHistory.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/position/history-position +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getPositionHistory(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getPositionTier.js b/examples/apidoc/RestClientV3/getPositionTier.js new file mode 100644 index 0000000..afcef6c --- /dev/null +++ b/examples/apidoc/RestClientV3/getPositionTier.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/position-tier +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getPositionTier(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getRepayableCoins.js b/examples/apidoc/RestClientV3/getRepayableCoins.js new file mode 100644 index 0000000..a42b32e --- /dev/null +++ b/examples/apidoc/RestClientV3/getRepayableCoins.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/repayable-coins +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getRepayableCoins(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getRiskReserve.js b/examples/apidoc/RestClientV3/getRiskReserve.js new file mode 100644 index 0000000..df2ab17 --- /dev/null +++ b/examples/apidoc/RestClientV3/getRiskReserve.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/risk-reserve +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getRiskReserve(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getServerTime.js b/examples/apidoc/RestClientV3/getServerTime.js new file mode 100644 index 0000000..d64a982 --- /dev/null +++ b/examples/apidoc/RestClientV3/getServerTime.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/public/time +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getServerTime(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubAccountApiKeys.js b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js new file mode 100644 index 0000000..27e89d8 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubAccountApiKeys.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/sub-api-list +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubAccountApiKeys(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubAccountList.js b/examples/apidoc/RestClientV3/getSubAccountList.js new file mode 100644 index 0000000..e4f1792 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubAccountList.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/sub-list +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubAccountList(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubDepositAddress.js b/examples/apidoc/RestClientV3/getSubDepositAddress.js new file mode 100644 index 0000000..ccbfd59 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubDepositAddress.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-deposit-address +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubDepositAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubDepositRecords.js b/examples/apidoc/RestClientV3/getSubDepositRecords.js new file mode 100644 index 0000000..4523a21 --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubDepositRecords.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-deposit-records +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubDepositRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubTransferRecords.js b/examples/apidoc/RestClientV3/getSubTransferRecords.js new file mode 100644 index 0000000..452bc7f --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubTransferRecords.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-transfer-record +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubTransferRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getSubUnifiedAssets.js b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js new file mode 100644 index 0000000..d6376fd --- /dev/null +++ b/examples/apidoc/RestClientV3/getSubUnifiedAssets.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-unified-assets +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getSubUnifiedAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getTickers.js b/examples/apidoc/RestClientV3/getTickers.js new file mode 100644 index 0000000..0971a8e --- /dev/null +++ b/examples/apidoc/RestClientV3/getTickers.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/market/tickers +// METHOD: GET +// PUBLIC: YES + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getTickers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getTradeFills.js b/examples/apidoc/RestClientV3/getTradeFills.js new file mode 100644 index 0000000..67502d3 --- /dev/null +++ b/examples/apidoc/RestClientV3/getTradeFills.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/fills +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getTradeFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getTransferableCoins.js b/examples/apidoc/RestClientV3/getTransferableCoins.js new file mode 100644 index 0000000..1363f75 --- /dev/null +++ b/examples/apidoc/RestClientV3/getTransferableCoins.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/transferable-coins +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getTransferableCoins(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getUnfilledOrders.js b/examples/apidoc/RestClientV3/getUnfilledOrders.js new file mode 100644 index 0000000..aa40f33 --- /dev/null +++ b/examples/apidoc/RestClientV3/getUnfilledOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/unfilled-orders +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getUnfilledOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js new file mode 100644 index 0000000..d699e23 --- /dev/null +++ b/examples/apidoc/RestClientV3/getUnfilledStrategyOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/unfilled-strategy-orders +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getUnfilledStrategyOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/getWithdrawRecords.js b/examples/apidoc/RestClientV3/getWithdrawRecords.js new file mode 100644 index 0000000..c14aeb2 --- /dev/null +++ b/examples/apidoc/RestClientV3/getWithdrawRecords.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/withdrawl-records +// METHOD: GET +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.getWithdrawRecords(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/modifyOrder.js b/examples/apidoc/RestClientV3/modifyOrder.js new file mode 100644 index 0000000..dfe1338 --- /dev/null +++ b/examples/apidoc/RestClientV3/modifyOrder.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/modify-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.modifyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/modifyStrategyOrder.js b/examples/apidoc/RestClientV3/modifyStrategyOrder.js new file mode 100644 index 0000000..bacdf69 --- /dev/null +++ b/examples/apidoc/RestClientV3/modifyStrategyOrder.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/modify-strategy-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.modifyStrategyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/placeBatchOrders.js b/examples/apidoc/RestClientV3/placeBatchOrders.js new file mode 100644 index 0000000..78bcc42 --- /dev/null +++ b/examples/apidoc/RestClientV3/placeBatchOrders.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/place-batch +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.placeBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/setHoldMode.js b/examples/apidoc/RestClientV3/setHoldMode.js new file mode 100644 index 0000000..b600fa2 --- /dev/null +++ b/examples/apidoc/RestClientV3/setHoldMode.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/set-hold-mode +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.setHoldMode(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/setLeverage.js b/examples/apidoc/RestClientV3/setLeverage.js new file mode 100644 index 0000000..c2d7c3b --- /dev/null +++ b/examples/apidoc/RestClientV3/setLeverage.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/set-leverage +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.setLeverage(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/subAccountTransfer.js b/examples/apidoc/RestClientV3/subAccountTransfer.js new file mode 100644 index 0000000..1b07201 --- /dev/null +++ b/examples/apidoc/RestClientV3/subAccountTransfer.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/sub-transfer +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.subAccountTransfer(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitNewOrder.js b/examples/apidoc/RestClientV3/submitNewOrder.js new file mode 100644 index 0000000..1ace706 --- /dev/null +++ b/examples/apidoc/RestClientV3/submitNewOrder.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/place-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitNewOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitRepay.js b/examples/apidoc/RestClientV3/submitRepay.js new file mode 100644 index 0000000..925be54 --- /dev/null +++ b/examples/apidoc/RestClientV3/submitRepay.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/repay +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitRepay(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitStrategyOrder.js b/examples/apidoc/RestClientV3/submitStrategyOrder.js new file mode 100644 index 0000000..bb55656 --- /dev/null +++ b/examples/apidoc/RestClientV3/submitStrategyOrder.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/trade/place-strategy-order +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitStrategyOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitTransfer.js b/examples/apidoc/RestClientV3/submitTransfer.js new file mode 100644 index 0000000..3747e6a --- /dev/null +++ b/examples/apidoc/RestClientV3/submitTransfer.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/transfer +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitTransfer(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/submitWithdraw.js b/examples/apidoc/RestClientV3/submitWithdraw.js new file mode 100644 index 0000000..f1dbeca --- /dev/null +++ b/examples/apidoc/RestClientV3/submitWithdraw.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/withdraw +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.submitWithdraw(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/switchDeduct.js b/examples/apidoc/RestClientV3/switchDeduct.js new file mode 100644 index 0000000..5378574 --- /dev/null +++ b/examples/apidoc/RestClientV3/switchDeduct.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/account/switch-deduct +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.switchDeduct(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/RestClientV3/updateSubAccountApiKey.js b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js new file mode 100644 index 0000000..b3ae2ab --- /dev/null +++ b/examples/apidoc/RestClientV3/updateSubAccountApiKey.js @@ -0,0 +1,24 @@ +import { RestClientV3 } from 'bitget-api'; +// or if you want to use the require syntax +// const { RestClientV3 } = require('bitget-api'); + + +// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// ENDPOINT: /api/v3/user/update-sub-api +// METHOD: POST +// PUBLIC: NO + +const client = new RestClientV3({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +client.updateSubAccountApiKey(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js new file mode 100644 index 0000000..ac73ac8 --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/cancelBatchOrders.js @@ -0,0 +1,29 @@ +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +// const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: batch-cancel +// METHOD: WebSocket API +// PUBLIC: NO + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the cancelBatchOrders method +client.cancelBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + diff --git a/examples/apidoc/WebsocketAPIClient/cancelOrder.js b/examples/apidoc/WebsocketAPIClient/cancelOrder.js new file mode 100644 index 0000000..70131a8 --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/cancelOrder.js @@ -0,0 +1,29 @@ +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +// const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: cancel-order +// METHOD: WebSocket API +// PUBLIC: NO + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the cancelOrder method +client.cancelOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + diff --git a/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js new file mode 100644 index 0000000..c67f4c2 --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/placeBatchOrders.js @@ -0,0 +1,29 @@ +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +// const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: batch-place +// METHOD: WebSocket API +// PUBLIC: NO + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the placeBatchOrders method +client.placeBatchOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + diff --git a/examples/apidoc/WebsocketAPIClient/submitNewOrder.js b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js new file mode 100644 index 0000000..bae0ec7 --- /dev/null +++ b/examples/apidoc/WebsocketAPIClient/submitNewOrder.js @@ -0,0 +1,29 @@ +import { WebsocketAPIClient } from 'bitget-api'; +// or if you want to use the require syntax +// const { WebsocketAPIClient } = require('bitget-api'); + +// This example shows how to call this Bitget WebSocket API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange +// This Bitget API SDK is available on npm via "npm install bitget-api" +// WS API ENDPOINT: place-order +// METHOD: WebSocket API +// PUBLIC: NO + +// Create a WebSocket API client instance +const client = new WebsocketAPIClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', + apiPass: 'insert_api_pass_here', +}); + +// The WebSocket connection is established automatically when needed +// You can use the client to make requests immediately + +// Example use of the submitNewOrder method +client.submitNewOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); + diff --git a/examples/auth/fasterHmacSign.ts b/examples/auth/fasterHmacSign.ts new file mode 100644 index 0000000..7bd0680 --- /dev/null +++ b/examples/auth/fasterHmacSign.ts @@ -0,0 +1,143 @@ +import { createHmac } from 'crypto'; + +import { DefaultLogger, RestClientV3, WebsocketClientV3 } from '../../src/'; + +// or +// import { createHmac } from 'crypto'; +// import { DefaultLogger, RestClientV3, WebsocketClientV3 } from 'bitget-api'; + +/** + * Injecting a custom signMessage function. + * + * As of version 3.0.0 of the bitget-api Node.js/TypeScript/JavaScript + * SDK for Bitget, the SDK uses the Web Crypto API for signing requests. + * While it is compatible with Node and Browser environments, it is + * slightly slower than using Node's native crypto module (only + * available in backend Node environments). + * + * For latency sensitive users, you can inject the previous node crypto sign + * method (or your own even faster implementation), if this change affects you. + * + * This example demonstrates how to inject a custom sign function, to achieve + * the same peformance as seen before the Web Crypto API was introduced. + * + * For context on standard usage, the "signMessage" function is used: + * - During every single API call + * - After opening a new private WebSocket connection + */ + +const apiKey = process.env.API_KEY_COM; +const apiSecret = process.env.API_SECRET_COM; +const apiPass = process.env.API_PASS_COM; + +const restClient = new RestClientV3({ + apiKey: apiKey, + apiSecret: apiSecret, + apiPass: apiPass, + /** + * Set this to true to enable demo trading: + */ + demoTrading: true, + /** + * Overkill in almost every case, but if you need any optimisation available, + * you can inject a faster sign mechanism such as node's native createHmac: + */ + customSignMessageFn: async (message, secret) => { + return createHmac('sha256', secret).update(message).digest('hex'); + }, +}); + +// Optional, uncomment the "trace" override to log a lot more info about what the WS client is doing +const customLogger = { + ...DefaultLogger, + // trace: (...params) => console.log('trace', ...params), +}; + +const wsClient = new WebsocketClientV3( + { + apiKey: apiKey, + apiSecret: apiSecret, + apiPass: apiPass, + /** + * Set this to true to enable demo trading for the private account data WS + * Topics: order,execution,position,wallet,greeks + */ + demoTrading: true, + /** + * Overkill in almost every case, but if you need any optimisation available, + * you can inject a faster sign mechanism such as node's native createHmac: + */ + customSignMessageFn: async (message, secret) => { + return createHmac('sha256', secret).update(message).digest('hex'); + }, + }, + customLogger, +); + +function setWsClientEventListeners( + websocketClient: WebsocketClientV3, + accountRef: string, +): Promise { + return new Promise((resolve) => { + websocketClient.on('update', (data) => { + console.log(new Date(), accountRef, 'data ', JSON.stringify(data)); + // console.log('raw message received ', JSON.stringify(data, null, 2)); + }); + + websocketClient.on('open', (data) => { + console.log( + new Date(), + accountRef, + 'connection opened open:', + data.wsKey, + ); + }); + websocketClient.on('response', (data) => { + console.log( + new Date(), + accountRef, + 'log response: ', + JSON.stringify(data, null, 2), + ); + + if (typeof data.req_id === 'string') { + const topics = data.req_id.split(','); + if (topics.length) { + console.log(new Date(), accountRef, 'Subscribed to topics: ', topics); + return resolve(); + } + } + }); + websocketClient.on('reconnect', ({ wsKey }) => { + console.log( + new Date(), + accountRef, + 'ws automatically reconnecting.... ', + wsKey, + ); + }); + websocketClient.on('reconnected', (data) => { + console.log(new Date(), accountRef, 'ws has reconnected ', data?.wsKey); + }); + websocketClient.on('exception', (data) => { + console.error(new Date(), accountRef, 'ws exception: ', data); + }); + }); +} + +(async () => { + try { + const onSubscribed = setWsClientEventListeners(wsClient, 'demoAcc'); + + wsClient.subscribe(['position', 'account', 'order'], 'v3Private'); + + // Simple promise to ensure we're subscribed before trying anything else + await onSubscribed; + + // Start trading + const balResponse1 = await restClient.getBalances(); + console.log('balResponse1: ', JSON.stringify(balResponse1, null, 2)); + } catch (e) { + console.error('request failed: ', e); + } +})(); diff --git a/examples/auth/rest-private-rsa.md b/examples/auth/rest-private-rsa.md new file mode 100644 index 0000000..3149266 --- /dev/null +++ b/examples/auth/rest-private-rsa.md @@ -0,0 +1,109 @@ +# RSA Authentication with Bitget APIs in Node.js, JavaScript & TypeScript + +## Creating RSA Keys + +Officially, Bitget recommends downloading and running a key generator from their repo. Guidance for this can be found on the Bitget's website when trying to add a new RSA API key. + +However, openssl can be used to create the public & private key files using the following steps: + +```bash +# Generate a private key with either 2048 or 4096 bit length +openssl genrsa -out rsa-private-key.pem 4096 + +# Generate a corresponding public key +openssl rsa -in rsa-private-key.pem -pubout -out rsa-public-key.pem +``` + +## Using the RSA public key to get an API key from Bitget + +Once created, keep your **private key** completely secret! The **public** key needs to be provided to Bitget when creating new API credentials with the "Self-generated" option. + +Your public key should look something like this: + +```pem +-----BEGIN PUBLIC KEY----- +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1uWxxOXZUaX6AeZszf4x +rBsU6axA5ipwxG7VPihVgssphDrrSOD0hZqnBmtF2bvT9ee1U0XOfMn+H+J5SH+1 +jgUpfioqH0L+KXl6wmLoPsadgfJz0SiQlFnKTkDXvMmecr6cdMHi2qNEx4CMc68C +obvQ4Voz5qqpDwbohGtJh0p10PB//0Ejcoz0UwrTDq8BGeFmWa9pL/7h2vHtw+QU +UxlnGmt98M8KkKqqvVicMK+IVtng/QlDw9ofG2kQcbBkPRaTjNI+8ULtCDH0sOkZ +nT8PtGm4sEwmWH/dRWtUTWkMnUwCzuo/rWPb7WMprW2pKDTrLjUAr9M161t3Xa6W +JO03K3NOxupy7ilululLY8d/WKWYDOZMvS5bPiPRUoZqlJneC0CT/2q1W6GfWzsT +DCDTpgq/Ao7jTtnME9iadpwvFn0nMtNgJSrFDWPq8vKY9pRcEp/Na5qvIEOQIFnp +/kIDPuMf+LZwO8lGFO3jnndY+62835rm7t6ZNM3NLoNCarvUCEasobgDJHw7x7c1 +fW/OxYtLrWGdMpsP0MewgGJZXcT7mvlBjQ+JWLoyIc5rYMIDw9RLWUPnrlRCxvPp +sD9kDX7eaipdoik5yLyMaRvd16Vt9Bck/9pbSHazm41m/nd4KCZeGdsvrAA2beww +zFWQQV9EX6/VLBgbnGTsMe0CAwEAAQ== +-----END PUBLIC KEY----- +``` + +Submit this in the "Upload public key" form, shown when creating a new API key on Bitget and choosing the "self-generated"/RSA option. + +Note: the "-----BEGIN PUBLIC KEY-----" and "-----END PUBLIC KEY-----" header & footer can be included. + +After using the public key to create a new API key, you will be given an API Key such as the following: + +``` +SIHqWcDeRoj6gkOjLjQh1dnV1CD7IgwQTfL4LVa8wu04zNTYVSmJBIHsjQjgwWqt +``` + +This is the first piece, used as the "apiKey" in the [rest-private-rsa.ts](./rest-private-rsa.ts) example. + +## Using the RSA private key for RSA authentication with Bitget APIs in Node.js + +Your private key, if generated with the above steps, should look something like this (but with much more text): + +```pem +-----BEGIN RSA PRIVATE KEY----- +uayyi6wFTaNeG1/WCqhrowj2kCx8eB6NDZYl+OS9ZI9WC +q/44iFERNuP0TXvQx8tgvSZXyu4/G618QzKh0Ii1uAATt2upa8dp1uGl2U7EqBE8 +p5y4pPzJuwvB3j6LQON20u2Wpbg8PQZACMfKym7lYDO+9MloK/gAQpyeYJzbw92C +YE/ymq4JVjCMCQKCAQEA4/X0I9TO8vT0D0l83o693QA3C09uSZ6j9Obx5UrtDnA9 +sMkkRoe+R/vvIpVDzukMEEOmCuxbcdPoniVUKlTooK0Llo6JJ1l8CdFzQsOR97Pe +csB6pxkLLH2qHx05xPBy4PyoB +-----END RSA PRIVATE KEY----- +``` + +This is your secret, you should never share this with anyone, not even Bitget! Treat this like a password. + +As part of this authentication process, your private key is used to generate a signature (using `RSA-SHA256`). This SDK handles this process automatically for you. RSA authentication is automatically detected if the "api_secret" parameter contains the words "PRIVATE KEY", such as the header shown in the example above. + +From here, simply use the key provided by Bitget as the `api_key` parameter and your private key (with the header) as the `api_secret` parameter. + +Based on the above example, the following would prepare the main REST client using the above credentials: + +```typescript +// Received after creating a new API key with a self-generated RSA public key on Bitget +const API_KEY = 'bg_0866563123123123123f567e83e52fd'; + +// The self-generated RSA private key, this is never directly given to Bitget, but used to generate a signature +// Note: this MUST include the "BEGIN PRIVATE KEY" header so that the SDK understands this is RSA auth +const rsaPrivateKey = ` +-----BEGIN PRIVATE KEY----- +MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC4kNgO71O0xkuH +FjHnr5pimpEeiGPAtDTAeJoS55+kVrh3ThHsm0ARf36zimU +gwrCWAnKqPlbqzWzs9mH9JvZWrEaOgWy +8wMSJ21vtz1rRJhfaUUsOC1KLoWyvzqWW44zKaxoKSqCUMJqDbxIq7RjGlmc8KGJ +scFWRSdfGEEpvqLlpTLoEtWHZP0pUUamSWrH/IgieFFhKaOPvmED24DJAlqSeEFw +z7TW4dfWPRgjCRu4AAfgCtjb+3/7ONeQfx5XFvKFM7VNi/9sRh+alRqpzKrlI +79bM1p/egrC4c8KUqrNk2s5c3HIU......THISISANEXAMPLE +-----END PRIVATE KEY----- +`; + +// This is set by you when registering your RSA API key in Bitget's website. +const API_PASS = 'TestingRSA'; + +const client = new RestClientV2({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); + +const clientV3 = new RestClientV3({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); +``` + +For a complete example, refer to the [rest-private-rsa.ts](./rest-private-rsa.ts) file on GitHub. diff --git a/examples/auth/rest-private-rsa.ts b/examples/auth/rest-private-rsa.ts new file mode 100644 index 0000000..21ffdc5 --- /dev/null +++ b/examples/auth/rest-private-rsa.ts @@ -0,0 +1,57 @@ +import { RestClientV2, RestClientV3 } from '../../src'; + +// Import frmo NPM: +// import { RestClientV2, RestClientV3 } from 'bitget-api'; +// or if you prefer require: +// const { RestClientV2, RestClientV3 } = require('bitget-api'); + +// Received after creating a new API key with a self-generated RSA public key on Bitget +const API_KEY = 'bg_0866563123123123123f567e83e52fd'; + +// The self-generated RSA private key, this is never directly given to Bitget, but used to generate a signature +// Note: this MUST include the "BEGIN PRIVATE KEY" header so that the SDK understands this is RSA auth +const rsaPrivateKey = ` +-----BEGIN PRIVATE KEY----- +MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC4kNgO71O0xkuH +FjHnr5pimpEeiGPAtDTAeJoS55+kVrh3ThHsm0ARf36zimU +gwrCWAnKqPlbqzWzs9mH9JvZWrEaOgWy +8wMSJ21vtz1rRJhfaUUsOC1KLoWyvzqWW44zKaxoKSqCUMJqDbxIq7RjGlmc8KGJ +scFWRSdfGEEpvqLlpTLoEtWHZP0pUUamSWrH/IgieFFhKaOPvmED24DJAlqSeEFw +z7TW4dfWPRgjCRu4AAfgCtjb+3/7ONeQfx5XFvKFM7VNi/9sRh+alRqpzKrlI +79bM1p/egrC4c8KUqrNk2s5c3HIU......THISISANEXAMPLE +-----END PRIVATE KEY----- +`; + +// This is set by you when registering your RSA API key in Bitget's website. +const API_PASS = 'TestingRSA'; + +const client = new RestClientV2({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); + +const clientV3 = new RestClientV3({ + apiKey: API_KEY, + apiSecret: rsaPrivateKey, + apiPass: API_PASS, +}); + +// const wsClient = new WebsocketClientV2({ +// apiKey: API_KEY, +// apiSecret: rsaPrivateKey, +// apiPass: API_PASS, +// }); + +(async () => { + try { + console.log('V2 private api call result: ', await client.getBalances()); + } catch (e) { + console.error('V2 request failed: ', e); + } + try { + console.log('V3 private api call result: ', await clientV3.getBalances()); + } catch (e) { + console.error('V3 request failed: ', e); + } +})(); diff --git a/examples/deprecated-V1-REST/rest-private-futures.ts b/examples/deprecated-V1-REST/rest-private-futures.ts index b52717d..e9f2aa2 100644 --- a/examples/deprecated-V1-REST/rest-private-futures.ts +++ b/examples/deprecated-V1-REST/rest-private-futures.ts @@ -1,4 +1,4 @@ -import { FuturesClient, WebsocketClient } from '../../src/index'; +import { FuturesClient } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; diff --git a/examples/deprecated-V1-REST/rest-private-spot.ts b/examples/deprecated-V1-REST/rest-private-spot.ts index f897ada..bbccaab 100644 --- a/examples/deprecated-V1-REST/rest-private-spot.ts +++ b/examples/deprecated-V1-REST/rest-private-spot.ts @@ -1,4 +1,4 @@ -import { SpotClient, WebsocketClient } from '../../src/index'; +import { SpotClient } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; diff --git a/examples/deprecated-V1-REST/rest-public-futures.ts b/examples/deprecated-V1-REST/rest-public-futures.ts index 423c6f9..1395c6a 100644 --- a/examples/deprecated-V1-REST/rest-public-futures.ts +++ b/examples/deprecated-V1-REST/rest-public-futures.ts @@ -1,4 +1,4 @@ -import { FuturesClient, WebsocketClient } from '../../src/index'; +import { FuturesClient } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; @@ -23,7 +23,7 @@ const symbol = 'BTCUSDT_UMCBL'; timestampNow.toString(), candlesToFetch.toString(), ); - console.log('getCandles returned ' + response.length + ' candles'); + console.log('getCandles returned ' + response.data.length + ' candles'); } catch (e) { console.error('request failed: ', e); } diff --git a/examples/deprecated-V1-REST/rest-trade-futures.ts b/examples/deprecated-V1-REST/rest-trade-futures.ts index bb6fb2c..650f720 100644 --- a/examples/deprecated-V1-REST/rest-trade-futures.ts +++ b/examples/deprecated-V1-REST/rest-trade-futures.ts @@ -1,9 +1,10 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import { FuturesClient, isWsFuturesAccountSnapshotEvent, isWsFuturesPositionsSnapshotEvent, NewFuturesOrder, - WebsocketClient, + WebsocketClientLegacyV1, } from '../../src'; // or @@ -29,7 +30,7 @@ const client = new FuturesClient({ // apiPass: 'apiPassHere', }); -const wsClient = new WebsocketClient({ +const wsClient = new WebsocketClientLegacyV1({ apiKey: API_KEY, apiSecret: API_SECRET, apiPass: API_PASS, @@ -132,6 +133,7 @@ async function handleWsUpdate(event) { side: 'open_long', size: bitcoinUSDFuturesRule.minTradeNum, symbol, + productType: '', } as const; console.log('placing order: ', order); @@ -157,6 +159,7 @@ async function handleWsUpdate(event) { side: closingSide, size: position.available, symbol: position.symbol, + productType: '', }; console.log('closing position with market order: ', closingOrder); diff --git a/examples/deprecated-V1-REST/rest-trade-spot.ts b/examples/deprecated-V1-REST/rest-trade-spot.ts index bfa171a..8fe3ab1 100644 --- a/examples/deprecated-V1-REST/rest-trade-spot.ts +++ b/examples/deprecated-V1-REST/rest-trade-spot.ts @@ -1,4 +1,4 @@ -import { SpotClient, WebsocketClient } from '../../src/index'; +import { SpotClient, WebsocketClientLegacyV1 } from '../../src/index'; // or // import { SpotClient } from 'bitget-api'; @@ -17,7 +17,7 @@ const client = new SpotClient({ // apiPass: 'apiPassHere', }); -const wsClient = new WebsocketClient({ +const wsClient = new WebsocketClientLegacyV1({ apiKey: API_KEY, apiSecret: API_SECRET, apiPass: API_PASS, diff --git a/examples/deprecated-V1-Websockets/ws-private.ts b/examples/deprecated-V1-Websockets/ws-private.ts index e5acc1a..24ce5a3 100644 --- a/examples/deprecated-V1-Websockets/ws-private.ts +++ b/examples/deprecated-V1-Websockets/ws-private.ts @@ -1,4 +1,4 @@ -import { WebsocketClient, DefaultLogger } from '../../src'; +import { DefaultLogger, WebsocketClientLegacyV1 } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from 'bitget-api'; @@ -6,16 +6,16 @@ import { WebsocketClient, DefaultLogger } from '../../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; - logger.info(`Starting private V1 websocket`); + logger.info('Starting private V1 websocket'); const API_KEY = process.env.API_KEY_COM; const API_SECRET = process.env.API_SECRET_COM; const API_PASS = process.env.API_PASS_COM; - const wsClient = new WebsocketClient( + const wsClient = new WebsocketClientLegacyV1( { apiKey: API_KEY, apiSecret: API_SECRET, diff --git a/examples/deprecated-V1-Websockets/ws-public.ts b/examples/deprecated-V1-Websockets/ws-public.ts index fb2af37..396c59a 100644 --- a/examples/deprecated-V1-Websockets/ws-public.ts +++ b/examples/deprecated-V1-Websockets/ws-public.ts @@ -1,4 +1,4 @@ -import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from '../../src'; +import { DefaultLogger, WebsocketClientLegacyV1, WS_KEY_MAP } from '../../src'; // or // import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from 'bitget-api'; @@ -6,10 +6,10 @@ import { DefaultLogger, WS_KEY_MAP, WebsocketClient } from '../../src'; (async () => { const logger = { ...DefaultLogger, - silly: (...params) => console.log('silly', ...params), + trace: (...params) => console.log('trace', ...params), }; - const wsClient = new WebsocketClient( + const wsClient = new WebsocketClientLegacyV1( { // restOptions: { // optionally provide rest options, e.g. to pass through a proxy diff --git a/index.js b/index.js deleted file mode 100644 index ce417b3..0000000 --- a/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('lib/index'); \ No newline at end of file diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 95f997f..0000000 --- a/jest.config.js +++ /dev/null @@ -1,29 +0,0 @@ -// jest.config.js -module.exports = { - rootDir: './', - globals: { - __DEV__: true, - __PROD__: false - }, - testEnvironment: 'node', - preset: 'ts-jest', - verbose: true, // report individual test - bail: false, // enable to stop test when an error occur, - detectOpenHandles: false, - moduleDirectories: ['node_modules', 'src', 'test'], - testMatch: ['**/test/**/*.test.ts?(x)'], - testPathIgnorePatterns: ['node_modules/', 'dist/', '.json'], - collectCoverageFrom: [ - 'src/**/*.ts' - ], - testTimeout: 10000, - coverageThreshold: { - // coverage strategy - global: { - branches: 80, - functions: 80, - lines: 50, - statements: -10 - } - } -}; diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000..eb2e820 --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,224 @@ +/** + * For a detailed explanation regarding each configuration property, visit: + * https://jestjs.io/docs/configuration + */ + +import type { Config } from 'jest'; + +const config: Config = { + // All imported modules in your tests should be mocked automatically + // automock: false, + + // Stop running tests after `n` failures + // bail: 0, + bail: false, // enable to stop test when an error occur, + + // The directory where Jest should store its cached dependency information + // cacheDirectory: "/private/var/folders/kf/2k3sz4px6c9cbyzj1h_b192h0000gn/T/jest_dx", + + // Automatically clear mock calls, instances, contexts and results before every test + clearMocks: true, + + // Indicates whether the coverage information should be collected while executing the test + collectCoverage: true, + + // An array of glob patterns indicating a set of files for which coverage information should be collected + collectCoverageFrom: ['src/**/*.ts'], + + // The directory where Jest should output its coverage files + coverageDirectory: 'coverage', + + // An array of regexp pattern strings used to skip coverage collection + // coveragePathIgnorePatterns: [ + // "/node_modules/" + // ], + + // Indicates which provider should be used to instrument code for coverage + coverageProvider: 'v8', + + // A list of reporter names that Jest uses when writing coverage reports + // coverageReporters: [ + // "json", + // "text", + // "lcov", + // "clover" + // ], + + // An object that configures minimum threshold enforcement for coverage results + // coverageThreshold: undefined, + + // A path to a custom dependency extractor + // dependencyExtractor: undefined, + + // Make calling deprecated APIs throw helpful error messages + // errorOnDeprecated: false, + + extensionsToTreatAsEsm: ['.ts'], + + // The default configuration for fake timers + // fakeTimers: { + // "enableGlobally": false + // }, + + // Force coverage collection from ignored files using an array of glob patterns + // forceCoverageMatch: [], + + // A path to a module which exports an async function that is triggered once before all test suites + // globalSetup: undefined, + + // A path to a module which exports an async function that is triggered once after all test suites + // globalTeardown: undefined, + + // A set of global variables that need to be available in all test environments + // globals: {}, + + // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. + // maxWorkers: "50%", + + // An array of directory names to be searched recursively up from the requiring module's location + // moduleDirectories: [ + // "node_modules" + // ], + moduleDirectories: ['node_modules', 'src', 'test'], + + // An array of file extensions your modules use + moduleFileExtensions: [ + 'js', + 'mjs', + 'cjs', + 'jsx', + 'ts', + 'tsx', + 'json', + 'node', + ], + + // modulePaths: ['src'], + + // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module + // moduleNameMapper: {}, + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, + + // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader + // modulePathIgnorePatterns: [], + + // Activates notifications for test results + // notify: false, + + // An enum that specifies notification mode. Requires { notify: true } + // notifyMode: "failure-change", + + // A preset that is used as a base for Jest's configuration + // preset: undefined, + + // Run tests from one or more projects + // projects: undefined, + + // Use this configuration option to add custom reporters to Jest + // reporters: undefined, + + // Automatically reset mock state before every test + // resetMocks: false, + + // Reset the module registry before running each individual test + // resetModules: false, + + // A path to a custom resolver + // resolver: undefined, + + // Automatically restore mock state and implementation before every test + // restoreMocks: false, + + // The root directory that Jest should scan for tests and modules within + // rootDir: undefined, + + // A list of paths to directories that Jest should use to search for files in + // roots: [ + // "" + // ], + + // Allows you to use a custom runner instead of Jest's default test runner + // runner: "jest-runner", + + // The paths to modules that run some code to configure or set up the testing environment before each test + // setupFiles: [], + + // A list of paths to modules that run some code to configure or set up the testing framework before each test + // setupFilesAfterEnv: [], + + // The number of seconds after which a test is considered as slow and reported as such in the results. + // slowTestThreshold: 5, + + // A list of paths to snapshot serializer modules Jest should use for snapshot testing + // snapshotSerializers: [], + + // The test environment that will be used for testing + // testEnvironment: "jest-environment-node", + + // Options that will be passed to the testEnvironment + // testEnvironmentOptions: {}, + + // Adds a location field to test results + // testLocationInResults: false, + + // The glob patterns Jest uses to detect test files + testMatch: [ + // "**/__tests__/**/*.[jt]s?(x)", + '**/?(*.)+(spec|test).[tj]s?(x)', + ], + + testTimeout: 15000, + + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped + // testPathIgnorePatterns: [ + // "/node_modules/" + // ], + + // The regexp pattern or array of patterns that Jest uses to detect test files + // testRegex: [], + + // This option allows the use of a custom results processor + // testResultsProcessor: undefined, + + // This option allows use of a custom test runner + // testRunner: "jest-circus/runner", + + // A map from regular expressions to paths to transformers + // transform: undefined, + + transform: { + '^.+\\.m?[tj]sx?$': [ + 'ts-jest', + { + tsconfig: 'test/tsconfig.test.json', + useESM: true, + }, + ], + }, + + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation + // transformIgnorePatterns: [ + // "/node_modules/", + // "\\.pnp\\.[^\\/]+$" + // ], + + // Prevents import esm module error from v1 axios release, issue #5026 + transformIgnorePatterns: ['node_modules/(?!axios)'], + + // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them + // unmockedModulePathPatterns: undefined, + + // Indicates whether each individual test should be reported during the run + // verbose: undefined, + verbose: true, // report individual test + + // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode + // watchPathIgnorePatterns: [], + + // Whether to use watchman for file crawling + // watchman: true, +}; + +export default config; diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index 5816065..0000000 --- a/jsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "target": "ES6", - "module": "commonjs" - }, - "exclude": [ - "node_modules", - "**/node_modules/*", - "coverage", - "doc" - ] -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 142261f..e80a504 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,39 +1,43 @@ { "name": "bitget-api", - "version": "2.3.6", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bitget-api", - "version": "2.3.6", + "version": "3.0.0", "license": "MIT", "dependencies": { - "axios": "^1.6.1", + "axios": "^1.10.0", "isomorphic-ws": "^5.0.0", "ws": "^8.9.0" }, "devDependencies": { "@types/jest": "^29.0.3", - "@types/node": "^18.7.23", + "@types/node": "^22.10.2", + "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.24.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-require-extensions": "^0.1.3", "eslint-plugin-simple-import-sort": "^12.1.1", - "jest": "^29.1.1", - "source-map-loader": "^4.0.0", - "ts-jest": "^29.0.2", - "ts-loader": "^9.4.1", - "typescript": "^4.8.4", - "webpack": "^5.74.0", - "webpack-bundle-analyzer": "^4.6.1", - "webpack-cli": "^4.10.0" + "jest": "^29.7.0", + "ts-jest": "^29.4.0", + "ts-node": "^10.9.2", + "typescript": "^5.7.3" }, "funding": { "type": "individual", "url": "https://github.com/sponsors/tiagosiebler" + }, + "optionalDependencies": { + "source-map-loader": "^4.0.0", + "ts-loader": "^9.4.1", + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0" } }, "node_modules/@ampproject/remapping": { @@ -50,119 +54,52 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/compat-data": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", - "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz", + "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -173,281 +110,172 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.3", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "engines": { - "node": ">=6.9.0" + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } + "license": "ISC" }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.6" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@babel/types": "^7.28.0" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -491,6 +319,38 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -516,12 +376,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -602,6 +463,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -618,12 +495,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -633,58 +511,48 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "debug": "^4.1.0", - "globals": "^11.1.0" + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.28.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.1.tgz", + "integrity": "sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -694,13 +562,38 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, + "optional": true, "engines": { "node": ">=10.0.0" } @@ -908,16 +801,17 @@ } }, "node_modules/@jest/console": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.1.0.tgz", - "integrity": "sha512-yNoFMuAsXTP8OyweaMaIoa6Px6rJkbbG7HtgYKGP3CY7lE7ADRA0Fn5ad9O+KefKcaf6W9rywKpCWOw21WMsAw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -925,37 +819,38 @@ } }, "node_modules/@jest/core": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.1.1.tgz", - "integrity": "sha512-ppym+PLiuSmvU9ufXVb/8OtHUPcjW+bBlb8CLh6oMATgJtCE3fjDYrzJi5u1uX8q9jbmtQ7VADKJKIlp68zi3A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/console": "^29.1.0", - "@jest/reporters": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-resolve-dependencies": "^29.1.1", - "jest-runner": "^29.1.1", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "jest-watcher": "^29.1.0", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -972,89 +867,95 @@ } }, "node_modules/@jest/environment": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.1.1.tgz", - "integrity": "sha512-69WULhTD38UcjvLGRAnnwC5hDt35ZC91ZwnvWipNOAOSaQNT32uKYL/TVCT3tncB9L1D++LOmBbYhTYP4TLuuQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1" + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-qWQttxE5rEwzvDW9G3f0o8chu1EKvIfsMQDeRlXMLCtsDS94ckcqEMNgbKKz0NYlZ45xrIoy+/pngt3ZFr/2zw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, + "license": "MIT", "dependencies": { - "expect": "^29.1.0", - "jest-snapshot": "^29.1.0" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.1.0.tgz", - "integrity": "sha512-YcD5CF2beqfoB07WqejPzWq1/l+zT3SgGwcqqIaPPG1DHFn/ea8MWWXeqV3KKMhTaOM1rZjlYplj1GQxR0XxKA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, + "license": "MIT", "dependencies": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.6.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.1.1.tgz", - "integrity": "sha512-5wTGObRfL/OjzEz0v2ShXlzeJFJw8mO6ByMBwmPLd6+vkdPcmIpCvASG/PR/g8DpchSIEeDXCxQADojHxuhX8g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.1.1.tgz", - "integrity": "sha512-yTiusxeEHjXwmo3guWlN31a1harU8zekLBMlZpOZ+84rfO3HDrkNZLTfd/YaHF8CrwlNCFpDGNSQCH8WkklH/Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/types": "^29.1.0", - "jest-mock": "^29.1.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.1.0.tgz", - "integrity": "sha512-szSjHjVuBQ7aZUdBzTicCoQAAQsQFLk+/PtMfO0RQxL5mQ1iw+PSKOpyvMZcA5T6bH9pIapue5U9UCrxfOtL3w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, + "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -1062,17 +963,16 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" }, "engines": { @@ -1087,25 +987,57 @@ } } }, + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, + "license": "MIT", "dependencies": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" }, @@ -1114,13 +1046,14 @@ } }, "node_modules/@jest/test-result": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.1.0.tgz", - "integrity": "sha512-RMBhPlw1Qfc2bKSf3RFPCyFSN7cfWVSTxRD8JrnvqdqgaDgrq4aGJT1A/V2+5Vq9bqBd187FpaxGTQ4zLrt08g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/console": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -1129,14 +1062,15 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.1.0.tgz", - "integrity": "sha512-1diQfwNhBAte+x3TmyfWloxT1C8GcPEPEZ4BZjmELBK2j3cdqi0DofoJUxBDDUBBnakbv8ce0B7CIzprsupPSA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/test-result": "^29.1.0", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -1144,38 +1078,40 @@ } }, "node_modules/@jest/transform": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.1.0.tgz", - "integrity": "sha512-NI1zd62KgM0lW6rWMIZDx52dfTIDd+cnLQNahH0YhH7TVmQVigumJ6jszuhAzvKHGm55P2Fozcglb5sGMfFp3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.1.0.tgz", - "integrity": "sha512-lE30u3z4lbTOqf5D7fDdoco3Qd8H6F/t73nLOswU4x+7VhgDQMX5y007IMqrKjFHdnpslaYymVFhWX+ttXNARQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -1203,7 +1139,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.0.0" } @@ -1212,7 +1148,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6.0.0" } @@ -1221,7 +1157,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, + "optional": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -1231,7 +1167,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, + "optional": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1242,16 +1178,18 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "devOptional": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "devOptional": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -1304,97 +1242,128 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@polka/url": { - "version": "1.0.0-next.21", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", - "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", - "dev": true - }, "node_modules/@sinclair/typebox": { - "version": "0.24.43", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", - "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", - "dev": true + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, + "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", + "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "optional": true }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.0", @@ -1406,10 +1375,11 @@ } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } @@ -1428,31 +1398,41 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "optional": true }, "node_modules/@types/node": { - "version": "18.7.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", - "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", - "dev": true - }, - "node_modules/@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true + "version": "22.16.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.16.4.tgz", + "integrity": "sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } }, "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -1497,7 +1477,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.18.0", "@typescript-eslint/types": "8.18.0", @@ -1539,6 +1518,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "8.18.0", "@typescript-eslint/utils": "8.18.0", @@ -1575,6 +1555,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "8.18.0", "@typescript-eslint/visitor-keys": "8.18.0", @@ -1597,10 +1578,11 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -1610,6 +1592,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1621,10 +1604,11 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -1637,6 +1621,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@typescript-eslint/scope-manager": "8.18.0", @@ -1685,16 +1670,17 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", - "dev": true + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" }, "node_modules/@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -1704,25 +1690,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true + "optional": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true + "optional": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true + "optional": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -1733,13 +1719,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true + "optional": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1751,7 +1737,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, + "optional": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -1760,7 +1746,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, + "optional": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -1769,13 +1755,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true + "optional": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1791,7 +1777,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -1804,7 +1790,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -1816,7 +1802,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -1830,7 +1816,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, + "optional": true, "dependencies": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -1840,7 +1826,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, + "optional": true, "peerDependencies": { "webpack": "4.x.x || 5.x.x", "webpack-cli": "4.x.x" @@ -1850,7 +1836,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, + "optional": true, "dependencies": { "envinfo": "^7.7.3" }, @@ -1862,7 +1848,7 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, + "optional": true, "peerDependencies": { "webpack-cli": "4.x.x" }, @@ -1876,25 +1862,25 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "optional": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "optional": true }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true + "optional": true }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "dev": true, + "devOptional": true, "bin": { "acorn": "bin/acorn" }, @@ -1906,7 +1892,7 @@ "version": "1.9.5", "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, + "optional": true, "peerDependencies": { "acorn": "^8" } @@ -1921,10 +1907,14 @@ } }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, "engines": { "node": ">=0.4.0" } @@ -1933,7 +1923,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "devOptional": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1949,7 +1939,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, + "optional": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -1959,6 +1949,7 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -1974,6 +1965,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -1994,7 +1986,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "devOptional": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -2006,10 +1998,11 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2018,38 +2011,53 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", - "integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "node_modules/babel-jest": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.1.0.tgz", - "integrity": "sha512-0XiBgPRhMSng+ThuXz0M/WpOeml/q5S4BFIaDS5uQb+lCjOzd0OfYEN4hWte5fDy7SZ6rNmEi16UpWGurSg2nQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/transform": "^29.1.0", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -2078,10 +2086,11 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -2093,35 +2102,40 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "node_modules/babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, + "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -2138,10 +2152,11 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2151,7 +2166,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "devOptional": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -2163,7 +2178,7 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -2208,6 +2223,7 @@ "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } @@ -2216,7 +2232,20 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "devOptional": true + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/callsites": { "version": "3.1.0", @@ -2240,7 +2269,7 @@ "version": "1.0.30001664", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -2260,7 +2289,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, + "devOptional": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2277,6 +2306,7 @@ "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -2285,7 +2315,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, + "optional": true, "engines": { "node": ">=6.0" } @@ -2297,27 +2327,32 @@ "dev": true }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, + "optional": true, "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -2332,22 +2367,24 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, + "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true, + "license": "MIT" }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "devOptional": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2359,13 +2396,13 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "devOptional": true }, "node_modules/colorette": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true + "optional": true }, "node_modules/combined-stream": { "version": "1.0.8", @@ -2382,7 +2419,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "optional": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -2391,19 +2428,46 @@ "dev": true }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "~5.1.1" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, + "devOptional": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2431,10 +2495,19 @@ } }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", + "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-is": { "version": "0.1.4", @@ -2443,10 +2516,11 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2464,15 +2538,27 @@ "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -2489,23 +2575,48 @@ "node": ">=6.0.0" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } }, "node_modules/electron-to-chromium": { "version": "1.5.29", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", - "dev": true + "devOptional": true }, "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2517,13 +2628,14 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/enhanced-resolve": { "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, + "optional": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -2536,7 +2648,7 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true, + "optional": true, "bin": { "envinfo": "dist/cli.js" }, @@ -2549,21 +2661,67 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, + "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "dev": true + "optional": true + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -2773,7 +2931,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, + "devOptional": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -2785,7 +2943,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=4.0" } @@ -2803,7 +2961,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, + "optional": true, "engines": { "node": ">=0.8.x" } @@ -2813,6 +2971,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -2841,16 +3000,17 @@ } }, "node_modules/expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-1NCfR0FEArn9Vq1KEjhPd1rggRLiWgo87gfMK4iKn6DcVzJBRMyDNX22hyND5KiSRPIPQ5KtsY6HLxsQ0MU86w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/expect-utils": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2860,7 +3020,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "devOptional": true }, "node_modules/fast-diff": { "version": "1.3.0", @@ -2869,16 +3029,17 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -2889,6 +3050,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -2900,7 +3062,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "devOptional": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -2912,7 +3074,7 @@ "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, + "optional": true, "engines": { "node": ">= 4.9.1" } @@ -2931,6 +3093,7 @@ "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } @@ -2944,14 +3107,47 @@ "flat-cache": "^3.0.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "devOptional": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3014,12 +3210,15 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -3033,11 +3232,12 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -3047,10 +3247,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -3066,10 +3269,35 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -3079,11 +3307,25 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3127,7 +3369,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "optional": true }, "node_modules/globals": { "version": "13.24.0", @@ -3144,11 +3386,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "devOptional": true }, "node_modules/graphemer": { "version": "1.4.0", @@ -3156,26 +3410,11 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "dev": true, - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, + "devOptional": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -3187,22 +3426,63 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } @@ -3211,7 +3491,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -3245,10 +3525,11 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "devOptional": true, + "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -3292,7 +3573,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, + "optional": true, "engines": { "node": ">= 0.10" } @@ -3301,13 +3582,14 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-core-module": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, + "devOptional": true, "dependencies": { "has": "^1.0.3" }, @@ -3329,6 +3611,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3338,6 +3621,7 @@ "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -3358,7 +3642,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.12.0" } @@ -3376,7 +3660,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, + "optional": true, "dependencies": { "isobject": "^3.0.1" }, @@ -3389,6 +3673,7 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3400,13 +3685,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "devOptional": true }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, + "optional": true, "engines": { "node": ">=0.10.0" } @@ -3445,17 +3730,18 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { @@ -3463,6 +3749,7 @@ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -3473,10 +3760,11 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -3485,16 +3773,36 @@ "node": ">=8" } }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.1.1.tgz", - "integrity": "sha512-Doe41PZ8MvGLtOZIW2RIVu94wa7jm/N775BBloVXk/G/vV6VYnDCOxBwrqekEgrd3Pn/bv8b5UdB2x0pAoQpwQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/core": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.1.1" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" @@ -3512,12 +3820,14 @@ } }, "node_modules/jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, + "license": "MIT", "dependencies": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" }, "engines": { @@ -3525,28 +3835,30 @@ } }, "node_modules/jest-circus": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.1.1.tgz", - "integrity": "sha512-Ii+3JIeLF3z8j2E7fPSjPjXJLBdbAcZyfEiALRQ1Fk+FWTIfuEfZrZcjSaBdz/k/waoq+bPf9x/vBCXIAyLLEQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -3555,22 +3867,22 @@ } }, "node_modules/jest-cli": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.1.1.tgz", - "integrity": "sha512-nz/JNtqDFf49R2KgeZ9+6Zl1uxSuRsg/tICC+DHMh+bQ0co6QqBPWKg3FtW4534bs8/J2YqFC2Lct9DZR24z0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/core": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, "bin": { @@ -3589,31 +3901,32 @@ } }, "node_modules/jest-config": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.1.1.tgz", - "integrity": "sha512-o2iZrQMOiF54zOw1kOcJGmfKzAW+V2ajZVWxbt+Ex+g0fVaTkk215BD/GFhrviuic+Xk7DpzUmdTT9c1QfsPqg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.1.0", - "@jest/types": "^29.1.0", - "babel-jest": "^29.1.0", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.1.1", - "jest-environment-node": "^29.1.1", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-runner": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -3634,25 +3947,27 @@ } }, "node_modules/jest-diff": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.1.0.tgz", - "integrity": "sha512-ZJyWG30jpVHwxLs8xxR1so4tz6lFARNztnFlxssFpQdakaW0isSx9rAKs/6aQUKQDZ/DgSpY6HjUGLO9xkNdRw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, + "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -3661,62 +3976,66 @@ } }, "node_modules/jest-each": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.1.0.tgz", - "integrity": "sha512-ELSZV/L4yjqKU2O0bnDTNHlizD4IRS9DX94iAB6QpiPIJsR453dJW7Ka7TXSmxQdc66HNNOhUcQ5utIeVCKGyA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.1.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-environment-node": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.1.1.tgz", - "integrity": "sha512-0nwTca4L2N8iM33A+JMfBdygR6B3N/bcPoLe1hEd9o87KLxDZwKGvpTGSfXpjtyqNQXiaL/3G+YOcSoeq/syPw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.1.0.tgz", - "integrity": "sha512-qn+QVZ6JHzzx6g8XrMrNNvvIWrgVT6FzOoxTP5hQ1vEu6r9use2gOb0sSeC3Xle7eaDLN4DdAazSKnWskK3B/g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -3728,46 +4047,49 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.1.0.tgz", - "integrity": "sha512-7ZdlIA2UXBIzXBNadta7pohrrvbD/Jp5T55Ux2DE1BSGul4RglIPHt7cZ0V3ll+ppBC1pGaBiWPBfLcQ2dDc3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, + "license": "MIT", "dependencies": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.1.0.tgz", - "integrity": "sha512-pfthsLu27kZg+T1XTUGvox0r3gP3KtqdMPliVd/bs6iDrZ9Z6yJgLbw6zNc4DHtCcyzq9UW0jmszCX8DdFU/wA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.1.0.tgz", - "integrity": "sha512-NzGXD9wgCxUy20sIvyOsSA/KzQmkmagOVGE5LnT2juWn+hB88gCQr8N/jpu34CXRIXmV7INwrQVVwhnh72pY5A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -3776,24 +4098,26 @@ } }, "node_modules/jest-mock": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.1.1.tgz", - "integrity": "sha512-vDe56JmImqt3j8pHcEIkahQbSCnBS49wda0spIl0bkrIM7VDZXjKaes6W28vKZye0atNAcFaj3dxXh0XWjBW4Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.1.0" + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -3807,28 +4131,30 @@ } }, "node_modules/jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.1.0.tgz", - "integrity": "sha512-0IETuMI58nbAWwCrtX1QQmenstlWOEdwNS5FXxpEMAs6S5tttFiEoXUwGTAiI152nqoWRUckAgt21FP4wqeZWA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { @@ -3836,43 +4162,45 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.1.1.tgz", - "integrity": "sha512-AMRTJyiK8caRXq3pa9i4oXX6yH+am5v0HwCUq1yk9lxI3ARihyT2OfEySJJo3ER7xpxf3b6isfp1sO6PQY3N0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, + "license": "MIT", "dependencies": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.1.0" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.1.1.tgz", - "integrity": "sha512-HqazsMPXB62Zi2oJEl+Ta9aUWAaR4WdT7ow25pcS99PkOsWQoYH+yyaKbAHBUf8NOqPbZ8T4Q8gt8ZBFEJJdVQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/console": "^29.1.0", - "@jest/environment": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-leak-detector": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-resolve": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-util": "^29.1.0", - "jest-watcher": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -3881,31 +4209,32 @@ } }, "node_modules/jest-runtime": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.1.1.tgz", - "integrity": "sha512-DA2nW5GUAEFUOFztVqX6BOHbb1tUO1iDzlx+bOVdw870UIkv09u3P5nTfK3N+xtqy/fGlLsg7UCzhpEJnwKilg==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/globals": "^29.1.1", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -3914,48 +4243,43 @@ } }, "node_modules/jest-snapshot": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.1.0.tgz", - "integrity": "sha512-nHZoA+hpbFlkyV8uLoLJQ/80DLi3c6a5zeELgfSZ5bZj+eljqULr79KBQakp5xyH3onezf4k+K+2/Blk5/1O+g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.1.0", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.1.0", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -3964,12 +4288,13 @@ } }, "node_modules/jest-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.1.0.tgz", - "integrity": "sha512-5haD8egMAEAq/e8ritN2Gr1WjLYtXi4udAIZB22GnKlv/2MHkbCjcyjgDBmyezAMMeQKGfoaaDsWCmVlnHZ1WQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -3981,17 +4306,18 @@ } }, "node_modules/jest-validate": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.1.0.tgz", - "integrity": "sha512-EQKRweSxmIJelCdirpuVkeCS1rSNXJFtSGEeSRFwH39QGioy7qKRSY8XBB4qFiappbsvgHnH0V6Iq5ASs11knA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.1.0" + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -4002,6 +4328,7 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -4010,18 +4337,19 @@ } }, "node_modules/jest-watcher": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.1.0.tgz", - "integrity": "sha512-JXw7+VpLSf+2yfXlux1/xR65fMn//0pmiXd6EtQWySS9233aA+eGS+8Y5o2imiJ25JBKdG8T45+s78CNQ71Fbg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.1.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { @@ -4029,12 +4357,14 @@ } }, "node_modules/jest-worker": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.1.0.tgz", - "integrity": "sha512-yr7RFRAxI+vhL/cGB9B0FhD+QfaWh1qSxurx7gLP16dfmqhG8w75D/CQFU8ZetvhiQqLZh8X0C4rxwsZy6HITQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -4047,6 +4377,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4061,7 +4392,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -4076,28 +4408,29 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "devOptional": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "devOptional": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -4121,7 +4454,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, + "optional": true, "engines": { "node": ">=0.10.0" } @@ -4131,6 +4464,7 @@ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4140,6 +4474,7 @@ "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4161,13 +4496,14 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, + "optional": true, "engines": { "node": ">=6.11.5" } @@ -4187,12 +4523,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -4209,7 +4539,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, + "optional": true, "dependencies": { "yallist": "^4.0.0" }, @@ -4218,20 +4548,34 @@ } }, "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { - "semver": "^6.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -4243,21 +4587,32 @@ "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "devOptional": true }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -4266,7 +4621,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, + "devOptional": true, "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -4299,6 +4654,7 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4315,15 +4671,6 @@ "node": "*" } }, - "node_modules/mrmime": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", - "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4340,25 +4687,27 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "optional": true }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true + "devOptional": true }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4368,6 +4717,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -4389,6 +4739,7 @@ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -4399,15 +4750,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true, - "bin": { - "opener": "bin/opener-bin.js" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -4459,7 +4801,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -4481,6 +4823,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -4498,7 +4841,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4516,7 +4859,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4525,19 +4868,20 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "devOptional": true }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "devOptional": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8.6" }, @@ -4546,10 +4890,11 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } @@ -4558,7 +4903,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, + "devOptional": true, "dependencies": { "find-up": "^4.0.0" }, @@ -4570,7 +4915,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, + "devOptional": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -4583,7 +4928,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, + "devOptional": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -4595,7 +4940,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, + "devOptional": true, "dependencies": { "p-try": "^2.0.0" }, @@ -4610,7 +4955,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, + "devOptional": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -4656,12 +5001,13 @@ } }, "node_modules/pretty-format": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.1.0.tgz", - "integrity": "sha512-dZ21z0UjKVSiEkrPAt2nJnGfrtYMFBlNW4wTkJsIp9oB5A8SUQ8DuJ9EUgAvYyNfMeoGmKiDnpJvM489jkzdSQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -4686,6 +5032,7 @@ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, + "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -4703,11 +5050,28 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -4732,22 +5096,23 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, + "optional": true, "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" }, "node_modules/rechoir": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, + "optional": true, "dependencies": { "resolve": "^1.9.0" }, @@ -4760,6 +5125,7 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4768,7 +5134,7 @@ "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, + "devOptional": true, "dependencies": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -4785,7 +5151,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, + "devOptional": true, "dependencies": { "resolve-from": "^5.0.0" }, @@ -4797,7 +5163,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4812,10 +5178,11 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -4872,19 +5239,19 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "optional": true }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "optional": true }, "node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, + "optional": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -4911,7 +5278,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, + "optional": true, "dependencies": { "randombytes": "^2.1.0" } @@ -4920,7 +5287,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, + "optional": true, "dependencies": { "kind-of": "^6.0.2" }, @@ -4932,7 +5299,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "devOptional": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4944,7 +5311,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -4955,25 +5322,12 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/sirv": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz", - "integrity": "sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==", - "dev": true, - "dependencies": { - "@polka/url": "^1.0.0-next.20", - "mrmime": "^1.0.0", - "totalist": "^1.0.0" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/slash": { "version": "3.0.0", @@ -4988,7 +5342,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -4997,7 +5351,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, + "optional": true, "engines": { "node": ">=0.10.0" } @@ -5006,7 +5360,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.0.tgz", "integrity": "sha512-i3KVgM3+QPAHNbGavK+VBq03YoJl24m9JWNbLgsjTj8aJzXG9M61bantBTNBt7CNwY2FYf+RJRYJ3pzalKjIrw==", - "dev": true, + "optional": true, "dependencies": { "abab": "^2.0.6", "iconv-lite": "^0.6.3", @@ -5028,6 +5382,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -5040,10 +5395,11 @@ "dev": true }, "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -5065,6 +5421,7 @@ "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, + "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -5078,6 +5435,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5104,6 +5462,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5113,6 +5472,7 @@ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5133,7 +5493,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "devOptional": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5141,24 +5501,11 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.4" }, @@ -5186,32 +5533,16 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, + "optional": true, "engines": { "node": ">=6" } }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/terser": { "version": "5.34.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "dev": true, + "optional": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -5229,7 +5560,7 @@ "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, + "optional": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -5263,7 +5594,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, + "optional": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -5277,7 +5608,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "optional": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5292,7 +5623,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, + "optional": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -5322,22 +5653,14 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, - "engines": { - "node": ">=4" - } + "license": "BSD-3-Clause" }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "dependencies": { "is-number": "^7.0.0" }, @@ -5345,15 +5668,6 @@ "node": ">=8.0" } }, - "node_modules/totalist": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", - "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -5367,37 +5681,44 @@ } }, "node_modules/ts-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.2.tgz", - "integrity": "sha512-P03IUItnAjG6RkJXtjjD5pu0TryQFOwcb1YKmW63rO19V0UFqL3wiXZrmR5D7qYjI98btzIOAcYafLZ0GHAcQg==", + "version": "29.4.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz", + "integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==", "dev": true, + "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.1", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.2", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3" + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <6" }, "peerDependenciesMeta": { "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -5406,17 +5727,18 @@ }, "esbuild": { "optional": true + }, + "jest-util": { + "optional": true } } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -5424,11 +5746,24 @@ "node": ">=10" } }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ts-loader": { "version": "9.4.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.1.tgz", "integrity": "sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==", - "dev": true, + "optional": true, "dependencies": { "chalk": "^4.1.0", "enhanced-resolve": "^5.0.0", @@ -5447,7 +5782,7 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, + "optional": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -5458,6 +5793,50 @@ "node": ">=10" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -5481,6 +5860,7 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -5498,23 +5878,31 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "dev": true, + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "devOptional": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "devOptional": true, + "license": "MIT" + }, "node_modules/update-browserslist-db": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -5544,20 +5932,28 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, + "devOptional": true, "dependencies": { "punycode": "^2.1.0" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, + "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" @@ -5568,6 +5964,7 @@ "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } @@ -5576,7 +5973,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, + "optional": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -5589,7 +5986,7 @@ "version": "5.95.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "dev": true, + "optional": true, "dependencies": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -5631,64 +6028,11 @@ } } }, - "node_modules/webpack-bundle-analyzer": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.6.1.tgz", - "integrity": "sha512-oKz9Oz9j3rUciLNfpGFjOb49/jEpXNmWdVH8Ls//zNcnLlQdTGXQQMsBbb/gR7Zl8WNLxVCq+0Hqbx3zv6twBw==", - "dev": true, - "dependencies": { - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "chalk": "^4.1.0", - "commander": "^7.2.0", - "gzip-size": "^6.0.0", - "lodash": "^4.17.20", - "opener": "^1.5.2", - "sirv": "^1.0.7", - "ws": "^7.3.1" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/webpack-cli": { "version": "4.10.0", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, + "optional": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -5735,7 +6079,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, + "optional": true, "engines": { "node": ">= 10" } @@ -5744,7 +6088,7 @@ "version": "5.8.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, + "optional": true, "dependencies": { "clone-deep": "^4.0.1", "wildcard": "^2.0.0" @@ -5757,7 +6101,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, + "optional": true, "engines": { "node": ">=10.13.0" } @@ -5766,7 +6110,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, + "optional": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -5779,7 +6123,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, + "optional": true, "engines": { "node": ">=4.0" } @@ -5788,7 +6132,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, + "devOptional": true, "dependencies": { "isexe": "^2.0.0" }, @@ -5803,7 +6147,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true + "optional": true }, "node_modules/word-wrap": { "version": "1.2.5", @@ -5819,6 +6163,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5875,6 +6220,7 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -5883,21 +6229,22 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "optional": true }, "node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" @@ -5912,6 +6259,16 @@ "node": ">=12" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -5937,317 +6294,170 @@ } }, "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" } }, "@babel/compat-data": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", - "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", "dev": true }, "@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz", + "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" } }, "@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", "dev": true, "requires": { - "@babel/types": "^7.23.3", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" } } } }, "@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "dev": true }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" } }, "@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" } }, "@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true }, - "@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true }, "@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.6" } }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@babel/types": "^7.28.0" } }, - "@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", - "dev": true - }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -6275,6 +6485,24 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.27.1" + } + }, "@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -6294,12 +6522,12 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -6356,6 +6584,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, "@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -6366,60 +6603,48 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.27.1" } }, "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" } }, "@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" } }, "@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.28.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.1.tgz", + "integrity": "sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" } }, "@bcoe/v8-coverage": { @@ -6428,11 +6653,32 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, "@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true + "optional": true }, "@eslint-community/eslint-utils": { "version": "4.4.1", @@ -6579,124 +6825,124 @@ "dev": true }, "@jest/console": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.1.0.tgz", - "integrity": "sha512-yNoFMuAsXTP8OyweaMaIoa6Px6rJkbbG7HtgYKGP3CY7lE7ADRA0Fn5ad9O+KefKcaf6W9rywKpCWOw21WMsAw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" } }, "@jest/core": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.1.1.tgz", - "integrity": "sha512-ppym+PLiuSmvU9ufXVb/8OtHUPcjW+bBlb8CLh6oMATgJtCE3fjDYrzJi5u1uX8q9jbmtQ7VADKJKIlp68zi3A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "requires": { - "@jest/console": "^29.1.0", - "@jest/reporters": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-resolve-dependencies": "^29.1.1", - "jest-runner": "^29.1.1", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "jest-watcher": "^29.1.0", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" } }, "@jest/environment": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.1.1.tgz", - "integrity": "sha512-69WULhTD38UcjvLGRAnnwC5hDt35ZC91ZwnvWipNOAOSaQNT32uKYL/TVCT3tncB9L1D++LOmBbYhTYP4TLuuQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "requires": { - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1" + "jest-mock": "^29.7.0" } }, "@jest/expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-qWQttxE5rEwzvDW9G3f0o8chu1EKvIfsMQDeRlXMLCtsDS94ckcqEMNgbKKz0NYlZ45xrIoy+/pngt3ZFr/2zw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "requires": { - "expect": "^29.1.0", - "jest-snapshot": "^29.1.0" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" } }, "@jest/expect-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.1.0.tgz", - "integrity": "sha512-YcD5CF2beqfoB07WqejPzWq1/l+zT3SgGwcqqIaPPG1DHFn/ea8MWWXeqV3KKMhTaOM1rZjlYplj1GQxR0XxKA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "requires": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.6.3" } }, "@jest/fake-timers": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.1.1.tgz", - "integrity": "sha512-5wTGObRfL/OjzEz0v2ShXlzeJFJw8mO6ByMBwmPLd6+vkdPcmIpCvASG/PR/g8DpchSIEeDXCxQADojHxuhX8g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "requires": { - "@jest/types": "^29.1.0", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "@jest/globals": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.1.1.tgz", - "integrity": "sha512-yTiusxeEHjXwmo3guWlN31a1harU8zekLBMlZpOZ+84rfO3HDrkNZLTfd/YaHF8CrwlNCFpDGNSQCH8WkklH/Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "requires": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/types": "^29.1.0", - "jest-mock": "^29.1.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" } }, "@jest/reporters": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.1.0.tgz", - "integrity": "sha512-szSjHjVuBQ7aZUdBzTicCoQAAQsQFLk+/PtMfO0RQxL5mQ1iw+PSKOpyvMZcA5T6bH9pIapue5U9UCrxfOtL3w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -6704,94 +6950,114 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "requires": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + } + }, + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } } }, "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "requires": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" } }, "@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.1.0.tgz", - "integrity": "sha512-RMBhPlw1Qfc2bKSf3RFPCyFSN7cfWVSTxRD8JrnvqdqgaDgrq4aGJT1A/V2+5Vq9bqBd187FpaxGTQ4zLrt08g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "requires": { - "@jest/console": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.1.0.tgz", - "integrity": "sha512-1diQfwNhBAte+x3TmyfWloxT1C8GcPEPEZ4BZjmELBK2j3cdqi0DofoJUxBDDUBBnakbv8ce0B7CIzprsupPSA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "requires": { - "@jest/test-result": "^29.1.0", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.1.0.tgz", - "integrity": "sha512-NI1zd62KgM0lW6rWMIZDx52dfTIDd+cnLQNahH0YhH7TVmQVigumJ6jszuhAzvKHGm55P2Fozcglb5sGMfFp3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.1.0", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" } }, "@jest/types": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.1.0.tgz", - "integrity": "sha512-lE30u3z4lbTOqf5D7fDdoco3Qd8H6F/t73nLOswU4x+7VhgDQMX5y007IMqrKjFHdnpslaYymVFhWX+ttXNARQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -6813,19 +7079,19 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true + "devOptional": true }, "@jridgewell/set-array": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true + "devOptional": true }, "@jridgewell/source-map": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, + "optional": true, "requires": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -6835,7 +7101,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, + "optional": true, "requires": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -6845,16 +7111,16 @@ } }, "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "devOptional": true }, "@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "devOptional": true, "requires": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -6892,62 +7158,80 @@ "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true }, - "@polka/url": { - "version": "1.0.0-next.21", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", - "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", - "dev": true - }, "@sinclair/typebox": { - "version": "0.24.43", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", - "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, + "@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -6955,33 +7239,33 @@ } }, "@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", + "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", "dev": true, "requires": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "optional": true }, "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "requires": { "@types/node": "*" } }, "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "@types/istanbul-lib-report": { @@ -6994,9 +7278,9 @@ } }, "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "requires": { "@types/istanbul-lib-report": "*" @@ -7016,30 +7300,36 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "optional": true }, "@types/node": { - "version": "18.7.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", - "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", - "dev": true - }, - "@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true + "version": "22.16.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.16.4.tgz", + "integrity": "sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g==", + "devOptional": true, + "requires": { + "undici-types": "~6.21.0" + } }, "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -7073,7 +7363,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", "dev": true, - "peer": true, "requires": { "@typescript-eslint/scope-manager": "8.18.0", "@typescript-eslint/types": "8.18.0", @@ -7127,9 +7416,9 @@ }, "dependencies": { "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -7145,9 +7434,9 @@ } }, "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true } } @@ -7183,16 +7472,16 @@ } }, "@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", "dev": true }, "@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -7202,25 +7491,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true + "optional": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true + "optional": true }, "@webassemblyjs/helper-buffer": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true + "optional": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -7231,13 +7520,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true + "optional": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7249,7 +7538,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, + "optional": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -7258,7 +7547,7 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, + "optional": true, "requires": { "@xtuc/long": "4.2.2" } @@ -7267,13 +7556,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true + "optional": true }, "@webassemblyjs/wasm-edit": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7289,7 +7578,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -7302,7 +7591,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -7314,7 +7603,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -7328,7 +7617,7 @@ "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, + "optional": true, "requires": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -7338,14 +7627,14 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, + "optional": true, "requires": {} }, "@webpack-cli/info": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, + "optional": true, "requires": { "envinfo": "^7.7.3" } @@ -7354,38 +7643,38 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, + "optional": true, "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true + "optional": true }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true + "optional": true }, "abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true + "optional": true }, "acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "dev": true + "devOptional": true }, "acorn-import-attributes": { "version": "1.9.5", "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, + "optional": true, "requires": {} }, "acorn-jsx": { @@ -7396,16 +7685,19 @@ "requires": {} }, "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "requires": { + "acorn": "^8.11.0" + } }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "devOptional": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -7417,7 +7709,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, + "optional": true, "requires": {} }, "ansi-escapes": { @@ -7447,52 +7739,64 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "devOptional": true, "requires": { "color-convert": "^2.0.1" } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", - "integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "requires": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "babel-jest": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.1.0.tgz", - "integrity": "sha512-0XiBgPRhMSng+ThuXz0M/WpOeml/q5S4BFIaDS5uQb+lCjOzd0OfYEN4hWte5fDy7SZ6rNmEi16UpWGurSg2nQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "requires": { - "@jest/transform": "^29.1.0", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -7512,9 +7816,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -7524,32 +7828,35 @@ } }, "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "requires": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" } }, "babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -7560,9 +7867,9 @@ "dev": true }, "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -7573,7 +7880,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "devOptional": true, "requires": { "fill-range": "^7.1.1" } @@ -7582,7 +7889,7 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, + "devOptional": true, "requires": { "caniuse-lite": "^1.0.30001663", "electron-to-chromium": "^1.5.28", @@ -7612,7 +7919,16 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "devOptional": true + }, + "call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } }, "callsites": { "version": "3.1.0", @@ -7630,13 +7946,13 @@ "version": "1.0.30001664", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", - "dev": true + "devOptional": true }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, + "devOptional": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -7652,7 +7968,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true + "optional": true }, "ci-info": { "version": "3.4.0", @@ -7661,19 +7977,19 @@ "dev": true }, "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", "dev": true }, "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, @@ -7681,7 +7997,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, + "optional": true, "requires": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -7695,16 +8011,16 @@ "dev": true }, "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "devOptional": true, "requires": { "color-name": "~1.1.4" } @@ -7713,13 +8029,13 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "devOptional": true }, "colorette": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true + "optional": true }, "combined-stream": { "version": "1.0.8", @@ -7733,7 +8049,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "optional": true }, "concat-map": { "version": "0.0.1", @@ -7742,19 +8058,37 @@ "dev": true }, "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "requires": { - "safe-buffer": "~5.1.1" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" } }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, + "devOptional": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -7771,10 +8105,11 @@ } }, "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", + "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "dev": true, + "requires": {} }, "deep-is": { "version": "0.1.4", @@ -7783,9 +8118,9 @@ "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, "delayed-stream": { @@ -7799,10 +8134,16 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true }, "doctrine": { @@ -7814,22 +8155,35 @@ "esutils": "^2.0.2" } }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true + "dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + } + }, + "ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "requires": { + "jake": "^10.8.5" + } }, "electron-to-chromium": { "version": "1.5.29", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", - "dev": true + "devOptional": true }, "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-regex": { @@ -7842,7 +8196,7 @@ "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, + "optional": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -7852,7 +8206,7 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true + "optional": true }, "error-ex": { "version": "1.3.2", @@ -7863,17 +8217,46 @@ "is-arrayish": "^0.2.1" } }, + "es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", - "dev": true + "optional": true + }, + "es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "requires": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + } }, "escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true + "devOptional": true }, "escape-string-regexp": { "version": "4.0.0", @@ -8004,7 +8387,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, + "devOptional": true, "requires": { "estraverse": "^5.2.0" } @@ -8013,7 +8396,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true + "devOptional": true }, "esutils": { "version": "2.0.3", @@ -8025,7 +8408,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true + "optional": true }, "execa": { "version": "5.1.1", @@ -8051,23 +8434,23 @@ "dev": true }, "expect": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.1.0.tgz", - "integrity": "sha512-1NCfR0FEArn9Vq1KEjhPd1rggRLiWgo87gfMK4iKn6DcVzJBRMyDNX22hyND5KiSRPIPQ5KtsY6HLxsQ0MU86w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "requires": { - "@jest/expect-utils": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" } }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "devOptional": true }, "fast-diff": { "version": "1.3.0", @@ -8076,16 +8459,16 @@ "dev": true }, "fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "dependencies": { "glob-parent": { @@ -8103,7 +8486,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "devOptional": true }, "fast-levenshtein": { "version": "2.0.6", @@ -8115,7 +8498,7 @@ "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true + "optional": true }, "fastq": { "version": "1.17.1", @@ -8144,11 +8527,40 @@ "flat-cache": "^3.0.4" } }, + "filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "requires": { + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "devOptional": true, "requires": { "to-regex-range": "^5.0.1" } @@ -8185,12 +8597,14 @@ "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" } }, @@ -8201,17 +8615,16 @@ "dev": true }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "gensync": { "version": "1.0.0-beta.2", @@ -8225,12 +8638,38 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "requires": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + } + }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + } + }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -8264,7 +8703,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true + "optional": true }, "globals": { "version": "13.24.0", @@ -8275,11 +8714,16 @@ "type-fest": "^0.20.2" } }, + "gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" + }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "devOptional": true }, "graphemer": { "version": "1.4.0", @@ -8287,20 +8731,11 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "dev": true, - "requires": { - "duplexer": "^0.1.2" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, + "devOptional": true, "requires": { "function-bind": "^1.1.1" } @@ -8309,7 +8744,28 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "devOptional": true + }, + "has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" + }, + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "requires": { + "has-symbols": "^1.0.3" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } }, "html-escaper": { "version": "2.0.2", @@ -8327,7 +8783,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } @@ -8349,10 +8805,10 @@ } }, "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "devOptional": true, "requires": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -8384,7 +8840,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true + "optional": true }, "is-arrayish": { "version": "0.2.1", @@ -8396,7 +8852,7 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, + "devOptional": true, "requires": { "has": "^1.0.3" } @@ -8432,7 +8888,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "devOptional": true }, "is-path-inside": { "version": "3.0.3", @@ -8444,7 +8900,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, + "optional": true, "requires": { "isobject": "^3.0.1" } @@ -8459,13 +8915,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "devOptional": true }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true + "optional": true }, "isomorphic-ws": { "version": "5.0.0", @@ -8493,13 +8949,13 @@ } }, "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, @@ -8515,387 +8971,393 @@ } }, "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "requires": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" } }, + "jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + } + }, "jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.1.1.tgz", - "integrity": "sha512-Doe41PZ8MvGLtOZIW2RIVu94wa7jm/N775BBloVXk/G/vV6VYnDCOxBwrqekEgrd3Pn/bv8b5UdB2x0pAoQpwQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "requires": { - "@jest/core": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.1.1" + "jest-cli": "^29.7.0" } }, "jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "requires": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" } }, "jest-circus": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.1.1.tgz", - "integrity": "sha512-Ii+3JIeLF3z8j2E7fPSjPjXJLBdbAcZyfEiALRQ1Fk+FWTIfuEfZrZcjSaBdz/k/waoq+bPf9x/vBCXIAyLLEQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "requires": { - "@jest/environment": "^29.1.1", - "@jest/expect": "^29.1.0", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-cli": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.1.1.tgz", - "integrity": "sha512-nz/JNtqDFf49R2KgeZ9+6Zl1uxSuRsg/tICC+DHMh+bQ0co6QqBPWKg3FtW4534bs8/J2YqFC2Lct9DZR24z0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "requires": { - "@jest/core": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" } }, "jest-config": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.1.1.tgz", - "integrity": "sha512-o2iZrQMOiF54zOw1kOcJGmfKzAW+V2ajZVWxbt+Ex+g0fVaTkk215BD/GFhrviuic+Xk7DpzUmdTT9c1QfsPqg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.1.0", - "@jest/types": "^29.1.0", - "babel-jest": "^29.1.0", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.1.1", - "jest-environment-node": "^29.1.1", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-runner": "^29.1.1", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" } }, "jest-diff": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.1.0.tgz", - "integrity": "sha512-ZJyWG30jpVHwxLs8xxR1so4tz6lFARNztnFlxssFpQdakaW0isSx9rAKs/6aQUKQDZ/DgSpY6HjUGLO9xkNdRw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.1.0.tgz", - "integrity": "sha512-ELSZV/L4yjqKU2O0bnDTNHlizD4IRS9DX94iAB6QpiPIJsR453dJW7Ka7TXSmxQdc66HNNOhUcQ5utIeVCKGyA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.1.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" } }, "jest-environment-node": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.1.1.tgz", - "integrity": "sha512-0nwTca4L2N8iM33A+JMfBdygR6B3N/bcPoLe1hEd9o87KLxDZwKGvpTGSfXpjtyqNQXiaL/3G+YOcSoeq/syPw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "requires": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/types": "^29.1.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.1.1", - "jest-util": "^29.1.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true }, "jest-haste-map": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.1.0.tgz", - "integrity": "sha512-qn+QVZ6JHzzx6g8XrMrNNvvIWrgVT6FzOoxTP5hQ1vEu6r9use2gOb0sSeC3Xle7eaDLN4DdAazSKnWskK3B/g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.1.0.tgz", - "integrity": "sha512-7ZdlIA2UXBIzXBNadta7pohrrvbD/Jp5T55Ux2DE1BSGul4RglIPHt7cZ0V3ll+ppBC1pGaBiWPBfLcQ2dDc3Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "requires": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-matcher-utils": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.1.0.tgz", - "integrity": "sha512-pfthsLu27kZg+T1XTUGvox0r3gP3KtqdMPliVd/bs6iDrZ9Z6yJgLbw6zNc4DHtCcyzq9UW0jmszCX8DdFU/wA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.1.0" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-message-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.1.0.tgz", - "integrity": "sha512-NzGXD9wgCxUy20sIvyOsSA/KzQmkmagOVGE5LnT2juWn+hB88gCQr8N/jpu34CXRIXmV7INwrQVVwhnh72pY5A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.1.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-mock": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.1.1.tgz", - "integrity": "sha512-vDe56JmImqt3j8pHcEIkahQbSCnBS49wda0spIl0bkrIM7VDZXjKaes6W28vKZye0atNAcFaj3dxXh0XWjBW4Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.1.0" + "jest-util": "^29.7.0" } }, "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "requires": {} }, "jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true }, "jest-resolve": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.1.0.tgz", - "integrity": "sha512-0IETuMI58nbAWwCrtX1QQmenstlWOEdwNS5FXxpEMAs6S5tttFiEoXUwGTAiI152nqoWRUckAgt21FP4wqeZWA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.1.0", - "jest-validate": "^29.1.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.1.1.tgz", - "integrity": "sha512-AMRTJyiK8caRXq3pa9i4oXX6yH+am5v0HwCUq1yk9lxI3ARihyT2OfEySJJo3ER7xpxf3b6isfp1sO6PQY3N0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "requires": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.1.0" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" } }, "jest-runner": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.1.1.tgz", - "integrity": "sha512-HqazsMPXB62Zi2oJEl+Ta9aUWAaR4WdT7ow25pcS99PkOsWQoYH+yyaKbAHBUf8NOqPbZ8T4Q8gt8ZBFEJJdVQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "requires": { - "@jest/console": "^29.1.0", - "@jest/environment": "^29.1.1", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.1.1", - "jest-haste-map": "^29.1.0", - "jest-leak-detector": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-resolve": "^29.1.0", - "jest-runtime": "^29.1.1", - "jest-util": "^29.1.0", - "jest-watcher": "^29.1.0", - "jest-worker": "^29.1.0", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "jest-runtime": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.1.1.tgz", - "integrity": "sha512-DA2nW5GUAEFUOFztVqX6BOHbb1tUO1iDzlx+bOVdw870UIkv09u3P5nTfK3N+xtqy/fGlLsg7UCzhpEJnwKilg==", - "dev": true, - "requires": { - "@jest/environment": "^29.1.1", - "@jest/fake-timers": "^29.1.1", - "@jest/globals": "^29.1.1", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-mock": "^29.1.1", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.1.0", - "jest-snapshot": "^29.1.0", - "jest-util": "^29.1.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" } }, "jest-snapshot": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.1.0.tgz", - "integrity": "sha512-nHZoA+hpbFlkyV8uLoLJQ/80DLi3c6a5zeELgfSZ5bZj+eljqULr79KBQakp5xyH3onezf4k+K+2/Blk5/1O+g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "requires": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.1.0", - "@jest/transform": "^29.1.0", - "@jest/types": "^29.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.1.0", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.1.0", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.1.0", - "jest-matcher-utils": "^29.1.0", - "jest-message-util": "^29.1.0", - "jest-util": "^29.1.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.1.0", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "dependencies": { "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true } } }, "jest-util": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.1.0.tgz", - "integrity": "sha512-5haD8egMAEAq/e8ritN2Gr1WjLYtXi4udAIZB22GnKlv/2MHkbCjcyjgDBmyezAMMeQKGfoaaDsWCmVlnHZ1WQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -8904,17 +9366,17 @@ } }, "jest-validate": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.1.0.tgz", - "integrity": "sha512-EQKRweSxmIJelCdirpuVkeCS1rSNXJFtSGEeSRFwH39QGioy7qKRSY8XBB4qFiappbsvgHnH0V6Iq5ASs11knA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "requires": { - "@jest/types": "^29.1.0", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.1.0" + "pretty-format": "^29.7.0" }, "dependencies": { "camelcase": { @@ -8926,28 +9388,29 @@ } }, "jest-watcher": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.1.0.tgz", - "integrity": "sha512-JXw7+VpLSf+2yfXlux1/xR65fMn//0pmiXd6EtQWySS9233aA+eGS+8Y5o2imiJ25JBKdG8T45+s78CNQ71Fbg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "requires": { - "@jest/test-result": "^29.1.0", - "@jest/types": "^29.1.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.1.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.1.0.tgz", - "integrity": "sha512-yr7RFRAxI+vhL/cGB9B0FhD+QfaWh1qSxurx7gLP16dfmqhG8w75D/CQFU8ZetvhiQqLZh8X0C4rxwsZy6HITQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "requires": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -8979,22 +9442,22 @@ } }, "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "devOptional": true }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "devOptional": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -9012,7 +9475,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true + "optional": true }, "kleur": { "version": "3.0.3", @@ -9046,7 +9509,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true + "optional": true }, "locate-path": { "version": "6.0.0", @@ -9057,12 +9520,6 @@ "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -9079,18 +9536,26 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, + "optional": true, "requires": { "yallist": "^4.0.0" } }, "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "requires": { - "semver": "^6.0.0" + "semver": "^7.5.3" + }, + "dependencies": { + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } } }, "make-error": { @@ -9108,11 +9573,16 @@ "tmpl": "1.0.5" } }, + "math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "devOptional": true }, "merge2": { "version": "1.4.1", @@ -9124,7 +9594,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, + "devOptional": true, "requires": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -9158,12 +9628,6 @@ "brace-expansion": "^1.1.7" } }, - "mrmime": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", - "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -9180,7 +9644,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "optional": true }, "node-int64": { "version": "0.4.0", @@ -9192,7 +9656,7 @@ "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true + "devOptional": true }, "normalize-path": { "version": "3.0.0", @@ -9227,12 +9691,6 @@ "mimic-fn": "^2.1.0" } }, - "opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true - }, "optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -9269,7 +9727,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "devOptional": true }, "parent-module": { "version": "1.0.1", @@ -9296,7 +9754,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "devOptional": true }, "path-is-absolute": { "version": "1.0.1", @@ -9308,37 +9766,37 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "devOptional": true }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "devOptional": true }, "picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "devOptional": true }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true + "devOptional": true }, "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "dev": true }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, + "devOptional": true, "requires": { "find-up": "^4.0.0" }, @@ -9347,7 +9805,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, + "devOptional": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -9357,7 +9815,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, + "devOptional": true, "requires": { "p-locate": "^4.1.0" } @@ -9366,7 +9824,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, + "devOptional": true, "requires": { "p-try": "^2.0.0" } @@ -9375,7 +9833,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, + "devOptional": true, "requires": { "p-limit": "^2.2.0" } @@ -9405,12 +9863,12 @@ } }, "pretty-format": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.1.0.tgz", - "integrity": "sha512-dZ21z0UjKVSiEkrPAt2nJnGfrtYMFBlNW4wTkJsIp9oB5A8SUQ8DuJ9EUgAvYyNfMeoGmKiDnpJvM489jkzdSQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -9442,6 +9900,12 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "devOptional": true + }, + "pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", "dev": true }, "queue-microtask": { @@ -9454,22 +9918,22 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.0" } }, "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "rechoir": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, + "optional": true, "requires": { "resolve": "^1.9.0" } @@ -9484,7 +9948,7 @@ "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, + "devOptional": true, "requires": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -9495,7 +9959,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, + "devOptional": true, "requires": { "resolve-from": "^5.0.0" }, @@ -9504,7 +9968,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true + "devOptional": true } } }, @@ -9515,9 +9979,9 @@ "dev": true }, "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true }, "reusify": { @@ -9548,19 +10012,19 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "optional": true }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "optional": true }, "schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, + "optional": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -9577,7 +10041,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, + "optional": true, "requires": { "randombytes": "^2.1.0" } @@ -9586,7 +10050,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, + "optional": true, "requires": { "kind-of": "^6.0.2" } @@ -9595,7 +10059,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "devOptional": true, "requires": { "shebang-regex": "^3.0.0" } @@ -9604,7 +10068,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "devOptional": true }, "signal-exit": { "version": "3.0.7", @@ -9612,17 +10076,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "sirv": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz", - "integrity": "sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==", - "dev": true, - "requires": { - "@polka/url": "^1.0.0-next.20", - "mrmime": "^1.0.0", - "totalist": "^1.0.0" - } - }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -9639,19 +10092,19 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "devOptional": true }, "source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true + "optional": true }, "source-map-loader": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.0.tgz", "integrity": "sha512-i3KVgM3+QPAHNbGavK+VBq03YoJl24m9JWNbLgsjTj8aJzXG9M61bantBTNBt7CNwY2FYf+RJRYJ3pzalKjIrw==", - "dev": true, + "optional": true, "requires": { "abab": "^2.0.6", "iconv-lite": "^0.6.3", @@ -9675,9 +10128,9 @@ "dev": true }, "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -9743,26 +10196,16 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "devOptional": true, "requires": { "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true + "devOptional": true }, "synckit": { "version": "0.9.2", @@ -9778,23 +10221,13 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true - }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } + "optional": true }, "terser": { "version": "5.34.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", - "dev": true, + "optional": true, "requires": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -9806,7 +10239,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, + "optional": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -9818,7 +10251,7 @@ "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, + "optional": true, "requires": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -9831,7 +10264,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, + "optional": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -9842,7 +10275,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "optional": true, "requires": { "has-flag": "^4.0.0" } @@ -9872,27 +10305,15 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "requires": { "is-number": "^7.0.0" } }, - "totalist": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", - "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", - "dev": true - }, "ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -9901,29 +10322,33 @@ "requires": {} }, "ts-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.0.2.tgz", - "integrity": "sha512-P03IUItnAjG6RkJXtjjD5pu0TryQFOwcb1YKmW63rO19V0UFqL3wiXZrmR5D7qYjI98btzIOAcYafLZ0GHAcQg==", + "version": "29.4.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz", + "integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==", "dev": true, "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.1", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.2", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" }, "dependencies": { "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + }, + "type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true } } }, @@ -9931,7 +10356,7 @@ "version": "9.4.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.1.tgz", "integrity": "sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==", - "dev": true, + "optional": true, "requires": { "chalk": "^4.1.0", "enhanced-resolve": "^5.0.0", @@ -9943,13 +10368,34 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, + "optional": true, "requires": { "lru-cache": "^6.0.0" } } } }, + "ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + } + }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -9978,16 +10424,22 @@ "dev": true }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "dev": true + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "devOptional": true + }, + "undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "devOptional": true }, "update-browserslist-db": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, + "devOptional": true, "requires": { "escalade": "^3.2.0", "picocolors": "^1.1.0" @@ -9997,20 +10449,26 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, + "devOptional": true, "requires": { "punycode": "^2.1.0" } }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" } }, "walker": { @@ -10026,7 +10484,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", - "dev": true, + "optional": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -10036,7 +10494,7 @@ "version": "5.95.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "dev": true, + "optional": true, "requires": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -10067,7 +10525,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, + "optional": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -10077,39 +10535,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "webpack-bundle-analyzer": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.6.1.tgz", - "integrity": "sha512-oKz9Oz9j3rUciLNfpGFjOb49/jEpXNmWdVH8Ls//zNcnLlQdTGXQQMsBbb/gR7Zl8WNLxVCq+0Hqbx3zv6twBw==", - "dev": true, - "requires": { - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "chalk": "^4.1.0", - "commander": "^7.2.0", - "gzip-size": "^6.0.0", - "lodash": "^4.17.20", - "opener": "^1.5.2", - "sirv": "^1.0.7", - "ws": "^7.3.1" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - }, - "ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "requires": {} + "optional": true } } }, @@ -10117,7 +10543,7 @@ "version": "4.10.0", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, + "optional": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -10137,7 +10563,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true + "optional": true } } }, @@ -10145,7 +10571,7 @@ "version": "5.8.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, + "optional": true, "requires": { "clone-deep": "^4.0.1", "wildcard": "^2.0.0" @@ -10155,13 +10581,13 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true + "optional": true }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, + "devOptional": true, "requires": { "isexe": "^2.0.0" } @@ -10170,7 +10596,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true + "optional": true }, "word-wrap": { "version": "1.2.5", @@ -10221,21 +10647,21 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "optional": true }, "yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { @@ -10244,6 +10670,12 @@ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index f81c7de..7bc4b49 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,14 @@ { "name": "bitget-api", - "version": "2.3.6", - "description": "Node.js & JavaScript SDK for Bitget REST APIs & WebSockets, with TypeScript & end-to-end tests.", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "files": [ - "lib/*", - "index.js" - ], + "version": "3.0.0", + "description": "Complete Node.js & JavaScript SDK for Bitget V1-V3 REST APIs & WebSockets, with TypeScript & end-to-end tests.", "scripts": { "test": "jest", "test:watch": "jest --watch", "test:public": "jest --testPathIgnorePatterns='.*private.*'", "test:private": "jest --testPathPattern='.*private.*'", "clean": "rm -rf lib dist", - "build": "tsc", + "build": "npm run clean && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && bash ./postBuild.sh", "build:clean": "npm run clean && npm run build", "build:watch": "npm run clean && tsc --watch", "pack": "webpack --config webpack/webpack.config.js", @@ -22,34 +16,58 @@ "prepublish": "npm run build:clean", "betapublish": "npm publish --tag beta" }, + "main": "dist/cjs/index.js", + "module": "dist/mjs/index.js", + "types": "dist/mjs/index.d.ts", + "exports": { + ".": { + "import": "./dist/mjs/index.js", + "require": "./dist/cjs/index.js", + "types": "./dist/mjs/index.d.ts" + } + }, + "files": [ + "dist/*" + ], + "type": "module", "author": "Tiago Siebler (https://github.com/tiagosiebler)", "contributors": [], "dependencies": { - "axios": "^1.6.1", + "axios": "^1.10.0", "isomorphic-ws": "^5.0.0", "ws": "^8.9.0" }, "devDependencies": { "@types/jest": "^29.0.3", - "@types/node": "^18.7.23", + "@types/node": "^22.10.2", + "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", "eslint": "^8.24.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-require-extensions": "^0.1.3", "eslint-plugin-simple-import-sort": "^12.1.1", - "jest": "^29.1.1", + "jest": "^29.7.0", + "ts-jest": "^29.4.0", + "ts-node": "^10.9.2", + "typescript": "^5.7.3" + }, + "optionalDependencies": { "source-map-loader": "^4.0.0", - "ts-jest": "^29.0.2", "ts-loader": "^9.4.1", - "typescript": "^4.8.4", "webpack": "^5.74.0", - "webpack-bundle-analyzer": "^4.6.1", "webpack-cli": "^4.10.0" }, "keywords": [ "bitget", "bitget api", + "bitget nodejs", + "bitget javascript", + "bitget typescript", + "bitget sdk", + "bitget v3 api", + "bitget UTA api", "api", "websocket", "rest", diff --git a/postBuild.sh b/postBuild.sh new file mode 100755 index 0000000..56e9572 --- /dev/null +++ b/postBuild.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Add package.json files to cjs/mjs subtrees +# + +cat >dist/cjs/package.json <dist/mjs/package.json < { + const clientTimeReqStart = Date.now(); + const serverTime = await this.getServerTime(); + const clientTimeReqEnd = Date.now(); + console.log('serverTime', serverTime); + + const serverTimeMs = Number(serverTime.data.serverTime); + const roundTripTime = clientTimeReqEnd - clientTimeReqStart; + const estimatedOneWayLatency = Math.floor(roundTripTime / 2); + + // Adjust server time by adding estimated one-way latency + const adjustedServerTime = serverTimeMs + estimatedOneWayLatency; + + // Calculate time difference between adjusted server time and local time + const timeDifference = adjustedServerTime - clientTimeReqEnd; + + const result = { + localTime: clientTimeReqEnd, + serverTime: serverTimeMs, + roundTripTime, + estimatedOneWayLatency, + adjustedServerTime, + timeDifference, + }; + + console.log('Time synchronization results:'); + console.log(result); + + console.log( + `Your approximate latency to exchange server: + One way: ${estimatedOneWayLatency}ms. + Round trip: ${roundTripTime}ms. + `, + ); + + if (timeDifference > 500) { + console.warn( + `WARNING! Time difference between server and client clock is greater than 500ms. It is currently ${timeDifference}ms. + Consider adjusting your system clock to avoid unwanted clock sync errors! + Visit https://github.com/tiagosiebler/awesome-crypto-examples/wiki/Timestamp-for-this-request-is-outside-of-the-recvWindow for more information`, + ); + } else { + console.log( + `Time difference between server and client clock is within acceptable range of 500ms. It is currently ${timeDifference}ms.`, + ); + } + + return result; + } + + async fetchServerTime(): Promise { + const res = await this.getServerTime(); + return Number(res.data.serverTime); + } + + /** + * + * Public endpoints + * + */ + + getServerTime(): Promise< + APIResponse<{ + serverTime: string; + }> + > { + return this.get('/api/v3/public/time'); + } + + /** + * + * =====Market======= endpoints + * + */ + + /** + * Get Instruments + */ + getInstruments( + params: GetInstrumentsRequestV3, + ): Promise> { + return this.get('/api/v3/market/instruments', params); + } + + /** + * Get Tickers + */ + getTickers(params: GetTickersRequestV3): Promise> { + return this.get('/api/v3/market/tickers', params); + } + + /** + * Get OrderBook + */ + getOrderBook( + params: GetOrderBookRequestV3, + ): Promise> { + return this.get('/api/v3/market/orderbook', params); + } + + /** + * Get Recent Public Fills + */ + getFills( + params: GetPublicFillsRequestV3, + ): Promise> { + return this.get('/api/v3/market/fills', params); + } + + /** + * Get Open Interest + */ + getOpenInterest( + params: GetOpenInterestRequestV3, + ): Promise> { + return this.get('/api/v3/market/open-interest', params); + } + + /** + * Get Kline/Candlestick + */ + getCandles( + params: GetCandlesRequestV3, + ): Promise> { + return this.get('/api/v3/market/candles', params); + } + + /** + * Get Kline/Candlestick History + */ + getHistoryCandles( + params: GetHistoryCandlesRequestV3, + ): Promise> { + return this.get('/api/v3/market/history-candles', params); + } + + /** + * Get Current Funding Rate + */ + getCurrentFundingRate( + params: GetCurrentFundingRateRequestV3, + ): Promise> { + return this.get('/api/v3/market/current-fund-rate', params); + } + + /** + * Get Funding Rate History + */ + getHistoryFundingRate( + params: GetHistoryFundingRateRequestV3, + ): Promise> { + return this.get('/api/v3/market/history-fund-rate', params); + } + + /** + * Get Risk Reserve + */ + getRiskReserve( + params: GetRiskReserveRequestV3, + ): Promise> { + return this.get('/api/v3/market/risk-reserve', params); + } + + /** + * Get Discount Rate + */ + getDiscountRate(): Promise> { + return this.get('/api/v3/market/discount-rate'); + } + + /** + * Get Margin Loan + */ + getMarginLoans( + params: GetMarginLoansRequestV3, + ): Promise> { + return this.get('/api/v3/market/margin-loans', params); + } + + /** + * Get Position Tier + */ + getPositionTier( + params: GetPositionTierRequestV3, + ): Promise> { + return this.get('/api/v3/market/position-tier', params); + } + + /** + * Get Open Interest Limit + */ + getContractsOi( + params: GetContractsOiRequestV3, + ): Promise> { + return this.get('/api/v3/market/oi-limit', params); + } + + /** + * + * =====Account======= endpoints + * + */ + + /** + * Get Account Assets + */ + getBalances(): Promise> { + return this.getPrivate('/api/v3/account/assets'); + } + + /** + * Get Fund Account Assets + */ + getFundingAssets( + params?: GetFundingAssetsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/funding-assets', params); + } + + /** + * Get Account Info + */ + getAccountSettings(): Promise> { + return this.getPrivate('/api/v3/account/settings'); + } + + /** + * Set Leverage + */ + setLeverage(params: SetLeverageRequestV3): Promise> { + return this.postPrivate('/api/v3/account/set-leverage', params); + } + + /** + * Set Holding Mode + */ + setHoldMode(params: { + holdMode: 'one_way_mode' | 'hedge_mode'; + }): Promise> { + return this.postPrivate('/api/v3/account/set-hold-mode', params); + } + + /** + * Get Financial Records + */ + getFinancialRecords(params: GetFinancialRecordsRequestV3): Promise< + APIResponse<{ + list: FinancialRecordV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/account/financial-records', params); + } + + /** + * Get Repayable Coins + */ + getRepayableCoins(): Promise< + APIResponse<{ + repayableCoinList: RepayableCoinV3[]; + maxSelection: string; + }> + > { + return this.getPrivate('/api/v3/account/repayable-coins'); + } + + /** + * Get Payment Coins + */ + getPaymentCoins(): Promise< + APIResponse<{ + paymentCoinList: PaymentCoinV3[]; + maxSelection: string; + }> + > { + return this.getPrivate('/api/v3/account/payment-coins'); + } + + /** + * Repay + */ + submitRepay(params: RepayRequestV3): Promise> { + return this.postPrivate('/api/v3/account/repay', params); + } + + /** + * Get Convert Records + */ + getConvertRecords(params: GetConvertRecordsRequestV3): Promise< + APIResponse<{ + list: ConvertRecordV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/account/convert-records', params); + } + + /** + * Switch Deduct - Set BGB deduction + */ + switchDeduct(params: SwitchDeductRequestV3): Promise> { + return this.postPrivate('/api/v3/account/switch-deduct', params); + } + + /** + * Get Deduct Info - Get BGB deduction status + */ + getDeductInfo(): Promise< + APIResponse<{ + deduct: 'on' | 'off'; + }> + > { + return this.getPrivate('/api/v3/account/deduct-info'); + } + + /** + * Get Trading Fee Rate + */ + getFeeRate(params: GetFeeRateRequestV3): Promise< + APIResponse<{ + makerFeeRate: string; + takerFeeRate: string; + }> + > { + return this.getPrivate('/api/v3/account/fee-rate', params); + } + + /** + * + * =====SubAccount======= endpoints + * + */ + + /** + * Create Sub-account + */ + createSubAccount( + params: CreateSubAccountRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/create-sub', params); + } + + /** + * Freeze/Unfreeze Sub-account + */ + freezeSubAccount( + params: FreezeSubAccountRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/freeze-sub', params); + } + + /** + * Get Sub-account Unified Account Assets + */ + getSubUnifiedAssets( + params?: GetSubUnifiedAssetsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/sub-unified-assets', params); + } + + /** + * Get Sub-account List + */ + getSubAccountList(params?: GetSubAccountListRequestV3): Promise< + APIResponse<{ + list: SubAccountV3[]; + hasNext: boolean; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/user/sub-list', params); + } + + /** + * Create Sub-account API Key + */ + createSubAccountApiKey( + params: CreateSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/create-sub-api', params); + } + + /** + * Modify Sub-account API Key + */ + updateSubAccountApiKey( + params: UpdateSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/update-sub-api', params); + } + + /** + * Delete Sub-account API Key + */ + deleteSubAccountApiKey( + params: DeleteSubAccountApiKeyRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/user/delete-sub-api', params); + } + + /** + * Get Sub-account API Keys + */ + getSubAccountApiKeys(params: GetSubAccountApiKeysRequestV3): Promise< + APIResponse<{ + items: SubAccountApiKeyV3[]; + hasNext: boolean; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/user/sub-api-list', params); + } + + /** + * + * =====Transfer======= endpoints + * + */ + + /** + * Get Transferable Coins + */ + getTransferableCoins( + params: GetTransferableCoinsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/transferable-coins', params); + } + + /** + * Transfer + */ + submitTransfer( + params: TransferRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/transfer', params); + } + + /** + * Main-Sub Account Transfer + */ + subAccountTransfer(params: SubAccountTransferRequestV3): Promise< + APIResponse<{ + transferId: string; + clientOid: string; + }> + > { + return this.postPrivate('/api/v3/account/sub-transfer', params); + } + + /** + * Get Main-Sub Transfer Records + */ + getSubTransferRecords(params?: GetSubTransferRecordsRequestV3): Promise< + APIResponse<{ + items: SubTransferRecordV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/account/sub-transfer-record', params); + } + + /** + * + * =====Deposit======= endpoints + * + */ + + /** + * Get Deposit Address + */ + getDepositAddress( + params: GetDepositAddressRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/deposit-address', params); + } + + /** + * Get Sub Deposit Address + */ + getSubDepositAddress( + params: GetSubDepositAddressRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/sub-deposit-address', params); + } + + /** + * Get Deposit Records + */ + getDepositRecords( + params: GetDepositRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/deposit-records', params); + } + + /** + * Get Sub Deposit Records + */ + getSubDepositRecords( + params: GetSubDepositRecordsRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/sub-deposit-records', params); + } + + /** + * + * =====Withdraw======= endpoints + * + */ + + /** + * Withdraw - Includes on-chain withdrawals and internal transfers + */ + submitWithdraw( + params: WithdrawRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/withdraw', params); + } + + /** + * Get Withdraw Records + */ + getWithdrawRecords( + params: GetWithdrawRecordsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/account/withdrawal-records', params); + } + + /** + * + * =====Trade======= endpoints + * + */ + + /** + * Place Order + */ + submitNewOrder( + params: PlaceOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/place-order', params); + } + + /** + * Modify Order + */ + modifyOrder( + params: ModifyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/modify-order', params); + } + + /** + * Cancel Order + */ + cancelOrder( + params: CancelOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-order', params); + } + + /** + * Batch Order + */ + placeBatchOrders( + params: PlaceBatchOrdersRequestV3[], + ): Promise> { + return this.postPrivate('/api/v3/trade/place-batch', params); + } + + /** + * Batch Modify Orders + */ + batchModifyOrders( + params: BatchModifyOrderRequestV3[], + ): Promise> { + return this.postPrivate('/api/v3/trade/batch-modify-order', params); + } + + /** + * Batch Cancel + */ + cancelBatchOrders( + params: CancelBatchOrdersRequestV3[], + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-batch', params); + } + + /** + * Cancel All Orders + */ + cancelAllOrders( + params: CancelAllOrdersRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-symbol-order', params); + } + + /** + * Close All Positions + */ + closeAllPositions( + params: CloseAllPositionsRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/close-positions', params); + } + + /** + * Get Order Details + */ + getOrderInfo( + params: GetOrderInfoRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/order-info', params); + } + + /** + * Get Open Orders + */ + getUnfilledOrders(params?: GetUnfilledOrdersRequestV3): Promise< + APIResponse<{ + list: UnfilledOrderV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/trade/unfilled-orders', params); + } + + /** + * Get Order History + */ + getHistoryOrders(params: GetHistoryOrdersRequestV3): Promise< + APIResponse<{ + list: HistoryOrderV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/trade/history-orders', params); + } + + /** + * Get Fill History + */ + getTradeFills(params?: GetFillsRequestV3): Promise< + APIResponse<{ + list: FillV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/trade/fills', params); + } + + /** + * Get Position Info + */ + getCurrentPosition(params: GetCurrentPositionRequestV3): Promise< + APIResponse<{ + list: CurrentPositionV3[]; + }> + > { + return this.getPrivate('/api/v3/position/current-position', params); + } + + /** + * Get Positions History + */ + getPositionHistory(params: GetPositionHistoryRequestV3): Promise< + APIResponse<{ + list: PositionHistoryV3[]; + cursor: string; + }> + > { + return this.getPrivate('/api/v3/position/history-position', params); + } + + /** + * Get Max Open Available + */ + getMaxOpenAvailable( + params: GetMaxOpenAvailableRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/account/max-open-available', params); + } + + /** + * CountDown Cancel All + */ + countdownCancelAll( + params: CountdownCancelAllRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/countdown-cancel-all', params); + } + + /** + * + * =====Inst Loan======= endpoints + * + */ + + /** + * Get Transferred Quantity + */ + getLoanTransfered( + params: GetTransferedRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/transfered', params); + } + + /** + * Get Trade Symbols + */ + getLoanSymbols( + params: GetSymbolsRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/symbols', params); + } + + /** + * Get Risk Unit + */ + getLoanRiskUnit(): Promise< + APIResponse<{ + riskUnitId: string[]; + }> + > { + return this.getPrivate('/api/v3/ins-loan/risk-unit'); + } + + /** + * Get Repayment Orders + */ + getLoanRepaidHistory( + params?: GetRepaidHistoryRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/repaid-history', params); + } + + /** + * Get Product Info + */ + getLoanProductInfo( + params: GetProductInfosRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/product-infos', params); + } + + /** + * Get Loan Orders + */ + getLoanOrder( + params?: GetLoanOrderRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/loan-order', params); + } + + /** + * Get LTV + */ + getLoanLTVConvert( + params?: GetLTVConvertRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/ins-loan/ltv-convert', params); + } + + /** + * Get Margin Coin Info + */ + getLoanMarginCoinInfo(params: GetEnsureCoinsRequestV3): Promise< + APIResponse<{ + productId: string; + coinInfo: CoinInfoV3[]; + }> + > { + return this.getPrivate('/api/v3/ins-loan/ensure-coins-convert', params); + } + + /** + * Bind/Unbind UID to Risk Unit + */ + bindLoanUid( + params: BindUidRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/ins-loan/bind-uid', params); + } + + /** + * + * =====Strategy======= endpoints + * + */ + + /** + * Place Strategy Order + */ + submitStrategyOrder( + params: PlaceStrategyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/place-strategy-order', params); + } + + /** + * Modify Strategy Order + */ + modifyStrategyOrder( + params: ModifyStrategyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/modify-strategy-order', params); + } + + /** + * Cancel Strategy Order + */ + cancelStrategyOrder( + params: CancelStrategyOrderRequestV3, + ): Promise> { + return this.postPrivate('/api/v3/trade/cancel-strategy-order', params); + } + + /** + * Get Unfilled Strategy Orders + */ + getUnfilledStrategyOrders( + params: GetUnfilledStrategyOrdersRequestV3, + ): Promise> { + return this.getPrivate('/api/v3/trade/unfilled-strategy-orders', params); + } + + /** + * Get Strategy Order History + */ + getHistoryStrategyOrders(params: GetHistoryStrategyOrdersRequestV3): Promise< + APIResponse<{ + list: StrategyOrderV3[]; + cursor?: string; + }> + > { + return this.getPrivate('/api/v3/trade/history-strategy-orders', params); + } +} diff --git a/src/spot-client.ts b/src/spot-client.ts index 726e36b..1ebc917 100644 --- a/src/spot-client.ts +++ b/src/spot-client.ts @@ -1,11 +1,9 @@ +import { GetHistoricTradesParams, Pagination } from './types/request/shared.js'; import { - APIResponse, BatchCancelSpotOrderV2, CancelSpotOrderV2, CancelSpotPlanOrderParams, - CoinBalance, GetHistoricPlanOrdersParams, - GetHistoricTradesParams, GetSpotPlanOrdersParams, ModifySpotPlanOrder, NewBatchSpotOrder, @@ -14,17 +12,19 @@ import { NewSpotSubTransfer, NewSpotWithdraw, NewWalletTransfer, - Pagination, SpotCandleData, SpotKlineInterval, +} from './types/request/v1/spotV1.js'; +import { APIResponse, VIPFeeRate } from './types/response/v1/shared.js'; +import { + CoinBalance, SpotMarketTrade, SpotOrderResult, SpotPlanOrder, SymbolRules, - VIPFeeRate, -} from './types'; -import { REST_CLIENT_TYPE_ENUM } from './util'; -import BaseRestClient from './util/BaseRestClient'; +} from './types/response/v1/spot.js'; +import BaseRestClient from './util/BaseRestClient.js'; +import { REST_CLIENT_TYPE_ENUM } from './util/requestUtils.js'; /** * REST API client for the V1 bitget Spot APIs. These are the previous generation of Bitget's APIs and should be considered deprecated. diff --git a/src/types/index.ts b/src/types/index.ts deleted file mode 100644 index 86329ba..0000000 --- a/src/types/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './request'; -export * from './response'; -export * from './shared'; -export * from './websockets'; diff --git a/src/types/request/index.ts b/src/types/request/index.ts deleted file mode 100644 index 1cf44db..0000000 --- a/src/types/request/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from './shared'; -export * from './v1/brokerV1'; -export * from './v1/futuresV1'; -export * from './v1/spotV1'; -export * from './v2/broker'; -export * from './v2/common'; -export * from './v2/copytrading'; -export * from './v2/earn'; -export * from './v2/futures'; -export * from './v2/margin'; -export * from './v2/spot'; diff --git a/src/types/request/v1/futuresV1.ts b/src/types/request/v1/futuresV1.ts index 77e3f9b..0551d70 100644 --- a/src/types/request/v1/futuresV1.ts +++ b/src/types/request/v1/futuresV1.ts @@ -1,4 +1,4 @@ -import { OrderTimeInForce } from '../shared'; +import { OrderTimeInForce } from '../shared.js'; export type FuturesProductType = | 'umcbl' diff --git a/src/types/request/v1/spotV1.ts b/src/types/request/v1/spotV1.ts index 550f0fd..f361521 100644 --- a/src/types/request/v1/spotV1.ts +++ b/src/types/request/v1/spotV1.ts @@ -1,4 +1,4 @@ -import { OrderTimeInForce } from '../shared'; +import { OrderTimeInForce } from '../shared.js'; export type WalletType = 'spot' | 'mix_usdt' | 'mix_usd'; diff --git a/src/types/request/v2/common.ts b/src/types/request/v2/common.ts index a8f60ec..e0b8746 100644 --- a/src/types/request/v2/common.ts +++ b/src/types/request/v2/common.ts @@ -1,4 +1,4 @@ -import { FuturesProductTypeV2, MarginType } from '../shared'; +import { FuturesProductTypeV2, MarginType } from '../shared.js'; /** * diff --git a/src/types/request/v2/futures.ts b/src/types/request/v2/futures.ts index 695ecdb..52c6d60 100644 --- a/src/types/request/v2/futures.ts +++ b/src/types/request/v2/futures.ts @@ -1,5 +1,5 @@ -import { FuturesPlanTypeV2, FuturesProductTypeV2 } from '../shared'; -import { FuturesKlineInterval } from '../v1/futuresV1'; +import { FuturesPlanTypeV2, FuturesProductTypeV2 } from '../shared.js'; +import { FuturesKlineInterval } from '../v1/futuresV1.js'; export type FuturesKlineTypeV2 = 'MARKET' | 'MARK' | 'INDEX'; diff --git a/src/types/request/v3/account.ts b/src/types/request/v3/account.ts new file mode 100644 index 0000000..eae2e88 --- /dev/null +++ b/src/types/request/v3/account.ts @@ -0,0 +1,252 @@ +// Account Management Request Types + +export interface SetLeverageRequestV3 { + category: 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + leverage: string; + coin?: string; + posSide?: 'long' | 'short'; +} + +export interface GetConvertRecordsRequestV3 { + fromCoin: string; + toCoin: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetFinancialRecordsRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + coin?: string; + type?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface RepayRequestV3 { + repayableCoinList: string[]; + paymentCoinList: string[]; +} + +// Sub-account Management Request Types + +export interface CreateSubAccountApiKeyRequestV3 { + subUid: string; + note: string; + type: 'read_write' | 'read_only'; + passphrase: string; + permissions: string[]; + ips: string[]; +} + +export interface DeleteSubAccountApiKeyRequestV3 { + apiKey: string; +} + +export interface GetSubAccountApiKeysRequestV3 { + subUid: string; + limit?: string; + cursor?: string; +} + +export interface UpdateSubAccountApiKeyRequestV3 { + apiKey: string; + passphrase: string; + type?: 'read_write' | 'read_only'; + permissions?: string[]; + ips?: string[]; +} + +export interface CreateSubAccountRequestV3 { + username: string; + accountMode?: 'classic' | 'unified'; + note?: string; +} + +export interface FreezeSubAccountRequestV3 { + subUid: string; + operation: 'freeze' | 'unfreeze'; +} + +export interface GetSubAccountListRequestV3 { + limit?: string; + cursor?: string; +} + +// Transfer Request Types + +export interface TransferRequestV3 { + fromType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; + toType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; + amount: string; + coin: string; + symbol?: string; +} + +export interface GetTransferableCoinsRequestV3 { + fromType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; + toType: + | 'spot' + | 'p2p' + | 'coin-futures' + | 'usdt-futures' + | 'usdc-futures' + | 'crossed-margin' + | 'isolated-margin' + | 'uta'; +} + +export interface GetSubTransferRecordsRequestV3 { + subUid?: string; + role?: 'initiator' | 'receiver'; + coin?: string; + startTime?: string; + endTime?: string; + clientOid?: string; + limit?: string; + cursor?: string; +} + +export interface SubAccountTransferRequestV3 { + fromType: + | 'spot' + | 'p2p' + | 'usdt_futures' + | 'coin_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'uta'; + toType: + | 'spot' + | 'p2p' + | 'usdt_futures' + | 'coin_futures' + | 'usdc_futures' + | 'crossed_margin' + | 'uta'; + amount: string; + coin: string; + fromUserId: string; + toUserId: string; + clientOid: string; +} + +export interface GetSubUnifiedAssetsRequestV3 { + subUid?: string; + cursor?: string; + limit?: string; +} + +export interface GetFeeRateRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; +} + +export interface GetFundingAssetsRequestV3 { + coin?: string; +} + +export interface SwitchDeductRequestV3 { + deduct: 'on' | 'off'; +} + +// Deposit Request Types + +export interface GetDepositAddressRequestV3 { + coin: string; + chain?: string; + size?: string; +} + +export interface GetSubDepositAddressRequestV3 { + subUid: string; + coin: string; + chain?: string; + size?: string; +} + +export interface GetDepositRecordsRequestV3 { + coin?: string; + orderId?: string; + startTime: string; + endTime: string; + limit?: string; + cursor?: string; +} + +export interface GetSubDepositRecordsRequestV3 { + coin?: string; + subUid: string; + startTime: string; + endTime: string; + limit?: string; + cursor?: string; +} + +// Withdraw Request Types + +export interface WithdrawRequestV3 { + coin: string; + chain?: string; + transferType: 'on_chain' | 'internal_transfer'; + address: string; + innerToType?: 'uid' | 'email' | 'mobile'; + areaCode?: string; + tag?: string; + size: string; + remark?: string; + clientOid?: string; + memberCode?: 'bithumb' | 'korbit' | 'coinone'; + identityType?: 'company' | 'user'; + companyName?: string; + firstName?: string; + lastName?: string; +} + +export interface GetWithdrawRecordsRequestV3 { + coin?: string; + orderId?: string; + clientOid?: string; + startTime: string; + endTime: string; + limit?: string; + cursor?: string; +} diff --git a/src/types/request/v3/loan.ts b/src/types/request/v3/loan.ts new file mode 100644 index 0000000..f7ddd48 --- /dev/null +++ b/src/types/request/v3/loan.ts @@ -0,0 +1,38 @@ +export interface GetTransferedRequestV3 { + userId?: string; + coin: string; +} + +export interface GetSymbolsRequestV3 { + productId: string; +} + +export interface GetRepaidHistoryRequestV3 { + startTime?: string; + endTime?: string; + limit?: string; +} + +export interface GetProductInfosRequestV3 { + productId: string; +} + +export interface GetLoanOrderRequestV3 { + orderId?: string; + startTime?: string; + endTime?: string; +} + +export interface GetEnsureCoinsRequestV3 { + productId: string; +} + +export interface BindUidRequestV3 { + riskUnitId?: string; + uid: string; + operate: 'bind' | 'unbind'; +} + +export interface GetLTVConvertRequestV3 { + riskUnitId?: string; +} diff --git a/src/types/request/v3/public.ts b/src/types/request/v3/public.ts new file mode 100644 index 0000000..467a365 --- /dev/null +++ b/src/types/request/v3/public.ts @@ -0,0 +1,107 @@ +export interface GetPublicFillsRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; + limit?: string; +} + +export interface GetCandlesRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + interval: + | '1m' + | '3m' + | '5m' + | '15m' + | '30m' + | '1H' + | '4H' + | '6H' + | '12H' + | '1D'; + startTime?: string; + endTime?: string; + type?: 'MARKET' | 'MARK' | 'INDEX'; + limit?: string; +} + +export interface GetHistoryCandlesRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + interval: + | '1m' + | '3m' + | '5m' + | '15m' + | '30m' + | '1H' + | '4H' + | '6H' + | '12H' + | '1D'; + startTime?: string; + endTime?: string; + type?: 'MARKET' | 'MARK' | 'INDEX'; + limit?: string; +} + +export interface GetContractsOiRequestV3 { + symbol?: string; + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; +} + +export interface GetCurrentFundingRateRequestV3 { + symbol: string; +} + +export interface GetHistoryFundingRateRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + cursor?: string; + limit?: string; +} + +export interface GetMarginLoansRequestV3 { + coin: string; +} + +export interface GetOpenInterestRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; +} + +export interface GetPositionTierRequestV3 { + category: 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + coin?: string; +} + +export interface GetRiskReserveRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; +} + +export interface GetInstrumentsRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; +} + +export interface GetOrderBookRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + limit?: string; +} + +export interface GetTickersRequestV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; +} diff --git a/src/types/request/v3/strategy.ts b/src/types/request/v3/strategy.ts new file mode 100644 index 0000000..8b4f540 --- /dev/null +++ b/src/types/request/v3/strategy.ts @@ -0,0 +1,50 @@ +export interface PlaceStrategyOrderRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + clientOid?: string; + type?: 'tpsl'; + tpslMode?: 'full' | 'partial'; + qty: string; + posSide: 'long' | 'short'; + tpTriggerBy?: 'market' | 'mark'; + slTriggerBy?: 'market' | 'mark'; + takeProfit?: string; + stopLoss?: string; + tpOrderType?: 'limit' | 'market'; + slOrderType?: 'limit' | 'market'; + tpLimitPrice?: string; + slLimitPrice?: string; +} + +export interface ModifyStrategyOrderRequestV3 { + orderId?: string; + clientOid?: string; + qty: string; + tpTriggerBy?: 'market' | 'mark'; + slTriggerBy?: 'market' | 'mark'; + takeProfit?: string; + stopLoss?: string; + tpOrderType?: 'limit' | 'market'; + slOrderType?: 'limit' | 'market'; + tpLimitPrice?: string; + slLimitPrice?: string; +} + +export interface CancelStrategyOrderRequestV3 { + orderId?: string; + clientOid?: string; +} + +export interface GetUnfilledStrategyOrdersRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + type?: 'tpsl'; +} + +export interface GetHistoryStrategyOrdersRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + type?: 'tpsl'; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} diff --git a/src/types/request/v3/trade.ts b/src/types/request/v3/trade.ts new file mode 100644 index 0000000..3fa7fc6 --- /dev/null +++ b/src/types/request/v3/trade.ts @@ -0,0 +1,162 @@ +export interface BatchModifyOrderRequestV3 { + orderId?: string; + clientOid?: string; + qty?: string; + price?: string; + autoCancel?: 'yes' | 'no'; +} + +export interface CancelAllOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; +} + +export interface CancelBatchOrdersRequestV3 { + orderId?: string; + clientOid?: string; + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; +} + +export interface CloseAllPositionsRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + posSide?: 'long' | 'short'; +} + +export interface CancelOrderRequestV3 { + orderId?: string; + clientOid?: string; +} + +export interface GetMaxOpenAvailableRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; + orderType: 'limit' | 'market'; + side: 'buy' | 'sell'; + price?: string; + size?: string; +} + +export interface GetOrderInfoRequestV3 { + orderId?: string; + clientOid?: string; +} + +export interface GetFillsRequestV3 { + orderId?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetUnfilledOrdersRequestV3 { + category?: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetHistoryOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetPositionHistoryRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + startTime?: string; + endTime?: string; + limit?: string; + cursor?: string; +} + +export interface GetCurrentPositionRequestV3 { + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol?: string; + posSide?: 'long' | 'short'; +} + +export interface ModifyOrderRequestV3 { + orderId?: string; + clientOid?: string; + qty?: string; + price?: string; + autoCancel?: 'yes' | 'no'; +} + +export interface PlaceBatchOrdersRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; + qty: string; + price?: string; + side: 'buy' | 'sell'; + orderType: 'limit' | 'market'; + timeInForce?: 'ioc' | 'fok' | 'gtc' | 'post_only'; + posSide?: 'long' | 'short'; + clientOid?: string; + reduceOnly?: 'yes' | 'no'; +} + +export interface PlaceOrderRequestV3 { + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + symbol: string; + qty: string; + price?: string; + side: 'buy' | 'sell'; + orderType: 'limit' | 'market'; + timeInForce?: 'ioc' | 'fok' | 'gtc' | 'post_only'; + posSide?: 'long' | 'short'; + clientOid?: string; + reduceOnly?: 'yes' | 'no'; + stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both'; + takeProfitPrice?: string; + stopLossPrice?: string; + takeProfitTriggerType?: 'mark_price' | 'last_price'; + stopLossTriggerType?: 'mark_price' | 'last_price'; +} + +export interface CountdownCancelAllRequestV3 { + countdown: string; // seconds until auto-cancel (5-60, or 0 to disable) +} diff --git a/src/types/response/index.ts b/src/types/response/index.ts deleted file mode 100644 index c0a4a58..0000000 --- a/src/types/response/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './v1/futures'; -export * from './v1/shared'; -export * from './v1/spot'; -export * from './v2/broker'; -export * from './v2/common'; -export * from './v2/copy-trading'; -export * from './v2/earn'; -export * from './v2/futures'; -export * from './v2/margin'; -export * from './v2/spot'; diff --git a/src/types/response/v1/futures.ts b/src/types/response/v1/futures.ts index 6cbb251..1e7acdd 100644 --- a/src/types/response/v1/futures.ts +++ b/src/types/response/v1/futures.ts @@ -2,7 +2,7 @@ import { FuturesHoldMode, FuturesHoldSide, FuturesMarginMode, -} from '../../request'; +} from '../../request/v1/futuresV1.js'; export interface FuturesMarketTrade { tradeId: string; diff --git a/src/types/response/v3/account.ts b/src/types/response/v3/account.ts new file mode 100644 index 0000000..ba95b87 --- /dev/null +++ b/src/types/response/v3/account.ts @@ -0,0 +1,229 @@ +// Account Management Response Types +export interface AccountSymbolConfigV3 { + category: string; + symbol: string; + marginMode: string; + leverage: string; +} + +export interface AccountCoinConfigV3 { + coin: string; + leverage: string; +} + +export interface AccountSettingsV3 { + assetMode: string; + holdMode: string; + symbolConfigList: AccountSymbolConfigV3[]; + coinConfigList: AccountCoinConfigV3[]; +} + +export interface AccountAssetV3 { + coin: string; + equity: string; + usdValue: string; + balance: string; + available: string; + debt: string; + locked: string; +} + +export interface AccountAssetsV3 { + accountEquity: string; + usdtEquity: string; + btcEquity: string; + unrealisedPnl: string; + usdtUnrealisedPnl: string; + btcUnrealizedPnl: string; + effEquity: string; + mmr: string; + imr: string; + mgnRatio: string; + positionMgnRatio: string; + assets: AccountAssetV3[]; +} + +export interface ConvertRecordV3 { + fromCoin: string; + fromCoinSize: string; + toCoin: string; + toCoinSize: string; + price: string; + ts: string; +} + +export interface FinancialRecordV3 { + category: string; + id: string; + symbol: string; + coin: string; + type: string; + amount: string; + fee: string; + balance: string; + ts: string; +} + +export interface PaymentCoinV3 { + coin: string; + size: string; + amount: string; +} + +export interface RepayableCoinV3 { + coin: string; + size: string; + amount: string; +} + +export interface RepayResponseV3 { + result: string; + repayAmount: string; +} + +// Sub-account Management Response Types + +export interface CreateSubAccountApiKeyResponseV3 { + note: string; + apiKey: string; + secret: string; + type: string; + permissions: string[]; + ips: string[]; +} +export interface SubAccountApiKeyV3 { + apiKey: string; + note: string; + type: string; + permissions: string[]; + ips: string[]; + ts?: string; +} + +export interface UpdateSubAccountApiKeyResponseV3 { + note: string; + apiKey: string; + type: string; + permissions: string[]; + ips: string[]; +} + +export interface CreateSubAccountResponseV3 { + username: string; + subUid: string; + status: string; + note: string; + createdTime: string; + updatedTime: string; +} + +export interface SubAccountV3 { + subUid: string; + username: string; + status: string; + accountMode: string; + type: string; + note: string; + createdTime: string; + updatedTime: string; +} + +// Transfer Response Types + +export interface TransferResponseV3 { + transferId: string; +} + +export interface SubTransferRecordV3 { + transferId: string; + oldTransferId?: string; + fromType: string; + toType: string; + amount: string; + coin: string; + fromUserId: string; + toUserId: string; + status: string; + clientOid: string; + createdTime: string; + updatedTime: string; +} + +export interface SubUnifiedAssetV3 { + coin: string; + equity: string; + usdValue: string; + balance: string; + available: string; + debt: string; + locked: string; +} + +export interface SubUnifiedAssetV3 { + subUid: string; + cursor: string; + assets: SubUnifiedAssetV3[]; +} + +export interface GetFeeRateResponseV3 { + makerFeeRate: string; + takerFeeRate: string; +} + +export interface FundingAssetV3 { + coin: string; + available: string; + frozen: string; + balance: string; +} + +// Deposit Response Types + +export interface DepositAddressV3 { + address: string; + chain: string; + coin: string; + tag: string; + url: string; +} + +export interface DepositRecordV3 { + orderId: string; + recordId: string; + coin: string; + type: 'deposit'; + dest: 'on_chain' | 'internal_transfer'; + size: string; + status: 'pending' | 'success' | 'fail'; + fromAddress: string; + toAddress: string; + chain: string; + createdTime: string; + updatedTime: string; +} + +// Withdraw Response Types + +export interface WithdrawResponseV3 { + orderId: string; + clientOid: string; +} + +export interface WithdrawRecordV3 { + orderId: string; + clientOid: string; + recordId: string; + coin: string; + type: 'withdraw'; + dest: 'on_chain' | 'internal_transfer'; + size: string; + status: 'pending' | 'success' | 'fail'; + fromAddress: string; + toAddress: string; + chain: string; + fee: string; + confirm: string; + tag: string; + createdTime: string; + updatedTime: string; +} diff --git a/src/types/response/v3/loan.ts b/src/types/response/v3/loan.ts new file mode 100644 index 0000000..ccc4bbe --- /dev/null +++ b/src/types/response/v3/loan.ts @@ -0,0 +1,95 @@ +export interface LoanTransfersV3 { + coin: string; + transfered: string; + userId: string; +} + +export interface LoanSymbolSettingV3 { + symbol: string; + leverage: string; +} + +export interface LoanSymbolsV3 { + productId: string; + spotSymbols: string[]; + usdtContractLeverage: string; + coinContractLeverage: string; + usdcContractLeverage: string; + usdtContractSymbols: LoanSymbolSettingV3[]; + coinContractSymbols: LoanSymbolSettingV3[]; + usdcContractSymbols: LoanSymbolSettingV3[]; +} + +export interface RepaidHistoryItemV3 { + repayOrderId: string; + businessType: 'normal' | 'liquidation'; + repayType: 'all' | 'part'; + repaidTime: string; + coin: string; + repayAmount: string; + repayInterest: string; +} + +export interface LoanProductInfoV3 { + productId: string; + leverage: string; + supportUsdtContract: 'YES' | 'NO'; + supportCoinContract: 'YES' | 'NO'; + supportUsdcContract: 'YES' | 'NO'; + transferLine: string; + spotBuyLine: string; + usdtContractOpenLine: string; + coinContractOpenLine: string; + usdcContractOpenLine: string; + liquidationLine: string; + stopLiquidationLine: string; +} + +export interface LoanOrderV3 { + orderId: string; + orderProductId: string; + uid: string; + loanTime: string; + loanCoin: string; + loanAmount: string; + unpaidAmount: string; + unpaidInterest: string; + repaidAmount: string; + repaidInterest: string; + reserve: string; + status: 'not_paid_off' | 'paid_off'; +} + +export interface CoinInfoV3 { + coin: string; + convertRatio: string; + maxConvertValue: string; +} + +export interface BindUidResponseV3 { + riskUnitId: string; + uid: string; + operate: 'bind' | 'unbind'; +} + +export interface UnpaidInfoV3 { + coin: string; + unpaidQty: string; + unpaidInterest: string; +} + +export interface BalanceInfoV3 { + coin: string; + price: string; + amount: string; + convertedUsdtAmount: string; +} + +export interface LTVConvertResponseV3 { + ltv: string; + subAccountUids: string[]; + unpaidUsdtAmount: string; + usdtBalance: string; + unpaidInfo: UnpaidInfoV3[]; + balanceInfo: BalanceInfoV3[]; +} diff --git a/src/types/response/v3/public.ts b/src/types/response/v3/public.ts new file mode 100644 index 0000000..f7c2356 --- /dev/null +++ b/src/types/response/v3/public.ts @@ -0,0 +1,168 @@ +export interface PublicFillV3 { + execId: string; + price: string; + size: string; + side: 'sell' | 'buy'; + ts: string; +} + +export interface CandlestickV3 extends Array { + 0: string; // timestamp + 1: string; // open price + 2: string; // high price + 3: string; // low price + 4: string; // close price + 5: string; // volume + 6: string; // turnover +} + +export interface ContractOiV3 { + symbol: string; + notionalValue: string; + totalNotionalValue: string; +} + +export interface CurrentFundingRateV3 { + symbol: string; + fundingRate: string; + fundingRateInterval: string; + nextUpdate: string; + minFundingRate: string; + maxFundingRate: string; +} + +export interface DiscountRateTierV3 { + tierStartValue: string; + discountRate: string; +} + +export interface DiscountRateV3 { + coin: string; + list: DiscountRateTierV3[]; +} + +export interface HistoryFundingRateV3 { + symbol: string; + fundingRate: string; + fundingRateTimestamp: string; +} + +export interface MarginLoanV3 { + dailyInterest: string; + annualInterest: string; + limit: string; +} + +export interface OpenInterestItemV3 { + symbol: string; + openInterest: string; +} + +export interface OpenInterestV3 { + list: OpenInterestItemV3[]; + ts: string; +} + +export interface PositionTierV3 { + tier: string; + minTierValue: string; + maxTierValue: string; + leverage: string; + mmr: string; +} + +export interface RiskReserveRecordV3 { + type: 'in' | 'out'; + amount: string; + ts: string; +} + +export interface RiskReserveV3 { + coin: string; + riskReserveRecords: RiskReserveRecordV3[]; +} + +export interface InstrumentV3 { + symbol: string; + category: + | 'SPOT' + | 'MARGIN' + | 'USDT-FUTURES' + | 'COIN-FUTURES' + | 'USDC-FUTURES'; + baseCoin: string; + quoteCoin: string; + buyLimitPriceRatio: string; + sellLimitPriceRatio: string; + feeRateUpRatio: string; + minOrderQty: string; + maxOrderQty: string; + maxMarketOrderQty: string; + pricePrecision: string; + quantityPrecision: string; + quotePrecision: string; + minOrderAmount: string; + maxSymbolOrderNum: string; + maxProductOrderNum: string; + status: 'listed' | 'online' | 'limit_open' | 'offline' | 'restrictedAPI'; + offTime: string; + limitOpenTime: string; + maintainTime: string; + areaSymbol?: string; + + // Futures specific fields + makerFeeRate?: string; + takerFeeRate?: string; + openCostUpRatio?: string; + priceMultiplier?: string; + quantityMultiplier?: string; + symbolType?: 'perpetual' | 'delivery'; + maxPositionNum?: string; + deliveryTime?: string; + deliveryStartTime?: string; + deliveryPeriod?: string; + launchTime?: string; + fundInterval?: string; + minLeverage?: string; + maxLeverage?: string; + + // Margin specific fields + isIsolatedBaseBorrowable?: 'YES' | 'NO'; + isIsolatedQuotedBorrowable?: 'YES' | 'NO'; + warningRiskRatio?: string; + liquidationRiskRatio?: string; + maxCrossedLeverage?: string; + maxIsolatedLeverage?: string; + userMinBorrow?: string; +} + +export interface OrderBookV3 { + a: string[][]; // asks - [price, size] + b: string[][]; // bids - [price, size] + ts: string; +} + +export interface TickerV3 { + category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + lastPrice: string; + openPrice24h: string; + highPrice24h: string; + lowPrice24h: string; + ask1Price: string; + bid1Price: string; + bid1Size: string; + ask1Size: string; + price24hPcnt: string; + volume24h: string; + turnover24h: string; + + // Futures specific fields + indexPrice?: string; + markPrice?: string; + fundingRate?: string; + openInterest?: string; + deliveryStartTime?: string; + deliveryTime?: string; + deliveryStatus?: string; +} diff --git a/src/types/response/v3/strategy.ts b/src/types/response/v3/strategy.ts new file mode 100644 index 0000000..8fc8b1b --- /dev/null +++ b/src/types/response/v3/strategy.ts @@ -0,0 +1,28 @@ +export interface PlaceStrategyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface ModifyStrategyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface StrategyOrderV3 { + orderId: string; + clientOid: string; + category: 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES'; + symbol: string; + qty: string; + posSide: 'long' | 'short'; + tpTriggerBy: 'market' | 'mark'; + slTriggerBy: 'market' | 'mark'; + takeProfit: string; + stopLoss: string; + tpOrderType: 'limit' | 'market'; + slOrderType: 'limit' | 'market'; + tpLimitPrice: string; + slLimitPrice: string; + createdTime: string; + updatedTime: string; +} diff --git a/src/types/response/v3/trade.ts b/src/types/response/v3/trade.ts new file mode 100644 index 0000000..741982f --- /dev/null +++ b/src/types/response/v3/trade.ts @@ -0,0 +1,208 @@ +export interface BatchModifyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface CancelAllOrdersResponseV3 { + list: { + orderId: string; + clientOid: string; + code: string; + msg: string; + }[]; +} + +export interface CancelBatchOrdersResponseV3 { + orderId: string; + clientOid: string; + code?: string; + msg?: string; +} + +export interface CloseAllPositionsResponseV3 { + list: { + orderId: string; + clientOid: string; + code: string; + msg: string; + }[]; +} + +export interface CancelOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface GetMaxOpenAvailableResponseV3 { + available: string; + maxOpen: string; + buyOpenCost: string; + sellOpenCost: string; + maxBuyOpen: string; + maxSellOpen: string; +} + +export interface FeeDetailV3 { + feeCoin: string; + fee: string; +} + +export interface OrderInfoV3 { + orderId: string; + clientOid: string; + category: string; + symbol: string; + orderType: string; + side: string; + price: string; + qty: string; + amount: string; + cumExecQty: string; + cumExecValue: string; + avgPrice: string; + timeInForce: string; + orderStatus: string; + posSide: string; + holdMode: string; + reduceOnly: string; + feeDetail: FeeDetailV3[]; + cancelReason: string; + execType: string; + stpMode?: string; + createdTime: string; + updatedTime: string; +} + +export interface FillV3 { + execId: string; + orderId: string; + category: string; + symbol: string; + orderType: string; + side: string; + execPrice: string; + execQty: string; + execValue: string; + tradeScope: string; + feeDetail: FeeDetailV3[]; + execPnl?: string; + tradeSide?: string; + createdTime: string; + updatedTime: string; +} + +export interface UnfilledOrderV3 { + orderId: string; + clientOid: string; + category: string; + symbol: string; + orderType: string; + side: string; + price: string; + qty: string; + amount: string; + cumExecQty: string; + cumExecValue: string; + avgPrice: string; + timeInForce: string; + orderStatus: string; + posSide: string; + holdMode: string; + reduceOnly: string; + feeDetail: FeeDetailV3[]; + stpMode?: string; + createdTime: string; + updatedTime: string; +} + +export interface HistoryOrderV3 { + orderId: string; + clientOid: string; + category: string; + symbol: string; + orderType: string; + side: string; + price: string; + qty: string; + amount: string; + cumExecQty: string; + cumExecValue: string; + avgPrice: string; + timeInForce: string; + orderStatus: string; + posSide: string; + holdMode: string; + reduceOnly: string; + feeDetail: FeeDetailV3[]; + cancelReason: string; + execType: string; + stpMode?: string; + createdTime: string; + updatedTime: string; +} + +export interface PositionHistoryV3 { + positionId: string; + category: string; + symbol: string; + marginCoin: string; + holdMode: string; + posSide: string; + marginMode: string; + openPriceAvg: string; + closePriceAvg: string; + openTotalPos: string; + closeTotalPos: string; + cumRealisedPnl: string; + netProfit: string; + totalFunding: string; + openFeeTotal: string; + closeFeeTotal: string; + createdTime: string; + updatedTime: string; +} + +export interface CurrentPositionV3 { + category: string; + symbol: string; + marginCoin: string; + holdMode: string; + posSide: string; + marginMode: string; + positionBalance: string; + available: string; + frozen: string; + total: string; + leverage: string; + curRealisedPnl: string; + avgPrice: string; + positionStatus: string; + unrealisedPnl: string; + liquidationPrice: string; + mmr: string; + profitRate: string; + markPrice: string; + breakEvenPrice: string; + totalFunding: string; + openFeeTotal: string; + closeFeeTotal: string; + createdTime: string; + updatedTime: string; +} + +export interface ModifyOrderResponseV3 { + orderId: string; + clientOid: string; +} + +export interface PlaceBatchOrdersResponseV3 { + orderId: string; + clientOid: string; + code?: string; + msg?: string; +} + +export interface PlaceOrderResponseV3 { + orderId: string; + clientOid: string; +} diff --git a/src/types/shared.ts b/src/types/shared.ts index 6c9e9a9..553a148 100644 --- a/src/types/shared.ts +++ b/src/types/shared.ts @@ -1,4 +1,4 @@ -import { REST_CLIENT_TYPE_ENUM } from '../util'; +import { REST_CLIENT_TYPE_ENUM } from '../util/requestUtils.js'; export type numberInString = string; diff --git a/src/types/websockets/index.ts b/src/types/websockets/index.ts deleted file mode 100644 index a22218e..0000000 --- a/src/types/websockets/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './client'; -export * from './events'; diff --git a/src/types/websockets/ws-api-request.ts b/src/types/websockets/ws-api-request.ts new file mode 100644 index 0000000..19bedc7 --- /dev/null +++ b/src/types/websockets/ws-api-request.ts @@ -0,0 +1,20 @@ +export interface WSAPIPlaceOrderRequestV3 { + symbol: string; + orderType: 'limit' | 'market'; + qty: string; + price?: string; + side: 'buy' | 'sell'; + posSide?: 'long' | 'short'; + timeInForce?: 'gtc' | 'ioc' | 'fok' | 'post_only'; + reduceOnly?: 'YES' | 'NO'; // Note: reduceOnly is not supported for batch place WS API. Might be supported starting late Q4 2025, but not supported yet. + clientOid?: string; + stpMode?: 'none' | 'cancel_taker' | 'cancel_maker' | 'cancel_both'; + tpTriggerBy?: 'market' | 'mark'; + slTriggerBy?: 'market' | 'mark'; + takeProfit?: string; + stopLoss?: string; + tpOrderType?: 'limit' | 'market'; + slOrderType?: 'limit' | 'market'; + tpLimitPrice?: string; + slLimitPrice?: string; +} diff --git a/src/types/websockets/ws-api-response.ts b/src/types/websockets/ws-api-response.ts new file mode 100644 index 0000000..fc33e93 --- /dev/null +++ b/src/types/websockets/ws-api-response.ts @@ -0,0 +1,6 @@ +export interface WSAPIPlaceOrderResponseV3 { + symbol: string; + orderId: string; + clientOid: string; + cTime: string; +} diff --git a/src/types/websockets/ws-api.ts b/src/types/websockets/ws-api.ts new file mode 100644 index 0000000..f758e45 --- /dev/null +++ b/src/types/websockets/ws-api.ts @@ -0,0 +1,124 @@ +import { WS_KEY_MAP } from '../../util/websocket-util.js'; +import { CancelOrderRequestV3 } from '../request/v3/trade.js'; +import { CancelOrderResponseV3 } from '../response/v3/trade.js'; +import { WSAPIPlaceOrderRequestV3 } from './ws-api-request.js'; +import { WSAPIPlaceOrderResponseV3 } from './ws-api-response.js'; +import { BitgetInstTypeV3, WsKey } from './ws-general.js'; + +export type WSOperation = 'subscribe' | 'unsubscribe' | 'login'; + +// When new WS API operations are added, make sure to also update WS_API_Operations[] below +export type WSAPIOperation = + | 'place-order' + | 'batch-place' + | 'cancel-order' + | 'batch-cancel'; + +export const WS_API_Operations: WSAPIOperation[] = [ + 'place-order', + 'batch-place', + 'cancel-order', + 'batch-cancel', +]; + +export interface WSOperationLoginParams { + apiKey: string; + passphrase: string; + timestamp: number; + sign: string; +} + +export interface WSAPIRequestBitgetV3 { + op: 'trade'; + id: string; + category: BitgetInstTypeV3; + topic: WSAPIOperation; + args: TWSParams | TWSParams[]; +} + +export interface WSAPIRequestFlags { + /** If true, will skip auth requirement for WS API connection */ + authIsOptional?: boolean | undefined; +} + +export type Exact = { + // This part says: if there's any key that's not in T, it's an error + [K: string]: never; +} & { + [K in keyof T]: T[K]; +}; + +/** + +/** + * V2 request looks like this: +{ + "op":"subscribe", + "args":[ + { + "instType":"SPOT", + "channel":"ticker", + "instId":"BTCUSDT" + }, + { + "instType":"SPOT", + "channel":"candle5m", + "instId":"BTCUSDT" + } + ] +} + */ +export interface WsRequestOperationBitget { + op: WSOperation; + args?: (TWSRequestArg | string | number)[]; +} +export interface WSAPIResponse< + TResponseData extends object = object, + TOperation extends WSAPIOperation = WSAPIOperation, +> { + wsKey: WsKey; + /** Auto-generated */ + id: string; + event: 'trade'; + category: BitgetInstTypeV3; + topic: TOperation; + args: TResponseData; + code: '0' | string; + msg: 'success' | string; + ts: string; +} + +/** + * List of operations supported for this WsKey (connection) + */ +export interface WsAPIWsKeyTopicMap { + [WS_KEY_MAP.v3Private]: WSAPIOperation; +} + +/** + * Request parameters expected per operation + */ +export interface WsAPITopicRequestParamMap { + // https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + 'place-order': WSAPIPlaceOrderRequestV3; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + 'batch-place': WSAPIPlaceOrderRequestV3[]; + // https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + 'cancel-order': CancelOrderRequestV3; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + 'batch-cancel': CancelOrderRequestV3[]; +} + +/** + * Response structure expected for each operation + */ +export interface WsAPIOperationResponseMap { + // https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel#request-parameters + 'place-order': WSAPIResponse<[WSAPIPlaceOrderResponseV3], 'place-order'>; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + 'batch-place': WSAPIResponse; + // https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + 'cancel-order': WSAPIResponse<[CancelOrderResponseV3], 'cancel-order'>; + // https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + 'batch-cancel': WSAPIResponse; +} diff --git a/src/types/websockets/events.ts b/src/types/websockets/ws-events.ts similarity index 82% rename from src/types/websockets/events.ts rename to src/types/websockets/ws-events.ts index 1b1107e..05a4624 100644 --- a/src/types/websockets/events.ts +++ b/src/types/websockets/ws-events.ts @@ -1,3 +1,18 @@ +export interface MessageEventLike { + target: WebSocket; + type: 'message'; + data: string; +} + +export function isMessageEvent(msg: unknown): msg is MessageEventLike { + if (typeof msg !== 'object' || !msg) { + return false; + } + + const message = msg as MessageEventLike; + return message['type'] === 'message' && typeof message['data'] === 'string'; +} + export interface WsBaseEvent { action: TAction; arg: unknown; diff --git a/src/types/websockets/client.ts b/src/types/websockets/ws-general.ts similarity index 68% rename from src/types/websockets/client.ts rename to src/types/websockets/ws-general.ts index f0d5bac..da4a4e3 100644 --- a/src/types/websockets/client.ts +++ b/src/types/websockets/ws-general.ts @@ -1,9 +1,21 @@ -import { WS_KEY_MAP } from '../../util'; -import { FuturesProductTypeV2 } from '../request'; +import { RestClientOptions } from '../../util/requestUtils.js'; +import { WS_KEY_MAP } from '../../util/websocket-util.js'; +import { FuturesProductTypeV2 } from '../request/shared.js'; -/** A "topic" is always a string */ export type BitgetInstType = 'SP' | 'SPBL' | 'MC' | 'UMCBL' | 'DMCBL'; export type BitgetInstTypeV2 = 'SPOT' | FuturesProductTypeV2; +export type BitgetInstTypeV3 = + | 'UTA' // for account-level topics + | 'spot' + | 'usdt-futures' + | 'coin-futures' + | 'usdc-futures'; + +/** + * + * V1 list of topics for WebSocket consumers + * + */ export type WsPublicSpotTopic = | 'ticker' @@ -31,9 +43,16 @@ export type WsPrivateFuturesTopic = | 'ordersAlgo'; export type WsPublicTopic = WsPublicSpotTopic | WsPublicFuturesTopic; + export type WsPrivateTopic = WsPrivateSpotTopic | WsPrivateFuturesTopic; export type WsTopic = WsPublicTopic | WsPrivateTopic; +/** + * + * V2 list of topics for WebSocket consumers + * + */ + export type WsPublicTopicV2 = | 'index-price' // margin only | 'ticker' @@ -61,17 +80,20 @@ export type WsPublicTopicV2 = | 'books5' | 'books15'; +// Also update PRIVATE_TOPICS_V2 if this is updated export type WSPrivateTopicFuturesV2 = | 'positions' | 'orders-algo' | 'positions-history'; +// Also update PRIVATE_TOPICS_V2 if this is updated export type WSPrivateTopicMarginV2 = | 'orders-crossed' | 'account-crossed' | 'account-isolated' | 'orders-isolated'; +// Also update PRIVATE_TOPICS_V2 if this is updated export type WsPrivateTopicV2 = | 'account' | 'orders' @@ -80,6 +102,16 @@ export type WsPrivateTopicV2 = export type WsTopicV2 = WsPublicTopicV2 | WsPrivateTopicV2; +/** + * + * V3 / UTA list of topics for WebSocket consumers + * + */ +export type WsPublicTopicV3 = 'ticker' | 'kline' | 'books' | 'publicTrade'; +// Also update PRIVATE_TOPICS_V3 if this is updated +export type WsPrivateTopicV3 = 'account' | 'position' | 'fill' | 'order'; +export type WsTopicV3 = WsPublicTopicV3 | WsPrivateTopicV3; + /** This is used to differentiate between each of the available websocket streams */ export type WsKey = (typeof WS_KEY_MAP)[keyof typeof WS_KEY_MAP]; @@ -143,6 +175,20 @@ export interface WSClientConfigurableOptions { /** The passphrase you set when creating the API Key (NOT your account password) */ apiPass?: string; + /** + * Set to `true` to connect to Bitget's demo trading WebSockets: + * + * - V2: https://www.bitget.com/api-doc/common/demotrading/websocket + * - V3/UTA: https://www.bitget.com/api-doc/uta/guide#demo-trading + */ + demoTrading?: boolean; + + /** Define a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds */ + recvWindow?: number; + + // Disable ping/pong ws heartbeat mechanism (not recommended) // TODO: + disableHeartbeat?: boolean; + /** How often to check if the connection is alive */ pingInterval?: number; @@ -152,15 +198,21 @@ export interface WSClientConfigurableOptions { /** Delay in milliseconds before respawning the connection */ reconnectTimeout?: number; - requestOptions?: { - /** override the user agent when opening the websocket connection (some proxies use this) */ - agent?: string; + requestOptions?: RestClientOptions; + + wsOptions?: { + protocols?: string[]; + agent?: any; }; wsUrl?: string; - /** Define a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds */ - recvWindow?: number; + /** + * Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method + * + * Look in the examples folder for a demonstration on using node's createHmac instead. + */ + customSignMessageFn?: (message: string, secret: string) => Promise; } export interface WebsocketClientOptions extends WSClientConfigurableOptions { @@ -168,4 +220,6 @@ export interface WebsocketClientOptions extends WSClientConfigurableOptions { pongTimeout: number; reconnectTimeout: number; recvWindow: number; + authPrivateConnectionsOnConnect: boolean; + authPrivateRequests: boolean; } diff --git a/src/util/BaseRestClient.ts b/src/util/BaseRestClient.ts index e02be75..4d890ed 100644 --- a/src/util/BaseRestClient.ts +++ b/src/util/BaseRestClient.ts @@ -1,13 +1,18 @@ import axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios'; +import https from 'https'; -import { RestClientType } from '../types'; -import { signMessage } from './node-support'; +import { RestClientType } from '../types/shared.js'; import { getRestBaseUrl, RestClientOptions, serializeParams, -} from './requestUtils'; -import { neverGuard } from './websocket-util'; +} from './requestUtils.js'; +import { + SignAlgorithm, + SignEncodeMethod, + signMessage, +} from './webCryptoAPI.js'; +import { neverGuard } from './websocket-util.js'; interface SignedRequest { originalParams: T; @@ -110,10 +115,34 @@ export default abstract class BaseRestClient { 'X-CHANNEL-API-CODE': 'hbnni', 'Content-Type': 'application/json', locale: 'en-US', - ...(restOptions.demoTrading ? { paptrading: '1' } : {}), }, }; + if (this.options.demoTrading) { + this.globalRequestOptions.headers = { + ...this.globalRequestOptions.headers, + // Header to enable paper trading with provided demo API keys + paptrading: '1', + }; + } + + // If enabled, configure a https agent with keepAlive enabled + if (this.options.keepAlive) { + // Extract existing https agent parameters, if provided, to prevent the keepAlive flag from overwriting an existing https agent completely + const existingHttpsAgent = this.globalRequestOptions.httpsAgent as + | https.Agent + | undefined; + const existingAgentOptions = existingHttpsAgent?.options || {}; + + // For more advanced configuration, raise an issue on GitHub or use the "networkOptions" + // parameter to define a custom httpsAgent with the desired properties + this.globalRequestOptions.httpsAgent = new https.Agent({ + ...existingAgentOptions, + keepAlive: true, + keepAliveMsecs: this.options.keepAliveMsecs, + }); + } + this.baseUrl = getRestBaseUrl(false, restOptions); this.apiKey = this.options.apiKey; this.apiSecret = this.options.apiSecret; @@ -232,6 +261,18 @@ export default abstract class BaseRestClient { }; } + private async signMessage( + paramsStr: string, + secret: string, + method: SignEncodeMethod, + algorithm: SignAlgorithm, + ): Promise { + if (typeof this.options.customSignMessageFn === 'function') { + return this.options.customSignMessageFn(paramsStr, secret); + } + return await signMessage(paramsStr, secret, method, algorithm); + } + /** * @private sign request and set recv window */ @@ -278,7 +319,12 @@ export default abstract class BaseRestClient { // console.log('sign params: ', paramsStr); - res.sign = await signMessage(paramsStr, this.apiSecret, 'base64'); + res.sign = await this.signMessage( + paramsStr, + this.apiSecret, + 'base64', + 'SHA-256', + ); res.queryParamsWithSign = signRequestParams; return res; } diff --git a/src/util/BaseWSClient.ts b/src/util/BaseWSClient.ts index ec33cf5..bf65f08 100644 --- a/src/util/BaseWSClient.ts +++ b/src/util/BaseWSClient.ts @@ -2,31 +2,58 @@ import EventEmitter from 'events'; import WebSocket from 'isomorphic-ws'; +import { WSOperation } from '../types/websockets/ws-api.js'; +import { + isMessageEvent, + MessageEventLike, +} from '../types/websockets/ws-events.js'; import { WebsocketClientOptions, WSClientConfigurableOptions, -} from '../types/index'; -import { DefaultLogger } from './logger'; -import { isWsPong } from './requestUtils'; -import { getWsAuthSignature, safeTerminateWs } from './websocket-util'; -import WsStore from './WsStore'; -import { WsConnectionStateEnum } from './WsStore.types'; +} from '../types/websockets/ws-general.js'; +import { DefaultLogger } from './logger.js'; +import { + getNormalisedTopicRequests, + safeTerminateWs, + WS_LOGGER_CATEGORY, + WsTopicRequest, + WsTopicRequestOrStringTopic, +} from './websocket-util.js'; +import WsStore from './WsStore.js'; +import { WSConnectedResult, WsConnectionStateEnum } from './WsStore.types.js'; interface WSClientEventMap { /** Connection opened. If this connection was previously opened and reconnected, expect the reconnected event instead */ - open: (evt: { wsKey: WsKey; event: any }) => void; + open: (evt: { + wsKey: WsKey; + event: any; + wsUrl: string; + ws: WebSocket; + }) => void; + /** Reconnecting a dropped connection */ reconnect: (evt: { wsKey: WsKey; event: any }) => void; + /** Successfully reconnected a connection that dropped */ - reconnected: (evt: { wsKey: WsKey; event: any }) => void; + reconnected: (evt: { + wsKey: WsKey; + event: any; + wsUrl: string; + ws: WebSocket; + }) => void; + /** Connection closed */ close: (evt: { wsKey: WsKey; event: any }) => void; + /** Received reply to websocket command (e.g. after subscribing to topics) */ response: (response: any & { wsKey: WsKey }) => void; + /** Received data for topic */ update: (response: any & { wsKey: WsKey }) => void; + /** Exception from ws client OR custom listeners (e.g. if you throw inside your event handler) */ exception: (response: any & { wsKey: WsKey }) => void; + /** Confirmation that a connection successfully authenticated */ authenticated: (event: { wsKey: WsKey; event: any }) => void; } @@ -35,7 +62,7 @@ interface WSClientEventMap { export interface BaseWebsocketClient< TWSKey extends string, // eslint-disable-next-line @typescript-eslint/no-unused-vars - TWSTopicSubscribeEventArgs extends object, + TWSRequestEvent extends object, > { on>( event: U, @@ -48,143 +75,330 @@ export interface BaseWebsocketClient< ): boolean; } -const LOGGER_CATEGORY = { category: 'bitget-ws' }; +export interface EmittableEvent { + eventType: 'response' | 'update' | 'exception' | 'authenticated'; + event: TEvent; + isWSAPIResponse?: boolean; +} + +/** + * Appends wsKey and isWSAPIResponse to all events. + * Some events are arrays, this handles that nested scenario too. + */ +function getFinalEmittable( + emittable: EmittableEvent | EmittableEvent[], + wsKey: any, + isWSAPIResponse?: boolean, +): any { + if (Array.isArray(emittable)) { + return emittable.map((subEvent) => + getFinalEmittable(subEvent, wsKey, isWSAPIResponse), + ); + } + + if (Array.isArray(emittable.event)) { + // Some topics just emit an array. + // This is consistent with how it was before the WS API upgrade: + return emittable.event.map((subEvent) => + getFinalEmittable(subEvent, wsKey, isWSAPIResponse), + ); + + // const { event, ...others } = emittable; + // return { + // ...others, + // event: event.map((subEvent) => + // getFinalEmittable(subEvent, wsKey, isWSAPIResponse), + // ), + // }; + } + + if (emittable.event) { + return { + ...emittable.event, + wsKey: wsKey, + isWSAPIResponse: !!isWSAPIResponse, + }; + } + + return { + ...emittable, + wsKey: wsKey, + isWSAPIResponse: !!isWSAPIResponse, + }; +} + +/** + * A midflight WS request event (e.g. subscribe to these topics). + * + * - requestKey: unique identifier for this request, if available. Can be anything as a string. + * - requestEvent: the raw request, as an object, that will be sent on the ws connection. This may contain multiple topics/requests in one object, if the exchange supports it. + */ +export interface MidflightWsRequestEvent { + requestKey: string; + requestEvent: TEvent; +} export abstract class BaseWebsocketClient< TWSKey extends string, - TWSTopicSubscribeEventArgs extends object, + TWSRequestEvent extends object, > extends EventEmitter { - private wsStore: WsStore; + /** + * State store to track a list of topics (topic requests) we are expected to be subscribed to if reconnected + */ + private wsStore: WsStore>; - protected logger: typeof DefaultLogger; + public logger: DefaultLogger; protected options: WebsocketClientOptions; - constructor( - options: WSClientConfigurableOptions, - logger?: typeof DefaultLogger, - ) { + private wsApiRequestId: number = 0; + + private timeOffsetMs: number = 0; + + /** + * { [wsKey]: { [requestId]: request } } + */ + private midflightRequestCache: Record< + string, + Record + > = {}; + + constructor(options?: WSClientConfigurableOptions, logger?: DefaultLogger) { super(); this.logger = logger || DefaultLogger; this.wsStore = new WsStore(this.logger); this.options = { + demoTrading: false, pongTimeout: 1000, pingInterval: 10000, reconnectTimeout: 500, recvWindow: 0, + + // Automatically send an authentication op/request after a connection opens, for private connections. + authPrivateConnectionsOnConnect: true, + // Individual requests do not require a signature, so this is disabled. + authPrivateRequests: false, + ...options, }; } - protected abstract getWsKeyForTopic( - subscribeEvent: TWSTopicSubscribeEventArgs, - isPrivate?: boolean, - ): TWSKey; + /** + * Return true if this wsKey connection should automatically authenticate immediately after connecting + */ + protected abstract isAuthOnConnectWsKey(wsKey: TWSKey): boolean; + + protected abstract sendPingEvent(wsKey: TWSKey, ws: WebSocket): void; - protected abstract isPrivateChannel( - subscribeEvent: TWSTopicSubscribeEventArgs, + protected abstract sendPongEvent(wsKey: TWSKey, ws: WebSocket): void; + + protected abstract isWsPing(data: any): boolean; + + protected abstract isWsPong(data: any): boolean; + + protected abstract getWsAuthRequestEvent(wsKey: TWSKey): Promise; + + protected abstract isPrivateTopicRequest( + request: WsTopicRequest, + wsKey: TWSKey, ): boolean; - protected abstract shouldAuthOnConnect(wsKey: TWSKey): boolean; + protected abstract getPrivateWSKeys(): TWSKey[]; - protected abstract getWsUrl(wsKey: TWSKey): string; + protected abstract getWsUrl(wsKey: TWSKey): Promise; protected abstract getMaxTopicsPerSubscribeEvent( wsKey: TWSKey, ): number | null; /** - * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. */ - abstract connectAll(): Promise[]; + protected abstract getWsRequestEvents( + operation: WSOperation, + requests: WsTopicRequest[], + wsKey: TWSKey, + ): Promise[]>; /** - * Subscribe to topics & track/persist them. They will be automatically resubscribed to if the connection drops/reconnects. - * @param wsTopics topic or list of topics - * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) + * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) */ - public subscribe( - wsTopics: TWSTopicSubscribeEventArgs[] | TWSTopicSubscribeEventArgs, - isPrivateTopic?: boolean, - ) { - const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; + protected abstract resolveEmittableEvents( + wsKey: TWSKey, + event: MessageEventLike, + ): EmittableEvent[]; - topics.forEach((topic) => { - const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); + /** + * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + */ + protected abstract connectAll(): Promise[]; - // Persist this topic to the expected topics list - this.wsStore.addTopic(wsKey, topic); + protected isPrivateWsKey(wsKey: TWSKey): boolean { + return this.getPrivateWSKeys().includes(wsKey); + } - // TODO: tidy up unsubscribe too, also in other connectors + /** Returns auto-incrementing request ID, used to track promise references for async requests */ + protected getNewRequestId(): number { + return ++this.wsApiRequestId; + } - // if connected, send subscription request - if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTED) - ) { - // if not authenticated, dont sub to private topics yet. - // This'll happen automatically once authenticated - const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; - if (!isAuthenticated) { - return this.requestSubscribeTopics( - wsKey, - topics.filter((topic) => !this.isPrivateChannel(topic)), - ); - } - return this.requestSubscribeTopics(wsKey, topics); - } + protected abstract sendWSAPIRequest( + wsKey: TWSKey, + operation: string, + category: string, + params?: any, + ): Promise; - // start connection process if it hasn't yet begun. Topics are automatically subscribed to on-connect - if ( - !this.wsStore.isConnectionState( - wsKey, - WsConnectionStateEnum.CONNECTING, - ) && - !this.wsStore.isConnectionState( - wsKey, - WsConnectionStateEnum.RECONNECTING, - ) - ) { - return this.connect(wsKey); - } - }); + public getTimeOffsetMs() { + return this.timeOffsetMs; + } + + public setTimeOffsetMs(newOffset: number) { + this.timeOffsetMs = newOffset; } /** - * Unsubscribe from topics & remove them from memory. They won't be re-subscribed to if the connection reconnects. - * @param wsTopics topic or list of topics - * @param isPrivateTopic optional - the library will try to detect private topics, you can use this to mark a topic as private (if the topic isn't recognised yet) + * Don't call directly! Use subscribe() instead! + * + * Subscribe to one or more topics on a WS connection (identified by WS Key). + * + * - Topics are automatically cached + * - Connections are automatically opened, if not yet connected + * - Authentication is automatically handled + * - Topics are automatically resubscribed to, if something happens to the connection, unless you call unsubsribeTopicsForWsKey(topics, key). + * + * @param wsRequests array of topics to subscribe to + * @param wsKey ws key referring to the ws connection these topics should be subscribed on */ - public unsubscribe( - wsTopics: TWSTopicSubscribeEventArgs[] | TWSTopicSubscribeEventArgs, - isPrivateTopic?: boolean, - ) { - const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; - topics.forEach((topic) => { - this.wsStore.deleteTopic( - this.getWsKeyForTopic(topic, isPrivateTopic), - topic, + protected async subscribeTopicsForWsKey( + wsTopicRequests: WsTopicRequestOrStringTopic[], + wsKey: TWSKey, + ): Promise { + const normalisedTopicRequests = getNormalisedTopicRequests(wsTopicRequests); + + // Store topics, so future automation (post-auth, post-reconnect) has everything needed to resubscribe automatically + for (const topic of normalisedTopicRequests) { + this.wsStore.addTopic(wsKey, topic); + } + + const isConnected = this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + + const isConnectionInProgress = + this.wsStore.isConnectionAttemptInProgress(wsKey); + + // start connection process if it hasn't yet begun. Topics are automatically subscribed to on-connect + if (!isConnected && !isConnectionInProgress) { + return this.connect(wsKey); + } + + // Subscribe should happen automatically once connected, nothing to do here after topics are added to wsStore. + if (!isConnected) { + /** + * Are we in the process of connection? Nothing to send yet. + */ + this.logger.trace( + 'WS not connected - requests queued for retry once connected.', + { + ...WS_LOGGER_CATEGORY, + wsKey, + wsTopicRequests, + }, ); + return isConnectionInProgress; + } - const wsKey = this.getWsKeyForTopic(topic, isPrivateTopic); + // We're connected. Check if auth is needed and if already authenticated + const isPrivateConnection = this.isPrivateWsKey(wsKey); + const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; + if (isPrivateConnection && !isAuthenticated) { + /** + * If not authenticated yet and auth is required, don't request topics yet. + * + * Auth should already automatically be in progress, so no action needed from here. Topics will automatically subscribe post-auth success. + */ + return false; + } - // unsubscribe request only necessary if active connection exists - if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTED) - ) { - this.requestUnsubscribeTopics(wsKey, [topic]); + // Finally, request subscription to topics if the connection is healthy and ready + return this.requestSubscribeTopics(wsKey, normalisedTopicRequests); + } + + protected async unsubscribeTopicsForWsKey( + wsTopicRequests: WsTopicRequestOrStringTopic[], + wsKey: TWSKey, + ): Promise { + const normalisedTopicRequests = getNormalisedTopicRequests(wsTopicRequests); + + // Store topics, so future automation (post-auth, post-reconnect) has everything needed to resubscribe automatically + for (const topic of normalisedTopicRequests) { + this.wsStore.deleteTopic(wsKey, topic); + } + + const isConnected = this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + + // If not connected, don't need to do anything. + // Removing the topic from the store is enough to stop it from being resubscribed to on reconnect. + if (!isConnected) { + return; + } + + // We're connected. Check if auth is needed and if already authenticated + const isPrivateConnection = this.isPrivateWsKey(wsKey); + const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; + if (isPrivateConnection && !isAuthenticated) { + /** + * If not authenticated yet and auth is required, don't need to do anything. + * We don't subscribe to topics until auth is complete anyway. + */ + return; + } + + // Finally, request subscription to topics if the connection is healthy and ready + return this.requestUnsubscribeTopics(wsKey, normalisedTopicRequests); + } + + /** + * Splits topic requests into two groups, public & private topic requests + */ + private sortTopicRequestsIntoPublicPrivate( + wsTopicRequests: WsTopicRequest[], + wsKey: TWSKey, + ): { + publicReqs: WsTopicRequest[]; + privateReqs: WsTopicRequest[]; + } { + const publicTopicRequests: WsTopicRequest[] = []; + const privateTopicRequests: WsTopicRequest[] = []; + + for (const topic of wsTopicRequests) { + if (this.isPrivateTopicRequest(topic, wsKey)) { + privateTopicRequests.push(topic); + } else { + publicTopicRequests.push(topic); } - }); + } + + return { + publicReqs: publicTopicRequests, + privateReqs: privateTopicRequests, + }; } /** Get the WsStore that tracks websockets & topics */ - public getWsStore(): WsStore { + public getWsStore(): WsStore> { return this.wsStore; } public close(wsKey: TWSKey, force?: boolean) { - this.logger.info('Closing connection', { ...LOGGER_CATEGORY, wsKey }); + this.logger.info('Closing connection', { ...WS_LOGGER_CATEGORY, wsKey }); this.setWsState(wsKey, WsConnectionStateEnum.CLOSING); this.clearTimers(wsKey); @@ -196,22 +410,36 @@ export abstract class BaseWebsocketClient< } public closeAll(force?: boolean) { - this.wsStore.getKeys().forEach((key: TWSKey) => { + const keys = this.wsStore.getKeys(); + + this.logger.info(`Closing all ws connections: ${keys}`); + keys.forEach((key: TWSKey) => { this.close(key, force); }); } + public isConnected(wsKey: TWSKey): boolean { + return this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + } + /** * Request connection to a specific websocket, instead of waiting for automatic connection. */ - protected async connect(wsKey: TWSKey): Promise { + public async connect( + wsKey: TWSKey, + customUrl?: string | undefined, + throwOnError?: boolean, + ): Promise { try { if (this.wsStore.isWsOpen(wsKey)) { this.logger.error( 'Refused to connect to ws with existing active connection', - { ...LOGGER_CATEGORY, wsKey }, + { ...WS_LOGGER_CATEGORY, wsKey }, ); - return this.wsStore.getWs(wsKey); + return { wsKey, ws: this.wsStore.getWs(wsKey)! }; } if ( @@ -219,9 +447,9 @@ export abstract class BaseWebsocketClient< ) { this.logger.error( 'Refused to connect to ws, connection attempt already active', - { ...LOGGER_CATEGORY, wsKey }, + { ...WS_LOGGER_CATEGORY, wsKey }, ); - return; + return this.wsStore.getConnectionInProgressPromise(wsKey)?.promise; } if ( @@ -231,14 +459,53 @@ export abstract class BaseWebsocketClient< this.setWsState(wsKey, WsConnectionStateEnum.CONNECTING); } - const url = this.getWsUrl(wsKey); // + authParams; + if (!this.wsStore.getConnectionInProgressPromise(wsKey)) { + this.wsStore.createConnectionInProgressPromise(wsKey, false); + } + + const url = customUrl || (await this.getWsUrl(wsKey)); const ws = this.connectToWsUrl(url, wsKey); - return this.wsStore.setWs(wsKey, ws); + this.wsStore.setWs(wsKey, ws); } catch (err) { this.parseWsError('Connection failed', err, wsKey); this.reconnectWithDelay(wsKey, this.options.reconnectTimeout!); + + if (throwOnError) { + throw err; + } } + return this.wsStore.getConnectionInProgressPromise(wsKey)?.promise; + } + + private connectToWsUrl(url: string, wsKey: TWSKey): WebSocket { + this.logger.trace(`Opening WS connection to URL: ${url}`, { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + + const { protocols = [], ...wsOptions } = this.options.wsOptions || {}; + const ws = new WebSocket(url, protocols, wsOptions); + + ws.onopen = (event) => this.onWsOpen(event, wsKey, url, ws); + ws.onmessage = (event) => this.onWsMessage(event, wsKey, ws); + ws.onerror = (event) => + this.parseWsError('Websocket onWsError', event, wsKey); + ws.onclose = (event) => this.onWsClose(event, wsKey); + + // Native ws ping/pong frames are not in use for bitget + // if (typeof ws.on === 'function') { + // ws.on('ping', (event) => this.onWsPing(event, wsKey, ws, 'event')); + // ws.on('pong', (event) => this.onWsPong(event, wsKey, 'event')); + // } + + // // Not sure these work in the browser, the traditional event listeners are required for ping/pong frames in node + // ws.onping = (event) => this.onWsPing(event, wsKey, ws, 'function'); + // ws.onpong = (event) => this.onWsPong(event, wsKey, 'function'); + + (ws as any).wsKey = wsKey; + + return ws; } private parseWsError(context: string, error: any, wsKey: TWSKey) { @@ -252,7 +519,7 @@ export abstract class BaseWebsocketClient< switch (error.message) { case 'Unexpected server response: 401': this.logger.error(`${context} due to 401 authorization failure.`, { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); break; @@ -262,7 +529,7 @@ export abstract class BaseWebsocketClient< `${context} due to unexpected response error: "${ error?.msg || error?.message || error }"`, - { ...LOGGER_CATEGORY, wsKey, error }, + { ...WS_LOGGER_CATEGORY, wsKey, error }, ); break; } @@ -272,38 +539,28 @@ export abstract class BaseWebsocketClient< } /** Get a signature, build the auth request and send it */ - private async sendAuthRequest(wsKey: TWSKey): Promise { + private async sendAuthRequest(wsKey: TWSKey): Promise { try { - const { apiKey, apiSecret, apiPass, recvWindow } = this.options; - - const { signature, expiresAt } = await getWsAuthSignature( - apiKey, - apiSecret, - apiPass, - recvWindow, - ); - - this.logger.info('Sending auth request...', { - ...LOGGER_CATEGORY, + this.logger.trace('Sending auth request...', { + ...WS_LOGGER_CATEGORY, wsKey, }); - const request = { - op: 'login', - args: [ - { - apiKey: this.options.apiKey, - passphrase: this.options.apiPass, - timestamp: expiresAt, - sign: signature, - }, - ], - }; + await this.assertIsConnected(wsKey); + + if (!this.wsStore.getAuthenticationInProgressPromise(wsKey)) { + this.wsStore.createAuthenticationInProgressPromise(wsKey, false); + } + + const request = await this.getWsAuthRequestEvent(wsKey); + // console.log('ws auth req', request); - return this.tryWsSend(wsKey, JSON.stringify(request)); + this.tryWsSend(wsKey, JSON.stringify(request)); + + return this.wsStore.getAuthenticationInProgressPromise(wsKey)?.promise; } catch (e) { - this.logger.silly(e, { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace(e, { ...WS_LOGGER_CATEGORY, wsKey }); } } @@ -318,7 +575,7 @@ export abstract class BaseWebsocketClient< this.wsStore.get(wsKey, true).activeReconnectTimer = setTimeout(() => { this.logger.info('Reconnecting to websocket', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); this.connect(wsKey); @@ -332,12 +589,12 @@ export abstract class BaseWebsocketClient< this.clearPongTimer(wsKey); - this.logger.silly('Sending ping', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Sending ping', { ...WS_LOGGER_CATEGORY, wsKey }); this.tryWsSend(wsKey, 'ping'); this.wsStore.get(wsKey, true).activePongTimer = setTimeout(() => { this.logger.info('Pong timeout - closing socket to reconnect', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); safeTerminateWs(this.getWs(wsKey), true); @@ -373,79 +630,180 @@ export abstract class BaseWebsocketClient< } /** - * @private Use the `subscribe(topics)` method to subscribe to topics. Send WS message to subscribe to topics. + * Returns a list of string events that can be individually sent upstream to complete subscribing/unsubscribing/etc to these topics + * + * If events are an object, these should be stringified (`return JSON.stringify(event);`) + * Each event returned by this will be sent one at a time + * + * Events are automatically split into smaller batches, by this method, if needed. */ - private requestSubscribeTopics( + protected async getWsOperationEventsForTopics( + topics: WsTopicRequest[], wsKey: TWSKey, - topics: TWSTopicSubscribeEventArgs[], - ) { + operation: WSOperation, + ): Promise[]> { if (!topics.length) { - return; + return []; } + // Events that are ready to send (usually stringified JSON) + const requestEvents: MidflightWsRequestEvent[] = []; + const maxTopicsPerEvent = this.getMaxTopicsPerSubscribeEvent(wsKey); - if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( - `Subscribing to topics in batches of ${maxTopicsPerEvent}`, - ); + if ( + maxTopicsPerEvent && + maxTopicsPerEvent !== null && + topics.length > maxTopicsPerEvent + ) { for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Subscribing to batch of ${batch.length}`); - this.requestSubscribeTopics(wsKey, batch); + const subscribeRequestEvents = await this.getWsRequestEvents( + operation, + batch, + wsKey, + ); + + requestEvents.push(...subscribeRequestEvents); } - this.logger.silly( - `Finished batch subscribing to ${topics.length} topics`, - ); - return; + + return requestEvents; } - const wsMessage = JSON.stringify({ - op: 'subscribe', - args: topics, - }); + const subscribeRequestEvents = await this.getWsRequestEvents( + operation, + topics, + wsKey, + ); - this.tryWsSend(wsKey, wsMessage); + return subscribeRequestEvents; } /** - * @private Use the `unsubscribe(topics)` method to unsubscribe from topics. Send WS message to unsubscribe from topics. + * @private Use the `subscribe(topics)` method to subscribe to topics. Send WS message to subscribe to topics. */ - private requestUnsubscribeTopics( + private async requestSubscribeTopics( wsKey: TWSKey, - topics: TWSTopicSubscribeEventArgs[], + wsTopicRequests: WsTopicRequest[], ) { - if (!topics.length) { + if (!wsTopicRequests.length) { return; } - const maxTopicsPerEvent = this.getMaxTopicsPerSubscribeEvent(wsKey); - if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( - `Unsubscribing to topics in batches of ${maxTopicsPerEvent}`, - ); - for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { - const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Unsubscribing to batch of ${batch.length}`); - this.requestUnsubscribeTopics(wsKey, batch); + // Automatically splits requests into smaller batches, if needed + const subscribeWsMessages = await this.getWsOperationEventsForTopics( + wsTopicRequests, + wsKey, + 'subscribe', + ); + + this.logger.trace( + `Subscribing to ${wsTopicRequests.length} "${wsKey}" topics in ${subscribeWsMessages.length} batches.`, // Events: "${JSON.stringify(topics)}" + ); + + // console.log(`batches: `, JSON.stringify(subscribeWsMessages, null, 2)); + + for (const midflightRequest of subscribeWsMessages) { + const wsMessage = midflightRequest.requestEvent; + + if (!this.midflightRequestCache[wsKey]) { + this.midflightRequestCache[wsKey] = {}; } - this.logger.silly( - `Finished batch unsubscribing to ${topics.length} topics`, + + // Cache the request for this call, so we can enrich the response with request info + // this.midflightRequestCache[wsKey][midflightRequest.requestKey] = + // midflightRequest.requestEvent; + + this.logger.trace( + // `Sending batch via message: "${JSON.stringify(wsMessage)}", cached with key "${midflightRequest.requestKey}"`, + `Sending batch via message: "${JSON.stringify(wsMessage)}"`, ); + + try { + this.tryWsSend(wsKey, JSON.stringify(wsMessage), true); + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + delete this.midflightRequestCache[wsKey][midflightRequest.requestKey]; + } + } + } + + /** + * @private Use the `unsubscribe(topics)` method to unsubscribe from topics. Send WS message to unsubscribe from topics. + */ + private async requestUnsubscribeTopics( + wsKey: TWSKey, + wsTopicRequests: WsTopicRequest[], + ) { + if (!wsTopicRequests.length) { return; } - const wsMessage = JSON.stringify({ - op: 'unsubscribe', - args: topics, - }); + const subscribeWsMessages = await this.getWsOperationEventsForTopics( + wsTopicRequests, + wsKey, + 'unsubscribe', + ); + + this.logger.trace( + `Unsubscribing to ${wsTopicRequests.length} "${wsKey}" topics in ${subscribeWsMessages.length} batches. Events: "${JSON.stringify(wsTopicRequests)}"`, + ); + + for (const midflightRequest of subscribeWsMessages) { + const wsMessage = midflightRequest.requestEvent; - this.tryWsSend(wsKey, wsMessage); + if (!this.midflightRequestCache[wsKey]) { + this.midflightRequestCache[wsKey] = {}; + } + + // Cache the request for this call, so we can enrich the response with request info + // this.midflightRequestCache[wsKey][midflightRequest.requestKey] = + // midflightRequest.requestEvent; + + this.logger.trace(`Sending batch via message: "${wsMessage}"`); + try { + this.tryWsSend(wsKey, JSON.stringify(wsMessage)); + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (e) { + delete this.midflightRequestCache[wsKey][midflightRequest.requestKey]; + } + } + + this.logger.trace( + `Finished unsubscribing to ${wsTopicRequests.length} "${wsKey}" topics in ${subscribeWsMessages.length} batches.`, + ); + + // const wsMessage = JSON.stringify({ + // op: 'unsubscribe', + // args: wsTopicRequests, + // }); } - public tryWsSend(wsKey: TWSKey, wsMessage: string) { + getCachedMidFlightRequest( + wsKey: TWSKey, + requestKey: string, + ): TWSRequestEvent | undefined { + if (!this.midflightRequestCache[wsKey]) { + this.midflightRequestCache[wsKey] = {}; + } + return this.midflightRequestCache[wsKey][requestKey]; + } + + // Not in use for Bitget. If desired, call from resolveEmittableEvents() for WS API responses. + // See binance SDK for reference + removeCachedMidFlightRequest(wsKey: TWSKey, requestKey: string) { + if (this.getCachedMidFlightRequest(wsKey, requestKey)) { + delete this.midflightRequestCache[wsKey][requestKey]; + } + } + + public tryWsSend( + wsKey: TWSKey, + wsMessage: string, + throwExceptions?: boolean, + ) { try { - this.logger.silly('Sending upstream ws message: ', { - ...LOGGER_CATEGORY, + this.logger.trace('Sending upstream ws message: ', { + ...WS_LOGGER_CATEGORY, wsMessage, wsKey, }); @@ -463,145 +821,262 @@ export abstract class BaseWebsocketClient< ws.send(wsMessage); } catch (e) { this.logger.error('Failed to send WS message', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsMessage, wsKey, exception: e, }); + if (throwExceptions) { + throw e; + } } } - private connectToWsUrl(url: string, wsKey: TWSKey): WebSocket { - this.logger.silly(`Opening WS connection to URL: ${url}`, { - ...LOGGER_CATEGORY, + private async onWsOpen( + event: WebSocket.Event, + wsKey: TWSKey, + url: string, + ws: WebSocket, + ) { + const isFreshConnectionAttempt = this.wsStore.isConnectionState( wsKey, - }); - - const agent = this.options.requestOptions?.agent; - const ws = new WebSocket(url, undefined, agent ? { agent } : undefined); - ws.onopen = (event) => this.onWsOpen(event, wsKey); - ws.onmessage = (event) => this.onWsMessage(event, wsKey); - ws.onerror = (event) => this.parseWsError('websocket error', event, wsKey); - ws.onclose = (event) => this.onWsClose(event, wsKey); + WsConnectionStateEnum.CONNECTING, + ); - return ws; - } + const isReconnectionAttempt = this.wsStore.isConnectionState( + wsKey, + WsConnectionStateEnum.RECONNECTING, + ); - private async onWsOpen(event, wsKey: TWSKey) { - if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTING) - ) { + if (isFreshConnectionAttempt) { this.logger.info('Websocket connected', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); - this.emit('open', { wsKey, event }); - } else if ( - this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.RECONNECTING) - ) { - this.logger.info('Websocket reconnected', { ...LOGGER_CATEGORY, wsKey }); - this.emit('reconnected', { wsKey, event }); + this.emit('open', { wsKey, event, wsUrl: url, ws }); + } else if (isReconnectionAttempt) { + this.logger.info('Websocket reconnected', { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + this.emit('reconnected', { wsKey, event, wsUrl: url, ws }); } this.setWsState(wsKey, WsConnectionStateEnum.CONNECTED); + this.logger.trace('Enabled ping timer', { ...WS_LOGGER_CATEGORY, wsKey }); + this.wsStore.get(wsKey, true)!.activePingTimer = setInterval( + () => this.ping(wsKey), + this.options.pingInterval, + ); + + // Resolve & cleanup deferred "connection attempt in progress" promise + try { + const connectionInProgressPromise = + this.wsStore.getConnectionInProgressPromise(wsKey); + if (connectionInProgressPromise?.resolve) { + connectionInProgressPromise.resolve({ + wsKey, + ws, + }); + } + } catch (e) { + this.logger.error( + 'Exception trying to resolve "connectionInProgress" promise', + e, + ); + } + + // Remove before continuing, in case there's more requests queued + this.wsStore.removeConnectingInProgressPromise(wsKey); + // Some websockets require an auth packet to be sent after opening the connection - if (this.shouldAuthOnConnect(wsKey)) { - await this.sendAuthRequest(wsKey); + if ( + this.isAuthOnConnectWsKey(wsKey) && + this.options.authPrivateConnectionsOnConnect + ) { + await this.assertIsAuthenticated(wsKey); } // Reconnect to topics known before it connected - // Private topics will be resubscribed to once reconnected - const topics = [...this.wsStore.getTopics(wsKey)]; - const publicTopics = topics.filter( - (topic) => !this.isPrivateChannel(topic), + const { privateReqs, publicReqs } = this.sortTopicRequestsIntoPublicPrivate( + [...this.wsStore.getTopics(wsKey)], + wsKey, ); - this.requestSubscribeTopics(wsKey, publicTopics); - this.wsStore.get(wsKey, true)!.activePingTimer = setInterval( - () => this.ping(wsKey), - this.options.pingInterval, - ); + // Request sub to public topics, if any + this.requestSubscribeTopics(wsKey, publicReqs); + + // Request sub to private topics, if auth on connect isn't needed + // Else, this is automatic after authentication is successfully confirmed + if (!this.options.authPrivateConnectionsOnConnect) { + this.requestSubscribeTopics(wsKey, privateReqs); + } } - /** Handle subscription to private topics _after_ authentication successfully completes asynchronously */ - private onWsAuthenticated(wsKey: TWSKey) { + /** + * Handle subscription to private topics _after_ authentication successfully completes asynchronously. + * + * Only used for exchanges that require auth before sending private topic subscription requests + */ + private onWsAuthenticated(wsKey: TWSKey, event: unknown) { const wsState = this.wsStore.get(wsKey, true); wsState.isAuthenticated = true; - const topics = [...this.wsStore.getTopics(wsKey)]; - const privateTopics = topics.filter((topic) => - this.isPrivateChannel(topic), - ); + // Resolve & cleanup deferred "auth attempt in progress" promise + try { + const inProgressPromise = + this.wsStore.getAuthenticationInProgressPromise(wsKey); - if (privateTopics.length) { - this.subscribe(privateTopics, true); + if (inProgressPromise?.resolve) { + inProgressPromise.resolve({ + wsKey, + event, + ws: wsState.ws!, + }); + } + } catch (e) { + this.logger.error( + 'Exception trying to resolve "authenticationInProgress" promise', + e, + ); + } + + // Remove before continuing, in case there's more requests queued + this.wsStore.removeAuthenticationInProgressPromise(wsKey); + + if (this.options.authPrivateConnectionsOnConnect) { + const topics = [...this.wsStore.getTopics(wsKey)]; + const privateTopics = topics.filter((topic) => + this.isPrivateTopicRequest(topic, wsKey), + ); + + if (privateTopics.length) { + this.subscribeTopicsForWsKey(privateTopics, wsKey); + } } } - private onWsMessage(event: unknown, wsKey: TWSKey) { + /** + * Raw incoming event handler. Parsing happens in integration layer via resolveEmittableEvents(). + */ + private onWsMessage(event: unknown, wsKey: TWSKey, ws: WebSocket) { try { + // console.log('onMessageRaw: ', (event as any).data); // any message can clear the pong timer - wouldn't get a message if the ws wasn't working this.clearPongTimer(wsKey); - if (isWsPong(event)) { - this.logger.silly('Received pong', { ...LOGGER_CATEGORY, wsKey }); + if (this.isWsPong(event)) { + this.logger.trace('Received pong', { + ...WS_LOGGER_CATEGORY, + wsKey, + event: (event as any)?.data, + }); + return; + } + + if (this.isWsPing(event)) { + this.logger.trace('Received ping', { + ...WS_LOGGER_CATEGORY, + wsKey, + event, + }); + this.sendPongEvent(wsKey, ws); return; } - const msg = JSON.parse((event && event['data']) || event); - const emittableEvent = { ...msg, wsKey }; + if (isMessageEvent(event)) { + const data = event.data; + const dataType = event.type; + + const emittableEvents = this.resolveEmittableEvents(wsKey, event); + + if (!emittableEvents.length) { + // console.log(`raw event: `, { data, dataType, emittableEvents }); + this.logger.error( + 'Unhandled/unrecognised ws event message - returned no emittable data', + { + ...WS_LOGGER_CATEGORY, + message: data || 'no message', + dataType, + event, + wsKey, + }, + ); + + return this.emit('update', { ...(event as any), wsKey }); + } - if (typeof msg === 'object') { - if (typeof msg['code'] === 'number') { - if (msg.event === 'login' && msg.code === 0) { - this.logger.info('Successfully authenticated WS client', { - ...LOGGER_CATEGORY, + for (const emittable of emittableEvents) { + if (this.isWsPong(emittable)) { + this.logger.trace('Received pong2', { + ...WS_LOGGER_CATEGORY, wsKey, + data, }); - this.emit('response', emittableEvent); - this.emit('authenticated', emittableEvent); - this.onWsAuthenticated(wsKey); - return; + continue; } - } - if (msg['event']) { - if (msg.event === 'error') { - this.logger.error('WS Error received', { - ...LOGGER_CATEGORY, + // this.logger.trace( + // 'getFinalEmittable()->pre(): ', + // JSON.stringify(emittable), + // ); + const emittableFinalEvent = getFinalEmittable( + emittable, + wsKey, + emittable.isWSAPIResponse, + ); + + // this.logger.trace( + // 'getFinalEmittable()->post(): ', + // JSON.stringify(emittable), + // ); + + if (emittable.eventType === 'authenticated') { + this.logger.trace('Successfully authenticated', { + ...WS_LOGGER_CATEGORY, wsKey, - message: msg || 'no message', - // messageType: typeof msg, - // messageString: JSON.stringify(msg), - event, + emittable, }); - this.emit('exception', emittableEvent); - this.emit('response', emittableEvent); - return; + this.emit(emittable.eventType, emittableFinalEvent); + this.onWsAuthenticated(wsKey, emittable.event); + continue; } - return this.emit('response', emittableEvent); - } - if (msg['arg']) { - return this.emit('update', emittableEvent); + // Other event types are automatically emitted here + // this.logger.trace( + // `onWsMessage().emit(${emittable.eventType})`, + // emittableFinalEvent, + // ); + try { + this.emit(emittable.eventType, emittableFinalEvent); + } catch (e) { + this.logger.error( + `Exception in onWsMessage().emit(${emittable.eventType}) handler:`, + e, + ); + } + // this.logger.trace( + // `onWsMessage().emit(${emittable.eventType}).done()`, + // emittableFinalEvent, + // ); } - } - this.logger.warning('Unhandled/unrecognised ws event message', { - ...LOGGER_CATEGORY, - message: msg || 'no message', - // messageType: typeof msg, - // messageString: JSON.stringify(msg), - event, - wsKey, - }); + return; + } - // fallback emit anyway - return this.emit('update', emittableEvent); + this.logger.error( + 'Unhandled/unrecognised ws event message - unexpected message format', + { + ...WS_LOGGER_CATEGORY, + message: event || 'no message', + event, + wsKey, + }, + ); } catch (e) { this.logger.error('Failed to parse ws event message', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, error: e, event, wsKey, @@ -611,17 +1086,42 @@ export abstract class BaseWebsocketClient< private onWsClose(event: unknown, wsKey: TWSKey) { this.logger.info('Websocket connection closed', { - ...LOGGER_CATEGORY, + ...WS_LOGGER_CATEGORY, wsKey, }); + const wsState = this.wsStore.get(wsKey, true); + wsState.isAuthenticated = false; + if ( this.wsStore.getConnectionState(wsKey) !== WsConnectionStateEnum.CLOSING ) { + // unintentional close, attempt recovery + this.logger.trace( + `onWsClose(${wsKey}): rejecting all deferred promises...`, + ); + // clean up any pending promises for this connection + this.getWsStore().rejectAllDeferredPromises( + wsKey, + 'connection lost, reconnecting', + ); + + this.setWsState(wsKey, WsConnectionStateEnum.INITIAL); + this.reconnectWithDelay(wsKey, this.options.reconnectTimeout!); this.emit('reconnect', { wsKey, event }); } else { + // intentional close - clean up + // clean up any pending promises for this connection + this.logger.trace( + `onWsClose(${wsKey}): rejecting all deferred promises...`, + ); + this.getWsStore().rejectAllDeferredPromises(wsKey, 'disconnected'); this.setWsState(wsKey, WsConnectionStateEnum.INITIAL); + + // This was an intentional close, delete all state for this connection, as if it never existed: + this.wsStore.delete(wsKey); + this.emit('close', { wsKey, event }); } } @@ -633,4 +1133,74 @@ export abstract class BaseWebsocketClient< private setWsState(wsKey: TWSKey, state: WsConnectionStateEnum) { this.wsStore.setConnectionState(wsKey, state); } + + /** + * Promise-driven method to assert that a ws has successfully connected (will await until connection is open) + */ + public async assertIsConnected(wsKey: TWSKey): Promise { + const isConnected = this.getWsStore().isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + if (isConnected) { + return true; + } + + const inProgressPromise = + this.getWsStore().getConnectionInProgressPromise(wsKey); + + // Already in progress? Await shared promise and retry + if (inProgressPromise) { + this.logger.trace('assertIsConnected(): awaiting...'); + await inProgressPromise.promise; + this.logger.trace('assertIsConnected(): awaiting...connected!'); + return inProgressPromise.promise; + } + + // Start connection, it should automatically store/return a promise. + this.logger.trace('assertIsConnected(): connecting...'); + + await this.connect(wsKey); + + this.logger.trace('assertIsConnected(): connecting...newly connected!'); + } + + /** + * Promise-driven method to assert that a ws has been successfully authenticated (will await until auth is confirmed) + */ + public async assertIsAuthenticated(wsKey: TWSKey): Promise { + const isConnected = this.getWsStore().isConnectionState( + wsKey, + WsConnectionStateEnum.CONNECTED, + ); + + if (!isConnected) { + this.logger.trace('assertIsAuthenticated(): connecting...'); + await this.assertIsConnected(wsKey); + } + + const inProgressPromise = + this.getWsStore().getAuthenticationInProgressPromise(wsKey); + + // Already in progress? Await shared promise and retry + if (inProgressPromise) { + this.logger.trace('assertIsAuthenticated(): awaiting...'); + await inProgressPromise.promise; + this.logger.trace('assertIsAuthenticated(): authenticated!'); + return; + } + + const isAuthenticated = this.wsStore.get(wsKey)?.isAuthenticated; + if (isAuthenticated) { + // this.logger.trace('assertIsAuthenticated(): ok'); + return; + } + + // Start authentication, it should automatically store/return a promise. + this.logger.trace('assertIsAuthenticated(): authenticating...'); + + await this.sendAuthRequest(wsKey); + + this.logger.trace('assertIsAuthenticated(): newly authenticated!'); + } } diff --git a/src/util/WsStore.ts b/src/util/WsStore.ts index c37cb03..d8a8378 100644 --- a/src/util/WsStore.ts +++ b/src/util/WsStore.ts @@ -1,17 +1,46 @@ import WebSocket from 'isomorphic-ws'; -import { DefaultLogger } from './logger'; -import { WsConnectionStateEnum, WsStoredState } from './WsStore.types'; +import { DefaultLogger } from './logger.js'; +import { + DeferredPromise, + WSConnectedResult, + WsConnectionStateEnum, + WsStoredState, +} from './WsStore.types.js'; -function isDeepObjectMatch(object1: object, object2: object) { +/** + * Simple comparison of two objects. Checks every key for match. Recursive if child properties contain objects. + */ +export function isDeepObjectMatch(object1: unknown, object2: unknown): boolean { + if (typeof object1 === 'string' && typeof object2 === 'string') { + return object1 === object2; + } + + if (typeof object1 !== 'object' || typeof object2 !== 'object') { + return false; + } + + // both are objects, run deeper match for (const key in object1) { - if (object1[key] !== object2[key]) { + const value1 = (object1 as any)[key]; + const value2 = (object2 as any)[key]; + + const matches = isDeepObjectMatch(value1, value2); + if (!matches) { return false; } } return true; } +export const DEFERRED_PROMISE_REF = { + CONNECTION_IN_PROGRESS: 'CONNECTION_IN_PROGRESS', + AUTHENTICATION_IN_PROGRESS: 'AUTHENTICATION_IN_PROGRESS', +} as const; + +type DeferredPromiseRef = + (typeof DEFERRED_PROMISE_REF)[keyof typeof DEFERRED_PROMISE_REF]; + export default class WsStore< WsKey extends string, TWSTopicSubscribeEventArgs extends object, @@ -19,9 +48,9 @@ export default class WsStore< private wsState: Record> = {}; - private logger: typeof DefaultLogger; + private logger: DefaultLogger; - constructor(logger: typeof DefaultLogger) { + constructor(logger: DefaultLogger) { this.logger = logger || DefaultLogger; } @@ -55,7 +84,7 @@ export default class WsStore< create(key: WsKey): WsStoredState | undefined { if (this.hasExistingActiveConnection(key)) { - this.logger.warning( + this.logger.info( 'WsStore setConnection() overwriting existing open connection: ', this.getWs(key), ); @@ -63,6 +92,7 @@ export default class WsStore< this.wsState[key] = { subscribedTopics: new Set(), connectionState: WsConnectionStateEnum.INITIAL, + deferredPromiseStore: {}, }; return this.get(key); } @@ -71,7 +101,7 @@ export default class WsStore< // TODO: should we allow this at all? Perhaps block this from happening... if (this.hasExistingActiveConnection(key)) { const ws = this.getWs(key); - this.logger.warning( + this.logger.info( 'WsStore deleting state for connection still open: ', ws, ); @@ -92,7 +122,7 @@ export default class WsStore< setWs(key: WsKey, wsConnection: WebSocket): WebSocket { if (this.isWsOpen(key)) { - this.logger.warning( + this.logger.info( 'WsStore setConnection() overwriting existing open connection: ', this.getWs(key), ); @@ -102,6 +132,211 @@ export default class WsStore< return wsConnection; } + /** + * deferred promises + */ + + getDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + ): DeferredPromise | undefined { + const storeForKey = this.get(wsKey); + if (!storeForKey) { + return; + } + + const deferredPromiseStore = storeForKey.deferredPromiseStore; + return deferredPromiseStore[promiseRef]; + } + + createDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + throwIfExists: boolean, + ): DeferredPromise { + const existingPromise = this.getDeferredPromise( + wsKey, + promiseRef, + ); + if (existingPromise) { + if (throwIfExists) { + throw new Error(`Promise exists for "${wsKey}"`); + } else { + // console.log('existing promise'); + return existingPromise; + } + } + + // console.log('create promise'); + const createIfMissing = true; + const storeForKey = this.get(wsKey, createIfMissing); + + // TODO: Once stable, use Promise.withResolvers in future + const deferredPromise: DeferredPromise = {}; + + deferredPromise.promise = new Promise((resolve, reject) => { + deferredPromise.resolve = resolve; + deferredPromise.reject = reject; + }); + + const deferredPromiseStore = storeForKey.deferredPromiseStore; + + deferredPromiseStore[promiseRef] = deferredPromise; + + return deferredPromise; + } + + resolveDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + value: unknown, + removeAfter: boolean, + ): void { + const promise = this.getDeferredPromise(wsKey, promiseRef); + if (promise?.resolve) { + promise.resolve(value); + } + if (removeAfter) { + this.removeDeferredPromise(wsKey, promiseRef); + } + } + + rejectDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + value: unknown, + removeAfter: boolean, + ): void { + const promise = this.getDeferredPromise(wsKey, promiseRef); + + if (promise?.reject) { + this.logger.trace( + `rejectDeferredPromise(): rejecting ${wsKey}/${promiseRef}`, + value, + ); + + if (typeof value === 'string') { + promise.reject(new Error(value)); + } else { + promise.reject(value); + } + } + + if (removeAfter) { + this.removeDeferredPromise(wsKey, promiseRef); + } + } + + removeDeferredPromise( + wsKey: WsKey, + promiseRef: string | DeferredPromiseRef, + ): void { + const storeForKey = this.get(wsKey); + if (!storeForKey) { + return; + } + + const deferredPromise = storeForKey.deferredPromiseStore[promiseRef]; + if (deferredPromise) { + // Just in case it's pending + if (deferredPromise.resolve) { + deferredPromise.resolve('promiseRemoved'); + } + + delete storeForKey.deferredPromiseStore[promiseRef]; + } + } + + rejectAllDeferredPromises(wsKey: WsKey, reason: string): void { + const storeForKey = this.get(wsKey); + const deferredPromiseStore = storeForKey.deferredPromiseStore; + if (!storeForKey || !deferredPromiseStore) { + return; + } + + const reservedKeys = Object.values(DEFERRED_PROMISE_REF) as string[]; + + for (const promiseRef in deferredPromiseStore) { + // Skip reserved keys, such as the connection promise + if (reservedKeys.includes(promiseRef)) { + continue; + } + + try { + this.logger.trace( + `rejectAllDeferredPromises(): rejecting ${wsKey}/${promiseRef}/${reason}`, + ); + this.rejectDeferredPromise(wsKey, promiseRef, reason, true); + } catch (e) { + this.logger.error( + 'rejectAllDeferredPromises(): Exception rejecting deferred promise', + { wsKey: wsKey, reason, promiseRef, exception: e }, + ); + } + } + } + + /** Get promise designed to track a connection attempt in progress. Resolves once connected. */ + getConnectionInProgressPromise( + wsKey: WsKey, + ): DeferredPromise | undefined { + return this.getDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.CONNECTION_IN_PROGRESS, + ); + } + + getAuthenticationInProgressPromise( + wsKey: WsKey, + ): DeferredPromise | undefined { + return this.getDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.AUTHENTICATION_IN_PROGRESS, + ); + } + + /** + * Create a deferred promise designed to track a connection attempt in progress. + * + * Will throw if existing promise is found. + */ + createConnectionInProgressPromise( + wsKey: WsKey, + throwIfExists: boolean, + ): DeferredPromise { + return this.createDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.CONNECTION_IN_PROGRESS, + throwIfExists, + ); + } + + createAuthenticationInProgressPromise( + wsKey: WsKey, + throwIfExists: boolean, + ): DeferredPromise { + return this.createDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.AUTHENTICATION_IN_PROGRESS, + throwIfExists, + ); + } + + /** Remove promise designed to track a connection attempt in progress */ + removeConnectingInProgressPromise(wsKey: WsKey): void { + return this.removeDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.CONNECTION_IN_PROGRESS, + ); + } + + removeAuthenticationInProgressPromise(wsKey: WsKey): void { + return this.removeDeferredPromise( + wsKey, + DEFERRED_PROMISE_REF.AUTHENTICATION_IN_PROGRESS, + ); + } + /* connection state */ isWsOpen(key: WsKey): boolean { @@ -118,12 +353,42 @@ export default class WsStore< setConnectionState(key: WsKey, state: WsConnectionStateEnum) { this.get(key, true).connectionState = state; + this.get(key, true).connectionStateChangedAt = new Date(); } isConnectionState(key: WsKey, state: WsConnectionStateEnum): boolean { return this.getConnectionState(key) === state; } + /** + * Check if we're currently in the process of opening a connection for any reason. Safer than only checking "CONNECTING" as the state + * @param key + * @returns + */ + isConnectionAttemptInProgress(key: WsKey): boolean { + const isConnectionInProgress = + this.isConnectionState(key, WsConnectionStateEnum.CONNECTING) || + this.isConnectionState(key, WsConnectionStateEnum.RECONNECTING); + + if (isConnectionInProgress) { + const wsState = this.get(key, true); + const stateLastChangedAt = wsState?.connectionStateChangedAt; + const stateChangedAtTimestamp = stateLastChangedAt?.getTime(); + if (stateChangedAtTimestamp) { + const timestampNow = new Date().getTime(); + const stateChangedTimeAgo = timestampNow - stateChangedAtTimestamp; + const stateChangeTimeout = 15000; // allow a max 15 second timeout since the last state change before assuming stuck; + if (stateChangedTimeAgo >= stateChangeTimeout) { + const msg = 'State change timed out, reconnect workflow stuck?'; + this.logger.error(msg, { key, wsState }); + this.setConnectionState(key, WsConnectionStateEnum.ERROR); + } + } + } + + return isConnectionInProgress; + } + /* subscribed topics */ getTopics(key: WsKey): Set { @@ -131,35 +396,32 @@ export default class WsStore< } getTopicsByKey(): Record> { - const result = {}; + const result: Record> = {}; + for (const refKey in this.wsState) { result[refKey] = this.getTopics(refKey as WsKey); } + return result; } - // Since topics are objects we can't rely on the set to detect duplicates + /** + * Find matching "topic" request from the store + * @param key + * @param topic + * @returns + */ getMatchingTopic(key: WsKey, topic: TWSTopicSubscribeEventArgs) { - // if (typeof topic === 'string') { - // return this.getMatchingTopic(key, { channel: topic }); - // } - const allTopics = this.getTopics(key).values(); for (const storedTopic of allTopics) { - if (isDeepObjectMatch(topic, storedTopic)) { + const matchesStoredTopic = isDeepObjectMatch(topic, storedTopic); + if (matchesStoredTopic) { return storedTopic; } } } addTopic(key: WsKey, topic: TWSTopicSubscribeEventArgs) { - // if (typeof topic === 'string') { - // return this.addTopic(key, { - // instType: 'sp', - // channel: topic, - // instId: 'default', - // }; - // } // Check for duplicate topic. If already tracked, don't store this one const existingTopic = this.getMatchingTopic(key, topic); if (existingTopic) { diff --git a/src/util/WsStore.types.ts b/src/util/WsStore.types.ts index 5eb95d6..4b92686 100644 --- a/src/util/WsStore.types.ts +++ b/src/util/WsStore.types.ts @@ -1,28 +1,66 @@ +import WebSocket from 'isomorphic-ws'; + export enum WsConnectionStateEnum { INITIAL = 0, CONNECTING = 1, CONNECTED = 2, CLOSING = 3, RECONNECTING = 4, - // ERROR = 5, + // ERROR_RECONNECTING = 5, + ERROR = 5, +} + +export interface DeferredPromise { + resolve?: (value: TSuccess) => TSuccess; + reject?: (value: TError) => TError; + promise?: Promise; +} + +export interface WSConnectedResult { + wsKey: string; + ws: WebSocket; } export interface WsStoredState { /** The currently active websocket connection */ ws?: WebSocket; + /** The current lifecycle state of the connection (enum) */ connectionState?: WsConnectionStateEnum; + connectionStateChangedAt?: Date; + /** A timer that will send an upstream heartbeat (ping) when it expires */ activePingTimer?: ReturnType | undefined; + /** A timer tracking that an upstream heartbeat was sent, expecting a reply before it expires */ activePongTimer?: ReturnType | undefined; + /** If a reconnection is in progress, this will have the timer for the delayed reconnect */ activeReconnectTimer?: ReturnType | undefined; + /** + * When a connection attempt is in progress (even for reconnect), a promise is stored here. + * + * This promise will resolve once connected (and will then get removed); + */ + // connectionInProgressPromise?: DeferredPromise | undefined; + deferredPromiseStore: Record; + /** * All the topics we are expected to be subscribed to on this connection (and we automatically resubscribe to if the connection drops) * * A "Set" and a deep-object-match are used to ensure we only subscribe to a topic once (tracking a list of unique topics we're expected to be connected to) */ subscribedTopics: Set; + + /** Whether this connection has completed authentication (only applies to private connections) */ isAuthenticated?: boolean; + + /** + * Whether this connection has completed authentication before for the Websocket API, so it k + * nows to automatically reauth if reconnected + */ + didAuthWSAPI?: boolean; + + /** To reauthenticate on the WS API, which channel do we send to? */ + WSAPIAuthChannel?: string; } diff --git a/src/util/browser-support.ts b/src/util/browser-support.ts deleted file mode 100644 index f4a4fd2..0000000 --- a/src/util/browser-support.ts +++ /dev/null @@ -1,48 +0,0 @@ -function _arrayBufferToBase64(buffer: ArrayBuffer) { - let binary = ''; - const bytes = new Uint8Array(buffer); - const len = bytes.byteLength; - for (let i = 0; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return window.btoa(binary); -} - -export async function signMessage( - message: string, - secret: string, - method: 'hex' | 'base64', -): Promise { - const encoder = new TextEncoder(); - const key = await window.crypto.subtle.importKey( - 'raw', - encoder.encode(secret), - { name: 'HMAC', hash: { name: 'SHA-256' } }, - false, - ['sign'], - ); - - const signature = await window.crypto.subtle.sign( - 'HMAC', - key, - encoder.encode(message), - ); - - switch (method) { - case 'hex': { - return Array.prototype.map - .call(new Uint8Array(signature), (x: any) => - ('00' + x.toString(16)).slice(-2), - ) - .join(''); - } - case 'base64': { - return _arrayBufferToBase64(signature); - } - default: { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ((x: never) => {})(method); - throw new Error(`Unhandled sign method: ${method}`); - } - } -} diff --git a/src/util/index.ts b/src/util/index.ts deleted file mode 100644 index 6c491bd..0000000 --- a/src/util/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './BaseRestClient'; -export * from './logger'; -export * from './requestUtils'; -export * from './type-guards'; -export * from './websocket-util'; -export * from './WsStore'; diff --git a/src/util/logger.ts b/src/util/logger.ts index d5a585c..7187173 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -1,22 +1,16 @@ export type LogParams = null | any; +export type DefaultLogger = typeof DefaultLogger; + export const DefaultLogger = { + /** Ping/pong events and other raw messages that might be noisy. Enable this while troubleshooting. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - silly: (...params: LogParams): void => { + trace: (..._params: LogParams): void => { // console.log(params); }, - debug: (...params: LogParams): void => { - console.log(params); - }, - notice: (...params: LogParams): void => { - console.log(params); - }, info: (...params: LogParams): void => { console.info(params); }, - warning: (...params: LogParams): void => { - console.error(params); - }, error: (...params: LogParams): void => { console.error(params); }, diff --git a/src/util/node-support.ts b/src/util/node-support.ts deleted file mode 100644 index 7472e15..0000000 --- a/src/util/node-support.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { createHmac } from 'crypto'; - -/** This is async because the browser version uses a promise (browser-support) */ -export async function signMessage( - message: string, - secret: string, - method: 'hex' | 'base64', -): Promise { - const hmac = createHmac('sha256', secret).update(message); - - switch (method) { - case 'hex': { - return hmac.digest('hex'); - } - case 'base64': { - return hmac.digest().toString('base64'); - } - default: { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ((x: never) => {})(method); - throw new Error(`Unhandled sign method: ${method}`); - } - } -} diff --git a/src/util/requestUtils.ts b/src/util/requestUtils.ts index e4ed446..11e0b7e 100644 --- a/src/util/requestUtils.ts +++ b/src/util/requestUtils.ts @@ -39,9 +39,30 @@ export interface RestClientOptions { /** Default: true. whether to try and post-process request exceptions (and throw them). */ parseExceptions?: boolean; + + /** + * Enable keep alive for REST API requests (via axios). + */ + keepAlive?: boolean; + + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + * Default: 1000 (defaults comes from https agent) + */ + keepAliveMsecs?: number; + + /** + * Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method + * + * Look in the examples folder for a demonstration on using node's createHmac instead. + */ + customSignMessageFn?: (message: string, secret: string) => Promise; } -export function serializeParams( +export function serializeParams< + T extends Record | undefined = object, +>( params: T, strict_validation = false, encodeValues: boolean = true, @@ -106,4 +127,5 @@ export const REST_CLIENT_TYPE_ENUM = { futures: 'futures', broker: 'broker', v2: 'v2', + v3: 'v3', } as const; diff --git a/src/util/type-guards.ts b/src/util/type-guards.ts index 897f5d0..0627172 100644 --- a/src/util/type-guards.ts +++ b/src/util/type-guards.ts @@ -1,20 +1,21 @@ +import { MarginType } from '../types/request/shared.js'; +import { WSAPIResponse } from '../types/websockets/ws-api.js'; import { - MarginType, WsAccountSnapshotUMCBL, WsBaseEvent, WSPositionSnapshotUMCBL, WsSnapshotAccountEvent, WsSnapshotChannelEvent, WsSnapshotPositionsEvent, -} from '../types'; +} from '../types/websockets/ws-events.js'; /** TypeGuard: event has a string "action" property */ function isWsEvent(event: unknown): event is WsBaseEvent { return ( typeof event === 'object' && event && - typeof event['action'] === 'string' && - event['data'] + (typeof event as any)['action'] === 'string' && + (typeof event as any)['data'] ); } @@ -27,8 +28,8 @@ function isWsSnapshotEvent(event: unknown): event is WsBaseEvent<'snapshot'> { function isWsChannelEvent(event: WsBaseEvent): event is WsSnapshotChannelEvent { if ( typeof event['arg'] === 'object' && - event.arg && - typeof event?.arg['channel'] === 'string' + event['arg'] && + typeof (typeof event['arg'] as any)['channel'] === 'string' ) { return true; } @@ -82,3 +83,20 @@ export function assertMarginType(marginType: string): marginType is MarginType { } return true; } + +export function isWSAPIResponse( + msg: unknown, +): msg is Omit { + if (typeof msg !== 'object' || !msg) { + return false; + } + + if ( + typeof (msg as any)['event'] !== 'string' || + typeof (msg as any)['id'] !== 'string' + ) { + return false; + } + + return true; +} diff --git a/src/util/webCryptoAPI.ts b/src/util/webCryptoAPI.ts new file mode 100644 index 0000000..206027d --- /dev/null +++ b/src/util/webCryptoAPI.ts @@ -0,0 +1,158 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import { neverGuard } from './websocket-util.js'; + +function bufferToB64(buffer: ArrayBuffer): string { + let binary = ''; + const bytes = new Uint8Array(buffer); + const len = bytes.byteLength; + for (let i = 0; i < len; i++) { + binary += String.fromCharCode(bytes[i]); + } + return globalThis.btoa(binary); +} + +export type SignEncodeMethod = 'hex' | 'base64'; +export type SignAlgorithm = 'SHA-256' | 'SHA-512'; + +/** + * Similar to node crypto's `createHash()` function + */ +// async function hashMessage( +// message: string, +// method: SignEncodeMethod, +// algorithm: SignAlgorithm, +// ): Promise { +// const encoder = new TextEncoder(); + +// const buffer = await globalThis.crypto.subtle.digest( +// algorithm, +// encoder.encode(message), +// ); + +// switch (method) { +// case 'hex': { +// return Array.from(new Uint8Array(buffer)) +// .map((byte) => byte.toString(16).padStart(2, '0')) +// .join(''); +// } +// case 'base64': { +// return bufferToB64(buffer); +// } +// default: { +// throw neverGuard(method, `Unhandled sign method: "${method}"`); +// } +// } +// } + +type KeyType = 'HMAC' | 'RSASSA-PKCS1-v1_5' | 'Ed25519'; + +export function getSignKeyType(secret: string): KeyType { + if (secret.includes('PRIVATE KEY')) { + // Sometimes, not always, RSA keys include "RSA" in the header. That's a definite RSA key. + if (secret.includes('RSA PRIVATE KEY')) { + return 'RSASSA-PKCS1-v1_5'; + } + + // RSA keys are significantly longer than Ed25519 keys. 150 accounts for length of header & footer + if (secret.length <= 150) { + return 'Ed25519'; + } + + return 'RSASSA-PKCS1-v1_5'; + } + return 'HMAC'; +} + +async function importKey( + pem: string, + type: KeyType, + algorithm: SignAlgorithm, + encoder: TextEncoder, +): Promise { + switch (type) { + case 'Ed25519': + case 'RSASSA-PKCS1-v1_5': { + // const prefixRSA = /-----BEGIN RSA PRIVATE KEY-----/; + // const prefixEd25519 = /-----BEGIN PRIVATE KEY-----/; + + // const suffixRSA = /-----END RSA PRIVATE KEY-----/; + // const suffixEd25519 = /-----END PRIVATE KEY-----/; + + // const base64Key = pem + // .replace(prefixEd25519, '') + // .replace(prefixRSA, '') + // .replace(suffixEd25519, '') + // .replace(suffixRSA, '') + // .replace(/\s+/g, ''); // Remove spaces and newlines + + const base64Key = pem.replace( + /(?:-----BEGIN RSA PRIVATE KEY-----|-----BEGIN PRIVATE KEY-----|-----END RSA PRIVATE KEY-----|-----END PRIVATE KEY-----|\s+)/g, + '', + ); + + const binaryKey = Uint8Array.from(atob(base64Key), (c) => + c.charCodeAt(0), + ); + + return globalThis.crypto.subtle.importKey( + 'pkcs8', + binaryKey.buffer, + { name: type, hash: { name: algorithm } }, + false, + ['sign'], + ); + } + case 'HMAC': { + return globalThis.crypto.subtle.importKey( + 'raw', + encoder.encode(pem), + { name: type, hash: algorithm }, + false, + ['sign'], + ); + } + default: { + throw neverGuard(type, `Unhandled key type: "${type}"`); + } + } +} + +/** + * Sign a message, with a secret, using the Web Crypto API + * + * Ed25519 is stable as of v23.5.0, but also not available in all browsers + */ +export async function signMessage( + message: string, + secret: string, + method: SignEncodeMethod, + algorithm: SignAlgorithm, + _pemEncodeMethod: SignEncodeMethod = method, +): Promise { + const encoder = new TextEncoder(); + + const signKeyType = getSignKeyType(secret); + + const key = await importKey(secret, signKeyType, algorithm, encoder); + + const buffer = await globalThis.crypto.subtle.sign( + { name: signKeyType }, + key, + encoder.encode(message), + ); + + switch (method) { + case 'hex': { + return Array.from(new Uint8Array(buffer)) + .map((byte) => byte.toString(16).padStart(2, '0')) + .join(''); + } + case 'base64': { + return bufferToB64(buffer); + } + default: { + throw neverGuard(method, `Unhandled sign method: "${method}"`); + } + } +} diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index 509cc9c..c4df222 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -1,11 +1,16 @@ +import { WSAPIRequestBitgetV3 } from '../types/websockets/ws-api.js'; import { BitgetInstType, + WebsocketClientOptions, WsKey, WsPrivateTopicV2, + WsPrivateTopicV3, WsTopicSubscribeEventArgs, WsTopicSubscribePublicArgsV2, -} from '../types'; -import { signMessage } from './node-support'; +} from '../types/websockets/ws-general.js'; +import { DefaultLogger } from './logger.js'; + +export const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; /** * Some exchanges have two livenet environments, some have test environments, some dont. This allows easy flexibility for different exchanges. @@ -24,26 +29,42 @@ type NetworkMap< export const WS_BASE_URL_MAP: Record< WsKey, - Record<'all', NetworkMap<'livenet'>> + Record<'all', NetworkMap<'livenet' | 'demo'>> > = { mixv1: { all: { livenet: 'wss://ws.bitget.com/mix/v1/stream', + demo: 'NotSupportedForV1', }, }, spotv1: { all: { livenet: 'wss://ws.bitget.com/spot/v1/stream', + demo: 'NotSupportedForV1', }, }, v2Public: { all: { livenet: 'wss://ws.bitget.com/v2/ws/public', + demo: 'wss://wspap.bitget.com/v2/ws/public', }, }, v2Private: { all: { livenet: 'wss://ws.bitget.com/v2/ws/private', + demo: 'wss://wspap.bitget.com/v2/ws/private', + }, + }, + v3Public: { + all: { + livenet: 'wss://ws.bitget.com/v3/ws/public', + demo: 'wss://wspap.bitget.com/v3/ws/public', + }, + }, + v3Private: { + all: { + livenet: 'wss://ws.bitget.com/v3/ws/private', + demo: 'wss://wspap.bitget.com/v3/ws/private', }, }, }; @@ -54,6 +75,8 @@ export const WS_KEY_MAP = { mixv1: 'mixv1', v2Public: 'v2Public', v2Private: 'v2Private', + v3Public: 'v3Public', + v3Private: 'v3Private', } as const; /** Any WS keys in this list will trigger auth on connect, if credentials are available */ @@ -61,6 +84,7 @@ export const WS_AUTH_ON_CONNECT_KEYS: WsKey[] = [ WS_KEY_MAP.spotv1, WS_KEY_MAP.mixv1, WS_KEY_MAP.v2Private, + WS_KEY_MAP.v3Private, ]; /** Any WS keys in this list will ALWAYS skip the authentication process, even if credentials are available */ @@ -84,19 +108,91 @@ export const PRIVATE_TOPICS_V2: WsPrivateTopicV2[] = [ 'orders-isolated', ]; +export const PRIVATE_TOPICS_V3: WsPrivateTopicV3[] = [ + 'account', + 'position', + 'fill', + 'order', +]; + +export async function getWsUrl( + wsKey: WsKey, + options: WebsocketClientOptions, + logger: DefaultLogger, +): Promise { + if (options.wsUrl) { + return options.wsUrl; + } + + const isDemoTrading = options.demoTrading; + const networkKey: 'livenet' | 'demo' = isDemoTrading ? 'demo' : 'livenet'; + + switch (wsKey) { + case WS_KEY_MAP.spotv1: + case WS_KEY_MAP.mixv1: { + throw new Error( + 'Use the WebsocketClient instead of WebsocketClientV2 for V1 websockets', + ); + } + case WS_KEY_MAP.v2Private: { + return WS_BASE_URL_MAP.v2Private.all[networkKey]; + } + case WS_KEY_MAP.v2Public: { + return WS_BASE_URL_MAP.v2Public.all[networkKey]; + } + case WS_KEY_MAP.v3Private: { + return WS_BASE_URL_MAP.v3Private.all[networkKey]; + } + case WS_KEY_MAP.v3Public: { + return WS_BASE_URL_MAP.v3Public.all[networkKey]; + } + default: { + logger.error('getWsUrl(): Unhandled wsKey: ', { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + throw neverGuard(wsKey, 'getWsUrl(): Unhandled wsKey'); + } + } +} + +/** + * Normalised internal format for a request (subscribe/unsubscribe/etc) on a topic, with optional parameters. + * + * - Topic: the topic this event is for + * - Payload: the parameters to include, optional. E.g. auth requires key + sign. Some topics allow configurable parameters. + * - Category: required for bybit, since different categories have different public endpoints + */ +export interface WsTopicRequest< + TWSTopic extends string = string, + TWSPayload = unknown, +> { + topic: TWSTopic; + payload?: TWSPayload; +} + +/** + * Conveniently allow users to request a topic either as string topics or objects (containing string topic + params) + */ +export type WsTopicRequestOrStringTopic< + TWSTopic extends string, + TWSPayload = unknown, +> = WsTopicRequest | string; + export function isPrivateChannel( channel: TChannel, ): boolean { return ( PRIVATE_TOPICS.includes(channel) || - PRIVATE_TOPICS_V2.includes(channel as any) + PRIVATE_TOPICS_V2.includes(channel as any) || + PRIVATE_TOPICS_V3.includes(channel as any) ); } -export function getWsKeyForTopic( +export function getWsKeyForTopicV1( subscribeEvent: WsTopicSubscribeEventArgs, // eslint-disable-next-line @typescript-eslint/no-unused-vars - isPrivate?: boolean, + _isPrivate?: boolean, ): WsKey { const instType = subscribeEvent.instType.toUpperCase() as BitgetInstType; switch (instType) { @@ -112,7 +208,7 @@ export function getWsKeyForTopic( default: { throw neverGuard( instType, - `getWsKeyForTopic(): Unhandled market ${'instrumentId'}`, + `getWsKeyForTopicV1(): Unhandled market ${'instrumentId'}`, ); } } @@ -133,7 +229,9 @@ export function getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null { case 'mixv1': case 'spotv1': case 'v2Public': - case 'v2Private': { + case 'v2Private': + case 'v3Public': + case 'v3Private': { // Technically there doesn't seem to be a documented cap, but there is a size limit per request. Doesn't hurt to batch requests. return 15; } @@ -151,34 +249,6 @@ export function neverGuard(x: never, msg: string): Error { return new Error(`Unhandled value exception "${x}", ${msg}`); } -export async function getWsAuthSignature( - apiKey: string | undefined, - apiSecret: string | undefined, - apiPass: string | undefined, - recvWindow: number = 0, -): Promise<{ - expiresAt: number; - signature: string; -}> { - if (!apiKey || !apiSecret || !apiPass) { - throw new Error( - 'Cannot auth - missing api key, secret or passcode in config', - ); - } - const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); - - const signature = await signMessage( - signatureExpiresAt + 'GET' + '/user/verify', - apiSecret, - 'base64', - ); - - return { - expiresAt: Number(signatureExpiresAt), - signature, - }; -} - /** * #305: ws.terminate() is undefined in browsers. * This only works in node.js, not in browsers. @@ -200,3 +270,57 @@ export function safeTerminateWs( return false; } +/** + * Users can conveniently pass topics as strings or objects (object has topic name + optional params). + * + * This method normalises topics into objects (object has topic name + optional params). + */ +export function getNormalisedTopicRequests( + wsTopicRequests: WsTopicRequestOrStringTopic[], +): WsTopicRequest[] { + const normalisedTopicRequests: WsTopicRequest[] = []; + + for (const wsTopicRequest of wsTopicRequests) { + // passed as string, convert to object + if (typeof wsTopicRequest === 'string') { + const topicRequest: WsTopicRequest = { + topic: wsTopicRequest, + payload: undefined, + }; + normalisedTopicRequests.push(topicRequest); + continue; + } + + // already a normalised object, thanks to user + normalisedTopicRequests.push(wsTopicRequest); + } + return normalisedTopicRequests; +} + +/** + * WebSocket.ping() is not available in browsers. This is a simple check used to + * disable heartbeats in browers, for exchanges that use native WebSocket ping/pong frames. + */ +export function isWSPingFrameAvailable(): boolean { + return typeof (WebSocket.prototype as any)['ping'] === 'function'; +} + +/** + * WebSocket.pong() is not available in browsers. This is a simple check used to + * disable heartbeats in browers, for exchanges that use native WebSocket ping/pong frames. + */ +export function isWSPongFrameAvailable(): boolean { + return typeof (WebSocket.prototype as any)['pong'] === 'function'; +} + +/** + * WS API promises are stored using a primary key. This key is constructed using + * properties found in every request & reply. + */ +export function getPromiseRefForWSAPIRequest( + requestEvent: WSAPIRequestBitgetV3, +): string { + // Responses don't have any other info we can use to connect them to the request. Just the "id" field... + const promiseRef = [requestEvent.id].join('_'); + return promiseRef; +} diff --git a/src/websocket-api-client.ts b/src/websocket-api-client.ts new file mode 100644 index 0000000..24e1c06 --- /dev/null +++ b/src/websocket-api-client.ts @@ -0,0 +1,194 @@ +import { CancelOrderRequestV3 } from './types/request/v3/trade.js'; +import { CancelOrderResponseV3 } from './types/response/v3/trade.js'; +import { WSAPIResponse } from './types/websockets/ws-api.js'; +import { WSAPIPlaceOrderRequestV3 } from './types/websockets/ws-api-request.js'; +import { WSAPIPlaceOrderResponseV3 } from './types/websockets/ws-api-response.js'; +import { + BitgetInstTypeV3, + WSClientConfigurableOptions, +} from './types/websockets/ws-general.js'; +import { DefaultLogger } from './util/logger.js'; +import { WS_KEY_MAP } from './util/websocket-util.js'; +import { WebsocketClientV3 } from './websocket-client-v3.js'; + +/** + * Configurable options specific to only the REST-like WebsocketAPIClient + */ +export interface WSAPIClientConfigurableOptions { + /** + * Default: true + * + * Attach default event listeners, which will console log any high level + * events (opened/reconnecting/reconnected/etc). + * + * If you disable this, you should set your own event listeners + * on the embedded WS Client `wsApiClient.getWSClient().on(....)`. + */ + attachEventListeners: boolean; +} + +/** + * This is a minimal Websocket API wrapper around the WebsocketClient. + * + * Note: You can also directly use the sendWSAPIRequest() method to make WS API calls, but some + * may find the below methods slightly more intuitive. + * + * Refer to the WS API promises example for a more detailed example on using sendWSAPIRequest() directly: + * https://github.com/tiagosiebler/bitget-api/blob/master/examples/V3/ws-api-trade-raw.ts + */ +export class WebsocketAPIClient { + private wsClient: WebsocketClientV3; + + private options: WSClientConfigurableOptions & WSAPIClientConfigurableOptions; + + constructor( + options?: WSClientConfigurableOptions & + Partial, + logger?: DefaultLogger, + ) { + this.wsClient = new WebsocketClientV3(options, logger); + + this.options = { + attachEventListeners: true, + ...options, + }; + + this.setupDefaultEventListeners(); + } + + public getWSClient(): WebsocketClientV3 { + return this.wsClient; + } + + public setTimeOffsetMs(newOffset: number): void { + return this.getWSClient().setTimeOffsetMs(newOffset); + } + + /* + * Bitget WebSocket API Methods + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + */ + + /** + * Submit a new order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + * + * @returns + */ + submitNewOrder( + category: BitgetInstTypeV3, + params: WSAPIPlaceOrderRequestV3, + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'place-order', + category, + params, + ); + } + + /** + * Submit a new order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Place-Order-Channel + * + * @returns + */ + placeBatchOrders( + category: BitgetInstTypeV3, + params: WSAPIPlaceOrderRequestV3[], + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'batch-place', + category, + params, + ); + } + + /* + * Bitget WebSocket API Methods + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + */ + + /** + * Cancel Order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Cancel-Order-Channel + * + * @returns + */ + cancelOrder( + category: BitgetInstTypeV3, + params: CancelOrderRequestV3, + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'cancel-order', + category, + params, + ); + } + + /** + * Batch Cancel Order + * + * https://www.bitget.com/api-doc/uta/websocket/private/Batch-Cancel-Order-Channel + * + * @returns + */ + cancelBatchOrders( + category: BitgetInstTypeV3, + params: CancelOrderRequestV3[], + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v3Private, + 'batch-cancel', + category, + params, + ); + } + + /** + * + * + * + * + * + * + * + * Private methods for handling some of the convenience/automation provided by the WS API Client + * + * + * + * + * + * + * + */ + + private setupDefaultEventListeners() { + if (this.options.attachEventListeners) { + /** + * General event handlers for monitoring the WebsocketClient + */ + this.wsClient + .on('open', (data) => { + console.log(new Date(), 'ws connected', data.wsKey); + }) + .on('reconnect', ({ wsKey }) => { + console.log(new Date(), 'ws automatically reconnecting.... ', wsKey); + }) + .on('reconnected', (data) => { + console.log(new Date(), 'ws has reconnected ', data?.wsKey); + }) + .on('authenticated', (data) => { + console.info(new Date(), 'ws has authenticated ', data?.wsKey); + }) + .on('exception', (data) => { + console.error(new Date(), 'ws exception: ', JSON.stringify(data)); + }); + } + } +} diff --git a/src/websocket-client.ts b/src/websocket-client-legacy-v1.ts similarity index 88% rename from src/websocket-client.ts rename to src/websocket-client-legacy-v1.ts index dd9c2d4..e793113 100644 --- a/src/websocket-client.ts +++ b/src/websocket-client-legacy-v1.ts @@ -9,22 +9,22 @@ import { WsKey, WsTopic, WsTopicSubscribeEventArgs, -} from './types'; +} from './types/websockets/ws-general.js'; +import { DefaultLogger } from './util/logger.js'; +import { isWsPong } from './util/requestUtils.js'; +import { signMessage } from './util/webCryptoAPI.js'; import { - DefaultLogger, getMaxTopicsPerSubscribeEvent, - getWsAuthSignature, - getWsKeyForTopic, + getWsKeyForTopicV1, isPrivateChannel, - isWsPong, neverGuard, safeTerminateWs, WS_AUTH_ON_CONNECT_KEYS, WS_BASE_URL_MAP, WS_KEY_MAP, -} from './util'; -import WsStore from './util/WsStore'; -import { WsConnectionStateEnum } from './util/WsStore.types'; +} from './util/websocket-util.js'; +import WsStore from './util/WsStore.js'; +import { WsConnectionStateEnum } from './util/WsStore.types.js'; const LOGGER_CATEGORY = { category: 'bitget-ws' }; @@ -57,7 +57,7 @@ interface WebsocketClientEvents { } // Type safety for on and emit handlers: https://stackoverflow.com/a/61609010/880837 -export declare interface WebsocketClient { +export declare interface WebsocketClientLegacyV1 { on( event: U, listener: WebsocketClientEvents[U], @@ -72,7 +72,7 @@ export declare interface WebsocketClient { /** * @deprecated use WebsocketClientV2 instead */ -export class WebsocketClient extends EventEmitter { +export class WebsocketClientLegacyV1 extends EventEmitter { private logger: typeof DefaultLogger; private options: WebsocketClientOptions; @@ -93,6 +93,8 @@ export class WebsocketClient extends EventEmitter { pingInterval: 10000, reconnectTimeout: 500, recvWindow: 0, + authPrivateConnectionsOnConnect: true, + authPrivateRequests: false, ...options, }; } @@ -109,13 +111,11 @@ export class WebsocketClient extends EventEmitter { const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; topics.forEach((topic) => { - const wsKey = getWsKeyForTopic(topic, isPrivateTopic); + const wsKey = getWsKeyForTopicV1(topic, isPrivateTopic); // Persist this topic to the expected topics list this.wsStore.addTopic(wsKey, topic); - // TODO: tidy up unsubscribe too, also in other connectors - // if connected, send subscription request if ( this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTED) @@ -159,10 +159,12 @@ export class WebsocketClient extends EventEmitter { ) { const topics = Array.isArray(wsTopics) ? wsTopics : [wsTopics]; topics.forEach((topic) => - this.wsStore.deleteTopic(getWsKeyForTopic(topic, isPrivateTopic), topic), + this.wsStore.deleteTopic( + getWsKeyForTopicV1(topic, isPrivateTopic), + topic, + ), ); - // TODO: should this really happen on each wsKey?? seems weird this.wsStore.getKeys().forEach((wsKey: WsKey) => { // unsubscribe request only necessary if active connection exists if ( @@ -273,12 +275,41 @@ export class WebsocketClient extends EventEmitter { this.emit('exception', { ...error, wsKey }); } + private async getWsAuthSignature( + apiKey: string | undefined, + apiSecret: string | undefined, + apiPass: string | undefined, + recvWindow: number = 0, + ): Promise<{ + expiresAt: number; + signature: string; + }> { + if (!apiKey || !apiSecret || !apiPass) { + throw new Error( + 'Cannot auth - missing api key, secret or passcode in config', + ); + } + const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); + + const signature = await signMessage( + signatureExpiresAt + 'GET' + '/user/verify', + apiSecret, + 'base64', + 'SHA-256', + ); + + return { + expiresAt: Number(signatureExpiresAt), + signature, + }; + } + /** Get a signature, build the auth request and send it */ private async sendAuthRequest(wsKey: WsKey): Promise { try { const { apiKey, apiSecret, apiPass, recvWindow } = this.options; - const { signature, expiresAt } = await getWsAuthSignature( + const { signature, expiresAt } = await this.getWsAuthSignature( apiKey, apiSecret, apiPass, @@ -305,7 +336,7 @@ export class WebsocketClient extends EventEmitter { return this.tryWsSend(wsKey, JSON.stringify(request)); } catch (e) { - this.logger.silly(e, { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace(e, { ...LOGGER_CATEGORY, wsKey }); } } @@ -334,7 +365,7 @@ export class WebsocketClient extends EventEmitter { this.clearPongTimer(wsKey); - this.logger.silly('Sending ping', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Sending ping', { ...LOGGER_CATEGORY, wsKey }); this.tryWsSend(wsKey, 'ping'); this.wsStore.get(wsKey, true).activePongTimer = setTimeout(() => { @@ -387,15 +418,15 @@ export class WebsocketClient extends EventEmitter { const maxTopicsPerEvent = getMaxTopicsPerSubscribeEvent(wsKey); if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( + this.logger.trace( `Subscribing to topics in batches of ${maxTopicsPerEvent}`, ); for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Subscribing to batch of ${batch.length}`); + this.logger.trace(`Subscribing to batch of ${batch.length}`); this.requestSubscribeTopics(wsKey, batch); } - this.logger.silly( + this.logger.trace( `Finished batch subscribing to ${topics.length} topics`, ); return; @@ -422,15 +453,15 @@ export class WebsocketClient extends EventEmitter { const maxTopicsPerEvent = getMaxTopicsPerSubscribeEvent(wsKey); if (maxTopicsPerEvent && topics.length > maxTopicsPerEvent) { - this.logger.silly( + this.logger.trace( `Unsubscribing to topics in batches of ${maxTopicsPerEvent}`, ); for (let i = 0; i < topics.length; i += maxTopicsPerEvent) { const batch = topics.slice(i, i + maxTopicsPerEvent); - this.logger.silly(`Unsubscribing to batch of ${batch.length}`); + this.logger.trace(`Unsubscribing to batch of ${batch.length}`); this.requestUnsubscribeTopics(wsKey, batch); } - this.logger.silly( + this.logger.trace( `Finished batch unsubscribing to ${topics.length} topics`, ); return; @@ -446,7 +477,7 @@ export class WebsocketClient extends EventEmitter { public tryWsSend(wsKey: WsKey, wsMessage: string) { try { - this.logger.silly('Sending upstream ws message: ', { + this.logger.trace('Sending upstream ws message: ', { ...LOGGER_CATEGORY, wsMessage, wsKey, @@ -474,13 +505,14 @@ export class WebsocketClient extends EventEmitter { } private connectToWsUrl(url: string, wsKey: WsKey): WebSocket { - this.logger.silly(`Opening WS connection to URL: ${url}`, { + this.logger.trace(`Opening WS connection to URL: ${url}`, { ...LOGGER_CATEGORY, wsKey, }); - const agent = this.options.requestOptions?.agent; - const ws = new WebSocket(url, undefined, agent ? { agent } : undefined); + const { protocols = [], ...wsOptions } = this.options.wsOptions || {}; + const ws = new WebSocket(url, protocols, wsOptions); + ws.onopen = (event) => this.onWsOpen(event, wsKey); ws.onmessage = (event) => this.onWsMessage(event, wsKey); ws.onerror = (event) => this.parseWsError('websocket error', event, wsKey); @@ -489,7 +521,7 @@ export class WebsocketClient extends EventEmitter { return ws; } - private async onWsOpen(event, wsKey: WsKey) { + private async onWsOpen(event: WebSocket.Event, wsKey: WsKey) { if ( this.wsStore.isConnectionState(wsKey, WsConnectionStateEnum.CONNECTING) ) { @@ -547,11 +579,11 @@ export class WebsocketClient extends EventEmitter { this.clearPongTimer(wsKey); if (isWsPong(event)) { - this.logger.silly('Received pong', { ...LOGGER_CATEGORY, wsKey }); + this.logger.trace('Received pong', { ...LOGGER_CATEGORY, wsKey }); return; } - const msg = JSON.parse((event && event['data']) || event); + const msg = JSON.parse((event && (event as any)['data']) || event); const emittableEvent = { ...msg, wsKey }; if (typeof msg === 'object') { @@ -590,7 +622,7 @@ export class WebsocketClient extends EventEmitter { } } - this.logger.warning('Unhandled/unrecognised ws event message', { + this.logger.info('Unhandled/unrecognised ws event message', { ...LOGGER_CATEGORY, message: msg || 'no message', // messageType: typeof msg, @@ -654,6 +686,10 @@ export class WebsocketClient extends EventEmitter { case WS_KEY_MAP.v2Public: { throw new Error('Use the WebsocketClientV2 for V2 websockets'); } + case WS_KEY_MAP.v3Private: + case WS_KEY_MAP.v3Public: { + throw new Error('Use the WebsocketClientV3 for V3 websockets'); + } default: { this.logger.error('getWsUrl(): Unhandled wsKey: ', { ...LOGGER_CATEGORY, diff --git a/src/websocket-client-v2.ts b/src/websocket-client-v2.ts index 1c0e795..66220ff 100644 --- a/src/websocket-client-v2.ts +++ b/src/websocket-client-v2.ts @@ -1,29 +1,37 @@ -import WebSocket from 'isomorphic-ws'; - +import { + WSOperation, + WSOperationLoginParams, + WsRequestOperationBitget, +} from './types/websockets/ws-api.js'; +import { MessageEventLike } from './types/websockets/ws-events.js'; import { BitgetInstTypeV2, - WebsocketClientOptions, - WsCoinChannelsV2, - WsInstIdChannelsV2, WsKey, - WsPublicTopicV2, - WsTopicSubscribeEventArgsV2, - WsTopicSubscribePrivateCoinArgsV2, - WsTopicSubscribePrivateInstIdArgsV2, WsTopicV2, -} from './types'; +} from './types/websockets/ws-general.js'; +import { + BaseWebsocketClient, + EmittableEvent, + MidflightWsRequestEvent, +} from './util/BaseWSClient.js'; +import { isWsPong } from './util/requestUtils.js'; +import { + SignAlgorithm, + SignEncodeMethod, + signMessage, +} from './util/webCryptoAPI.js'; import { - DefaultLogger, getMaxTopicsPerSubscribeEvent, + getNormalisedTopicRequests, + getWsUrl, isPrivateChannel, - neverGuard, WS_AUTH_ON_CONNECT_KEYS, - WS_BASE_URL_MAP, WS_KEY_MAP, -} from './util'; -import { BaseWebsocketClient } from './util/BaseWSClient'; + WsTopicRequest, +} from './util/websocket-util.js'; +import { WSConnectedResult } from './util/WsStore.types.js'; -const LOGGER_CATEGORY = { category: 'bitget-ws' }; +const WS_LOGGER_CATEGORY = { category: 'bitget-ws' }; const COIN_CHANNELS: WsTopicV2[] = [ 'account', @@ -33,69 +41,12 @@ const COIN_CHANNELS: WsTopicV2[] = [ export class WebsocketClientV2 extends BaseWebsocketClient< WsKey, - WsTopicSubscribeEventArgsV2 + WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within > { - protected logger: typeof DefaultLogger; - - protected options: WebsocketClientOptions; - - protected getWsKeyForTopic( - subscribeEvent: WsTopicSubscribeEventArgsV2, - isPrivate?: boolean, - ): WsKey { - return isPrivate || isPrivateChannel(subscribeEvent.channel) - ? WS_KEY_MAP.v2Private - : WS_KEY_MAP.v2Public; - } - - protected isPrivateChannel( - subscribeEvent: WsTopicSubscribeEventArgsV2, - ): boolean { - return isPrivateChannel(subscribeEvent.channel); - } - - protected shouldAuthOnConnect(wsKey: WsKey): boolean { - return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey as WsKey); - } - - protected getWsUrl(wsKey: WsKey): string { - if (this.options.wsUrl) { - return this.options.wsUrl; - } - - const networkKey = 'livenet'; - - switch (wsKey) { - case WS_KEY_MAP.spotv1: - case WS_KEY_MAP.mixv1: { - throw new Error( - 'Use the WebsocketClient instead of WebsocketClientV2 for V1 websockets', - ); - } - case WS_KEY_MAP.v2Private: { - return WS_BASE_URL_MAP.v2Private.all[networkKey]; - } - case WS_KEY_MAP.v2Public: { - return WS_BASE_URL_MAP.v2Public.all[networkKey]; - } - default: { - this.logger.error('getWsUrl(): Unhandled wsKey: ', { - ...LOGGER_CATEGORY, - wsKey, - }); - throw neverGuard(wsKey, 'getWsUrl(): Unhandled wsKey'); - } - } - } - - protected getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null { - return getMaxTopicsPerSubscribeEvent(wsKey); - } - /** * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library */ - public connectAll(): Promise[] { + public connectAll(): Promise[] { return [ this.connect(WS_KEY_MAP.v2Private), this.connect(WS_KEY_MAP.v2Public), @@ -107,35 +58,42 @@ export class WebsocketClientV2 extends BaseWebsocketClient< instType: BitgetInstTypeV2, topic: WsTopicV2, coin: string = 'default', - ): WsTopicSubscribeEventArgsV2 { + ): WsTopicRequest { if (isPrivateChannel(topic)) { if (COIN_CHANNELS.includes(topic)) { - const subscribeRequest: WsTopicSubscribePrivateCoinArgsV2 = { - instType, - channel: topic as WsCoinChannelsV2, - coin, + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + coin, + }, }; return subscribeRequest; } - const subscribeRequest: WsTopicSubscribePrivateInstIdArgsV2 = { - instType, - channel: topic as WsInstIdChannelsV2, - instId: coin, + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + instId: coin, + }, }; return subscribeRequest; } - return { - instType, - channel: topic as WsPublicTopicV2, - instId: coin, + const subscribeRequest: WsTopicRequest = { + topic, + payload: { + instType, + instId: coin, + }, }; + return subscribeRequest; } /** - * Subscribe to a PUBLIC topic + * Subscribe to a topic * @param instType instrument type (refer to API docs). * @param topic topic name (e.g. "ticker"). * @param instId instrument ID (e.g. "BTCUSDT"). Use "default" for private topics. @@ -146,7 +104,10 @@ export class WebsocketClientV2 extends BaseWebsocketClient< coin: string = 'default', ) { const subRequest = this.getSubRequest(instType, topic, coin); - return this.subscribe(subRequest); + const isPrivateTopic = isPrivateChannel(topic); + const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; + + return this.subscribe(subRequest, wsKey); } /** @@ -161,6 +122,363 @@ export class WebsocketClientV2 extends BaseWebsocketClient< coin: string = 'default', ) { const subRequest = this.getSubRequest(instType, topic, coin); - return this.unsubscribe(subRequest); + + const isPrivateTopic = isPrivateChannel(topic); + const wsKey = isPrivateTopic ? WS_KEY_MAP.v2Private : WS_KEY_MAP.v2Public; + + return this.unsubscribe(subRequest, wsKey); + } + + /** + * Request subscription to one or more topics. Pass topics as either an array of strings, + * or array of objects (if the topic has parameters). + * + * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. + * + * - Subscriptions are automatically routed to the correct websocket connection. + * - Authentication/connection is automatic. + * - Resubscribe after network issues is automatic. + * + * Call `unsubscribe(topics)` to remove topics + */ + public subscribe( + requests: + | (WsTopicRequest | WsTopicV2) + | (WsTopicRequest | WsTopicV2)[], + wsKey: WsKey, + ): Promise { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + return this.subscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. + * + * - Requests are automatically routed to the correct websocket connection. + * - These topics will be removed from the topic cache, so they won't be subscribed to again. + */ + public unsubscribe( + requests: + | (WsTopicRequest | WsTopicV2) + | (WsTopicRequest | WsTopicV2)[], + wsKey: WsKey, + ) { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + + return this.unsubscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * + * + * Internal methods required to integrate with the BaseWSClient + * + * + */ + + protected sendPingEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'ping'); + } + + protected sendPongEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'pong'); + } + + protected isWsPing(data: any): boolean { + if (data?.data === 'ping') { + return true; + } + return false; + } + + protected isWsPong(data: any): boolean { + return isWsPong(data); + } + + protected isPrivateTopicRequest( + _request: WsTopicRequest, + wsKey: WsKey, + ): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected getPrivateWSKeys(): WsKey[] { + return WS_AUTH_ON_CONNECT_KEYS; + } + + protected isAuthOnConnectWsKey(wsKey: WsKey): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected async getWsUrl(wsKey: WsKey): Promise { + return getWsUrl(wsKey, this.options, this.logger); + } + + protected getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null { + return getMaxTopicsPerSubscribeEvent(wsKey); + } + + /** + * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. + */ + protected async getWsRequestEvents( + operation: WSOperation, + requests: WsTopicRequest[], + ): Promise>[]> { + const wsRequestBuildingErrors: unknown[] = []; + + const topics = requests.map( + (r) => r.topic + ',' + Object.values(r.payload || {}).join(','), + ); + + // Previously used to track topics in a request. Keeping this for subscribe/unsubscribe requests, no need for incremental values + const req_id = + ['subscribe', 'unsubscribe'].includes(operation) && topics.length + ? topics.join(',') + : this.getNewRequestId().toFixed(); + + /** + { + "op":"subscribe", + "args":[ + { + "instType":"SPOT", + "channel":"ticker", + "instId":"BTCUSDT" + }, + { + "instType":"SPOT", + "channel":"candle5m", + "instId":"BTCUSDT" + } + ] + } + */ + const wsEvent: WsRequestOperationBitget = { + op: operation, + args: requests.map((request) => { + // const request = { + // topic: 'ticker', + // payload: { instType: 'SPOT', instId: 'BTCUSDT' }, + // }; + // becomes: + // const request = { + // channel: 'ticker', + // instType: 'SPOT', + // instId: 'BTCUSDT', + // }; + return { + channel: request.topic, + ...request.payload, + }; + }), + }; + + const midflightWsEvent: MidflightWsRequestEvent< + WsRequestOperationBitget + > = { + requestKey: req_id, + requestEvent: wsEvent, + }; + + if (wsRequestBuildingErrors.length) { + const label = + wsRequestBuildingErrors.length === requests.length ? 'all' : 'some'; + + this.logger.error( + `Failed to build/send ${wsRequestBuildingErrors.length} event(s) for ${label} WS requests due to exceptions`, + { + ...WS_LOGGER_CATEGORY, + wsRequestBuildingErrors, + wsRequestBuildingErrorsStringified: JSON.stringify( + wsRequestBuildingErrors, + null, + 2, + ), + }, + ); + } + + return [midflightWsEvent]; + } + + private async getWsAuthSignature( + wsKey: WsKey, + ): Promise<{ expiresAt: number; signature: string }> { + const { apiKey, apiSecret, apiPass, recvWindow } = this.options; + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error('Cannot auth - missing api or secret or pass in config'); + } + + this.logger.trace("Getting auth'd request params", { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + + const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); + + const signature = await this.signMessage( + signatureExpiresAt + 'GET' + '/user/verify', + apiSecret, + 'base64', + 'SHA-256', + ); + + return { + expiresAt: +signatureExpiresAt, + signature, + }; + } + + private async signMessage( + paramsStr: string, + secret: string, + method: SignEncodeMethod, + algorithm: SignAlgorithm, + ): Promise { + if (typeof this.options.customSignMessageFn === 'function') { + return this.options.customSignMessageFn(paramsStr, secret); + } + return await signMessage(paramsStr, secret, method, algorithm); + } + + protected async getWsAuthRequestEvent( + wsKey: WsKey, + ): Promise> { + try { + const { apiKey, apiSecret, apiPass } = this.options; + const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error( + 'Cannot auth - missing api or secret or pass in config', + ); + } + + const request: WsRequestOperationBitget = { + op: 'login', + args: [ + { + apiKey, + passphrase: apiPass, + timestamp: expiresAt, + sign: signature, + }, + ], + }; + + return request; + } catch (e) { + this.logger.error(e, { ...WS_LOGGER_CATEGORY, wsKey }); + throw e; + } + } + + /** + * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) + */ + protected resolveEmittableEvents( + wsKey: WsKey, + event: MessageEventLike, + ): EmittableEvent[] { + const results: EmittableEvent[] = []; + + try { + const msg = JSON.parse(event.data); + const emittableEvent = { ...msg, wsKey }; + + // v2 event processing + if (typeof msg === 'object') { + if (typeof msg['code'] === 'number') { + // v2 authentication event + if (msg.event === 'login' && msg.code === 0) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + results.push({ + eventType: 'authenticated', + event: emittableEvent, + }); + return results; + } + } + + if (msg['event']) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + + if (msg.event === 'error') { + this.logger.error('WS Error received', { + ...WS_LOGGER_CATEGORY, + wsKey, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + }); + results.push({ + eventType: 'exception', + event: emittableEvent, + }); + } + + return results; + } + + if (msg['arg']) { + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } + } + + this.logger.info('Unhandled/unrecognised ws event message', { + ...WS_LOGGER_CATEGORY, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + wsKey, + }); + + // fallback emit anyway + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } catch (e) { + this.logger.error('Failed to parse ws event message', { + ...WS_LOGGER_CATEGORY, + error: e, + event, + wsKey, + }); + } + + return results; + } + + /** + * @deprecrated not supported by Bitget's V2 API offering + */ + async sendWSAPIRequest(): Promise { + return; } } diff --git a/src/websocket-client-v3.ts b/src/websocket-client-v3.ts new file mode 100644 index 0000000..52620f0 --- /dev/null +++ b/src/websocket-client-v3.ts @@ -0,0 +1,584 @@ +import { + WsAPIOperationResponseMap, + WSAPIRequestBitgetV3, + WSAPIRequestFlags, + WsAPITopicRequestParamMap, + WsAPIWsKeyTopicMap, + WSOperation, + WSOperationLoginParams, + WsRequestOperationBitget, +} from './types/websockets/ws-api.js'; +import { MessageEventLike } from './types/websockets/ws-events.js'; +import { + BitgetInstTypeV3, + WsKey, + WsTopicV3, +} from './types/websockets/ws-general.js'; +import { + BaseWebsocketClient, + EmittableEvent, + MidflightWsRequestEvent, +} from './util/BaseWSClient.js'; +import { isWsPong } from './util/requestUtils.js'; +import { isWSAPIResponse } from './util/type-guards.js'; +import { SignAlgorithm, signMessage } from './util/webCryptoAPI.js'; +import { + getMaxTopicsPerSubscribeEvent, + getNormalisedTopicRequests, + getPromiseRefForWSAPIRequest, + getWsUrl, + WS_AUTH_ON_CONNECT_KEYS, + WS_KEY_MAP, + WS_LOGGER_CATEGORY, + WsTopicRequest, +} from './util/websocket-util.js'; +import { WSConnectedResult } from './util/WsStore.types.js'; + +/** + * WebSocket client dedicated to the unified account (V3) WebSockets. + * + * Your Bitget account needs to be upgraded to unified account mode, to use the account-level WebSocket topics. + */ +export class WebsocketClientV3 extends BaseWebsocketClient< + WsKey, + WsRequestOperationBitget // subscribe requests have an "args" parameter with an object within +> { + /** + * Request connection of all dependent (public & private) websockets, instead of waiting for automatic connection by library + */ + public connectAll(): Promise[] { + return [ + this.connect(WS_KEY_MAP.v3Private), + this.connect(WS_KEY_MAP.v3Public), + ]; + } + + /** + * Ensures the WS API connection is active and ready. + * + * You do not need to call this, but if you call this before making any WS API requests, + * it can accelerate the first request (by preparing the connection in advance). + */ + public connectWSAPI(): Promise { + /** This call automatically ensures the connection is active AND authenticated before resolving */ + return this.assertIsAuthenticated(WS_KEY_MAP.v3Private); + } + + /** + * Request subscription to one or more topics. Pass topics as either an array of strings, + * or array of objects (if the topic has parameters). + * + * Objects should be formatted as {topic: string, params: object, category: CategoryV5}. + * + * - Subscriptions are automatically routed to the correct websocket connection. + * - Authentication/connection is automatic. + * - Resubscribe after network issues is automatic. + * + * Call `unsubscribe(topics)` to remove topics + */ + public subscribe( + requests: + | (WsTopicRequest | WsTopicV3) + | (WsTopicRequest | WsTopicV3)[], + wsKey: WsKey, + ): Promise { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + return this.subscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * Unsubscribe from one or more topics. Similar to subscribe() but in reverse. + * + * - Requests are automatically routed to the correct websocket connection. + * - These topics will be removed from the topic cache, so they won't be subscribed to again. + */ + public unsubscribe( + requests: + | (WsTopicRequest | WsTopicV3) + | (WsTopicRequest | WsTopicV3)[], + wsKey: WsKey, + ) { + const topicRequests = Array.isArray(requests) ? requests : [requests]; + const normalisedTopicRequests = getNormalisedTopicRequests(topicRequests); + + return this.unsubscribeTopicsForWsKey(normalisedTopicRequests, wsKey); + } + + /** + * + * + * Internal methods required to integrate with the BaseWSClient + * + * + */ + + protected sendPingEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'ping'); + } + + protected sendPongEvent(wsKey: WsKey): void { + this.tryWsSend(wsKey, 'pong'); + } + + protected isWsPing(data: any): boolean { + if (data?.data === 'ping') { + return true; + } + return false; + } + + protected isWsPong(data: any): boolean { + return isWsPong(data); + } + + protected isPrivateTopicRequest( + _request: WsTopicRequest, + wsKey: WsKey, + ): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected getPrivateWSKeys(): WsKey[] { + return WS_AUTH_ON_CONNECT_KEYS; + } + + protected isAuthOnConnectWsKey(wsKey: WsKey): boolean { + return WS_AUTH_ON_CONNECT_KEYS.includes(wsKey); + } + + protected async getWsUrl(wsKey: WsKey): Promise { + return getWsUrl(wsKey, this.options, this.logger); + } + + protected getMaxTopicsPerSubscribeEvent(wsKey: WsKey): number | null { + return getMaxTopicsPerSubscribeEvent(wsKey); + } + + /** + * @returns one or more correctly structured request events for performing a operations over WS. This can vary per exchange spec. + */ + protected async getWsRequestEvents( + operation: WSOperation, + requests: WsTopicRequest[], + ): Promise>[]> { + const wsRequestBuildingErrors: unknown[] = []; + + const topics = requests.map( + (r) => r.topic + ',' + Object.values(r.payload || {}).join(','), + ); + + // Previously used to track topics in a request. Keeping this for subscribe/unsubscribe requests, no need for incremental values + const req_id = + ['subscribe', 'unsubscribe'].includes(operation) && topics.length + ? topics.join(',') + : this.getNewRequestId().toFixed(); + + /** + { + "op":"subscribe", + "args":[ + { + "instType":"spot", + "topic":"ticker", + "symbol":"BTCUSDT" + }, + { + "instType":"spot", + "topic":"candle5m", + "symbol":"BTCUSDT" + } + ] + } + */ + const wsEvent: WsRequestOperationBitget = { + op: operation, + args: requests.map((request) => { + // const request = { + // topic: 'ticker', + // payload: { instType: 'spot', symbol: 'BTCUSDT' }, + // }; + // becomes: + // const request = { + // topic: 'ticker', + // instType: 'spot', + // symbol: 'BTCUSDT', + // }; + return { + topic: request.topic, + ...request.payload, + }; + }), + }; + + const midflightWsEvent: MidflightWsRequestEvent< + WsRequestOperationBitget + > = { + requestKey: req_id, + requestEvent: wsEvent, + }; + + if (wsRequestBuildingErrors.length) { + const label = + wsRequestBuildingErrors.length === requests.length ? 'all' : 'some'; + + this.logger.error( + `Failed to build/send ${wsRequestBuildingErrors.length} event(s) for ${label} WS requests due to exceptions`, + { + ...WS_LOGGER_CATEGORY, + wsRequestBuildingErrors, + wsRequestBuildingErrorsStringified: JSON.stringify( + wsRequestBuildingErrors, + null, + 2, + ), + }, + ); + } + + return [midflightWsEvent]; + } + + private async getWsAuthSignature( + wsKey: WsKey, + ): Promise<{ expiresAt: number; signature: string }> { + const { apiKey, apiSecret, apiPass, recvWindow } = this.options; + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error('Cannot auth - missing api or secret or pass in config'); + } + + this.logger.trace("Getting auth'd request params", { + ...WS_LOGGER_CATEGORY, + wsKey, + }); + + const signatureExpiresAt = ((Date.now() + recvWindow) / 1000).toFixed(0); + + const signature = await this.signMessage( + signatureExpiresAt + 'GET' + '/user/verify', + apiSecret, + 'base64', + 'SHA-256', + ); + + return { + expiresAt: +signatureExpiresAt, + signature, + }; + } + + private async signMessage( + paramsStr: string, + secret: string, + method: 'hex' | 'base64', + algorithm: SignAlgorithm, + ): Promise { + if (typeof this.options.customSignMessageFn === 'function') { + return this.options.customSignMessageFn(paramsStr, secret); + } + return await signMessage(paramsStr, secret, method, algorithm); + } + + protected async getWsAuthRequestEvent( + wsKey: WsKey, + ): Promise> { + try { + const { apiKey, apiSecret, apiPass } = this.options; + const { signature, expiresAt } = await this.getWsAuthSignature(wsKey); + + if (!apiKey || !apiSecret || !apiPass) { + this.logger.error( + 'Cannot authenticate websocket, either api key, secret or passphrase missing.', + { ...WS_LOGGER_CATEGORY, wsKey }, + ); + throw new Error( + 'Cannot auth - missing api or secret or pass in config', + ); + } + + const request: WsRequestOperationBitget = { + op: 'login', + args: [ + { + apiKey, + passphrase: apiPass, + timestamp: expiresAt, + sign: signature, + }, + ], + }; + + return request; + } catch (e) { + this.logger.error(e, { ...WS_LOGGER_CATEGORY, wsKey }); + throw e; + } + } + + /** + * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc) + */ + protected resolveEmittableEvents( + wsKey: WsKey, + event: MessageEventLike, + ): EmittableEvent[] { + const results: EmittableEvent[] = []; + + try { + const msg = JSON.parse(event.data); + const emittableEvent = { ...msg, wsKey }; + + /** + * WS API response handling + */ + if (isWSAPIResponse(emittableEvent)) { + // const eg1 = { + // event: 'error', + // id: '1', + // code: '43012', + // msg: 'Insufficient balance', + // }; + + const retCode = emittableEvent.code; + const reqId = emittableEvent.id; + const isError = retCode !== '0'; + + const promiseRef = [emittableEvent.id].join('_'); + + const loggableContext = { + wsKey, + promiseRef, + parsedEvent: emittableEvent, + }; + + if (!reqId) { + this.logger.error( + 'WS API response is missing reqId - promisified workflow could get stuck. If this happens, please get in touch with steps to reproduce. Trace:', + loggableContext, + ); + } + + if (isError) { + try { + this.getWsStore().rejectDeferredPromise( + wsKey, + promiseRef, + emittableEvent, + true, + ); + } catch (e) { + this.logger.error('Exception trying to reject WSAPI promise', { + ...loggableContext, + error: e, + }); + } + + results.push({ + eventType: 'exception', + event: emittableEvent, + isWSAPIResponse: true, + }); + return results; + } + + // WS API Success + try { + this.getWsStore().resolveDeferredPromise( + wsKey, + promiseRef, + emittableEvent, + true, + ); + } catch (e) { + this.logger.error('Exception trying to resolve WSAPI promise', { + ...loggableContext, + error: e, + }); + } + + results.push({ + eventType: 'response', + event: emittableEvent, + isWSAPIResponse: true, + }); + + return results; + } + + /** + * V3 event handling for consumers - behaves the same as V2 + */ + if (typeof msg === 'object') { + if (typeof msg['code'] === 'number') { + // v2 authentication event + if (msg.event === 'login' && msg.code === 0) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + results.push({ + eventType: 'authenticated', + event: emittableEvent, + }); + return results; + } + } + + if (msg['event']) { + results.push({ + eventType: 'response', + event: emittableEvent, + }); + + if (msg.event === 'error') { + this.logger.error('WS Error received', { + ...WS_LOGGER_CATEGORY, + wsKey, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + }); + results.push({ + eventType: 'exception', + event: emittableEvent, + }); + } + + return results; + } + + if (msg['arg']) { + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } + } + + this.logger.info('Unhandled/unrecognised ws event message', { + ...WS_LOGGER_CATEGORY, + message: msg || 'no message', + // messageType: typeof msg, + // messageString: JSON.stringify(msg), + event, + wsKey, + }); + + // fallback emit anyway + results.push({ + eventType: 'update', + event: emittableEvent, + }); + return results; + } catch (e) { + this.logger.error('Failed to parse ws event message', { + ...WS_LOGGER_CATEGORY, + error: e, + event, + wsKey, + }); + } + + return results; + } + + /** + * V3/UTA supports order placement via WebSockets. This is the WS API: + * https://www.bitget.com/api-doc/uta/websocket/private/Place-Order-Channel + * + * @returns a promise that resolves/rejects when a matching response arrives + */ + async sendWSAPIRequest< + TWSKey extends keyof WsAPIWsKeyTopicMap, + TWSOperation extends WsAPIWsKeyTopicMap[TWSKey], + TWSParams extends WsAPITopicRequestParamMap[TWSOperation], + TWSAPIResponse extends + WsAPIOperationResponseMap[TWSOperation] = WsAPIOperationResponseMap[TWSOperation], + >( + wsKey: WsKey, + operation: TWSOperation, + category: BitgetInstTypeV3, + params: TWSParams & { signRequest?: boolean }, + requestFlags?: WSAPIRequestFlags, + ): Promise { + this.logger.trace(`sendWSAPIRequest(): assert "${wsKey}" is connected`); + + await this.assertIsConnected(wsKey); + this.logger.trace('sendWSAPIRequest()->assertIsConnected() ok'); + + if (requestFlags?.authIsOptional !== true) { + // this.logger.trace('sendWSAPIRequest(): assertIsAuthenticated(${wsKey})...'); + await this.assertIsAuthenticated(wsKey); + // this.logger.trace('sendWSAPIRequest(): assertIsAuthenticated(${wsKey}) ok'); + } + + const request: WSAPIRequestBitgetV3 = { + op: 'trade', + id: `${this.getNewRequestId()}`, + category: category, + topic: operation, + // Ensure "args" is always wrapped as array + args: Array.isArray(params) ? params : [params], + }; + + // Store deferred promise, resolved within the "resolveEmittableEvents" method while parsing incoming events + const promiseRef = getPromiseRefForWSAPIRequest(request); + + const deferredPromise = this.getWsStore().createDeferredPromise< + // eslint-disable-next-line @typescript-eslint/no-explicit-any + TWSAPIResponse & { request: any } + >(wsKey, promiseRef, false); + + // Enrich returned promise with request context for easier debugging + deferredPromise.promise + ?.then((res) => { + if (!Array.isArray(res)) { + res.request = { + wsKey, + ...request, + }; + } + + return res; + }) + .catch((e) => { + if (typeof e === 'string') { + this.logger.error('Unexpected string thrown without Error object:', { + e, + wsKey, + request, + }); + return e; + } + e.request = { + wsKey, + operation, + params: params, + }; + // throw e; + return e; + }); + + this.logger.trace( + `sendWSAPIRequest(): sending raw request: ${JSON.stringify(request, null, 2)}`, + ); + + // Send event + const throwExceptions = false; + this.tryWsSend(wsKey, JSON.stringify(request), throwExceptions); + + this.logger.trace( + `sendWSAPIRequest(): sent "${operation}" event with promiseRef(${promiseRef})`, + ); + + // Return deferred promise, so caller can await this call + return deferredPromise.promise!; + } +} diff --git a/test/response.util.ts b/test/response.util.ts index 9e80c44..76307d6 100644 --- a/test/response.util.ts +++ b/test/response.util.ts @@ -1,4 +1,4 @@ -import { API_ERROR_CODE } from '../src'; +import { API_ERROR_CODE } from '../src/index.js'; const SUCCESS_MSG_REGEX = /success/gim; diff --git a/test/tsconfig.test.json b/test/tsconfig.test.json new file mode 100644 index 0000000..625f1d9 --- /dev/null +++ b/test/tsconfig.test.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "baseUrl": "", + "outDir": "dist", + "target": "esnext", + "rootDir": "../" + }, + "include": ["../src/**/*.*", "../test/**/*.*"] +} diff --git a/test/v1/broker/private.read.test.ts b/test/v1/broker/private.read.test.ts index 6a42368..824eafb 100644 --- a/test/v1/broker/private.read.test.ts +++ b/test/v1/broker/private.read.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, BrokerClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, BrokerClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Broker REST API GET Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -29,7 +29,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getBrokerInfo()).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -41,7 +41,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubAccounts()).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -53,7 +53,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubEmail(subUid)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -65,7 +65,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubSpotAssets(subUid)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { // expect(e.body).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, @@ -78,7 +78,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubFutureAssets(subUid, 'usdt')).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -90,7 +90,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubDepositAddress(subUid, coin)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -102,7 +102,7 @@ describe('Private Broker REST API GET Endpoints', () => { expect(await api.getSubAPIKeys(subUid)).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); diff --git a/test/v1/broker/private.write.test.ts b/test/v1/broker/private.write.test.ts index d3ae0eb..4466e27 100644 --- a/test/v1/broker/private.write.test.ts +++ b/test/v1/broker/private.write.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, BrokerClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, BrokerClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Broker REST API POST Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -29,7 +29,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect(await api.createSubAccount('test1')).toMatchObject( sucessEmptyResponseObject(), ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -41,7 +41,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect( await api.modifySubAccount('test1', 'spot_trade,transfer', 'normal'), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -53,7 +53,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect( await api.modifySubEmail('test1', 'ASDFASDF@LKMASDF.COM'), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -71,7 +71,7 @@ describe('Private Broker REST API POST Endpoints', () => { subUid, }), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -83,7 +83,7 @@ describe('Private Broker REST API POST Endpoints', () => { expect( await api.setSubDepositAutoTransfer(subUid, 'USDT', 'spot'), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -100,7 +100,7 @@ describe('Private Broker REST API POST Endpoints', () => { '10.0.0.1', ), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_BROKER, }); @@ -116,7 +116,7 @@ describe('Private Broker REST API POST Endpoints', () => { remark: 'test', }), ).toMatchObject(sucessEmptyResponseObject()); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.PASSPHRASE_CANNOT_BE_EMPTY, }); diff --git a/test/v1/futures/private.read.test.ts b/test/v1/futures/private.read.test.ts index 57941cc..2e1c496 100644 --- a/test/v1/futures/private.read.test.ts +++ b/test/v1/futures/private.read.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, FuturesClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, FuturesClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Futures REST API GET Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -36,7 +36,7 @@ describe('Private Futures REST API GET Endpoints', () => { marginMode: expect.any(String), }, }); - } catch (e) { + } catch (e: any) { console.error('getAccount: ', e); expect(e).toBeNull(); } @@ -48,7 +48,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getAccounts: ', e); expect(e).toBeNull(); } @@ -64,7 +64,7 @@ describe('Private Futures REST API GET Endpoints', () => { openCount: expect.any(Number), }, }); - } catch (e) { + } catch (e: any) { console.error('getOpenCount: ', e); expect(e).toBeNull(); } @@ -76,7 +76,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getPosition: ', e); expect(e).toBeNull(); } @@ -88,7 +88,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getPosition: ', e); expect(e).toBeNull(); } @@ -112,7 +112,7 @@ describe('Private Futures REST API GET Endpoints', () => { result: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getAccountBill: ', e); expect(e).toBeNull(); } @@ -135,7 +135,7 @@ describe('Private Futures REST API GET Endpoints', () => { result: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getBusinessBill: ', e); expect(e).toBeNull(); } @@ -147,7 +147,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOpenSymbolOrders: ', e); expect(e).toBeNull(); } @@ -159,7 +159,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOpenOrders: ', e); expect(e).toBeNull(); } @@ -171,7 +171,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getOrderHistory: ', e); expect(e).toBeNull(); } @@ -185,7 +185,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getProductTypeOrderHistory: ', e); expect(e).toBeNull(); } @@ -197,7 +197,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_GET_NOT_FOUND, }); @@ -210,7 +210,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_GET_NOT_FOUND, }); @@ -228,7 +228,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getProductTypeOrderFills: ', e); expect(e).toBeNull(); } @@ -240,7 +240,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getPlanOrderTPSLs: ', e); expect(e).toBeNull(); } @@ -258,7 +258,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { console.error('getHistoricPlanOrdersTPSL: ', e); expect(e).toBeNull(); } @@ -272,7 +272,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -287,7 +287,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -302,7 +302,7 @@ describe('Private Futures REST API GET Endpoints', () => { data: expect.any(Object), }, ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -315,7 +315,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -328,7 +328,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -348,7 +348,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -363,7 +363,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -376,7 +376,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -389,7 +389,7 @@ describe('Private Futures REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Object), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); diff --git a/test/v1/futures/private.write.test.ts b/test/v1/futures/private.write.test.ts index fd65312..ffcdd88 100644 --- a/test/v1/futures/private.write.test.ts +++ b/test/v1/futures/private.write.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, FuturesClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, FuturesClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; jest.setTimeout(10000); @@ -32,7 +32,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.error('setLeverage: ', e); expect(e).toBeNull(); } @@ -44,7 +44,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // expect(e).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.PARAMETER_EXCEPTION, @@ -60,7 +60,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.error('setMarginMode: ', e); expect(e).toBeNull(); } @@ -84,7 +84,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.log(e.body); expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, @@ -106,7 +106,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, }); @@ -121,7 +121,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_CANCEL_NOT_FOUND, }); @@ -136,7 +136,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { console.error('batchCancelOrder: ', e); expect(e).toBeNull(); } @@ -148,7 +148,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.NO_ORDER_TO_CANCEL, }); @@ -171,7 +171,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // {"code": "40889", "data": null, "msg": "The plan order of this contract has reached the upper limit" // if the above error is seen, you need to cancel trigger orders on the test account (in futures) console.error('submitPlanOrder: ', e); @@ -194,7 +194,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.PLAN_ORDER_NOT_FOUND, }); @@ -214,7 +214,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // expect(e).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.PLAN_ORDER_NOT_FOUND, @@ -236,7 +236,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // console.log(e.body); expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_INSUFFICIENT_POSITION_NO_TPSL, @@ -259,7 +259,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_INSUFFICIENT_POSITION_NO_TPSL, }); @@ -279,7 +279,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { // expect(e).toBeNull(); expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_TPSL_NOT_FOUND, @@ -300,7 +300,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.FUTURES_ORDER_TPSL_NOT_FOUND, }); @@ -315,7 +315,7 @@ describe('Private Futures REST API POST Endpoints', () => { data: {}, }, ); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -332,7 +332,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); @@ -345,7 +345,7 @@ describe('Private Futures REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: {}, }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_NOT_COPY_TRADER, }); diff --git a/test/v1/futures/public.test.ts b/test/v1/futures/public.test.ts index f3259d8..4e8d075 100644 --- a/test/v1/futures/public.test.ts +++ b/test/v1/futures/public.test.ts @@ -1,5 +1,5 @@ -import { FuturesClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { FuturesClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Public Spot REST API Endpoints', () => { const api = new FuturesClient(); diff --git a/test/v1/spot/private.read.test.ts b/test/v1/spot/private.read.test.ts index 0382abc..e690c95 100644 --- a/test/v1/spot/private.read.test.ts +++ b/test/v1/spot/private.read.test.ts @@ -1,5 +1,5 @@ -import { SpotClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { SpotClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Spot REST API GET Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -28,7 +28,7 @@ describe('Private Spot REST API GET Endpoints', () => { it.skip('getDepositAddress()', async () => { try { expect(await api.getDepositAddress(coin)).toStrictEqual(''); - } catch (e) { + } catch (e: any) { console.error('exception: ', e); expect(e).toBeNull(); } @@ -40,7 +40,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getWithdrawals: ', e); expect(e).toBeNull(); } @@ -52,7 +52,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getDeposits: ', e); expect(e).toBeNull(); } @@ -68,7 +68,7 @@ describe('Private Spot REST API GET Endpoints', () => { authorities: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getApiKeyInfo: ', e); expect(e).toBeNull(); } @@ -81,7 +81,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getBalance: ', e); expect(e).toBeNull(); } @@ -93,7 +93,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getTransactionHistory: ', e); expect(e).toBeNull(); } @@ -106,7 +106,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getTransferHistory: ', e); expect(e).toBeNull(); } @@ -118,7 +118,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOrder: ', e); expect(e).toBeNull(); } @@ -130,7 +130,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOpenOrders: ', e); expect(e).toBeNull(); } @@ -142,7 +142,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOrderHistory: ', e); expect(e).toBeNull(); } @@ -154,7 +154,7 @@ describe('Private Spot REST API GET Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error('getOrderFills: ', e); expect(e).toBeNull(); } @@ -171,7 +171,7 @@ describe('Private Spot REST API GET Endpoints', () => { orderList: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getCurrentPlanOrders: ', e); expect(e).toBeNull(); } @@ -194,7 +194,7 @@ describe('Private Spot REST API GET Endpoints', () => { orderList: expect.any(Array), }, }); - } catch (e) { + } catch (e: any) { console.error('getHistoricPlanOrders: ', e); expect(e).toBeNull(); } diff --git a/test/v1/spot/private.write.test.ts b/test/v1/spot/private.write.test.ts index 7e6993b..7d1f7a0 100644 --- a/test/v1/spot/private.write.test.ts +++ b/test/v1/spot/private.write.test.ts @@ -1,5 +1,5 @@ -import { API_ERROR_CODE, SpotClient } from '../../../src'; -import { sucessEmptyResponseObject } from '../../response.util'; +import { API_ERROR_CODE, SpotClient } from '../../../src/index.js'; +import { sucessEmptyResponseObject } from '../../response.util.js'; describe('Private Spot REST API POST Endpoints', () => { const API_KEY = process.env.API_KEY_COM; @@ -32,7 +32,7 @@ describe('Private Spot REST API POST Endpoints', () => { toType: 'mix_usdt', }), ).toStrictEqual(''); - } catch (e) { + } catch (e: any) { // console.error('transfer: ', e); expect(e.body).toMatchObject({ // not sure what this error means, probably no kyc. Seems to change? @@ -51,7 +51,7 @@ describe('Private Spot REST API POST Endpoints', () => { toType: 'mix_usdt', }), ).toStrictEqual(''); - } catch (e) { + } catch (e: any) { // console.error('transferV2: ', e); expect(e.body).toMatchObject({ // not sure what this error means, probably no kyc. Seems to change? @@ -73,7 +73,7 @@ describe('Private Spot REST API POST Endpoints', () => { toType: 'mix_usdt', }), ).toStrictEqual(''); - } catch (e) { + } catch (e: any) { // console.error('transferV2: ', e); expect(e.body).toMatchObject({ // not sure what this error means, probably no balance. Seems to change? @@ -95,7 +95,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.INCORRECT_PERMISSIONS, }); @@ -115,7 +115,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.log( `"${expect.getState().currentTestName}"`, JSON.stringify(e.body), @@ -133,7 +133,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.INCORRECT_PERMISSIONS, }); @@ -146,7 +146,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.log( `"${expect.getState().currentTestName}"`, JSON.stringify(e.body), @@ -173,7 +173,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.error(e.body); expect(e.body).toMatchObject({ code: API_ERROR_CODE.INSUFFICIENT_BALANCE, @@ -199,7 +199,7 @@ describe('Private Spot REST API POST Endpoints', () => { failure: [{ errorCode: API_ERROR_CODE }], }, }); - } catch (e) { + } catch (e: any) { // console.log(`fn() exception: `, e.body); expect(e?.body).toMatchObject({ @@ -214,7 +214,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: '123456', //expect.any(Array), }); - } catch (e) { + } catch (e: any) { console.log('cancelorder err', e); expect(e.body).toMatchObject({ code: API_ERROR_CODE.ORDER_NOT_FOUND, @@ -228,7 +228,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.ORDER_NOT_FOUND, }); @@ -254,7 +254,7 @@ describe('Private Spot REST API POST Endpoints', () => { expect(result).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, }); - } catch (e) { + } catch (e: any) { // console.error('submitPlanOrder(): ', e); expect(e?.body).toMatchObject({ code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED, @@ -274,7 +274,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(Array), }); - } catch (e) { + } catch (e: any) { expect(e.body).toMatchObject({ code: API_ERROR_CODE.PLAN_ORDER_NOT_FOUND, }); @@ -291,7 +291,7 @@ describe('Private Spot REST API POST Endpoints', () => { ...sucessEmptyResponseObject(), data: expect.any(String), }); - } catch (e) { + } catch (e: any) { // console.error('cancelPlanOrder(): ', e); // expect(e).toBeNull(); expect(e.body).toMatchObject({ diff --git a/test/v1/ws.private.test.ts b/test/v1/ws.private.test.ts index a6ca2e4..52206ef 100644 --- a/test/v1/ws.private.test.ts +++ b/test/v1/ws.private.test.ts @@ -1,10 +1,14 @@ import { - WebsocketClient, + WebsocketClientLegacyV1, WS_ERROR_ENUM, WS_KEY_MAP, WSClientConfigurableOptions, -} from '../../src'; -import { getSilentLogger, logAllEvents, waitForSocketEvent } from '../ws.util'; +} from '../../src/index.js'; +import { + getSilentLogger, + logAllEvents, + waitForSocketEvent, +} from '../ws.util.js'; describe.skip('Private Spot Websocket Client', () => { const API_KEY = process.env.API_KEY_COM; @@ -19,7 +23,7 @@ describe.skip('Private Spot Websocket Client', () => { describe('with invalid credentials', () => { it('should reject private subscribe if keys/signature are incorrect', async () => { - const badClient = new WebsocketClient( + const badClient = new WebsocketClientLegacyV1( { ...wsClientOptions, apiKey: 'bad', @@ -52,7 +56,7 @@ describe.skip('Private Spot Websocket Client', () => { }); describe('with valid API credentails', () => { - let wsClient: WebsocketClient; + let wsClient: WebsocketClientLegacyV1; it('should have api credentials to test with', () => { expect(API_KEY).toStrictEqual(expect.any(String)); @@ -61,7 +65,7 @@ describe.skip('Private Spot Websocket Client', () => { }); beforeAll(() => { - wsClient = new WebsocketClient( + wsClient = new WebsocketClientLegacyV1( wsClientOptions, getSilentLogger('expectSuccess'), ); diff --git a/test/v1/ws.public.test.ts b/test/v1/ws.public.test.ts index 4342734..528333e 100644 --- a/test/v1/ws.public.test.ts +++ b/test/v1/ws.public.test.ts @@ -1,17 +1,21 @@ import { - WebsocketClient, + WebsocketClientLegacyV1, WS_KEY_MAP, WSClientConfigurableOptions, -} from '../../src'; -import { getSilentLogger, logAllEvents, waitForSocketEvent } from '../ws.util'; +} from '../../src/index.js'; +import { + getSilentLogger, + logAllEvents, + waitForSocketEvent, +} from '../ws.util.js'; describe('Public Spot Websocket Client', () => { - let wsClient: WebsocketClient; + let wsClient: WebsocketClientLegacyV1; const wsClientOptions: WSClientConfigurableOptions = {}; beforeAll(() => { - wsClient = new WebsocketClient( + wsClient = new WebsocketClientLegacyV1( wsClientOptions, getSilentLogger('expectSuccess'), ); diff --git a/test/v2/private.read.test.ts b/test/v2/private.read.test.ts index b36076e..1eb7a05 100644 --- a/test/v2/private.read.test.ts +++ b/test/v2/private.read.test.ts @@ -1,9 +1,9 @@ -import { API_ERROR_CODE } from '../../src'; -import { RestClientV2 } from '../../src/rest-client-v2'; +import { API_ERROR_CODE } from '../../src/index.js'; +import { RestClientV2 } from '../../src/rest-client-v2.js'; import { errorResponseObjectV3, sucessEmptyResponseObject, -} from '../response.util'; +} from '../response.util.js'; describe('Bitget Private REST API Read Endpoints', () => { const API_KEY = process.env.API_KEY_COM; diff --git a/test/v2/private.write.test.ts b/test/v2/private.write.test.ts index ccd51a9..8da16ff 100644 --- a/test/v2/private.write.test.ts +++ b/test/v2/private.write.test.ts @@ -1,9 +1,9 @@ -import { API_ERROR_CODE } from '../../src'; -import { RestClientV2 } from '../../src/rest-client-v2'; +import { API_ERROR_CODE } from '../../src/index.js'; +import { RestClientV2 } from '../../src/rest-client-v2.js'; import { errorResponseObjectV3, sucessEmptyResponseObject, -} from '../response.util'; +} from '../response.util.js'; describe('Bitget Private REST API Write Endpoints', () => { const API_KEY = process.env.API_KEY_COM; diff --git a/test/v2/public.test.ts b/test/v2/public.test.ts index e33e5d3..68be21b 100644 --- a/test/v2/public.test.ts +++ b/test/v2/public.test.ts @@ -1,5 +1,5 @@ -import { RestClientV2 } from '../../src/rest-client-v2'; -import { sucessEmptyResponseObject } from '../response.util'; +import { RestClientV2 } from '../../src/rest-client-v2.js'; +import { sucessEmptyResponseObject } from '../response.util.js'; describe('Bitget Public REST API Endpoints', () => { const api = new RestClientV2(); diff --git a/test/v3/private.read.test.ts b/test/v3/private.read.test.ts new file mode 100644 index 0000000..34c821b --- /dev/null +++ b/test/v3/private.read.test.ts @@ -0,0 +1,171 @@ +import { API_ERROR_CODE } from '../../src'; +import { RestClientV3 } from '../../src/rest-client-v3'; +import { + errorResponseObjectV3, + sucessEmptyResponseObject, +} from '../response.util'; + +describe('Bitget Private REST API V3 Read Endpoints', () => { + const API_KEY = process.env.API_KEY_COM_V3; + const API_SECRET = process.env.API_SECRET_COM_V3; + const API_PASSPHRASE = process.env.API_PASS_COM_V3; + + const api = new RestClientV3({ + apiKey: API_KEY!, + apiSecret: API_SECRET!, + apiPass: API_PASSPHRASE!, + }); + + it('should have api credentials to use', () => { + expect(API_KEY).toStrictEqual(expect.any(String)); + expect(API_SECRET).toStrictEqual(expect.any(String)); + expect(API_PASSPHRASE).toStrictEqual(expect.any(String)); + }); + + describe('Account Endpoints', () => { + it('getBalances()', async () => { + try { + const res = await api.getBalances(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getFundingAssets()', async () => { + try { + const res = await api.getFundingAssets(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getAccountSettings()', async () => { + try { + const res = await api.getAccountSettings(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + }); + + describe('Trade Endpoints', () => { + it('getOrderInfo()', async () => { + try { + const res = await api.getOrderInfo({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); + } + }); + + it('getUnfilledOrders()', async () => { + try { + const res = await api.getUnfilledOrders(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getHistoryOrders()', async () => { + try { + const res = await api.getHistoryOrders({ + category: 'SPOT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getTradeFills()', async () => { + try { + const res = await api.getTradeFills(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + }); + + describe('Funding Endpoints', () => { + it('getDepositRecords()', async () => { + try { + const res = await api.getDepositRecords({ + startTime: '1715808000000', + endTime: '1715894400000', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getWithdrawRecords()', async () => { + try { + const res = await api.getWithdrawRecords({ + startTime: '1715808000000', + endTime: '1715894400000', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getFinancialRecords()', async () => { + try { + const res = await api.getFinancialRecords({ + category: 'SPOT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + }); + + describe('Position Endpoints', () => { + it('getCurrentPosition()', async () => { + try { + const res = await api.getCurrentPosition({ + category: 'USDT-FUTURES', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getPositionHistory()', async () => { + try { + const res = await api.getPositionHistory({ + category: 'USDT-FUTURES', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toBeUndefined(); + } + }); + + it('getOrderInfo() with invalid order', async () => { + try { + const res = await api.getOrderInfo({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); // The order does not exist + } + }); + }); +}); diff --git a/test/v3/private.write.test.ts b/test/v3/private.write.test.ts new file mode 100644 index 0000000..ba9b77a --- /dev/null +++ b/test/v3/private.write.test.ts @@ -0,0 +1,183 @@ +import { API_ERROR_CODE } from '../../src'; +import { RestClientV3 } from '../../src/rest-client-v3'; +// prettier-ignore +import { + errorResponseObjectV3, + sucessEmptyResponseObject, +} from '../response.util'; + +describe('Bitget Private REST API V3 Write Endpoints', () => { + const API_KEY = process.env.API_KEY_COM_V3; + const API_SECRET = process.env.API_SECRET_COM_V3; + const API_PASSPHRASE = process.env.API_PASS_COM_V3; + + const api = new RestClientV3({ + apiKey: API_KEY!, + apiSecret: API_SECRET!, + apiPass: API_PASSPHRASE!, + }); + + it('should have api credentials to use', () => { + expect(API_KEY).toStrictEqual(expect.any(String)); + expect(API_SECRET).toStrictEqual(expect.any(String)); + expect(API_PASSPHRASE).toStrictEqual(expect.any(String)); + }); + + describe('Trade Endpoints', () => { + it('submitNewOrder()', async () => { + try { + const res = await api.submitNewOrder({ + category: 'SPOT', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE_V3), + ); // not enough balance + } + }); + + it('cancelOrder()', async () => { + try { + const res = await api.cancelOrder({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); //The order does not exist + } + }); + + it('placeBatchOrders()', async () => { + try { + const res = await api.placeBatchOrders([ + { + category: 'SPOT', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + }, + ]); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE), + ); // not enough balance + } + }); + + it('cancelBatchOrders()', async () => { + try { + const res = await api.cancelBatchOrders([ + { + category: 'SPOT', + symbol: 'BTCUSDT', + orderId: '123456789', + }, + ]); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); //The order does not exist + } + }); + + it('modifyOrder()', async () => { + try { + const res = await api.modifyOrder({ + orderId: '123456789', + qty: '0.002', + price: '21000', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); //The order does not exist + } + }); + }); + + describe('Futures Endpoints', () => { + it('submitNewOrder() futures', async () => { + try { + const res = await api.submitNewOrder({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + posSide: 'long', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE_V3), + ); // not enough balance + } + }); + + it('cancelOrder() futures', async () => { + try { + const res = await api.cancelOrder({ + orderId: '123456789', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.ORDER_DOES_NOT_EXIST_V3), + ); // The order does not exist + } + }); + + it('placeBatchOrders() futures', async () => { + try { + const res = await api.placeBatchOrders([ + { + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + side: 'buy', + orderType: 'limit', + price: '20000', + qty: '0.001', + timeInForce: 'gtc', + posSide: 'long', + }, + ]); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE), + ); + } + }); + + it('closeAllPositions()', async () => { + try { + const res = await api.closeAllPositions({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + } catch (e) { + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.NO_POSITION_TO_CLOSE), + ); + } + }); + }); +}); diff --git a/test/v3/public.test.ts b/test/v3/public.test.ts new file mode 100644 index 0000000..06a131a --- /dev/null +++ b/test/v3/public.test.ts @@ -0,0 +1,82 @@ +import { RestClientV3 } from '../../src/rest-client-v3'; +import { sucessEmptyResponseObject } from '../response.util'; + +describe('Bitget Public REST API V3 Endpoints', () => { + const api = new RestClientV3(); + + describe('public endpoints', () => { + it('should succeed making a GET request without params', async () => { + const res = await api.getDiscountRate(); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should succeed making a GET request with params', async () => { + const res = await api.getTickers({ + category: 'SPOT', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return orderbook data', async () => { + const res = await api.getOrderBook({ + category: 'SPOT', + symbol: 'BTCUSDT', + limit: '20', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return candles data', async () => { + const res = await api.getCandles({ + category: 'SPOT', + symbol: 'BTCUSDT', + interval: '1m', + limit: '100', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return recent fills', async () => { + const res = await api.getFills({ + category: 'SPOT', + symbol: 'BTCUSDT', + limit: '20', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return historic candles', async () => { + const res = await api.getHistoryCandles({ + category: 'SPOT', + symbol: 'BTCUSDT', + interval: '1m', + limit: '20', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return funding rate data', async () => { + const res = await api.getCurrentFundingRate({ + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return open interest data', async () => { + const res = await api.getOpenInterest({ + category: 'USDT-FUTURES', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + + it('should return instruments config', async () => { + const res = await api.getInstruments({ + category: 'SPOT', + symbol: 'BTCUSDT', + }); + expect(res).toMatchObject(sucessEmptyResponseObject()); + }); + }); +}); diff --git a/test/websockets/wsStore.test.ts b/test/websockets/wsStore.test.ts new file mode 100644 index 0000000..263ecaf --- /dev/null +++ b/test/websockets/wsStore.test.ts @@ -0,0 +1,69 @@ +import { isDeepObjectMatch } from '../../src/util/WsStore.js'; + +describe('WsStore', () => { + describe('isDeepObjectMatch()', () => { + it('should match an overlapping complex topic: ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeTruthy(); + }); + + it('should match an overlapping complex topic, even if keys are differently ordered', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + topic: 'account', + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeTruthy(); + }); + + it('should NOT match an overlapping complex topic: ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDC-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeFalsy(); + }); + + it('should NOT match asymmetric objects (child property removed): ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + payload: { coin: 'default' }, + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeFalsy(); + }); + + it('should NOT match asymmetric objects (no payload): ', () => { + const topic1 = { + topic: 'account', + payload: { instType: 'USDT-FUTURES', coin: 'default' }, + }; + const topic2 = { + topic: 'account', + }; + + expect(isDeepObjectMatch(topic1, topic2)).toBeFalsy(); + }); + }); +}); diff --git a/test/ws.util.ts b/test/ws.util.ts index 223880d..4f69ea6 100644 --- a/test/ws.util.ts +++ b/test/ws.util.ts @@ -1,24 +1,18 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { WebsocketClient } from '../src'; +import { DefaultLogger, WebsocketClientLegacyV1 } from '../src/index.js'; // eslint-disable-next-line @typescript-eslint/no-unused-vars -export function getSilentLogger(logHint?: string) { +export function getSilentLogger(_logHint?: string): DefaultLogger { return { - silly: () => {}, - debug: () => {}, - notice: () => {}, + trace: () => {}, info: () => {}, - warning: () => {}, error: () => {}, }; } -export const fullLogger = { - silly: (...params) => console.log('silly', ...params), - debug: (...params) => console.log('debug', ...params), - notice: (...params) => console.log('notice', ...params), +export const fullLogger: DefaultLogger = { + trace: (...params) => console.log('trace', ...params), info: (...params) => console.info('info', ...params), - warning: (...params) => console.warn('warning', ...params), error: (...params) => console.error('error', ...params), }; @@ -33,7 +27,7 @@ type WsClientEvent = /** Resolves a promise if an event is seen before a timeout (defaults to 4.5 seconds) */ export function waitForSocketEvent( - wsClient: WebsocketClient, + wsClient: WebsocketClientLegacyV1, event: WsClientEvent, timeoutMs: number = 10 * 1000, ) { @@ -53,19 +47,19 @@ export function waitForSocketEvent( wsClient.removeListener('error', (e) => rejector(e)); } - function resolver(event) { + function resolver(event: unknown) { resolve(event); cleanup(); } - function rejector(event) { + function rejector(event: any) { if (!resolvedOnce) { reject(event); } cleanup(); } - wsClient.on(event, (e) => resolver(e)); + wsClient.on(event, (e: any) => resolver(e)); wsClient.on('exception', (e) => rejector(e)); // if (event !== 'close') { @@ -80,7 +74,7 @@ export function waitForSocketEvent( }); } -export function listenToSocketEvents(wsClient: WebsocketClient) { +export function listenToSocketEvents(wsClient: WebsocketClientLegacyV1) { const retVal: Record< 'update' | 'open' | 'response' | 'close' | 'error', typeof jest.fn @@ -110,8 +104,8 @@ export function listenToSocketEvents(wsClient: WebsocketClient) { }; } -export function logAllEvents(wsClient: WebsocketClient) { - wsClient.on('update', (data) => { +export function logAllEvents(wsClient: WebsocketClientLegacyV1) { + wsClient.on('update', (_data) => { // console.log('wsUpdate: ', JSON.stringify(data, null, 2)); }); @@ -127,13 +121,13 @@ export function logAllEvents(wsClient: WebsocketClient) { wsClient.on('reconnected', (data) => { console.log('wsReconnected ', data?.wsKey); }); - wsClient.on('close', (data) => { + wsClient.on('close', (_data) => { // console.log('wsClose: ', data); }); } export function promiseSleep(ms: number) { - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { setTimeout(resolve, ms); }); } diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 0000000..680201a --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "dist/cjs", + "target": "esnext" + }, + "include": ["src/**/*.*"] +} diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 0000000..4faa4f0 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/mjs", + "target": "esnext" + }, + "include": ["src/**/*.*"] +} diff --git a/tsconfig.json b/tsconfig.json index 4af98e5..efaa5ec 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,26 +1,32 @@ { - "compileOnSave": true, "compilerOptions": { - "allowJs": true, - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "baseUrl": ".", + "noEmitOnError": true, "declaration": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": false, + "inlineSourceMap": false, + "lib": ["esnext", "DOM"], + "listEmittedFiles": false, + "listFiles": false, + "moduleResolution": "node", + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noUnusedParameters": true, + "pretty": true, "removeComments": false, - "noEmitOnError": true, - "noImplicitAny": false, - "strictNullChecks": true, - "skipLibCheck": true, + "resolveJsonModule": true, + "skipLibCheck": false, "sourceMap": true, - "esModuleInterop": true, - "lib": ["es2017","dom"], - "outDir": "lib" + "strict": true, + "strictNullChecks": true, + "types": ["node", "jest"], + "module": "commonjs", + "outDir": "dist/cjs", + "target": "esnext" }, - "include": ["src/**/*"], - "exclude": [ - "node_modules", - "**/node_modules/*", - "coverage", - "doc" - ] + "compileOnSave": true, + "exclude": ["node_modules", "dist"], + "include": ["src/**/*.*", "test/**/*.*", ".eslintrc.cjs"] } diff --git a/tsconfig.linting.json b/tsconfig.linting.json index ee6bda0..d614e95 100644 --- a/tsconfig.linting.json +++ b/tsconfig.linting.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "commonjs", - "outDir": "dist/cjs", "target": "esnext", "rootDir": "../", "allowJs": true diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 9386e58..d783327 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -17,13 +17,10 @@ function generateConfig(name) { resolve: { // Add '.ts' and '.tsx' as resolvable extensions. - extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js'], + extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"], alias: { - [path.resolve(__dirname, '../lib/util/node-support.js')]: path.resolve( - __dirname, - '../lib/util/browser-support.js', - ), - }, + process: "process/browser", + } }, module: {