@modelhealth/modelhealth
    Preparing search index...

    Type Alias ImportStatus

    ImportStatus:
        | { type: "creating_session" }
        | { session_id: string; type: "created_session" }
        | {
            total: number;
            trial: string;
            type: "uploading_video";
            uploaded: number;
        }
        | { type: "processing" }

    The current status of a session import.

    Reported during importSession, tracking session creation, video upload and processing stages.

    Type Declaration

    • { type: "creating_session" }

      A new session is being created on the server.

    • { session_id: string; type: "created_session" }

      The session was created successfully.

    • { total: number; trial: string; type: "uploading_video"; uploaded: number }

      A video is being uploaded. trial names the current trial.

    • { type: "processing" }

      Videos have been uploaded and the server is processing the trial.

    await client.importSession(activitiesJson, subject, null, {}, (status) => {
    switch (status.type) {
    case "creating_session":
    console.log("Creating session...");
    break;
    case "uploading_video":
    console.log(`[${status.trial}] Uploading: ${status.uploaded}/${status.total}`);
    break;
    case "processing":
    console.log("Processing...");
    break;
    }
    });