Skip to Content
BBRICKSv0.7.4
Reference

Types

The exported types and interfaces that are not a component's props.

Exported types and interfaces, as declared. A component's props type is not repeated here: it is the Props table on the component's page.

Data and hooks

ActionFailure

What kind of failure an action met, for the caller to branch on (toast vs field errors vs reload).

export type ActionFailure = 'validation' | 'refused' | 'session' | 'csrf' | 'forbidden' | 'throttled' | 'network' | 'error' | 'busy';

Source: src/data/useAction.ts (line 7)

ActionFn

export type ActionFn<I, R> = (input: I, client: HttpClient) => Promise<R>;

Source: src/data/useAction.ts (line 61)

ActionOptions

export interface ActionOptions<I, R> {
  /** After a success (close the form, toast, reload a list). */
  onDone?: (data: R, input: I) => void;
  /** After a failure, with the mapped result. */
  onError?: (failure: Extract<ActionResult<R>, { ok: false }>, input: I) => void;
  /** Default: the DataProvider's language, else 'en'. */
  language?: Lang;
  codes?: CodeMessages;
  client?: HttpClient;
}

Source: src/data/useAction.ts (line 63)

ActionResult

export type ActionResult<R> =
  | { ok: true; data: R }
  | { ok: false; status: number; kind: ActionFailure; message: string; code?: string; fieldErrors: Record<string, string>; error: HttpError };

Source: src/data/useAction.ts (line 9)

ActionSpec

A request an action sends: url may depend on the input ((row) => \/api/codes/${row.id}/pause``).

export interface ActionSpec<I> {
  method: Exclude<HttpMethod, 'GET'> | 'GET';
  url: string | ((input: I) => string);
  /** The body sent; default: the input itself (none for GET / DELETE). */
  body?: (input: I) => unknown;
}

Source: src/data/useAction.ts (line 54)

ActionState

export interface ActionState<I, R> {
  /**
   * Resolves with the outcome; never rejects. A second run while one is pending: with the same input (`Object.is`) it
   * returns the pending promise (a double click sends once); with another input nothing is sent and it resolves at once
   * with `{ ok: false, kind: 'busy' }`, leaving `pending`, `error`, `result` and `onError` alone. An exception thrown by
   * a function action itself (not by the client) resolves as `kind: 'error'` and is logged with console.error.
   */
  run: (input: I) => Promise<ActionResult<R>>;
  pending: boolean;
  /** The failure's message in the viewer's language; null while fine. */
  error: string | null;
  fieldErrors: Record<string, string>;
  /** The last outcome (null before the first run and after reset). */
  result: ActionResult<R> | null;
  /** Clear error, fieldErrors and result (a form re-opened). */
  reset: () => void;
}

Source: src/data/useAction.ts (line 74)

CodeMessages

Localized copy per business code (wallet_busy → "The wallet is busy…"): a string for every language, or per language.

export type CodeMessages = Record<string, string | Partial<Record<Lang, string>>>;

Source: src/data/useAction.ts (line 14)

DataError

ResourceError plus what the server said about it (a business code, the 422 errors bag).

export interface DataError extends ResourceError {
  code?: string;
  errors?: Record<string, string[]>;
}

Source: src/data/useResource.ts (line 7)

DebouncedCallback

export interface DebouncedCallback<A extends unknown[]> {
  (...args: A): void;
  /** Drop the pending call. */
  cancel: () => void;
  /** Run the pending call now (e.g. on Enter or blur). */
  flush: () => void;
  /** True while a call is waiting. */
  isPending: () => boolean;
}

Source: src/data/useDebouncedCallback.ts (line 3)

DrawerResource

export interface DrawerResource<T, S> {
  /** True while a url is set: render the one <Drawer open={open}> from the click on. */
  open: boolean;
  /** What the click already knew (the list row): the header draws from it at once. */
  seed: S | null;
  /** The detail, once loaded (null for an empty answer, a 204). Kept while a retry or a reload runs, so the body does not blink. */
  data: T | null;
  /** True until the first answer for this url (an empty one included): pass it to <Drawer loading>. */
  loading: boolean;
  error: ResourceError | null;
  /** Read the same url again (after an action changed it, or after an error). */
  retry: () => void;
}

Source: src/hooks/useDrawerResource.ts (line 6)

ErrorBag

Laravel's validation bag: { field: [message, …] }.

export type ErrorBag = Record<string, string[]>;

Source: src/data/http.ts (line 10)

HttpClient

export interface HttpClient {
  request<T = unknown>(method: HttpMethod, url: string, options?: WriteOptions): Promise<T>;
  get<T = unknown>(url: string, options?: RequestOptions): Promise<T>;
  post<T = unknown>(url: string, body?: unknown, options?: RequestOptions): Promise<T>;
  put<T = unknown>(url: string, body?: unknown, options?: RequestOptions): Promise<T>;
  patch<T = unknown>(url: string, body?: unknown, options?: RequestOptions): Promise<T>;
  delete<T = unknown>(url: string, options?: WriteOptions): Promise<T>;
  /** POST multipart: a FormData as is, or a record of fields and files (Blob / File). No Content-Type is set. */
  upload<T = unknown>(url: string, form: FormData | Record<string, string | Blob>, options?: RequestOptions): Promise<T>;
}

Source: src/data/http.ts (line 44)

HttpClientOptions

export interface HttpClientOptions {
  /**
   * Prefixed to relative URLs (not to `http(s)://…` or `//…`). An absolute baseUrl on another origin
   * (`https://api.example.com/v1`) makes that origin trusted (see `trustedOrigins`).
   */
  baseUrl?: string;
  /**
   * Sent with every request to a trusted origin (after the defaults, before per-request headers). Like the CSRF token
   * and `X-Requested-With`, they are never sent to another origin: an absolute URL elsewhere (a presigned upload, a
   * third-party API) gets only `Accept`, `Content-Type` and the request's own `headers`.
   */
  headers?: Record<string, string>;
  /**
   * More origins that get the CSRF token, `X-Requested-With` and the shared `headers` (exact origins:
   * `https://files.example.com`; a path is ignored). Always trusted: the page's own origin, and baseUrl's origin.
   */
  trustedOrigins?: ReadonlyArray<string>;
  /** The CSRF token for writes (`X-CSRF-TOKEN`) to a trusted origin. Default: the `<meta name="csrf-token">` content. Return null for none. */
  csrf?: () => string | null;
  /** Default 'same-origin'. */
  credentials?: RequestCredentials;
  /** Called for a 401 or 419 (the session is gone) before the HttpError is thrown: redirect to sign-in, etc. */
  onUnauthorized?: (error: HttpError) => void;
  /** The fetch to use (tests, SSR). Default: the global fetch at call time. */
  fetch?: typeof fetch;
}

Source: src/data/http.ts (line 55)

HttpMethod

export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';

Source: src/data/http.ts (line 7)

HttpWriteOptions

export interface WriteOptions extends RequestOptions {
  body?: unknown;
}

Source: src/data/http.ts (line 40)

ListFetcherOptions

export interface ListFetcherOptions<T> {
  /** ListQuery → request params. Default: q, sort, dir, page and every select by its id; `chip` as `chipParam`. */
  toParams?: (query: ListQuery) => Params;
  /** The param the status chip is sent as (default 'status'). Ignored when toParams is given. */
  chipParam?: string;
  /** Extra params on every request (a fixed scope). */
  params?: Params;
  adapter?: keyof typeof pageAdapters | PageAdapter<T>;
}

Source: src/data/listFetcher.ts (line 5)

ListPage

export interface ListPage<T> {
  rows: T[];
  total: number;
  lastPage: number;
}

Source: src/hooks/useListState.ts (line 18)

ListQuery

Everything a list is asked for: search, status chip, filter selects, sort, direction and page.

export interface ListQuery {
  q: string;
  chip: string;
  /** Filter selects by id (tier, followers, platform, group…). */
  selects: Record<string, string>;
  sort: string;
  dir: ListSortDir;
  page: number;
}

Source: src/hooks/useListState.ts (line 8)

ListSortDir

export type ListSortDir = 'asc' | 'desc';

Source: src/hooks/useListState.ts (line 5)

ListStateOptions

export interface ListStateOptions<T> {
  /**
   * The hash namespace: params are written `ns.q`, `ns.sort`, `ns.page`, `ns.<select id>` (bare when ''), so two
   * lists on one screen keep separate state. `q`, `chip`, `sort`, `dir` and `page` are reserved select ids.
   */
  namespace: string;
  /** The values when the hash says nothing; a value equal to its default is never written to the URL. */
  defaults?: Partial<Omit<ListQuery, 'page'>>;
  /** Reads one page. Abort when the signal fires; throw `{ status }` on an HTTP error. */
  fetcher: (query: ListQuery, signal: AbortSignal) => Promise<ListPage<T>>;
  /** False: nothing is fetched (the list is not offered right now). */
  enabled?: boolean;
  /** False: state lives in memory only (a list inside a drawer). Default true. */
  inHash?: boolean;
}

Source: src/hooks/useListState.ts (line 24)

ListStateResult

export interface ListState<T> extends ListPage<T> {
  query: ListQuery;
  page: number;
  loading: boolean;
  /** Status, the server's viewer-facing message, and its business `code` / 422 `errors` when it sent them. */
  error: DataError | null;
  retry: () => void;
  /** Merge a change. Any change other than the page itself goes back to page 1. */
  set: (patch: Partial<ListQuery>) => void;
  /** Back to the defaults (the empty state's "Clear filters"). */
  reset: () => void;
}

Source: src/hooks/useListState.ts (line 40)

PageAdapter

Reads an answer body into a PageInfo; null when the body is not a page.

export type PageAdapter<T, S = unknown> = (body: unknown) => PageInfo<T, S> | null;

Source: src/data/usePaged.ts (line 19)

PagedOptions

export interface PagedOptions<T, S = unknown> {
  /** Filters, search and sort. A change goes back to page 1. */
  params?: Params;
  /** The page's query param. Default 'page'. */
  pageParam?: string;
  /** Rows per page, sent as `perPageParam` (default 'per_page'); omitted when not given. */
  perPage?: number;
  perPageParam?: string;
  /** Which envelope the server answers with: a pageAdapters key or your own reader. Default 'auto'. */
  adapter?: keyof typeof pageAdapters | PageAdapter<T, S>;
  /**
   * Controlled page (e.g. from useHashState, so the page survives reload and Back). Pass both; without them the
   * page is kept here and goes back to 1 when params change.
   */
  page?: number;
  onPageChange?: (page: number) => void;
  enabled?: boolean;
  client?: HttpClient;
  keepPrevious?: boolean;
}

Source: src/data/usePaged.ts (line 48)

PagedResult

export interface PagedResult<T, S = unknown> extends UseResourceResult<unknown> {
  rows: T[];
  page: number;
  lastPage: number;
  total: number;
  perPage?: number;
  summary?: S;
  setPage: (page: number) => void;
}

Source: src/data/usePaged.ts (line 69)

PageInfo

One page, whatever envelope the server wrapped it in.

export interface PageInfo<T, S = unknown> {
  rows: T[];
  total: number;
  lastPage: number;
  /** The page the server says it answered (may be past lastPage when the last row went away). */
  page?: number;
  perPage?: number;
  /** Whole-list figures some endpoints add (`summary`), passed through untouched. */
  summary?: S;
}

Source: src/data/usePaged.ts (line 7)

Params

export type Params = Record<string, ParamValue>;

Source: src/data/http.ts (line 5)

ParamValue

A request param value: empty ones (undefined, null, '', []) are left out of the URL.

export type ParamValue = string | number | boolean | null | undefined | ReadonlyArray<string | number>;

Source: src/data/http.ts (line 4)

RequestOptions

export interface RequestOptions {
  /** Appended to the URL with resourceUrl (stable order, empty values skipped). */
  params?: Params;
  headers?: Record<string, string>;
  signal?: AbortSignal;
}

Source: src/data/http.ts (line 33)

ResourceError

A failed console request: the HTTP status (0 = network) and the server's message when it is meant for the viewer (http.ts serverMessage: a 422 or a business code), else empty.

export interface ResourceError {
  status: number;
  message: string;
}

Source: src/hooks/resourceTypes.ts (line 2)

ResourceOptions

export interface ResourceOptions {
  params?: Params;
  /** False: idle, nothing fetched (no permission, or not needed yet). Same as `url === null`. */
  enabled?: boolean;
  /** Default: the DataProvider's client. */
  client?: HttpClient;
  /**
   * Keep the last data while a different url/params load (default true: a list does not blank between pages).
   * False: a new target starts with no data. A `reload` of the same target always keeps it.
   */
  keepPrevious?: boolean;
}

Source: src/data/useResource.ts (line 12)

ResourceState

What useResource returns and AsyncBlock renders.

export interface ResourceState<T> {
  status: ResourceStatus;
  /** Kept while a reload is loading, so a list does not blank between pages. */
  data?: T;
  error?: ResourceError;
  reload: () => void;
}

Source: src/hooks/resourceTypes.ts (line 10)

ResourceStatus

export type ResourceStatus = 'idle' | 'loading' | 'ready' | 'error';

Source: src/hooks/resourceTypes.ts (line 7)

UrlLocation

export type UrlLocation = 'hash' | 'query';

Source: src/data/urlState.ts (line 12)

UrlPatch

A URL patch: a value to set, null / undefined / '' to drop the param, EMPTY_PARAM to keep it with an empty value.

export type UrlPatch = Record<string, string | null | undefined | typeof EMPTY_PARAM>;

Source: src/data/urlState.ts (line 28)

UrlSort

export interface UrlSort {
  /** What the header shows: the chosen sort, else the fallback, else null. */
  sort: UrlSortState | null;
  /** What the request sends: `{ sort, dir }` of the chosen sort, both '' until one is chosen (resourceUrl skips them). */
  params: { sort: string; dir: string };
  /** Writes sort and dir in ONE URL write (two writes meant two renders and two fetches). */
  onSort: (next: UrlSortState) => void;
  /** Back to the fallback (drops both params). */
  clear: () => void;
}

Source: src/data/useUrlSort.ts (line 23)

UrlSortDir

export type UrlSortDir = 'asc' | 'desc';

Source: src/data/useUrlSort.ts (line 5)

UrlSortOptions

export interface UrlSortOptions {
  /** The order the server already uses: shown on the header, never put in the URL or the request until the viewer picks one. */
  fallback?: UrlSortState | null;
  /** Params are `ns.sort` / `ns.dir` (bare for '', the default), like useHashState and useListState. */
  namespace?: string;
  /** Default 'hash'. */
  location?: UrlLocation;
  history?: WriteOptions['history'];
}

Source: src/data/useUrlSort.ts (line 13)

UrlSortState

The same shape as the kit's SortState (DataTable / RowList sort).

export interface UrlSortState {
  key: string;
  dir: UrlSortDir;
}

Source: src/data/useUrlSort.ts (line 8)

UrlStateSetter

export type UrlStateSetter<S> = (patch: Partial<S>, options?: WriteOptions) => void;

Source: src/data/useUrlState.ts (line 4)

UrlWriteOptions

export interface WriteOptions {
  /** 'replace' (default) or 'push' (a step Back can undo, e.g. opening a drawer). */
  history?: 'replace' | 'push';
}

Source: src/data/urlState.ts (line 14)

UseResourceResult

export interface UseResourceResult<T> extends ResourceState<T> {
  error?: DataError;
  /** The request URL the state belongs to (null when idle). */
  url: string | null;
}

Source: src/data/useResource.ts (line 25)

ViewportTier

The console's three tiers (decision Q4): <860 phone, 860–1024 icon rail, >1024 full sidebar.

export type ViewportTier = 'mobile' | 'tablet' | 'desktop';

Source: src/hooks/useIsMobile.ts (line 4)

Blocks

ActivityEvent

export interface ActivityEvent {
  id: string | number;
  /** The dot: ok (approved, paid), bad (rejected), rasp (your request), sky (your invite), butter (stopped). */
  tone: keyof typeof DOT;
  /** "TRNDR team approved <b>Karim Hosny</b>'s join request". */
  title: ReactNode;
  /** "2 hours ago · 13 Nov 2026 11:20". */
  at: ReactNode;
  /** The grey box under it ("Coupon KARI0329 created."). */
  detail?: ReactNode;
  /** Opens what the event is about (the creator, the challenge, the payout). */
  onOpen?: () => void;
}

Source: src/blocks/activity/ActivityLog.tsx (line 12)

ActivityLogCopy

export interface ActivityLogCopy {
  label: string;
  open: string;
  empty: string;
}

Source: src/blocks/activity/ActivityLog.tsx (line 26)

BlockPerson

A person as blocks draw them: the app maps its own creator rows onto this.

export interface BlockPerson {
  id: number;
  name: string;
  avatarUrl?: string | null;
  /** A TierChip key (rising, established, influential, elite); undefined draws no tier. */
  tier?: string | null;
  /** The handle, only where the identity rules allow it (no "@"). */
  handle?: string | null;
  /** A muted line under the name ("12 Nov 2026", a coupon code). */
  sub?: ReactNode;
}

Source: src/blocks/shared/types.ts (line 11)

BlocksCopy

export interface BlocksCopy {
  activityLog: ActivityLogCopy;
  blockState: BlockStateCopy;
  bonusCard: BonusCopy;
  challengeCard: ChallengeCopy;
  challengeDetail: ChallengeDetailCopy;
  challengeRequestForm: ChallengeRequestCopy;
  commissionInput: CommissionCopy;
  copyLinkField: CopyLinkCopy;
  creatorProfilePanel: ProfileCopy;
  findCreatorCard: FindCardCopy;
  giftProductsPicker: GiftProductsCopy;
  giftRulesCard: GiftRulesCopy;
  giftStockList: GiftStockCopy;
  groupCard: GroupCopy;
  groupForm: GroupFormCopy;
  groupPanel: GroupPanelCopy;
  liveChallengeCard: LiveChallengeCopy;
  membersPicker: MembersPickerCopy;
  myCreatorPanel: MyCreatorCopy;
  payoutBatchDetail: PayoutBatchCopy;
  payoutWindowCard: PayoutWindowCopy;
  progressRow: ProgressRowCopy;
  settingsSection: SettingsSectionCopy;
  specialCommissionForm: SpecialCommissionCopy;
  walletHealthCard: WalletHealthCopy;
  walletLedger: WalletLedgerCopy;
}

interface BlocksCopy {
    productCell: ProductCellCopy;
  }

interface BlocksCopy {
    messageHistoryItem: MessageHistoryCopy;
  }

interface BlocksCopy {
    messageHistoryList: MessageHistoryListCopy;
  }

interface BlocksCopy {
    messagesPanel: MessagesPanelCopy;
  }

interface BlocksCopy {
    topUpAmountPicker: TopUpCopy;
  }

interface BlocksCopy {
    topUpResultBanner: TopUpResultCopy;
  }

interface BlocksCopy {
    bundleCard: BundleCopy;
  }

interface BlocksCopy {
    bundleGrid: BundleGridCopy;
  }
  // … 16 more lines in the source

Source: src/blocks/copyKeys.ts (line 30)

BlockStatus

A block that shows a list: its data is there, still coming, or failed.

export type BlockStatus = 'ready' | 'loading' | 'error';

Source: src/blocks/shared/types.ts (line 8)

BlockTone

The mock's five soft tones (.t-lime … .t-lilac).

export type BlockTone = 'lime' | 'rasp' | 'butter' | 'sky' | 'lilac';

Source: src/blocks/shared/types.ts (line 5)

BonusCopy

export interface BonusCopy {
  open: string;
  everyone: string;
  openChallenge: string;
  empty: string;
}

Source: src/blocks/motivation/BonusCard.tsx (line 20)

BonusProgress

export interface BonusProgress {
  id: number;
  name: string;
  value: number;
  goal: number;
  /** The figure at the end in place of "value / goal" (formatted money: "EGP 1,234 / EGP 5,000"). */
  display?: ReactNode;
  /** Done, from the server: drives "· Done" in place of value ≥ goal. */
  done?: boolean;
}

Source: src/blocks/motivation/BonusCard.tsx (line 9)

BrandMessage

export interface BrandMessage {
  id: number | string;
  /** The message's name (internal title). */
  name: string;
  body_en: string | null;
  body_ar: string | null;
  /** `sms`, `whatsapp`, or another channel key (shown as itself). */
  channel: string;
  /** `sent`, `sending`, `scheduled`, `failed`, `draft`, or another key (shown as itself, muted). */
  status: string;
  /** ISO date-time; null while not sent. */
  sent_at: string | null;
  sent_by: MessageSentBy;
  audience: MessageAudienceSummary;
  /** Creators it was sent to; null when not known yet. */
  recipients: number | null;
  /** Of those, delivered; null when not known yet. */
  delivered: number | null;
}

Source: src/blocks/messages/types.ts (line 18)

BundleCopy

export interface BundleCopy {
  videos: (n: number) => string;
  price: string;
  perVideo: string;
  bestValue: string;
  includes: string;
  buy: string;
  buying: string;
  closed: string;
}

Source: src/blocks/bundles/BundleCard.tsx (line 29)

BundleGridCopy

export interface BundleGridCopy {
  label: string;
  empty: string;
}

