// // This file is generated by `pnpm generate-types`. // import type * as GeoJson from "geojson" /** * Base object for traffic data. Currently used for rail and road traffic data. * */ export interface BaseTrafficData { /** * Average speed in km/h. Often proxied by the speed limit */ speed?: number | undefined /** * Annual average daily traffic */ adt?: number | undefined /** * Annual average daily traffic distribution. All values must sum to 100 */ adtDistribution?: | { /** * Percentage of traffic during the day (07:00-19:00). Number between 0 and 100 */ dayPercentage?: number | undefined /** * Percentage of traffic during the evening (19:00-23:00). Number between 0 and 100 */ eveningPercentage?: number | undefined /** * Percentage of traffic during the night (23:00-07:00). Number between 0 and 100 */ nightPercentage?: number | undefined } | undefined } export interface BinaryRepresentations { /** * The volume mesh is a visual representation of the element based on a * triangulated polygon mesh consisting of vertices, edges and faces. All * elements which represent visible 3d objects are expected to support this * representation. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#volumemesh * */ volumeMesh?: | { [k: string]: any } | undefined /** * Like volume mesh, semantic mesh is a triangulated mesh representation * in the form of a glb file. But individual parts of the building * geometry can also be tagged with additional metadata such as unit * identifiers and geometry types. * * The primary goal of the representation is to allow producers to attach * metadata which enables detailed stats and filtering in analyses. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#semanticmesh * */ semanticMesh?: | { [k: string]: any } | undefined } export interface Child { /** * Unique Resource Name (URN) for an element, used to identify a specific * revision of an element. * * The element URN scheme is `urn:adsk-forma-elements:{system}:{authcontext}:{id}:{revision}`. * */ urn: Urn /** * Unique id under parent. Used to build up paths. Prefer short values for space efficiency. */ key: string /** * Flat array of 16 numbers representing column-major 4x4 affine matrix. * Translation values use metres as unit. * * The matrix is applied to the element's geometry, and the resulting * geometry is then transformed by the parent's matrix. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#transformation-matrix * */ transform?: Transform | undefined /** * User defined naming of this specific reference, typically used to distinguish elements in eg. UI listings */ name?: string | undefined } /** * The data for an embedded representation can be accessed directly under the `data` key. * */ export interface EmbeddedBinaryRepresentation< P extends Record = Record, > { type: "embedded-binary" data: string selection?: RepresentationSelection | undefined /** * Additional information about the representation. */ properties?: P | undefined } /** * The data for an embedded representation can be accessed directly under the `data` key. * */ export interface EmbeddedJsonRepresentation< T = unknown, P extends Record = Record, > { type: "embedded-json" data: T selection?: RepresentationSelection | undefined properties?: (P & Record) | undefined } /** * Learn more about the element system here: https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/ * */ export interface FormaElement { /** * Unique Resource Name (URN) for an element, used to identify a specific * revision of an element. * * The element URN scheme is `urn:adsk-forma-elements:{system}:{authcontext}:{id}:{revision}`. * */ urn: Urn /** * Metadata about an element. Does not describe the element itself, but * rather the context in which it has been created/updated and potential * licensing information. * */ metadata?: Metadata | undefined /** * Properties of an element are inherent attributes which are independent * of the representation used to interpret its geometry. * * For example, setting an element's `virtual` property to `true` will * indicate that the element should not be included as a physical object * which e.g. blocks sun rays -- regardless of which representation you * are looking at. * */ properties?: Properties | undefined /** * Representations provide ways for an element to be interpreted. An * element can have zero, one, or several representations which unlock * different functionality. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#representations * */ representations?: Representations | undefined /** * An element can include other elements as children, which results in * a tree structure. Elements may be referenced multiple times, with * different transforms and under different parents. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#children * */ children?: Child[] | undefined } export interface GraphBuilding { units: GraphBuildingUnit[] levels: GraphBuildingLevel[] } export interface GraphBuildingCoSurface { /** * The id of the GraphBuildingCoSurface */ id: string /** * The id of the GraphBuildingCoSurface with which this GraphBuildingCoSurface shares a GraphBuildingSurface. If null, the corresponding GraphBuildingSurface is a boundary GraphBuildingSurface. */ partnerId: string | null /** * The id of the surface that this GraphBuildingCoSurface refers to */ surfaceId: string /** * Whether the surface goes from pointA to pointB */ directionAToB: boolean } export interface GraphBuildingLevel { /** * Height of the level, in meters. */ height: number /** * Map of point id to point coordinates. */ points: { [k: string]: [number, number] | undefined } /** * List of spaces in the level */ spaces: GraphBuildingSpace[] /** * List of surfaces in the level */ surfaces: GraphBuildingSurface[] } export interface GraphBuildingSpace { /** * The id of the GraphBuildingSpace */ id: string /** * The outer loop of the space */ outerLoop: GraphBuildingCoSurface[] /** * The inner loops (holes) of the space */ innerLoops?: GraphBuildingCoSurface[][] | undefined } /** * A vertically extruded surface defined by two XY points. */ export interface GraphBuildingSurface { /** * The id of the surface */ id: string /** * The id of the point that defines the start of the surface */ pointA: string /** * The id of the point that defines the end of the surface */ pointB: string } export interface GraphBuildingUnit { /** * Unique identifier for the unit */ id: string properties: { /** * The function of the unit, e.g. "residential", "office", "retail" */ function?: string | undefined /** * The program of the unit, e.g. "apartment", "office", "store" */ program?: string | undefined } /** * List of the ids of spaces that compose this unit. */ spaceIds: string[] } /** * Object representing a floor, with a polygon defining its shape and * relevant metadata describing its contribution to gross floor area * calculations. * */ export interface GrossFloorAreaPolygon { /** * 2D polygon which defines the shape of the floor. * * The first entry in the list MUST be a counterclockwise polygon * representing the outline of the area. Any following members MUST have a * clockwise winding, and represent holes in the polygon. * */ grossFloorPolygon: MultiRingPolygon /** * Elevation of the polygon, relative to elevation of containing element. * * Example: If a building with two floors is modeled as a single element with two gfa polygons, the first floor * polygon would have elevation 0 (resolves to same elevation as building element) while the second floor polygon * would have a positive, non-zero value for elevation. The absolute elevation of a polygon is resolved by applying * the chain of transformation matrices following the element tree, before adding the relative polygon elevation. * */ elevation: number /** * Type of area whose aggregated gross area the floor contributes towards. */ areaType?: GrossFloorAreaType | undefined } export type GrossFloorAreaType = | "CORE" | "CORRIDOR" | "LIVING_UNIT" | "UNASSIGNED" export interface JsonRepresentations { /** * The complete gross floor area of an element, consisting of a set of polygons * with correct 3D positioning in the building model. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#grossfloorareapolygons * */ grossFloorAreaPolygons: GrossFloorAreaPolygon[] /** * This representation is used for visualizing 2d vector shapes on the * terrain, useful for visualizing roads, parking, zoning, etc.. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#terrainshape * */ terrainShape: GeoJson.FeatureCollection< GeoJson.Geometry, TerrainShapeFeatureProperties > /** * A representation of the area on the ground that the element 'occupies' or * overlaps with. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#footprint * */ footprint: GeoJson.FeatureCollection /** * This representation gives you a 2.5D geojson representation of the * element. An element can point to several features in the geojson, so * to correctly get all the features for the element, you need to find * all features that _start with_ the id. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#volume25dcollection * */ volume25DCollection: Volume25DCollection /** * A representation of a building as a vertical and horizontal partitioning of space. * The building contains a collection of ordered levels with non-intersecting spaces dividing the level and * a collection of units - potentially spanning multiple levels - which are composed of spaces. * */ graphBuilding: GraphBuilding } export interface Licensing { /** * Whether or not data can be transferred out of Forma, for example by downloading a data file or sending a project to Revit. */ exportable: boolean /** * Attribution requirements that must be followed. Empty if there are no requirements */ attributions: LicensingAttribution[] /** * Link to the original license for the data */ licenseUrl: string /** * Link to the providers description on how the license should be interpreted. For auditing purposes. */ providerDescriptionUrl: string } export interface LicensingAttribution { /** * We support two types of attribution actions, depending on what happens to the data: * - display: A watermark (clickable text) to be shown whenever data is displayed. * - transfer: Text to be shown to users (or put in LICENCE files or similar) whenever data is imported or exported. * */ action: "display" | "transfer" content: string url: string } /** * The data for a linked representation must be fetched by * a separate API using the blob ID. * */ export interface LinkedRepresentation< P extends Record = Record, > { type: "linked" /** * Blob ID. Used to retrieve the data for this representation. */ blobId: string selection?: RepresentationSelection | undefined /** * Additional information about the representation. */ properties?: P | undefined } export interface Metadata { /** * Pointer to the previous revision of this element. */ predecessor?: Urn | undefined /** * Creation timestamp, in ISO8601 datetime format. */ createdAt?: string | undefined createdBy?: string | undefined /** * Information related to the licensing governing the use and transfer of this element. */ licensing?: Licensing | undefined } export type MultiRingPolygon = [number, number][][] export interface Properties { /** * The category is used to indicate the user intent of the element. It can * be used to group and filter top-level elements in the UI. * * The category is a string, and can be any value. * */ category?: string | undefined /** * For elements with a `volumeMesh` representation, this flag signals * that the element should be ignored when analyzing traffic noise. In * contrast to the `virtual` property, it does _not_ imply that the * element isn't a physical object -- just that it does not block * noise. * * Typically used for vegetation elements, since it is common practice * to ignore vegetation when performing traffic noise analysis. * */ noiseIgnore?: boolean | undefined /** * If true, and if the element has a `volumeMesh` representation, the * wind analysis will interpret the element as vegetation modelled as a * porous medium. See * [this help center article](https://help.autodeskforma.com/autodeskforma/en/articles/6932520-detailed-wind-analysis#h_0d2614b60e) * for details about the implementation. * */ treatAsVegetationInWindAnalysis?: boolean | undefined /** * This field can be used to identify something that isn't real, like a * constraint or an illustrative boy with balloon. If this is set, * analyses and possibly other modes will ignore the element. * */ virtual?: boolean | undefined /** * @deprecated * Deprecated: This field is being removed. Function tagging will be * re-introduced using a new concept. * * This field will assign a function to the element, which will dictate * the color with which it is rendered in addition to providing * function breakdowns in Area Metrics. * */ functionId?: string | undefined /** * Providing this field will include the element as a noise source in the rapid and detailed noise analysis. */ trafficData?: TrafficData | undefined [k: string]: any } /** * Properties required for rail traffic data * */ export type RailTrafficData = BaseTrafficData & { /** * Type of rail traffic. Note: The `subway` and `train` properties are used for the beta * and will be removed in future releases. * */ railType?: "train" | "subway" | "high_speed" | "regional" | "tram" | undefined /** * @deprecated * Length of the vehicle in meters. Note: This property is used for the beta and will * be removed in future releases. * */ vehicleLength?: number | undefined } export type Representation< T = unknown, P extends Record = Record, > = | LinkedRepresentation

