Bridge management
Read bridge records, status and retirement consequences.
Source 0.1.0 Private source package
How the calls fit together
Read the selected bridge and its current status. Pairing codes and device credential protocols remain in their protected setup workflow.
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
bridges.list
Lists bridges in an account.
const result = await client.bridges.list(
"account 1",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the bridges.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckBridgeListResponse>.
Example evidence: Retained SDK transport fixture.
bridges.create
Creates a bridge record without redeeming hardware setup.
const result = await client.bridges.create(
"account-1",
{
"displayName": "{{fixtureDisplayName}}"
},
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that will own the bridge.
input· requiredCreateRailDeckBridgeInputDisplay name and optional assignments.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckBridge>.
Example evidence: Retained SDK transport fixture.
bridges.get
Loads one bridge.
const result = await client.bridges.get(
"account-1",
"bridge-1",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the bridge.
bridgeId· requiredRailDeckIdentifierBridge to load.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckBridge>.
Example evidence: Retained SDK transport fixture.
bridges.update
Updates one bridge.
const result = await client.bridges.update(
"account-1",
"bridge-1",
{
"displayName": "{{fixtureDisplayName}}"
},
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the bridge.
bridgeId· requiredRailDeckIdentifierBridge to update.
input· requiredUpdateRailDeckBridgeInputPartial bridge update.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckBridge>.
Example evidence: Retained SDK transport fixture.
bridges.getRetirementPreview
Loads the exact current consequences of removing or completing a replacement.
const result = await client.bridges.getRetirementPreview(
"account 1",
"bridge 1",
"bridge 2",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAuthorised account containing the selected railway records.
bridgeId· requiredRailDeckIdentifierIdentifier of the explicitly selected record in your authorised development environment.
replacementBridgeId· requiredRailDeckIdentifier | nullSelected replacement bridge, or null when no replacement is being proposed.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckBridgeRetirementPreview>.
Example evidence: Retained SDK transport fixture.
bridges.delete
Retires one bridge against an exact reviewed preview.
const result = await client.bridges.delete(
"account 1",
"bridge 1",
{
"replacementBridgeId": "bridge 2",
"previewFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"confirmed": true
},
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAuthorised account containing the selected railway records.
bridgeId· requiredRailDeckIdentifierIdentifier of the explicitly selected record in your authorised development environment.
input· requiredDeleteRailDeckBridgeInputThe operation input. Use the complete typed shape shown in the example and retain reviewed versions for writes.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckBridgeRetirementResult>.
Example evidence: Retained SDK transport fixture.
bridges.getStatus
Loads bridge lifecycle and assignment health status.
const result = await client.bridges.getStatus(
"account-1",
"bridge-1",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAccount that owns the bridge.
bridgeId· requiredRailDeckIdentifierBridge to inspect.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckBridgeStatus>.
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 a bridge, current status and the consequences of retiring it without replacement.
* @param client - Configured client; the caller owns current authority.
* @param accountId - Authorised account for this workflow.
* @param bridgeId - Explicitly selected bridge.
* @param signal - Caller-owned cancellation signal.
* @returns Management evidence only; no pairing code, credential or retirement command.
*/
export async function prepareBridgeReview(
client: Client,
accountId: string,
bridgeId: string,
signal: AbortSignal,
) {
const options = { signal, timeoutMs: 15_000 };
const bridge = await client.bridges.get(accountId, bridgeId, options);
const status = await client.bridges.getStatus(accountId, bridgeId, options);
const retirement = await client.bridges.getRetirementPreview(accountId, bridgeId, null, options);
return { bridge, status, retirement };
}
Download TypeScript example