Source: src/blocks/bundles/BundleGrid.tsx (line 9)

BundlePayMethod

export type BundlePayMethod = 'wallet' | 'card';

Source: src/blocks/bundles/BundlePurchaseSummary.tsx (line 12)

BundlePurchaseCopy

export interface BundlePurchaseCopy {
  title: string;
  bundle: string;
  price: string;
  payWith: string;
  wallet: string;
  walletSub: string;
  short: string;
  /** The wallet choice's reason when `available` is not a readable amount. */
  unknown: string;
  available: string;
  card: string;
  cardSub: string;
  availableAfter: string;
  confirm: string;
  confirmCard: string;
  pending: string;
  cancel: string;
}

Source: src/blocks/bundles/BundlePurchaseSummary.tsx (line 14)

BundleResult

What the server sends back after a bundle purchase (bundle=ok|already|closed, and the card path's pending / failed).

export type BundleResult = 'ok' | 'already' | 'closed' | 'pending' | 'failed';

Source: src/blocks/bundles/BundleResultBanner.tsx (line 8)

BundleResultCopy

export interface BundleResultCopy {
  ok: string;
  already: string;
  closed: string;
  pending: string;
  failed: string;
  dismiss: string;
}

Source: src/blocks/bundles/BundleResultBanner.tsx (line 10)

CalloutTone

A CalloutCard's tint: the brand mock's lime and rasp cards, the PR mock's lilac "Message creators" card, and sky and butter from the same pastel family.

export type CalloutTone = 'lime' | 'rasp' | 'lilac' | 'sky' | 'butter';

Source: src/blocks/shared/CalloutCard.tsx (line 5)

ChallengeCopy

export interface ChallengeCopy {
  reasonLead: string;
  waiting: (date: string) => string;
  waitingDrawer: (date: string) => string;
  gifts: string;
  days: string;
  creators: string;
  sales: string;
  commission: string;
  /**
   * The button per state. live, waiting and rejected have one; scheduled and paused have none unless you name one
   * here (`{ scheduled: 'Request a change' }`); ended and closed never do.
   */
  action: Record<'live' | 'waiting' | 'rejected', string> & Partial<Record<'scheduled' | 'paused', string>>;
}

Source: src/blocks/motivation/ChallengeCard.tsx (line 27)

ChallengeDetailCopy

export interface ChallengeDetailCopy {
  commission: string;
  joined: string;
  sales: string;
  paid: string;
  progress: string;
  top: string;
  analytics: string;
}

Source: src/blocks/motivation/ChallengeDetail.tsx (line 20)

ChallengeFigures

export interface ChallengeFigures {
  gifts: { taken: number; total: number };
  days: { current: number; total: number };
  creators: number;
  /** 2-dp strings. */
  sales: string;
  commission: string;
}

Source: src/blocks/motivation/ChallengeCard.tsx (line 56)

ChallengeRequestCopy

export interface ChallengeRequestCopy {
  title: string;
  titlePlaceholder: string;
  titleError: string;
  gifts: string;
  giftsHint: string;
  inStock: (n: number) => string;
  noneLeft: string;
  /** `left: null`. */
  noLimit: string;
  /** A `closed` line. */
  /** A `closed` line: keep up to `n`, or any amount when `n` is null (no stock limit). */
  closedLine: (n: number | null) => string;
  /** A sent platform the app no longer offers was dropped. */
  platformDropped: string;
  /** `mode="change"`: why title, start and commission are locked. */
  changeOnly: string;
  /** A sent group no longer in `groups`. */
  groupGone: string;
  pickGift: (name: string) => string;
  quantity: (name: string) => string;
  quantityPlaceholder: string;
  quantityError: (max: number) => string;
  /** A no-limit gift (`left: null`) with no whole number. */
  quantityRequired: string;
  noGifts: string;
  who: string;
  minFollowers: string;
  minFollowersPlaceholder: string;
  platform: string;
  anyPlatform: string;
  niche: string;
  anyNiche: string;
  tier: string;
  anyTier: string;
  group: string;
  anyGroup: string;
  dates: string;
  /**
   * The "(optional)" marker that ends the `dates` and `notes` labels, drawn muted (the mock's `.muted` in the label).
   * It is never added: a label that ends with it (or with another "(optional)" / "(اختياري)" note) has that end
   * muted, and any other label is drawn as written. Optional so copy objects written before it existed still
   * type-check; the language's default is used then.
   */
  optional?: string;
  start: string;
  end: string;
  datesHint: string;
  datesError: string;
  commission: string;
  commissionHint: string;
  notes: string;
  notesPlaceholder: string;
  cancel: string;
  send: string;
  sending: string;
}

Source: src/blocks/motivation/ChallengeRequestForm.tsx (line 41)

ChallengeRequestValue

export interface ChallengeRequestValue {
  title: string;
  gifts: Array<{ id: number; quantity: number }>;
  minFollowers: string;
  platform: string;
  niche: string;
  tier: string;
  group: string;
  start: string;
  end: string;
  commission: { kind: CommissionKind; value: string };
  notes: string;
}

Source: src/blocks/motivation/ChallengeRequestForm.tsx (line 27)

ChallengeStatus

The states a brand's challenge is in: the mock's four (live, waiting, ended, rejected) and the console's own (scheduled: approved with dates ahead; paused by TRNDR; closed, which reads "Ended").

export type ChallengeStatus = 'live' | 'waiting' | 'ended' | 'rejected' | 'scheduled' | 'paused' | 'closed';

Source: src/blocks/motivation/ChallengeCard.tsx (line 18)

ChallengeTopCreator

export interface ChallengeTopCreator {
  person: BlockPerson;
  /** Their sales in this challenge (2-dp string). */
  sales: string;
}

Source: src/blocks/motivation/ChallengeDetail.tsx (line 35)

CommissionCopy

export interface CommissionCopy {
  percent: string;
  perItem: (currency: string) => string;
  unitPercent: string;
  unitItem: (currency: string) => string;
  value: string;
  placeholder: string;
  errPercent: string;
  errAmount: string;
  /** With `limits`: the % range ("Enter a % from 0.01 to 50"). */
  errPercentRange: (min: string, max: string) => string;
  /** With `limits`: the per-item range; `max` null = no upper limit. */
  errAmountRange: (min: string, max: string | null, currency: string) => string;
  /** A rate in words: "15%". */
  ratePercent: (value: string) => string;
  /** A rate in words: "EGP 15 per item" / "15 ج.م على القطعة". */
  ratePerItem: (value: string, currency: string) => string;
  /** CommissionRate `form="long"` for a %: "15% of sale" / "15% من البيع" (per item reads the same in both forms). */
  ratePercentLong: (value: string) => string;
}

Source: src/blocks/groups/CommissionInput.tsx (line 13)

CommissionErrorOptions

export interface CommissionErrorOptions {
  limits?: CommissionLimits;
  /** The currency word in a per-item range message; default the TRNDR preset's (EGP / ج.م); components pass the provider's. */
  currency?: string;
}

Source: src/blocks/groups/CommissionInput.tsx (line 69)

CommissionKind

export type CommissionKind = 'percent' | 'per_item';

Source: src/blocks/groups/CommissionInput.tsx (line 11)

CommissionLimits

The server's bounds per kind, when they are not the defaults (1–100 %, above 0 per item). The library still checks the shape (2 decimals, no exponent); the server judges again.

export interface CommissionLimits {
  percent?: CommissionRange;
  perItem?: CommissionRange;
}

Source: src/blocks/groups/CommissionInput.tsx (line 64)

CommissionRange

One kind's bounds as 2-dp strings or numbers ("0.01", 50), both inclusive; max left out = no upper limit.

export interface CommissionRange {
  min: string | number;
  max?: string | number;
}

Source: src/blocks/groups/CommissionInput.tsx (line 55)

CommissionRateForm

How a rate is worded: 'short' "15%", 'long' "15% of sale". Per item is "EGP 30 per item" in both.

export type CommissionRateForm = 'short' | 'long';

Source: src/blocks/groups/CommissionInput.tsx (line 116)

CopyLinkCopy

export interface CopyLinkCopy {
  field: string;
  copy: string;
  copied: string;
  failed: string;
}

Source: src/blocks/shared/CopyLinkField.tsx (line 8)

DefaultableChoiceProps

export interface DefaultableChoiceProps extends Common {
  kind: 'choice';
  value: string | null;
  defaultValue: string | null;
  onChange: (value: string | null) => void;
  options: ReadonlyArray<{ value: string; label: string }>;
}

Source: src/blocks/settings-controls/DefaultableSetting.tsx (line 129)

DefaultableCopy

export interface DefaultableCopy {
  following: string;
  followingUnknown: string;
  own: string;
  useDefault: string;
  defaultIs: (value: string) => string;
  locked: string;
  on: string;
  off: string;
  unknown: string;
  reset: (value: string) => string;
  errEmpty: string;
  errNumber: string;
  errWhole: string;
  errRange: (min: string, max: string) => string;
  errMin: (min: string) => string;
  errMax: (max: string) => string;
}

Source: src/blocks/settings-controls/DefaultableSetting.tsx (line 10)

DefaultableNumberProps

export interface DefaultableNumberProps extends Common {
  kind: 'number';
  /** The own value as typed; null follows the default. */
  value: string | null;
  defaultValue: number | null;
  onChange: (value: string | null) => void;
  min?: number;
  max?: number;
  step?: number;
  /** "days", "%". */
  unit?: string;
  /** A house value with its own "Reset to N" link (the gift cooldown's 90), apart from the platform default. */
  resetTo?: number;
  /** Replaces the built-in validation message (a server's refusal). */
  error?: string | null;
}

Source: src/blocks/settings-controls/DefaultableSetting.tsx (line 112)

DefaultableSwitchProps

export interface DefaultableSwitchProps extends Common {
  kind: 'switch';
  /** The own value; null follows the default. */
  value: boolean | null;
  /** The platform's value; null when not known (an older server). */
  defaultValue: boolean | null;
  onChange: (value: boolean | null) => void;
}

Source: src/blocks/settings-controls/DefaultableSetting.tsx (line 103)

FindCardCopy

export interface FindCardCopy {
  score: string;
  sold: string;
  orders: string;
  engagement: string;
  followers: string;
  invite: string;
  invited: string;
  inviteName: (name: string) => string;
  invitedName: (name: string) => string;
}

Source: src/blocks/creators/FindCreatorCard.tsx (line 48)

FindCreator

export interface FindCreator {
  id: number;
  name: string;
  avatarUrl?: string | null;
  tier: string | null;
  /** The niche in the page language ("Beauty"). */
  niche?: string | null;
  score: number | null;
  highlight?: { kind: HighlightKind; text: string } | null;
  /** Sold on TRNDR in 90 days, all brands (2-dp string). Left out or null: no Sold stat (no cross-store figures). */
  sales90?: string | null;
  /** Left out or null: no Orders stat. */
  orders90?: number | null;
  /** Engagement rate in %, null when unknown. */
  engagement: number | null;
  followers: Followers;
}

Source: src/blocks/creators/FindCreatorCard.tsx (line 20)

FindStat

One box in the card's stat row: a value over its label; figure makes the label the money "?" term.

export interface FindStat {
  key: string;
  label: ReactNode;
  value: ReactNode;
  /** Unknown: dimmed. */
  none?: boolean;
  figure?: MoneyFigureKey;
}

Source: src/blocks/creators/FindCreatorCard.tsx (line 39)

Followers

export type Followers = Partial<Record<Platform, number | null>>;

Source: src/blocks/shared/types.ts (line 23)

GiftPick

export interface GiftPick {
  id: number;
  units: number;
}

Source: src/blocks/motivation/GiftProductsPicker.tsx (line 20)

GiftProduct

export interface GiftProduct {
  id: number;
  name: string;
  sku?: string;
  imageUrl?: string | null;
  /** Units creators already picked (the new total cannot go below it). */
  picked?: number;
  /** Units on the gift list now; undefined = not on the list. */
  units?: number;
}

Source: src/blocks/motivation/GiftProductsPicker.tsx (line 9)

GiftProductsCopy

export interface GiftProductsCopy {
  list: string;
  offer: (name: string) => string;
  units: (name: string) => string;
  alreadyPicked: (n: number) => string;
  unitsError: (min: number, max: number) => string;
  belowPicked: (n: number) => string;
  noneChosen: string;
  cancel: string;
  save: string;
  saving: string;
}

Source: src/blocks/motivation/GiftProductsPicker.tsx (line 25)

GiftRuleKey

export type GiftRuleKey = 'pick' | 'one' | 'cooldown';

Source: src/blocks/motivation/GiftRulesCard.tsx (line 11)

GiftRules

export interface GiftRules {
  pick: boolean;
  one: boolean;
  cooldown: boolean;
  /** The cooldown in days, as typed (validated with giftCooldownError). */
  days: string;
}

Source: src/blocks/motivation/GiftRulesCard.tsx (line 13)

GiftRulesCopy

export interface GiftRulesCopy {
  title: string;
  sub: string;
  subLocked: string;
  locked: string;
  pick: string;
  pickHint: string;
  one: string;
  oneHint: string;
  cooldown: string;
  cooldownTip: string;
  defaultDays: (n: number) => string;
  daysLabel: string;
  daysUnit: string;
  reset: (n: number) => string;
  error: (max: number) => string;
  following: string;
  useDefault: string;
  /** `bestGiftOnly={false}`: why the cooldown is locked, in place of its default line. */
  cooldownNeedsBest: string;
}

Source: src/blocks/motivation/GiftRulesCard.tsx (line 21)

GiftStockCopy

export interface GiftStockCopy {
  picked: (picked: number, total: number) => string;
  left: (left: number, total: number) => string;
  inStock: string;
  noneLeft: string;
  choose: string;
  list: string;
  empty: string;
}

Source: src/blocks/motivation/GiftStockList.tsx (line 24)

GiftStockItem

export interface GiftStockItem {
  id: number;
  name: string;
  imageUrl?: string | null;
  picked: number;
  total: number;
  /** Picks the thumbnail's tone (the mock's product index, `TONES[p.i % 5]`). Default: the row's index. */
  seed?: number;
}

Source: src/blocks/motivation/GiftStockList.tsx (line 14)

GroupCommission

A group's commission: the program's standard, asked of TRNDR (waiting), approved; or, where the brand sets rates itself (no TRNDR approval), set (a special commission the brand set: a % of sale or an amount per item, drawn "20% of sale" / "EGP 30 per item"; label replaces those words) and mixed (its members are on different rates).

export type GroupCommission =
  | { state: 'standard' }
  | { state: 'asked'; label: string }
  | { state: 'approved'; label: string }
  | { state: 'set'; kind: CommissionKind; value: string; label?: ReactNode }
  | { state: 'mixed' };

Source: src/blocks/groups/GroupCard.tsx (line 18)

GroupCopy

export interface GroupCopy {
  creators: (n: number) => string;
  standard: (rate: string) => string;
  asked: (label: string) => string;
  /** The `mixed` pill. Optional for a `copy` you build yourself; the built-in words are used when it is left out. */
  mixed?: string;
}

Source: src/blocks/groups/GroupCard.tsx (line 30)

GroupFormCopy

export interface GroupFormCopy {
  name: string;
  namePlaceholder: string;
  nameEmpty: string;
  nameTaken: string;
  noMembers: string;
  cancel: string;
  create: string;
  save: string;
  saving: string;
}

Source: src/blocks/groups/GroupForm.tsx (line 12)

GroupFormValue

export interface GroupFormValue {
  name: string;
  memberIds: number[];
}

Source: src/blocks/groups/GroupForm.tsx (line 35)

GroupMember

export interface GroupMember extends BlockPerson {
  /** This creator's sales (2-dp string). Left out or null (before the API sends it), the row has no figure. */
  sales?: string | null;
}

Source: src/blocks/groups/GroupPanel.tsx (line 52)

GroupPanelCopy

export interface GroupPanelCopy {
  sales: string;
  commission: string;
  special: string;
  none: string;
  askedFor: string;
  ask: string;
  change: string;
  edit: string;
  backToStandard: string;
  creators: string;
  empty: string;
  /** `commissionMode="set"`: the button while no special commission is set (the change button is `change`). */
  set: string;
  /** `commissionMode="set"`: the Special commission row's pill while one is set. */
  setPill: string;
  /** `commissionMode="set"`: the row with the date it was set (`setOn`). */
  setOn: string;
  /** Under the list when `moreMembers` > 0. */
  more: (n: number) => string;
}

Source: src/blocks/groups/GroupPanel.tsx (line 17)

HighlightKind

export type HighlightKind = 'fire' | 'up' | 'star' | 'spark';

Source: src/blocks/creators/HighlightBadge.tsx (line 4)

LedgerEntry

export interface LedgerEntry {
  id: string | number;
  label: ReactNode;
  /** Why ("15% of EGP 184,300 sales"). */
  note?: ReactNode;
  /** Signed 2-dp string: money out is negative. */
  amount: string;
  /** Opens the entry (its drawer): the whole row becomes one button, named by `label`. */
  onSelect?: () => void;
  /**
   * The entry's receipt in the row, its own target (a bank top-up's transfer proof). Default kind: `'download'` with a
   * safe `href`, else `'receipt'` ("View receipt", opened with `onOpen`). The
   * row's own button (`onSelect`) is named by `label` only.
   */
  proof?: ProofLink;
}

Source: src/blocks/payments/WalletLedger.tsx (line 32)

LedgerGroup

export interface LedgerGroup {
  id: string | number;
  name: ReactNode;
  tone: BlockTone;
  /** The group's signed total (2-dp string). */
  total: string;
  entries: ReadonlyArray<LedgerEntry>;
  /** A challenge group links to its challenge. */
  onOpenChallenge?: () => void;
  /**
   * A top-up group shows its receipt: `onOpen` opens it (a modal), `href` links to the file (through `safeHref`),
   * `kind="download"` reads "Download receipt" and downloads it. Default kind: `'view'` ("View proof").
   */
  proof?: ProofLink;
  /** Open on first render (the mock opens the first group). */
  open?: boolean;
}

Source: src/blocks/payments/WalletLedger.tsx (line 49)

LedgerView

export type LedgerView = 'grouped' | 'flat';

Source: src/blocks/payments/WalletLedger.tsx (line 67)

LiveChallengeCopy

export interface LiveChallengeCopy {
  heading: (title: string) => string;
  sub: (dates: string, creators: number) => string;
  gifts: string;
  days: string;
  dayOf: (day: number, total: number) => string;
  sales: string;
  orders: string;
  commission: string;
}

Source: src/blocks/home/LiveChallengeCard.tsx (line 10)

MembersPickerCopy

export interface MembersPickerCopy {
  legend: string;
  picked: (n: number) => string;
  search: string;
  noMatch: (q: string) => string;
  none: string;
}

Source: src/blocks/groups/MembersPicker.tsx (line 10)

MessageAudienceKind

Who a message went to: everyone, creators matching a rule, groups, tiers, or creators picked by hand.

export type MessageAudienceKind = 'all' | 'rule' | 'group' | 'tier' | 'picked';

Source: src/blocks/messages/types.ts (line 8)

MessageAudienceSummary

export interface MessageAudienceSummary {
  kind: MessageAudienceKind;
  /** For `group`: the groups' names (ids for keys). */
  groups?: ReadonlyArray<{ id: number | string; name: string }>;
  /** For `tier`: tier keys, named through the BricksProvider's `tiers`. */
  tiers?: ReadonlyArray<string>;
}

Source: src/blocks/messages/types.ts (line 10)

MessageHistoryCopy

export interface MessageHistoryCopy {
  /** The article's name: "Spring launch, 3 Nov 2026" (`date` is "Not sent yet" before it goes out). */
  itemLabel: (name: string, date: string) => string;
  notSent: string;
  byTrndr: string;
  byBrand: string;
  to: string;
  audience: {
    all: string;
    rule: string;
    groups: (names: string) => string;
    tiers: (names: string) => string;
    picked: (n: number | null) => string;
  };
  listSeparator: string;
  recipients: string;
  delivered: string;
  deliveredOf: (percent: number) => string;
  unknown: string;
  noBody: string;
  channels: Readonly<Record<string, string>>;
  statuses: Readonly<Record<string, string>>;
}

Source: src/blocks/messages/MessageHistoryItem.tsx (line 8)

MessageHistoryListCopy

export interface MessageHistoryListCopy {
  label: string;
  filter: string;
  all: string;
  byTrndr: string;
  byBrand: string;
  empty: string;
  emptyFiltered: string;
}

Source: src/blocks/messages/MessageHistoryList.tsx (line 11)

MessageSentBy

The messages history row as the server sends it to a brand (read-only: TRNDR sends messages to creators, a brand only reads what went out). Field names follow the API so a row passes through untouched.

export type MessageSentBy = 'trndr_on_behalf' | 'brand';

Source: src/blocks/messages/types.ts (line 5)

MessageSentByFilter

The history list's sent-by filter.

export type MessageSentByFilter = 'all' | MessageSentBy;

Source: src/blocks/messages/types.ts (line 39)

MessagesPanelCopy

export interface MessagesPanelCopy {
  banner: string;
  bannerSub: string;
  contact: string;
  history: string;
  historySub: string;
  automatic: string;
  automaticSub: string;
}

Source: src/blocks/messages/MessagesPanel.tsx (line 10)

MyCreator

export interface MyCreator {
  id: number;
  name: string;
  avatarUrl?: string | null;
  /** Only where the identity rules allow it (no "@"). */
  handle?: string | null;
  niche?: string | null;
  tier: string | null;
  score: number | null;
  followers: Followers;
  orders: number;
  /** 2-dp strings. */
  sales: string;
  commission: string;
  /** A key of the provider's `statuses` table ("active", "paused", "removed"…). */
  status: string;
  /** The creator's code. A creator may have none: then no Coupon row and no "Copy coupon". */
  coupon?: string | null;
  /** "6 Jun 2026". */
  joined: string;
}

Source: src/blocks/creators/MyCreatorPanel.tsx (line 54)

MyCreatorCopy

export interface MyCreatorCopy {
  tier: string;
  score: string;
  outOf: string;
  followers: (total: string) => string;
  inProgram: string;
  orders: string;
  sales: string;
  commission: string;
  status: string;
  coupon: string;
  joined: string;
  groups: string;
  noGroup: string;
  addToGroup: string;
  copyCoupon: string;
  privacy: string;
}

Source: src/blocks/creators/MyCreatorPanel.tsx (line 22)

PayoutBatchCopy

export interface PayoutBatchCopy {
  title: (date: string) => string;
  creators: (n: number) => string;
  method: string;
  reference: string;
  creatorsKey: string;
  status: string;
  paidTo: string;
  more: (n: number) => string;
  exportCsv: string;
  exportHint: string;
  empty: string;
}

Source: src/blocks/payments/PayoutBatchDetail.tsx (line 18)

PayoutLine

export interface PayoutLine {
  person: BlockPerson;
  /** 2-dp string. */
  amount: string;
}

Source: src/blocks/payments/PayoutBatchDetail.tsx (line 45)

PayoutWindowCopy

export interface PayoutWindowCopy {
  sub: string;
  window: string;
  dayOf: (day: number, total: number) => string;
  paid: string;
}

Source: src/blocks/payments/PayoutWindowCard.tsx (line 11)

ProductCellCopy

export interface ProductCellCopy {
  sold: (units: string) => string;
}

Source: src/blocks/products/ProductCell.tsx (line 6)

ProfileCopy

export interface ProfileCopy {
  sold: string;
  orders: string;
  engagement: string;
  brands: string;
  scoreTitle: (n: number) => string;
  noScore: string;
  scoreWhy: string;
  followers: (total: string) => string;
  highlights: string;
  averageOrder: string;
  growth: string;
  wins: string;
  since: string;
  invite: (first: string) => string;
  invited: string;
  note: string;
}

Source: src/blocks/creators/CreatorProfilePanel.tsx (line 22)

ProfileCreator

export interface ProfileCreator extends FindCreator {
  /** Brands worked with (a cross-store figure): left out, no tile. */
  brands?: number | null;
  /** Their average order on TRNDR (2-dp string); omitted, the built-in highlights leave the fact out. */
  averageOrder?: string | null;
  /** Sales change this month in %, null when unknown ("—"); left out, no fact. */
  growth?: number | null;
  /** Challenges won; left out, no fact. */
  wins?: number | null;
  /** "Mar 2026"; left out, no fact. */
  since?: string | null;
}

Source: src/blocks/creators/CreatorProfilePanel.tsx (line 101)

ProfileFact

One cell of the profile's highlights grid.

export interface ProfileFact {
  /** A stable key; the built-in four are `averageOrder`, `growth`, `wins` and `since`. */
  key: string;
  label: ReactNode;
  value: ReactNode;
  /** A money fact: its label gets that figure's "?" note. */
  figure?: MoneyFigureKey;
}

Source: src/blocks/creators/CreatorProfilePanel.tsx (line 124)

ProfileTile

One coloured figure tile under the hero (.mp-kpi); figure makes its caption the money "?" term.

export interface ProfileTile {
  key: string;
  label: ReactNode;
  value: ReactNode;
  tone: BlockTone;
  figure?: MoneyFigureKey;
}

Source: src/blocks/creators/CreatorProfilePanel.tsx (line 115)

ProgressRowCopy

export interface ProgressRowCopy {
  done: string;
  of: (value: number, max: number) => string;
}

Source: src/blocks/shared/ProgressRow.tsx (line 8)

A proof or receipt in the ledger (a group's or an entry's): onOpen opens it (a modal), href links to the file (through safeHref), kind picks "View proof" or "Download receipt" (fileName names the download). With neither a safe href nor onOpen nothing is drawn.

export interface ProofLink {
  /** Which proof ("ref TRF-88412"): in the name and tooltip. */
  context: string;
  href?: string;
  onOpen?: () => void;
  kind?: 'view' | 'download' | 'receipt';
  fileName?: string;
}

Source: src/blocks/payments/WalletLedger.tsx (line 23)

RequestGift

export interface RequestGift {
  id: number;
  name: string;
  /** Units still in stock for this brand; null = no stock limit (any quantity). */
  left: number | null;
  /**
   * A challenge's own line on a gift that has since closed (change mode): it stays picked, can keep up to `left` or be
   * unticked ("Closed · keep up to 3 or untick").
   */
  closed?: boolean;
}

Source: src/blocks/motivation/ChallengeRequestForm.tsx (line 13)

RowAction

export interface RowAction {
  id: string;
  /** The button's words; left out, the preset's (in the page's language). */
  label?: string;
  preset?: RowActionPreset;
  /** primary (ink), secondary (default, outlined) or danger (red words; a confirm step first). */
  tone?: RowActionTone;
  onSelect: () => void;
  /** Working on it: a spinner, clicks ignored, focus kept. */
  busy?: boolean;
  /** Set, the action cannot run now and says why (hover title and read with the button). */
  disabledReason?: string | null;
  /**
   * The confirm step: the first press arms the action ("Sure? Cancel invite"), the second runs it; Escape or leaving
   * the button disarms. On by default for danger actions; a string replaces the armed words.
   */
  confirm?: boolean | string;
}

Source: src/blocks/rowactions/RowActions.tsx (line 11)

RowActionPreset

Words RowActions knows for the presets below (and an app's own actions may use).

export type RowActionPreset = 'approve' | 'reject' | 'resend' | 'copyLink' | 'cancelInvite';

Source: src/blocks/rowactions/RowActions.tsx (line 9)

RowActionsCopy

export interface RowActionsCopy {
  more: string;
  working: string;
  sure: (label: string) => string;
  approve: string;
  reject: string;
  resend: string;
  copyLink: string;
  cancelInvite: string;
}

Source: src/blocks/rowactions/RowActions.tsx (line 30)

RowActionTone

export type RowActionTone = 'primary' | 'secondary' | 'danger';

Source: src/blocks/rowactions/RowActions.tsx (line 6)

RowItem

export interface RowItem {
  id: string | number;
  /** The person or product cell. */
  lead: ReactNode;
  /** The figure or pill at the end ("EGP 4,800.00", a status). */
  value?: ReactNode;
  /**
   * `'default'` draws the value bold in ink (a figure); `'muted'` draws it as the mock's plain grey 12px `.muted`
   * (an "Open →" hint). Default `'default'`.
   */
  valueTone?: 'default' | 'muted';
  /** Opens what the row stands for (the creator drawer); the whole row is then one button. */
  onSelect?: () => void;
}

Source: src/blocks/shared/RowItems.tsx (line 8)

SettingsSectionCopy

export interface SettingsSectionCopy {
  viewOnly: string;
  go: string;
}

Source: src/blocks/settings/SettingsSection.tsx (line 12)

SpecialCommissionCopy

export interface SpecialCommissionCopy {
  commission: string;
  why: string;
  whyPlaceholder: string;
  cancel: string;
  send: string;
  sending: string;
  backToStandard: string;
  /** `mode="set"`: the button ("Set special commission"); with `namesRate`, only until a valid value is typed. */
  set: string;
  /** `mode="set"`: the button while saving. */
  saving: string;
  /**
   * `mode="set"` with `namesRate`: the button once the value is valid, naming the rate and who it reaches ("Set 15% for
   * 4 creators"); `members` 0 = an empty group, whose rate prices creators who join later; null = not said.
   */
  confirm: (rate: string, members: number | null) => string;
}

Source: src/blocks/groups/SpecialCommissionForm.tsx (line 12)

SpecialCommissionValue

export interface SpecialCommissionValue {
  kind: CommissionKind;
  /** The number as typed ("20", "30"). */
  value: string;
  reason: string;
}

Source: src/blocks/groups/SpecialCommissionForm.tsx (line 44)

TopUpCopy

export interface TopUpCopy {
  /** The amount group's legend, with the currency word: "Amount (EGP)". */
  amount: (currency: string) => string;
  suggested: string;
  custom: string;
  range: (min: string, max: string) => string;
  availableNow: string;
  availableAfter: string;
  submit: string;
  pending: string;
  cancel: string;
  errEmpty: string;
  errWhole: string;
  errRange: (min: string, max: string) => string;
}

Source: src/blocks/topup/TopUpAmountPicker.tsx (line 14)

TopUpResult

What the server sends back after a card top-up (topup=ok|pending|failed).

export type TopUpResult = 'ok' | 'pending' | 'failed';

Source: src/blocks/topup/TopUpResultBanner.tsx (line 8)

TopUpResultCopy

export interface TopUpResultCopy {
  ok: string;
  pending: string;
  failed: string;
  retry: string;
  dismiss: string;
}

Source: src/blocks/topup/TopUpResultBanner.tsx (line 10)

UgcBundle

A UGC bundle on sale: a number of creator videos for one price.

export interface UgcBundle {
  id: number | string;
  name: string;
  /** Videos included. */
  videos: number;
  /** The price, a 2-dp string. */
  price: string;
  /** The per-video price as the server works it out; left out, the card divides the price (half up, to the cent). */
  perVideo?: string | null;
  /** The "Best value" flag (the server's pick, never guessed here). */
  bestValue?: boolean;
  /** What's included, one line each. */
  includes?: ReadonlyArray<string>;
  /** Why it cannot be bought now ("Sold out", "Opens when your wallet goes live"); set, the card is closed. */
  closedReason?: string | null;
}

Source: src/blocks/bundles/BundleCard.tsx (line 12)

WalletHealthCopy

export interface WalletHealthCopy {
  title: string;
  settings: string;
  lowLead: string;
  /** `pauseDays` null: the program's pause rule was not passed, so no day count is said. */
  low: (percent: number, pauseDays: number | null) => string;
  negativeLead: string;
  negative: (pauseDays: number | null) => string;
  pausedLead: string;
  paused: string;
  leftOf: string;
  percentOf: (percent: number) => string;
  noTopup: string;
  legendOk: (low: number) => string;
  legendLow: (low: number) => string;
  legendPaused: (pauseDays: number) => string;
}

Source: src/blocks/payments/WalletHealthCard.tsx (line 15)

WalletLedgerCopy

export interface WalletLedgerCopy {
  title: string;
  sub: string;
  view: string;
  grouped: string;
  flat: string;
  exportCsv: string;
  openChallenge: string;
  balance: string;
  empty: string;
}

Source: src/blocks/payments/WalletLedger.tsx (line 69)

PR Portal

Audience

Who a message goes to: every TRNDR creator, a brand's creators, a creator group, a tier, or creators picked by hand. The same value drives the composer's picker and the history table's "To" label.

export type Audience =
  | { kind: 'all' }
  | { kind: 'brand'; brand: StackBrand }
  | { kind: 'group'; name: string }
  | { kind: 'tier'; tier: PrTier }
  | { kind: 'picked'; creators: ReadonlyArray<PrPerson> };

Source: src/pr/types.ts (line 23)

AudienceChoice

The picker's value: the mode, plus the brand / group / tier / creators that mode needs.

export interface AudienceChoice {
  kind: AudienceKind;
  brandId?: StackBrand['id'];
  groupId?: string | number;
  tier?: PrTier;
  picked: ReadonlyArray<string | number>;
}

Source: src/pr/AudiencePicker.tsx (line 12)

AudienceKind

export type AudienceKind = Audience['kind'];

Source: src/pr/types.ts (line 30)

AuditArea

An audit area key: the TRNDR preset's (TRNDR_AUDIT_AREAS), or one the app adds under statusTables.prAudit.

export type AuditArea = keyof typeof TRNDR_AUDIT_AREAS | (string & {});

Source: src/pr/AuditLog.tsx (line 11)

AuditEntry

export interface AuditEntry {
  id: string | number;
  tone: AuditTone;
  /** "Mona changed Glow Lab commission <b>8% → 10%</b>": the app builds it from the log record; names may be bold. */
  text: ReactNode;
  /** The second line: the reason, the effect ("Brand notified. Applies to new orders."). */
  detail?: ReactNode;
  area?: AuditArea;
  actor: PrPerson;
  /** Already formatted ("Today · 10:12"). */
  when: string;
}

Source: src/pr/AuditLog.tsx (line 16)

AuditTone

The dot's colour per outcome (the mock: ok green, rasp for money changes, bad for rejections, sky / lilac for moves).

export type AuditTone = 'ok' | 'rasp' | 'bad' | 'sky' | 'lilac' | 'butter';

Source: src/pr/AuditLog.tsx (line 14)

BrandRow

export interface BrandRow {
  id: string | number;
  name: string;
  color?: string | null;
  /** Formatted by the app ("10% of sale", "EGP 50 per item"). */
  commission: string;
  owner: PrPerson;
  ownerIsMe?: boolean;
  program: 'active' | 'paused';
  health: WalletHealth;
  healthDay?: number;
  /** Server 2-dp strings. */
  available: string;
  sales: string;
  creators: number;
  waiting: number;
}

Source: src/pr/presets.tsx (line 105)

BuilderBrand

A brand the builder can run a challenge for.

export interface BuilderBrand {
  id: string;
  name: string;
  /** Its program is paused: listed as "Glow Lab (paused)". */
  paused?: boolean;
}

Source: src/pr/challenges/builderParts.tsx (line 8)

CampaignChallenge

A challenge running in (or planned for) a brand's campaign. Texts are formatted by the app.

export interface CampaignChallenge {
  id: string | number;
  name: string;
  /** `leader`: the top creators win; `target`: everyone who hits the goal; `boost`: every delivered sale earns more. */
  type: 'leader' | 'target' | 'boost';
  /** "Every delivered sale", "Top 10 by delivered sales". */
  goal: string;
  /** "×2 commission · paid by TRNDR", "EGP 1,000 each". */
  reward: string;
  /** "20–26 Nov". */
  dates: string;
  /** A PR status key (`live`, `upcoming`, `settling`, `ended`). */
  status: string;
  /** A TRNDR-wide challenge (every brand), tagged as such. */
  wide?: boolean;
}

Source: src/pr/programs/CampaignChallenges.tsx (line 31)

CampaignChangeRequest

One change a brand asked for on its campaign. Texts are formatted by the app.

export interface CampaignChangeRequest {
  id: string | number;
  /** What changes ("Discount per coupon", "Creator limit"). */
  what: string;
  /** The value now and the value asked for ("10% off" → "15% off"). */
  from: ReactNode;
  to: ReactNode;
  /** When it was sent ("14 Nov"). */
  date: string;
  /** The brand's note, shown in quotes; optional. */
  quote?: string;
  /** `waiting` shows Decline / Approve; `approved` / `declined` show the decision's pill. */
  status: 'waiting' | 'approved' | 'declined';
}

Source: src/pr/programs/CampaignChangeRequests.tsx (line 45)

CampaignColumnsOptions

campaignColumns' layout options (the 4th argument).

export interface CampaignColumnsOptions {
  /**
   * Let the date range, commission, sales and last-change cells wrap (the v3 mock's table: "1 Nov 2026 → 31 Jan 2027"
   * on two lines in a narrower column, no gap between the campaign name and its dates, rows about 79px tall).
   * Default false: those cells stay on one line, the dates 3px under the name (0.4.0).
   */
  wrap?: boolean;
}

Source: src/pr/programs/campaignColumns.tsx (line 61)

CampaignRow

A brand's row on the Affiliate programs › Campaigns tab: its one active campaign and how it sells.

export interface CampaignRow {
  id: string | number;
  brand: StackBrand;
  /** The active campaign; `to` may be the app's "Open-ended". Dates are formatted by the app ("1 Nov 2026"). */
  campaign: { name: string; from: string; to: string };
  /** The brand's program: `active` or `paused` (PR status keys). */
  status: string;
  /** Change requests and next-campaign requests waiting for PR. */
  waiting: number;
  /** Formatted by the app ("10% of sale", "EGP 50 per item"). */
  commission: ReactNode;
  creators: number;
  /** Delivered sales in the last 30 days, a server 2-dp string. */
  sales: string;
  orders: number;
  /** Formatted by the app ("Since 1 Oct 2026", "Just now · Mona"). */
  lastChange: string;
}

Source: src/pr/programs/campaignColumns.tsx (line 33)

ChallengeAudienceValue

Step 3, Who can join. Not asked for a TRNDR-wide challenge (every approved creator with a code can take part).

export interface ChallengeAudienceValue {
  audience: 'public' | 'brand';
}

Source: src/pr/challenges/challengeDraft.ts (line 44)

ChallengeBasicsValue

Step 1, Basics.

export interface ChallengeBasicsValue {
  /** A brand id, or `'all'` for a TRNDR-wide challenge (every brand's active campaign; TRNDR pays). */
  brand: string;
  name: string;
  /** `YYYY-MM-DD` (a native date input's value). */
  starts: string;
  ends: string;
  /** What creators will read in the creator app. */
  description: string;
}

Source: src/pr/challenges/challengeDraft.ts (line 13)

ChallengeDraft

The challenge builder's form state (the v3 mock's defB()), shared by ChallengeBasicsFields (step 1), ChallengeRewardFields (step 2 part="goal", step 4 part="payout") and ChallengeAudienceFields (step 3). Every typed value is the input's text (ASCII or Arabic-Indic digits); money is a 2-dp string ("1000", "1000.50"). Each step component takes the fields it reads, so one ChallengeDraft state can feed all four.

export interface ChallengeDraft extends ChallengeBasicsValue, ChallengeGoalValue, ChallengeAudienceValue, ChallengePayoutValue {}

Source: src/pr/challenges/challengeDraft.ts (line 10)

ChallengeField

A field of the draft a step component draws.

export type ChallengeField = keyof ChallengeDraft;

Source: src/pr/challenges/challengeDraft.ts (line 58)

ChallengeFieldErrors

Messages under the builder's fields, by field; the app's (a server error) win over the built-in checks.

export type ChallengeFieldErrors = Partial<Record<ChallengeField, ReactNode>>;

Source: src/pr/challenges/builderParts.tsx (line 16)

ChallengeGoalValue

Step 2, Type & goal. Only the active type's fields are read.

export interface ChallengeGoalValue {
  type: ChallengeType;
  /** Leaderboard: what ranks creators. */
  rankBy: 'sales' | 'orders';
  /** Leaderboard: the number of winners; Target: the most winners (caps the budget held). Whole, 1 or more. */
  winners: string;
  /** Target: the goal (whole orders, or a money figure of delivered sales). */
  goal: string;
  goalKind: 'orders' | 'sales';
  /** Commission boost: the multiplier. */
  boost: '1.5' | '2' | '3';
  /** Commission boost: the cap on the extra commission paid (money, above 0). */
  cap: string;
}

Source: src/pr/challenges/challengeDraft.ts (line 28)

ChallengeIssue

Why a field is not ready: required (empty), order (it ends on or before it starts), whole (not a whole number of 1 or more), amount (not a money figure above 0 with at most 2 decimals).

export type ChallengeIssue = 'required' | 'order' | 'whole' | 'amount';

Source: src/pr/challenges/challengeDraft.ts (line 64)

ChallengeIssues

The builder's field problems, by field: what the step components say under a field with validate.

export type ChallengeIssues = Partial<Record<ChallengeField, ChallengeIssue>>;

Source: src/pr/challenges/challengeDraft.ts (line 67)

ChallengePayoutValue

Step 4, Reward. Not asked for a commission boost (the boost is the reward).

export interface ChallengePayoutValue {
  reward: 'cash' | 'gift';
  /** Cash: the amount each winner gets (money, above 0). */
  perWinner: string;
  /** Gift: the chosen gift from the brand's confirmed stock (a ConfirmedGift id). */
  giftId: string | number | null;
}

Source: src/pr/challenges/challengeDraft.ts (line 49)

ChallengeRequestRow

A brand's challenge request as Challenges › Brand requests lists it.

export interface ChallengeRequestRow {
  id: string | number;
  /** The challenge the brand asks for ("Sell 30 in December"). */
  idea: string;
  brand: StackBrand;
  /** Formatted by the app: the reward kind or gift ("Cash", "Serum gift set"). */
  reward: string;
  /** What the brand wrote, in its own words (either script). */
  message: string;
  /** Formatted by the app ("1–31 Dec"). */
  dates: string;
  /** Server 2-dp string: the budget the brand offers (held from its wallet once approved). */
  budget: string;
  /** Formatted by the app ("Today, 09:14"). */
  sent: string;
  /** A PR status key. Default `needs_review`. */
  status?: string;
}

Source: src/pr/challenges/challengeRequestColumns.tsx (line 25)

ChallengeRow

A challenge as the Challenges table lists it.

export interface ChallengeRow {
  id: string | number;
  name: string;
  /** `leader`: the top creators win; `target`: everyone who hits the goal; `boost` (v3): every delivered sale earns more. */
  type: 'leader' | 'target' | 'boost';
  audience: 'public' | 'brand';
  brand: StackBrand;
  /** A PR status key: `live`, `upcoming`, `settling`, `ended`, `needs_review`… */
  status: string;
  /** Formatted by the app ("1 Dec – 31 Dec"). */
  dates: string;
  creators: number;
  /** Server 2-dp strings: delivered sales and the commission they earned. */
  sales: string;
  commission: string;
  /** Join requests waiting for PR. */
  waiting: number;
}

Source: src/pr/challenges/challengeColumns.tsx (line 27)

ChallengeTableColumnsCopy

challengeTableColumns' words (headers, type and audience, "days", "No gifts left"); pass overrides as the preset's copy.

export type ChallengeTableColumnsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/challenges/challengeTableColumns.tsx (line 26)

ChallengeTableColumnsOptions

What challengeTableColumns' rows do, and its words.

export interface ChallengeTableColumnsOptions {
  /** Opens the challenge: the name becomes a button (the row can also open with DataTable `onRowClick`). Default: plain text. */
  onOpen?: (row: PrChallengeRow) => void;
  copy?: Partial<ChallengeTableColumnsCopy>;
}

Source: src/pr/challenges/challengeTableColumns.tsx (line 29)

ChallengeType

The challenge's type: the top N win, everyone who hits a goal wins, or every delivered sale earns more.

export type ChallengeType = 'leader' | 'target' | 'boost';

Source: src/pr/challenges/challengeDraft.ts (line 25)

ChannelOption

export interface ChannelOption {
  channel: PrChannel;
  /** Shown but not choosable, with the reason as its line ("WhatsApp is not set up yet."). */
  unavailable?: string;
}

Source: src/pr/ChannelPicker.tsx (line 30)

ChoiceOption

export interface ChoiceOption<T extends string> {
  value: T;
  title: ReactNode;
  description?: ReactNode;
  /**
   * The icon square: a PrIcon name, or any element drawn in the same square in the option's `tone` (the mock's bold
   * "%" for "% of sale": `icon: <b>%</b>`). Only an element, not any string, may stand in for a name, so a typo
   * (`icon: 'gfit'`) is a type error rather than text in the square.
   */
  icon?: PrIconName | ReactElement;
  tone?: PrTone;
  /** Shown but not choosable; say why in `description` ("WhatsApp is not set up for TRNDR yet"). */
  disabled?: boolean;
}

Source: src/pr/ChoiceGroup.tsx (line 6)

CommissionChange

A campaign's commission as the form edits it: the kind, the value as typed, and the note sent to the brand.

export interface CommissionChange {
  kind: CommissionKind;
  /** As typed ("10", "12.5"; Arabic-Indic digits are read as digits). */
  value: string;
  note: string;
}

Source: src/pr/programs/CommissionChangeForm.tsx (line 41)

CommissionTextCopy

The words commissionText uses, per language. The same as the blocks' CommissionRate form="long".

export interface CommissionTextCopy {
  /** "10% of sale" / "10% من البيع". */
  ratePercentLong: (value: string) => string;
  /** The short % words commissionRateText falls back to. */
  ratePercent: (value: string) => string;
  /** "EGP 50 per item" / "50 ج.م على القطعة". */
  ratePerItem: (value: string, currency: string) => string;
}

Source: src/pr/programs/commissionText.ts (line 7)

CommissionTextFormatter

What useCommissionText returns: commissionText with the provider's language, currency and words filled in.

export type CommissionTextFormatter = (kind: CommissionKind | 'pct' | 'egp', value: string | number, options?: CommissionTextOptions) => string;

Source: src/pr/programs/commissionText.ts (line 49)

CommissionTextOptions

commissionText's options: the currency word and the words, when not the TRNDR preset's.

export interface CommissionTextOptions {
  /** The currency word per language ("EGP" / "ج.م"): the BricksProvider's `currency.label`. Default the TRNDR preset's. */
  currency?: Readonly<Record<Lang, string>>;
  /** Other words (a BricksProvider `labels.commissionInput` override, say), per field. */
  labels?: Partial<CommissionTextCopy>;
}

Source: src/pr/programs/commissionText.ts (line 26)

ComposerValue

export interface ComposerValue {
  /** null: TRNDR; otherwise the brand the message is sent on behalf of. */
  sender: StackBrand['id'] | null;
  channel: PrChannel;
  audience: AudienceChoice;
  subject: string;
  body: string;
}

Source: src/pr/AnnouncementComposer.tsx (line 15)

ConfirmedGift

One gift in a brand's confirmed gift stock (the gift stock area's data; the builder only reads it).

