@holaluz/pomada
Advanced tools
Comparing version 1.2.0 to 1.3.0-beta.1
@@ -1,1 +0,4 @@ | ||
export { getProductFees } from './product-fees/application/get-product-fees'; | ||
export { getProductPrices } from './product-price/application/get-product-prices'; | ||
export { getSupplyPoint } from './supply-point/application/get-supply-point'; | ||
export { ProductName } from './products/domain/product-name'; | ||
export { CupsError } from './cups/domain/cups-error'; |
@@ -5,6 +5,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getProductFees = void 0; | ||
exports.CupsError = exports.ProductName = exports.getSupplyPoint = exports.getProductPrices = void 0; | ||
// instead of importing everything from 'this-repository' | ||
var get_product_fees_1 = require("./product-fees/application/get-product-fees"); | ||
Object.defineProperty(exports, "getProductFees", { enumerable: true, get: function () { return get_product_fees_1.getProductFees; } }); | ||
var get_product_prices_1 = require("./product-price/application/get-product-prices"); | ||
Object.defineProperty(exports, "getProductPrices", { enumerable: true, get: function () { return get_product_prices_1.getProductPrices; } }); | ||
var get_supply_point_1 = require("./supply-point/application/get-supply-point"); | ||
Object.defineProperty(exports, "getSupplyPoint", { enumerable: true, get: function () { return get_supply_point_1.getSupplyPoint; } }); | ||
var product_name_1 = require("./products/domain/product-name"); | ||
Object.defineProperty(exports, "ProductName", { enumerable: true, get: function () { return product_name_1.ProductName; } }); | ||
var cups_error_1 = require("./cups/domain/cups-error"); | ||
Object.defineProperty(exports, "CupsError", { enumerable: true, get: function () { return cups_error_1.CupsError; } }); | ||
//# sourceMappingURL=index.js.map |
import { HttpService } from './http-service'; | ||
export declare const baseUrl = "https://core.holaluz.com/api/"; | ||
export declare const baseUrl = "https://core-staging.holaluz.com/api/"; | ||
export declare const coreService: HttpService; |
@@ -5,5 +5,5 @@ "use strict"; | ||
const http_service_1 = require("./http-service"); | ||
exports.baseUrl = 'https://core.holaluz.com/api/'; | ||
exports.baseUrl = 'https://core-staging.holaluz.com/api/'; | ||
// Fixme: we need some way to differentiate between staging - production | ||
exports.coreService = new http_service_1.HttpService(exports.baseUrl); | ||
//# sourceMappingURL=core-service.js.map |
{ | ||
"name": "@holaluz/pomada", | ||
"version": "1.2.0", | ||
"version": "1.3.0-beta.1", | ||
"description": "Holaluz shared FE business logic repository", | ||
@@ -5,0 +5,0 @@ "author": "Holaluz", |
@@ -13,18 +13,36 @@ # Pomada | ||
Import and execute the use case you need: | ||
Import and execute the use case you need. For example, getting prices of the products of a supply point: | ||
```js | ||
import { getProductFees } from "@holaluz/pomada" | ||
import { getProductPrices, getSupplyPoint } from '@holaluz/pomada' | ||
getProductFees( | ||
getSupplyPoint( | ||
{ | ||
cups: "example cups" | ||
cups: 'example cups', | ||
}, | ||
{ | ||
onSuccess(prices) { | ||
console.log("I got the prices: ", prices) | ||
onSuccess(supplyPoint) { | ||
getProductPrices( | ||
{ | ||
products: supplyPoint.contractableProducts, | ||
consumption: supplyPoint.consumption, | ||
currentPower: supplyPoint.currentPower, | ||
desiredPower: supplyPoint.optimizedPower, | ||
}, | ||
{ | ||
onSuccess(prices) { | ||
console.log(prices) | ||
}, | ||
onError(error) { | ||
console.log(error) | ||
}, | ||
} | ||
) | ||
}, | ||
onCupsInvalid(error) { | ||
console.log("Something went wrong:", error) | ||
} | ||
onCupsAlreadyClient(supplyPoint) { | ||
console.log(supplyPoint) | ||
}, | ||
onCupsInvalid(cupsError) { | ||
console.log(cupsError) | ||
}, | ||
} | ||
@@ -31,0 +49,0 @@ ) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
36080
59
502
64
2
1