Skip to main content

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

Developer documentation

API and sign-in configuration

Read the identity and API configuration before choosing an approved integration flow.

Source 0.1.0 Private source package

How the calls fit together

Read connection settings; keep token acquisition and refresh with your identity adapter.

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

auth.getConfig

Loads hosted identity-provider settings for the frontend login flow.

const result = await client.auth.getConfig(
  {}
);
TypeScript parameters and return type
requestOptions · optional
RailDeckRequestControlOptions

Caller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.

Returns Promise<RailDeckAuthConfig>.

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 { createRailDeckDirectIntegrationClient, type RailDeckAccessTokenProvider } from '@raildeck/frontend-sdk/direct-integration';

/**
 * Create an integration client and read its approved identity configuration.
 * @param baseUrl - Explicit caller-owned value for this operation.
 * @param getAccessToken - Explicit caller-owned value for this operation.
 * @param signal - Caller-owned cancellation signal.
 * @returns The client and decoded configuration; token acquisition remains with the caller.
 */
export async function prepareIntegration(
  baseUrl: string,
  getAccessToken: RailDeckAccessTokenProvider,
  signal: AbortSignal,
) {
  const client = createRailDeckDirectIntegrationClient({ baseUrl, getAccessToken });
  const config = await client.auth.getConfig({ signal, timeoutMs: 15_000 });
  return { client, config };
}
Download TypeScript example

Information reviewed .