export interface ConfirmedGift {
  id: string | number;
  name: string;
  /** What one gift costs the brand, delivery included: a server 2-dp string (the budget held per winner). */
  cost: string;
  /** Confirmed good units left. 0: "No gifts left" (shown, not choosable). */
  left: number;
}

Source: src/pr/challenges/ChallengeGiftPicker.tsx (line 34)

CreatorColumnsOptions

creatorColumns' opt-in behaviours (its third argument). Each defaults to 0.6.0's output. Row is the row type onOpen receives: PrCreatorRow, or PrNullableSalesCreatorRow with nullableSales: true.

export interface CreatorColumnsOptions<Row extends PrNullableSalesCreatorRow = PrCreatorRow> {
  /** Opens the creator drawer: the name becomes a button (the row can also open with DataTable `onRowClick`). Default: plain text. */
  onOpen?: (row: Row) => void;
  /**
   * A rejected creator with a `reapplyOn` date: "Can reapply 1 Dec" as the status pill's tooltip, and read after it.
   * Default `false`.
   */
  reapply?: boolean;
  /**
   * The sales cell follows the figure, not the orders: null or "0.00" shows a dash, any other value is shown even with
   * no orders. Default `false` (a dash whenever there are no orders). With `true`, the columns take
   * `PrNullableSalesCreatorRow` rows, whose `sales` can be null.
   */
  nullableSales?: boolean;
}

