@figuredev/orders-sdk
Advanced tools
Comparing version 0.12.26 to 0.12.27
import { InventoryInfoDTO } from "./inventory"; | ||
import { OrderDTO } from "./orderV3"; | ||
import { ReportPreparationTimeByItemDTO } from "./report"; | ||
import { ReportPreparationTimeByItemDTO, ReportPreparationTimeHourlyDTO } from "./report"; | ||
import { IsoDate, IsoDateTime } from "./types"; | ||
@@ -37,3 +37,8 @@ import { UserContext } from "./utils"; | ||
}): Promise<ReportPreparationTimeByItemDTO>; | ||
getReportPreparationTimeHourly(ctx: UserContext, params: { | ||
locationIds: string[]; | ||
from: IsoDate; | ||
to: IsoDate; | ||
}): Promise<ReportPreparationTimeHourlyDTO>; | ||
} | ||
export {}; |
@@ -109,4 +109,21 @@ "use strict"; | ||
} | ||
getReportPreparationTimeHourly(ctx, params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/report/preparation/hourly`, | ||
headers: this.prepareHeaders(ctx), | ||
params: { | ||
locationIds: params.locationIds, | ||
from: params.from, | ||
to: params.to, | ||
}, | ||
}) | ||
.then((r) => { var _a; return (_a = r.data) !== null && _a !== void 0 ? _a : { hours: [] }; }); | ||
}); | ||
} | ||
} | ||
exports.OrdersClient = OrdersClient; | ||
//# sourceMappingURL=index.js.map |
import { Maybe } from "./types"; | ||
export declare type PreparationTimeDTO = { | ||
average: number; | ||
min: number; | ||
max: number; | ||
p50: number; | ||
p75: number; | ||
p90: number; | ||
}; | ||
export declare type ItemPreparationTimeDTO = { | ||
@@ -6,13 +14,16 @@ productId: Maybe<string>; | ||
count: number; | ||
preparationTime: { | ||
average: number; | ||
min: number; | ||
max: number; | ||
p50: number; | ||
p75: number; | ||
p90: number; | ||
}; | ||
preparationTime: PreparationTimeDTO; | ||
}; | ||
export declare type HourlyPreparationTimeDTO = { | ||
index: number; | ||
hour: number; | ||
itemNames: string[]; | ||
count: number; | ||
preparationTime?: PreparationTimeDTO; | ||
}; | ||
export declare type ReportPreparationTimeByItemDTO = { | ||
items: ItemPreparationTimeDTO[]; | ||
}; | ||
export declare type ReportPreparationTimeHourlyDTO = { | ||
hours: HourlyPreparationTimeDTO[]; | ||
}; |
{ | ||
"name": "@figuredev/orders-sdk", | ||
"version": "0.12.26", | ||
"version": "0.12.27", | ||
"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
32292
696