Každý produkt má tieto polia. Voliteľné sa vynechávajú, keď sú prázdne.
id · string- Stále id, zároveň koniec adresy stránky produktu.
name · string- Názov produktu.
description · string- Opis v jednej vete.
audience · string[]- Pre koho je: b2b, individual alebo oboje.
country · string- Krajina pôvodu.
website · uri- Web produktu.
longDescription · string- Pár odsekov o produkte.
features · string[]- Hlavné funkcie.
useCases · string[]- Jedno až štyri id prípadov použitia.
category · string- Id kategórie, ako v /categories/{id}.
verified · boolean- voliteľné · true, keď tvorca overil vlastníctvo; inak chýba.
logoUrl · uri- voliteľné · Logo (PNG, JPEG alebo WebP); chýba, ak žiadne nie je.
To isté ako typy TypeScriptu:
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[];
}