| EmbeddedJsonRepresentation | EmbeddedBinaryRepresentation

export interface Representations { /** * A representation of the area on the ground that the element 'occupies' or * overlaps with. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#footprint * */ footprint?: Representation | undefined /** * A representation of a building as a vertical and horizontal partitioning of space. * The building contains a collection of ordered levels with non-intersecting spaces dividing the level and * a collection of units - potentially spanning multiple levels - which are composed of spaces. * */ graphBuilding?: | Representation | undefined /** * The complete gross floor area of an element, consisting of a set of polygons * with correct 3D positioning in the building model. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#grossfloorareapolygons * */ grossFloorAreaPolygons?: | Representation | undefined /** * Like volume mesh, semantic mesh is a triangulated mesh representation * in the form of a glb file. But individual parts of the building * geometry can also be tagged with additional metadata such as unit * identifiers and geometry types. * * The primary goal of the representation is to allow producers to attach * metadata which enables detailed stats and filtering in analyses. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#semanticmesh * */ semanticMesh?: Representation | undefined /** * This representation is used for visualizing 2d vector shapes on the * terrain, useful for visualizing roads, parking, zoning, etc.. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#terrainshape * */ terrainShape?: Representation | undefined /** * This representation gives you a 2.5D geojson representation of the * element. An element can point to several features in the geojson, so * to correctly get all the features for the element, you need to find * all features that _start with_ the id. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#volume25dcollection * */ volume25DCollection?: | Representation | undefined /** * The volume mesh is a visual representation of the element based on a * triangulated polygon mesh consisting of vertices, edges and faces. All * elements which represent visible 3d objects are expected to support this * representation. * * See: * https://aps.autodesk.com/en/docs/forma/v1/working-with-forma/element-system/forma-element-specification/#volumemesh * */ volumeMesh?: Representation | undefined [k: string]: Representation | undefined } /** * The underlying data for a representation can be shared * across multiple elements/representations. * * This field, if present, should be used to select the relevant parts * from the data that belongs to this representation. The exact details * is specific for the representation/format, but in most cases this * is used with an ID in the data and comparing it against this value * using the specified operator. * */ export type RepresentationSelection = | { type: "equals" /** * The relevant data for the representation will be under this value. * */ value: string } | { type: "startsWith" /** * Any value with this prefix is relevant for the representation. * */ value: string } /** * Properties required for road traffic data * */ export type RoadTrafficData = BaseTrafficData & { /** * Percentage of heavy-duty vehicles, motor home vehicles, buses, with three or more axles. Number between 0 and 100 */ heavyVehiclePercentage?: number | undefined } export interface TerrainShapeFeatureProperties { /** * Only supported for Polygon and MultiPolygon feature objects */ fill?: | { /** * Color hex. E.g. `#ff0000`. */ color?: string | undefined opacity?: number | undefined } | undefined stroke?: | { /** * Color hex. E.g. `#ff0000`. */ color?: string | undefined /** * In meters, not affected by element transform */ lineWidth?: number | undefined } | undefined } export type TrafficData = RoadTrafficData | RailTrafficData /** * @minItems 16 * @maxItems 16 */ export type Transform = [ number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, ] /** * Unique Resource Name (URN) for an element, used to identify a specific * revision of an element. * * The element URN scheme is `urn:adsk-forma-elements:{system}:{authcontext}:{id}:{revision}`. * */ export type Urn = `urn:adsk-forma-elements:${string}:${string}:${string}:${string}` export interface Volume25D { type: "Feature" /** * Formatted as `+` */ id: string geometry: { type: "Polygon" coordinates: MultiRingPolygon } properties: { /** * Height of the volume, in meters. */ height: number /** * Elevation of the volume, in meters, relative to elevation of containing element. * Example: If a building with two floors is modeled as a single element with two volumes in the collection, the first floor * volume would have elevation 0 (resolves to same elevation as building element) while the second floor volume * would have a positive, non-zero value for elevation. The absolute elevation of a volume is resolved by applying * the chain of transformation matrices following the element tree, before adding the relative volume elevation. * */ elevation?: number | undefined structure?: "GENERATOR" | GrossFloorAreaType | undefined } } export interface Volume25DCollection { type: "FeatureCollection" features: Volume25D[] }