v3.9.6: feat(#322) add nextPageCursor type via generic
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.9.5",
|
"version": "3.9.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.9.5",
|
"version": "3.9.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.6",
|
"axios": "^1.6.6",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.9.5",
|
"version": "3.9.6",
|
||||||
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import {
|
|||||||
CreateSubMemberParamsV5,
|
CreateSubMemberParamsV5,
|
||||||
CreateSubMemberResultV5,
|
CreateSubMemberResultV5,
|
||||||
CursorListV5,
|
CursorListV5,
|
||||||
|
CursorRowsV5,
|
||||||
DeleteSubMemberParamsV5,
|
DeleteSubMemberParamsV5,
|
||||||
DeliveryPriceV5,
|
DeliveryPriceV5,
|
||||||
DeliveryRecordV5,
|
DeliveryRecordV5,
|
||||||
@@ -1206,7 +1207,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
*/
|
*/
|
||||||
getWithdrawalRecords(
|
getWithdrawalRecords(
|
||||||
params?: GetWithdrawalRecordsParamsV5,
|
params?: GetWithdrawalRecordsParamsV5,
|
||||||
): Promise<APIResponseV3<{ rows: WithdrawalRecordV5[] }>> {
|
): Promise<CursorRowsV5<WithdrawalRecordV5[]>> {
|
||||||
return this.getPrivate('/v5/asset/withdraw/query-record', params);
|
return this.getPrivate('/v5/asset/withdraw/query-record', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1358,7 +1359,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a sub UID. Before deleting the UID, please make sure there are no assets.
|
* Delete a sub UID. Before deleting the UID, please make sure there are no assets.
|
||||||
*
|
*
|
||||||
* TIP:
|
* TIP:
|
||||||
* The API key must have one of the permissions to be allowed to call the following API endpoint.
|
* The API key must have one of the permissions to be allowed to call the following API endpoint.
|
||||||
* - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
* - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
||||||
|
|||||||
@@ -200,6 +200,16 @@ export interface CursorListV5<T extends unknown[]> {
|
|||||||
list: T;
|
list: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A wrapper type for any responses that have a "nextPageCursor" property, and a "rows" property with an array of elements
|
||||||
|
*
|
||||||
|
* ```{ nextPageCursor: "something", rows: someData[] }```
|
||||||
|
*/
|
||||||
|
export interface CursorRowsV5<T extends unknown[]> {
|
||||||
|
nextPageCursor: string;
|
||||||
|
rows: T;
|
||||||
|
}
|
||||||
|
|
||||||
export interface CategoryListV5<
|
export interface CategoryListV5<
|
||||||
T extends unknown[],
|
T extends unknown[],
|
||||||
TCategory extends CategoryV5,
|
TCategory extends CategoryV5,
|
||||||
|
|||||||
Reference in New Issue
Block a user