Skip to content
View as Markdown llms.txt

Requests

AnalysesName

Import from @infrared-city/infrared-sdk-ts.

AnalysesName = typeof AnalysesName[keyof typeof AnalysesName]

The union of the analysis name strings in the AnalysesName constant, for example "wind-speed" or "daylight-factor".

const AnalysesName: object

The analysis names the API accepts, as the value of a request's analysisType: AnalysesName.WindSpeed is "wind-speed", and so on for each analysis.

Type Declaration

Name Type Default value
DaylightAvailability "daylight-availability" "daylight-availability"
DaylightFactor "daylight-factor" "daylight-factor"
DirectSunHours "direct-sun-hours" "direct-sun-hours"
PedestrianWindComfort "pedestrian-wind-comfort" "pedestrian-wind-comfort"
SkyViewFactors "sky-view-factors" "sky-view-factors"
SolarRadiation "solar-radiation" "solar-radiation"
ThermalComfortIndex "thermal-comfort-index" "thermal-comfort-index"
ThermalComfortStatistics "thermal-comfort-statistics" "thermal-comfort-statistics"
WindSpeed "wind-speed" "wind-speed"

BinaryAcknowledgement

Import from @infrared-city/infrared-sdk-ts.

The service's acknowledgement of a binary submission, carried on the Job.

Properties

Property Modifier Type Description
artifactDigest readonly string Digest of the submitted artifact.
contentDigest readonly string Digest of the submitted content.
inputFormat readonly "irbf" Input format the service accepted.
resultFormat readonly "irbf" | "json" Format the results will be returned in.
wireVersion readonly 1 Version of the binary wire format.

BinaryCapability

Import from @infrared-city/infrared-sdk-ts.

What the service accepts on its binary route: formats, models and limits.

Properties

Property Type Description
facadeTargets? number Present when the service reads a job's targets range; when absent, each job has its own frame.
geometrySchemas? readonly number[] The geometry document versions the service reads; when absent, only 1.
inputFormat "irbf" -
limits BinaryLimits -
models Record<string, { geometryGroups: string[]; resultFamilies: string[]; }> -
resultFormat "irbf" -
wireVersion 1 -

BinaryLimits

Import from @infrared-city/infrared-sdk-ts.

The size limits the service sets for a binary request and its result.

Properties

Property Type
maxGeometryBytes number
maxInstances number
maxMeshes number
maxMetadataBytes number
maxResultBytes number
maxResultCells number
maxTriangleValues number

DownloadResultsOptions

Import from @infrared-city/infrared-sdk-ts.

Options for downloading a job's results.

Properties

Property Modifier Type Description
job? readonly Job A job you already fetched; its status is then not read again.
signal? readonly AbortSignal Cancels the download.

jobFromResponse

Import from @infrared-city/infrared-sdk-ts.

jobFromResponse(input): Job

Convert a job object returned by the API into a Job.

Parameters

Parameter Type Description
input unknown The parsed JSON of one job response.

Returns

Job

The job, with optional fields present only when the API sent them.

Throws

If input is not an object, has no jobId, or carries an invalid binary acknowledgement.


OnPollCallback

Import from @infrared-city/infrared-sdk-ts.

OnPollCallback = (job, attempt, elapsed, nextDelay) => boolean | void | Promise<boolean | void>

Callback invoked after every job status read while waiting for a job.

It receives the latest Job, the attempt number, the seconds elapsed so far and the seconds until the next status read. Return false to stop waiting; the job is then returned as it is. Any other return value keeps waiting. An error thrown by the callback does not stop the wait.

Parameters

Parameter Type
job Job
attempt number
elapsed number
nextDelay number

Returns

boolean | void | Promise<boolean | void>


parseJobStatus

Import from @infrared-city/infrared-sdk-ts.

parseJobStatus(value): JobStatus

Convert the status text of a job response into a JobStatus.

Matching ignores case. Any text that is not a known status gives "unknown".

Parameters

Parameter Type Description
value string The status text from the API.

Returns

JobStatus

The matching status.


PHYSICS_TIERS

Import from @infrared-city/infrared-sdk-ts.

const PHYSICS_TIERS: readonly ["v1", "detail", "advanced", "advanced-moist"]