Source: src/pr/creators/creatorColumns.tsx (line 67)

CustomerRateIssue

Why a customer rate cannot be saved: not a number above 0, or not below the brand's creator rate.

export type CustomerRateIssue = 'invalid' | 'not_below';

Source: src/pr/programs/customerRate.ts (line 5)

CustomerRateSave

What "Save customer rate" sends: the rate as typed (ASCII digits) and whether existing customers move to it.

export interface CustomerRateSave {
  rate: string;
  moveExisting: boolean;
}

Source: src/pr/programs/CustomerAffiliatesCard.tsx (line 57)

FigureItem

One figure of a FigureRow: a muted label over a big value.

export interface FigureItem {
  /** A stable key; default the index. */
  key?: string | number;
  label: ReactNode;
  /** The figure as shown ("10% of sale", "42 / 100", a <Money>), isolated (a <bdi>) so a number keeps its order in Arabic. */
  value: ReactNode;
}

Source: src/pr/mini/FigureRow.tsx (line 5)

FraudCase

export interface FraudCase {
  id: string | number;
  creator: { id: number; name: string; identity?: CreatorIdentityProjection; tier?: string | null };
  brand: StackBrand;
  /** Strongest first. */
  signals: ReadonlyArray<FraudSignal>;
  /** The commission the case affects (held or at risk), a server 2-dp string. */
  amount: string;
  /** Orders the signals point at. */
  orders: number;
  status: FraudCaseStatus;
  /** When it was opened, formatted by the app ("2 days ago"). */
  opened: string;
  /** Waiting past the review deadline (the admin's REVIEW_SLA_DAYS): the age turns red. */
  aging?: boolean;
}

Source: src/pr/fraud/FraudSignalPill.tsx (line 44)

FraudCaseStatus

Where a case stands: open (new), held (commission held while PR looks), cleared, revoked.

export type FraudCaseStatus = 'open' | 'held' | 'cleared' | 'revoked';

Source: src/pr/fraud/FraudSignalPill.tsx (line 41)

FraudDecision

export type FraudDecision = 'clear' | 'hold' | 'revoke';

Source: src/pr/fraud/FraudSignalPill.tsx (line 42)

FraudDecisionResult

export interface FraudDecisionResult {
  decision: FraudDecision;
  reason: string;
  note: string;
}

Source: src/pr/fraud/FraudDecisionBar.tsx (line 38)

FraudEvidence

export interface FraudEvidence {
  orders?: ReadonlyArray<FraudOrderEvidence>;
  matches?: ReadonlyArray<FraudMatchEvidence>;
  /** Timing notes ("4 orders within 12 minutes of the code going live"). */
  timing?: ReadonlyArray<{ id: string | number; text: ReactNode }>;
}

Source: src/pr/fraud/FraudCaseDetail.tsx (line 65)

FraudMatchEvidence

An identity match: the same IP, device, phone, email or address seen on the creator (and on other creators).

export interface FraudMatchEvidence {
  id: string | number;
  what: 'ip' | 'device' | 'phone' | 'email' | 'address';
  /** Masked by the app ("41.33.•••.12", "Zamalek, Cairo •••"). */
  value: string;
  /** Other creators the same value was seen on. */
  shared?: ReadonlyArray<string>;
}

Source: src/pr/fraud/FraudCaseDetail.tsx (line 56)

FraudOrderEvidence

One order a signal points at. Order refs only: never a coupon or gift code (bearer money).

export interface FraudOrderEvidence {
  id: string | number;
  /** The shop's order number ("#10482"). */
  ref: string;
  /** The buyer, masked by the app ("M. A••• · +20 10•• ••• 471"). */
  buyer?: string;
  /** The commission on this order, a server 2-dp string. */
  commission?: string;
  /** Formatted by the app. */
  placed?: string;
  /** Why this order is flagged ("Same phone as the creator"). */
  flag?: ReactNode;
}

Source: src/pr/fraud/FraudCaseDetail.tsx (line 41)

FraudSeverity

export type FraudSeverity = 'high' | 'medium' | 'low';

Source: src/pr/fraud/FraudSignalPill.tsx (line 31)

FraudSignal

export interface FraudSignal {
  kind: FraudSignalKind;
  severity: FraudSeverity;
  /** One line of what matched ("3 orders, same phone"). */
  detail?: ReactNode;
}

Source: src/pr/fraud/FraudSignalPill.tsx (line 33)

FraudSignalKind

export type FraudSignalKind = keyof typeof FRAUD_SIGNALS | (string & {});

Source: src/pr/fraud/FraudSignalPill.tsx (line 30)

GiftAttentionItem

One row of Gift analytics' "Needs attention".

export type GiftAttentionItem = {
  id: string | number;
  brand: Pick<StackBrand, 'name' | 'color'>;
  /** Opens the brand or the shipment: the whole row is then one button. */
  onSelect?: () => void;
} & (
  /** A brand with no confirmed gifts left: "Glow Lab" over "Out of gifts · ask for more stock". */
  | { kind: 'out' }
  /** A shipment PR still has to count: "GS-0017 · Glow Lab" over "40 units to check · Expected". */
  | { kind: 'check'; reference: string; units: number; state: GiftShipmentState }
  /** Any other row: the app's own bold line (default the brand's name) and muted line. */
  | { kind: 'custom'; title?: ReactNode; sub?: ReactNode }
);

Source: src/pr/ganalytics/GiftAttentionList.tsx (line 35)

GiftBrand

A brand PR can record gifts for, with the products it gifts.

export interface GiftBrand {
  id: string | number;
  name: string;
  products: ReadonlyArray<GiftBrandProduct>;
}

Source: src/pr/gifts/RecordGiftsDialog.tsx (line 51)

GiftBrandProduct

A product a brand offers as a gift.

export interface GiftBrandProduct {
  id: string | number;
  name: string;
  /** The brand's code ("GL-101"), shown small under the name. */
  sku?: string;
}

Source: src/pr/gifts/RecordGiftsDialog.tsx (line 43)

GiftBrandRow

One brand in Gift analytics' "By brand" table.

export interface GiftBrandRow {
  id: string | number;
  name: string;
  color?: string | null;
  /** Confirmed units picked for creators. */
  used: number;
  /** Confirmed gift stock (good units PR counted in). */
  total: number;
  /** Gifts sent to creators. Default `used` (the mock counts a picked gift as sent). */
  sent?: number;
  /** Sent gifts the creator received. */
  delivered: number;
  /** Sent gifts not delivered yet. */
  notDelivered: number;
  /** Good units ÷ claimed units on the brand's confirmed shipments, 0–100; null when none is confirmed yet (a dash). */
  received: number | null;
  /** Default: giftStockStatus(used, total). */
  status?: GiftStockStatus;
}

Source: src/pr/ganalytics/GiftAnalytics.tsx (line 57)

GiftBrandStockRow

Deprecated

Since 0.7.0: use GiftBrandRow (used = total − left; status defaults to giftStockStatus), the 0.4.0 gift family. Kept working; removed in 1.0.

A brand's gift stock in the Gift analytics "By brand" table (giftAnalyticsColumns).

export interface GiftBrandStockRow {
  id: string | number;
  brand: StackBrand;
  /** Confirmed gift stock, ever. */
  total: number;
  /** Confirmed units not yet picked for a creator. */
  left: number;
  delivered: number;
  /** Sent to creators, not delivered yet. */
  notDelivered: number;
  /** Good units as a share of claimed units, over counted claims; null when nothing was counted yet. */
  receivedPercent: number | null;
  state: 'gift_ok' | 'gift_low' | 'gift_out';
}

Source: src/pr/gifts/GiftClaims.tsx (line 138)

GiftCardLoadProps

Card-level load state (0.7.0), shared by the claim page's side cards.

export interface GiftCardLoadProps {
  /** The card's data is loading: skeleton lines (and a polite "Loading…") instead of the rows. Default `false`. */
  loading?: boolean;
  /** Loading failed: an alert with this reason instead of the rows (`true` says "Couldn’t load this. Try again."). */
  loadError?: ReactNode;
  /** With `loadError`: a "Try again" button. */
  onRetry?: () => void;
}

Source: src/pr/gifts/GiftSideCards.tsx (line 45)

GiftClaimCheckResult

Deprecated

Since 0.7.0: use GiftCount, the 0.4.0 gift family. Kept working; removed in 1.0.

export interface GiftClaimCheckResult {
  /** Boxes received (asked only while the claim is Expected); null otherwise. */
  boxes: number | null;
  /** Per line, in the order given. */
  lines: ReadonlyArray<{ good: number; damaged: number }>;
}

Source: src/pr/gifts/GiftClaims.tsx (line 216)

GiftClaimLine

Deprecated

Since 0.7.0: use GiftShipmentLine (productId is its id), the 0.4.0 gift family. Kept working; removed in 1.0.

One product of a claim: what the brand says it sent and, once counted, the good and damaged units PR confirmed.

export interface GiftClaimLine {
  /**
   * The product's id. GiftClaimCheck keeps the count being typed by it (by `product` when it is not given), so a
   * refetch that reorders or adds lines keeps each count with its own product.
   */
  productId?: string;
  product: string;
  claimed: number;
  good?: number | null;
  damaged?: number | null;
}

Source: src/pr/gifts/GiftClaims.tsx (line 74)

GiftClaimRow

Deprecated

Since 0.7.0: use GiftShipmentRow (sentOn is sent, status is state), the 0.4.0 gift family. Kept working; removed in 1.0.

A row of the Gift stock list (giftClaimColumns).

export interface GiftClaimRow {
  id: string;
  /** When the brand sent it ("17 Nov"), formatted by the app. */
  sentOn: string;
  brand: StackBrand;
  /** The challenge or campaign the gifts are for. */
  for: string;
  claimed: number;
  /** null until PR has counted. */
  confirmed: number | null;
  status: GiftClaimStatus;
  /** The brand disputes PR's count (an open problem report): a red "Problem reported" pill next to the status. */
  problem?: boolean;
}

Source: src/pr/gifts/GiftClaims.tsx (line 90)

GiftClaimStatus

Deprecated

Since 0.7.0: use GiftShipmentState (giftStatusKey(state) gives these keys), the 0.4.0 gift family. Kept working; removed in 1.0.

A gift claim's status: the TRNDR preset's gift_* keys, drawn by PrStatusPill.

export type GiftClaimStatus = 'gift_expected' | 'gift_arrived' | 'gift_confirmed' | 'gift_confirmed_diff' | 'gift_cancelled';

Source: src/pr/gifts/GiftClaims.tsx (line 68)

GiftCount

What PR entered: good and damaged units per line (in lines order), and the boxes received while expected.

export interface GiftCount {
  lines: Array<{ id: string | number; good: number; damaged: number }>;
  /** Only when the shipment was `expected` (the boxes field is shown then). */
  boxes?: number;
}

Source: src/pr/gifts/GiftShipmentCard.tsx (line 86)

GiftProblem

A problem the brand reported with the count ("We packed 30 hand soaps in box 2. Please recount.").

export interface GiftProblem {
  /** Formatted by the app ("12 Nov"). */
  date: string;
  /** The brand's words, shown as given. */
  text: string;
}

Source: src/pr/gifts/GiftShipmentCard.tsx (line 93)

GiftShipmentFilter

A Gift stock list filter: a shipment state, or problem (an open problem report, whatever the state).

export type GiftShipmentFilter = GiftShipmentState | 'problem';

Source: src/pr/gifts/GiftStatus.tsx (line 53)

GiftShipmentLine

One product of a shipment: what the brand says it sent and, once counted, what PR found.

export interface GiftShipmentLine {
  /**
   * A stable id (the product's). The count being typed is kept by it (by `product` when it is not given), and
   * `onConfirm` sends it back; default there the row's index.
   */
  id?: string | number;
  product: string;
  /** Units the brand says it sent. */
  claimed: number;
  /** Good units PR confirmed (in stock); null or undefined until counted. */
  good?: number | null;
  /** Units that arrived but cannot be gifted. */
  damaged?: number | null;
}

Source: src/pr/gifts/GiftShipmentCard.tsx (line 70)

GiftShipmentRow

A shipment as the Gift stock list shows it.

export interface GiftShipmentRow {
  /** The reference ("GS-0017"). */
  id: string;
  /** When the brand sent it, formatted by the app ("17 Nov"). */
  sent: string;
  brand: StackBrand;
  /** What the gifts are for: a challenge's name, or the app's own word for plain stock. */
  for: string;
  /** Units the brand says it sent (all products). */
  claimed: number;
  /** Good units PR confirmed; null or undefined until counted (shown as a dash). */
  confirmed?: number | null;
  state: GiftShipmentState;
  /** An open problem report from the brand: a second, red pill. */
  problem?: boolean;
}

Source: src/pr/gifts/giftShipmentColumns.tsx (line 38)

GiftShipmentState

A gift shipment's state (the PR mock v3's GSR[].st): a brand says it sent gifts (expected), they reach the warehouse (arrived), PR counts them (confirmed when every unit matched the claim, confirmed_diff when not), or the claim is dropped (cancelled). A brand disputing the count is not a state: it is the separate problem flag.

export type GiftShipmentState = 'expected' | 'arrived' | 'confirmed' | 'confirmed_diff' | 'cancelled';

Source: src/pr/gifts/GiftStatus.tsx (line 13)

GiftShipmentStatus

A shipment's status from the brand to the warehouse (statusTables.pr keys).

export type GiftShipmentStatus = 'gift_expected' | 'gift_arrived' | 'gift_confirmed' | 'gift_confirmed_diff';

Source: src/pr/ganalytics/GiftAnalytics.tsx (line 112)

GiftStockStatus

A brand's gift stock as a whole: statusTables.pr keys (OK, Running low, Out of gifts).

export type GiftStockStatus = 'gift_ok' | 'gift_low' | 'gift_out';

Source: src/pr/ganalytics/GiftAnalytics.tsx (line 43)

JoinRequestRow

export interface JoinRequestRow {
  id: string | number;
  creator: PrPerson & { tier?: PrTier | null; followers?: Partial<Record<Platform, number | null>> };
  brand: StackBrand;
  source: 'creator_request' | 'brand_invite' | 'public_challenge';
  days: number;
}

Source: src/pr/presets.tsx (line 69)

LadderTier

export interface LadderTier {
  /** The tier key (`rising`, `established`…); its name comes from the provider's `tiers` unless `name` is given. */
  key: string;
  name?: string;
  creators: number;
  /** null: the starting tier (every approved creator starts here). Unused under `basis="score"`. */
  threshold: TierThreshold | null;
  /** What a creator gets at this tier; undefined shows the open tag when `open.perks` is set, else "Nothing yet". */
  perks?: ReadonlyArray<ReactNode>;
  /**
   * `basis="score"`: the lowest TRNDR score of this tier (the backend's `affiliate.pulse.tiers` "score from"); the range
   * runs to the next tier's minus one (the top tier: `scoreMax`, default 100).
   */
  scoreFrom?: number;
}

Source: src/pr/tiers/TierLadder.tsx (line 67)

