Points, signals and lights
Manage accessory records, configurations, specifications and ordering.
Source 0.1.0 Private source package
How the calls fit together
Read a coherent configuration before editing. Preserve original request identities, revisions and uncertainty; changing a saved record does not operate it.
JavaScript examples
Supply your configured client. Each call awaits a decoded result; errors pass to your caller. These identifiers and values are fictional. Use selected development records and review every change before running it. Opening this page sends no API requests.
See the complete TypeScript workflow · Explore the Node starter
accessories.list
Lists accessories for one layout.
const result = await client.accessories.list(
"1",
"18",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout whose accessories should be listed.
options· optionalRailDeckRequestControlOptionsOptional cancellation owned by the visible library.
Returns Promise<RailDeckAccessoryListResponse>.
Example evidence: Retained SDK transport fixture.
accessories.saveTurnoutOrder
Saves layout-wide turnout order through the existing accessory authority boundary.
const result = await client.accessories.saveTurnoutOrder(
"23",
"31",
{
"requestId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"reviewedIds": [
"7",
"8"
],
"orderedIds": [
"8",
"7"
]
},
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount owning the layout.
layoutId· requiredRailDeckIdentifierLayout whose complete collection was reviewed.
input· requiredSaveTurnoutOrderCommandCaptured review, permutation and immutable intent.
options· optionalRailDeckRequestControlOptionsRequest lifetime and timeout, never automatic mutation replay.
Returns Promise<TurnoutOrderReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.getTurnoutConfiguration
Opens turnout fields and destinations from one authorised snapshot.
const result = await client.accessories.getTurnoutConfiguration(
"1",
"18",
"194",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount owning the selected layout.
layoutId· requiredRailDeckIdentifierLayout containing the turnout.
accessoryId· requiredRailDeckIdentifierSaved turnout to review, including incomplete older records.
options· optionalRailDeckRequestControlOptionsOptional cancellation and timeout; no background polling.
Returns Promise<TurnoutConfigurationSnapshot>.
Example evidence: Retained SDK transport fixture.
accessories.saveTurnoutConfiguration
Saves the complete reviewed turnout using the existing atomic configuration transition.
const result = await client.accessories.saveTurnoutConfiguration(
"1",
"18",
{
"requestId": "11111111-1111-4111-8111-111111111111",
"target": {
"operation": "update",
"accessoryId": "194",
"expectedRevision": 7
},
"configuration": {
"displayName": "{{fixtureDisplayName}}",
"controllerId": "22",
"decoderAddress": 61,
"decoderSubaddress": 0,
"notes": "Station throat.\nKeep the siding clear.",
"definition": {
"design": "wye",
"orientation": 90,
"pathAState": "thrown"
},
"destinations": {
"closed": {
"label": "Platform 1",
"decoderAddress": null,
"decoderSubaddress": null,
"decoderOutput": 0
},
"thrown": {
"label": "Goods loop",
"decoderAddress": null,
"decoderSubaddress": null,
"decoderOutput": 1
}
}
}
},
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount owning the selected layout.
layoutId· requiredRailDeckIdentifierLayout receiving or containing the turnout.
input· requiredSaveTurnoutConfigurationCommandOriginal intent, target revision and complete configuration.
options· optionalRailDeckRequestControlOptionsOptional cancellation and timeout, never an automatic retry.
Returns Promise<TurnoutConfigurationReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.deleteTurnout
Deletes only the reviewed idle turnout, retaining the original intent through uncertainty.
const result = await client.accessories.deleteTurnout(
"23",
"31",
{
"requestId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"accessoryId": "7",
"expectedRevision": 4
},
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierOwning account.
layoutId· requiredRailDeckIdentifierOwning layout.
input· requiredDeleteTurnoutCommandOriginal deletion identity, target and reviewed version.
options· optionalRailDeckRequestControlOptionsRequest lifetime and timeout, never automatic mutation replay.
Returns Promise<TurnoutDeletionReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.create
Creates one layout accessory.
const result = await client.accessories.create(
"account 1",
"layout-1",
{
"displayName": "{{fixtureDisplayName}}",
"accessoryType": "signal",
"controllerId": "controller-1",
"decoderAddress": 61
}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout receiving the accessory.
input· requiredCreateRailDeckAccessoryInputAccessory details, type, controller, decoder address, and metadata.
Returns Promise<RailDeckAccessory>.
Example evidence: Retained SDK transport fixture.
accessories.listTypes
Lists supported accessory type profiles for one layout.
const result = await client.accessories.listTypes(
"account 1",
"layout-1"
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout context for accessory types.
Returns Promise<RailDeckAccessoryTypeProfileListResponse>.
Example evidence: Retained SDK transport fixture.
accessories.get
Loads one layout accessory.
const result = await client.accessories.get(
"1",
"18",
"195",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout containing the accessory.
accessoryId· requiredRailDeckIdentifierAccessory to load.
options· optionalRailDeckRequestControlOptionsRead lifetime owned by the visible details page.
Returns Promise<RailDeckAccessory>.
Example evidence: Retained SDK transport fixture.
accessories.update
Updates one layout accessory.
const result = await client.accessories.update(
"account 1",
"layout 1",
"accessory 1",
{
"displayName": "{{fixtureDisplayName}}"
}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout containing the accessory.
accessoryId· requiredRailDeckIdentifierAccessory to update.
input· requiredUpdateRailDeckAccessoryInputPartial accessory update.
Returns Promise<RailDeckAccessory>.
Example evidence: Retained SDK transport fixture.
accessories.delete
Deletes one layout accessory.
const result = await client.accessories.delete(
"account 1",
"layout 1",
"accessory 1"
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout containing the accessory.
accessoryId· requiredRailDeckIdentifierAccessory to delete.
Returns Promise<RailDeckSuccessResponse>.
Example evidence: Retained SDK transport fixture.
accessories.listStates
Lists state definitions for one accessory.
const result = await client.accessories.listStates(
"account 1",
"layout 1",
"accessory 1",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout containing the accessory.
accessoryId· requiredRailDeckIdentifierAccessory whose states should be listed.
options· optionalRailDeckRequestControlOptionsRead lifetime owned by the visible details page.
Returns Promise<RailDeckAccessoryStateDefinitionListResponse>.
Example evidence: Retained SDK transport fixture.
accessories.replaceStates
Replaces all state definitions for one accessory.
const result = await client.accessories.replaceStates(
"account 1",
"layout-1",
"accessory-2",
{
"states": [
{
"stateKey": "green",
"label": "Green",
"decoderAddress": 61,
"decoderOutput": 1
}
]
}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout containing the accessory.
accessoryId· requiredRailDeckIdentifierAccessory whose states should be replaced.
input· requiredReplaceRailDeckAccessoryStatesInputOrdered state definitions.
Returns Promise<RailDeckAccessoryStateDefinitionListResponse>.
Example evidence: Retained SDK transport fixture.
accessories.applyCatalogueProfile
Applies or dry-runs a catalogue profile against one accessory.
const result = await client.accessories.applyCatalogueProfile(
"account 1",
"layout-1",
"accessory-2",
{
"mode": "dry_run",
"productProfileId": "product-1",
"options": {
"states": "replace",
"metadata": "merge"
}
}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the layout.
layoutId· requiredRailDeckIdentifierLayout containing the accessory.
accessoryId· requiredRailDeckIdentifierAccessory receiving the catalogue profile.
input· requiredApplyRailDeckCatalogueProfileInputProduct and decoder profile ids plus merge/replace options.
Returns Promise<RailDeckAccessoryCatalogueProfileApplication>.
Example evidence: Retained SDK transport fixture.
accessories.operateCoordinatedTurnout
Selects one complete saved crossover path using its original reviewed intent.
const result = await client.accessories.operateCoordinatedTurnout(
"1",
"2",
"20",
{
"requestId": "00000000-0000-4000-8000-000000000030",
"expectedRevision": 5,
"path": "through"
},
{}
);TypeScript parameters and return type
accountId· requiredstringAccount owning the selected layout.
layoutId· requiredstringLayout containing the crossover and its members.
accessoryId· requiredstringSaved crossover to operate, never an individual grouped member.
input· requiredCoordinatedTurnoutOperationCommandOriginal request, reviewed revision and named path; no wiring is accepted.
options· optionalRailDeckRequestControlOptionsExisting cancellation/deadline owner, with no automatic mutation replay.
Returns Promise<CoordinatedTurnoutOperationResult>.
Example evidence: Retained SDK transport fixture.
accessories.recoverCoordinatedTurnoutOperation
Checks original bridge history without sending the saved command again.
const result = await client.accessories.recoverCoordinatedTurnoutOperation(
"1",
"2",
"20",
{
"requestId": "00000000-0000-4000-8000-000000000030",
"expectedRevision": 5,
"path": "through",
"parentCommandId": "00000000-0000-4000-8000-000000000020"
},
{}
);TypeScript parameters and return type
accountId· requiredstringAccount owning the original operation.
layoutId· requiredstringLayout containing its original crossover.
accessoryId· requiredstringOriginal selected crossover, even after its settings change.
input· requiredCoordinatedTurnoutRecoveryCommandOriginal intent and admitted command, retained across uncertainty.
options· optionalRailDeckRequestControlOptionsExisting cancellation/deadline owner, without polling or automatic retries.
Returns Promise<CoordinatedTurnoutOperationResult>.
Example evidence: Retained SDK transport fixture.
accessories.tryTurnoutConnection
Tries one complete turnout draft without creating a temporary saved accessory.
const result = await client.accessories.tryTurnoutConnection(
"1",
"18",
{
"requestId": "11111111-1111-4111-8111-111111111111",
"target": {
"operation": "update",
"accessoryId": "194",
"expectedRevision": 7
},
"configuration": {
"displayName": "{{fixtureDisplayName}}",
"controllerId": "22",
"decoderAddress": 61,
"decoderSubaddress": 0,
"notes": "Station throat.\nKeep the siding clear.",
"definition": {
"design": "wye",
"orientation": 90,
"pathAState": "thrown"
},
"destinations": {
"closed": {
"label": "Platform 1",
"decoderAddress": null,
"decoderSubaddress": null,
"decoderOutput": 0
},
"thrown": {
"label": "Goods loop",
"decoderAddress": null,
"decoderSubaddress": null,
"decoderOutput": 1
}
}
},
"reviewId": "22222222-2222-4222-8222-222222222222",
"member": "4",
"state": "closed"
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringLayout whose command station and member were reviewed.
input· requiredTurnoutConnectionTrialOriginal review, complete wiring, member and immutable command identity.
options· optionalRailDeckRequestControlOptionsExisting cancellation/deadline owner, never automatic command replay.
Returns Promise<TurnoutConnectionTrialReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.getCoordinatedTurnoutConfiguration
Opens one crossover with its current numbered member revisions, without copying wiring.
const result = await client.accessories.getCoordinatedTurnoutConfiguration(
"1",
"18",
"240",
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringLayout containing the crossover.
accessoryId· requiredstringSaved crossover to review.
options· optionalRailDeckRequestControlOptionsExisting cancellation and deadline owner, without background polling.
Returns Promise<CoordinatedTurnoutConfigurationSnapshot>.
Example evidence: Retained SDK transport fixture.
accessories.saveCoordinatedTurnoutConfiguration
Saves the complete grouping through one atomic accessory transition.
const result = await client.accessories.saveCoordinatedTurnoutConfiguration(
"1",
"18",
{
"requestId": "11111111-1111-4111-8111-111111111111",
"target": {
"operation": "update",
"accessoryId": "240",
"expectedRevision": 7
},
"configuration": {
"displayName": "{{fixtureDisplayName}}",
"notes": "Keep both tracks clear.\nStation approach.",
"definition": {
"design": "single-crossover",
"orientation": 90,
"mirrored": true
},
"members": [
{
"member": "1",
"throughState": "closed",
"source": "existing",
"accessoryId": "194",
"expectedRevision": 3
},
{
"member": "2",
"throughState": "thrown",
"source": "existing",
"accessoryId": "195",
"expectedRevision": 4
}
]
}
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringLayout receiving or containing the crossover.
input· requiredSaveCoordinatedTurnoutConfigurationCommandOriginal intent, reviewed grouping/member revisions and complete configuration.
options· optionalRailDeckRequestControlOptionsExisting request lifetime; uncertain saves are never replayed automatically.
Returns Promise<CoordinatedTurnoutConfigurationReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.getSpecifications
Opens optional descriptions independently of operating settings.
const result = await client.accessories.getSpecifications(
"1",
"18",
"194",
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringOwning railway.
accessoryId· requiredstringSelected light, signal or turnout.
options· optionalRailDeckRequestControlOptionsExisting cancellation/deadline owner.
Returns Promise<Readonly<{ accountId: string; layoutId: string; accessoryId: string; revision: number; specifications: AccessorySpecifications; }>>.
Example evidence: Retained SDK transport fixture.
accessories.saveSpecifications
Saves descriptions without submitting wiring or automatically replaying an uncertain write.
const result = await client.accessories.saveSpecifications(
"1",
"18",
{
"requestId": "22222222-2222-4222-8222-222222222222",
"target": {
"operation": "update",
"accessoryId": "194",
"expectedRevision": 1
},
"specifications": {
"manufacturer": "Model Lighting",
"modelName": "Station lamp",
"productCode": "L-10",
"scale": "OO",
"decoderModel": "Accessory controller"
}
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringOwning railway.
input· requiredSaveAccessorySpecificationsCommandOriginal request identity, reviewed version and optional fields.
options· optionalRailDeckRequestControlOptionsExisting request lifetime.
Returns Promise<Readonly<{ accountId: string; layoutId: string; requestId: string; accessoryId: string; operation: "create" | "update"; reviewedRevision: number | null; savedRevision: number; }>>.
Example evidence: Retained SDK transport fixture.
accessories.tryLightConnection
Tries one saved On/Off mapping without treating publication as visual confirmation.
const result = await client.accessories.tryLightConnection(
"1",
"18",
{
"requestId": "11111111-1111-4111-8111-111111111111",
"accessoryId": "194",
"expectedRevision": 7,
"state": "on"
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringSelected layout.
input· requiredLightConnectionTrialOriginal trial identity, light, settings revision and explicit On/Off choice.
options· optionalRailDeckRequestControlOptionsRequest lifetime; interrupted publication is never automatically replayed.
Returns Promise<LightConnectionTrialReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.confirmLightConnection
Confirms both observed settings through one audited, immutable save.
const result = await client.accessories.confirmLightConnection(
"1",
"18",
{
"requestId": "22222222-2222-4222-8222-222222222222",
"accessoryId": "194",
"expectedRevision": 7,
"observations": {
"on": "11111111-1111-4111-8111-111111111111",
"off": "33333333-3333-4333-8333-333333333333"
}
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringSelected layout.
input· requiredConfirmLightConnectionReviewed version and exact acknowledged commands the person observed.
options· optionalRailDeckRequestControlOptionsRequest lifetime; an explicit retry must retain the original intent.
Returns Promise<LightConfigurationReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.getSignalConfiguration
Reads signal fields and mappings from one coherent snapshot.
const result = await client.accessories.getSignalConfiguration(
"1",
"1",
"2",
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringOwning railway.
accessoryId· requiredstringSaved signal to review.
options· optionalRailDeckRequestControlOptionsOptional cancellation and deadline.
Returns Promise<SignalConfigurationSnapshot>.
Example evidence: Retained SDK transport fixture.
accessories.saveSignalConfiguration
Commits all reviewed signal settings through one immutable intent.
const result = await client.accessories.saveSignalConfiguration(
"1",
"1",
{
"requestId": "1174bd51-f61b-4dac-8a0d-2e9435d7075e",
"target": {
"operation": "update",
"accessoryId": "2",
"expectedRevision": 11
},
"configuration": {
"displayName": "{{fixtureDisplayName}}",
"controllerId": "1",
"definition": {
"design": "four-aspect",
"quadrant": null
},
"notes": null,
"connections": [
{
"indication": "red",
"label": "Stop",
"address": 86,
"output": 0
},
{
"indication": "yellow",
"label": "Caution",
"address": 86,
"output": 1
},
{
"indication": "double-yellow",
"label": "Double yellow",
"address": 87,
"output": 0
},
{
"indication": "green",
"label": "Clear",
"address": 87,
"output": 1
}
],
"operating": {
"cycling": true,
"indicationOrder": [
"green",
"double-yellow",
"yellow",
"red"
]
},
"photographs": [
{
"indication": "red",
"photographId": "1"
}
]
}
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringRailway receiving or containing the signal.
input· requiredSaveSignalConfigurationCommandOriginal create/update target, reviewed revision and draft.
options· optionalRailDeckRequestControlOptionsRequest lifetime; mutations are never automatically replayed.
Returns Promise<SignalConfigurationReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.saveSignalOrder
Changes only the shared visual order of the layout's signals.
const result = await client.accessories.saveSignalOrder(
"1",
"1",
{
"requestId": "58dd936f-36b2-46e2-92aa-91076ae38e83",
"reviewedIds": [
"accessory:6",
"linked:1"
],
"orderedIds": [
"linked:1",
"accessory:6"
],
"collection": "library"
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringRailway whose complete collection was reviewed.
input· requiredAccessoryOrderCommandOriginal reviewed permutation and request identity.
options· optionalRailDeckRequestControlOptionsRequest lifetime without automatic mutation replay.
Returns Promise<AccessoryOrderReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.getLightConfiguration
Opens one light's descriptive settings and independent On/Off mappings.
const result = await client.accessories.getLightConfiguration(
"1",
"18",
"194",
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringLayout containing the light.
accessoryId· requiredstringSaved light to review, including unfinished connections.
options· optionalRailDeckRequestControlOptionsOptional cancellation and deadline owned by the visible journey.
Returns Promise<LightConfigurationSnapshot>.
Example evidence: Retained SDK transport fixture.
accessories.saveLightConfiguration
Saves one reviewed light atomically without switching its output.
const result = await client.accessories.saveLightConfiguration(
"1",
"18",
{
"requestId": "22222222-2222-4222-8222-222222222222",
"target": {
"operation": "update",
"accessoryId": "194",
"expectedRevision": 7
},
"configuration": {
"displayName": "{{fixtureDisplayName}}",
"controllerId": null,
"picture": "shop",
"notes": "Front window\n\nSeparate from the platform lamps.",
"connections": {
"off": {
"decoderAddress": 70,
"decoderSubaddress": null,
"decoderOutput": 1
},
"on": {
"decoderAddress": 70,
"decoderSubaddress": null,
"decoderOutput": 0
}
}
}
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringLayout receiving or containing the light.
input· requiredSaveLightConfigurationCommandOriginal intent, create/update target and complete descriptive/connection settings.
options· optionalRailDeckRequestControlOptionsRequest lifetime; uncertain writes are never automatically replayed.
Returns Promise<LightConfigurationReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.saveLightOrder
Changes the shared visual order of a layout's complete light collection.
const result = await client.accessories.saveLightOrder(
"23",
"31",
{
"requestId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"reviewedIds": [
"accessory:7",
"linked:7"
],
"orderedIds": [
"linked:7",
"accessory:7"
],
"collection": "library"
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringLayout whose collection was reviewed.
input· requiredAccessoryOrderCommandCaptured original order, requested permutation and immutable intent.
options· optionalRailDeckRequestControlOptionsRequest lifetime without polling or automatic write retries.
Returns Promise<AccessoryOrderReceipt>.
Example evidence: Retained SDK transport fixture.
accessories.deleteLight
Removes only the reviewed light without replaying an uncertain deletion automatically.
const result = await client.accessories.deleteLight(
"23",
"31",
{
"requestId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"accessoryId": "7",
"expectedRevision": 4
},
{}
);TypeScript parameters and return type
accountId· requiredstringOwning account.
layoutId· requiredstringLayout whose saved light was reviewed.
input· requiredDeleteAccessoryCommandOriginal deletion intent, light identity and editor revision.
options· optionalRailDeckRequestControlOptionsOptional cancellation and deadline.
Returns Promise<AccessoryDeletionReceipt>.
Example evidence: Retained SDK transport fixture.
Download all TypeScript method examples
JavaScript calls and TypeScript downloads are checked through the real SDK using local response fixtures. This verifies the calls and decoding for those fixtures.
The complete TypeScript workflow
Follow how the calls fit together, including the review and recovery steps. Supply your configured client and explicitly selected development records. Importing the download performs no requests; mutations are never retried automatically.
import type { RailDeckDirectIntegrationClient as Client } from '@raildeck/frontend-sdk/direct-integration';
/**
* Read the selected accessory, its state definitions and available types.
* @param client - Configured client; the caller owns current authority.
* @param accountId - Authorised account for this workflow.
* @param layoutId - Explicitly selected layout within the account.
* @param accessoryId - Explicitly selected accessory.
* @param signal - Caller-owned cancellation signal.
* @returns Saved configuration for review; reading it does not move points or change a signal.
*/
export async function openAccessoryEditor(
client: Client,
accountId: string,
layoutId: string,
accessoryId: string,
signal: AbortSignal,
) {
const options = { signal, timeoutMs: 15_000 };
const accessory = await client.accessories.get(accountId, layoutId, accessoryId, options);
const states = await client.accessories.listStates(accountId, layoutId, accessoryId, options);
const types = await client.accessories.listTypes(accountId, layoutId);
return { accessory, states, types };
}
Download TypeScript example