The accepted values of physics, the sky and mean-radiant-temperature formulation of a thermal run. The set is closed: any other value is refused before the request is sent.

Leave physics unset to get the model's own default, advanced-moist. On thermal-comfort-index, "v1" and "detail" are deprecated: they still run, with one warning per value per process. On thermal-comfort-statistics, "detail" is rejected before submit. New code should leave physics unset or use "advanced" or "advanced-moist". A later release will remove "v1" and "detail".


PhysicsTier

Import from @infrared-city/infrared-sdk-ts, @infrared-city/infrared-sdk-ts/tiling.

PhysicsTier = typeof PHYSICS_TIERS[number]

One of the values in PHYSICS_TIERS.


serializeToKebab

Import from @infrared-city/infrared-sdk-ts.

serializeToKebab(value): unknown

Converts a request object with camelCase keys to the kebab-case keys the API expects, recursively. Fields that are null or undefined are dropped, and the ids inside entity maps such as geometries, vegetation and groundMaterials are kept exactly as given.

Parameters

Parameter Type Description
value unknown The request object, or any value found inside one.

Returns

unknown

A converted copy; values that are not plain objects or arrays are returned as they are.


setOwnKey

Import from @infrared-city/infrared-sdk-ts.

setOwnKey(target, key, value): void

Sets an enumerable property directly on target, even when key is a name such as __proto__ that a plain assignment would treat specially.

Parameters

Parameter Type Description
target Record<string, unknown> The object to change.
key string The property name.
value unknown The value to store.

Returns

void


SubmitOptions

Import from @infrared-city/infrared-sdk-ts.

Options for submitting a single job.

Properties

Property Modifier Type Description
signal? readonly AbortSignal Cancels the submission.
transport? readonly "json" | "binary" Transport for the request body: "binary" or "json". When unset, binary is used, or JSON for an analysis that has no binary route.
webhookEvents? readonly readonly string[] Job events that trigger a notification to webhookUrl.
webhookUrl? readonly string URL that receives webhook notifications for the job.

THERMAL_CONTROLS

Import from @infrared-city/infrared-sdk-ts.

const THERMAL_CONTROLS: readonly ["physics", "wallAlbedo", "wallAbsorptivity", "canopyTransmissivity", "groundAlbedo", "groundDtMax"]

The six global thermal controls: physics, wallAlbedo, wallAbsorptivity, canopyTransmissivity, groundAlbedo and groundDtMax.

They are valid only on thermal-comfort-index and thermal-comfort-statistics, and are top-level request fields, at the same level as subtype and analysis-type, not nested under any sub-object. Passing one to any other analysis is refused.


toCamelCase

Import from @infrared-city/infrared-sdk-ts.

toCamelCase(value): string

Converts a snake_case or kebab-case name to camelCase, for example "wind-speed" to "windSpeed".

Parameters

Parameter Type Description
value string The name to convert.

Returns

string

The camelCase name.


toKebabCase

Import from @infrared-city/infrared-sdk-ts.

toKebabCase(value): string

Converts a camelCase or snake_case name to kebab-case, for example "windSpeed" to "wind-speed".

Parameters

Parameter Type Description
value string The name to convert.

Returns

string

The lower-case, hyphen-separated name.


WaitForCompletionOptions

Import from @infrared-city/infrared-sdk-ts.

Options for waiting for a job to finish.

Properties

Property Modifier Type Description
onPoll? readonly OnPollCallback Called after every status read; return false to stop waiting.
signal? readonly AbortSignal Cancels the wait.
timeout? readonly number Longest time to wait, in seconds. Default 900.

WIND_ANALYSIS_TYPES

Import from @infrared-city/infrared-sdk-ts.

const WIND_ANALYSIS_TYPES: ReadonlySet<AnalysesName>

The wind analyses: wind-speed and pedestrian-wind-comfort.


WireAnalysisRequest

Import from @infrared-city/infrared-sdk-ts.

WireAnalysisRequest = Readonly<Record<string, unknown>> & object

An analysis request already written with the API's own keys (kebab-case), the form AnalysisService.execute takes. It must have an "analysis-type" string.

Type Declaration

Name Type
analysis-type string