Κάθε προϊόν έχει αυτά τα πεδία. Τα προαιρετικά παραλείπονται όταν είναι κενά.
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[];
}