Vsak izdelek ima ta polja. Neobvezna so izpuščena, kadar so prazna.
id · string- Stalen id, hkrati konec naslova strani izdelka.
name · string- Ime izdelka.
description · string- Opis v enem stavku.
audience · string[]- Komu je namenjen: b2b, individual ali obojim.
country · string- Država izvora.
website · uri- Spletna stran izdelka.
longDescription · string- Nekaj odstavkov o izdelku.
features · string[]- Glavne funkcije.
useCases · string[]- Od enega do štirih id-jev primerov uporabe.
category · string- Id kategorije, kot v /categories/{id}.
verified · boolean- neobvezno · true, ko je ustvarjalec potrdil lastništvo; sicer polja ni.
logoUrl · uri- neobvezno · Logotip (PNG, JPEG ali WebP); polja ni, če logotipa ni.
Enako kot tipi TypeScript:
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[];
}