Varje produkt har de här fälten. Valfria fält utelämnas när de är tomma.
id · string- Fast id, också slutet av adressen till produktsidan.
name · string- Produktnamn.
description · string- Beskrivning i en mening.
audience · string[]- Vem den är för: b2b, individual eller båda.
country · string- Ursprungsland.
website · uri- Produktens webbplats.
longDescription · string- Några stycken om produkten.
features · string[]- Viktigaste funktioner.
useCases · string[]- Ett till fyra id:n för användningsområden.
category · string- Kategori-id, som i /categories/{id}.
verified · boolean- valfritt · true när skaparen har verifierat ägandet; saknas annars.
logoUrl · uri- valfritt · Logotyp (PNG, JPEG eller WebP); saknas när det inte finns någon.
Samma sak som TypeScript-typer:
export interface Software {
/** Stable id, also the end of the product’s page address. */
id: string;
/** Product name. */
name: string;
/** One-sentence description. */
description: string;
/** Who it’s for: b2b, individual or both. */
audience: ("b2b" | "individual")[];
/** Country of origin. */
country: string;
/** The product’s website. */
website: string;
/** A few paragraphs about the product. */
longDescription: string;
/** Main features. */
features: string[];
/** One to four use-case ids. */
useCases: string[];
/** Category id, as in /categories/{id}. */
category: string;
/** true when the maker verified ownership; absent otherwise. */
verified?: true;
/** Logo (PNG, JPEG or WebP); absent when there is none. */
logoUrl?: string;
}
/** countries.json, GET /api/software/countries */
export type Countries = string[];
/** categories.json, GET /api/categories/counts */
export type CategoryCounts = Record<string, number>;
/** One entry of alternatives.json */
export interface Alternative {
tool: string;
name: string;
page: string;
ids: string[];
}