46 lines
965 B
TypeScript
46 lines
965 B
TypeScript
/** Stable project-catalog boundary between Makelore and Works Square. */
|
|
|
|
export const LEARNING_API_PATH = '/api/works/learning';
|
|
|
|
export const LEARNING_MEDIA_MAX_BYTES = 10 * 1024 * 1024;
|
|
|
|
export type LearningProjectImage = {
|
|
url: string;
|
|
alt: string;
|
|
width?: number;
|
|
height?: number;
|
|
};
|
|
|
|
export type LearningProjectSummary = {
|
|
id: string;
|
|
name: string;
|
|
summary: string;
|
|
cover: LearningProjectImage;
|
|
tags: string[];
|
|
version: string | null;
|
|
archiveBytes: number;
|
|
publishedAt: string;
|
|
updatedAt: string;
|
|
};
|
|
|
|
export type LearningProjectDetail = LearningProjectSummary & {
|
|
readmeMarkdown: string;
|
|
archiveFileName: string;
|
|
archiveSha256: string;
|
|
};
|
|
|
|
export type LearningProjectPage = {
|
|
items: LearningProjectSummary[];
|
|
nextCursor: string | null;
|
|
total?: number;
|
|
};
|
|
|
|
export type LearningProjectListQuery = {
|
|
cursor?: string;
|
|
limit?: number;
|
|
};
|
|
|
|
export type LearningProjectDownloadResult = {
|
|
status: 'saved' | 'cancelled';
|
|
};
|