diff --git a/package.json b/package.json index 1de513b..52c7251 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,10 @@ "author": "", "private": false, "files": [ - "dist/**" + "**" ], - "types": "dist/index.d.ts", - "main": "dist/index.js", + "types": "index.d.ts", + "main": "index.js", "license": "UNLICENSED", "scripts": { "build": "nest build", @@ -24,7 +24,7 @@ "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:e2e": "jest --config ./test/jest-e2e.json", "semantic-release": "semantic-release", - "prepublishOnly": "npm run build" + "prepublishOnly": "npm run build && cp -r ./dist/** ./" }, "dependencies": { "@nestjs/axios": "^3.0.0", diff --git a/src/bingx/endpoints/bingx-extend-listen-key-endpoint.ts b/src/bingx/endpoints/bingx-extend-listen-key-endpoint.ts new file mode 100644 index 0000000..a71c3b4 --- /dev/null +++ b/src/bingx/endpoints/bingx-extend-listen-key-endpoint.ts @@ -0,0 +1,35 @@ +import { + AccountInterface, + DefaultSignatureParameters, + Endpoint, + EndpointInterface, + SignatureParametersInterface, +} from 'bingx-api/bingx'; + +export class BingxExtendListenKeyEndpoint + extends Endpoint + implements EndpointInterface +{ + constructor( + private readonly listenKey: string, + account: AccountInterface, + ) { + super(account); + } + + method(): 'get' | 'post' | 'put' | 'patch' | 'delete' { + return 'put'; + } + + parameters(): SignatureParametersInterface { + return new DefaultSignatureParameters({ + listenKey: this.listenKey, + }); + } + + path(): string { + return '/openApi/user/auth/userDataStream'; + } + + readonly t!: R; +}