LeaderboardRow

export interface LeaderboardRow {
  /** The creator's id (the avatar's colour seed too). */
  id: number;
  name: string;
  identity?: CreatorIdentityProjection;
  tier?: string | null;
  /** Delivered sales, a server 2-dp string. */
  sales: string;
  orders: number;
  /** When the creator reached this value, formatted by the app ("13 Nov · 09:40"); breaks ties under `first_reached`. */
  reachedAt?: string;
}

Source: src/pr/leaderboard/Leaderboard.tsx (line 50)

LoginValue

export interface LoginValue {
  email: string;
  password: string;
  remember: boolean;
}

Source: src/pr/login/LoginCard.tsx (line 32)

MatrixGroup

export interface MatrixGroup { label: string; permissions: ReadonlyArray<MatrixPermission> }

Source: src/pr/PermissionMatrix.tsx (line 17)

MatrixPermission

export interface MatrixPermission { id: string; label: string; description?: ReactNode }

Source: src/pr/PermissionMatrix.tsx (line 16)

MatrixRole

export interface MatrixRole { id: string; label: string; description?: ReactNode }

Source: src/pr/PermissionMatrix.tsx (line 15)

MessageRow

export interface MessageRow {
  id: string | number;
  subject: string;
  body: string;
  /** null: sent by TRNDR; otherwise the brand it was sent on behalf of. */
  sender: StackBrand | null;
  audience: Audience;
  creators: number;
  openPercent: number;
  sent: string;
  by: string;
}

Source: src/pr/presets.tsx (line 200)

NewCreatorColumnsCopy

newCreatorColumns' words (headers, the customer line, the buttons' names); pass overrides as the preset's copy.

export type NewCreatorColumnsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/creators/newCreatorColumns.tsx (line 19)

NewCreatorColumnsOptions

What newCreatorColumns' rows do.

export interface NewCreatorColumnsOptions {
  onApprove: (row: PrNewCreatorRow) => void;
  onReject: (row: PrNewCreatorRow) => void;
  /** Opens the creator drawer: the name becomes a button. Default: the name is plain text. */
  onOpen?: (row: PrNewCreatorRow) => void;
  /** The row whose decision is being saved: its two buttons are disabled. Default: none. */
  busy?: (row: PrNewCreatorRow) => boolean;
  copy?: Partial<NewCreatorColumnsCopy>;
}

Source: src/pr/creators/newCreatorColumns.tsx (line 36)

NextCampaign

The campaign a brand asked to run after its current one. Texts are formatted by the app.

export interface NextCampaign {
  name: string;
  /** "1 Feb 2027". */
  from: string;
  to: string;
  /** "18% of sale". */
  commission: ReactNode;
  /** `waiting`: the brand's request (Decline / Schedule it); `scheduled`; `declined`. */
  status: 'waiting' | 'scheduled' | 'declined';
}

Source: src/pr/programs/NextCampaignCard.tsx (line 50)

OpenDecision

One open product decision: its short code ("P6", "GS1") and, when known, the question it answers.

export interface OpenDecision {
  /** The code drawn on the tag ("C3", "R10"). */
  id: string;
  /** The open question ("Can PR add or remove tiers?"): the tag's tooltip and part of its accessible name. */
  question?: string;
}

Source: src/pr/decisions/DecisionTag.tsx (line 22)

PayoutRow

export interface PayoutRow {
  id: string | number;
  creator: PrPerson;
  amount: string;
  /** Formatted by the app, masked ("InstaPay · ••• 4471"); the full destination is never in a list. */
  method: string;
  status: 'due' | 'processing' | 'paid' | 'failed';
  hasReceipt: boolean;
  date: string;
}

Source: src/pr/presets.tsx (line 142)

PickableCreator

export interface PickableCreator {
  id: string | number;
  name: string;
  seed: number;
  src?: string | null;
  tier?: PrTier | null;
}

Source: src/pr/AudiencePicker.tsx (line 20)

PickCreator

An approved creator the dialog offers.

export interface PickCreator {
  id: string | number;
  name: string;
  /** The avatar's colour seed; default: `id` when it is a number, else 0. */
  seed?: number;
  avatarUrl?: string | null;
  /** Their tier: the chip at the row's end. None: no chip. */
  tier?: string | null;
}

Source: src/pr/creators/CreatorPickDialog.tsx (line 32)

PrAdjustWalletCopy

AdjustWalletDialog's words; a BricksProvider labels.prAdjustWallet override reaches them.

export type PrAdjustWalletCopy = CopyShape<typeof COPY.en>;

Source: src/pr/brand/AdjustWalletDialog.tsx (line 30)

PrBrandFeeCopy

BrandFeeDialog's words; a BricksProvider labels.prBrandFee override reaches them.

export type PrBrandFeeCopy = CopyShape<typeof COPY.en>;

Source: src/pr/brand/BrandFeeDialog.tsx (line 30)

PrBrandGiftStockCopy

BrandGiftStock's words; a BricksProvider labels.prBrandGiftStock override reaches them.

export type PrBrandGiftStockCopy = CopyShape<typeof COPY.en>;

Source: src/pr/brand/BrandGiftStock.tsx (line 23)

PrBrandRequestCopy

BrandRequestCard's words; a BricksProvider labels.prBrandRequest override reaches them.

export type PrBrandRequestCopy = Omit<BrandRequestWords, 'error' | 'retry'> & {
  /** `error={true}`'s message. Optional so copy objects written for 0.6.0 still type-check; the language's default is used then. */
  error?: BrandRequestWords['error'];
  /** The error's "Try again" (`onRetry`). Optional, as `error`. */
  retry?: BrandRequestWords['retry'];
};

Source: src/pr/challenges/BrandRequestCard.tsx (line 29)

PrBuilderStepCopy

BuilderStepCard's words; a BricksProvider labels.prBuilderStep override reaches them.

export type PrBuilderStepCopy = CopyShape<typeof COPY.en>;

Source: src/pr/challenges/BuilderStepCard.tsx (line 19)

PrCampaignChallengesCopy

CampaignChallenges' words; a BricksProvider labels.prCampaignChallenges override reaches them.

export type PrCampaignChallengesCopy = CopyShape<typeof COPY.en>;

Source: src/pr/programs/CampaignChallenges.tsx (line 22)

PrCampaignColumnsCopy

campaignColumns' words; a BricksProvider labels.prCampaignColumns key (read with useCampaignColumnsCopy).

export type PrCampaignColumnsCopy = CopyShape<typeof H.en>;

Source: src/pr/programs/campaignColumns.tsx (line 24)

PrChallengeBuilderCopy

The challenge builder steps' words; a BricksProvider labels.prChallengeBuilder override reaches them.

export type PrChallengeBuilderCopy = CopyShape<typeof BUILDER_COPY.en>;

Source: src/pr/challenges/challengeBuilderCopy.tsx (line 69)

PrChallengeCardCopy

PrChallengeCard's words; a BricksProvider labels.prChallengeCard override reaches them.

export type PrChallengeCardCopy = CopyShape<typeof COPY.en>;

Source: src/pr/challenges/PrChallengeCard.tsx (line 27)

PrChallengeData

A challenge's data as both of the Challenges tab's views draw it: the card (PrChallengeCard) and the table (challengeTableColumns). Map the API's challenge to this once; a PrChallengeRow adds the row id.

export interface PrChallengeData {
  name: string;
  brand: StackBrand;
  /** `leader`: the top creators win; `target`: everyone who hits the goal; `boost`: every delivered sale earns more. */
  type: 'leader' | 'target' | 'boost';
  /** `public`: anyone can join; `brand`: the brand's affiliates only. */
  audience: 'public' | 'brand';
  /** A PR status key: `live`, `upcoming`, `settling`, `ended`. Live tints the band (raspberry for a leaderboard, lime otherwise). */
  status: string;
  /** "1–30 Nov". */
  dates: string;
  /** Live: days left (3 or fewer turns raspberry). */
  daysLeft?: number;
  /** Settling: orders still on the way. */
  ordersOnTheWay?: number;
  /** 0–100: how far through its dates (the thin ink bar). Default: 0 upcoming, 50 live, 100 settling or ended. */
  timeProgress?: number;
  /** "Top 10 by delivered sales", "20 delivered orders". */
  goal: ReactNode;
  /** "EGP 1,000 each", "Serum gift set". */
  reward: ReactNode;
  /** The reward chip's icon. Default `cash`. */
  rewardKind?: 'cash' | 'gift';
  /** A gift reward whose brand has no gifts left: a red "No gifts left" beside it. */
  noGiftsLeft?: boolean;
  /** Anything else beside the reward, inside its chip (e.g. `<PrStatusPill status="gift_out" />`). */
  rewardNote?: ReactNode;
  /** A leaderboard's top three now; none yet shows "The leaderboard shows once creators start selling." */
  top?: ReadonlyArray<PrChallengeLeader>;
  /** A target's creators who hit the goal, out of `joined`. */
  hit?: number;
  joined: number;
  /** Faces for the footer stack (up to four are drawn). */
  people?: ReadonlyArray<StackPerson>;
  /** The budget held for it, a server 2-dp string. */
  held: string;
}

Source: src/pr/challenges/PrChallengeCard.tsx (line 50)

PrChallengeGiftPickerCopy

ChallengeGiftPicker's words; a BricksProvider labels.prChallengeGiftPicker override reaches them.

export type PrChallengeGiftPickerCopy = CopyShape<typeof COPY.en>;

Source: src/pr/challenges/ChallengeGiftPicker.tsx (line 25)

PrChallengeLeader

One of the top three on a live leaderboard.

export interface PrChallengeLeader {
  id: number;
  name: string;
  avatarUrl?: string | null;
  /** Delivered sales, a server 2-dp string. */
  sales: string;
  /** The avatar's colour seed when it is not the id (the mock's palette index). */
  seed?: number;
}

Source: src/pr/challenges/PrChallengeCard.tsx (line 36)

PrChallengeRequestsCopy

challengeRequestColumns' words (headers); a BricksProvider labels.prChallengeRequests key, passed as the preset's copy.

export type PrChallengeRequestsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/challenges/challengeRequestColumns.tsx (line 16)

PrChallengeRow

A challenge as the Challenges table view lists it (challengeTableColumns): PrChallengeData and a row id.

export interface PrChallengeRow extends PrChallengeData {
  id: string | number;
}

Source: src/pr/challenges/PrChallengeCard.tsx (line 89)

PrChallengeStatusFilterCopy

ChallengeStatusFilter's words; a BricksProvider labels.prChallengeStatusFilter override reaches them.

export type PrChallengeStatusFilterCopy = CopyShape<typeof CHIPS.en>;

Source: src/pr/challenges/challengeColumns.tsx (line 80)

PrChallengeSummaryCopy

ChallengeSummary's words; a BricksProvider labels.prChallengeSummary override reaches them.

export type PrChallengeSummaryCopy = Omit<ChallengeSummaryWords, 'error' | 'retry'> & {
  /** `error={true}`'s message. Optional so copy objects written for 0.6.0 still type-check; the language's default is used then. */
  error?: ChallengeSummaryWords['error'];
  /** The error's "Try again" (`onRetry`). Optional, as `error`. */
  retry?: ChallengeSummaryWords['retry'];
};

Source: src/pr/challenges/ChallengeSummary.tsx (line 44)

PrChangeOwnerCopy

ChangeOwnerDialog's words; a BricksProvider labels.prChangeOwner override reaches them.

export type PrChangeOwnerCopy = CopyShape<typeof COPY.en>;

Source: src/pr/brand/ChangeOwnerDialog.tsx (line 26)

PrChangeRequestsCopy

CampaignChangeRequests' words; a BricksProvider labels.prChangeRequests override reaches them.

export type PrChangeRequestsCopy = Omit<ChangeRequestsWords, 'error' | 'retry'> & {
  /** `error={true}`'s message. Optional so copy objects written for 0.6.0 still type-check; the language's default is used then. */
  error?: ChangeRequestsWords['error'];
  /** The error's "Try again" (`onRetry`). Optional, as `error`. */
  retry?: ChangeRequestsWords['retry'];
};

Source: src/pr/programs/CampaignChangeRequests.tsx (line 31)

PrChannel

Where a message lands: the TRNDR app's notifications (the mock), an SMS, or WhatsApp (the PR admin's channels).

export type PrChannel = 'app' | 'sms' | 'whatsapp';

Source: src/pr/ChannelPicker.tsx (line 8)

PrColumnsCopy

The words of the PR column presets (headers, card labels, action names); a BricksProvider labels.prColumns key.

export interface PrColumnsCopy {
  creator: string; followers: string; wants: string; source: string; waiting: string; actions: string;
  brand: string; owner: string; program: string; wallet: string; sales: string; creators: string; joinReq: string;
  you: string; available: (value: ReactNode) => ReactNode;
  amount: string; method: string; status: string; receipt: string; date: string; view: string; upload: string;
  topup: string; via: string; card: string; bank: string; confirm: string;
  message: string; from: string; to: string; opened: string; sent: string; by: (name: string) => string;
  what: string; area: string; who: string; when: string;
  approveName: (name: string) => string; rejectName: (name: string) => string;
}

Source: src/pr/presets.tsx (line 22)

PrCommissionChangeCopy

CommissionChangeForm's words; a BricksProvider labels.prCommissionChange override reaches them.

export type PrCommissionChangeCopy = CopyShape<typeof COPY.en>;

Source: src/pr/programs/CommissionChangeForm.tsx (line 32)

PrCopy

export interface PrCopy {
  prAnnouncementComposer: PrAnnouncementComposerCopy;
  prApprovals: PrApprovalsCopy;
  prAudiencePicker: PrAudiencePickerCopy;
  prBrandDetail: PrBrandDetailCopy;
  prBulkBar: PrBulkBarCopy;
  prChannelPicker: PrChannelPickerCopy;
  prColumns: PrColumnsCopy;
  prEditing: PrEditingCopy;
  prMessageCells: PrMessageCellsCopy;
  prMessageFields: PrMessageFieldsCopy;
  prMessagePreview: PrMessagePreviewCopy;
  prPermissionMatrix: PrPermissionMatrixCopy;
  prReasonDialog: PrReasonDialogCopy;
  prReceiptUpload: PrReceiptUploadCopy;
  prSenderPicker: PrSenderPickerCopy;
  prSettings: PrSettingsCopy;
  prWalletHealth: PrWalletHealthCopy;
}

export interface PrCopy {
  prGiftColumns: PrGiftColumnsCopy;
  prGiftShipment: PrGiftShipmentCopy;
  prGiftSide: PrGiftSideCopy;
  prGiftStatusFilter: PrGiftStatusFilterCopy;
  prRecordGifts: PrRecordGiftsCopy;
  prWarehouse: PrWarehouseCopy;
}

interface PrCopy {
    prOtpStep: PrOtpStepCopy;
  }

interface PrCopy {
    prLoginCard: PrLoginCardCopy;
  }

interface PrCopy {
    prLoginLayout: PrLoginLayoutCopy;
  }

interface PrCopy {
    prDecisionTag: PrDecisionTagCopy;
  }

interface PrCopy {
    prTierLadder: PrTierLadderCopy;
  }

interface PrCopy {
    prLeaderboard: PrLeaderboardCopy;
  }

interface PrCopy {
    prChallengeSummary: PrChallengeSummaryCopy;
  }

interface PrCopy {
    prChallengeStatusFilter: PrChallengeStatusFilterCopy;
  }
  // … 156 more lines in the source

Source: src/pr/copyKeys.ts (line 22)

PrCountPillCopy

PrCountPill's words; a BricksProvider labels.prCountPill override reaches them.

export type PrCountPillCopy = CopyShape<typeof COPY.en>;

Source: src/pr/PrCountPill.tsx (line 21)

PrCreatorColumnsCopy

prCreatorColumns' words (headers, sub line); a BricksProvider labels.prCreatorColumns key, passed as the preset's copy.

export type PrCreatorColumnsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/creatorColumns.tsx (line 22)

PrCreatorDrawerCopy

PrCreatorDrawer's words; a BricksProvider labels.prCreatorDrawer override reaches them.

export type PrCreatorDrawerCopy = CopyShape<typeof COPY.en>;

Source: src/pr/creators/PrCreatorDrawer.tsx (line 31)

PrCreatorListRow

Deprecated

Since 0.7.0. Use PrCreatorRow with creatorColumns (the one PR creators preset); keeps working until 1.0.

A creator as the PR Creators table lists it.

export interface PrCreatorListRow {
  id: string | number;
  creator: PrPerson & { handle?: string | null };
  /** A customer affiliate rather than a creator ("Customer · Since …"). */
  customer?: boolean;
  /** When they joined TRNDR, formatted by the app ("Jun 2026"). */
  joined: string;
  /** A PR status key: `creator_active`, `pending`, `rejected`. */
  status: string;
  /** Rejected: when they can apply again, formatted by the app ("1 Dec"); the pill's tooltip and description. */
  reapply?: string | null;
  tier?: PrTier | null;
  /** The TRNDR score, 0–100; none yet shows "—". */
  score?: number | null;
  followers?: Partial<Record<Platform, number | null>>;
  brands: ReadonlyArray<StackBrand>;
  orders: number;
  /** Server 2-dp string; null or "0.00" shows "—". */
  sales: string | null;
}

Source: src/pr/creatorColumns.tsx (line 34)

PrCreatorPickCopy

CreatorPickDialog's words; a BricksProvider labels.prCreatorPick override reaches them.

export type PrCreatorPickCopy = CopyShape<typeof COPY.en>;

Source: src/pr/creators/CreatorPickDialog.tsx (line 23)

PrCreatorRow

A creator as the PR Creators table lists them.

export interface PrCreatorRow {
  id: number;
  /** The avatar's colour seed; default `id`. */
  seed?: number;
  name: string;
  avatarUrl?: string | null;
  /** A PR status key: `active`, `pending`, `rejected`. */
  status: string;
  /** `customer`: a customer affiliate ("Customer · Since …", no tier, no score). Default `creator`. */
  track?: 'creator' | 'customer';
  tier?: string | null;
  /** 0–100, null: no score yet. */
  score: number | null;
  followers: Partial<Record<Platform, number | null>>;
  brands: ReadonlyArray<StackBrand>;
  orders: number;
  /**
   * All-time delivered sales, a server 2-dp string. For a figure that can be null (no sales figure yet), use
   * `PrNullableSalesCreatorRow` rows with the preset's `nullableSales` option.
   */
  sales: string;
  /** Formatted by the app ("Jun 2026", "16 Nov 2026"). */
  joined: string;
  /** A rejected creator's reapply date, formatted by the app ("1 Dec"): the status pill's tooltip with the `reapply` option. */
  reapplyOn?: string | null;
}

Source: src/pr/creators/creatorColumns.tsx (line 26)

PrCustomerCardCopy

CustomerAffiliatesCard's words; a BricksProvider labels.prCustomerCard override reaches them.

export type PrCustomerCardCopy = CopyShape<typeof COPY.en>;

Source: src/pr/programs/CustomerAffiliatesCard.tsx (line 48)

PrCustomerSwitchCopy

CustomerAffiliatesSwitch's words; a BricksProvider labels.prCustomerSwitch override reaches them.

export type PrCustomerSwitchCopy = Omit<CustomerSwitchWords, 'error' | 'retry'> & {
  /** `error={true}`'s message. Optional so copy objects written for 0.6.0 still type-check; the language's default is used then. */
  error?: CustomerSwitchWords['error'];
  /** The error's "Try again" (`onRetry`). Optional, as `error`. */
  retry?: CustomerSwitchWords['retry'];
};

Source: src/pr/programs/CustomerAffiliatesSwitch.tsx (line 37)

PrDecisionsCardCopy

DecisionsCard's words; a BricksProvider labels.prDecisionsCard override reaches them.

export type PrDecisionsCardCopy = CopyShape<typeof COPY.en>;

Source: src/pr/decisions/DecisionsCard.tsx (line 16)

PrDecisionTagCopy

DecisionTag's words; a BricksProvider labels.prDecisionTag override reaches them.

export type PrDecisionTagCopy = CopyShape<typeof COPY.en>;

Source: src/pr/decisions/DecisionTag.tsx (line 13)

PrDrawerCreator

A creator as the PR portal's drawer shows them.

export interface PrDrawerCreator {
  id: number;
  /** The avatar's colour seed; default `id`. */
  seed?: number;
  name: string;
  avatarUrl?: string | null;
  /** Followers per platform: the line under the name ("IG 120K · TikTok 340K"). */
  followers?: Partial<Record<Platform, number | null>>;
  /** A PR status key: `active`, `pending`, `rejected`. */
  status: string;
  /** `customer`: a customer affiliate (no score, no tier, no gifts or challenges). Default `creator`. */
  track?: 'creator' | 'customer';
  /** The tier key; null or undefined: no tier (pending, rejected, customer). */
  tier?: string | null;
  /** `manual`: set by PR (stays until PR picks "Follow the score"); `score`: from the TRNDR score. */
  tierSource?: 'manual' | 'score';
  /** 0–100, null: no score yet. */
  score: number | null;
  /** The score's split (ScoreBreakdown). */
  scoreParts?: ReadonlyArray<ScorePart>;
  /** All-time delivered sales, a server 2-dp string. */
  sales: string;
  orders: number;
  /** Formatted by the app ("Jun 2026"). */
  joined: string;
  /** Brand names, in the order to list them. */
  brands: ReadonlyArray<string>;
  /** A rejected creator's reapply date, formatted ("24 Nov 2026"). */
  reapplyOn?: string;
}

