Kull prodott għandu dawn l-oqsma. Dawk mhux obbligatorji jitħallew barra meta jkunu vojta.
id · string- Id stabbli, ukoll it-tmiem tal-indirizz tal-paġna tal-prodott.
name · string- Isem il-prodott.
description · string- Deskrizzjoni f'sentenza waħda.
audience · string[]- Għal min hu: b2b, individual jew it-tnejn.
country · string- Pajjiż tal-oriġini.
website · uri- Is-sit web tal-prodott.
longDescription · string- Ftit paragrafi dwar il-prodott.
features · string[]- Karatteristiċi ewlenin.
useCases · string[]- Minn id wieħed sa erba' ids ta' użu.
category · string- Id tal-kategorija, bħal f'/categories/{id}.
verified · boolean- mhux obbligatorju · true meta min jagħmlu kkonferma s-sjieda; inkella nieqes.
logoUrl · uri- mhux obbligatorju · Logo (PNG, JPEG jew WebP); nieqes meta ma jkunx hemm.
L-istess bħala 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[];
}