AnalysesName

Import from @infrared-city/infrared-sdk.

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

NameTypeDefault 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.

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

Properties

PropertyModifierTypeDescription
artifactDigestreadonlystringDigest of the submitted artifact.
contentDigestreadonlystringDigest of the submitted content.
inputFormatreadonly"irbf"Input format the service accepted.
resultFormatreadonly"json" \"irbf"Format the results will be returned in.
wireVersionreadonly1Version of the binary wire format.

BinaryCapability

Import from @infrared-city/infrared-sdk.

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

Properties

PropertyTypeDescription
batchSubmit?unknownPresent when the service takes many jobs in one request (POST /binary/v1/async-batch).
facadeTargets?numberPresent 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"-
limitsBinaryLimits-
modelsRecord<string, \{ geometryGroups: string\[\]; resultFamilies: string\[\]; \}>-
resultFormat"irbf"-
wireVersion1-

BinaryLimits

Import from @infrared-city/infrared-sdk.

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

Properties

PropertyType
maxGeometryBytesnumber
maxInstancesnumber
maxMeshesnumber
maxMetadataBytesnumber
maxResultBytesnumber
maxResultCellsnumber
maxTriangleValuesnumber

DownloadResultsOptions

Import from @infrared-city/infrared-sdk.

Options for downloading a job's results.

Properties

PropertyModifierTypeDescription
job?readonlyJobA job you already fetched; its status is then not read again.
signal?readonlyAbortSignalCancels the download.

jobFromResponse

Import from @infrared-city/infrared-sdk.

jobFromResponse(input): Job

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

Parameters

ParameterTypeDescription
inputunknownThe 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.

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

ParameterType
jobJob
attemptnumber
elapsednumber
nextDelaynumber

Returns

boolean \| void \| Promise<boolean \| void>


parseJobStatus

Import from @infrared-city/infrared-sdk.

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

ParameterTypeDescription
valuestringThe status text from the API.

Returns

JobStatus

The matching status.


PHYSICS_TIERS

Import from @infrared-city/infrared-sdk.

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, @infrared-city/infrared-sdk/tiling.

PhysicsTier = typeof PHYSICS_TIERS\[number\]

One of the values in PHYSICS_TIERS.


serializeToKebab

Import from @infrared-city/infrared-sdk.

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

ParameterTypeDescription
valueunknownThe 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.

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

ParameterTypeDescription
targetRecord<string, unknown>The object to change.
keystringThe property name.
valueunknownThe value to store.

Returns

void


SubmitOptions

Import from @infrared-city/infrared-sdk.

Options for submitting a single job.

Properties

PropertyModifierTypeDescription
signal?readonlyAbortSignalCancels 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?readonlyreadonly string\[\]Job events that trigger a notification to webhookUrl.
webhookUrl?readonlystringURL that receives webhook notifications for the job.

THERMAL_CONTROLS

Import from @infrared-city/infrared-sdk.

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.

toCamelCase(value): string

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

Parameters

ParameterTypeDescription
valuestringThe name to convert.

Returns

string

The camelCase name.


toKebabCase

Import from @infrared-city/infrared-sdk.

toKebabCase(value): string

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

Parameters

ParameterTypeDescription
valuestringThe name to convert.

Returns

string

The lower-case, hyphen-separated name.


WaitForCompletionOptions

Import from @infrared-city/infrared-sdk.

Options for waiting for a job to finish.

Properties

PropertyModifierTypeDescription
onPoll?readonlyOnPollCallbackCalled after every status read; return false to stop waiting.
signal?readonlyAbortSignalCancels the wait.
timeout?readonlynumberLongest time to wait, in seconds. Default 900.

WIND_ANALYSIS_TYPES

Import from @infrared-city/infrared-sdk.

const WIND\_ANALYSIS\_TYPES: ReadonlySet<AnalysesName>

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


WireAnalysisRequest

Import from @infrared-city/infrared-sdk.

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

NameType
analysis-typestring