Source: src/pr/creators/PrCreatorDrawer.tsx (line 40)

PrFraudCaseDetailCopy

FraudCaseDetail's words; a BricksProvider labels.prFraudCaseDetail override reaches them.

export type PrFraudCaseDetailCopy = CopyShape<typeof COPY.en>;

Source: src/pr/fraud/FraudCaseDetail.tsx (line 32)

PrFraudCaseRowCopy

FraudCaseRow's (and fraudColumns') words; a BricksProvider labels.prFraudCaseRow override reaches the row's.

export type PrFraudCaseRowCopy = CopyShape<typeof COPY.en>;

Source: src/pr/fraud/FraudCaseRow.tsx (line 23)

PrFraudCopy

The fraud blocks' shared words; a BricksProvider labels.prFraud override reaches them.

export type PrFraudCopy = CopyShape<typeof COPY.en>;

Source: src/pr/fraud/FraudSignalPill.tsx (line 77)

PrFraudDecisionCopy

FraudDecisionBar's words; a BricksProvider labels.prFraudDecision override reaches them.

export type PrFraudDecisionCopy = CopyShape<typeof COPY.en>;

Source: src/pr/fraud/FraudDecisionBar.tsx (line 30)

PrGiftAnalyticsCopy

The Gift analytics blocks' words (giftBrandColumns, GiftShipmentCounts); a BricksProvider labels.prGiftAnalytics override reaches them.

export type PrGiftAnalyticsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/ganalytics/GiftAnalytics.tsx (line 26)

PrGiftAttentionCopy

GiftAttentionList's words; a BricksProvider labels.prGiftAttention override reaches them.

export type PrGiftAttentionCopy = CopyShape<typeof COPY.en>;

Source: src/pr/ganalytics/GiftAttentionList.tsx (line 26)

PrGiftColumnsCopy

The Gift stock list's words (headers, the "Sent 17 Nov" line, and the toolbar's search placeholder and sort options); a BricksProvider labels.prGiftColumns key.

export type PrGiftColumnsCopy = CopyShape<typeof H.en>;

Source: src/pr/gifts/giftShipmentColumns.tsx (line 32)

PrGiftsCopy

Deprecated

Since 0.7.0: use PrGiftShipmentCopy, PrGiftColumnsCopy and PrGiftAnalyticsCopy, the 0.4.0 gift family. Kept working; removed in 1.0.

The gift stock blocks' words; a BricksProvider labels.prGifts override reaches them.

export type PrGiftsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/gifts/GiftClaims.tsx (line 56)

PrGiftShipmentCopy

GiftShipmentCard's words; a BricksProvider labels.prGiftShipment override reaches them. loading, loadError, retry and unitsErrUpTo (0.7.0; the units error when a line claims more than 999) are optional: a missing one uses the language's default.

export type PrGiftShipmentCopy = Omit<GiftShipmentWords, AddedIn07> & Partial<Pick<GiftShipmentWords, AddedIn07>>;

Source: src/pr/gifts/GiftShipmentCard.tsx (line 67)

PrGiftSideCopy

GiftShipmentTimeline's and BrandGiftStockCard's words; a BricksProvider labels.prGiftSide override reaches them. loading, loadError and retry (0.7.0) are optional: a missing one uses the language's default.

export type PrGiftSideCopy = Omit<GiftSideWords, AddedIn07> & Partial<Pick<GiftSideWords, AddedIn07>>;

Source: src/pr/gifts/GiftSideCards.tsx (line 35)

PrGiftStatusFilterCopy

GiftStatusFilter's words; a BricksProvider labels.prGiftStatusFilter override reaches them.

export type PrGiftStatusFilterCopy = CopyShape<typeof CHIPS.en>;

Source: src/pr/gifts/GiftStatus.tsx (line 50)

PrIconName

export type PrIconName = keyof typeof PR_ICONS;

Source: src/pr/PrIcon.tsx (line 42)

PrLeaderboardCopy

Leaderboard's words; a BricksProvider labels.prLeaderboard override reaches them.

export type PrLeaderboardCopy = Omit<LeaderboardWords, 'tieOn'> & {
  /** What the tie is on, for "are tied on sales" (the board's `rankBy`, with `tieDetail`). Optional so copy objects written for 0.5.0 (before it existed) still type-check; the language's default is used then. */
  tieOn?: LeaderboardWords['tieOn'];
};

Source: src/pr/leaderboard/Leaderboard.tsx (line 37)

PrLoginCardCopy

LoginCard's words; a BricksProvider labels.prLoginCard override reaches them.

export type PrLoginCardCopy = CopyShape<typeof COPY.en>;

Source: src/pr/login/LoginCard.tsx (line 24)

PrLoginLayoutCopy

LoginLayout's words; a BricksProvider labels.prLoginLayout override reaches them.

export type PrLoginLayoutCopy = CopyShape<typeof COPY.en>;

Source: src/pr/login/LoginLayout.tsx (line 19)

PrMessageDrawerCopy

MessageDrawer's words; a BricksProvider labels.prMessageDrawer override reaches them.

export type PrMessageDrawerCopy = CopyShape<typeof COPY.en>;

Source: src/pr/messages/MessageDrawer.tsx (line 27)

PrMiniListCopy

MiniList's and MiniRow's words; a BricksProvider labels.prMiniList override reaches them.

export type PrMiniListCopy = CopyShape<typeof COPY.en>;

Source: src/pr/mini/MiniList.tsx (line 14)

PrNewCreatorRow

A creator who signed up and waits for PR's yes or no (Approvals › New creators).

export interface PrNewCreatorRow {
  id: string | number;
  name: string;
  /** The avatar's colour seed; default: `id` when it is a number, else 0. */
  seed?: number;
  avatarUrl?: string | null;
  /** A customer affiliate asking to become a creator: "Customer asking to become a creator" under the name. */
  customer?: boolean;
  followers: Partial<Record<Platform, number | null>>;
  /** When they signed up, formatted by the app ("Today", "16 Nov"). */
  signedUp: string;
}

Source: src/pr/creators/newCreatorColumns.tsx (line 22)

PrNextCampaignCopy

NextCampaignCard's and ScheduleCampaignDialog's words; a BricksProvider labels.prNextCampaign override reaches them.

export type PrNextCampaignCopy = CopyShape<typeof COPY.en>;

Source: src/pr/programs/NextCampaignCard.tsx (line 41)

PrNullableSalesCreatorRow

A creator row whose all-time sales can be null (no sales figure yet): PrCreatorRow with sales: string | null. creatorColumns(language, money, { nullableSales: true }) takes these rows; null or "0.00" shows a dash. PrCreatorRow rows fit here too.

export interface PrNullableSalesCreatorRow extends Omit<PrCreatorRow, 'sales'> {
  /** All-time delivered sales, a server 2-dp string, or null when there is no figure yet. */
  sales: string | null;
}

Source: src/pr/creators/creatorColumns.tsx (line 58)

PrOtpStepCopy

OtpStep's words; a BricksProvider labels.prOtpStep override reaches them.

export type PrOtpStepCopy = CopyShape<typeof COPY.en>;

Source: src/pr/login/OtpStep.tsx (line 25)

PrOwnerOption

A PR person who can own a brand.

export interface PrOwnerOption {
  id: string | number;
  name: string;
}

Source: src/pr/brand/ChangeOwnerDialog.tsx (line 35)

PrPerson

A person shown with a photo or initials (Avatar's props).

export interface PrPerson {
  name: string;
  /** A stable number (the row id): the same seed always gets the same tone. */
  seed: number;
  src?: string | null;
}

Source: src/pr/types.ts (line 12)

PrPortalFrameCopy

PrPortalFrame's words (the default nav, brand line, search, "+ New", user row); a BricksProvider labels.prPortalFrame override reaches them.

export type PrPortalFrameCopy = CopyShape<typeof COPY.en>;

Source: src/pr/portal/PrPortalFrame.tsx (line 33)

PrPortalNotifications

NotificationsMenu's props, without language.

export type PrPortalNotifications = Omit<NotificationsMenuProps, 'language'>;

Source: src/pr/portal/PrPortalFrame.tsx (line 108)

PrPortalSearch

HeaderSearch's props, without language (the frame passes its own); placeholder and groupLabels have PR defaults.

export type PrPortalSearch = Omit<HeaderSearchProps, 'language'>;

Source: src/pr/portal/PrPortalFrame.tsx (line 106)

PrPortalUser

The signed-in PR person in the sidebar's last row.

export interface PrPortalUser {
  name: string;
  /** The second line. Default "PR team". */
  detail?: ReactNode;
  /** Picks the default Avatar's colour (a stable number, such as the person's id). Default 1. */
  seed?: number;
  /** A photo for the default Avatar (initials show without one). */
  src?: string | null;
  /** Replaces the default `<Avatar name seed />` (drawn at 34px). */
  avatar?: ReactNode;
}

Source: src/pr/portal/PrPortalFrame.tsx (line 93)

PrProgramCardsCopy

ProgramStatusCard's and AffiliateProgramCard's words; a BricksProvider labels.prProgramCards override reaches them.

export type PrProgramCardsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/programs/ProgramCards.tsx (line 34)

PrRecordGiftsCopy

RecordGiftsDialog's words; a BricksProvider labels.prRecordGifts override reaches them.

export type PrRecordGiftsCopy = Omit<RecordGiftsWords, 'unitsRange'> & {
  /** With `maxUnits`: the units error naming the range. Optional so copy objects written for 0.5.0 (before it existed) still type-check; the language's default is used then. */
  unitsRange?: RecordGiftsWords['unitsRange'];
};

Source: src/pr/gifts/RecordGiftsDialog.tsx (line 37)

PrRequestCardsCopy

RequestWalletCard's, RequestGiftsCard's and RequestHandled's words; a BricksProvider labels.prRequestCards override reaches them.

export type PrRequestCardsCopy = CopyShape<typeof COPY.en>;

Source: src/pr/challenges/BrandRequestCardParts.tsx (line 32)

PrRequestChallengeCopy

RequestChallengeCard's words; a BricksProvider labels.prRequestChallenge override reaches them.

export type PrRequestChallengeCopy = CopyShape<typeof COPY.en>;

Source: src/pr/programs/RequestChallengeCard.tsx (line 14)

PrScoreCopy

The score components' words (ScoreBreakdown, ScoreExplainer); a BricksProvider labels.prScore override reaches them.

export type PrScoreCopy = CopyShape<typeof COPY.en>;

Source: src/pr/creators/Score.tsx (line 93)

PrSenderPickerCopy

SenderPicker's words; a BricksProvider labels.prSenderPicker override reaches them.

export type PrSenderPickerCopy = CopyShape<typeof COPY.en>;

Source: src/pr/SenderPicker.tsx (line 26)

PrStatus

export type PrStatus = keyof typeof TRNDR_PR_STATUSES;

Source: src/pr/PrStatus.tsx (line 9)

PrTier

The creator tiers the PR portal sets (CreatorPulseScore::TIERS).

export type PrTier = 'rising' | 'established' | 'influential' | 'elite';

Source: src/pr/types.ts (line 6)

PrTierChangeCopy

TierChangeDialog's words; a BricksProvider labels.prTierChange override reaches them.

export type PrTierChangeCopy = CopyShape<typeof COPY.en>;

Source: src/pr/tiers/TierChangeDialog.tsx (line 23)

PrTierLadderCopy

TierLadder's words; a BricksProvider labels.prTierLadder override reaches them.

export type PrTierLadderCopy = Omit<TierLadderWords, 'scoreFromOnly'> & {
  /** A score range whose end falls below its start: the start alone ("40+"). Optional so copy objects written for 0.5.0 (before it existed) still type-check; the language's default is used then. */
  scoreFromOnly?: TierLadderWords['scoreFromOnly'];
};

Source: src/pr/tiers/TierLadder.tsx (line 47)

PrTierMovesCopy

TierMoveList's words; a BricksProvider labels.prTierMoves override reaches them.

export type PrTierMovesCopy = CopyShape<typeof COPY.en>;

Source: src/pr/tiers/TierMoveList.tsx (line 21)

PrTone

The mock's soft tone pairs (.t-rasp, .t-butter, …) for icon squares and tiles.

export type PrTone = 'rasp' | 'butter' | 'sky' | 'lime' | 'lilac' | 'mute';

Source: src/pr/PrIcon.tsx (line 60)

PrUsageBarCopy

UsageBar's words; a BricksProvider labels.prUsageBar override reaches them.

export type PrUsageBarCopy = CopyShape<typeof COPY.en>;

Source: src/pr/ganalytics/UsageBar.tsx (line 12)

PrWarehouseCopy

WarehouseNote's and WarehouseDetailsCard's words; a BricksProvider labels.prWarehouse override reaches them. loading, loadError and retry (0.7.0) are optional: a missing one uses the language's default.

export type PrWarehouseCopy = Omit<WarehouseWords, AddedIn07> & Partial<Pick<WarehouseWords, AddedIn07>>;

Source: src/pr/gifts/Warehouse.tsx (line 34)

ReasonResult

export interface ReasonResult {
  /** The chosen reason (its value), or the typed reason in `text` mode. */
  reason: string;
  note: string;
}

Source: src/pr/ReasonDialog.tsx (line 22)

ReceiptFile

export interface ReceiptFile {
  name: string;
  /** Bytes, for the "1.2 MB" line. */
  size: number;
  kind: 'image' | 'pdf';
  /** A thumbnail for an image receipt (the app's signed URL). */
  previewUrl?: string | null;
}

Source: src/pr/ReceiptUpload.tsx (line 11)

ReceiptState

export type ReceiptState = 'empty' | 'uploading' | 'uploaded' | 'error';

Source: src/pr/ReceiptUpload.tsx (line 9)

RecordedGifts

What PR recorded. state: expected (on the way) or arrived (already at the warehouse: count it now).

export interface RecordedGifts {
  brandId: string | number;
  lines: Array<{ productId: string | number; product: string; units: number }>;
  boxes: number;
  state: 'expected' | 'arrived';
}

Source: src/pr/gifts/RecordGiftsDialog.tsx (line 58)

RequestGiftClaim

One gift claim sent for a requested challenge.

export interface RequestGiftClaim {
  /** The claim's code ("GS-0015"). */
  id: string;
  /** Units the brand says it sent. */
  claimed: number;
  /** Units PR counted and confirmed, once counted. */
  confirmed?: number;
  /** A gift claim status key (`gift_expected`, `gift_arrived`, `gift_confirmed`…). */
  status: string;
}

Source: src/pr/challenges/BrandRequestCardParts.tsx (line 91)

ScorePart

One part of a creator's score, as the backend splits it.

export interface ScorePart {
  key: ScorePartKey | (string & {});
  /** Points earned; null: the part can't be measured yet (left out of the score, not counted as 0). */
  points: number | null;
  /** Points the part can give; default: TRNDR_SCORE_PARTS' for the key. */
  max?: number;
  /** The part's name; default: the copy's name for the key. */
  name?: string;
  /** What was read ("460K followers", "8.0% engagement"), formatted by the app. */
  reading?: ReactNode;
  /** On time and Quality before 10 deliveries or ratings: marked "provisional". */
  provisional?: boolean;
}

Source: src/pr/creators/Score.tsx (line 102)

ScorePartKey

A part of the TRNDR score (TRNDR_SCORE_PARTS), or one an app adds with its own name.

export type ScorePartKey = (typeof TRNDR_SCORE_PARTS)[number]['key'];

Source: src/pr/creators/Score.tsx (line 25)

SmsCount

export interface SmsCount {
  /** Characters as the network counts them (an extension character counts 2 in GSM-7; UTF-16 units in UCS-2). */
  chars: number;
  /** How many SMS one recipient receives (0 for an empty message). */
  segments: number;
  encoding: 'GSM-7' | 'UCS-2';
}

Source: src/pr/sms.ts (line 5)

StackBrand

export interface StackBrand {
  id: string | number;
  name: string;
  color?: string | null;
}

Source: src/pr/BrandAvatar.tsx (line 48)

SummaryGift

export interface SummaryGift {
  id: string | number;
  name: string;
  /** Units left in stock. */
  left: number;
  /** Units the challenge could need (its winners); fewer left than this is a warning line. */
  needed?: number;
}

Source: src/pr/challenges/ChallengeSummary.tsx (line 119)

SummaryWarning

export interface SummaryWarning {
  id: string | number;
  text: ReactNode;
  /** `bad` blocks the primary action (missing name, dates in the wrong order, not enough in the wallet). Default `warn`. */
  tone?: 'warn' | 'bad';
  /** The step that fixes it: the warning becomes a link to it. */
  step?: string;
}

Source: src/pr/challenges/ChallengeSummary.tsx (line 128)

TierChangeResult

What PR saved: a tier key, or follow_score (the tier goes back to following the score), and the reason.

export interface TierChangeResult {
  tier: string | 'follow_score';
  reason: string;
}

Source: src/pr/tiers/TierChangeDialog.tsx (line 32)

TierLadderOpen

Open decisions in the mock, by area: the decision id to show as an "Open · R10" tag instead of the content.

export interface TierLadderOpen {
  /** R10: what a tier gives creators. */
  perks?: string;
  /** S2: the thresholds (shown read-only with the tag beside them; not editable while open). */
  thresholds?: string;
  /** S4: whether PR can add or remove tiers (the "Add a tier" tile shows the tag and is disabled). */
  tiers?: string;
}

Source: src/pr/tiers/TierLadder.tsx (line 84)

TierMove

One tier move: automatic (the score moved the creator) or manual (by is the PR person who moved them, with a reason).

export interface TierMove {
  id: string | number;
  creator: PrPerson;
  /** Tier keys; names from the provider's `tiers`. */
  from: string;
  to: string;
  /** Formatted by the app ("2 days ago", "28 Oct · 11:05"). */
  when: string;
  /** The score that moved them (automatic moves). */
  score?: number | null;
  /** Manual: the PR person who moved them. */
  by?: string;
  /** Manual: why (the creator saw it). */
  reason?: string;
}

Source: src/pr/tiers/TierMoveList.tsx (line 30)

TierThreshold

What moves a creator up to a tier: all-time delivered sales (a server 2-dp string) and delivered orders.

export interface TierThreshold {
  sales: string | null;
  orders: number | null;
}

Source: src/pr/tiers/TierLadder.tsx (line 59)

TierThresholdRule

How a tier's two numbers combine (the mock's open decision S2 "sales value + orders").

export type TierThresholdRule = 'sales_and_orders' | 'sales_or_orders' | 'sales' | 'orders';

Source: src/pr/tiers/TierLadder.tsx (line 65)

TopUpRow

export interface TopUpRow {
  id: string | number;
  brand: StackBrand;
  amount: string;
  method: 'card' | 'bank';
  status: 'topup_pending' | 'topup_confirmed' | 'topup_failed';
  date: string;
}

Source: src/pr/presets.tsx (line 173)

WalletAdjustment

What PR saves: a signed 2-dp money string ("500.00", "-120.50") and the reason, trimmed.

export interface WalletAdjustment {
  amount: string;
  reason: string;
}

Source: src/pr/brand/AdjustWalletDialog.tsx (line 39)

WarehouseDetails

Where brands send gifts.

export interface WarehouseDetails {
  address: string;
  /** "Sun–Thu · 10:00–17:00". */
  hours: string;
  phone: string;
}

Source: src/pr/gifts/Warehouse.tsx (line 37)

Kit

BarDatum

export interface BarDatum {
  label: string;
  value: number;
}

Source: src/kit/Charts.tsx (line 5)

ButtonVariant

The look a Button or ButtonLink takes.

export type ButtonVariant = 'default' | 'ink' | 'rasp' | 'white' | 'ghost' | 'lime' | 'on-dark' | 'danger' | 'ok';

Source: src/kit/primitives/Button.tsx (line 7)

CardHeadingLevel

