Account access
Check the current Product access decision for an account.
Source 0.1.0 Private source package
How the calls fit together
Keep the access decision tied to the selected account; a saved selection does not grant authority.
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
accounts.access.getProductAccess
Evaluates the account's current Product feature gates.
const result = await client.accounts.access.getProductAccess(
"account-1",
{}
);TypeScript parameters and return type
accountId· requiredRailDeckIdentifierAuthorised account containing the selected railway records.
requestOptions· optionalRailDeckRequestControlOptionsCaller-owned cancellation signal and timeout; these controls never authorise an automatic mutation retry.
Returns Promise<RailDeckAccountProductAccessResponse>.
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';
/**
* Check the access decision for the selected account.
* @param client - Configured client; the caller owns current authority.
* @param accountId - Authorised account for this workflow.
* @param signal - Caller-owned cancellation signal.
* @returns A decision tied to the account that was checked, not an operating lease.
*/
export async function readAccountAccess(
client: Client,
accountId: string,
signal: AbortSignal,
) {
const access = await client.accounts.access.getProductAccess(accountId, {
signal, timeoutMs: 15_000,
});
return { accountId, access };
}
Download TypeScript example