Skip to content
scroll to zoom · drag to pan

SlotDTO

type SlotDTO = {
asset: AssetDTO;
description: string | null;
preset: VariantPreset | null;
slotKey: string;
updatedAt: string;
};

Defined in: packages/asset-client/dist/index.d.ts:671

@nitida/asset-client/slots — slot resolver for tenant-named assets.

Slots give tenants a way to attach stable, human-readable names (“webapp.wizard.pool-type.icon-1”, “storefront.cr.hero-video.landscape_hd_16x9.mp4”) to assets they uploaded. Consumers resolve names → AssetDTOs at build / runtime so their source never hardcodes a CDN URL; an admin rebinds a slot in the platform console and every consumer picks up the swap on cache refresh.

Two layers in this package:

  • resolveSlot / resolveSlots — universal (server, edge, workers) fetch helpers. Cache 60s by default.
  • React hooks live in @nitida/asset-client/react/use-slot (kept out of this module so the SSR-safe core stays dependency-free of react).
asset: AssetDTO;

Defined in: packages/asset-client/dist/index.d.ts:677


description: string | null;

Defined in: packages/asset-client/dist/index.d.ts:675


preset: VariantPreset | null;

Defined in: packages/asset-client/dist/index.d.ts:674

Preset hint set when the slot was bound (e.g. thumb for icon slots).


slotKey: string;

Defined in: packages/asset-client/dist/index.d.ts:672


updatedAt: string;

Defined in: packages/asset-client/dist/index.d.ts:676