Skip to main content

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

Developer documentation

Product and decoder catalogue

Find product and decoder profiles before applying them to your collection.

Source 0.1.0 Private source package

How the calls fit together

Search the catalogue, inspect a chosen profile, then use the target feature’s dry-run application before any confirmed change.

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

catalogue.listProductProfiles

Searches active product profiles by text, type, barcode, or bounded result limit.

const result = await client.catalogue.listProductProfiles(
  {
    "query": "{{fixtureSearchQuery}}",
    "productType": "locomotive",
    "barcode": "5012345678901",
    "limit": 10
  }
);
TypeScript parameters and return type
input · optional
RailDeckCatalogueProductProfileSearchInput

Optional search filters for customer-facing product profiles.

Returns Promise<RailDeckCatalogueProductProfileListResponse>.

Example evidence: Retained SDK transport fixture.

catalogue.getProductProfile

Loads one active product profile.

const result = await client.catalogue.getProductProfile(
  "product-1"
);
TypeScript parameters and return type
productProfileId · required
RailDeckIdentifier

Product profile to load.

Returns Promise<RailDeckCatalogueProductProfile>.

Example evidence: Retained SDK transport fixture.

catalogue.listDecoderProfiles

Searches active decoder profiles by text, type, manufacturer, or bounded result limit.

const result = await client.catalogue.listDecoderProfiles(
  {
    "query": "{{fixtureSearchQuery}}",
    "decoderType": "locomotive",
    "manufacturer": "DCC Concepts",
    "limit": 5
  }
);
TypeScript parameters and return type
input · optional
RailDeckCatalogueDecoderProfileSearchInput

Optional search filters for customer-facing decoder profiles.

Returns Promise<RailDeckCatalogueDecoderProfileListResponse>.

Example evidence: Retained SDK transport fixture.

catalogue.getDecoderProfile

Loads one active decoder profile.

const result = await client.catalogue.getDecoderProfile(
  "decoder-1"
);
TypeScript parameters and return type
decoderProfileId · required
RailDeckIdentifier

Decoder profile to load.

Returns Promise<RailDeckCatalogueDecoderProfile>.

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';

/**
 * Find product and decoder candidates for a later reviewed application.
 * @param client - Configured client; the caller owns current authority.
 * @param query - Search phrase chosen by the person using the integration.
 * @returns Search candidates; inspect one and use the target feature’s dry run before applying.
 */
export async function searchCollectionProfiles(
  client: Client,
  query: string,
) {
  const products = await client.catalogue.listProductProfiles({ query, limit: 10 });
  const decoders = await client.catalogue.listDecoderProfiles({ query, limit: 10 });
  return { products, decoders };
}
Download TypeScript example

Information reviewed .