APIClient

Date

2/1/2024 - 2:45:15 AM

Export

Constructors

Properties

apiKey: string

Methods

  • Private

    Build API request headers.

    Parameters

    • Optional params: {
          apiKey?: string;
      }
      • Optional apiKey?: string

    Returns Record<string, string>

    Date

    2/21/2024 - 8:42:27 AM

  • Download a chunk buffer.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          bucket: string;
          chunk: number;
          maxRetries?: number;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          region: string;
          retryTimeout?: number;
          timeout?: number;
          uuid: string;
      }
      • Optional abortSignal?: AbortSignal
      • bucket: string
      • chunk: number
      • Optional maxRetries?: number
      • Optional onProgress?: ProgressCallback
      • Optional onProgressId?: string
      • region: string
      • Optional retryTimeout?: number
      • Optional timeout?: number
      • uuid: string

    Returns Promise<Buffer>

    Async

  • Downloads a file chunk to a local path.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          bucket: string;
          chunk: number;
          maxRetries?: number;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          region: string;
          retryTimeout?: number;
          timeout?: number;
          to: string;
          uuid: string;
      }
      • Optional abortSignal?: AbortSignal
      • bucket: string
      • chunk: number
      • Optional maxRetries?: number
      • Optional onProgress?: ProgressCallback
      • Optional onProgressId?: string
      • region: string
      • Optional retryTimeout?: number
      • Optional timeout?: number
      • to: string
      • uuid: string

    Returns Promise<void>

    Async

  • Downloads a file chunk and returns a readable stream.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          bucket: string;
          chunk: number;
          maxRetries?: number;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          region: string;
          retryTimeout?: number;
          timeout?: number;
          uuid: string;
      }
      • Optional abortSignal?: AbortSignal
      • bucket: string
      • chunk: number
      • Optional maxRetries?: number
      • Optional onProgress?: ProgressCallback
      • Optional onProgressId?: string
      • region: string
      • Optional retryTimeout?: number
      • Optional timeout?: number
      • uuid: string

    Returns Promise<ReadableStream<any> | ReadStream>

    Async

  • Upload a chunk buffer.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          buffer: Buffer;
          index: number;
          maxRetries?: number;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          parent: string;
          retryTimeout?: number;
          timeout?: number;
          uploadKey: string;
          uuid: string;
      }
      • Optional abortSignal?: AbortSignal
      • buffer: Buffer
      • index: number
      • Optional maxRetries?: number
      • Optional onProgress?: ProgressCallback
      • Optional onProgressId?: string
      • parent: string
      • Optional retryTimeout?: number
      • Optional timeout?: number
      • uploadKey: string
      • uuid: string

    Returns Promise<UploadChunkResponse>

    Async

Generated using TypeDoc