Infohub JS API
Loading...
Searching...
No Matches
PropertySchemaServices Class Reference

Description

Service class for Property Schemas.

Public Member Functions

 constructor (ctx)
async getSchemaByName (name, cb)
async getSchemaByShortId (shortid, cb)

Function Documentation

◆ constructor()

constructor ( ctx)
Since
1.0, 12.2025, jh
Parameters
{Context}ctx - Context instance

◆ getSchemaByName()

async getSchemaByName ( name,
cb )

Get schema from standard catalogue in scope: ID = 'cn_properties'.

Parameters
{*}name Schema name
{*}cb Promise<ApiResponse>
Returns
{Promise<void>}

◆ getSchemaByShortId()

async getSchemaByShortId ( shortid,
cb )

Load a property schema document from InfoHub by its short ID.

On success, the callback receives an ApiResponse with status 200 and a PropertySchema instance as its data. If the document cannot be loaded, the response returned by NodeServices#getDocument is passed to the callback unchanged.

The schema is delivered through the callback; the promise returned by this async method does not resolve with the schema.

Parameters
{string}shortid - Short ID of the schema document.
{function(ApiResponse)void} cb - Called with the schema response or an error response.
Returns
{Promise<void>} Resolves after the document request has been started. @updated 06.2026