/** Seconds since the Unix epoch. */ export type Timestamp = number; export type Id = string; export interface Page { readonly items: T[]; /** Opaque cursor for the next page, or null when this is the last page. */ readonly next: string | null; } export interface PageRequest { readonly cursor?: string; readonly limit?: number; } /** A problem the caller can fix and retry, such as a form validation error. */ export interface Problem { readonly code: "invalid" | "conflict" | "rate_limited" | "unavailable"; readonly message: string; /** The input field the problem refers to, when there is one. */ readonly field?: string; } export type Outcome = { readonly ok: true; readonly value: T } | { readonly ok: false; readonly problem: Problem };