@figuredev/business-config-sdk
Advanced tools
Comparing version 0.9.18 to 0.9.19
@@ -10,2 +10,3 @@ import { UserContext } from "./utils"; | ||
import { PromotionDTO } from "./promotion"; | ||
import { PricingDTO } from "./pricing"; | ||
declare type BusinessConfigClientConfig = { | ||
@@ -55,2 +56,4 @@ baseUrl: string; | ||
getAssignments(ctx: UserContext, params: GetAssignmentsQueryParams): Promise<AssignmentDTO[]>; | ||
retrievePricingForPromoCode(ctx: UserContext, promoCode: string): Promise<PricingDTO | null>; | ||
getPricing(ctx: UserContext, id: string): Promise<PricingDTO | null>; | ||
getPrinters(ctx: UserContext, params?: GetPrintersQueryParams): Promise<PrinterDTO[]>; | ||
@@ -57,0 +60,0 @@ getPhysicalPrinters(ctx: UserContext): Promise<PhysicalPrinterDTO[]>; |
@@ -104,2 +104,29 @@ "use strict"; | ||
} | ||
retrievePricingForPromoCode(ctx, promoCode) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: "/pricing/promo-code", | ||
headers: this.prepareHeaders(ctx), | ||
data: { | ||
promoCode: promoCode, | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}); | ||
} | ||
getPricing(ctx, id) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/pricing/${id}`, | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}); | ||
} | ||
getPrinters(ctx, params = {}) { | ||
@@ -106,0 +133,0 @@ return __awaiter(this, void 0, void 0, function* () { |
{ | ||
"name": "@figuredev/business-config-sdk", | ||
"version": "0.9.18", | ||
"version": "0.9.19", | ||
"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
27727
38
584