Skip to main content

Rail Deck is being prepared for an invitation-only Alpha. Check current availability

Developer documentation

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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout whose accessories should be listed.

options · optional
RailDeckRequestControlOptions

Optional 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 · required
RailDeckIdentifier

Account owning the layout.

layoutId · required
RailDeckIdentifier

Layout whose complete collection was reviewed.

input · required
SaveTurnoutOrderCommand

Captured review, permutation and immutable intent.

options · optional
RailDeckRequestControlOptions

Request 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 · required
RailDeckIdentifier

Account owning the selected layout.

layoutId · required
RailDeckIdentifier

Layout containing the turnout.

accessoryId · required
RailDeckIdentifier

Saved turnout to review, including incomplete older records.

options · optional
RailDeckRequestControlOptions

Optional 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 · required
RailDeckIdentifier

Account owning the selected layout.

layoutId · required
RailDeckIdentifier

Layout receiving or containing the turnout.

input · required
SaveTurnoutConfigurationCommand

Original intent, target revision and complete configuration.

options · optional
RailDeckRequestControlOptions

Optional 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 · required
RailDeckIdentifier

Owning account.

layoutId · required
RailDeckIdentifier

Owning layout.

input · required
DeleteTurnoutCommand

Original deletion identity, target and reviewed version.

options · optional
RailDeckRequestControlOptions

Request 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout receiving the accessory.

input · required
CreateRailDeckAccessoryInput

Accessory 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout containing the accessory.

accessoryId · required
RailDeckIdentifier

Accessory to load.

options · optional
RailDeckRequestControlOptions

Read 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout containing the accessory.

accessoryId · required
RailDeckIdentifier

Accessory to update.

input · required
UpdateRailDeckAccessoryInput

Partial 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout containing the accessory.

accessoryId · required
RailDeckIdentifier

Accessory 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout containing the accessory.

accessoryId · required
RailDeckIdentifier

Accessory whose states should be listed.

options · optional
RailDeckRequestControlOptions

Read 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout containing the accessory.

accessoryId · required
RailDeckIdentifier

Accessory whose states should be replaced.

input · required
ReplaceRailDeckAccessoryStatesInput

Ordered 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 · required
RailDeckIdentifier

Account that owns the layout.

layoutId · required
RailDeckIdentifier

Layout containing the accessory.

accessoryId · required
RailDeckIdentifier

Accessory receiving the catalogue profile.

input · required
ApplyRailDeckCatalogueProfileInput

Product 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 · required
string

Account owning the selected layout.

layoutId · required
string

Layout containing the crossover and its members.

accessoryId · required
string

Saved crossover to operate, never an individual grouped member.

input · required
CoordinatedTurnoutOperationCommand

Original request, reviewed revision and named path; no wiring is accepted.

options · optional
RailDeckRequestControlOptions

Existing 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 · required
string

Account owning the original operation.

layoutId · required
string

Layout containing its original crossover.

accessoryId · required
string

Original selected crossover, even after its settings change.

input · required
CoordinatedTurnoutRecoveryCommand

Original intent and admitted command, retained across uncertainty.

options · optional
RailDeckRequestControlOptions

Existing 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 · required
string

Owning account.

layoutId · required
string

Layout whose command station and member were reviewed.

input · required
TurnoutConnectionTrial

Original review, complete wiring, member and immutable command identity.

options · optional
RailDeckRequestControlOptions

Existing 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 · required
string

Owning account.

layoutId · required
string

Layout containing the crossover.

accessoryId · required
string

Saved crossover to review.

options · optional
RailDeckRequestControlOptions

Existing 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 · required
string

Owning account.

layoutId · required
string

Layout receiving or containing the crossover.

input · required
SaveCoordinatedTurnoutConfigurationCommand

Original intent, reviewed grouping/member revisions and complete configuration.

options · optional
RailDeckRequestControlOptions

Existing 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 · required
string

Owning account.

layoutId · required
string

Owning railway.

accessoryId · required
string

Selected light, signal or turnout.

options · optional
RailDeckRequestControlOptions

Existing 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 · required
string

Owning account.

layoutId · required
string

Owning railway.

input · required
SaveAccessorySpecificationsCommand

Original request identity, reviewed version and optional fields.

options · optional
RailDeckRequestControlOptions

Existing 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 · required
string

Owning account.

layoutId · required
string

Selected layout.

input · required
LightConnectionTrial

Original trial identity, light, settings revision and explicit On/Off choice.

options · optional
RailDeckRequestControlOptions

Request 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 · required
string

Owning account.

layoutId · required
string

Selected layout.

input · required
ConfirmLightConnection

Reviewed version and exact acknowledged commands the person observed.

options · optional
RailDeckRequestControlOptions

Request 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 · required
string

Owning account.

layoutId · required
string

Owning railway.

accessoryId · required
string

Saved signal to review.

options · optional
RailDeckRequestControlOptions

Optional 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 · required
string

Owning account.

layoutId · required
string

Railway receiving or containing the signal.

input · required
SaveSignalConfigurationCommand

Original create/update target, reviewed revision and draft.

options · optional
RailDeckRequestControlOptions

Request 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 · required
string

Owning account.

layoutId · required
string

Railway whose complete collection was reviewed.

input · required
AccessoryOrderCommand

Original reviewed permutation and request identity.

options · optional
RailDeckRequestControlOptions

Request 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 · required
string

Owning account.

layoutId · required
string

Layout containing the light.

accessoryId · required
string

Saved light to review, including unfinished connections.

options · optional
RailDeckRequestControlOptions

Optional 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 · required
string

Owning account.

layoutId · required
string

Layout receiving or containing the light.

input · required
SaveLightConfigurationCommand

Original intent, create/update target and complete descriptive/connection settings.

options · optional
RailDeckRequestControlOptions

Request 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 · required
string

Owning account.

layoutId · required
string

Layout whose collection was reviewed.

input · required
AccessoryOrderCommand

Captured original order, requested permutation and immutable intent.

options · optional
RailDeckRequestControlOptions

Request 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 · required
string

Owning account.

layoutId · required
string

Layout whose saved light was reviewed.

input · required
DeleteAccessoryCommand

Original deletion intent, light identity and editor revision.

options · optional
RailDeckRequestControlOptions

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

Handle errors and uncertain outcomes

Choose another feature

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

Information reviewed .