@figuredev/business-config-sdk
Advanced tools
Comparing version 0.7.0 to 0.8.0
19
index.ts
@@ -6,2 +6,3 @@ import axios from "axios" | ||
import { SettingDTO } from "./settings" | ||
import { AccountDTO } from "./account" | ||
@@ -16,2 +17,3 @@ type BusinessConfigClientConfig = { | ||
locationIds?: string[] | ||
specialTypes?: string[] | ||
} | ||
@@ -28,2 +30,18 @@ | ||
async getAccount(ctx: UserContext, id: string): Promise<AccountDTO | null> { | ||
return await axios | ||
.request({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/account/${id}`, | ||
headers: { | ||
"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) | ||
} | ||
async getAssignments(ctx: UserContext, params: GetAssignmentsQueryParams): Promise<AssignmentDTO[]> { | ||
@@ -44,2 +62,3 @@ return await axios | ||
locationIds: params.locationIds, | ||
specialTypes: params.specialTypes, | ||
}, | ||
@@ -46,0 +65,0 @@ }) |
{ | ||
"name": "@figuredev/business-config-sdk", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"license": "ISC", | ||
@@ -5,0 +5,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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
5443
9
149
1
8