Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@umerx/umerx-blackdog-configurator-client-typescript

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umerx/umerx-blackdog-configurator-client-typescript - npm Package Compare versions

Comparing version 0.0.32 to 0.0.33

47

build/src/client.js

@@ -13,2 +13,19 @@ import { Response as ResponseTypes, Symbol as SymbolTypes, Strategy as StrategyTypes, StrategyLog as StrategyLogTypes, StrategyValue as StrategyValueTypes, Order as OrderTypes, Position as PositionTypes, StrategyTemplateSeaDogDiscountScheme as StrategyTemplateSeaDogDiscountSchemeTypes, } from '@umerx/umerx-blackdog-configurator-types-typescript';

}
async function handleResponseErrors(func) {
try {
return await func();
}
catch (e) {
if (e instanceof AxiosError && undefined !== e?.status) {
try {
const errorResponse = ResponseTypes.ResponseBaseErrorFromRaw(e?.response?.data);
throw new ClientResponseError(errorResponse.message, e.status, errorResponse);
}
catch (e2) {
throw e;
}
}
throw e;
}
}
export class SymbolImpl {

@@ -20,3 +37,3 @@ baseUrl;

async getMany(query) {
try {
return handleResponseErrors(async () => {
const response = await axios.get(`${this.baseUrl}/?${new URLSearchParams(Object.entries(query)).toString()}`);

@@ -28,15 +45,3 @@ const responseBody = SymbolTypes.SymbolGetManyResponseBodyFromRaw(response.data);

return responseBody;
}
catch (e) {
if (e instanceof AxiosError && undefined !== e?.status) {
try {
const errorResponse = ResponseTypes.ResponseBaseErrorFromRaw(e?.response?.data);
throw new ClientResponseError(errorResponse.message, e.status, errorResponse);
}
catch (e2) {
throw e;
}
}
throw e;
}
});
}

@@ -66,8 +71,10 @@ async getSingle(params) {

async getMany(query) {
const response = await axios.get(`${this.baseUrl}/?${new URLSearchParams(Object.entries(query)).toString()}`);
const responseBody = StrategyTypes.StrategyGetManyResponseBodyFromRaw(response.data);
if (responseBody.status !== 'success') {
throw new ClientResponseError(responseBody.message, response.status, responseBody);
}
return responseBody;
return handleResponseErrors(async () => {
const response = await axios.get(`${this.baseUrl}/?${new URLSearchParams(Object.entries(query)).toString()}`);
const responseBody = StrategyTypes.StrategyGetManyResponseBodyFromRaw(response.data);
if (responseBody.status !== 'success') {
throw new ClientResponseError(responseBody.message, response.status, responseBody);
}
return responseBody;
});
}

@@ -74,0 +81,0 @@ async getSingle(params) {

{
"name": "@umerx/umerx-blackdog-configurator-client-typescript",
"private": false,
"version": "0.0.32",
"version": "0.0.33",
"main": "build/index.js",

@@ -6,0 +6,0 @@ "types": "build/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc