This commit is contained in:
Estifo77
2026-08-06 09:43:40 +03:00
parent a02cee1a78
commit 3610c69a69
2 changed files with 46 additions and 53 deletions

View File

@@ -7,35 +7,35 @@ export type Bilingual = { en?: string; am?: string };
* previously this lived in a backoffice mock page.
*/
export type LicenseStatus =
| 'DRAFT'
| 'SUBMITTED'
| 'UNDER_REVIEW'
| 'UNDER_EVALUATION'
| 'RESUBMIT_REQUIRED'
| 'INSPECTION_PENDING'
| 'INSPECTION_COMPLETED'
| 'APPROVED'
| 'REJECTED'
| 'ON_HOLD'
| 'PAYMENT_PENDING'
| 'PAID'
| 'PAYMENT_CONFIRMED'
| 'CERTIFICATE_ISSUED'
| 'COMPLETED';
| "DRAFT"
| "SUBMITTED"
| "UNDER_REVIEW"
| "UNDER_EVALUATION"
| "RESUBMIT_REQUIRED"
| "INSPECTION_PENDING"
| "INSPECTION_COMPLETED"
| "APPROVED"
| "REJECTED"
| "ON_HOLD"
| "PAYMENT_PENDING"
| "PAID"
| "PAYMENT_CONFIRMED"
| "CERTIFICATE_ISSUED"
| "COMPLETED";
export type ApplicationKind = 'NEW' | 'RENEWAL';
export type ApplicationKind = "NEW" | "RENEWAL";
export type FormFieldType =
| 'TEXT'
| 'TEXTAREA'
| 'NUMBER'
| 'MONEY'
| 'DATE'
| 'SELECT'
| 'BOOLEAN'
| 'EMAIL'
| 'PHONE'
| 'TIN';
| "TEXT"
| "TEXTAREA"
| "NUMBER"
| "MONEY"
| "DATE"
| "SELECT"
| "BOOLEAN"
| "EMAIL"
| "PHONE"
| "TIN";
export interface FieldCondition {
field: string;
@@ -75,9 +75,7 @@ export interface FormSectionConfig {
/** Grouping the portal organises the licence catalogue by. */
export type LicenseCategory =
| 'CARGO_FREIGHT'
| 'SHIPPING_AGENCY'
| 'INVESTMENT';
"CARGO_FREIGHT" | "SHIPPING_AGENCY" | "INVESTMENT";
export interface LicenseCategoryDefinition {
key: LicenseCategory;
@@ -131,7 +129,7 @@ export interface DocumentRequirement {
name: Bilingual;
description?: Bilingual;
applicationKind: ApplicationKind;
mode: 'ALWAYS' | 'CONDITIONAL' | 'OPTIONAL';
mode: "ALWAYS" | "CONDITIONAL" | "OPTIONAL";
conditionExpression?: FieldCondition & { previousDocExpired?: string };
allowedMimeTypes: string[];
maxSizeMb: number;
@@ -238,7 +236,7 @@ export interface StatusHistoryEntry {
createdAt: string;
}
export type RemarkTargetType = 'FORM_SECTION' | 'DOCUMENT' | 'STAFF';
export type RemarkTargetType = "FORM_SECTION" | "DOCUMENT" | "STAFF";
export interface ApplicationRemark {
id: string;
@@ -269,8 +267,8 @@ export interface Inspection {
scheduledDate: string | null;
conductedDate: string | null;
location: string | null;
status: 'SCHEDULED' | 'COMPLETED' | 'CANCELLED';
result: 'PASSED' | 'FAILED' | null;
status: "SCHEDULED" | "COMPLETED" | "CANCELLED";
result: "PASSED" | "FAILED" | null;
findings: string | null;
}
@@ -296,18 +294,18 @@ export interface QueueFilter {
submittedTo?: string;
overdue?: boolean;
sortBy?: QueueSortField;
sortDir?: 'ASC' | 'DESC';
sortDir?: "ASC" | "DESC";
take?: number;
skip?: number;
}
export type QueueSortField =
| 'submittedAt'
| 'applicationNumber'
| 'companyName'
| 'status'
| 'dueAt'
| 'claimedAt';
| "submittedAt"
| "applicationNumber"
| "companyName"
| "status"
| "dueAt"
| "claimedAt";
/** Row counts behind the queue's saved-view tabs. */
export interface QueueCounts {
@@ -319,7 +317,7 @@ export interface QueueCounts {
all: number;
}
export type DocumentDecision = 'ACCEPTED' | 'REJECTED';
export type DocumentDecision = "ACCEPTED" | "REJECTED";
/** An officer's verdict on one uploaded document. */
export interface DocumentReview {
@@ -357,10 +355,10 @@ export interface ExportResult {
truncated: boolean;
}
export type TemplateStatus = 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
export type TemplateStatus = "DRAFT" | "PUBLISHED" | "ARCHIVED";
export interface TemplatePageOptions {
format?: 'A4' | 'A5' | 'Letter' | 'Legal';
format?: "A4" | "A5" | "Letter" | "Legal";
landscape?: boolean;
printBackground?: boolean;
}
@@ -392,7 +390,7 @@ export interface Paginated<T> {
/** Per-field problems returned by the server when a submission is incomplete. */
export interface ValidationIssue {
kind: 'field' | 'document' | 'staff';
kind: "field" | "document" | "staff";
target: string;
field?: string;
message: string;
@@ -400,7 +398,7 @@ export interface ValidationIssue {
/** What the browser must do to complete a payment. */
export interface ClientAction {
type: 'REDIRECT' | 'LAUNCH_APP' | 'NONE';
type: "REDIRECT" | "LAUNCH_APP" | "NONE";
url?: string;
appId?: string;
receiveCode?: string;
@@ -408,12 +406,7 @@ export interface ClientAction {
}
export type PaymentStatus =
| 'PENDING'
| 'PROCESSING'
| 'PAID'
| 'FAILED'
| 'EXPIRED'
| 'CANCELLED';
"PENDING" | "PROCESSING" | "PAID" | "FAILED" | "EXPIRED" | "CANCELLED";
export interface InitiatePaymentResult {
paymentId: string;
@@ -455,7 +448,7 @@ export interface IssuedLicense {
tinNumber: string | null;
issueDate: string;
expiryDate: string;
status: 'ACTIVE' | 'EXPIRED' | 'SUSPENDED' | 'CANCELLED' | 'SUPERSEDED';
status: "ACTIVE" | "EXPIRED" | "SUSPENDED" | "CANCELLED" | "SUPERSEDED";
/**
* Days until the expiry date; negative once it has passed. Computed by the
* API in the authority's timezone — the client must not re-derive it, since