@figuredev/business-config-sdk
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -6,2 +6,3 @@ import { UserContext } from "./utils"; | ||
import { AccountDTO } from "./account"; | ||
import { LocationDTO } from "./location"; | ||
declare type BusinessConfigClientConfig = { | ||
@@ -25,2 +26,3 @@ baseUrl: string; | ||
getAccount(ctx: UserContext, id: string): Promise<AccountDTO | null>; | ||
getLocation(ctx: UserContext, id: string): Promise<LocationDTO | null>; | ||
getAssignments(ctx: UserContext, params: GetAssignmentsQueryParams): Promise<AssignmentDTO[]>; | ||
@@ -27,0 +29,0 @@ getPrinters(ctx: UserContext): Promise<PrinterDTO[]>; |
@@ -30,2 +30,14 @@ "use strict"; | ||
} | ||
getLocation(ctx, id) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/location/${id}`, | ||
headers: Object.assign(Object.assign(Object.assign({ "fgr-service-token": this.config.secret }, (ctx.accountId ? { "twbrds-account-id": ctx.accountId } : null)), (ctx.locationId ? { "twbrds-location-id": ctx.locationId } : null)), (ctx.terminalId ? { "twbrds-terminal-id": ctx.terminalId } : null)), | ||
}) | ||
.then((r) => r.data); | ||
}); | ||
} | ||
getAssignments(ctx, params) { | ||
@@ -32,0 +44,0 @@ return __awaiter(this, void 0, void 0, function* () { |
{ | ||
"name": "@figuredev/business-config-sdk", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14512
23
245
0