@figuredev/business-config-sdk
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -6,5 +6,11 @@ # Changelog | ||
## 0.12.0 - template | ||
## 0.12.1 | ||
### Added | ||
- `SDK.matchProducts()` returning `MatchCategoriesResponseItem[]` | ||
## 0.12.0 | ||
### Added | ||
- `SDK.getSchematizedLayouts()` returning object of type `SchematizedLayoutsDTO` | ||
@@ -16,4 +22,2 @@ | ||
## 0.0.0 - template | ||
@@ -20,0 +24,0 @@ TODO (possible description) |
@@ -12,2 +12,3 @@ import { UserContext } from "./utils"; | ||
import { PricingDTO } from "./pricing"; | ||
import { MatchCategoriesRequestItem, MatchCategoriesResponseItem } from "./category"; | ||
declare type BusinessConfigClientConfig = { | ||
@@ -42,2 +43,5 @@ baseUrl: string; | ||
}; | ||
export declare type MatchCategoriesQueryParams = { | ||
items: MatchCategoriesRequestItem[]; | ||
}; | ||
export declare class BusinessConfigClient { | ||
@@ -71,3 +75,4 @@ private config; | ||
getPromotionByPromoCode(ctx: UserContext, code: string): Promise<PromotionDTO>; | ||
matchProducts(ctx: UserContext, params: MatchCategoriesQueryParams): Promise<MatchCategoriesResponseItem[]>; | ||
} | ||
export {}; |
@@ -260,4 +260,22 @@ "use strict"; | ||
} | ||
matchProducts(ctx, params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (params.items.length === 0) { | ||
return []; | ||
} | ||
return yield axios_1.default | ||
.request({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: "/category/match", | ||
headers: this.prepareHeaders(ctx), | ||
data: { | ||
items: params.items, | ||
}, | ||
}) | ||
.then((r) => r.data.items); | ||
}); | ||
} | ||
} | ||
exports.BusinessConfigClient = BusinessConfigClient; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@figuredev/business-config-sdk", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -7,4 +7,4 @@ ## Business Config Service SDK | ||
2. Increment version in package.json | ||
1. small fixes - patch version 0.0.x | ||
2. breaking changes - minor version 0.x.0 | ||
- small fixes - patch version 0.0.x | ||
- breaking changes - minor version 0.x.0 | ||
3. Document your changes in `CHANGELOG.md` | ||
@@ -11,0 +11,0 @@ 4. Call `npm publish --access public` |
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
35628
45
725