Files
edr-platform/apps/edr-freight-web/backoffice/src/services/transit-agents.service.ts

21 lines
515 B
TypeScript

import { api } from "../auth/http";
import { URL_CONSTANTS } from "../constants/URLS";
export interface TransitAgent {
id: string;
name: string;
validFrom: string;
validTo: string;
isActive: boolean;
}
export const transitAgentsService = {
/** Active + currently inside its validity window — the assignment dropdown. */
async listAssignable() {
const response = await api.get<TransitAgent[]>(
URL_CONSTANTS.RULE_ENGINE.TRANSIT_AGENTS_ASSIGNABLE,
);
return response.data;
},
};