mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix: types
This commit is contained in:
@@ -6,53 +6,13 @@ import type { InitiateResponse } from "./payments.service";
|
||||
|
||||
const B = URL_CONSTANTS.BILLING;
|
||||
|
||||
export interface InvoiceCompany {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
/** A customer-facing invoice row, as returned by `GET /billing/my-invoices`. */
|
||||
export type PortalInvoice = Freight.IInvoice;
|
||||
|
||||
export interface InvoiceCompanyProfile {
|
||||
id: string;
|
||||
type: string;
|
||||
reference: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A customer-facing invoice row, as returned by `GET /billing/my-invoices`.
|
||||
* Mirrors the freight `Invoice` entity (the shared `Freight.IInvoice` type is
|
||||
* stale and intentionally not reused here).
|
||||
*/
|
||||
export interface PortalInvoice {
|
||||
id: string;
|
||||
invoiceNumber: string;
|
||||
totalAmount: number;
|
||||
currency: string;
|
||||
status: Freight.InvoiceStatus;
|
||||
/** Originating subsystem: booking / warehouse / demurrage. */
|
||||
source: string;
|
||||
sourceId: string;
|
||||
/** What the invoice bills for (e.g. PREPAID). */
|
||||
type: string;
|
||||
issuedAt: string | null;
|
||||
dueAt: string;
|
||||
createdAt: string;
|
||||
company?: InvoiceCompany;
|
||||
companyProfile?: InvoiceCompanyProfile;
|
||||
}
|
||||
|
||||
export interface InvoiceLine {
|
||||
id: string;
|
||||
chargeType: string;
|
||||
description?: string | null;
|
||||
quantity: number;
|
||||
unitRate: number;
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface PortalInvoiceDetail extends PortalInvoice {
|
||||
lines: InvoiceLine[];
|
||||
}
|
||||
/** An invoice plus its line items, as returned by `GET /billing/my-invoices/:id`. */
|
||||
export type PortalInvoiceDetail = Freight.IInvoice & {
|
||||
lines: Freight.IInvoiceLine[];
|
||||
};
|
||||
|
||||
export interface PayInvoicePayload {
|
||||
method?: string;
|
||||
|
||||
Reference in New Issue
Block a user