@figuredev/orders-sdk
Advanced tools
Comparing version 0.12.92 to 0.12.93
@@ -6,3 +6,3 @@ import { Maybe } from "fgr-lib-backend/lib/types"; | ||
import { ReportPreparationTimeByItemDTO, ReportPreparationTimeHourlyDTO } from "./report"; | ||
import { TillCountDTO } from "./till"; | ||
import { TillCountDTO, TillDTO } from "./till"; | ||
import { IsoDate, IsoDateTime } from "./types"; | ||
@@ -58,3 +58,9 @@ import { UserContext } from "./utils"; | ||
}): Promise<TillCountDTO>; | ||
getTills(ctx: UserContext, params: { | ||
limit: Maybe<string>; | ||
olderThan: Maybe<string>; | ||
includeDeleted: boolean; | ||
includeClosed: boolean; | ||
}): Promise<TillDTO>; | ||
} | ||
export {}; |
@@ -168,4 +168,20 @@ "use strict"; | ||
} | ||
getTills(ctx, params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: "/till", | ||
headers: this.prepareHeaders(ctx), | ||
params: { | ||
limit: params.limit, | ||
olderThan: params.olderThan, | ||
includeDeleted: params.includeDeleted, | ||
includeClosed: params.includeClosed, | ||
}, | ||
}).then((r) => { var _a; return (_a = r.data) !== null && _a !== void 0 ? _a : []; }); | ||
}); | ||
} | ||
} | ||
exports.OrdersClient = OrdersClient; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,3 @@ | ||
import { Maybe } from "fgr-lib-backend/lib/types"; | ||
import { IsoDateTime } from "./types"; | ||
export declare type TillCountDTO = { | ||
@@ -6,1 +8,12 @@ count: number; | ||
}; | ||
export declare type TillDTO = { | ||
id: string; | ||
type: string; | ||
location_id: Maybe<string>; | ||
terminal_id: Maybe<string>; | ||
created_timestamp: IsoDateTime; | ||
opened_timestamp: Maybe<IsoDateTime>; | ||
closed_timestamp: Maybe<IsoDateTime>; | ||
time_record_id: Maybe<string>; | ||
deleted: boolean; | ||
}; |
{ | ||
"name": "@figuredev/orders-sdk", | ||
"version": "0.12.92", | ||
"version": "0.12.93", | ||
"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
74672
1416