Każdy produkt ma te pola. Opcjonalne są pomijane, gdy są puste.
id · string- Stałe id, także końcówka adresu strony produktu.
name · string- Nazwa produktu.
description · string- Opis w jednym zdaniu.
audience · string[]- Dla kogo jest: b2b, individual lub oba.
country · string- Kraj pochodzenia.
website · uri- Strona internetowa produktu.
longDescription · string- Kilka akapitów o produkcie.
features · string[]- Główne funkcje.
useCases · string[]- Od jednego do czterech id zastosowań.
category · string- Id kategorii, jak w /categories/{id}.
verified · boolean- opcjonalne · true, gdy twórca potwierdził, że produkt jest jego; w przeciwnym razie brak.
logoUrl · uri- opcjonalne · Logo (PNG, JPEG lub WebP); brak, gdy go nie ma.
To samo jako typy 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[];
}