Katram produktam ir šie lauki. Neobligātie tiek izlaisti, ja ir tukši.
id · string- Nemainīgs id, arī produkta lapas adreses beigas.
name · string- Produkta nosaukums.
description · string- Apraksts vienā teikumā.
audience · string[]- Kam tas paredzēts: b2b, individual vai abiem.
country · string- Izcelsmes valsts.
website · uri- Produkta vietne.
longDescription · string- Dažas rindkopas par produktu.
features · string[]- Galvenās funkcijas.
useCases · string[]- No viena līdz četriem lietojuma gadījumu id.
category · string- Kategorijas id, kā /categories/{id}.
verified · boolean- neobligāts · true, ja veidotājs ir apstiprinājis īpašumtiesības; citādi lauka nav.
logoUrl · uri- neobligāts · Logotips (PNG, JPEG vai WebP); lauka nav, ja logotipa nav.
Tas pats kā TypeScript tipi:
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[];
}