mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 18:20:57 +00:00
34 lines
848 B
TypeScript
34 lines
848 B
TypeScript
import { api } from '../auth/http';
|
|
|
|
export interface Rate {
|
|
id: string;
|
|
rateType: string;
|
|
appliesTo: string;
|
|
trigger: string;
|
|
containerTypeId: string | null;
|
|
cargoTypeId: string | null;
|
|
tradeDirection: string | null;
|
|
currency: string;
|
|
rateValue: string;
|
|
rateUnit: string;
|
|
status: string;
|
|
proposedByStaffId: string;
|
|
approvedByCeoId: string | null;
|
|
approvedAt: string | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
deletedAt: string | null;
|
|
}
|
|
|
|
export interface RatesListResponse {
|
|
data: Rate[];
|
|
meta: { total: number; page: number; pageSize: number; totalPages: number };
|
|
}
|
|
|
|
export const ratesService = {
|
|
list: (pageSize = 1000) =>
|
|
api.get<RatesListResponse>(`/rates?pageSize=${pageSize}`),
|
|
getByType: (rateType: string) =>
|
|
api.get<RatesListResponse>(`/rates?rateType=${rateType}&pageSize=1000`),
|
|
};
|