Всеки продукт има тези полета. Незадължителните се пропускат, когато са празни.
id · string- Постоянен id, също и краят на адреса на страницата на продукта.
name · string- Име на продукта.
description · string- Описание в едно изречение.
audience · string[]- За кого е: b2b, individual или и двете.
country · string- Държава на произход.
website · uri- Уебсайтът на продукта.
longDescription · string- Няколко абзаца за продукта.
features · string[]- Основни функции.
useCases · string[]- От един до четири id на приложения.
category · string- Id на категорията, както в /categories/{id}.
verified · boolean- незадължително · true, когато създателят е потвърдил собствеността; иначе липсва.
logoUrl · uri- незадължително · Лого (PNG, JPEG или WebP); липсва, когато няма.
Същото като типове на 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[];
}