diff --git a/.eslintrc.js b/.eslintrc.js index 1a01058..078c253 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,15 +1,19 @@ -module.exports = { - env: { - browser: true, - es2021: true - }, - overrides: [ +module.exports = { + plugins: [ + "@typescript-eslint/eslint-plugin", + "eslint-plugin-tsdoc" + ], + extends: [ + 'plugin:@typescript-eslint/recommended' ], + parser: '@typescript-eslint/parser', parserOptions: { - ecmaVersion: "latest", - sourceType: "module" + project: "./tsconfig.json", + tsconfigRootDir: __dirname, + ecmaVersion: 2018, + sourceType: "module" }, rules: { - 'quote-props': ['error', 'as-needed'], + "tsdoc/syntax": "warn" } -} + }; \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..69e63b2 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,50 @@ +name: Release, npm publish and deploy gh-pages + +on: + push: + tags: + - "v*" + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + publish-doc: + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - uses: actions/setup-node@v3 + with: + node-version: 20 + - name: Install Dependencies + run: | + npm install + npm install typedoc + - name: Building documentation for GitHub Pages + run: npx typedoc --out ./docs + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifacts + uses: actions/upload-pages-artifact@v3 + with: + path: docs/ + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index bf894d4..a9440c2 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -5,7 +5,7 @@ jobs: test: strategy: matrix: - node-version: [12.x, 13.x, 14.x] + node-version: [18.x, 20.x, 21.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} @@ -22,5 +22,5 @@ jobs: - name: Install Dependencies run: npm install - - name: Run All Node.js Tests + - name: Run All typescript Tests run: npm run test diff --git a/.jsdoc.json b/.jsdoc.json deleted file mode 100644 index 108177a..0000000 --- a/.jsdoc.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "tags": { - "allowUnknownTags": true, - "dictionaries": ["jsdoc"] - }, - "source": { - "include": ["lib", "package.json", "README.md"], - "includePattern": ".ts$", - "excludePattern": "(node_modules/|docs)" - }, - "plugins": [ - "plugins/markdown" - ], - "templates": { - "cleverLinks": false, - "monospaceLinks": true, - "useLongnameInNav": false - }, - "opts": { - "destination": "./docs/", - "encoding": "utf8", - "private": true, - "recurse": true, - "sort": false, - "template": "./node_modules/minami" - } -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a18826..00034cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,99 +1,38 @@ -# Kite v4 +# Kite v5 - TypeScript -### Breaking changes -- Upgrade deps and set minimum nodejs version to 8.0.0+ -- Return promise instead of throwing error on generateSession and renewAccessToken -- Handle gtt payload validation and throw proper error -- Change ticker response attributes naming as per [kite connect doc](https://kite.trade/docs/connect/v3/websocket/#quote-packet-structure) +## [5.0.0] - 2024-06-13 -### New features -- Order margin call : [orderMargins](https://github.com/zerodha/kiteconnectjs/blob/master/lib/connect.js#L704) -- Basket order margin call : [orderBasketMargins](https://github.com/zerodha/kiteconnectjs/blob/master/lib/connect.js#L727) -- Add OI param to `getHistoricalData` -- Add global constant for postion types `POSITION_TYPE_DAY`, `POSITION_TYPE_OVERNIGHT` and `EXCHANGE_BCD` +### Breaking Changes -### Fixes -- Remove `order_id` param from complete tradebook fetch `getTrades` -- Fix `cancelMF` order_id param struct -- Handle price conversion for BCD segment in ticker -- Remove un-used `headers` param for `parseHistorical` -- Update comment block for `getQuote, getOHLC, getLTP, placeOrder and placeMFOrder` +- **TypeScript Conversion**: The entire codebase has been converted to TypeScript. This means type definitions are now included, and any custom integrations may need to be updated to match the new type definitions. +- **Node.js Version Requirement**: The minimum required Node.js version is now 18.0.0. Please upgrade your Node.js installation if you are using an older version. +- **API Changes**: Updated various function signatures and added explicit types for better TypeScript support. +### New Features -# Kite v3 +- **TypeScript Support**: The library is now fully written in TypeScript, providing better type safety. +- **Documentation**: Added and updated documentation to reflect the new TypeScript codebase as per the [TSDOC standard](https://tsdoc.org/). +- **Examples**: Added new examples for both REST API and WebSocket client in TypeScript. -### New features -- method: `getProfile` -- method: `getOHLC` -- method: `getLTP` -- method: `getInstrumentsMargins` -- Added MF API calls -- method: `getMFOrders` -- method: `getMFHoldings` -- method: `placeMFOrder` -- method: `cancelMFOrder` -- method: `getMFSIPS` -- method: `placeMFSIP` -- method: `modifyMFSIP` -- method: `cancelMFSIP` -- method: `getMFInstruments` -- method: `exitOrder` -- method: `renewAccessToken` -- method: `invalidateRefreshToken` -- constants for products, order type, transaction type, variety, validity, exchanges and margin segments +### Improvements -### API method name changes +- **Code Quality**: Refactored codebase to improve readability, maintainability, and performance. +- **Error Handling**: Improved error handling and added more descriptive error messages. -| v2 | v3 | -| ------------------------- | ------------------------- | -| requestAccessToken | generateSession | -| invalidateToken | invalidateAccessToken | -| setSessionHook | setSessionExpiryHook | -| loginUrl | getLoginURL | -| margins | getMargins | -| orderPlace | placeOrder | -| orderModify | modifyOrder | -| orderCancel | cancelOrder | -| orders | getOrders | -| orders(order_id) | getOrderHistory | -| trades | getTrades | -| trades(order_id) | getOrderTrades | -| holdings | getHoldings | -| positions | getPositions | -| productModify | convertPosition | -| instruments | getInstruments | -| historical | getHistoricalData | -| triggerRange | getTriggerRange | +### Migration Guide -### Params and other changes -- `KiteConnect` takes all the params as object including `api_key` -- `convertPosition` method takes all the params as object -- All success response returns only `data` field in response instead with envelope -- All error thrown are in the format of `{"message": "Unknown error", "error_type": "GeneralException", "data": null}` -- [Changes in `generateSession` response structure](https://kite.trade/docs/connect/v3/user/#response-attributes) -- [Changes in `getPositions` response structure](https://kite.trade/docs/connect/v3/portfolio/#response-attributes_1) -- [Changes in `getQuote` response structure](https://kite.trade/docs/connect/v3/market-quotes/#retrieving-full-market-quotes) -- [Changes in `placeOrder` params](https://kite.trade/docs/connect/v3/orders/#bracket-order-bo-parameters) -- Changes in `getHistoricalData` params -- All datetime string fields has been converted to `Date` object. - - `getOrders`, `getOrderHistory`, `getTrades`, `getOrderTrades`, `getMFOrders` responses fields `order_timestamp`, `exchange_timestamp`, `fill_timestamp` - - `getMFSIPS` fields `created`, `last_instalment` - - `generateSession` field `login_time` - - `getQuote` fields `timestamp`, `last_trade_time` - - `getInstruments` field `expiry` - - `getMFInstruments` field `last_price_date` +If you are upgrading from a previous version, please review the following changes and adjust your code accordingly: -### KiteTicker changes -- `KiteTicker` receives param `access_token` instead of `public_token` -- New params addedd to `KiteTicker` initializer - - `reconnect` - Toggle auto reconnect on/off - - `max_retry` - Max retry count for auto reconnect - - `max_delay` - Max delay between subsequent retries - - Auto reconnect is enabled by default -- Renamed callback `reconnecting` to `reconnect` -- Added new callbacks - - `error` - when socket connection is closed with error. Error is received as a first param - - `close` - when socket connection is closed cleanly - - `order_update` - When order update (postback) is received for the connected user (Data object is received as first argument) +- **Node.js Version**: Ensure your Node.js version is 18.0.0 or higher. +- **TypeScript Integration**: Update your project to handle the new TypeScript types. This may involve adding or adjusting type definitions in your project. +- **Function Signatures**: Review the updated function signatures in the documentation and adjust your usage of the library accordingly. +### Bug Fixes +- Fixed various minor bugs and performance issues reported in the previous version. + +### Notes + +- This release marks a significant update with the transition to TypeScript. Please report any issues or bugs to the repository's issue tracker. + +[5.0.0]: https://github.com/your-repo/kiteconnect-ts/releases/tag/v5.0.0 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9dcdb2f --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 Zerodha Technology Pvt. Ltd. (India) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index e29ba90..46ff4a4 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ -# The Kite Connect API Javascript client - v4 +# The Kite Connect API TypeScript/JavaScript Client -The official Javascript node client for communicating with the [Kite Connect API](https://kite.trade). +The official TypeScript/JavaScript for communicating with the [Kite Connect API](https://kite.trade). Kite Connect is a set of REST-like APIs that expose many capabilities required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (WebSockets), and more, with the simple HTTP API collection. -[Zerodha Technology](http://zerodha.com) (c) 2018. Licensed under the MIT License. +[Zerodha Technology](http://zerodha.com) (c) 2024. Licensed under the MIT License. ## Documentation -- [Javascript client documentation](https://kite.trade/docs/kiteconnectjs/v3) +- [Typescript client documentation](https://kite.trade/docs/kiteconnectjs/v3) - [Kite Connect HTTP API documentation](https://kite.trade/docs/connect/v3) ## Requirements -- NodeJS v8.0.0+ +- NodeJS v18.0.0+ ## Installation @@ -25,93 +25,103 @@ Or via [yarn](https://yarnpkg.com/package/kiteconnect) yarn add kiteconnect -## Breaking changes - v4 - -`v4` is a **breaking** major release with multiple internal modification to improve user experience.
+## Getting started with API -Below are the breaking changes: +```typescript +import { KiteConnect } from "kiteconnect"; -- Upgrade deps and set minimum nodejs version to 8.0.0+ -- Return promise instead of throwing error on generateSession and renewAccessToken -- Handle gtt payload validation and throw proper error -- Change ticker response attributes naming as per [kite connect doc](https://kite.trade/docs/connect/v3/websocket/#quote-packet-structure) +const apiKey = "your_api_key"; +const apiSecret = "your_api_secret"; +const requestToken = "your_request_token"; -## Getting started with API +const kc = new KiteConnect({ api_key: apiKey }); -```javascript -var KiteConnect = require("kiteconnect").KiteConnect; +async function init() { + try { + await generateSession(); + await getProfile(); + } catch (err) { + console.error(err); + } +} -var kc = new KiteConnect({ - api_key: "your_api_key", -}); +async function generateSession() { + try { + const response = await kc.generateSession(requestToken, apiSecret); + kc.setAccessToken(response.access_token); + console.log("Session generated:", response); + } catch (err) { + console.error("Error generating session:", err); + } +} -kc.generateSession("request_token", "api_secret") - .then(function (response) { - init(); - }) - .catch(function (err) { - console.log(err); - }); - -function init() { - // Fetch equity margins. - // You can have other api calls here. - kc.getMargins() - .then(function (response) { - // You got user's margin details. - }) - .catch(function (err) { - // Something went wrong. - }); +async function getProfile() { + try { + const profile = await kc.getProfile(); + console.log("Profile:", profile); + } catch (err) { + console.error("Error getting profile:", err); + } } +// Initialize the API calls +init(); ``` -## API promises - -All API calls returns a promise which you can use to call methods like `.then(...)` and `.catch(...)`. +## Getting started WebSocket client -```javascript -kiteConnectApiCall - .then(function (v) { - // On success - }) - .catch(function (e) { - // On rejected - }); -``` +```typescript +import { KiteTicker } from "kiteconnect"; -## Getting started WebSocket client +const apiKey = "your_api_key"; +const accessToken = "generated_access_token"; -```javascript -var KiteTicker = require("kiteconnect").KiteTicker; -var ticker = new KiteTicker({ - api_key: "api_key", - access_token: "access_token", +const ticker = new KiteTicker({ + api_key: apiKey, + access_token: accessToken, }); ticker.connect(); ticker.on("ticks", onTicks); ticker.on("connect", subscribe); +ticker.on("disconnect", onDisconnect); +ticker.on("error", onError); +ticker.on("close", onClose); +ticker.on("order_update", onTrade); -function onTicks(ticks) { +function onTicks(ticks: any[]): void { console.log("Ticks", ticks); } -function subscribe() { - var items = [738561]; - ticker.subscribe(items); - ticker.setMode(ticker.modeFull, items); +function subscribe(): void { + const tokens = [738561, 256265]; + ticker.subscribe(tokens); + ticker.setMode(ticker.modeFull, tokens); +} + +function onDisconnect(error: Error): void { + console.log("Closed connection on disconnect", error); +} + +function onError(error: Error): void { + console.log("Closed connection on error", error); +} + +function onClose(reason: string): void { + console.log("Closed connection on close", reason); +} + +function onTrade(order: any): void { + console.log("Order update", order); } ``` ## Auto re-connect WebSocket client -Optionally you can enable client side auto re-connection to automatically reconnect if the connection is dropped. -It is very useful at times when client side network is unreliable and patchy. +Optionally, you can enable client-side auto re-connection to automatically reconnect if the connection is dropped. It is very useful when the client-side network is unreliable and patchy. -All you need to do is enable auto re-connection with preferred interval and time. For example +Enable auto re-connection with a preferred interval and time. For example: -```javascript +```typescript // Enable auto reconnect with 5 second interval and retry for maximum of 20 times. ticker.autoReconnect(true, 20, 5); @@ -127,38 +137,37 @@ ticker.autoReconnect(true, -1, 5); Here is an example demonstrating auto reconnection. -```javascript -var KiteTicker = require("kiteconnect").KiteTicker; -var ticker = new KiteTicker({ +```typescript +import { KiteTicker } from "kiteconnect"; + +const apiKey = "your_api_key"; +const accessToken = "generated_access_token"; +const ticker = new KiteTicker({ api_key: "api_key", access_token: "access_token", }); - -// set autoreconnect with 10 maximum reconnections and 5 second interval ticker.autoReconnect(true, 10, 5); ticker.connect(); ticker.on("ticks", onTicks); ticker.on("connect", subscribe); - -ticker.on("noreconnect", function () { +ticker.on("noreconnect", () => { console.log("noreconnect"); }); - -ticker.on("reconnecting", function (reconnect_interval, reconnections) { +ticker.on("reconnect", (reconnect_count: any, reconnect_interval: any) => { console.log( "Reconnecting: attempt - ", - reconnections, - " innterval - ", + reconnect_count, + " interval - ", reconnect_interval ); }); -function onTicks(ticks) { +function onTicks(ticks: any[]) { console.log("Ticks", ticks); } function subscribe() { - var items = [738561]; + const items = [738561]; ticker.subscribe(items); ticker.setMode(ticker.modeFull, items); } @@ -173,8 +182,8 @@ npm run test ## Generate documentation ``` -$ npm install -g jsdoc -$ jsdoc -r ./lib -d ./docs +$ npm install typedoc --save-dev +$ npx typedoc --out ./docs ``` ## Changelog diff --git a/constants/index.ts b/constants/index.ts index 45b609a..744258a 100644 --- a/constants/index.ts +++ b/constants/index.ts @@ -17,6 +17,7 @@ export const ROUTES: { [key: string]: string } = { 'order.trades': '/orders/{order_id}/trades', 'order.margins': '/margins/orders', 'order.margins.basket': '/margins/basket', + "order.contract_note": "/charges/orders", 'portfolio.positions': '/portfolio/positions', 'portfolio.holdings': '/portfolio/holdings', diff --git a/examples/kiteconnect.ts b/examples/kiteconnect.ts new file mode 100644 index 0000000..6c6c384 --- /dev/null +++ b/examples/kiteconnect.ts @@ -0,0 +1,420 @@ +import { KiteConnect } from 'kiteconnect'; + +const apiKey = 'your_api_key'; +const apiSecret = 'your_api_secret'; +const requestToken = 'your_request_token'; + +const kc = new KiteConnect({ api_key: apiKey }); + +async function init() { + try { + await generateSession(); + await getProfile(); + await getMargins(); + await getMargins("equity"); + await getPositions(); + await convertPosition(); + await getHoldings(); + await getOrderHistory(240611801793632); + await getTrades(); + await getOrderTrades(240611801793632); + await getInstruments(); + await getInstrumentsNFO("NFO"); + await getQuote(['NSE:RELIANCE', 'NSE:SBIN', 'BSE:ONGC']); + await getOHLC(['NSE:RELIANCE', 'NSE:SBIN', 'BSE:ONGC']); + await getLTP(['NSE:RELIANCE', 'NSE:SBIN', 'BSE:ONGC']); + await getHistoricalData(16320514, "day", "2024-05-11 00:00:00", "2024-06-12 00:00:00", true, true); + await placeRegularOrder(); + await placeIcebergOrder(); + await modifyRegularOrder(240611801793632); + await cancelRegularOrder(240611801793632); + await getGTTs(); + await getGTT(216313963); + await placeGTT(); + await modifyGTT(219118727); + await deleteGTT(219118727); + await getOrderMargins(); + await getOrderBasketMargins(); + await getvirtualContractNote(); + } catch (err) { + console.error(err); + } +} + +async function generateSession() { + try { + const response = await kc.generateSession(requestToken, apiSecret); + kc.setAccessToken(response.access_token); + console.log('Session generated:', response); + } catch (err) { + console.error('Error generating session:', err); + } +} + +async function getProfile() { + try { + const profile = await kc.getProfile(); + console.log('Profile:', profile); + } catch (err) { + console.error('Error getting profile:', err); + } +} + +async function getMargins(segment?: 'equity' | 'commodity') { + try { + const margins = await kc.getMargins(segment); + console.log('Margins:', margins); + } catch (err) { + console.error('Error getting margins:', err); + } +} + +async function getPositions() { + try { + const positions = await kc.getPositions(); + console.log('Positions:', positions); + } catch (err) { + console.error('Error getting positions:', err); + } +} + +async function convertPosition() { + try { + const convertPosition = await kc.convertPosition({ + exchange: kc.EXCHANGE_NSE, + tradingsymbol: "SBIN", + transaction_type: "BUY", + position_type: "day", + quantity: 4, + old_product: "MIS", + new_product: "CNC" + }); + console.log('Convert Position:', convertPosition); + } catch (err) { + console.error('Error converting position:', err); + } +} + +async function getHoldings() { + try { + const holdings = await kc.getHoldings(); + console.log('Holdings:', holdings); + } catch (err) { + console.error('Error getting holdings:', err); + } +} + +async function getOrderHistory(orderId: number | string) { + try { + const orderHistory = await kc.getOrderHistory(orderId); + console.log('Order History:', orderHistory); + } catch (err) { + console.error('Error getting order history:', err); + } +} + +async function getTrades() { + try { + const trades = await kc.getTrades(); + console.log('Trades:', trades); + } catch (err) { + console.error('Error getting trades:', err); + } +} + +async function getOrderTrades(orderId: number | string) { + try { + const orderTrades = await kc.getOrderTrades(orderId); + console.log('Order Trades:', orderTrades); + } catch (err) { + console.error('Error getting order trades:', err); + } +} + +async function getInstruments() { + try { + const instruments = await kc.getInstruments(); + console.log('Instruments:', instruments); + } catch (err) { + console.error('Error getting instruments:', err); + } +} + +async function getInstrumentsNFO(segment: string) { + try { + const instruments = await kc.getInstruments(segment); + console.log('Instruments:', instruments); + } catch (err) { + console.error('Error getting instruments:', err); + } +} + +async function getQuote(instruments: string[]) { + try { + const quotes = await kc.getQuote(instruments); + console.log('Quotes:', quotes); + } catch (err) { + console.error('Error getting quotes:', err); + } +} + +async function getOHLC(instruments: string[]) { + try { + const ohlc = await kc.getOHLC(instruments); + console.log('OHLC:', ohlc); + } catch (err) { + console.error('Error getting OHLC:', err); + } +} + +async function getLTP(instruments: string[]) { + try { + const ltp = await kc.getLTP(instruments); + console.log('LTP:', ltp); + } catch (err) { + console.error('Error getting LTP:', err); + } +} + +async function getHistoricalData(instrumentToken: number, interval: string, from: string, to: string, continuous: boolean, oi: boolean) { + try { + const historicalData = await kc.getHistoricalData(instrumentToken, interval, from, to, continuous, oi); + console.log('Historical Data:', historicalData); + } catch (err) { + console.error('Error getting historical data:', err); + } +} + +async function placeRegularOrder() { + try { + const order = await kc.placeOrder(kc.VARIETY_REGULAR, { + exchange: kc.EXCHANGE_NSE, + tradingsymbol: "SBIN", + transaction_type: kc.TRANSACTION_TYPE_BUY, + quantity: 1, + product: kc.PRODUCT_CNC, + order_type: kc.ORDER_TYPE_LIMIT, + price: 830 + }); + console.log('Regular Order Placed:', order); + } catch (err) { + console.error('Error placing regular order:', err); + } +} + +async function placeIcebergOrder() { + try { + const order = await kc.placeOrder(kc.VARIETY_REGULAR, { + exchange: kc.EXCHANGE_NSE, + tradingsymbol: "SBIN", + transaction_type: "BUY", + quantity: 1000, + product: "CNC", + order_type: "LIMIT", + validity: "TTL", + price: 830, + validity_ttl: 10, + iceberg_legs: 5, + iceberg_quantity: 200 + }); + console.log('Iceberg Order Placed:', order); + } catch (err) { + console.error('Error placing iceberg order:', err); + } +} + +async function modifyRegularOrder(orderId: number) { + try { + const order = await kc.modifyOrder(kc.VARIETY_REGULAR, orderId, { + price: 818 + }); + console.log('Regular Order Modified:', order); + } catch (err) { + console.error('Error modifying regular order:', err); + } +} + +async function cancelRegularOrder(orderId: number) { + try { + const order = await kc.cancelOrder(kc.VARIETY_REGULAR, orderId); + console.log('Regular Order Cancelled:', order); + } catch (err) { + console.error('Error cancelling regular order:', err); + } +} + +async function getGTTs() { + try { + const gtts = await kc.getGTTs(); + console.log('GTTs:', gtts); + } catch (err) { + console.error('Error getting GTTs:', err); + } +} + +async function getGTT(gttId: number) { + try { + const gtt = await kc.getGTT(gttId); + console.log('GTT:', gtt); + } catch (err) { + console.error('Error getting GTT:', err); + } +} + +async function placeGTT() { + try { + const gtt = await kc.placeGTT({ + trigger_type: kc.GTT_TYPE_OCO, + tradingsymbol: "SBIN", + exchange: "NSE", + trigger_values: [800, 840], + last_price: 835, + orders: [{ + transaction_type: kc.TRANSACTION_TYPE_SELL, + quantity: 1, + product: kc.PRODUCT_CNC, + order_type: kc.ORDER_TYPE_LIMIT, + price: 840 + }, { + transaction_type: kc.TRANSACTION_TYPE_SELL, + quantity: 1, + product: kc.PRODUCT_CNC, + order_type: kc.ORDER_TYPE_LIMIT, + price: 800 + }] + }); + console.log('GTT Placed:', gtt); + } catch (err) { + console.error('Error placing GTT:', err); + } +} + +async function modifyGTT(gttId: number) { + try { + const gtt = await kc.modifyGTT(gttId, { + trigger_type: kc.GTT_TYPE_OCO, + tradingsymbol: "SBIN", + exchange: "NSE", + trigger_values: [800, 860], + last_price: 837, + orders: [{ + transaction_type: kc.TRANSACTION_TYPE_SELL, + quantity: 1, + product: kc.PRODUCT_CNC, + order_type: kc.ORDER_TYPE_LIMIT, + price: 860 + }, { + transaction_type: kc.TRANSACTION_TYPE_SELL, + quantity: 1, + product: kc.PRODUCT_CNC, + order_type: kc.ORDER_TYPE_LIMIT, + price: 800 + }] + }); + console.log('GTT Modified:', gtt); + } catch (err) { + console.error('Error modifying GTT:', err); + } +} + +async function deleteGTT(gttId: number) { + try { + const gtt = await kc.deleteGTT(gttId); + console.log('GTT Deleted:', gtt); + } catch (err) { + console.error('Error deleting GTT:', err); + } +} + +async function getOrderMargins() { + try { + const margins = await kc.orderMargins([{ + exchange: "NFO", + tradingsymbol: "NIFTY24JUL23000CE", + transaction_type: "BUY", + variety: "regular", + product: "MIS", + order_type: "MARKET", + quantity: 75, + price: 0, + trigger_price: 0 + }, + { + exchange: "NFO", + tradingsymbol: "NIFTY24JUL25000CE", + transaction_type: "SELL", + variety: "regular", + product: "MIS", + order_type: "MARKET", + quantity: 150, + price: 0, + trigger_price: 0 + }], "compact"); + console.log('Order Margins:', margins); + } catch (err) { + console.error('Error getting order margins:', err); + } +} + +async function getOrderBasketMargins() { + try { + const basketMargins = await kc.orderBasketMargins([{ + exchange: "NFO", + tradingsymbol: "NIFTY24JUL23000CE", + transaction_type: "BUY", + variety: "regular", + product: "MIS", + order_type: "MARKET", + quantity: 75, + price: 0, + trigger_price: 0 + }, + { + exchange: "NFO", + tradingsymbol: "NIFTY24JUL25000CE", + transaction_type: "SELL", + variety: "regular", + product: "MIS", + order_type: "MARKET", + quantity: 150, + price: 0, + trigger_price: 0 + }], true, "compact"); + console.log('Order Basket Margins:', basketMargins); + } catch (err) { + console.error('Error getting order basket margins:', err); + } +} + +async function getvirtualContractNote() { + try { + const getvirtualContractNote = await kc.getvirtualContractNote([{ + order_id: '111111111', + exchange: "NFO", + tradingsymbol: "NIFTY24JUL23000CE", + transaction_type: "BUY", + variety: "regular", + product: "MIS", + order_type: "MARKET", + quantity: 75, + average_price: 560 + }, + { + order_id: '22222222', + exchange: "NFO", + tradingsymbol: "NIFTY24JUL25000CE", + transaction_type: "SELL", + variety: "regular", + product: "MIS", + order_type: "MARKET", + quantity: 150, + average_price: 600 + }]); + console.log('Virtual contract Note:', getvirtualContractNote); + } catch (err) { + console.error('Error getting virtual contract note:', err); + } +} + +// Initialize the API calls +init(); diff --git a/examples/kiteticker.ts b/examples/kiteticker.ts new file mode 100644 index 0000000..7481dee --- /dev/null +++ b/examples/kiteticker.ts @@ -0,0 +1,43 @@ +import { KiteTicker } from "kiteconnect"; + +const apiKey = 'your_api_key'; +const accessToken = 'generated_access_token'; + +const ticker = new KiteTicker({ + api_key: apiKey, + access_token: accessToken +}); + +ticker.connect(); +ticker.on('ticks', onTicks); +ticker.on('connect', subscribe); +ticker.on('disconnect', onDisconnect); +ticker.on('error', onError); +ticker.on('close', onClose); +ticker.on('order_update', onTrade); + +function onTicks(ticks: any[]): void { + console.log("Ticks", ticks); +} + +function subscribe(): void { + const tokens = [738561, 256265]; + ticker.subscribe(tokens); + ticker.setMode(ticker.modeFull, tokens); +} + +function onDisconnect(error: Error): void { + console.log("Closed connection on disconnect", error); +} + +function onError(error: Error): void { + console.log("Closed connection on error", error); +} + +function onClose(reason: string): void { + console.log("Closed connection on close", reason); +} + +function onTrade(order: any): void { + console.log("Order update", order); +} diff --git a/interfaces/any-object.ts b/interfaces/any-object.ts index 44b61c5..e79f4b8 100644 --- a/interfaces/any-object.ts +++ b/interfaces/any-object.ts @@ -1,15 +1,10 @@ /** - * - * @date 07/06/2023 - 21:38:08 + * Represents an object with string keys and values of any type. * - * @export - * @interface AnyObject - * @typedef {AnyObject} + * @public + * @interface + * @name AnyObject */ -export interface AnyObject { - /** - * - * @date 07/06/2023 - 21:38:08 - */ + export interface AnyObject { [key: string]: any; -} \ No newline at end of file +} diff --git a/interfaces/connect.ts b/interfaces/connect.ts index 5b110e1..bf6f10b 100644 --- a/interfaces/connect.ts +++ b/interfaces/connect.ts @@ -1,42 +1,30 @@ /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum ProductTypes { PRODUCT_MIS = 'MIS', PRODUCT_CNC = 'CNC', - PRODUCT_CO = 'CO', - PRODUCT_NRML = 'NRML', - PRODUCT_BO = 'BO', + PRODUCT_NRML = 'NRML' }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum Varieties { VARIETY_AMO = 'amo', VARIETY_AUCTION = 'auction', - VARIETY_BO = 'bo', - VARIETY_ICEBERG = 'ice', + VARIETY_ICEBERG = 'iceberg', VARIETY_REGULAR = 'regular', VARIETY_CO = 'co', TEST = 'test' }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum ValidityTypes { VALIDITY_DAY = 'DAY', @@ -45,11 +33,8 @@ export enum ValidityTypes { } /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum MarginTypes { MARGIN_EQUITY = 'equity', @@ -57,24 +42,19 @@ export enum MarginTypes { } /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum StatusTypes { STATUS_CANCELLED = 'CANCELLED', STATUS_REJECTED = 'REJECTED', STATUS_COMPLETE = 'COMPLETE', + STATUS_UPDATE = 'UPDATE' } /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum GTTStatusTypes { GTT_TYPE_OCO = 'two-leg', @@ -89,11 +69,8 @@ export enum GTTStatusTypes { } /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum PositionTypes { POSITION_TYPE_DAY = 'day', @@ -101,12 +78,10 @@ export enum PositionTypes { } /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @interface KiteConnectParams - * @typedef {KiteConnectParams} + * @remarks + * This interface defines the parameters needed to authenticate and interact with the Kite Connect API. + * @public + * @name KiteConnectParams */ export interface KiteConnectParams { /** @@ -126,13 +101,13 @@ export interface KiteConnectParams { * API end point root. Unless you explicitly want to send API requests to a * non-default endpoint, this can be ignored. * - * Defaults to 'https?://api.kite.trade' + * Defaults to 'https://api.kite.trade' */ root?: string; /** * Kite connect login url * - * Defaults to 'https?://kite.trade/connect/login' + * Defaults to 'https://kite.zerodha.com/connect/login' */ login_uri?: string; /** @@ -147,54 +122,34 @@ export interface KiteConnectParams { * Defaults to `7000` */ timeout?: number; - /* - * Default url for which user will be redirected to login page - * defa - */ - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?string} - */ - default_login_uri?: string; }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @interface KiteConectInterface - * @typedef {KiteConectInterface} - * @extends {KiteConnectParams} + * @public + * @name KiteConnectInterface */ -export interface KiteConectInterface extends KiteConnectParams { +export interface KiteConnectInterface extends KiteConnectParams { }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ -export enum ExchangeTypes { +export enum Exchanges { NSE = 'NSE', - BSE = 'BPSE', + BSE = 'BSE', NFO = 'NFO', BFO = 'BFO', CDS = 'CDS', - MCX = 'MCX' + MCX = 'MCX', + BCD = 'BCD', + NSEIX = 'NSEIX' }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum TransactionTypes { BUY = 'BUY', @@ -202,11 +157,8 @@ export enum TransactionTypes { }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum Products { NRML = 'NRML', @@ -215,11 +167,8 @@ export enum Products { }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum OrderTypes { LIMIT = 'LIMIT', @@ -229,575 +178,292 @@ export enum OrderTypes { }; /** - * - * @date 07/06/2023 - 21:38:13 - * - * @export - * @enum {number} + * @public + * @enum {string} */ export enum Validities { DAY = 'DAY', IOC = 'IOC', + TTL = 'TTL' }; /** - * - * @date 07/06/2023 - 21:38:13 + * Represents parameters for cancelling an order. * - * @export - * @interface OrderParams - * @typedef {OrderParams} - */ -export interface OrderParams { - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?string} - */ - exchange?: string; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?string} - */ - tradingsymbol?: string; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?TransactionTypes} - */ - transaction_type?: TransactionTypes; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - quantity?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?Products} - */ - product?: Products; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {OrderTypes} - */ - order_type: OrderTypes; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?Validities} - */ - validity?: Validities; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - price?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - disclosed_quantity?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - trigger_price?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - squareoff?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - stoploss?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - traling_stoploss?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - validity_ttl?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - iceberg_legs?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - iceberg_quantity?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?number} - */ - auction_number?: number; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?string} - */ - tag?: string; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?string} - */ - variety?: string; - /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {?(string | number)} - */ - order_id?: string | number; -}; - -/** - * - * @date 07/06/2023 - 21:38:13 + * @remarks + * This interface defines the parameters required to cancel an order. * - * @export - * @interface CancelOrderParams - * @typedef {CancelOrderParams} + * @public + * @name CancelOrderParams */ export interface CancelOrderParams { /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {?(string | number)} */ parent_order_id?: string | number; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {?string} */ variety?: string; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {?(string | number)} */ order_id?: string | number; }; /** - * - * @date 07/06/2023 - 21:38:13 + * Represents parameters for exiting an order. + * + * @remarks + * This interface defines the parameters required to exit an existing order. * - * @export - * @interface ExitOrderParams - * @typedef {ExitOrderParams} + * @public + * @name ExitOrderParams */ export interface ExitOrderParams { /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {?(string | number)} */ parent_order_id?: string | number; } /** - * - * @date 07/06/2023 - 21:38:13 + * Represents parameters for converting a position. * - * @export - * @interface ConvertPositionParams - * @typedef {ConvertPositionParams} + * @remarks + * This interface defines the parameters required to convert a position from one product type to another. + * + * @public + * @name ConvertPositionParams */ export interface ConvertPositionParams { /** - * - * @date 07/06/2023 - 21:38:13 - * - * @type {string} + * @type {Exchanges} */ - exchange: string; + exchange: Exchanges; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {string} */ tradingsymbol: string; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {TransactionTypes} */ transaction_type: TransactionTypes; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {PositionTypes} */ position_type: PositionTypes; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {(string | number)} */ quantity: string | number; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {Products} */ old_product: Products; /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {Products} */ new_product: Products; } /** - * - * @date 07/06/2023 - 21:38:13 + * @remarks + * Represents an order. * - * @export - * @interface Order - * @typedef {Order} + * @public + * @name Order */ export interface Order { /** - * - * @date 07/06/2023 - 21:38:13 - * * @type {?TransactionTypes} */ transaction_type?: TransactionTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ quantity?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?Products} */ product?: Products; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?OrderTypes} */ order_type?: OrderTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {?ExchangeTypes} + * @type {?Exchanges} */ - exchange?: ExchangeTypes; + exchange?: Exchanges; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ tradingsymbol?: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?Varieties} */ variety?: Varieties; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(number | string)} */ price?: number | string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?number} */ trigger_price?: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?PositionTypes} */ position_type?: PositionTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?Products} */ old_product?: Products; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?Products} */ new_product?: Products; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ amount?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ tag?: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ instalments?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ frequency?: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ initial_amount?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ instalment_day?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ status?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ sip_id?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(GTTStatusTypes.GTT_TYPE_OCO | GTTStatusTypes.GTT_TYPE_SINGLE)} */ trigger_type?: GTTStatusTypes.GTT_TYPE_OCO | GTTStatusTypes.GTT_TYPE_SINGLE; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?any[]} */ trigger_values?: any[]; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ last_price?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?Order[]} */ orders?: Order[]; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ order_id?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ parent_order_id?: string | number; + /** + * @type {number} + */ + average_price?: number; } /** - * - * @date 07/06/2023 - 21:38:12 + * Represents parameters for fetching historical data. * - * @export - * @interface getHistoricalDataParms - * @typedef {getHistoricalDataParms} + * @remarks + * This interface defines the parameters required to retrieve historical data. + * + * @public + * @name getHistoricalDataParams */ export interface getHistoricalDataParms { /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {string} */ instrument_token: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {string} */ interval: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {(string | Date)} */ from_date: string | Date; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {(string | Date)} */ to_date: string | Date; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?boolean} */ continuous?: boolean; + /** + * @type {?boolean} + */ + oi?: boolean; }; /** - * - * @date 07/06/2023 - 21:38:12 + * Represents parameters for modifying a GTT (Good 'Til Triggered) order. * - * @export - * @interface ModifyGTTParams - * @typedef {ModifyGTTParams} + * @public + * @name ModifyGTTParams */ export interface ModifyGTTParams { /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {(GTTStatusTypes.GTT_TYPE_SINGLE | GTTStatusTypes.GTT_TYPE_OCO)} */ trigger_type: GTTStatusTypes.GTT_TYPE_SINGLE | GTTStatusTypes.GTT_TYPE_OCO; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {string} */ tradingsymbol: string; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {ExchangeTypes} + * @type {Exchanges} */ - exchange: ExchangeTypes; + exchange: Exchanges; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {Array} */ trigger_values: Array; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {number} */ last_price: number; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {{ - transaction_type: string - quantity: number; - product: Products; - order_type: OrderTypes; - price: number; - }[]} + * Represents an array of orders. + * @type {Array<{ + * exchange: string; + * tradingsymbol: string; + * transaction_type: string; + * quantity: number; + * product: Products; + * order_type: OrderTypes; + * price: number; + * }>} */ orders: { - transaction_type: string + exchange: string; + tradingsymbol: string; + transaction_type: string; quantity: number; product: Products; order_type: OrderTypes; @@ -806,295 +472,203 @@ export interface ModifyGTTParams { }; /** - * - * @date 07/06/2023 - 21:38:12 + * Represents parameters for modifying an MFSIP (Mutual Fund SIP). + * + * @remarks + * This interface defines the parameters required to modify an existing Mutual Fund SIP. * - * @export - * @interface ModifyMFSIPParams - * @typedef {ModifyMFSIPParams} + * @public + * @name ModifyMFSIPParams */ export interface ModifyMFSIPParams { /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ instalments?: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ frequency?: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ instalment_day?: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ status?: string; } /** - * - * @date 07/06/2023 - 21:38:12 + * Represents parameters for modifying an order. + * + * @remarks + * This interface defines the parameters required to modify an existing order. * - * @export - * @interface ModifyOrderParams - * @typedef {ModifyOrderParams} + * @public + * @name ModifyOrderParams */ export interface ModifyOrderParams { /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?number} */ quantity?: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?number} */ price?: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?OrderTypes} */ order_type?: OrderTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?Validities} */ validity?: Validities; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?number} */ disclosed_quantity?: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?number} */ trigger_price?: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ parent_order_id?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ variety?: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ order_id?: string | number; }; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @export - * @interface OrderMarginOrder - * @typedef {OrderMarginOrder} + * Represents parameters for placing an order based on margin. + * @remarks + * Represents interface for placing an order based on margin. + * @public + * @name OrderMarginOrder */ export interface OrderMarginOrder { /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {string} */ exchange: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {string} */ tradingsymbol: string; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {TransactionTypes} */ transaction_type: TransactionTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {Varieties} */ variety: Varieties; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {ProductTypes} */ product: ProductTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {OrderTypes} */ order_type: OrderTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {number} */ quantity: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {number} */ price: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {number} */ trigger_price: number; }; /** - * - * @date 07/06/2023 - 21:38:12 + * Represents parameters for placing a mutual fund order. * - * @export - * @interface PlaceMFOrderParams - * @typedef {PlaceMFOrderParams} + * @remarks + * This interface defines the parameters required to place a mutual fund order. + * + * @public + * @name PlaceMFOrderParams */ export interface PlaceMFOrderParams { /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {string} */ tradingsymbol: string /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {TransactionTypes} */ transaction_type: TransactionTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ quantity?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?(string | number)} */ amount?: string | number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ tag?: string; } /** - * - * @date 07/06/2023 - 21:38:12 + * Represents parameters for placing a Good Till Trigger (GTT) order. + * + * @remarks + * This interface defines the parameters required to place a Good Till Trigger (GTT) order. * - * @export - * @interface PlaceGTTParams - * @typedef {PlaceGTTParams} + * @public + * @name PlaceGTTParams */ export interface PlaceGTTParams { /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {(GTTStatusTypes.GTT_TYPE_OCO | GTTStatusTypes.GTT_TYPE_SINGLE)} */ trigger_type: GTTStatusTypes.GTT_TYPE_OCO | GTTStatusTypes.GTT_TYPE_SINGLE; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {string} */ tradingsymbol: string; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {ExchangeTypes} + * @type {Exchanges} */ - exchange: ExchangeTypes; + exchange: Exchanges; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {Array} */ trigger_values: Array; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {number} */ last_price: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {{ - transaction_type: TransactionTypes; - quantity: number; - product: Products; - order_type: OrderTypes; - price: number - }[]} + * exchange: string; + * tradingsymbol: string; + * transaction_type: TransactionTypes; + * quantity: number; + * product: Products; + * order_type: OrderTypes; + * price: number; + * }[]} */ orders: { + exchange: string; + tradingsymbol: string; transaction_type: TransactionTypes; quantity: number; product: Products; @@ -1104,75 +678,152 @@ export interface PlaceGTTParams { }; /** - * - * @date 07/06/2023 - 21:38:12 + * Represents parameters for placing an order. * - * @export - * @interface PlaceOrderParams - * @typedef {PlaceOrderParams} + * @remarks + * This interface defines the parameters required to place an order. + * + * @public + * @name PlaceOrderParams */ export interface PlaceOrderParams { /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {string} + * @type {?string} */ - tradingsymbol: string; + variety?: Varieties; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {?Varieties} + * @type {string} */ - variety?: Varieties; + tradingsymbol: string; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {?ExchangeTypes} + * @type {Exchanges} */ - exchange?: ExchangeTypes; + exchange: Exchanges; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {TransactionTypes} */ transaction_type: TransactionTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {?OrderTypes} + * @type {OrderTypes} */ - order_type?: OrderTypes; + order_type: OrderTypes; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {?Products} + * @type {Products} */ - product?: Products; + product: Products; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {?(string | number)} + * @type {number} */ - quantity?: string | number; + quantity: number; /** - * - * @date 07/06/2023 - 21:38:12 - * - * @type {?(string | number)} + * @type {Validities} */ - amount?: string | number; + validity?: Validities; + /** + * @type {?number} + */ + price?: number; /** - * - * @date 07/06/2023 - 21:38:12 - * * @type {?string} */ tag?: string; -}; \ No newline at end of file +}; + + +/** + * Represents parameters for order margin. + * + * @remarks + * This interface defines the order parameters required to fetch order margins. + * + * @public + * @name MarginOrder + */ + +export type MarginOrder = { + /** + * Name of the exchange(eg. NSE, BSE, NFO, CDS, MCX) + */ + exchange: Exchanges; + /** + * Trading symbol of the instrument + */ + tradingsymbol: string; + /** + * eg. BUY, SELL + */ + transaction_type: TransactionTypes; + /** + * Order variety (regular, amo, bo, co etc.) + */ + variety: Varieties; + /** + * Margin product to use for the order + */ + product: Products; + /** + * Order type (MARKET, LIMIT etc.) + */ + order_type: OrderTypes; + /** + * Quantity of the order + */ + quantity: number; + /** + * Price at which the order is going to be placed (LIMIT orders) + */ + price: number; + /** + * Trigger price (for SL, SL-M, CO orders) + */ + trigger_price: number; + }; + +/** + * Represents parameters for virtual contract margin. + * + * @remarks + * This interface defines the order parameters required to fetch virtual contract margin. + * + * @public + * @name VirtualContractParam + */ + + export type VirtualContractParam = { + /** + * Unique order ID (It can be any random string to calculate charges for an imaginary order) + */ + order_id: number | string; + /** + * Name of the exchange(eg. NSE, BSE, NFO, CDS, MCX) + */ + exchange: Exchanges; + /** + * Trading symbol of the instrument + */ + tradingsymbol: string; + /** + * eg. BUY, SELL + */ + transaction_type: TransactionTypes; + /** + * Order variety (regular, amo, bo, co etc.) + */ + variety: Varieties; + /** + * Margin product to use for the order + */ + product: Products; + /** + * Order type (MARKET, LIMIT etc.) + */ + order_type: OrderTypes; + /** + * Quantity of the order + */ + quantity: number; + /** + * Average price at which the order was executed (Note: Should be non-zero). + */ + average_price: number; + }; \ No newline at end of file diff --git a/interfaces/ticker.ts b/interfaces/ticker.ts index e3f2a73..029ca83 100644 --- a/interfaces/ticker.ts +++ b/interfaces/ticker.ts @@ -1,65 +1,138 @@ /** - * - * @date 07/06/2023 - 21:38:22 + * Represents parameters for the Kite Ticker. * - * @export - * @interface KiteTickerParams - * @typedef {KiteTickerParams} + * @remarks + * This interface defines the parameters required to initialize the Kite Ticker. + * + * @public + * @name KiteTickerParams */ export interface KiteTickerParams { /** - * - * @date 07/06/2023 - 21:38:22 - * - * @type {?string} + * @type {string} */ - api_key?: string; + api_key: string; /** - * - * @date 07/06/2023 - 21:38:22 - * - * @type {?string} + * @type {string} */ - access_token?: string; + access_token: string; /** - * - * @date 07/06/2023 - 21:38:22 - * * @type {?boolean} */ reconnect?: boolean; /** - * - * @date 07/06/2023 - 21:38:22 - * * @type {?number} */ max_retry?: number; /** - * - * @date 07/06/2023 - 21:38:22 - * * @type {?number} */ max_delay?: number; /** - * - * @date 07/06/2023 - 21:38:22 - * - * @type {string} + * @type {?string} */ - root: string; + root?: string; } /** - * - * @date 07/06/2023 - 21:38:22 + * Represents the interface for KiteTicker. + * + * @remarks + * This interface extends the KiteTickerParams interface, adding additional functionality and properties specific to KiteTicker. * - * @export - * @interface KiteTickerInterface - * @typedef {KiteTickerInterface} - * @extends {KiteTickerParams} + * @public + * @name KiteTickerInterface */ export interface KiteTickerInterface extends KiteTickerParams { -} \ No newline at end of file +} + + +/** + * + * @remarks + * This interface defines the structure of a tick response + * + * @public + * @name BaseTick + */ +export interface BaseTick { + tradable: boolean; + mode: string; + instrument_token: number; + last_price: number; +} + +/** + * + * @remarks + * This interface defines the structure of a tick response in the LTP mode. + * + * @public + * @name LTPTick + */ +export interface LTPTick extends BaseTick { + mode: string; +} + +/** + * + * @remarks + * This interface defines the structure of a tick response in the Quote mode. + * + * @public + * @name QuoteTick + */ +export interface QuoteTick extends BaseTick { + mode: string; + ohlc: { + high: number; + low: number; + open: number; + close: number; + }; + change: number; + exchange_timestamp?: Date | null; +} + +/** + * + * @remarks + * This interface defines the structure of a tick response in the Full mode. + * + * @public + * @name FullTick + */ +export interface FullTick extends BaseTick { + mode: string; + last_traded_quantity: number; + average_traded_price: number; + volume_traded: number; + total_buy_quantity: number; + total_sell_quantity: number; + ohlc: { + high: number; + low: number; + open: number; + close: number; + }; + change: number; + exchange_timestamp?: Date | null; + last_trade_time?: Date | null; + oi?: number; + oi_day_high?: number; + oi_day_low?: number; + depth?: { + buy: Depth[]; + sell: Depth[]; + }; +} + +export interface Depth { + quantity: number; + price: number; + orders: number; +} + +// Combined type for all tick modes +export type Tick = LTPTick | QuoteTick | FullTick; diff --git a/lib/connect.ts b/lib/connect.ts index 0edb1a2..356ce35 100644 --- a/lib/connect.ts +++ b/lib/connect.ts @@ -3,9 +3,9 @@ import axios, { AxiosInstance, AxiosRequestConfig, AxiosTransformer, Method } from 'axios'; import csvParse from 'papaparse'; import sha256 from 'crypto-js/sha256'; -import querystring from 'querystring'; +import qs from 'qs'; import utils from './utils'; -import { KiteConnectParams, Varieties, GTTStatusTypes, AnyObject, Order, TransactionTypes, KiteConectInterface, CancelOrderParams, ExitOrderParams, ModifyGTTParams, ModifyOrderParams, PlaceGTTParams, PlaceMFOrderParams, PlaceOrderParams } from '../interfaces'; +import { KiteConnectParams, Varieties, GTTStatusTypes, AnyObject, Order, MarginOrder, VirtualContractParam, TransactionTypes, KiteConnectInterface, CancelOrderParams, ExitOrderParams, ModifyGTTParams, ModifyOrderParams, PlaceGTTParams, PlaceMFOrderParams, PlaceOrderParams, ConvertPositionParams, Exchanges } from '../interfaces'; import { DEFAULTS, ROUTES } from '../constants'; @@ -20,43 +20,56 @@ import { DEFAULTS, ROUTES } from '../constants'; * ------------------------ * ~~~~ * - * const KiteConnect = require('kiteconnect').KiteConnect; - * - * const kc = new KiteConnect({api_key: 'your_api_key'}); - * - * kc.generateSession('request_token', 'api_secret') - * .then(function(response) { - * init(); - * }) - * .catch(function(err) { - * console.log(err); - * }) - * - * function init() { - * // Fetch equity margins. - * // You can have other api calls here. - * - * kc.getMargins() - * .then(function(response) { - * // You got user's margin details. - * }).catch(function(err) { - * // Something went wrong. - * }); - * } + * import { KiteConnect } from 'kiteconnect'; + * + * const apiKey = 'your_api_key' + * const apiSecret = 'your_api_secret' + * const requestToken = 'your_request_token' + * + * const kc = new KiteConnect({ api_key: apiKey }) + * + * async function init() { + * try { + * await generateSession() + * await getProfile() + * } catch (err) { + * console.error(err) + * } + * } + * + * async function generateSession() { + * try { + * const response = await kc.generateSession(requestToken, apiSecret) + * kc.setAccessToken(response.access_token) + * console.log('Session generated:', response) + * } catch (err) { + * console.error('Error generating session:', err) + * } + * } + * + * async function getProfile() { + * try { + * const profile = await kc.getProfile() + * console.log('Profile:', profile) + * } catch (err) { + * console.error('Error getting profile:', err) + * } + * } + * // Initialize the API calls + * init(); * ~~~~ * * API promises * ------------- - * All API calls returns a promise which you can use to call methods like `.then(...)` and `.catch(...)`. - * + * All API calls return a promise which you can `await` to handle asynchronously. + * * ~~~~ - * kiteConnectApiCall - * .then(function(v) { - * // On success - * }) - * .catch(function(e) { - * // On rejected - * }); + * try { + * const result = await kiteConnectApiCall; + * // On success + * } catch (error) { + * // On rejection + * } * ~~~~ * * @constructor @@ -76,92 +89,117 @@ import { DEFAULTS, ROUTES } from '../constants'; * for a request to complete before it fails. * * @example Initialize KiteConnect object - * const kc = KiteConnect('my_api_key', {timeout: 10, debug: false}) + * const kc = new KiteConnect({ api_key: apiKey }) */ - - -class KiteConnect implements KiteConectInterface { +export class KiteConnect implements KiteConnectInterface { /** - * - * @date 07/06/2023 - 21:37:49 - * * @type {string} */ api_key: string; /** - * - * @date 07/06/2023 - 21:37:49 - * * @type {?(string | null)} */ access_token?: string | null; /** - * - * @date 07/06/2023 - 21:37:49 - * * @type {?string} */ root?: string; /** - * - * @date 07/06/2023 - 21:37:49 - * * @type {?string} */ login_uri?: string; /** - * - * @date 07/06/2023 - 21:37:49 - * * @type {?boolean} */ debug?: boolean; /** - * - * @date 07/06/2023 - 21:37:49 - * * @type {?number} */ timeout?: number; /** - * - * @date 07/06/2023 - 21:37:49 - * - * @type {?string} - */ - default_connect_uri?: string; - /** - * - * @date 07/06/2023 - 21:37:49 - * - * @type {?(string | null)} + * @type {?(function | null)} */ - session_expiry_hook?: string | null; + session_expiry_hook?: (() => void) | null; /** - * - * @date 07/06/2023 - 21:37:49 - * * @type {?string} */ default_login_uri?: string; /** - * - * @date 07/06/2023 - 21:37:49 - * * @private * @type {AxiosInstance} */ private requestInstance: AxiosInstance; + // Constants + readonly PRODUCT_MIS: string = 'MIS'; + readonly PRODUCT_CNC: string = 'CNC'; + readonly PRODUCT_NRML: string = 'NRML'; + + // Order types + readonly ORDER_TYPE_MARKET: string = 'MARKET'; + readonly ORDER_TYPE_LIMIT: string = 'LIMIT'; + readonly ORDER_TYPE_SLM: string = 'SL-M'; + readonly ORDER_TYPE_SL: string ='SL'; + + // Varieties + readonly VARIETY_REGULAR: string = 'regular'; + readonly VARIETY_CO: string = 'co'; + readonly VARIETY_AMO: string = 'amo'; + readonly VARIETY_ICEBERG: string = 'iceberg'; + readonly VARIETY_AUCTION: string = 'auction'; + + // Transaction types + readonly TRANSACTION_TYPE_BUY: string = 'BUY'; + readonly TRANSACTION_TYPE_SELL: string = 'SELL'; + + // Validities + readonly VALIDITY_DAY: string = 'DAY'; + readonly VALIDITY_IOC: string = 'IOC'; + readonly VALIDITY_TTL: string = 'TTL'; + + // Exchanges + readonly EXCHANGE_NSE: string = 'NSE'; + readonly EXCHANGE_BSE: string = 'BSE'; + readonly EXCHANGE_NFO: string = 'NFO'; + readonly EXCHANGE_CDS: string = 'CDS'; + readonly EXCHANGE_BCD: string = 'BCD'; + readonly EXCHANGE_BFO: string = 'BFO'; + readonly EXCHANGE_MCX: string = 'MCX'; + + // Margins segments + readonly MARGIN_EQUITY: string = 'equity'; + readonly MARGIN_COMMODITY: string = 'commodity'; + + // Statuses + readonly STATUS_CANCELLED: string = 'CANCELLED'; + readonly STATUS_REJECTED: string = 'REJECTED'; + readonly STATUS_COMPLETE: string = 'COMPLETE'; + + // GTT types + readonly GTT_TYPE_OCO: string = 'two-leg'; + readonly GTT_TYPE_SINGLE: string = 'single'; + + // GTT statuses + readonly GTT_STATUS_ACTIVE: string = 'active'; + readonly GTT_STATUS_TRIGGERED: string = 'triggered'; + readonly GTT_STATUS_DISABLED: string = 'disabled'; + readonly GTT_STATUS_EXPIRED: string = 'expired'; + readonly GTT_STATUS_CANCELLED: string = 'cancelled'; + readonly GTT_STATUS_REJECTED: string = 'rejected'; + readonly GTT_STATUS_DELETED: string = 'deleted'; + + // Position types + readonly POSITION_TYPE_DAY: string = 'day'; + readonly POSITION_TYPE_OVERNIGHT: string = 'overnight'; + /** * Creates an instance of KiteConnect. - * @date 07/06/2023 - 21:37:49 * * @constructor - * @param {KiteConnectParams} params + * @param {KiteConnectParams} params - The configuration parameters for initializing the instance. */ constructor(params: KiteConnectParams) { this.api_key = params.api_key; @@ -169,17 +207,16 @@ class KiteConnect implements KiteConectInterface { this.timeout = params.timeout || DEFAULTS.timeout; this.debug = params.debug || DEFAULTS.debug; this.access_token = params.access_token || null; - this.default_connect_uri = DEFAULTS.login; + this.default_login_uri = DEFAULTS.login; this.session_expiry_hook = null; this.requestInstance = this.createAxiosInstance(); } /** - * - * @date 07/06/2023 - 21:37:49 + * Creates a custom Axios instance with the provided configuration. * * @private - * @returns {*} + * @returns {AxiosInstance} Custom Axios instance */ private createAxiosInstance() { const kiteVersion = 3; // Kite version to send in header @@ -192,7 +229,18 @@ class KiteConnect implements KiteConectInterface { 'User-Agent': userAgent }, paramsSerializer(params) { - return querystring.stringify(params); + const searchParams = new URLSearchParams(); + for (const key in params) { + if (params.hasOwnProperty(key)) { + const value = params[key]; + if (Array.isArray(value)) { + value.forEach(val => searchParams.append(key, val)); + } else { + searchParams.append(key, value); + } + } + } + return searchParams.toString(); } }); @@ -222,7 +270,7 @@ class KiteConnect implements KiteConectInterface { 'message': 'Unknown content type (' + contentType + ') with response: (' + response.data + ')' }; } - }, function (error) { + }, (error) => { let resp = { 'message': 'Unknown error', 'error_type': 'GeneralException', @@ -234,7 +282,7 @@ class KiteConnect implements KiteConectInterface { // that falls out of the range of 2xx if (error.response.data && error.response.data.error_type) { if (error.response.data.error_type === 'TokenException' && this.session_expiry_hook) { - this.session_expiry_hook() + this.session_expiry_hook(); } resp = error.response.data; @@ -258,49 +306,51 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:49 + * Sets the access token for the API client. * - * @param {string} accessToken + * @param accessToken The access token to set. + * @returns {void} */ - setAccessToken(accessToken: string) { + setAccessToken(accessToken: string): void { this.access_token = accessToken; } /** + * Sets a callback function to be invoked when the session expires. * - * @date 07/06/2023 - 21:37:49 - * - * @param {Function} cb + * @param cb - The callback function to set as the session expiry hook. + * @returns void */ setSessionExpiryHook = function (cb: Function) { this.session_expiry_hook = cb; }; /** - * - * @date 07/06/2023 - 21:37:49 + * Returns the login URL with the embedded API key. * - * @returns {string} + * @remarks + * This method constructs and returns the login URL with the embedded API key. + * + * @returns The login URL with the embedded API key. */ getLoginURL() { return `${this.default_login_uri}?api_key=${this.api_key}&v=3`; - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Generates a session using the provided request token and API secret. * - * @param {string} request_token - * @param {string} api_secret - * @returns {*} + * @remarks + * This method generates a session by sending a request to the API with the provided request token and API secret. + * Upon successful completion, the method resolves with the session details, including the access token. If an error occurs, + * the method rejects with an error. + * + * @param {string} request_token - The request token obtained during the login flow. + * @param {string} api_secret - The API secret associated with the user's account. + * @returns {Promise} A promise that resolves when the session generation is successful and rejects if an error occurs. */ - generateSession(request_token: string, api_secret: string) { - return new Promise(function (resolve, reject) { + generateSession(request_token: string, api_secret: string): Promise { + return new Promise((resolve, reject) => { const checksum = sha256(this.api_key + request_token + api_secret).toString(); const p = this._post('api.token', { api_key: this.api_key, @@ -308,7 +358,7 @@ class KiteConnect implements KiteConectInterface { checksum: checksum }, null, formatGenerateSession); - p.then(function (resp: any) { + p.then((resp: any) => { // Set access token. if (resp && resp.access_token) { this.setAccessToken(resp.access_token); @@ -318,39 +368,39 @@ class KiteConnect implements KiteConectInterface { return reject(err); }); }); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Invalidates the access token. * - * @param {?string} [access_token] - * @returns {*} + * @remarks + * This method sends a DELETE request to invalidate the specified access token. + * If no access token is provided, the method uses the default access token associated with the instance. + * + * @param {string} [access_token] - The access token to invalidate. If not provided, the default access token is used. + * @returns {Promise} A promise that resolves when the DELETE request is complete. */ - invalidateAccessToken(access_token?: string) { + invalidateAccessToken(access_token?: string): Promise { return this._delete('api.token.invalidate', { api_key: this.api_key, access_token: access_token || this.access_token, }); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Renews the access token using the provided refresh token and API secret. * - * @param {string} refresh_token - * @param {string} api_secret - * @returns {*} + * @remarks + * This method sends a request to renew the access token using the given refresh token + * and API secret. If the renewal is successful, the promise resolves to the renewed + * access token. If the renewal fails, the promise is rejected with an error message. + * + * @param {string} refresh_token - The refresh token used for renewing the access token. + * @param {string} api_secret - The API secret required for the renewal process. + * @returns {Promise} A promise that resolves to the renewed access token if successful. + * If the renewal fails, the promise is rejected with an error message. */ - renewAccessToken(refresh_token: string, api_secret: string) { + renewAccessToken(refresh_token: string, api_secret: string): Promise { return new Promise((resolve, reject) => { const checksum = sha256(this.api_key + refresh_token + api_secret).toString(); @@ -360,7 +410,7 @@ class KiteConnect implements KiteConectInterface { checksum: checksum }); - p.then(function (resp: any) { + p.then((resp: any) => { if (resp && resp.access_token) { this.setAccessToken(resp.access_token); } @@ -369,20 +419,15 @@ class KiteConnect implements KiteConectInterface { return reject(err); }); }); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Invalidates the specified refresh token. * - * @param {string} refresh_token - * @returns {*} + * @param {string} refresh_token - The refresh token to invalidate. + * @returns A promise that resolves when the DELETE request is complete. */ - invalidateRefreshToken = function (refresh_token: string) { + invalidateRefreshToken = function (refresh_token: string): Promise { return this._delete('api.token.invalidate', { api_key: this.api_key, refresh_token: refresh_token @@ -390,261 +435,205 @@ class KiteConnect implements KiteConectInterface { }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves the user's profile. * - * @returns {*} + * @returns {Promise} A promise that resolves with the user's profile data. */ - getProfile() { + getProfile(): Promise { return this._get('user.profile'); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves margin details for the specified segment or all segments. * - * @param {?string} [segment] - * @returns {*} + * @remarks + * If a segment is specified, margin details for that segment are retrieved. Otherwise, margin details for all segments are retrieved. + * + * @param {?string} segment - Optional. The segment for which to retrieve margin details. + * @returns {Promise} A promise that resolves with the margin details. + * If a segment is specified, the promise resolves with margin details for that segment. + * If no segment is specified, the promise resolves with margin details for all segments. */ - getMargins(segment?: string) { + getMargins(segment?: string): Promise { if (segment) { return this._get('user.margins.segment', { 'segment': segment }); } else { return this._get('user.margins'); } - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Places an order with the specified variety and parameters. * - * @param {Varieties} variety - * @param {PlaceOrderParams} params - * @returns {*} + * @param {Varieties} variety - The variety of the order. + * @param {PlaceOrderParams} params - The parameters for the order. + * @returns {Promise} A promise that resolves with the result of the order placement. */ - placeOrder(variety: Varieties, params: PlaceOrderParams) { + placeOrder(variety: Varieties, params: PlaceOrderParams): Promise { params.variety = variety; return this._post('order.place', params); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 - * - * @param {Varieties} variety - * @param {(string | number)} order_id - * @param {ModifyOrderParams} params - * @returns {*} + * @param {Varieties} variety - The variety of the order. + * @param {(string | number)} order_id - The ID of the order to modify. + * @param {ModifyOrderParams} params - The parameters for modifying the order. + * @returns {Promise} A Promise that resolves with the modified order details. */ - modifyOrder(variety: Varieties, order_id: string | number, params: ModifyOrderParams) { + modifyOrder(variety: Varieties, order_id: string | number, params: ModifyOrderParams): Promise { params.variety = variety; params.order_id = order_id; return this._put('order.modify', params); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 - * - * @param {Varieties} variety - * @param {(string | number)} order_id - * @param {?CancelOrderParams} [params] - * @returns {*} + * @param {Varieties} variety - The variety of the order. + * @param {(string | number)} order_id - The ID of the order to modify. + * @param {?CancelOrderParams} [params] - The parameters for cancelling the order. + * @returns {Promise} */ - cancelOrder(variety: Varieties, order_id: string | number, params?: CancelOrderParams) { + cancelOrder(variety: Varieties, order_id: string | number, params?: CancelOrderParams): Promise { params = params || {}; params.variety = variety; params.order_id = order_id; return this._delete('order.cancel', params); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 - * - * @param {Varieties} variety - * @param {string} order_id - * @param {ExitOrderParams} params - * @returns {*} + * @param {Varieties} variety - The variety of the order. + * @param {string} order_id - The ID of the order to modify. + * @param {ExitOrderParams} params - The parameters required for exiting the order. + * @returns {Promise} */ - exitOrder(variety: Varieties, order_id: string, params: ExitOrderParams) { + exitOrder(variety: Varieties, order_id: string, params: ExitOrderParams): Promise { return this.cancelOrder(variety, order_id, params); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves orders. * - * @returns {*} + * @returns {Promise} A Promise that resolves to the retrieved orders. */ - getOrders() { + getOrders(): Promise { return this._get('orders', null, null, this.formatResponse); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves the order history for a given order ID. * - * @param {(string | number)} order_id - * @returns {*} + * @param {(string | number)} order_id - The ID of the order to retrieve history for. + * @returns {Promise} - A Promise that resolves to the order history information. + * The resolved value can be of any type. */ - getOrderHistory(order_id: string | number) { + getOrderHistory(order_id: string | number): Promise { return this._get('order.info', { 'order_id': order_id }, null, this.formatResponse); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves trades data. * - * @returns {*} + * @remarks + * This method retrieves trades data from the server. + * + * @returns {Promise} A Promise that resolves with the trades data. */ - getTrades() { + getTrades(): Promise { return this._get('trades', null, null, this.formatResponse); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves the trades associated with a specific order. * - * @param {(string | number)} order_id - * @returns {*} + * @param {string | number} order_id - The ID of the order. + * @returns {Promise} A Promise resolving to the trades associated with the order. */ - getOrderTrades(order_id: string | number) { + getOrderTrades(order_id: string | number): Promise { return this._get('order.trades', { 'order_id': order_id }, null, this.formatResponse); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** + * Calculates margins for the specified orders. * - * @date 07/06/2023 - 21:37:48 - * - * @param {Order[]} orders - * @param {*} [mode=null] - * @returns {*} + * @param {MarginOrder[]} orders - The array of orders for which margins are to be calculated. + * @param {string} [mode='compact'] - The mode for margin calculation (optional). + * @returns {Promise} - A Promise that resolves with the calculated margins. */ - orderMargins(orders: Order[], mode = null) { + orderMargins(orders: MarginOrder[], mode: string = 'compact'): Promise { return this._post('order.margins', orders, null, undefined, true, { 'mode': mode }); - } + }; /** + * Retrieves the virtual contract note for the specified orders. * - * @date 07/06/2023 - 21:37:48 + * @param {VirtualContractParam[]} orders - The array of orders for which to retrieve the virtual contract note. + * @returns {Promise} A Promise that resolves with the virtual contract note. + */ + getvirtualContractNote(orders: VirtualContractParam[]): Promise { + return this._post('order.contract_note', orders, null, undefined, true, null); + }; + + /** + * Retrieves margin information for a basket of orders. * - * @param {Order[]} orders - * @param {boolean} [consider_positions=true] - * @param {*} [mode=null] - * @returns {*} + * @param {Order[]} orders - The array of orders for which to retrieve margin information. + * @param {boolean} [consider_positions=true] - Flag indicating whether to consider existing positions. + * @param {*} [mode='compact'] - The mode of operation. Default is compact. + * @returns {Promise} - A Promise that resolves to margin information for the basket of orders. */ - orderBasketMargins(orders: Order[], consider_positions = true, mode = null) { + orderBasketMargins(orders: Order[], consider_positions: boolean = true, mode: string = 'compact'): Promise { return this._post('order.margins.basket', orders, null, undefined, true, { 'consider_positions': consider_positions, 'mode': mode }); - } + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves the holdings from the portfolio. * - * @returns {*} + * @returns {Promise} A Promise that resolves with the holdings data. */ - getHoldings() { + getHoldings(): Promise { return this._get('portfolio.holdings'); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves auction instruments. * - * @returns {*} + * @remarks + * This method retrieves auction instruments from the portfolio holdings. + * + * @returns {Promise} A Promise that resolves with the auction instruments. */ - getAuctionInstruments() { + getAuctionInstruments(): Promise { return this._get('portfolio.holdings.auction'); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** + * Retrieves positions from the portfolio. * - * @date 07/06/2023 - 21:37:48 - * - * @returns {*} + * @returns {Promise} A promise that resolves with the positions data. */ - getPositions() { + getPositions(): Promise { return this._get('portfolio.positions'); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Converts a position based on the provided parameters. * - * @param {Order} params - * @returns {*} - */ - convertPosition(params: Order) { - return this._put('portfolio.positions.convert', params); - }/** + * @param {ConvertPositionParams} params - The parameters for converting the position. + * @returns {Promise} A Promise that resolves with the result of the conversion. * - * @date 07/06/2023 - 21:37:48 */ - ; + convertPosition(params: ConvertPositionParams): Promise { + return this._put('portfolio.positions.convert', params); + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves instruments based on the provided exchange. * - * @param {boolean} exchange - * @returns {*} + * @param {Exchanges} exchange - Exchange name + * @returns {Promise} - A Promise resolving to the fetched instruments. */ - getInstruments(exchange: boolean) { + getInstruments(exchange: Exchanges): Promise { if (exchange) { return this._get('market.instruments', { 'exchange': exchange @@ -652,70 +641,63 @@ class KiteConnect implements KiteConectInterface { } else { return this._get('market.instruments.all', null, null, this.transformInstrumentsResponse); } - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves Quote data for the specified instruments. * - * @param {(string[] | string)} instruments - * @returns {*} + * @param {(string | string[])} instruments - An array of exchange:tradingsymbol + * @returns {Promise} A promise that resolves with the quote data for the specified instruments. */ - getQuote(instruments: string[] | string) { - return this._get('market.quote', { 'i': instruments }, null, formatQuoteResponse); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + getQuote(instruments: string | string[]): Promise { + return this._get('market.quote', {"i": instruments}, null, formatQuoteResponse); + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves OHLC (Open, High, Low, Close) data for the specified instruments. * - * @param {(string[] | string)} instruments - * @returns {*} - */ - getOHLC(instruments: string[] | string) { - return this._get('market.quote.ohlc', { 'i': instruments }); - }/** - * - * @date 07/06/2023 - 21:37:48 + * @param {(string | string[])} instruments - An array of exchange:tradingsymbol. + * @returns {Promise} A promise that resolves with the OHLC data for the specified instruments. */ - ; + getOHLC(instruments: string | string[]): Promise { + return this._get('market.quote.ohlc', {"i": instruments}); + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Retrieves the last traded price (LTP) of the specified instruments. * - * @param {(string[] | string)} instruments - * @returns {*} - */ - getLTP(instruments: string[] | string) { - return this._get('market.quote.ltp', { 'i': instruments }); - }/** - * - * @date 07/06/2023 - 21:37:48 + * @remarks + * This method fetches the last traded price (LTP) for the provided instruments. + * + * @param {(string | string[])} instruments - An array of exchange:tradingsymbol + * @returns {Promise} The last traded price (LTP) of the specified instruments as a Promise. */ - ; + getLTP(instruments: string | string[]): Promise{ + return this._get('market.quote.ltp', {"i": instruments}); + }; /** - * - * @date 07/06/2023 - 21:37:48 - * - * @param {(string | number)} instrument_token + * Retrieve historical data (candles) for an instrument. + * For example: + * ~~~~ + * [{ + * date: '2015-02-10T00:00:00+0530', + * open: 277.5, + * high: 290.8, + * low: 275.7, + * close: 287.3, + * volume: 22589681 + * }, ....] + * ~~~~ + * @param {(number | string)} instrument_token * @param {string} interval * @param {(string | Date)} from_date * @param {(string | Date)} to_date * @param {(number | boolean)} [continuous=false] * @param {(number | boolean)} [oi=false] - * @returns {*} + * @returns {Promise} */ - getHistoricalData(instrument_token: string | number, interval: string, from_date: string | Date, to_date: string | Date, continuous: number | boolean = false, oi: number | boolean = false) { + getHistoricalData(instrument_token: number | string, interval: string, from_date: string | Date, to_date: string | Date, continuous: number | boolean = false, oi: number | boolean = false) { continuous = continuous ? 1 : 0; oi = oi ? 1 : 0; if (typeof to_date === 'object') to_date = _getDateTimeString(to_date) @@ -729,16 +711,9 @@ class KiteConnect implements KiteConectInterface { continuous: continuous, oi: oi }, null, this.parseHistorical); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 - * * @param {?(string | number)} [order_id] * @returns {*} */ @@ -748,15 +723,10 @@ class KiteConnect implements KiteConectInterface { } else { return this._get('mf.orders', null, null, this.formatResponse); } - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * * * @param {PlaceMFOrderParams} params * @returns {*} @@ -766,8 +736,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @param {(string | number)} order_id * @returns {*} @@ -777,8 +746,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @param {?(string | number)} [sip_id] * @returns {*} @@ -792,8 +760,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @param {Order} params * @returns {*} @@ -803,8 +770,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @param {(string | number)} sip_id * @param {Order} params @@ -816,8 +782,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @param {(string | number)} sip_id * @returns {*} @@ -827,8 +792,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @returns {*} */ @@ -837,8 +801,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @returns {*} */ @@ -847,38 +810,31 @@ class KiteConnect implements KiteConectInterface { } /** + * Get GTTs list * - * @date 07/06/2023 - 21:37:48 - * - * @returns {*} + * @returns {Promise} */ getGTTs() { return this._get('gtt.triggers', null, null, this.formatResponse); } /** - * - * @date 07/06/2023 - 21:37:48 + * Get specific GTT history * * @param {(string | number)} trigger_id - * @returns {*} + * @returns {Promise} */ getGTT(trigger_id: string | number) { return this._get('gtt.trigger_info', { 'trigger_id': trigger_id }, null, this.formatResponse); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Get API params from user defined GTT params * - * @param {Order} params - * @returns {{ condition: { exchange: ExchangeTypes; tradingsymbol: string; trigger_values: {}; last_price: any; }; orders: {}; }} + * @param {PlaceGTTParams} params + * @returns {{ condition: { exchange: Exchanges; tradingsymbol: string; trigger_values: {}; last_price: any; }; orders: {}; }} */ - _getGTTPayload(params: Order) { + private _getGTTPayload(params: PlaceGTTParams) { if (params.trigger_type !== GTTStatusTypes.GTT_TYPE_OCO && params.trigger_type !== GTTStatusTypes.GTT_TYPE_SINGLE) { throw new Error('Invalid `params.trigger_type`') } @@ -892,7 +848,7 @@ class KiteConnect implements KiteConectInterface { exchange: params.exchange, tradingsymbol: params.tradingsymbol, trigger_values: params.trigger_values, - last_price: parseFloat(params.last_price as string) + last_price: params.last_price } let orders = [] as any[]; for (let o of params.orders as Order[]) { @@ -907,18 +863,12 @@ class KiteConnect implements KiteConectInterface { }) } return { condition, orders }; - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 - * + * Place GTT. * @param {PlaceGTTParams} params - * @returns {*} + * @returns {Promise} */ placeGTT(params: PlaceGTTParams) { const payload = this._getGTTPayload(params); @@ -927,52 +877,37 @@ class KiteConnect implements KiteConectInterface { orders: JSON.stringify(payload.orders), type: params.trigger_type }); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Modify GTT Order * * @param {(string | number)} trigger_id - * @param {ModifyGTTParams} params - * @returns {*} + * @param {PlaceGTTParams} params + * @returns {Promise} */ - modifyGTT(trigger_id: string | number, params: ModifyGTTParams) { - const payload = this._getGTTPayload(params as Order); + modifyGTT(trigger_id: string | number, params: PlaceGTTParams) { + const payload = this._getGTTPayload(params); return this._put('gtt.modify', { trigger_id: trigger_id, type: params.trigger_type, condition: JSON.stringify(payload.condition), orders: JSON.stringify(payload.orders) }); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Delete specific GTT order * * @param {(string | number)} trigger_id - * @returns {*} + * @returns {Promise} */ deleteGTT(trigger_id: string | number) { return this._delete('gtt.delete', { 'trigger_id': trigger_id }, null, undefined); - }/** - * - * @date 07/06/2023 - 21:37:48 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:48 + * Validate postback data checksum * * @param {AnyObject} postback_data * @param {string} api_secret @@ -996,8 +931,6 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 * * @private * @param {string} route @@ -1012,8 +945,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @private * @param {string} route @@ -1029,8 +961,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @private * @param {string} route @@ -1046,8 +977,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @private * @param {string} route @@ -1062,8 +992,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @private * @param {string} route @@ -1099,7 +1028,7 @@ class KiteConnect implements KiteConectInterface { payload = JSON.stringify(params); } else { // post url encoded payload - payload = querystring.stringify(params); + payload = qs.stringify(params); } } @@ -1128,14 +1057,12 @@ class KiteConnect implements KiteConectInterface { if (responseTransformer) { options.transformResponse = (axios.defaults.transformResponse as any).concat(responseTransformer); } - return this.requestInstance.request(options); } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @private * @param {AnyObject} jsonData @@ -1169,8 +1096,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @private * @param {*} data @@ -1199,8 +1125,7 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 + * * * @private * @param {AnyObject} data @@ -1241,8 +1166,6 @@ class KiteConnect implements KiteConectInterface { } /** - * - * @date 07/06/2023 - 21:37:48 * * @param {AnyObject} data * @returns {AnyObject} @@ -1258,8 +1181,6 @@ function formatGenerateSession(data: AnyObject) { } /** - * - * @date 07/06/2023 - 21:37:48 * * @param {AnyObject} data * @returns {AnyObject} @@ -1282,8 +1203,6 @@ function formatQuoteResponse(data: AnyObject) { // Format response ex. datetime string to date /** - * - * @date 07/06/2023 - 21:37:48 * * @param {*} data * @param {AnyObject} headers @@ -1316,8 +1235,7 @@ function transformMFInstrumentsResponse(data: any, headers: AnyObject) { /** - * - * @date 07/06/2023 - 21:37:48 + * * @param {Date} date * @returns {*} @@ -1326,5 +1244,3 @@ function _getDateTimeString(date: Date) { const isoString = date.toISOString(); return isoString.replace('T', ' ').split('.')[0]; } - -export default KiteConnect; diff --git a/lib/index.ts b/lib/index.ts index 9b2a9e3..7ca2938 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,10 +1,4 @@ 'use strict'; -import KiteTicker from './ticker'; -import KiteConnect from './connect'; - -export default { - KiteTicker, - KiteConnect -} - +export { KiteConnect } from './connect'; +export { KiteTicker } from './ticker'; diff --git a/lib/ticker.ts b/lib/ticker.ts index d697f6f..20e7cd6 100644 --- a/lib/ticker.ts +++ b/lib/ticker.ts @@ -1,178 +1,226 @@ import WebSocket from 'ws'; -import { AnyObject, KiteTickerInterface, KiteTickerParams } from '../interfaces'; +import { AnyObject, KiteTickerInterface, KiteTickerParams, Tick, LTPTick, QuoteTick, FullTick } from '../interfaces'; import utils from './utils'; + /** - * - * @date 07/06/2023 - 21:38:00 - * + * Read timeout duration in seconds. Default: 5 seconds. * @type {number} */ -let read_timeout = 5, // seconds - reconnect_max_delay = 0, - reconnect_max_tries = 0, - - // message flags (outgoing) - mSubscribe = 'subscribe', - mUnSubscribe = 'unsubscribe', - mSetMode = 'mode', - - // incoming - - // public constants - modeFull = 'full', // Full quote including market depth. 164 bytes. - modeQuote = 'quote', // Quote excluding market depth. 52 bytes. - modeLTP = 'ltp'; + let read_timeout = 5; + + /** + * Maximum delay for reconnection attempts. Default: 0 (no delay). + * @type {number} + */ + let reconnect_max_delay = 0; + + /** + * Maximum number of reconnection attempts. Default: 0 (no retries). + * @type {number} + */ + let reconnect_max_tries = 0; + + /** + * Outgoing message flags. + * @type {string} + */ + let mSubscribe = 'subscribe', + mUnSubscribe = 'unsubscribe', + mSetMode = 'mode'; + + /** + * Public constants. + * @type {string} + */ + const modeFull = 'full', + modeQuote = 'quote', + modeLTP = 'ltp'; /** - * - * @date 07/06/2023 - 21:38:00 - * + * WebSocket connection instance. * @type {(WebSocket | null)} */ -let ws: WebSocket | null = null, - triggers: AnyObject = { - 'connect': [], - 'ticks': [], - 'disconnect': [], - 'error': [], - 'close': [], - 'reconnect': [], - 'noreconnect': [], - 'message': [], - 'order_update': [] - }, - read_timer: any = null, - last_read: any = 0, - auto_reconnect: any = false, - current_reconnection_count = 0, - last_reconnect_interval: any = 0, - current_ws_url: any = null, - defaultReconnectMaxDelay: number = 60, - defaultReconnectMaxRetries: number = 50, - maximumReconnectMaxRetries: number = 300, - minimumReconnectMaxDelay: number = 5; + let ws: WebSocket | null = null; + + /** + * Event triggers and their associated callbacks. + * @type {Object} + */ + let triggers: AnyObject = { + 'connect': [], + 'ticks': [], + 'disconnect': [], + 'error': [], + 'close': [], + 'reconnect': [], + 'noreconnect': [], + 'message': [], + 'order_update': [] + }; + + /** + * Timer for reading data. + * @type {any} + */ + let read_timer: any = null; + + /** + * Timestamp of the last read operation. + * @type {any} + */ + let last_read: any = 0; + + /** + * Flag indicating whether auto-reconnect is enabled. + * @type {boolean} + */ + let auto_reconnect: boolean = false; + + /** + * Current count of reconnection attempts. + * @type {number} + */ + let current_reconnection_count = 0; + + /** + * Last interval used for reconnecting. + * @type {any} + */ + let last_reconnect_interval: any = 0; + + /** + * Current WebSocket URL in use. + * @type {string} + */ + let current_ws_url: string = ''; + + /** + * Default maximum delay for reconnection attempts in seconds. + * @type {number} + */ + const defaultReconnectMaxDelay: number = 60; + + /** + * Default maximum number of reconnection attempts. + * @type {number} + */ + const defaultReconnectMaxRetries: number = 50; + + /** + * Maximum allowed value for the number of reconnection attempts. + * @type {number} + */ + const maximumReconnectMaxRetries: number = 300; + + /** + * Minimum allowed value for the maximum delay for reconnection attempts in seconds. + * @type {number} + */ + const minimumReconnectMaxDelay: number = 5; // segment constants /** - * - * @date 07/06/2023 - 21:38:00 - * - * @type {1} + * Constants representing different market segments. + * @type {number} */ const NseCM = 1, - NseFO = 2, - NseCD = 3, - BseCM = 4, - BseFO = 5, - BseCD = 6, - McxFO = 7, - McxSX = 8, - Indices = 9; + NseFO = 2, + NseCD = 3, + BseCM = 4, + BseFO = 5, + BseCD = 6, + McxFO = 7, + McxSX = 8, + Indices = 9; /** - * The WebSocket client for connecting to Kite connect streaming quotes service. - * + * @classdesc + * Ticker client class. The WebSocket client for connecting to Kite connect streaming quotes service. + * * Getting started: - * --------------- + * --------------------------- + * + * ~~~~ + * import { KiteTicker } from "kiteconnect"; * - * const KiteTicker = require('kiteconnect').KiteTicker; - * const ticker = new KiteTicker({ - * api_key: 'api_key', - * access_token: 'access_token' - * }); + * const apiKey = 'your_api_key'; + * const accessToken = 'generated_access_token'; * - * ticker.connect(); - * ticker.on('ticks', onTicks); - * ticker.on('connect', subscribe); + * const ticker = new KiteTicker({ + * api_key: apiKey, + * access_token: accessToken + * }); * - * function onTicks(ticks) { - * console.log('Ticks', ticks); - * } + * ticker.connect(); + * ticker.on('ticks', onTicks); + * ticker.on('connect', subscribe); + * ticker.on('disconnect', onDisconnect); + * ticker.on('error', onError); + * ticker.on('close', onClose); + * ticker.on('order_update', onTrade); * - * function subscribe() { - * const items = [738561]; - * ticker.subscribe(items); - * ticker.setMode(ticker.modeFull, items); - * } + * function onTicks(ticks: any[]): void { + * console.log("Ticks", ticks); + * } * - * Tick structure (passed to the tick callback you assign): - * --------------------------- - * [{ tradable: true, - * mode: 'full', - * instrument_token: 208947, - * last_price: 3939, - * last_quantity: 1, - * average_price: 3944.77, - * volume: 28940, - * buy_quantity: 4492, - * sell_quantity: 4704, - * ohlc: { open: 3927, high: 3955, low: 3927, close: 3906 }, - * change: 0.8448540706605223, - * last_trade_time: 1515491369, - * timestamp: 1515491373, - * oi: 24355, - * oi_day_high: 0, - * oi_day_low: 0, - * depth: - * buy: [{ - * quantity: 59, - * price: 3223, - * orders: 5 - * }, - * { - * quantity: 164, - * price: 3222, - * orders: 15 - * }, - * { - * quantity: 123, - * price: 3221, - * orders: 7 - * }, - * { - * quantity: 48, - * price: 3220, - * orders: 7 - * }, - * { - * quantity: 33, - * price: 3219, - * orders: 5 - * }], - * sell: [{ - * quantity: 115, - * price: 3224, - * orders: 15 - * }, - * { - * quantity: 50, - * price: 3225, - * orders: 5 - * }, - * { - * quantity: 175, - * price: 3226, - * orders: 14 - * }, - * { - * quantity: 49, - * price: 3227, - * orders: 10 - * }, - * { - * quantity: 106, - * price: 3228, - * orders: 13 - * }] - * } - * }, ...] + * function subscribe(): void { + * const tokens = [738561, 256265]; + * ticker.subscribe(tokens); + * ticker.setMode(ticker.modeFull, tokens); + * } * - * Auto reconnection - * ----------------- - * Auto reonnection is enabled by default and it can be disabled by passing `reconnect` param while initialising `KiteTicker`. + * function onDisconnect(error: Error): void { + * console.log("Closed connection on disconnect", error); + * } * - * Auto reonnection mechanism is based on [Exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) algorithm in which + * function onError(error: Error): void { + * console.log("Closed connection on error", error); + * } + * + * function onClose(reason: string): void { + * console.log("Closed connection on close", reason); + * } + * + * function onTrade(order: any): void { + * console.log("Order update", order); + * } + * ~~~~ + * + * ------------- + * ~~~~ + * [{ + * tradable: true, + * mode: 'full', + * instrument_token: 738561, + * last_price: 2940.7, + * last_traded_quantity: 1, + * average_traded_price: 2933.55, + * volume_traded: 2827705, + * total_buy_quantity: 213779, + * total_sell_quantity: 425119, + * ohlc: { open: 2915, high: 2949, low: 2910.35, close: 2913.35 }, + * change: 0.9387818147493404, + * last_trade_time: 2024-06-12T07:16:09.000Z, + * exchange_timestamp: 2024-06-12T07:16:09.000Z, + * oi: 0, + * oi_day_high: 0, + * oi_day_low: 0, + * depth: { buy: [Array], sell: [Array] } + * }, + * { + * tradable: false, + * mode: 'full', + * instrument_token: 256265, + * last_price: 23406.85, + * ohlc: { high: 23441.95, low: 23295.95, open: 23344.45, close: 23264.85 }, + * change: 0.6103628435171514, + * exchange_timestamp: 2024-06-12T07:16:09.000Z + * } + * ] + * ~~~~ + * + * Auto reconnection is enabled by default and it can be disabled by passing `reconnect` param while initialising `KiteTicker`. Auto reonnection mechanism is based on [Exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) algorithm in which * next retry interval will be increased exponentially. `max_delay` and `max_tries` params can be used to tweak * the alogrithm where `max_delay` is the maximum delay after which subsequent reconnection interval will become constant and * `max_tries` is maximum number of retries before it quits reconnection. @@ -180,45 +228,41 @@ const NseCM = 1, * minimum interval which is 2 seconds and keep increasing up to 60 seconds after which it becomes constant and when reconnection attempt * is reached upto 50 then it stops reconnecting. * Callback `reconnect` will be called with current reconnect attempt and next reconnect interval and - * `on_noreconnect` is called when reconnection attempts reaches max retries. - * + * `on_noreconnect` is called when reconnection attempts reaches max retries. + * * Here is an example demonstrating auto reconnection. + * ------------- + * ~~~~ + * import { KiteTicker } from "kiteconnect"; * - * const KiteTicker = require('kiteconnect').KiteTicker; - * const ticker = new KiteTicker({ - * api_key: 'api_key', - * access_token: 'access_token' - * }); + * const apiKey = 'your_api_key'; + * const accessToken = 'generated_access_token'; + * const ticker = new KiteTicker({ + * api_key: 'api_key', + * access_token: 'access_token' + * }) + * ticker.autoReconnect(true, 10, 5); + * ticker.connect(); + * ticker.on('ticks', onTicks); + * ticker.on('connect', subscribe); + * ticker.on('noreconnect', () => { + * console.log('noreconnect') + * }) + * ticker.on('reconnect', (reconnect_count:any, reconnect_interval:any) => { + * console.log('Reconnecting: attempt - ', reconnect_count, ' interval - ', reconnect_interval) + * }) * - * // set autoreconnect with 10 maximum reconnections and 5 second interval - * ticker.autoReconnect(true, 10, 5) - * ticker.connect(); - * ticker.on('ticks', onTicks); - * ticker.on('connect', subscribe); + * function onTicks(ticks: any[]) { + * console.log('Ticks', ticks) + * } * - * ticker.on('noreconnect', function() { - * console.log('noreconnect'); - * }); - * - * ticker.on('reconnect', function(reconnect_count, reconnect_interval) { - * console.log('Reconnecting: attempt - ', reconnect_count, ' interval - ', reconnect_interval); - * }); + * function subscribe() { + * const items = [738561] + * ticker.subscribe(items) + * ticker.setMode(ticker.modeFull, items) + * } + * ~~~~ * - * ticker.on('message', function(binary_msg){ - * console.log('Binary message', binary_msg); - * }); - * - * function onTicks(ticks) { - * console.log('Ticks', ticks); - * } - * - * function subscribe() { - * const items = [738561]; - * ticker.subscribe(items); - * ticker.setMode(ticker.modeFull, items); - * } - * - * * @constructor * @name KiteTicker * @param {Object} params @@ -227,98 +271,58 @@ const NseCM = 1, * @param {bool} [params.reconnect] Enable/Disable auto reconnect. Enabled by default. * @param {number} [params.max_retry=50] is maximum number re-connection attempts. Defaults to 50 attempts and maximum up to 300 attempts. * @param {number} [params.max_delay=60] in seconds is the maximum delay after which subsequent re-connection interval will become constant. Defaults to 60s and minimum acceptable value is 5s. - * #param {string} [params.root='wss://websocket.kite.trade/'] Kite websocket root. + * @param {string} [params.root='wss://websocket.kite.trade/'] Kite websocket root. */ -class KiteTicker implements KiteTickerInterface { +export class KiteTicker implements KiteTickerInterface { /** - * - * @date 07/06/2023 - 21:38:00 - * * @type {string} */ modeFull: string; /** - * - * @date 07/06/2023 - 21:38:00 - * * @type {string} */ modeQuote: string; /** - * - * @date 07/06/2023 - 21:38:00 - * * @type {string} */ modeLTP: string; /** - * - * @date 07/06/2023 - 21:38:00 - * - * @type {?string} + * @type {string} */ - api_key?: string; + api_key: string; /** - * - * @date 07/06/2023 - 21:38:00 - * - * @type {?string} + * @type {string} */ - access_token?: string; + access_token: string; /** - * - * @date 07/06/2023 - 21:38:00 - * * @type {?boolean} */ reconnect?: boolean; /** - * - * @date 07/06/2023 - 21:38:00 - * * @type {?number} */ max_retry?: number; /** - * - * @date 07/06/2023 - 21:38:00 - * * @type {?number} */ max_delay?: number; /** - * - * @date 07/06/2023 - 21:38:00 - * * @type {string} */ root: string; + /** * Creates an instance of KiteTicker. - * @date 07/06/2023 - 21:38:00 * * @constructor * @param {KiteTickerParams} params */ constructor(params: KiteTickerParams) { this.root = params.root || 'wss://ws.kite.trade/'; - // public constants - /** - * @memberOf KiteTicker - * @desc Set mode full - */ + this.api_key = params.api_key + this.access_token = params.access_token this.modeFull = modeFull; - - /** - * @memberOf KiteTicker - * @desc Set mode quote - */ this.modeQuote = modeQuote; - - /** - * @memberOf KiteTicker - * @desc Set mode LTP - */ this.modeLTP = modeLTP; if (!params.reconnect) params.reconnect = true; @@ -326,12 +330,9 @@ class KiteTicker implements KiteTickerInterface { } /** - * - * @date 07/06/2023 - 21:38:00 - * - * @param {boolean} t - * @param {number} max_retry - * @param {number} max_delay + * @param {bool} t + * @param {number} [max_retry=50] + * @param {number} [max_delay=60] */ autoReconnect(t: boolean, max_retry: number, max_delay: number) { auto_reconnect = (t == true); @@ -343,20 +344,19 @@ class KiteTicker implements KiteTickerInterface { // Set reconnect constraints reconnect_max_tries = max_retry >= maximumReconnectMaxRetries ? maximumReconnectMaxRetries : max_retry; reconnect_max_delay = max_delay <= minimumReconnectMaxDelay ? minimumReconnectMaxDelay : max_delay; - }/** - * - * @date 07/06/2023 - 21:38:00 - */ - ; + } /** + * Establishes a WebSocket connection to the server. * - * @date 07/06/2023 - 21:38:00 + * This method creates a WebSocket connection using the provided credentials and options. + * If a connection is already established or in the process of being established, this method does nothing. + * + * @returns {void} */ - connect() { + connect(): void { // Skip if its already connected - if (!ws) return; - if (ws.readyState == ws.CONNECTING || ws.readyState == ws.OPEN) return; + if (ws && (ws.readyState === ws.CONNECTING || ws.readyState === ws.OPEN)) return; const url = this.root + '?api_key=' + this.api_key + '&access_token=' + this.access_token + '&uid=' + (new Date().getTime().toString()); @@ -368,6 +368,7 @@ class KiteTicker implements KiteTickerInterface { } }); + // Set binaryType to arraybuffer ws.binaryType = 'arraybuffer'; ws.onopen = function () { @@ -389,7 +390,7 @@ class KiteTicker implements KiteTickerInterface { // reset current_ws_url incase current connection times out // This is determined when last heart beat received time interval // exceeds read_timeout value - current_ws_url = null; + current_ws_url = ''; if (ws) ws.close(); clearInterval(read_timer); this.triggerDisconnect(); @@ -421,25 +422,17 @@ class KiteTicker implements KiteTickerInterface { if (this && this.readyState == this.OPEN) this.close(); }; - ws.onclose = function (e) { + ws.onclose = (e) => { trigger('close', [e]); // the ws id doesn't match the current global id, // meaning it's a ghost close event. just ignore. - if (current_ws_url && (this.url != current_ws_url)) return; + if (current_ws_url && (url != current_ws_url)) return; this.triggerDisconnect(e); }; - }/** - * - * @date 07/06/2023 - 21:38:00 - */ - ; + } - /** - * - * @date 07/06/2023 - 21:38:00 - */ attemptReconnection() { // Try reconnecting only so many times. if (current_reconnection_count > reconnect_max_tries) { @@ -467,31 +460,29 @@ class KiteTicker implements KiteTickerInterface { } /** - * - * @date 07/06/2023 - 21:38:00 - * * @param {?WebSocket.CloseEvent} [e] + * @returns {void} */ - triggerDisconnect(e?: WebSocket.CloseEvent) { + triggerDisconnect(e?: WebSocket.CloseEvent): void { ws = null; trigger('disconnect', [e]); if (auto_reconnect) this.attemptReconnection(); } /** + * Checks if the WebSocket connection is currently open. * - * @date 07/06/2023 - 21:37:59 - * - * @returns {boolean} + * This method returns a boolean value indicating whether a WebSocket connection is currently open. + * + * @returns {boolean} A boolean value indicating whether the WebSocket connection is open. */ - connected() { - return (ws && ws.readyState == ws.OPEN); + connected(): boolean { + return (ws !== null && ws.readyState === ws.OPEN); } + /** * - * @date 07/06/2023 - 21:37:59 - * * @param {string} e * @param {Function} callback */ @@ -499,16 +490,10 @@ class KiteTicker implements KiteTickerInterface { if (triggers.hasOwnProperty(e)) { (triggers as AnyObject)[e].push(callback); } - }/** - * - * @date 07/06/2023 - 21:37:59 - */ - ; + }; /** * - * @date 07/06/2023 - 21:37:59 - * * @param {(string[] | number[])} tokens * @returns {{}} */ @@ -517,16 +502,10 @@ class KiteTicker implements KiteTickerInterface { send({ 'a': mSubscribe, 'v': tokens }); } return tokens; - }/** - * - * @date 07/06/2023 - 21:37:59 - */ - ; + }; /** * - * @date 07/06/2023 - 21:37:59 - * * @param {(string[] | number[])} tokens * @returns {{}} */ @@ -535,15 +514,9 @@ class KiteTicker implements KiteTickerInterface { send({ 'a': mUnSubscribe, 'v': tokens }); } return tokens; - }/** - * - * @date 07/06/2023 - 21:37:59 - */ - ; + }; /** - * - * @date 07/06/2023 - 21:37:59 * * @param {string} mode * @param {(string[] | number[])} tokens @@ -554,15 +527,10 @@ class KiteTicker implements KiteTickerInterface { send({ 'a': mSetMode, 'v': [mode, tokens] }); } return tokens; - }/** - * - * @date 07/06/2023 - 21:37:59 - */ - ; + }; /** * - * @date 07/06/2023 - 21:37:59 * * @param {ArrayBuffer} binpacks * @returns {{}} @@ -578,9 +546,6 @@ class KiteTicker implements KiteTickerInterface { // send a message via the socket // automatically encodes json if possible /** - * - * @date 07/06/2023 - 21:37:59 - * * @param {(AnyObject | string)} message */ function send(message: AnyObject | string) { @@ -595,24 +560,20 @@ function send(message: AnyObject | string) { } // trigger event callbacks + /** - * - * @date 07/06/2023 - 21:37:59 - * * @param {string} e * @param {?any[]} [args] + * @returns {void} */ -function trigger(e: string, args?: any[]) { - if (!triggers[e]) return +function trigger(e: string, args?: any[]): void { + if (!triggers[e]) return; for (let n = 0; n < triggers[e].length; n++) { triggers[e][n].apply(triggers[e][n], args ? args : []); } } /** - * - * @date 07/06/2023 - 21:37:59 - * * @param {(string | AnyObject)} data */ function parseTextMessage(data: string | AnyObject) { @@ -630,15 +591,12 @@ function parseTextMessage(data: string | AnyObject) { // parse received binary message. each message is a combination of multiple tick packets // [2-bytes num packets][size1][tick1][size2][tick2] ... /** - * - * @date 07/06/2023 - 21:37:59 - * * @param {ArrayBuffer} binpacks - * @returns {{}} + * @returns {Tick[]} */ function parseBinary(binpacks: ArrayBuffer) { const packets = splitPackets(binpacks), - ticks: any[] = []; + ticks: Tick[] = []; for (let n = 0; n < packets.length; n++) { const bin: any = packets[n], @@ -664,13 +622,13 @@ function parseBinary(binpacks: ArrayBuffer) { mode: modeLTP, instrument_token, last_price: buf2long(bin.slice(4, 8)) / divisor - }); + } as LTPTick); // Parse indices quote and full mode } else if (bin.byteLength === 28 || bin.byteLength === 32) { let mode = modeQuote; if (bin.byteLength === 32) mode = modeFull; - const tick: AnyObject = { + const tick: QuoteTick = { tradable, mode, instrument_token, @@ -701,7 +659,7 @@ function parseBinary(binpacks: ArrayBuffer) { let mode = modeQuote; if (bin.byteLength === 184) mode = modeFull; - const tick = { + const tick: FullTick = { tradable, mode, instrument_token, @@ -716,8 +674,10 @@ function parseBinary(binpacks: ArrayBuffer) { high: buf2long(bin.slice(32, 36)) / divisor, low: buf2long(bin.slice(36, 40)) / divisor, close: buf2long(bin.slice(40, 44)) / divisor - } - } as AnyObject; + }, + // To be computed later + change: 0 + }; // Compute the change price using close price and last price if (tick.ohlc.close != 0) { @@ -765,9 +725,6 @@ function parseBinary(binpacks: ArrayBuffer) { // split one long binary message into individual tick packets /** - * - * @date 07/06/2023 - 21:37:59 - * * @param {ArrayBuffer} bin * @returns {{}} */ @@ -792,9 +749,6 @@ function splitPackets(bin: ArrayBuffer) { // Big endian byte array to long. /** - * - * @date 07/06/2023 - 21:37:59 - * * @param {ArrayBuffer} buf * @returns {number} */ @@ -809,5 +763,3 @@ function buf2long(buf: ArrayBuffer) { return val; } - -export default KiteTicker; diff --git a/lib/utils.ts b/lib/utils.ts index 66616d5..012d285 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -2,7 +2,6 @@ import packageInfo from '../package.json'; /** * - * @date 07/06/2023 - 21:38:03 * * @returns {*} */ @@ -12,7 +11,6 @@ function getPackageInfo() { /** * - * @date 07/06/2023 - 21:38:03 * * @returns {string} */ diff --git a/package-lock.json b/package-lock.json index 03d5407..e271452 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,24 +1,23 @@ { - "name": "kiteconnect", - "version": "4.1.0", + "name": "kiteconnect-ts-test", + "version": "5.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "kiteconnect", - "version": "4.1.0", + "version": "5.0.0", "license": "MIT", "dependencies": { + "@microsoft/tsdoc": "^0.15.0", "axios": "^0.21.2", "chai": "^4.3.6", "crypto-js": "^4.0.0", "mocha": "^10.0.0", "nock": "^13.2.4", "papaparse": "^5.3.1", - "querystring": "^0.2.1", + "qs": "^6.12.1", "rimraf": "^3.0.2", - "taffydb": "^2.7.3", - "typedoc": "^0.24.8", "ws": "^6.2.2" }, "devDependencies": { @@ -26,38 +25,61 @@ "@types/crypto-js": "^4.1.1", "@types/mocha": "^10.0.1", "@types/node": "^18.11.18", - "@types/papaparse": "^5.3.5", + "@types/papaparse": "^5.3.14", + "@types/qs": "^6.9.15", "@types/ws": "^8.5.4", - "eslint": "^8.30.0", - "jsdoc": "^4.0.2", - "minami": "^1.1.1", - "typescript": "^4.9.4" + "eslint": "^8.57.0", + "eslint-plugin-tsdoc": "^0.2.17", + "typedoc": "^0.25.13", + "typescript": "^4.9.5", + "typescript-eslint": "^7.5.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/parser": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", - "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true, - "bin": { - "parser": "bin/babel-parser.js" + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=6.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", - "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -94,14 +116,23 @@ "node": "*" } }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -144,23 +175,34 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, - "node_modules/@jsdoc/salty": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", - "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", + "node_modules/@microsoft/tsdoc": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.15.0.tgz", + "integrity": "sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==" + }, + "node_modules/@microsoft/tsdoc-config": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz", + "integrity": "sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==", "dev": true, "dependencies": { - "lodash": "^4.17.21" - }, - "engines": { - "node": ">=v12.0.0" + "@microsoft/tsdoc": "0.14.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" } }, + "node_modules/@microsoft/tsdoc-config/node_modules/@microsoft/tsdoc": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz", + "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==", + "dev": true + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -208,26 +250,10 @@ "integrity": "sha512-BG7fQKZ689HIoc5h+6D2Dgq1fABRa0RbBWKBd9SP/MVRVXROflpm5fhwyATX5duFmbStzyzyycPB8qUYKDH3NA==", "dev": true }, - "node_modules/@types/linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==", - "dev": true - }, - "node_modules/@types/markdown-it": { - "version": "12.2.3", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", - "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", - "dev": true, - "dependencies": { - "@types/linkify-it": "*", - "@types/mdurl": "*" - } - }, - "node_modules/@types/mdurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz", - "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", + "node_modules/@types/json-schema": { + "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 }, "node_modules/@types/mocha": { @@ -243,14 +269,26 @@ "dev": true }, "node_modules/@types/papaparse": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/@types/papaparse/-/papaparse-5.3.5.tgz", - "integrity": "sha512-R1icl/hrJPFRpuYj9PVG03WBAlghJj4JW9Py5QdR8FFSxaLmZRyu7xYDCCBZIJNfUv3MYaeBbhBoX958mUTAaw==", + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/@types/papaparse/-/papaparse-5.3.14.tgz", + "integrity": "sha512-LxJ4iEFcpqc6METwp9f6BV6VVc43m6MfH0VqFosHvrUgfXiFe6ww7R3itkOQ+TCK6Y+Iv/+RnnvtRZnkc5Kc9g==", "dev": true, "dependencies": { "@types/node": "*" } }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@types/ws": { "version": "8.5.4", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", @@ -260,15 +298,226 @@ "@types/node": "*" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz", + "integrity": "sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/type-utils": "7.5.0", + "@typescript-eslint/utils": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz", + "integrity": "sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz", + "integrity": "sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/utils": "7.5.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz", + "integrity": "sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz", + "integrity": "sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.5.0.tgz", + "integrity": "sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz", + "integrity": "sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.5.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -319,9 +568,10 @@ } }, "node_modules/ansi-sequence-parser": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", - "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true }, "node_modules/ansi-styles": { "version": "4.3.0", @@ -354,6 +604,15 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -388,12 +647,6 @@ "node": ">=8" } }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -418,6 +671,24 @@ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -438,18 +709,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/catharsis": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", - "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", - "dev": true, - "dependencies": { - "lodash": "^4.17.15" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/chai": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", @@ -573,9 +832,9 @@ } }, "node_modules/crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" }, "node_modules/debug": { "version": "4.3.4", @@ -626,6 +885,22 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -634,6 +909,18 @@ "node": ">=0.3.1" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -651,13 +938,23 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "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==", + "engines": { + "node": ">= 0.4" } }, "node_modules/escalade": { @@ -668,59 +965,49 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint": { - "version": "8.30.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", - "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.4.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -733,53 +1020,48 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "node_modules/eslint-plugin-tsdoc": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz", + "integrity": "sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "@microsoft/tsdoc": "0.14.2", + "@microsoft/tsdoc-config": "0.16.2" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "node_modules/eslint-plugin-tsdoc/node_modules/@microsoft/tsdoc": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz", + "integrity": "sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==", + "dev": true + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^2.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/brace-expansion": { @@ -829,14 +1111,14 @@ } }, "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -846,9 +1128,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -893,6 +1175,22 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "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==", + "dev": true, + "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" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -980,9 +1278,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -1016,6 +1314,14 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1025,13 +1331,31 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "engines": { "node": "*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -1083,9 +1407,9 @@ } }, "node_modules/globals": { - "version": "13.19.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", - "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1097,16 +1421,41 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "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 + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "node_modules/has-flag": { @@ -1117,6 +1466,50 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "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==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -1126,9 +1519,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -1184,6 +1577,18 @@ "node": ">=8" } }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1253,15 +1658,11 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/js-sdsl": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.2.0.tgz", - "integrity": "sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -1274,44 +1675,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/js2xmlparser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", - "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", - "dev": true, - "dependencies": { - "xmlcreate": "^2.0.4" - } - }, - "node_modules/jsdoc": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", - "integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.15", - "@jsdoc/salty": "^0.2.1", - "@types/markdown-it": "^12.2.3", - "bluebird": "^3.7.2", - "catharsis": "^0.9.0", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.2", - "klaw": "^3.0.0", - "markdown-it": "^12.3.2", - "markdown-it-anchor": "^8.4.1", - "marked": "^4.0.10", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "underscore": "~1.13.2" - }, - "bin": { - "jsdoc": "jsdoc.js" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -1330,18 +1693,10 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" - }, - "node_modules/klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.9" - } + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true }, "node_modules/levn": { "version": "0.4.1", @@ -1356,15 +1711,6 @@ "node": ">= 0.8.0" } }, - "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "dependencies": { - "uc.micro": "^1.0.1" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -1379,23 +1725,12 @@ "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.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==" - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -1419,41 +1754,29 @@ "get-func-name": "^2.0.0" } }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" - }, - "node_modules/markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "node_modules/lru-cache": { + "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, "dependencies": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "yallist": "^4.0.0" }, - "bin": { - "markdown-it": "bin/markdown-it.js" + "engines": { + "node": ">=10" } }, - "node_modules/markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", - "dev": true, - "peerDependencies": { - "@types/markdown-it": "*", - "markdown-it": "*" - } + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, "bin": { "marked": "bin/marked.js" }, @@ -1461,17 +1784,27 @@ "node": ">= 12" } }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": 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, + "engines": { + "node": ">= 8" + } }, - "node_modules/minami": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/minami/-/minami-1.2.3.tgz", - "integrity": "sha1-mbbc37LwpU2hycj3qjoyd4eq+fg= sha512-3f2QqqbUC1usVux0FkQMFYB73yd9JIxmHSn1dWQacizL6hOUaNu6mA3KxZ9SfiCc4qgcgq+5XP59+hP7URa1Dw==", - "dev": true + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } }, "node_modules/minimatch": { "version": "5.0.1", @@ -1484,18 +1817,6 @@ "node": ">=10" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", @@ -1570,13 +1891,12 @@ "dev": true }, "node_modules/nock": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.4.tgz", - "integrity": "sha512-8GPznwxcPNCH/h8B+XZcKjYPXnUV5clOKCjAqyjsiqA++MpNx9E9+t8YPp0MbThO+KauRo7aZJ1WuIZmOrT2Ug==", + "version": "13.5.4", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", + "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", "dependencies": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", - "lodash.set": "^4.3.2", "propagate": "^2.0.0" }, "engines": { @@ -1591,6 +1911,14 @@ "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1600,17 +1928,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -1686,6 +2014,21 @@ "node": ">=8" } }, + "node_modules/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 + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -1723,14 +2066,28 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" } }, + "node_modules/qs": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", + "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/querystring": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", @@ -1779,18 +2136,6 @@ "node": ">=8.10.0" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1799,13 +2144,17 @@ "node": ">=0.10.0" } }, - "node_modules/requizzle": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", - "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "dependencies": { - "lodash": "^4.17.14" + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-from": { @@ -1883,6 +2232,21 @@ } ] }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -1891,6 +2255,22 @@ "randombytes": "^2.1.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -1913,9 +2293,10 @@ } }, "node_modules/shiki": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz", - "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==", + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", + "dev": true, "dependencies": { "ansi-sequence-parser": "^1.1.0", "jsonc-parser": "^3.2.0", @@ -1923,6 +2304,32 @@ "vscode-textmate": "^8.0.0" } }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -1994,6 +2401,18 @@ "node": ">=8.0" } }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2027,29 +2446,31 @@ } }, "node_modules/typedoc": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz", - "integrity": "sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==", + "version": "0.25.13", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz", + "integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==", + "dev": true, "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", - "minimatch": "^9.0.0", - "shiki": "^0.14.1" + "minimatch": "^9.0.3", + "shiki": "^0.14.7" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 14.14" + "node": ">= 16" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x" } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", - "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2061,9 +2482,10 @@ } }, "node_modules/typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -2072,17 +2494,31 @@ "node": ">=4.2.0" } }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true + "node_modules/typescript-eslint": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.5.0.tgz", + "integrity": "sha512-eKhF39LRi2xYvvXh3h3S+mCxC01dZTIZBlka25o39i81VeQG+OZyfC4i2GEDspNclMRdXkg9uGhmvWMhjph2XQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "7.5.0", + "@typescript-eslint/parser": "7.5.0", + "@typescript-eslint/utils": "7.5.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } }, "node_modules/uri-js": { "version": "4.4.1", @@ -2096,12 +2532,14 @@ "node_modules/vscode-oniguruma": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true }, "node_modules/vscode-textmate": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", - "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==" + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true }, "node_modules/which": { "version": "2.0.2", @@ -2118,15 +2556,6 @@ "node": ">= 8" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -2161,12 +2590,6 @@ "async-limiter": "~1.0.0" } }, - "node_modules/xmlcreate": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", - "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", - "dev": true - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -2175,6 +2598,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index e06a9fe..96edc43 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,26 @@ { "name": "kiteconnect", - "version": "4.1.0", - "description": "The official JS client library for the Kite Connect trading APIs", - "main": "./dist", + "version": "5.0.0", + "description": "The official typescript client for the Kite Connect trading APIs", + "main": "./dist/lib/index.js", "types": "./types/index.d.ts", "scripts": { - "generate-docs": "typedoc --entryPoints \"lib/**/*.ts\" \"interfaces/**/*.ts\" --out ./docs", + "generate-docs": "npx typedoc --out ./docs", "build": "tsc --project tsconfig.json", "build-test": "tsc --project test/tsconfig.json", "eslint:fix": "eslint", "test": "npm run build && npm run build-test && mocha --allowJs test/**/*.js && rimraf **/*.js" }, + "files": [ + "dist", + "types", + "package.json", + "README.md", + "LICENSE" + ], "repository": { "type": "git", - "url": "git+https://github.com/zerodhatech/kiteconnectjs.git" + "url": "git+https://github.com/zerodha/kiteconnectjs.git" }, "keywords": [ "kiteconnect", @@ -23,25 +30,26 @@ "trading", "api", "stock", - "market" + "market", + "javascript", + "typescript" ], - "author": "Vivek R", + "author": "Rakesh Ranjan", "license": "MIT", "bugs": { - "url": "https://github.com/zerodhatech/kiteconnectjs/issues" + "url": "https://github.com/zerodha/kiteconnectjs/issues" }, - "homepage": "https://github.com/zerodhatech/kiteconnectjs#readme", + "homepage": "https://github.com/zerodha/kiteconnectjs#readme", "dependencies": { + "@microsoft/tsdoc": "^0.15.0", "axios": "^0.21.2", "chai": "^4.3.6", "crypto-js": "^4.0.0", "mocha": "^10.0.0", "nock": "^13.2.4", "papaparse": "^5.3.1", - "querystring": "^0.2.1", + "qs": "^6.12.1", "rimraf": "^3.0.2", - "taffydb": "^2.7.3", - "typedoc": "^0.24.8", "ws": "^6.2.2" }, "devDependencies": { @@ -49,15 +57,17 @@ "@types/crypto-js": "^4.1.1", "@types/mocha": "^10.0.1", "@types/node": "^18.11.18", - "@types/papaparse": "^5.3.5", + "@types/papaparse": "^5.3.14", + "@types/qs": "^6.9.15", "@types/ws": "^8.5.4", - "eslint": "^8.30.0", - "jsdoc": "^4.0.2", - "minami": "^1.1.1", - "typescript": "^4.9.4" + "eslint": "^8.57.0", + "eslint-plugin-tsdoc": "^0.2.17", + "typedoc": "^0.25.13", + "typescript": "^4.9.5", + "typescript-eslint": "^7.5.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=18.0.0" }, "engineStrict": true } diff --git a/test/kiteconnect-mocks b/test/kiteconnect-mocks index 02d0831..9fffb97 160000 --- a/test/kiteconnect-mocks +++ b/test/kiteconnect-mocks @@ -1 +1 @@ -Subproject commit 02d0831c44d30a9f4ac647a3a2c89b3c0279f317 +Subproject commit 9fffb9750d409f0e2d25b65f731a0f3283178e70 diff --git a/test/test.ts b/test/test.ts index 5a2ec12..d5382dc 100644 --- a/test/test.ts +++ b/test/test.ts @@ -5,9 +5,9 @@ import { expect } from 'chai'; import * as path from 'path'; import * as fs from 'fs'; //@ts-ignore -import { default as KiteConnect } from '../lib/connect'; +import { KiteConnect } from '../lib/connect'; import { AnyObject } from '../interfaces/any-object.js'; -import { ExchangeTypes, GTTStatusTypes, OrderTypes, PositionTypes, Products, TransactionTypes, Varieties } from '../interfaces'; +import { Exchanges, GTTStatusTypes, OrderTypes, PositionTypes, Products, TransactionTypes, Varieties } from '../interfaces'; const mockDir = './kiteconnect-mocks'; @@ -177,9 +177,13 @@ function testSuite(){ // orderMargins .post('/margins/orders') - .query({ mode: null }) + .query({mode: 'compact'}) .reply(200, parseJson('order_margins.json')) + // getvirtualContractNote + .post('/charges/orders') + .reply(200, parseJson('virtual_contract_note.json')) + // fetch user profile detail describe('getProfile', function() { @@ -217,7 +221,7 @@ function testSuite(){ describe('placeOrder', function() { it('Place market order', (done) => { kc.placeOrder(Varieties.TEST, { - 'exchange': ExchangeTypes.NSE, + 'exchange': Exchanges.NSE, 'tradingsymbol': 'SBIN', 'transaction_type': TransactionTypes.BUY, 'quantity': 1, @@ -348,7 +352,7 @@ function testSuite(){ it('convert existing position', (done) => { kc.convertPosition ({ 'tradingsymbol': 'SBIN', - 'exchange': ExchangeTypes.NSE, + 'exchange': Exchanges.NSE, 'transaction_type': TransactionTypes.BUY, 'position_type': PositionTypes.POSITION_TYPE_DAY, 'quantity':1, @@ -554,16 +558,20 @@ function testSuite(){ kc.placeGTT({ trigger_type: GTTStatusTypes.GTT_TYPE_OCO, tradingsymbol: 'SBIN', - exchange: ExchangeTypes.NSE, + exchange: Exchanges.NSE, trigger_values: [350, 450], last_price: 400, orders: [{ + exchange: "NSE", + tradingsymbol: "SBIN", transaction_type: TransactionTypes.SELL, quantity: 1, product: Products.CNC, order_type: OrderTypes.LIMIT, price: 350 }, { + exchange: "NSE", + tradingsymbol: "SBIN", transaction_type: TransactionTypes.SELL, quantity: 1, product: Products.CNC, @@ -613,16 +621,20 @@ function testSuite(){ kc.modifyGTT(100, { trigger_type: GTTStatusTypes.GTT_TYPE_OCO, tradingsymbol: 'SBIN', - exchange: ExchangeTypes.NSE, + exchange: Exchanges.NSE, trigger_values: [358, 458], last_price: 400, orders: [{ + exchange: "NSE", + tradingsymbol: "SBIN", transaction_type: TransactionTypes.SELL, quantity: 1, product: Products.CNC, order_type: OrderTypes.LIMIT, price: 358 }, { + exchange: "NSE", + tradingsymbol: "SBIN", transaction_type: TransactionTypes.SELL, quantity: 1, product: Products.CNC, @@ -653,15 +665,17 @@ function testSuite(){ it('Fetch order margin detail', (done) => { kc.orderMargins([ { - 'exchange': ExchangeTypes.NSE, + 'exchange': Exchanges.NSE, 'tradingsymbol': 'SBIN', 'transaction_type': TransactionTypes.BUY, 'variety': Varieties.VARIETY_REGULAR, 'product': Products.MIS, 'order_type': OrderTypes.MARKET, - 'quantity': 1 + 'quantity': 1, + 'price': 0, + 'trigger_price':0 } - ]) + ], 'compact') .then(function(response: AnyObject) { expect(response).to.have.nested.property('[0].type'); expect(response).to.have.nested.property('[0].var'); @@ -675,4 +689,34 @@ function testSuite(){ }).catch(done); }) }); + + // Virtual contract note API + describe('getvirtualContractNote', function() { + it('Fetch Virtual contract note charges', (done) => { + kc.getvirtualContractNote([ + { + 'order_id': '111111111', + 'exchange': Exchanges.NSE, + 'tradingsymbol': 'SBIN', + 'transaction_type': TransactionTypes.BUY, + 'variety': Varieties.VARIETY_REGULAR, + 'product': Products.MIS, + 'order_type': OrderTypes.MARKET, + 'quantity': 1, + 'average_price': 560 + } + ]) + .then(function(response: AnyObject) { + expect(response).to.have.nested.property('[0].transaction_type'); + expect(response).to.have.nested.property('[0].tradingsymbol'); + expect(response).to.have.nested.property('[0].price'); + // Order charges + expect(response).to.have.nested.property('[0].charges.total'); + expect(response).to.have.nested.property('[0].charges.transaction_tax'); + expect(response).to.have.nested.property('[0].charges.transaction_tax_type'); + expect(response).to.have.nested.property('[0].charges.gst.total'); + return done(); + }).catch(done); + }) + }); } diff --git a/test/test_ticker.ts b/test/test_ticker.ts index 72941dc..b002c38 100644 --- a/test/test_ticker.ts +++ b/test/test_ticker.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import * as fs from 'fs'; import { expect } from 'chai'; //@ts-ignore -import { default as KiteTicker } from '../lib/ticker'; +import { KiteTicker } from '../lib/ticker'; // Ticker binary packets diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..76f4369 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,11 @@ +{ + "out": "docs", + "name": "Kiteconnect typescript client", + "excludeExternals": true, + "excludePrivate": true, + "excludeProtected": true, + "entryPoints": [ + "lib/index.ts", + "interfaces/index.ts" + ] +} diff --git a/types/connect.d.ts b/types/connect.d.ts index fea3be4..de52a53 100644 --- a/types/connect.d.ts +++ b/types/connect.d.ts @@ -1,4 +1,4 @@ -type Exchange = +type Exchanges = | Connect['EXCHANGE_NSE'] | Connect['EXCHANGE_BSE'] | Connect['EXCHANGE_NFO'] @@ -11,6 +11,10 @@ type TransactionType = | Connect['TRANSACTION_TYPE_BUY'] | Connect['TRANSACTION_TYPE_SELL']; +type PositionTypes = + | Connect['POSITION_TYPE_DAY'] + | Connect['POSITION_TYPE_OVERNIGHT']; + type Product = | Connect['PRODUCT_NRML'] | Connect['PRODUCT_MIS'] @@ -25,7 +29,6 @@ type OrderType = type Variety = | Connect['VARIETY_AMO'] | Connect['VARIETY_AUCTION'] - | Connect['VARIETY_BO'] | Connect['VARIETY_CO'] | Connect['VARIETY_ICEBERG'] | Connect['VARIETY_REGULAR']; @@ -302,7 +305,7 @@ type Instrument = { /** * Exchange */ - exchange: Exchange; + exchange: Exchanges; }; type UserMargin = { @@ -1067,7 +1070,7 @@ type MarginOrder = { /** * Name of the exchange(eg. NSE, BSE, NFO, CDS, MCX) */ - exchange: Exchange; + exchange: Exchanges; /** * Trading symbol of the instrument */ @@ -1102,6 +1105,134 @@ type MarginOrder = { trigger_price: number; }; +type VirtualContractParam = { + /** + * Unique order ID (It can be any random string to calculate charges for an imaginary order) + */ + order_id: number | string; + /** + * Name of the exchange(eg. NSE, BSE, NFO, CDS, MCX) + */ + exchange: Exchanges; + /** + * Trading symbol of the instrument + */ + tradingsymbol: string; + /** + * eg. BUY, SELL + */ + transaction_type: TransactionType; + /** + * Order variety (regular, amo, bo, co etc.) + */ + variety: Variety; + /** + * Margin product to use for the order + */ + product: Product; + /** + * Order type (MARKET, LIMIT etc.) + */ + order_type: OrderType; + /** + * Quantity of the order + */ + quantity: number; + /** + * Average price at which the order was executed (Note: Should be non-zero). + */ + average_price: number; +}; + +type VirtualContractResponse = { + /** + * Transaction type of the order (e.g., BUY, SELL) + */ + transaction_type: string; + /** + * Symbol of the instrument + */ + tradingsymbol: string; + /** + * Exchange on which the order was placed + */ + exchange: string; + /** + * Type of order variety (e.g., regular) + */ + variety: string; + /** + * Type of product (e.g., CNC) + */ + product: string; + /** + * Type of order placed (e.g., MARKET) + */ + order_type: string; + /** + * Quantity of the order + */ + quantity: number; + /** + * Price at which the order was placed + */ + price: number; + /** + * Details of charges incurred for the order + */ + charges: { + /** + * Transaction tax amount + */ + transaction_tax: number; + /** + * Type of transaction tax (e.g., STT) + */ + transaction_tax_type: string; + /** + * Exchange turnover charge + */ + exchange_turnover_charge: number; + /** + * SEBI turnover charge + */ + sebi_turnover_charge: number; + /** + * Brokerage charge + */ + brokerage: number; + /** + * Stamp duty charge + */ + stamp_duty: number; + /** + * GST charges + */ + gst: { + /** + * Integrated GST amount + */ + igst: number; + /** + * Central GST amount + */ + cgst: number; + /** + * State GST amount + */ + sgst: number; + /** + * Total GST amount + */ + total: number; + }; + /** + * Total charges incurred for the order + */ + total: number; + }; +} + type GTTParams = { /** * GTT type, its either self.GTT_TYPE_OCO or self.GTT_TYPE_SINGLE. @@ -1114,7 +1245,7 @@ type GTTParams = { /** * Exchange in which instrument is listed (NSE, BSE, NFO, BFO, CDS, MCX). */ - exchange: Exchange; + exchange: Exchanges; /** * List of trigger values, number of items depends on trigger type. */ @@ -1147,7 +1278,7 @@ type GTTParams = { }[]; }; -type KiteConnectParams = { +export type KiteConnectParams = { /** * API key issued to you. */ @@ -1195,8 +1326,6 @@ type Connect = { PRODUCT_MIS: 'MIS'; PRODUCT_CNC: 'CNC'; PRODUCT_NRML: 'NRML'; - PRODUCT_CO: 'CO'; - PRODUCT_BO: 'BO'; // Order types ORDER_TYPE_MARKET: 'MARKET'; @@ -1206,7 +1335,6 @@ type Connect = { // Varieties VARIETY_REGULAR: 'regular'; - VARIETY_BO: 'bo'; VARIETY_CO: 'co'; VARIETY_AMO: 'amo'; VARIETY_ICEBERG: 'iceberg'; @@ -1278,7 +1406,7 @@ type Connect = { */ cancelOrder: ( variety: 'regular' | 'bo' | 'co' | 'amo' | 'iceberg' | 'auction', - order_id: string, + order_id: number | string, params?: { /** * Parent order id incase of multilegged orders. @@ -1295,7 +1423,7 @@ type Connect = { /** * Exchange in which instrument is listed (NSE, BSE, NFO, BFO, CDS, MCX). */ - exchange: Exchange; + exchange: Exchanges; /** * Tradingsymbol of the instrument (ex. RELIANCE, INFY). */ @@ -1307,11 +1435,11 @@ type Connect = { /** * Position type (overnight, day). */ - position_type: 'overnight' | 'day'; + position_type: PositionTypes; /** * Position quantity */ - quantity: string; + quantity: string | number; /** * Current product code (NRML, MIS, CNC). */ @@ -1326,7 +1454,7 @@ type Connect = { * Get list of order history. * @param trigger_id GTT ID */ - deleteGTT: (trigger_id: string) => Promise<{ trigger_id: number }>; + deleteGTT: (trigger_id: number | string) => Promise<{ trigger_id: number }>; /** * Exit an order @@ -1361,7 +1489,7 @@ type Connect = { * Get list of order history. * @param trigger_id GTT trigger ID */ - getGTT: (trigger_id: string) => Promise; + getGTT: (trigger_id: number | string) => Promise; /** * Get GTTs list @@ -1393,7 +1521,7 @@ type Connect = { * @param oi is a bool flag to include OI data for futures and options instruments. Defaults to false. */ getHistoricalData: ( - instrument_token: string, + instrument_token: number | string, interval: | 'minute' | 'day' @@ -1445,7 +1573,7 @@ type Connect = { * * @param exchange Filter instruments based on exchange (NSE, BSE, NFO, BFO, CDS, MCX). If no `segment` is specified, all instruments are returned. */ - getInstruments: (exchange?: Exchange[]) => Promise; + getInstruments: (exchange?: Exchanges) => Promise; /** * Get the remote login url to which a user should be redirected to initiate the login flow. @@ -1457,7 +1585,7 @@ type Connect = { * @param instruments is a list of instruments, Instrument are in the format of `exchange:tradingsymbol`. * For example NSE:INFY and for list of instruments ['NSE:RELIANCE', 'NSE:SBIN', ..] */ - getLTP: (instruments: string[]) => Promise< + getLTP: (instruments: string | string[]) => Promise< Record< string, { @@ -1511,7 +1639,7 @@ type Connect = { * @param instruments is a list of instruments, Instrument are in the format of `exchange:tradingsymbol`. * For example NSE:INFY and for list of instruments ['NSE:RELIANCE', 'NSE:SBIN', ..] */ - getOHLC: (instruments: string[]) => Promise< + getOHLC: (instruments: string | string[]) => Promise< Record< string, { @@ -1549,7 +1677,7 @@ type Connect = { * Get list of order history. * @param order_id ID of the order whose order details to be retrieved. */ - getOrderHistory: (order_id: string) => Promise; + getOrderHistory: (order_id: number | string) => Promise; /** * Get list of orders. @@ -1562,7 +1690,7 @@ type Connect = { * These trades are individually recorded under an order. * @param order_id ID of the order whose trades are to be retrieved. */ - getOrderTrades: (order_id: string) => Promise; + getOrderTrades: (order_id: number | string) => Promise; /** * Retrieve positions. @@ -1629,7 +1757,7 @@ type Connect = { * @param instruments is a list of instruments, Instrument are in the format of `exchange:tradingsymbol`. * For example NSE:INFY and for list of instruments ['NSE:RELIANCE', 'NSE:SBIN', ..] */ - getQuote: (instruments: string[]) => Promise< + getQuote: (instruments: string | string[]) => Promise< Record< string, { @@ -1762,7 +1890,7 @@ type Connect = { * @param transaction_type Transaction type (BUY or SELL). */ getTriggerRange: ( - exchange: Exchange, + exchange: Exchanges, tradingsymbol: string, transaction_type: TransactionType ) => Promise; @@ -1786,7 +1914,7 @@ type Connect = { * @param params Modify params */ modifyGTT: ( - trigger_id: string, + trigger_id: number | string, params: GTTParams ) => Promise<{ trigger_id: number }>; @@ -1826,7 +1954,7 @@ type Connect = { */ modifyOrder: ( variety: Variety, - order_id: string, + order_id: number | string, params: { /** * Order quantity @@ -1868,7 +1996,7 @@ type Connect = { orderBasketMargins: ( orders: MarginOrder[], consider_positions?: boolean, - mode?: 'compact' + mode?: string ) => Promise<{ initial: Margin; final: Margin; @@ -1877,10 +2005,18 @@ type Connect = { /** * Fetch required margin for order/list of orders - * @param orders Margin fetch orders. + * @param MarginOrder Margin fetch orders. * @param mode (optional) Compact mode will only give the total margins */ - orderMargins: (orders: MarginOrder[], mode?: 'compact') => Promise; + orderMargins: (orders: MarginOrder[], mode?:string) => Promise; + + /** + * Retrieves the virtual contract note for the specified orders. + * + * @param {Order[]} VirtualContractParam - The array of orders for which to retrieve the virtual contract note. + * @returns {Promise} A Promise that resolves with the virtual contract note. + */ + getvirtualContractNote: (orders: VirtualContractParam[]) => Promise; /** * Place GTT. @@ -1962,7 +2098,7 @@ type Connect = { /** * Exchange in which instrument is listed (NSE, BSE, NFO, BFO, CDS, MCX). */ - exchange: Exchange; + exchange: Exchanges; /** * Tradingsymbol of the instrument (ex. RELIANCE, INFY). */ @@ -2093,47 +2229,47 @@ type KiteConnect = { * ------------------------ * ~~~~ * - * var KiteConnect = require('kiteconnect').KiteConnect; - * - * var kc = new KiteConnect({api_key: 'your_api_key'}); - * - * kc.generateSession('request_token', 'api_secret') - * .then(function(response) { - * init(); - * }) - * .catch(function(err) { - * console.log(err); - * }) - * - * function init() { - * // Fetch equity margins. - * // You can have other api calls here. - * - * kc.getMargins() - * .then(function(response) { - * // You got user's margin details. - * }).catch(function(err) { - * // Something went wrong. - * }); - * } - * ~~~~ - * - * API promises - * ------------- - * All API calls returns a promise which you can use to call methods like `.then(...)` and `.catch(...)`. - * - * ~~~~ - * kiteConnectApiCall - * .then(function(v) { - * // On success - * }) - * .catch(function(e) { - * // On rejected - * }); + * import { KiteConnect } from 'kiteconnect'; + * + * const apiKey = 'your_api_key' + * const apiSecret = 'your_api_secret' + * const requestToken = 'your_request_token' + * + * const kc = new KiteConnect({ api_key: apiKey }) + * + * async function init() { + * try { + * await generateSession() + * await getProfile() + * } catch (err) { + * console.error(err) + * } + * } + * + * async function generateSession() { + * try { + * const response = await kc.generateSession(requestToken, apiSecret) + * kc.setAccessToken(response.access_token) + * console.log('Session generated:', response) + * } catch (err) { + * console.error('Error generating session:', err) + * } + * } + * + * async function getProfile() { + * try { + * const profile = await kc.getProfile() + * console.log('Profile:', profile) + * } catch (err) { + * console.error('Error getting profile:', err) + * } + * } + * // Initialize the API calls + * init(); * ~~~~ * * @example Initialize KiteConnect object - * var kc = KiteConnect('my_api_key', {timeout: 10, debug: false}) + * const kc = new KiteConnect({ api_key: apiKey })}) */ new (params: KiteConnectParams): Connect; }; diff --git a/types/ticker.d.ts b/types/ticker.d.ts index 293e1f9..045cad1 100644 --- a/types/ticker.d.ts +++ b/types/ticker.d.ts @@ -1,275 +1,253 @@ type KiteTickerParams = { - /** - * API key issued you. - */ - api_key: string; - /** - * Access token obtained after successful login flow. - */ - access_token: string; - /** - * Enable/Disable auto reconnect. Enabled by default. - */ - reconnect?: boolean; - /** - * is maximum number re-connection attempts. Defaults to 50 attempts and maximum up to 300 attempts. - */ - max_retry?: number; - /** - * in seconds is the maximum delay after which subsequent re-connection interval will become constant. Defaults to 60s and minimum acceptable value is 5s. - */ - max_delay?: number; - }; + /** + * API key issued you. + */ + api_key: string; + /** + * Access token obtained after successful login flow. + */ + access_token: string; + /** + * Enable/Disable auto reconnect. Enabled by default. + */ + reconnect?: boolean; + /** + * is maximum number re-connection attempts. Defaults to 50 attempts and maximum up to 300 attempts. + */ + max_retry?: number; + /** + * in seconds is the maximum delay after which subsequent re-connection interval will become constant. Defaults to 60s and minimum acceptable value is 5s. + */ + max_delay?: number; +}; - type Ticker = { - /** - * Set mode full - */ - modeFull: 'full'; - /** - * this.modeLTP - */ - modeLTP: 'ltp'; - /** - * this.modeQuote - */ - modeQuote: 'quote'; +export type Ticker = { + /** + * Set mode full + */ + modeFull: 'full'; + /** + * this.modeLTP + */ + modeLTP: 'ltp'; + /** + * this.modeQuote + */ + modeQuote: 'quote'; + + /** + * Auto reconnect settings + * @param Enable or disable auto disconnect, defaults to false + * @param max_retry is maximum number re-connection attempts. Defaults to 50 attempts and maximum up to 300 attempts. + * @param max_delay in seconds is the maximum delay after which subsequent re-connection interval will become constant. Defaults to 60s and minimum acceptable value is 5s. + * @returns + */ + autoReconnect: ( + Enable: boolean, + max_retry?: number, + max_delay?: number + ) => void; + /** + * Initiate a websocket connection + */ + connect: () => void; + /** + * Check if the ticker is connected + */ + connected: () => boolean; + /** + * Check if the ticker is connected + */ + disconnect: () => boolean; + /** + * Register websocket event callbacks + * Available events + * ~~~~ + * connect - when connection is successfully established. + * ticks - when ticks are available (Arrays of `ticks` object as the first argument). + * disconnect - when socket connection is disconnected. Error is received as a first param. + * error - when socket connection is closed with error. Error is received as a first param. + * close - when socket connection is closed cleanly. + * reconnect - When reconnecting (current re-connection count and reconnect interval as arguments respectively). + * noreconnect - When re-connection fails after n number times. + * order_update - When order update (postback) is received for the connected user (Data object is received as first argument). + * message - when binary message is received from the server. + * ~~~~ + * + * @example + * ticker.on('ticks', callback); + * ticker.on('connect', callback); + * ticker.on('disconnect', callback); + */ + on: ( + event: + | 'connect' + | 'ticks' + | 'disconnect' + | 'error' + | 'close' + | 'reconnect' + | 'noreconnect' + | 'order_update', + callback: Function + ) => void; + /** + * Set modes to array of tokens + * @param mode mode to set + * @param tokens Array of tokens to be subscribed + * + * @example + * ticker.setMode(ticker.modeFull, [738561]); + */ + setMode: (mode: 'ltp' | 'quote' | 'full', tokens: number[]) => number[]; + /** + * Subscribe to array of tokens + * @param tokens Array of tokens to be subscribed + * + * @example + * ticker.subscribe([738561]); + */ + subscribe: (tokens: number[]) => number[]; + /** + * Unsubscribe to array of tokens + * @param tokens Array of tokens to be unsubscribed + * + * @example + * ticker.unsubscribe([738561]); + */ + unsubscribe: (tokens: number[]) => number[]; +}; - /** - * Auto reconnect settings - * @param Enable or disable auto disconnect, defaults to false - * @param max_retry is maximum number re-connection attempts. Defaults to 50 attempts and maximum up to 300 attempts. - * @param max_delay in seconds is the maximum delay after which subsequent re-connection interval will become constant. Defaults to 60s and minimum acceptable value is 5s. - * @returns - */ - autoReconnect: ( - Enable: boolean, - max_retry?: number, - max_delay?: number - ) => void; - /** - * Initiate a websocket connection - */ - connect: () => void; - /** - * Check if the ticker is connected - */ - connected: () => boolean; - /** - * Check if the ticker is connected - */ - disconnect: () => boolean; - /** - * Register websocket event callbacks - * Available events - * ~~~~ - * connect - when connection is successfully established. - * ticks - when ticks are available (Arrays of `ticks` object as the first argument). - * disconnect - when socket connection is disconnected. Error is received as a first param. - * error - when socket connection is closed with error. Error is received as a first param. - * close - when socket connection is closed cleanly. - * reconnect - When reconnecting (current re-connection count and reconnect interval as arguments respectively). - * noreconnect - When re-connection fails after n number times. - * order_update - When order update (postback) is received for the connected user (Data object is received as first argument). - * message - when binary message is received from the server. - * ~~~~ - * - * @example - * ticker.on('ticks', callback); - * ticker.on('connect', callback); - * ticker.on('disconnect', callback); - */ - on: ( - event: - | 'connect' - | 'ticks' - | 'disconnect' - | 'error' - | 'close' - | 'reconnect' - | 'noreconnect' - | 'order_update', - callback: Function - ) => void; - /** - * Set modes to array of tokens - * @param mode mode to set - * @param tokens Array of tokens to be subscribed - * - * @example - * ticker.setMode(ticker.modeFull, [738561]); - */ - setMode: (mode: 'ltp' | 'quote' | 'full', tokens: number[]) => number[]; - /** - * Subscribe to array of tokens - * @param tokens Array of tokens to be subscribed - * - * @example - * ticker.subscribe([738561]); - */ - subscribe: (tokens: number[]) => number[]; - /** - * Unsubscribe to array of tokens - * @param tokens Array of tokens to be unsubscribed - * - * @example - * ticker.unsubscribe([738561]); - */ - unsubscribe: (tokens: number[]) => number[]; - }; +export type KiteTicker = { + /** + * The WebSocket client for connecting to Kite connect streaming quotes service. + * + * Getting started: + * --------------- + * + * import { KiteTicker } from "kiteconnect"; + * + * const apiKey = 'your_api_key'; + * const accessToken = 'generated_access_token'; + * + * const ticker = new KiteTicker({ + * api_key: apiKey, + * access_token: accessToken + * }); + * + * ticker.connect(); + * ticker.on('ticks', onTicks); + * ticker.on('connect', subscribe); + * ticker.on('disconnect', onDisconnect); + * ticker.on('error', onError); + * ticker.on('close', onClose);` + * ticker.on('order_update', onTrade); + * + * function onTicks(ticks: any[]): void { + * console.log("Ticks", ticks); + * } + * + * function subscribe(): void { + * const tokens = [738561, 256265]; + * ticker.subscribe(tokens); + * ticker.setMode(ticker.modeFull, tokens); + * } + * + * function onDisconnect(error: Error): void { + * console.log("Closed connection on disconnect", error); + * } + * + * function onError(error: Error): void { + * console.log("Closed connection on error", error); + * } + * + * function onClose(reason: string): void { + * console.log("Closed connection on close", reason); + * } + * + * function onTrade(order: any): void { + * console.log("Order update", order); + * } + * + * Tick structure (passed to the tick callback you assign): + * --------------------------- + * [{ + * tradable: true, + * mode: 'full', + * instrument_token: 738561, + * last_price: 2940.7, + * last_traded_quantity: 1, + * average_traded_price: 2933.55, + * volume_traded: 2827705, + * total_buy_quantity: 213779, + * total_sell_quantity: 425119, + * ohlc: { open: 2915, high: 2949, low: 2910.35, close: 2913.35 }, + * change: 0.9387818147493404, + * last_trade_time: 2024-06-12T07:16:09.000Z, + * exchange_timestamp: 2024-06-12T07:16:09.000Z, + * oi: 0, + * oi_day_high: 0, + * oi_day_low: 0, + * depth: { buy: [Array], sell: [Array] } + * }, + * { + * tradable: false, + * mode: 'full', + * instrument_token: 256265, + * last_price: 23406.85, + * ohlc: { high: 23441.95, low: 23295.95, open: 23344.45, close: 23264.85 }, + * change: 0.6103628435171514, + * exchange_timestamp: 2024-06-12T07:16:09.000Z + * } + * ] + * + * Auto reconnection + * ----------------- + * Auto reonnection is enabled by default and it can be disabled by passing `reconnect` param while initialising `KiteTicker`. + * + * Auto reonnection mechanism is based on [Exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) algorithm in which + * next retry interval will be increased exponentially. `max_delay` and `max_tries` params can be used to tweak + * the alogrithm where `max_delay` is the maximum delay after which subsequent reconnection interval will become constant and + * `max_tries` is maximum number of retries before it quits reconnection. + * For example if `max_delay` is 60 seconds and `max_tries` is 50 then the first reconnection interval starts from + * minimum interval which is 2 seconds and keep increasing up to 60 seconds after which it becomes constant and when reconnection attempt + * is reached upto 50 then it stops reconnecting. + * Callback `reconnect` will be called with current reconnect attempt and next reconnect interval and + * `on_noreconnect` is called when reconnection attempts reaches max retries. + * + * Here is an example demonstrating auto reconnection. + * + * import { KiteTicker } from "kiteconnect"; + * + * const apiKey = 'your_api_key'; + * const accessToken = 'generated_access_token'; + * const ticker = new KiteTicker({ + * api_key: 'api_key', + * access_token: 'access_token' + * }) + * ticker.autoReconnect(true, 10, 5); + * ticker.connect(); + * ticker.on('ticks', onTicks); + * ticker.on('connect', subscribe); + * ticker.on('noreconnect', () => { + * console.log('noreconnect') + * }) + * ticker.on('reconnect', (reconnect_count:any, reconnect_interval:any) => { + * console.log('Reconnecting: attempt - ', reconnect_count, ' interval - ', reconnect_interval) + * }) + * + * function onTicks(ticks: any[]) { + * console.log('Ticks', ticks) + * } + * + * function subscribe() { + * const items = [738561] + * ticker.subscribe(items) + * ticker.setMode(ticker.modeFull, items) + * } + */ + new (params: KiteTickerParams): Ticker; +}; - type KiteTicker = { - /** - * The WebSocket client for connecting to Kite connect streaming quotes service. - * - * Getting started: - * --------------- - * - * import { KiteTicker } from 'kiteconnect'; - * const ticker = new KiteTicker({ - * api_key: 'api_key', - * access_token: 'access_token' - * }); - * - * ticker.connect(); - * ticker.on('ticks', onTicks); - * ticker.on('connect', subscribe); - * - * function onTicks(ticks) { - * console.log('Ticks', ticks); - * } - * - * function subscribe() { - * const items = [738561]; - * ticker.subscribe(items); - * ticker.setMode(ticker.modeFull, items); - * } - * - * Tick structure (passed to the tick callback you assign): - * --------------------------- - * [{ tradable: true, - * mode: 'full', - * instrument_token: 208947, - * last_price: 3939, - * last_quantity: 1, - * average_price: 3944.77, - * volume: 28940, - * buy_quantity: 4492, - * sell_quantity: 4704, - * ohlc: { open: 3927, high: 3955, low: 3927, close: 3906 }, - * change: 0.8448540706605223, - * last_trade_time: 1515491369, - * timestamp: 1515491373, - * oi: 24355, - * oi_day_high: 0, - * oi_day_low: 0, - * depth: - * buy: [{ - * quantity: 59, - * price: 3223, - * orders: 5 - * }, - * { - * quantity: 164, - * price: 3222, - * orders: 15 - * }, - * { - * quantity: 123, - * price: 3221, - * orders: 7 - * }, - * { - * quantity: 48, - * price: 3220, - * orders: 7 - * }, - * { - * quantity: 33, - * price: 3219, - * orders: 5 - * }], - * sell: [{ - * quantity: 115, - * price: 3224, - * orders: 15 - * }, - * { - * quantity: 50, - * price: 3225, - * orders: 5 - * }, - * { - * quantity: 175, - * price: 3226, - * orders: 14 - * }, - * { - * quantity: 49, - * price: 3227, - * orders: 10 - * }, - * { - * quantity: 106, - * price: 3228, - * orders: 13 - * }] - * } - * }, ...] - * - * Auto reconnection - * ----------------- - * Auto reonnection is enabled by default and it can be disabled by passing `reconnect` param while initialising `KiteTicker`. - * - * Auto reonnection mechanism is based on [Exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) algorithm in which - * next retry interval will be increased exponentially. `max_delay` and `max_tries` params can be used to tweak - * the alogrithm where `max_delay` is the maximum delay after which subsequent reconnection interval will become constant and - * `max_tries` is maximum number of retries before it quits reconnection. - * For example if `max_delay` is 60 seconds and `max_tries` is 50 then the first reconnection interval starts from - * minimum interval which is 2 seconds and keep increasing up to 60 seconds after which it becomes constant and when reconnection attempt - * is reached upto 50 then it stops reconnecting. - * Callback `reconnect` will be called with current reconnect attempt and next reconnect interval and - * `on_noreconnect` is called when reconnection attempts reaches max retries. - * - * Here is an example demonstrating auto reconnection. - * - * import { KiteTicker } from 'kiteconnect'; - * const ticker = new KiteTicker({ - * api_key: 'api_key', - * access_token: 'access_token' - * }); - * - * // set autoreconnect with 10 maximum reconnections and 5 second interval - * ticker.autoReconnect(true, 10, 5) - * ticker.connect(); - * ticker.on('ticks', onTicks); - * ticker.on('connect', subscribe); - * - * ticker.on('noreconnect', function() { - * console.log('noreconnect'); - * }); - * - * ticker.on('reconnect', function(reconnect_count, reconnect_interval) { - * console.log('Reconnecting: attempt - ', reconnect_count, ' interval - ', reconnect_interval); - * }); - * - * ticker.on('message', function(binary_msg){ - * console.log('Binary message', binary_msg); - * }); - * - * function onTicks(ticks) { - * console.log('Ticks', ticks); - * } - * - * function subscribe() { - * const items = [738561]; - * ticker.subscribe(items); - * ticker.setMode(ticker.modeFull, items); - * } - * - */ - new (params: KiteTickerParams): Ticker; - }; - - declare const KiteTicker: KiteTicker; - export default KiteTicker; \ No newline at end of file +declare const KiteTicker: KiteTicker; +export default KiteTicker; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 379d62e..5cb62f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,19 +2,31 @@ # yarn lockfile v1 -"@babel/parser@^7.20.15": - version "7.21.4" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz" - integrity sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw== +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@eslint/eslintrc@^1.4.0": - version "1.4.0" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz" - integrity sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A== +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": + version "4.10.0" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.4.0" + espree "^9.6.0" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -22,13 +34,18 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== + +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -36,17 +53,30 @@ resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.3" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== -"@jsdoc/salty@^0.2.1": - version "0.2.5" - resolved "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz" - integrity sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw== +"@microsoft/tsdoc-config@0.16.2": + version "0.16.2" + resolved "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz" + integrity sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw== dependencies: - lodash "^4.17.21" + "@microsoft/tsdoc" "0.14.2" + ajv "~6.12.6" + jju "~1.4.0" + resolve "~1.19.0" + +"@microsoft/tsdoc@^0.15.0": + version "0.15.0" + resolved "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.15.0.tgz" + integrity sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA== + +"@microsoft/tsdoc@0.14.2": + version "0.14.2" + resolved "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz" + integrity sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -56,12 +86,12 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -79,23 +109,10 @@ resolved "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.1.tgz" integrity sha512-BG7fQKZ689HIoc5h+6D2Dgq1fABRa0RbBWKBd9SP/MVRVXROflpm5fhwyATX5duFmbStzyzyycPB8qUYKDH3NA== -"@types/linkify-it@*": - version "3.0.2" - resolved "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz" - integrity sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA== - -"@types/markdown-it@*", "@types/markdown-it@^12.2.3": - version "12.2.3" - resolved "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz" - integrity sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ== - dependencies: - "@types/linkify-it" "*" - "@types/mdurl" "*" - -"@types/mdurl@*": - version "1.0.2" - resolved "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz" - integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== +"@types/json-schema@^7.0.12": + version "7.0.15" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/mocha@^10.0.1": version "10.0.1" @@ -107,13 +124,23 @@ resolved "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz" integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== -"@types/papaparse@^5.3.5": - version "5.3.5" - resolved "https://registry.npmjs.org/@types/papaparse/-/papaparse-5.3.5.tgz" - integrity sha512-R1icl/hrJPFRpuYj9PVG03WBAlghJj4JW9Py5QdR8FFSxaLmZRyu7xYDCCBZIJNfUv3MYaeBbhBoX958mUTAaw== +"@types/papaparse@^5.3.14": + version "5.3.14" + resolved "https://registry.npmjs.org/@types/papaparse/-/papaparse-5.3.14.tgz" + integrity sha512-LxJ4iEFcpqc6METwp9f6BV6VVc43m6MfH0VqFosHvrUgfXiFe6ww7R3itkOQ+TCK6Y+Iv/+RnnvtRZnkc5Kc9g== dependencies: "@types/node" "*" +"@types/qs@^6.9.15": + version "6.9.15" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz" + integrity sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg== + +"@types/semver@^7.5.0": + version "7.5.8" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== + "@types/ws@^8.5.4": version "8.5.4" resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz" @@ -121,22 +148,113 @@ dependencies: "@types/node" "*" +"@typescript-eslint/eslint-plugin@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz" + integrity sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "7.5.0" + "@typescript-eslint/type-utils" "7.5.0" + "@typescript-eslint/utils" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^7.0.0", "@typescript-eslint/parser@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.5.0.tgz" + integrity sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ== + dependencies: + "@typescript-eslint/scope-manager" "7.5.0" + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/typescript-estree" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz" + integrity sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA== + dependencies: + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" + +"@typescript-eslint/type-utils@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz" + integrity sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw== + dependencies: + "@typescript-eslint/typescript-estree" "7.5.0" + "@typescript-eslint/utils" "7.5.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/types@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz" + integrity sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg== + +"@typescript-eslint/typescript-estree@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz" + integrity sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ== + dependencies: + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/visitor-keys" "7.5.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.5.0.tgz" + integrity sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "7.5.0" + "@typescript-eslint/types" "7.5.0" + "@typescript-eslint/typescript-estree" "7.5.0" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@7.5.0": + version "7.5.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz" + integrity sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA== + dependencies: + "@typescript-eslint/types" "7.5.0" + eslint-visitor-keys "^3.4.1" + "@ungap/promise-all-settled@1.1.2": version "1.1.2" resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.8.0: - version "8.8.1" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4, ajv@~6.12.6: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -157,9 +275,9 @@ ansi-regex@^5.0.1: integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-sequence-parser@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz" - integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== + version "1.1.1" + resolved "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" @@ -181,6 +299,11 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" @@ -208,11 +331,6 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bluebird@^3.7.2: - version "3.7.2" - resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -228,7 +346,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@~3.0.2: +braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -240,6 +358,17 @@ browser-stdout@1.3.1: resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -250,13 +379,6 @@ camelcase@^6.0.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -catharsis@^0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz" - integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== - dependencies: - lodash "^4.17.15" - chai@^4.3.6: version "4.3.6" resolved "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz" @@ -334,11 +456,11 @@ cross-spawn@^7.0.2: which "^2.0.1" crypto-js@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz" - integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== + version "4.2.0" + resolved "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz" + integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== -debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@4.3.4: +debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -362,11 +484,27 @@ deep-is@^0.1.3: resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + diff@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" @@ -379,21 +517,23 @@ emoji-regex@^8.0.0: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -entities@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" @@ -404,89 +544,84 @@ escape-string-regexp@4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-plugin-tsdoc@^0.2.17: + version "0.2.17" + resolved "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz" + integrity sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA== dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" + "@microsoft/tsdoc" "0.14.2" + "@microsoft/tsdoc-config" "0.16.2" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + esrecurse "^4.3.0" + estraverse "^5.2.0" -eslint@^8.30.0, eslint@>=5: - version "8.30.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz" - integrity sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ== - dependencies: - "@eslint/eslintrc" "^1.4.0" - "@humanwhocodes/config-array" "^0.11.8" +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.56.0, eslint@^8.57.0: + version "8.57.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" globals "^13.19.0" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.4.0: - version "9.4.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.8.0" + acorn "^8.9.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.1" -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -512,6 +647,17 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-glob@^3.2.9: + version "3.3.2" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + 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" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" @@ -570,39 +716,55 @@ flatted@^3.1.0: integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== follow-redirects@^1.14.0: - version "1.15.1" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz" - integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== + version "1.15.6" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + version "2.0.2" + resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== dependencies: - is-glob "^4.0.3" + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" -glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@^7.1.3, glob@7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" @@ -616,38 +778,76 @@ glob@^7.1.3, glob@7.2.0: path-is-absolute "^1.0.0" globals@^13.19.0: - version "13.19.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz" - integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== + version "13.24.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" -graceful-fs@^4.1.9: - 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== +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== has-flag@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +ignore@^5.2.0, ignore@^5.2.4: + version "5.3.1" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -680,6 +880,13 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-core-module@^2.1.0: + version "2.13.1" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" @@ -722,10 +929,10 @@ isexe@^2.0.0: resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -js-sdsl@^4.1.4: - version "4.2.0" - resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.2.0.tgz" - integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== +jju@~1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz" + integrity sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA== js-yaml@^4.1.0, js-yaml@4.1.0: version "4.1.0" @@ -734,34 +941,6 @@ js-yaml@^4.1.0, js-yaml@4.1.0: dependencies: argparse "^2.0.1" -js2xmlparser@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz" - integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== - dependencies: - xmlcreate "^2.0.4" - -jsdoc@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz" - integrity sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg== - dependencies: - "@babel/parser" "^7.20.15" - "@jsdoc/salty" "^0.2.1" - "@types/markdown-it" "^12.2.3" - bluebird "^3.7.2" - catharsis "^0.9.0" - escape-string-regexp "^2.0.0" - js2xmlparser "^4.0.2" - klaw "^3.0.0" - markdown-it "^12.3.2" - markdown-it-anchor "^8.4.1" - marked "^4.0.10" - mkdirp "^1.0.4" - requizzle "^0.2.3" - strip-json-comments "^3.1.0" - underscore "~1.13.2" - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" @@ -778,16 +957,9 @@ json-stringify-safe@^5.0.1: integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== - -klaw@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz" - integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== - dependencies: - graceful-fs "^4.1.9" + version "3.2.1" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== levn@^0.4.1: version "0.4.1" @@ -797,13 +969,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -linkify-it@^3.0.1: - version "3.0.3" - resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz" - integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== - dependencies: - uc.micro "^1.0.1" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" @@ -816,16 +981,6 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.set@^4.3.2: - version "4.3.2" - resolved "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz" - integrity sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg== - -lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - log-symbols@4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" @@ -841,41 +996,35 @@ loupe@^2.3.1: dependencies: get-func-name "^2.0.0" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + lunr@^2.3.9: version "2.3.9" resolved "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== -markdown-it-anchor@^8.4.1: - version "8.6.7" - resolved "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz" - integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== - -markdown-it@*, markdown-it@^12.3.2: - version "12.3.2" - resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz" - integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== - dependencies: - argparse "^2.0.1" - entities "~2.1.0" - linkify-it "^3.0.1" - mdurl "^1.0.1" - uc.micro "^1.0.5" - -marked@^4.0.10, marked@^4.3.0: +marked@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz" - integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -minami@^1.1.1: - version "1.2.3" - resolved "https://registry.npmjs.org/minami/-/minami-1.2.3.tgz" - integrity sha1-mbbc37LwpU2hycj3qjoyd4eq+fg= sha512-3f2QqqbUC1usVux0FkQMFYB73yd9JIxmHSn1dWQacizL6hOUaNu6mA3KxZ9SfiCc4qgcgq+5XP59+hP7URa1Dw== +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" minimatch@^3.0.4: version "3.1.2" @@ -898,10 +1047,10 @@ minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.0: - version "9.0.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz" - integrity sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w== +minimatch@^9.0.3: + version "9.0.4" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== dependencies: brace-expansion "^2.0.1" @@ -912,10 +1061,12 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" mocha@^10.0.0: version "10.0.0" @@ -966,13 +1117,12 @@ natural-compare@^1.4.0: integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== nock@^13.2.4: - version "13.2.4" - resolved "https://registry.npmjs.org/nock/-/nock-13.2.4.tgz" - integrity sha512-8GPznwxcPNCH/h8B+XZcKjYPXnUV5clOKCjAqyjsiqA++MpNx9E9+t8YPp0MbThO+KauRo7aZJ1WuIZmOrT2Ug== + version "13.5.4" + resolved "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz" + integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" - lodash.set "^4.3.2" propagate "^2.0.0" normalize-path@^3.0.0, normalize-path@~3.0.0: @@ -980,6 +1130,11 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + once@^1.3.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" @@ -987,17 +1142,17 @@ once@^1.3.0: dependencies: wrappy "1" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" p-limit@^3.0.2: version "3.1.0" @@ -1040,12 +1195,22 @@ path-key@^3.1.0: resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -picomatch@^2.0.4, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -1061,9 +1226,16 @@ propagate@^2.0.0: integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.1" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qs@^6.12.1: + version "6.12.1" + resolved "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz" + integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== + dependencies: + side-channel "^1.0.6" querystring@^0.2.1: version "0.2.1" @@ -1089,28 +1261,24 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -requizzle@^0.2.3: - version "0.2.3" - resolved "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz" - integrity sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ== - dependencies: - lodash "^4.17.14" - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve@~1.19.0: + version "1.19.0" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" @@ -1135,6 +1303,13 @@ safe-buffer@^5.1.0: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +semver@^7.5.4: + version "7.6.0" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" @@ -1142,6 +1317,18 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" @@ -1154,16 +1341,31 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shiki@^0.14.1: - version "0.14.2" - resolved "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz" - integrity sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A== +shiki@^0.14.7: + version "0.14.7" + resolved "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz" + integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== dependencies: ansi-sequence-parser "^1.1.0" jsonc-parser "^3.2.0" vscode-oniguruma "^1.7.0" vscode-textmate "^8.0.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" @@ -1180,7 +1382,7 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@3.1.1: +strip-json-comments@^3.1.1, strip-json-comments@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -1216,6 +1418,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +ts-api-utils@^1.0.1: + version "1.3.0" + resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" @@ -1233,30 +1440,29 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typedoc@^0.24.8: - version "0.24.8" - resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz" - integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w== +typedoc@^0.25.13: + version "0.25.13" + resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz" + integrity sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ== dependencies: lunr "^2.3.9" marked "^4.3.0" - minimatch "^9.0.0" - shiki "^0.14.1" + minimatch "^9.0.3" + shiki "^0.14.7" -typescript@^4.9.4, "typescript@4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x": - version "4.9.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz" - integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== - -uc.micro@^1.0.1, uc.micro@^1.0.5: - version "1.0.6" - resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz" - integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== +typescript-eslint@^7.5.0: + version "7.5.0" + resolved "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.5.0.tgz" + integrity sha512-eKhF39LRi2xYvvXh3h3S+mCxC01dZTIZBlka25o39i81VeQG+OZyfC4i2GEDspNclMRdXkg9uGhmvWMhjph2XQ== + dependencies: + "@typescript-eslint/eslint-plugin" "7.5.0" + "@typescript-eslint/parser" "7.5.0" + "@typescript-eslint/utils" "7.5.0" -underscore@~1.13.2: - version "1.13.6" - resolved "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz" - integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== +typescript@^4.9.5, typescript@>=4.2.0, "typescript@4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x": + version "4.9.5" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== uri-js@^4.2.2: version "4.4.1" @@ -1282,11 +1488,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - workerpool@6.2.1: version "6.2.1" resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz" @@ -1313,16 +1514,16 @@ ws@^6.2.2: dependencies: async-limiter "~1.0.0" -xmlcreate@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz" - integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yargs-parser@^20.2.2, yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz"