@figuredev/orders-sdk
Advanced tools
Comparing version 0.0.3 to 0.0.5
13
index.ts
import axios from "axios" | ||
import { OrderInputDTO } from "./dto" | ||
import { UserContext } from "./utils" | ||
@@ -9,8 +10,2 @@ type OrdersClientConfig = { | ||
type UserContext = { | ||
accountId: string | ||
locationId: string | ||
terminalId: string | ||
} | ||
export class OrdersClient { | ||
@@ -26,5 +21,5 @@ constructor(private config: OrdersClientConfig) {} | ||
"fgr-service-token": this.config.secret, | ||
"twbrds-account-id": ctx.accountId, | ||
"twbrds-location-id": ctx.locationId, | ||
"twbrds-terminal-id": ctx.terminalId, | ||
...(ctx.accountId ? { "twbrds-account-id": ctx.accountId } : null), | ||
...(ctx.locationId ? { "twbrds-location-id": ctx.locationId } : null), | ||
...(ctx.terminalId ? { "twbrds-terminal-id": ctx.terminalId } : null), | ||
}, | ||
@@ -31,0 +26,0 @@ data: { order: order }, |
{ | ||
"name": "@figuredev/orders-sdk", | ||
"version": "0.0.3", | ||
"version": "0.0.5", | ||
"license": "ISC", | ||
"scripts": { | ||
"pub": "yarn version --patch && npm publish" | ||
"pub": "yarn version --patch && yarn publish" | ||
}, | ||
@@ -8,0 +8,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5029
5
147