openvibe-sdk/report

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

From types/report.d.ts (both). Declarations are shown verbatim.

interface ReportStatsWindow

export interface ReportStatsWindow { days?: 7 | 30 | 90; signal?: AbortSignal; }

interface ReportPublished

export interface ReportPublished {
    sites: boolean;
    activity: boolean;
    made: boolean;
    ai: boolean;
    money: boolean;
}

interface ReportPerson

export interface ReportPerson {
    username: string;
    display_name: string;
    avatar_url?: string;
}

interface ReportMeStats

export interface ReportMeStats {
    generated_at: string;
    person: ReportPerson;
    window: { days: 7 | 30 | 90; from: string; to: string };
    published: ReportPublished;
    sections: {
        sites?: Record<string, unknown>;
        activity?: Record<string, unknown>;
        made?: Record<string, unknown>;
        ai?: Record<string, unknown>;
        money?: Record<string, unknown>;
    };
    note?: string;
}

interface ReportAI

export interface ReportAI {
    leaderboard(opts?: { kind?: string; maker?: string; weights?: 'open' | 'closed'; price?: string; status?: 'current' | 'all'; uncensored?: boolean; community?: boolean; sort?: string; limit?: number; cursor?: string }, options?: { signal?: AbortSignal }): Promise<unknown>;
    model(id: string, options?: { signal?: AbortSignal }): Promise<unknown>;
    providers(options?: { signal?: AbortSignal }): Promise<unknown>;
    compare(ids: string | string[], options?: { signal?: AbortSignal }): Promise<unknown>;
    picks(options?: { signal?: AbortSignal }): Promise<unknown>;
}

interface ReportClient

export interface ReportClient {
    /** The signed-in person's own numbers (report.me-stats@1). Needs their session token on the client. */
    me(options?: ReportStatsWindow): Promise<ReportMeStats>;
    /** One person's published numbers, by username; 404 when they published nothing. */
    person(username: string, options?: { signal?: AbortSignal }): Promise<ReportMeStats>;
    /** Set all five per-section switches and answer the recomputed document. */
    publish(published: ReportPublished, options?: ReportStatsWindow): Promise<ReportMeStats>;
    ai: ReportAI;
}

function createReportClient

export declare function createReportClient(client: Pick<OpenVibeClient, 'json'>, options?: { baseUrl?: string }): ReportClient;

const REPORT_URL

export declare const REPORT_URL: string;

const DAYS

export declare const DAYS: readonly number[];

const SECTIONS

export declare const SECTIONS: readonly string[];