@videosdk.live/server-sdk
    Preparing search index...

    Class BatchCallUpload

    Handle returned by BatchCallsResource.upload. It is both:

    • awaitableawait it (or use .then/.catch) to get the parsed BatchCall, or have it throw if the upload or parsing fails, and
    • an event emitter — subscribe with .on for progress: parsingparsed, or error (also parse_failed) on failure.
    const job = client.batchcall.upload({ filePath: "./leads.csv" });
    job.on("parsed", (batch) => client.batchcall.create({ batchId: batch.batchId, ...campaign }));
    job.on("error", (err) => console.error(err));
    // or, for linear code:
    const batch = await job;

    Implements

    Index
    • Parameters

      • Optionalonfinally: (() => void) | null

      Returns Promise<BatchCall>

    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      Parameters

      • Optionalonfulfilled: ((value: BatchCall) => TResult1 | PromiseLike<TResult1>) | null

        The callback to execute when the Promise is resolved.

      • Optionalonrejected: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<TResult1 | TResult2>

      A Promise for the completion of which ever callback is executed.