The heading level of a card title: 2 by default (a card under the page's h1).

export type CardHeadingLevel = 2 | 3 | 4 | 5 | 6;

Source: src/kit/patterns/Card.tsx (line 14)

CellType

Cell types; chk is the list's own selection column (see selection).

export type CellType = 'main' | 'text' | 'num' | 'chip' | 'code' | 'link' | 'btns';

Source: src/kit/patterns/RowList.tsx (line 11)

ChartTone

export type ChartTone = 'rasp' | 'rasp-soft' | 'track' | 'butter' | 'lime' | 'sky' | 'ink';

Source: src/kit/patterns/Gauge.tsx (line 4)

Column

export interface Column<R> {
  id: string;
  /** Column header; also the cell's label in the < 860px card layout. */
  header: string;
  type: CellType;
  /** A grid track, default `minmax(0, 1fr)`. */
  width?: string;
  /** `num` only: good / bad / muted colour. The text carries the meaning, the tone only repeats it. */
  tone?: 'good' | 'bad' | 'mut';
  /** Span both card columns below 860px (`main` always does). */
  full?: boolean;
  /** A money column: its header (and its < 860px card label) gets the figure's "?" note. */
  figure?: MoneyFigureKey;
  /**
   * The header drawn as the mock's dotted `.term` (a MoneyNote or a Term around the label) instead of
   * `header` + "?"; `header` stays the card label and the plain name. A sortable column cannot nest the term's
   * button in its sort button: it draws `header` in the sort button and, unless the term is plain text, the "?" beside.
   */
  term?: ReactNode;
  /**
   * Makes the header a sort button for this server-side key (RowList `sort` + `onSort` must be set too).
   * The first click sorts a `num` column descending and any other ascending; a second click flips it.
   * @deprecated Since 0.2.0: a sortable list is a `DataTable` (its column `sortKey`); RowList stays the plain,
   * non-sortable list. Still works; removed once the Brand Console has moved (MIGRATION.md).
   */
  sortKey?: string;
  /**
   * BRICKS addition: overrides the first-click order above (default: `num` descending, others ascending).
   * @deprecated Since 0.2.0: use `DataTable` and its column `sortFirst`.
   */
  sortFirst?: SortDir;
  cell: (row: R) => ReactNode;
}

Source: src/kit/patterns/RowList.tsx (line 13)

DataColumn

export interface DataColumn<T> {
  key: string;
  /** The header. A string also labels the cell in the < 860px stacked cards; otherwise set `cardLabel`. */
  label: ReactNode;
  cardLabel?: string;
  /** Makes the header a sort button for this key (the server's / useListState's sort name). */
  sortKey?: string;
  /** The order a first click on this header sorts in; default high → low (the mock: `asc` columns start A–Z). */
  sortFirst?: SortDir;
  /** `end` for figures (tabular digits), `center` for rings and follower cells. */
  align?: 'start' | 'end' | 'center';
  render: (row: T) => ReactNode;
  /** A CSS width for the column (e.g. '30%', '120px'). */
  width?: string;
  /** A money column: its header gets the figure's "?" note (beside the sort button, never inside it). */
  figure?: MoneyFigureKey;
  /**
   * A tip for a non-money header ("Score"): the label is drawn as a dotted `<Term>` with this tip, and a sortable
   * column keeps its sort button beside it ("Sort by Score", from `cardLabel` or the string label), so no button nests another.
   */
  tip?: ReactNode;
  /** `'muted'`: the cells are 12px and grey (a date, a secondary figure), the mock's `.muted`. Default `'default'`. */
  tone?: 'default' | 'muted';
  /**
   * Under 860px (stacked cards): this cell spans the whole card and drops its column label (the creator or product
   * cell). Default: the first column spans.
   */
  primary?: boolean;
  /**
   * Under 860px, with a `primary` column: this cell keeps its own width and shares the primary cell's row (a rank
   * medal before the creator).
   */
  inline?: boolean;
}

Source: src/kit/patterns/DataTable.tsx (line 12)

DataSort

export interface DataSort {
  key: string;
  dir: SortDir;
}

Source: src/kit/patterns/DataTable.tsx (line 47)

DetailsBar

One row of a DetailsBars list (and of a DetailsDrawer section's bars).

export interface DetailsBar {
  label: ReactNode;
  value: ReactNode;
  /** 0–100 bar width. */
  percent: number;
  icon?: ReactNode;
  /** A muted line part after the label ("· 12.4K followers"); drawn by the `'stacked'` bars only. */
  note?: ReactNode;
}

Source: src/kit/patterns/DetailsBars.tsx (line 5)

DetailsHero

export interface DetailsHero {
  tone?: DrawerTone;
  /** A large Avatar. */
  avatar?: ReactNode;
  title: ReactNode;
  subtitle?: ReactNode;
  /** Tier / niche chips under the name. */
  chips?: ReactNode;
  /** One highlighted line under the chips (e.g. "Top 10% seller"). */
  badge?: ReactNode;
}

Source: src/kit/patterns/DetailsDrawer.tsx (line 10)

DetailsRanked

export interface DetailsRanked {
  rank: number;
  lead?: ReactNode;
  title: ReactNode;
  subtitle?: ReactNode;
  /** Omit when the row has no figure: no empty cell is drawn. */
  value?: ReactNode;
}

Source: src/kit/patterns/DetailsDrawer.tsx (line 31)

DetailsSection

One block of the drawer body; set whichever of rows / bars / ranked / content it needs (drawn in that order).

export interface DetailsSection {
  title?: ReactNode;
  rows?: ReadonlyArray<{ label: ReactNode; value: ReactNode }>;
  /** Columns of the rows grid. */
  columns?: 1 | 2 | 3;
  bars?: ReadonlyArray<DetailsBar>;
  ranked?: ReadonlyArray<DetailsRanked>;
  content?: ReactNode;
}

Source: src/kit/patterns/DetailsDrawer.tsx (line 41)

DetailsTile

export interface DetailsTile {
  value: ReactNode;
  label: ReactNode;
  tone?: DrawerTone;
}

Source: src/kit/patterns/DetailsDrawer.tsx (line 22)

DialogProps

export interface DialogProps {
  open: boolean;
  /** Escape, the scrim, and the close button all come here. */
  onClose: () => void;
  title: ReactNode;
  /** Default: the BricksProvider's language. */
  language?: Lang;
  hint?: ReactNode;
  /** Before the title (drawer: an avatar); after it (a chip) goes in `aside`. */
  lead?: ReactNode;
  aside?: ReactNode;
  footer?: ReactNode;
  children: ReactNode;
  /**
   * The app root to make inert while open (useModalLock); pass it when the dialog renders outside
   * that root. Without it the dialog makes everything outside itself inert and aria-hidden while it is open (every
   * child of document.body but the one holding it, and the dialog's other ancestors' siblings), and gives it back on
   * close before focus returns to the opener; nested, only the outermost open dialog does this.
   */
  inertRef?: RefObject<HTMLElement | null>;
  /**
   * v3 (BUG-2): the body shows one skeleton instead of `children` while the drawer's data loads. The dialog itself
   * stays the same mounted node from the click to the content, so it slides in once (useDrawerResource).
   */
  loading?: boolean;
  /**
   * The title stays the dialog's accessible name but is not drawn (a drawer whose body starts with its own head tile:
   * ChallengeDetail, CreatorProfilePanel); the close button's row then sits 8px tighter on the content.
   */
  hideTitle?: boolean;
  /** Extra classes on the dialog element (a composition's own look). Default: none. */
  className?: string;
}

Source: src/kit/Dialog.tsx (line 8)

DrawerTone

export type DrawerTone = 'lime' | 'rasp' | 'butter' | 'sky' | 'lilac' | 'plain';

Source: src/kit/patterns/DetailsDrawer.tsx (line 8)

FilterOption

export interface FilterOption<T extends string> {
  value: T;
  label: string;
  count?: number;
}

Source: src/kit/patterns/FilterChips.tsx (line 5)

FormFieldAs

What the field wraps: one native control ('field'), or a set of controls or no control at all ('group', 'fieldset').

export type FormFieldAs = 'field' | 'group' | 'fieldset';

Source: src/kit/patterns/FormField.tsx (line 5)

GaugeSegment

export interface GaugeSegment {
  value: number;
  label: string;
  tone: ChartTone;
  /** What the legend shows in place of the plain label (a term with its tooltip). */
  legend?: ReactNode;
}

Source: src/kit/patterns/Gauge.tsx (line 11)

HBarRow

export interface HBarRow {
  /** The row's key, when two rows may share a label (two challenges named the same). Default: the label. */
  id?: string | number;
  label: string;
  value: number;
  /**
   * The value shown at the end: text, or a node such as `<Money value="184300.00" compact />` (so Arabic gets its own
   * currency word).
   */
  display: ReactNode;
  /** The bar colour (the mock colours each challenge); raspberry by default. */
  tone?: ChartTone;
  /** v3, with `onSelect`: false keeps this row plain (Always-on has no challenge to open). */
  selectable?: boolean;
}

Source: src/kit/Charts.tsx (line 41)

HBarsVariant

HBars' layout: 'rows' soft tiles (label · bar · value on one line) or 'stacked' (label and value over a full-width bar).

export type HBarsVariant = 'rows' | 'stacked';

Source: src/kit/Charts.tsx (line 58)

IconName

export type IconName = keyof typeof ICONS;

Source: src/kit/primitives/Icon.tsx (line 59)

KeyValueItem

export interface KeyValueItem {
  key?: string;
  label: ReactNode;
  /** The value, in bold. Optional when `control` is given. */
  value?: ReactNode;
  /**
   * An editable value (a Switch, a field), drawn in place of the bold `value`. Named by the row's label: a
   * `<Switch rowLabelled>` anywhere inside (wrapped or not) reads it, and a top-level native control that does not name
   * itself gets `aria-labelledby` its `<dt>`.
   */
  control?: ReactNode;
  /** A setting the platform owns: read-only, said in words (the provider's `keyValue.locked`, "Managed by TRNDR"). */
  locked?: boolean;
  /** A money value: the label becomes the figure's "?" term (MoneyNote), as RowList's column `figure` does. */
  figure?: MoneyFigureKey;
}

Source: src/kit/patterns/KeyValue.tsx (line 9)

KpiTone

export type KpiTone = 'lime' | 'rasp' | 'butter' | 'sky' | 'lilac';

Source: src/kit/patterns/KpiCard.tsx (line 6)

LegendItem

export interface LegendItem {
  key: string;
  label: ReactNode;
  /** The value as shown (a formatted money string, a count). */
  display: ReactNode;
  tone: ChartTone;
}

Source: src/kit/patterns/StackBar.tsx (line 6)

ListToolbarSort

export interface ListToolbarSort<S extends string> {
  value: S;
  options: ReadonlyArray<ToolbarSortOption<S>>;
  /** A pick; `dir` is the option's own starting order when it has one (set it with the field). */
  onChange: (value: S, dir?: SortDir) => void;
  dir: SortDir;
  onFlip: () => void;
  /** The visible label; default "Sort by". */
  label?: string;
}

Source: src/kit/patterns/ListToolbar.tsx (line 28)

MoneyFigureKey

export type MoneyFigureKey = (typeof MONEY_FIGURES)[number];

Source: src/kit/MoneyNote.tsx (line 49)

MoneyNoteVariant

How a MoneyNote that wraps a label draws it: 'term' the label dotted-underlined (the money contract's look), 'plain' the label as plain text that still opens the note (no underline), 'icon' the label as plain text with the small "?" after it. In every style the note stays reachable by keyboard and screen reader.

export type MoneyNoteVariant = 'term' | 'plain' | 'icon';

Source: src/kit/moneyNoteStyle.ts (line 8)

MutedSize

'sm': 12px (the mock's .muted). 'md': 13px (a muted line under a 15px name). 'inherit': the surrounding size.

export type MutedSize = 'sm' | 'md' | 'inherit';

Source: src/kit/primitives/Muted.tsx (line 6)

NotificationItem

export interface NotificationItem {
  id: string | number;
  /** The sentence; may hold <b> for the name ("TRNDR approved <b>Karim Hosny</b>'s join request."). */
  text: ReactNode;
  /** "2 hours ago". */
  when: ReactNode;
  /** The row's glyph. Default: `'bell'` (rows before the server sends a category). */
  icon?: IconName;
  /** The glyph's tile colour. Default: `'sky'`. */
  tone?: KpiTone;
  unread: boolean;
}

Source: src/kit/patterns/NotificationsMenu.tsx (line 10)

PageGridSplit

A two-column split on the mock's 12-column grid: main column, then side column ('8-4': 8 and 4 of 12).

export type PageGridSplit = '8-4' | '7-5' | '6-6';

Source: src/kit/patterns/PageGrid.tsx (line 5)

Platform

export type Platform = 'instagram' | 'tiktok' | 'youtube';

Source: src/kit/primitives/PlatformPill.tsx (line 6)

ProofItem

export interface ProofItem {
  id: string | number;
  /** Who or what the proof is for ("Laila Saeed", "Card top-up"). */
  title: ReactNode;
  /** A line under it ("Bank transfer · ref 88412 · 11 Nov 2026"). */
  sub?: ReactNode;
  /** The amount, shown at the end (a <Money>). */
  amount?: ReactNode;
  /** Plain words naming this proof for AT ("Laila Saeed, ref 88412"). */
  context: string;
  /** Opens the proof modal; or `href` opens the receipt file in a new tab. */
  onOpen?: () => void;
  href?: string;
}

Source: src/kit/patterns/ProofList.tsx (line 8)

RankItem

export interface RankItem {
  id: string | number;
  /** The person or product cell (CreatorCell, or a ProductThumb + name). */
  lead: ReactNode;
  /** The figure at the end (a <Money compact>, "201 orders"). */
  value: ReactNode;
  /** With `max` on the list: draws a "vs #1" ShareBar under the value. */
  amount?: number;
}

Source: src/kit/patterns/RankList.tsx (line 7)

Selection

export interface Selection<R> {
  selected: ReadonlySet<string | number>;
  onChange: (next: Set<string | number>) => void;
  /** Names the row in its checkbox: "Select {name}". */
  rowLabel: (row: R) => string;
}

Source: src/kit/patterns/RowList.tsx (line 47)

Series

export type Series = ReadonlyArray<number | null>;

Source: src/kit/patterns/Charts.tsx (line 6)

SortDir

export type SortDir = 'asc' | 'desc';

Source: src/kit/patterns/RowList.tsx (line 54)

SortOption

Deprecated

Since 0.2.0: ListToolbar sort.options takes [key, label, dir].

export interface SortOption { key: string; dir: 'asc' | 'desc'; label: string }

Source: src/kit/patterns/SortSelect.tsx (line 7)

SortState

Deprecated

Since 0.2.0: RowList sorting is deprecated; DataTable takes a DataSort (the same shape).

export interface SortState { key: string; dir: SortDir }

Source: src/kit/patterns/RowList.tsx (line 56)

SortValue

Deprecated

Since 0.2.0: ListToolbar sort has value and dir.

export interface SortValue { key: string; dir: 'asc' | 'desc' }

Source: src/kit/patterns/SortSelect.tsx (line 9)

SparkTone

export type SparkTone = 'lime' | 'rasp' | 'butter' | 'sky';

Source: src/kit/patterns/Charts.tsx (line 7)

StackPart

export interface StackPart extends LegendItem {
  /** The raw figure (a 2-dp string or a count), used only for the bar's share. */
  value: string | number;
}

Source: src/kit/patterns/StackBar.tsx (line 14)

StackPerson

export interface StackPerson {
  id: number;
  name: string;
  avatarUrl?: string | null;
}

Source: src/kit/primitives/AvatarStack.tsx (line 7)

Step

export interface Step {
  label: ReactNode;
  done: boolean;
  /** Passed over (a return window that did not apply): a dash marker, muted, read "skipped". Default: `false`. */
  skipped?: boolean;
  /** When it happened ("13 Nov 2026"), shown under a step. */
  when?: ReactNode;
}

Source: src/kit/primitives/StepTimeline.tsx (line 8)

StrongTone

The colour of an inline emphasis: bad raspberry (an alert: "low (17% left)"), ok green.

export type StrongTone = 'bad' | 'ok';

Source: src/kit/primitives/Strong.tsx (line 5)

Tier

The TRNDR preset's tier keys. A provider's tiers table may name others.

export type Tier = keyof typeof TRNDR_TIERS;

Source: src/kit/primitives/TierBadge.tsx (line 8)

TileTone

export type TileTone = 'lime' | 'rasp' | 'butter' | 'sky' | 'lilac' | 'plain';

Source: src/kit/patterns/Tile.tsx (line 5)

TimelineEvent

export interface TimelineEvent {
  id: string | number;
  tone: keyof typeof DOT;
  title: ReactNode;
  at: ReactNode;
  detail?: ReactNode;
}

Source: src/kit/patterns/Timeline.tsx (line 7)

ToastMessage

export interface ToastMessage {
  /** A concrete outcome sentence: "Approved. Sara gets a WhatsApp." */
  message: string;
  actionLabel?: string;
  onAction?: () => void;
}

Source: src/kit/Toast.tsx (line 7)

ToolbarSelect

export interface ToolbarSelect {
  id: string;
  /** Read by AT; the first option ("All tiers") is what sighted users see as the label. */
  label: string;
  value: string;
  options: ReadonlyArray<readonly [string, string]>;
  onChange: (value: string) => void;
}

Source: src/kit/patterns/ListToolbar.tsx (line 13)

ToolbarSortOption

One "Sort by" choice: [value, label], or [value, label, dir] where dir is the order picking it starts in (Name A–Z asc, Sales high to low desc), as SortSelect's options had.

export type ToolbarSortOption<S extends string> = readonly [S, string] | readonly [S, string, SortDir];

Source: src/kit/patterns/ListToolbar.tsx (line 26)

WalletFigures

The wallet's figures as the server sends them (2-dp strings); the block maps E1 onto this.

export interface WalletFigures {
  available: string;
  balance: string;
  held: string;
  toppedUp?: string;
  /** The last top-up's amount: the track's 100 %. Null before the first top-up. */
  lastTopup: string | null;
  /** Server-computed share of the last top-up still available (0–100), null without a top-up. */
  leftPercent: number | null;
  low: boolean;
}

Source: src/kit/patterns/HeroCard.tsx (line 13)

Provider, presets and library

BricksConfig

What a BricksProvider gives the components below it (every field resolved).

export interface BricksConfig {
  /** The language a component uses when it is not given a `language` prop. */
  language: Lang;
  /** StatusPill's table: status key → tone and labels. */
  statuses: Readonly<Record<string, StatusDef>>;
  /** TierChip / TierBadge's table: tier key → labels (and colours). */
  tiers: Readonly<Record<string, TierDef>>;
  /** The tier a creator with no tier yet is shown with; null shows nothing. */
  defaultTier: string | null;
  currency: CurrencyDef;
  /** The money "?" dictionary (figure key → label, includes, excludes), already in the page's language. */
  moneyNotes: MoneyNotes;
  /** Every kit component's words, defaults and overrides merged. */
  labels: KitCopyTable;
  /** The overrides for the packages' components (shell, blocks, pr); their defaults live beside each component. */
  packageLabels: PackageLabelOverrides;
  /**
   * Status tables a package reads by name, apart from StatusPill's `statuses` (whose keys mean the brand console's
   * states): `pr` is the PR portal's (PrStatusPill). Same shape as `statuses`.
   */
  statusTables: Readonly<Record<string, Readonly<Record<string, StatusDef>>>>;
  /** The formatter money components use: `currency.format`, or the kit's with `currency.label`. */
  formatMoney: MoneyFormatter;
  /** How every money figure is shown unless its slot or component says otherwise (over each slot's default). */
  money: MoneyDisplay;
  /** How one money slot is shown app-wide (`'walletLedger.entry'`), over `money`; a component's `money` prop wins. */
  moneyFor: MoneyFor;
  /**
   * The platforms the app works with. Follower totals, platform glyphs and rows, and the challenge form's platform
   * options only use these, always in the kit's order (Instagram, TikTok, YouTube). Default: all three.
   */
  platforms: ReadonlyArray<Platform>;
}

Source: src/lib/config.ts (line 42)

BricksPreset

A preset: a starting point for BricksProvider. Anything left out takes the generic core default.

export interface BricksPreset {
  language?: Lang;
  statuses?: Readonly<Record<string, StatusDef>>;
  tiers?: Readonly<Record<string, TierDef>>;
  defaultTier?: string | null;
  currency?: CurrencyDef;
  moneyNotes?: MoneyNotes;
  labels?: LabelOverrides;
  statusTables?: Readonly<Record<string, Readonly<Record<string, StatusDef>>>>;
  /**
   * Money display for everything (`{ showCurrency: false }`), over each slot's default. A nested provider's `money`
   * is laid field by field over its parent's.
   */
  money?: MoneyDisplay;
  /**
   * Money display for single slots app-wide, keyed `component.slot` (`MoneySlot`):
   * `{ 'walletLedger.entry': { showCurrency: true } }`. Wins over `money`; a component's own `money` prop wins over it.
   */
  moneyFor?: MoneyFor;
  /**
   * The platforms the app works with (`['instagram', 'tiktok']` drops YouTube everywhere below). Replaces the parent's
   * list. Default: all three.
   */
  platforms?: ReadonlyArray<Platform>;
}

Source: src/lib/config.ts (line 77)

ConsoleStatus

Deprecated

Since 0.2.0: use keyof typeof TRNDR_STATUSES, or string with the provider's statuses. Removed in 1.0.

export type ConsoleStatus = keyof typeof CONSOLE_STATUSES;

Source: src/lib/status.ts (line 34)

CreatorIdentityProjection

What PersonCell needs to draw a person: a handle, their social links and a picture.

export interface CreatorIdentityProjection {
  handle: string | null;
  invitedByYou: boolean;
  links: { instagram: string | null; tiktok: string | null } | null;
  avatarUrl: string | null;
}

Source: src/lib/types.ts (line 12)

CreatorStatus

A creator's state in this store's program (decision Q8): no "paused" state exists in the domain.

export type CreatorStatus = 'active' | 'removed' | 'on_hold';

Source: src/lib/status.ts (line 5)

CurrencyDef

export interface CurrencyDef {
  /** The ISO code ("EGP"). */
  code: string;
  /** The word shown with a figure, per language ("EGP" / "ج.م"); before the figure in English, after it in Arabic. */
  label: Readonly<Record<Lang, string>>;
  /** Replaces the kit's formatter (grouping, sign, compact K / M, the label's place). */
  format?: MoneyFormatter;
}

Source: src/lib/config.ts (line 32)

FormatMoneyOptions

formatMoney's options: the language, the currency word and the display options.

export interface FormatMoneyOptions extends MoneyDisplay {
  /** Where the currency word goes: before the figure in English, after it in Arabic. */
  language: Lang;
  /** The currency word per language; an empty word shows none. Default: the TRNDR preset's (EGP / ج.م). */
  currency?: Readonly<Record<Lang, string>>;
}

Source: src/lib/format.ts (line 84)

KitCopy

Every word the kit's components draw, keyed by component, in English and Arabic. These are the generic built-in defaults; a BricksProvider labels override (or a preset's) replaces any of them per component and language. Brand words (a product name, a currency) never live here: they come from a preset (preset/trndr.ts).

export interface KitCopy {
  pager: {
    /** The nav's name: "Creators pages". */
    pages: (label: string) => string;
    /** "Showing 11–20 of 304" (Pager `perPage`). */
    showing: (from: string, to: string, total: string) => string;
    /** "Page 2 of 7 · 164 in total": the summary when the rows per page are not known. */
    summary: (page: number, lastPage: number, total: number) => string;
    /** A list on one page: "7 items". */
    items: (n: number) => string;
    previous: string;
    next: string;
    page: (n: number) => string;
  };
  listState: { retry: string; loading: string };
  saveBar: { unsaved: string; discard: string; save: string; saving: string };
  toolbar: { reset: string };
  listToolbar: {
    search: string; sortBy: string; flipTitle: string; flip: (dir: 'asc' | 'desc') => string; reset: string;
    /** The phone "Filters" button (`collapseFiltersBelow`), with how many selects are set. */
    moreFilters: (active: number) => string;
  };
  dataTable: {
    nothing: string; clear: string; retry: string; all: string; one: (name: string) => string; loading: string;
    /** The arrow-only sort button beside a tipped header (DataColumn.tip): "Sort by Score". */
    sortBy: (column: string) => string;
  };
  rowList: { all: string; one: (name: string) => string };
  sortSelect: { dir: (dir: 'asc' | 'desc') => string };
  personCell: { creator: string };
  notifications: {
    title: string;
    bell: (n: number) => string;
    fresh: (n: number) => string;
    markAll: string;
    unread: string;
    none: string;
    seeAll: string;
    /** `status="loading"` with nothing to show yet. */
    loading: string;
    /** `status="error"`. */
    failed: string;
    /** The error's button (`onRetry`). */
    retry: string;
  };
  heroCard: { available: string; forCreators: string; low: (percent: number) => string; balance: string; held: string; topped: string };
  proofList: { none: string };
  /** `view`: "View proof"; `download`: ProofButton `kind="download"`. */
  proofButton: { view: string; download: string; receipt: string };
  /** ButtonLink `external`: read after the link's words. */
  buttonLink: { newTab: string };
  keyValue: { locked: string };
  charts: { noData: string };
  dialog: { close: string; loading: string };
  toast: { close: string };
  bulkBar: { region: string; none: string; count: (n: number) => string };
  copyLink: { copy: (url: string) => string; done: string; failed: string };
  couponChip: { copy: (code: string) => string; done: string; failed: string };
  asyncBlock: { retry: string };
  /**
  // … 14 more lines in the source

Source: src/lib/copy.ts (line 11)

KitCopyKey

export type KitCopyKey = keyof KitCopy;

Source: src/lib/copy.ts (line 86)

LabelOverrides

What a BricksProvider / preset labels takes: kit and package components alike, only what changes.

export type LabelOverrides = KitLabelOverrides & PackageLabelOverrides;

Source: src/lib/copy.ts (line 111)

Lang

export type Lang = 'ar' | 'en';

Source: src/lib/format.ts (line 4)

MoneyDecimals

How many decimals a money figure shows: 2 always, 0 (rounded half away from zero, on whole cents), or 'auto': the cents only when they are not ".00" ("43,390", "1,200.50").

export type MoneyDecimals = 0 | 2 | 'auto';

Source: src/lib/format.ts (line 62)

MoneyDisplay

How a money figure is shown (owner decision 1). Every field is optional: a component resolves the rest from its money prop, then the BricksProvider's moneyFor[slot], then its money, then the slot's default (MONEY_SLOT_DEFAULTS). The maths is on BigInt cents; no float ever touches a shown figure.

export interface MoneyDisplay {
  /** Show the currency word: "EGP 27,645.00" / "27,645.00 ج.م" (true), or the figure alone, "27,645.00" (false). */
  showCurrency?: boolean;
  /** `2`, `0` (rounded half away from zero) or `'auto'` (cents only when non-zero). Ignored while `compact` is on. */
  decimals?: MoneyDecimals;
  /** K / M with one decimal from 1,000 ("EGP 184.3K", "EGP 11.2M"); whole units under 1,000 ("EGP 999"). */
  compact?: boolean;
  /**
   * `'negative'`: only money out carries a sign ("− 61,200.00"); `'always'`: money in does too ("+ 250,000.00").
   * A figure shown as zero never carries one.
   */
  sign?: 'negative' | 'always';
}

Source: src/lib/format.ts (line 69)

MoneyFor

BricksProvider moneyFor: display options for single slots app-wide, e.g. { 'walletLedger.entry': { showCurrency: true } }.

export type MoneyFor = Partial<Record<MoneySlot, MoneyDisplay>>;

Source: src/lib/moneyDisplay.ts (line 107)

MoneyFormatter

Formats a server 2-dp money string for display ("EGP 1,234.50"); '—' for a missing value. Components pass the slot's resolved MoneyDisplay (currency shown, decimals, compact, sign) with the language.

export type MoneyFormatter = (value: string | null | undefined, options: { language: Lang } & MoneyDisplay) => string;

Source: src/lib/config.ts (line 30)

MoneyNotes

Notes keyed by figure name, already in the page's language.

export type MoneyNotes = Readonly<Record<string, MoneyNoteText>>;

Source: src/lib/types.ts (line 9)

MoneyNoteText

One money figure's "?" note: what the figure includes and what it leaves out.

export interface MoneyNoteText {
  label: string;
  includes: string;
  excludes: string;
}

Source: src/lib/types.ts (line 2)

MoneyParts

A figure's sign ("− ", "+ " or "") and its digits ("27,645.00", "184.3K"), without the currency word.

export interface MoneyParts {
  /** "− " (U+2212 and a space), "+ " or "". */
  sign: string;
  /** Grouped Western digits, with the cents, K or M as the display asks. */
  digits: string;
}

Source: src/lib/format.ts (line 92)

MoneySlot

A BricksProvider moneyFor key: one money slot, component.slot (type-checked against MONEY_SLOTS).

export type MoneySlot = keyof typeof MONEY_SLOTS;

Source: src/lib/moneyDisplay.ts (line 104)

MoneySlotsOf

The money prop of a component with several slots, keyed by the part after the dot: MoneySlotsOf<'walletLedger'> is { total?, entry?, balance? }.

export type MoneySlotsOf<C extends string> = { [K in MoneySlot as K extends `${C}.${infer S}` ? S : never]?: MoneyDisplay };

Source: src/lib/moneyDisplay.ts (line 113)

PackageCopy

The words of the packages built on the kit (shell, blocks, pr), keyed by component like KitCopy. Their defaults stay beside each component (they are long and only that component reads them); this registry only names the keys and shapes, so a BricksProvider labels override (or a preset's) can reach them as it reaches the kit's. Precedence in a component: its default table, then the provider's labels, then the component's own labels / copy prop.

export interface PackageCopy extends BlocksCopy, PrCopy {
  shell: ShellCopy;
}

Source: src/lib/copy.ts (line 101)

PackageCopyKey

export type PackageCopyKey = keyof PackageCopy;

Source: src/lib/copy.ts (line 105)

PillTone

The mock's pill tones (.p-ok, .p-warn, …).

export type PillTone = 'ok' | 'warn' | 'bad' | 'mute' | 'sky' | 'lime' | 'lilac';

Source: src/lib/status.ts (line 24)

ResolvedMoneyDisplay

A MoneyDisplay with every field set: what a slot resolves to and what Money is finally given.

export type ResolvedMoneyDisplay = Required<MoneyDisplay>;

Source: src/lib/moneyDisplay.ts (line 4)

StatusDef

One status word: its pill tone and its label in each language.

export interface StatusDef {
  tone: PillTone;
  en: string;
  ar: string;
}

Source: src/lib/config.ts (line 9)

TierDef

One tier: its label in each language and, optionally, its chip colours. Without bg / ink the chip takes the theme tokens --tier-<key>-bg / --tier-<key>-ink (tokens.css has rising, established, influential and elite).

export interface TierDef {
  en: string;
  ar: string;
  bg?: string;
  ink?: string;
}

Source: src/lib/config.ts (line 19)

WalletHealth

A brand wallet's health, as the server reports it. One type for the brand blocks (WalletHealthCard) and the PR blocks (WalletHealthPill, BrandWalletCard, brandColumns): - ok: above the program's low line; - low: at or under the low line (the share of the last top-up still available); - negative: below zero, inside the grace days; - paused: below zero past the grace days; the brand's coupons are paused until it tops up.

export type WalletHealth = 'ok' | 'low' | 'negative' | 'paused';

Source: src/lib/walletHealth.ts (line 9)

Shell

A run of items. heading draws a small group title (the PR portal's "Campaigns"); collapsible turns the heading into a disclosure button (the console's "More"), open by default while one of its items is active.

export interface NavGroup {
  id: string;
  heading?: NavLabel;
  items: ReadonlyArray<NavItem>;
  collapsible?: boolean;
  /** The disclosure's icon (collapsible groups). */
  icon?: IconName | ReactNode;
  /** Open on first render (collapsible groups); an active item inside always opens it. */
  defaultOpen?: boolean;
}

Source: src/shell/types.ts (line 39)

One destination in the nav. Data only: the app decides what an id means. With href it renders a link (the app's router may still intercept the click through onSelect); without one, a button.

export interface NavItem {
  id: string;
  label: NavLabel;
  /** A kit icon name (the mock's own glyphs) or any element (a lucide icon for screens the mock lacks). */
  icon?: IconName | ReactNode;
  /** The waiting-work count; nothing shows for 0 or undefined. Above 999 it reads "999+". */
  count?: number;
  /** A red count (overdue reviews, open fraud): only work that is late. */
  hot?: boolean;
  /** A small pill after the label, shown instead of the count: `new` (lime "NEW") or `soon` (muted "LATER"). */
  badge?: { label: NavLabel; tone: 'new' | 'soon' };
  href?: string;
  /** Called on click, before the nav's own `onSelect`. */
  onSelect?: () => void;
  /** Shown but not reachable (the PR portal's "Next sprint" items). */
  disabled?: boolean;
  /** A child of the item above it: indented, no icon (the PR portal's Campaigns items). */
  indent?: boolean;
}

Source: src/shell/types.ts (line 15)

A label in both languages, or one string used for both (a brand name, a handle).

export type NavLabel = string | Readonly<{ en: string; ar: string }>;

Source: src/shell/types.ts (line 6)

SearchFetcher

Fetches the results for a term; abort when signal fires (a newer term was typed). Reject to show the error line.

export type SearchFetcher = (term: string, signal: AbortSignal) => Promise<ReadonlyArray<SearchResult>>;

Source: src/shell/HeaderSearch.tsx (line 19)

SearchResult

export interface SearchResult {
  /** Unique across all groups. */
  id: string;
  label: ReactNode;
  sub?: ReactNode;
  /** The group it is listed under (a key of `groupLabels`); results without one are listed first, unheaded. */
  group?: string;
}

Source: src/shell/HeaderSearch.tsx (line 9)

ShellBrand

The sidebar's brand block: the square mark, the name and a small line under it.

export interface ShellBrand {
  /** The 38px square (default: the first letter of `label`). */
  mark?: ReactNode;
  /** The name as drawn; wrap a part in `<span className="kit-shell-accent">` for the lime dot of "TRNDR.". */
  name: ReactNode;
  /** The plain-text name: the rail's tooltip and the sheet's title. */
  label: string;
  tagline?: ReactNode;
}

Source: src/shell/types.ts (line 54)

ShellCopy

export type ShellCopy = typeof en;

Source: src/shell/copy.ts (line 39)

ShellState

export interface ShellState {
  /** The tier the shell is drawn for: `desktop` (>1024) full sidebar, `tablet` (860–1024) icon rail, `mobile` (<860). */
  tier: ViewportTier;
  /** Opens the phone nav sheet; null above the phone tier (so the header shows no menu button there). */
  openNav: (() => void) | null;
  /** The phone nav sheet is open. */
  navOpen: boolean;
}

Source: src/shell/context.ts (line 4)

TopbarMenuItem

export interface TopbarMenuItem {
  id: string;
  label: ReactNode;
  /** A muted second line (the PR portal's "New" menu: "Target or leaderboard"). */
  sub?: ReactNode;
  icon?: IconName | ReactNode;
  href?: string;
  /** Opens `href` in a new tab (an outside page: the contact chat). */
  external?: boolean;
  onSelect?: () => void;
  /** Keep the menu open after this item (an inline status follows, like "Link copied"). */
  keepOpen?: boolean;
}

Source: src/shell/TopbarMenu.tsx (line 10)

UsageTone

export type UsageTone = 'ok' | 'warn' | 'bad';

Source: src/shell/UsageMeter.tsx (line 7)

On this page

Data and hooksActionFailureActionFnActionOptionsActionResultActionSpecActionStateCodeMessagesDataErrorDebouncedCallbackDrawerResourceErrorBagHttpClientHttpClientOptionsHttpMethodHttpWriteOptionsListFetcherOptionsListPageListQueryListSortDirListStateOptionsListStateResultPageAdapterPagedOptionsPagedResultPageInfoParamsParamValueRequestOptionsResourceErrorResourceOptionsResourceStateResourceStatusUrlLocationUrlPatchUrlSortUrlSortDirUrlSortOptionsUrlSortStateUrlStateSetterUrlWriteOptionsUseResourceResultViewportTierBlocksActivityEventActivityLogCopyBlockPersonBlocksCopyBlockStatusBlockToneBonusCopyBonusProgressBrandMessageBundleCopyBundleGridCopyBundlePayMethodBundlePurchaseCopyBundleResultBundleResultCopyCalloutToneChallengeCopyChallengeDetailCopyChallengeFiguresChallengeRequestCopyChallengeRequestValueChallengeStatusChallengeTopCreatorCommissionCopyCommissionErrorOptionsCommissionKindCommissionLimitsCommissionRangeCommissionRateFormCopyLinkCopyDefaultableChoicePropsDefaultableCopyDefaultableNumberPropsDefaultableSwitchPropsFindCardCopyFindCreatorFindStatFollowersGiftPickGiftProductGiftProductsCopyGiftRuleKeyGiftRulesGiftRulesCopyGiftStockCopyGiftStockItemGroupCommissionGroupCopyGroupFormCopyGroupFormValueGroupMemberGroupPanelCopyHighlightKindLedgerEntryLedgerGroupLedgerViewLiveChallengeCopyMembersPickerCopyMessageAudienceKindMessageAudienceSummaryMessageHistoryCopyMessageHistoryListCopyMessageSentByMessageSentByFilterMessagesPanelCopyMyCreatorMyCreatorCopyPayoutBatchCopyPayoutLinePayoutWindowCopyProductCellCopyProfileCopyProfileCreatorProfileFactProfileTileProgressRowCopyProofLinkRequestGiftRowActionRowActionPresetRowActionsCopyRowActionToneRowItemSettingsSectionCopySpecialCommissionCopySpecialCommissionValueTopUpCopyTopUpResultTopUpResultCopyUgcBundleWalletHealthCopyWalletLedgerCopyPR PortalAudienceAudienceChoiceAudienceKindAuditAreaAuditEntryAuditToneBrandRowBuilderBrandCampaignChallengeCampaignChangeRequestCampaignColumnsOptionsCampaignRowChallengeAudienceValueChallengeBasicsValueChallengeDraftChallengeFieldChallengeFieldErrorsChallengeGoalValueChallengeIssueChallengeIssuesChallengePayoutValueChallengeRequestRowChallengeRowChallengeTableColumnsCopyChallengeTableColumnsOptionsChallengeTypeChannelOptionChoiceOptionCommissionChangeCommissionTextCopyCommissionTextFormatterCommissionTextOptionsComposerValueConfirmedGiftCreatorColumnsOptionsCustomerRateIssueCustomerRateSaveFigureItemFraudCaseFraudCaseStatusFraudDecisionFraudDecisionResultFraudEvidenceFraudMatchEvidenceFraudOrderEvidenceFraudSeverityFraudSignalFraudSignalKindGiftAttentionItemGiftBrandGiftBrandProductGiftBrandRowGiftBrandStockRowGiftCardLoadPropsGiftClaimCheckResultGiftClaimLineGiftClaimRowGiftClaimStatusGiftCountGiftProblemGiftShipmentFilterGiftShipmentLineGiftShipmentRowGiftShipmentStateGiftShipmentStatusGiftStockStatusJoinRequestRowLadderTierLeaderboardRowLoginValueMatrixGroupMatrixPermissionMatrixRoleMessageRowNewCreatorColumnsCopyNewCreatorColumnsOptionsNextCampaignOpenDecisionPayoutRowPickableCreatorPickCreatorPrAdjustWalletCopyPrBrandFeeCopyPrBrandGiftStockCopyPrBrandRequestCopyPrBuilderStepCopyPrCampaignChallengesCopyPrCampaignColumnsCopyPrChallengeBuilderCopyPrChallengeCardCopyPrChallengeDataPrChallengeGiftPickerCopyPrChallengeLeaderPrChallengeRequestsCopyPrChallengeRowPrChallengeStatusFilterCopyPrChallengeSummaryCopyPrChangeOwnerCopyPrChangeRequestsCopyPrChannelPrColumnsCopyPrCommissionChangeCopyPrCopyPrCountPillCopyPrCreatorColumnsCopyPrCreatorDrawerCopyPrCreatorListRowPrCreatorPickCopyPrCreatorRowPrCustomerCardCopyPrCustomerSwitchCopyPrDecisionsCardCopyPrDecisionTagCopyPrDrawerCreatorPrFraudCaseDetailCopyPrFraudCaseRowCopyPrFraudCopyPrFraudDecisionCopyPrGiftAnalyticsCopyPrGiftAttentionCopyPrGiftColumnsCopyPrGiftsCopyPrGiftShipmentCopyPrGiftSideCopyPrGiftStatusFilterCopyPrIconNamePrLeaderboardCopyPrLoginCardCopyPrLoginLayoutCopyPrMessageDrawerCopyPrMiniListCopyPrNewCreatorRowPrNextCampaignCopyPrNullableSalesCreatorRowPrOtpStepCopyPrOwnerOptionPrPersonPrPortalFrameCopyPrPortalNotificationsPrPortalSearchPrPortalUserPrProgramCardsCopyPrRecordGiftsCopyPrRequestCardsCopyPrRequestChallengeCopyPrScoreCopyPrSenderPickerCopyPrStatusPrTierPrTierChangeCopyPrTierLadderCopyPrTierMovesCopyPrTonePrUsageBarCopyPrWarehouseCopyReasonResultReceiptFileReceiptStateRecordedGiftsRequestGiftClaimScorePartScorePartKeySmsCountStackBrandSummaryGiftSummaryWarningTierChangeResultTierLadderOpenTierMoveTierThresholdTierThresholdRuleTopUpRowWalletAdjustmentWarehouseDetailsKitBarDatumButtonVariantCardHeadingLevelCellTypeChartToneColumnDataColumnDataSortDetailsBarDetailsHeroDetailsRankedDetailsSectionDetailsTileDialogPropsDrawerToneFilterOptionFormFieldAsGaugeSegmentHBarRowHBarsVariantIconNameKeyValueItemKpiToneLegendItemListToolbarSortMoneyFigureKeyMoneyNoteVariantMutedSizeNotificationItemPageGridSplitPlatformProofItemRankItemSelectionSeriesSortDirSortOptionSortStateSortValueSparkToneStackPartStackPersonStepStrongToneTierTileToneTimelineEventToastMessageToolbarSelectToolbarSortOptionWalletFiguresProvider, presets and libraryBricksConfigBricksPresetConsoleStatusCreatorIdentityProjectionCreatorStatusCurrencyDefFormatMoneyOptionsKitCopyKitCopyKeyLabelOverridesLangMoneyDecimalsMoneyDisplayMoneyForMoneyFormatterMoneyNotesMoneyNoteTextMoneyPartsMoneySlotMoneySlotsOfPackageCopyPackageCopyKeyPillToneResolvedMoneyDisplayStatusDefTierDefWalletHealthShellNavGroupNavItemNavLabelSearchFetcherSearchResultShellBrandShellCopyShellStateTopbarMenuItemUsageTone