diff --git a/src/leases/types.ts b/src/leases/types.ts index ccf6e339..3138e2a0 100644 --- a/src/leases/types.ts +++ b/src/leases/types.ts @@ -24,6 +24,47 @@ export type LeaseState = { export type Lease = Record; export type LeaseList = ApiResponse; export type LeaseId = number; +// Lease area object as expected from API response +export type LeaseArea = { + id: number; + identifier: string; + area: number; + section_area: number | null; + geometry: Record | null; + addresses: Array; + type: string; + location: string; + plots: Array>; // TODO type for Plot + plan_units: Array>; // TODO type for PlanUnit + preconstruction_state: string | null; // TODO enum type for ConstructabilityState + preconstruction_estimated_construction_readiness_moment: string | null; + preconstruction_inspection_moment: string | null; + demolition_state: string | null; // ConstructabilityState + polluted_land_state: string | null; // ConstructabilityState + polluted_land_rent_condition_state: string | null; // TODO enum type for PollutedLandRentConditionState + polluted_land_rent_condition_date: string | null; + polluted_land_planner: Record | null; // TODO type for User as in backend + polluted_land_projectwise_number: string | null; + constructability_report_state: string | null; // ConstructabilityState + constructability_report_investigation_state: string | null; // TODO enum type for ConstructabilityReportInvestigationState + constructability_report_signing_date: string | null; + constructability_report_signer: string | null; + constructability_descriptions: Array>; // TODO type for ConstructabilityDescription + other_state: string | null; // ConstructabilityState + archived_decision: Record; // TODO type for Decision + archived_at: string | null; + archived_note: string | null; + attachments: Array>; // TODO type for LeaseAreaAttachment + custom_detailed_plan: Record; // TODO type for CustomDetailedPlan +}; +// Lease area address object as expected from API response +export type LeaseAreaAddress = { + id: number; + address: string; + postal_code: string | null; + city: string | null; + is_primary: boolean; +}; export type CreateChargePayload = { leaseId: LeaseId; data: Record;