Hiyve Components - v1.0.0
    Preparing search index...

    Options for createHiyveCourseStorage.

    interface HiyveCourseStorageOptions {
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        getFileClient: () => Pick<FileClient, "modifyFile"> | null;
        isProviderTrusted?: (providerId: string) => boolean;
        location?: string;
        now?: () => number;
        store: HiyveCourseFileStore;
        userId: string;
    }
    Index

    Properties

    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    fetch used to read documents. Defaults to the global fetch.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    getFileClient: () => Pick<FileClient, "modifyFile"> | null

    The connected client used to change saved documents, or null while not connected. With @hiyve/react, useClient() returns it once a room or no-video room is open.

    isProviderTrusted?: (providerId: string) => boolean

    Which providers this user accepts courses from. An enrollment is only trusted when the provider it names wrote it; this narrows it further — for example to the providers the user already works with. The id arrives in its cleaned form (what cleanUserId from @hiyve/core returns), so compare against cleaned ids. Everyone is accepted by default, which lets anyone who can share a file with this user put a course in front of them — set this in any app where that matters.

    location?: string

    Folder to store documents in. Defaults to DEFAULT_HIYVE_COURSES_LOCATION.

    now?: () => number

    Clock, in epoch ms. Defaults to Date.now.

    The app's HiyveStore.

    userId: string

    The signed-in user.