@figuredev/orders-sdk
Advanced tools
Comparing version 0.12.75 to 0.12.76
@@ -1,2 +0,2 @@ | ||
import { NetCollectedBreakdownByEmployeeReportDTO, NetCollectedBreakdownReportDTO, ReportExportType, SummaryGraphDTO, SummaryReportCsvDTO, TransactionByAssignmentReportDTO, TransactionByCategoryReportDTO, TransactionByPaymentTypeByEmployeeReportDTO, TransactionByPaymentTypeReportDTO, TransactionBySourceReportDTO } from "./reportsTypes"; | ||
import { NetCollectedBreakdownByEmployeeReportDTO, NetCollectedBreakdownReportDTO, OrderListReportDTO, ReportExportType, SummaryGraphDTO, SummaryReportCsvDTO, TransactionByAssignmentReportDTO, TransactionByCategoryReportDTO, TransactionByPaymentTypeByEmployeeReportDTO, TransactionByPaymentTypeReportDTO, TransactionBySourceReportDTO } from "./reportsTypes"; | ||
import { IsoDate } from "./types"; | ||
@@ -73,3 +73,16 @@ import { UserContext } from "./utils"; | ||
}): Promise<SummaryReportCsvDTO[]>; | ||
getOrderListReport(ctx: UserContext, params: { | ||
from: IsoDate; | ||
to: IsoDate; | ||
locationIds?: string[]; | ||
assigneeIds?: string[]; | ||
search?: string; | ||
source?: string; | ||
isActive?: boolean; | ||
offset?: number; | ||
pageSize?: number; | ||
sort?: string; | ||
sortOrder?: string; | ||
}): Promise<OrderListReportDTO>; | ||
} | ||
export {}; |
@@ -140,4 +140,17 @@ "use strict"; | ||
} | ||
getOrderListReport(ctx, params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: "/report/order-list", | ||
headers: this.prepareHeaders(ctx), | ||
data: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ from: params.from, to: params.to }, (params.locationIds ? { locationIds: params.locationIds } : null)), (params.assigneeIds ? { assigneeIds: params.assigneeIds } : null)), (params.search ? { search: params.search } : null)), (params.source ? { source: params.source } : null)), (params.isActive ? { isActive: params.isActive } : null)), { offset: params.offset, pageSize: params.pageSize }), (params.sort ? { sort: params.sort } : null)), (params.sortOrder ? { sortOrder: params.sortOrder } : null)), | ||
}) | ||
.then((r) => { var _a; return (_a = r.data) !== null && _a !== void 0 ? _a : []; }); | ||
}); | ||
} | ||
} | ||
exports.ReportsClient = ReportsClient; | ||
//# sourceMappingURL=reports.js.map |
@@ -147,1 +147,41 @@ import { Maybe } from "./types"; | ||
} | ||
export declare type OrderListReportDTO = { | ||
content: OrderListReportItem[]; | ||
total_count: number; | ||
page_size: number; | ||
offset: number; | ||
}; | ||
export declare type OrderListReportItem = { | ||
id: string; | ||
assignee_name?: Maybe<string>; | ||
assignment_name?: Maybe<string>; | ||
order_number: string; | ||
tip: Maybe<number>; | ||
card_names?: Maybe<string[]>; | ||
external_types?: Maybe<string[]>; | ||
customer_name?: Maybe<string>; | ||
location_id: string; | ||
location_name: string; | ||
opened: Maybe<string>; | ||
closed: Maybe<string>; | ||
payment_status: OrderPaymentStatus; | ||
payment_status_code: Maybe<string>; | ||
payment_types: OrderPaymentType[]; | ||
status: OrderStatus; | ||
source: OrderSource; | ||
tips_amount: Maybe<number>; | ||
gratuity_amount: Maybe<number>; | ||
terminal_name: string; | ||
total: Maybe<number>; | ||
deleted: boolean; | ||
}; | ||
export declare type OrderPaymentType = "Card" | "Cash" | "External"; | ||
export declare type OrderPaymentStatus = "Unpaid" | "Paid" | "Refunded"; | ||
export declare type OrderSource = "MIB" | "POS" | "Kiosk"; | ||
export declare enum OrderStatus { | ||
Created = "created", | ||
Declined = "declined", | ||
Active = "active", | ||
Ready = "ready", | ||
Closed = "closed" | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ReportExportType = void 0; | ||
exports.OrderStatus = exports.ReportExportType = void 0; | ||
var ReportExportType; | ||
@@ -9,2 +9,10 @@ (function (ReportExportType) { | ||
})(ReportExportType = exports.ReportExportType || (exports.ReportExportType = {})); | ||
var OrderStatus; | ||
(function (OrderStatus) { | ||
OrderStatus["Created"] = "created"; | ||
OrderStatus["Declined"] = "declined"; | ||
OrderStatus["Active"] = "active"; | ||
OrderStatus["Ready"] = "ready"; | ||
OrderStatus["Closed"] = "closed"; | ||
})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {})); | ||
//# sourceMappingURL=reportsTypes.js.map |
{ | ||
"name": "@figuredev/orders-sdk", | ||
"version": "0.12.75", | ||
"version": "0.12.76", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66894
1293