Skip to main content

ParallelModelBlobClient

ParallelModel TypeScript SDK


Class: ParallelModelBlobClient

Defined in: shared.ts:57

Uploads, updates, deletes and downloads model-scoped blobs through the core API.

Constructors​

Constructor​

new ParallelModelBlobClient(transport): ParallelModelBlobClient

Defined in: shared.ts:63

Creates a ParallelModelBlobClient instance.

Parameters​

transport​

Transport

Shared HTTP transport and authentication context.

Returns​

ParallelModelBlobClient

Methods​

deleteAsync()​

deleteAsync(modelId, blobId, encryptionKey, timeout?, signal?): Promise<ParallelModelResponse<unknown>>

Defined in: shared.ts:109

Deletes the specified model-scoped blob using its encryption key.

Parameters​

modelId​

string

UUID of the ParallelModel model that owns the resource.

blobId​

string

UUID of the stored blob.

encryptionKey​

string

Base64-encoded 32-byte encryption key for the blob.

timeout?​

number

HTTP request timeout in milliseconds; omit to use the transport default.

signal?​

AbortSignal

Optional abort signal used to cancel local waiting or HTTP requests.

Returns​

Promise<ParallelModelResponse<unknown>>

The decoded HTTP response envelope.


downloadBytesAsync()​

downloadBytesAsync(modelId, blobId, encryptionKey, timeout?, signal?): Promise<Uint8Array<ArrayBuffer>>

Defined in: shared.ts:131

Downloads a stored artifact or blob as a Uint8Array.

Parameters​

modelId​

string

UUID of the ParallelModel model that owns the resource.

blobId​

string

UUID of the stored blob.

encryptionKey​

string

Base64-encoded 32-byte encryption key for the blob.

timeout?​

number

HTTP request timeout in milliseconds; omit to use the transport default.

signal?​

AbortSignal

Optional abort signal used to cancel local waiting or HTTP requests.

Returns​

Promise<Uint8Array<ArrayBuffer>>

The downloaded file contents as bytes.


downloadToFileAsync()​

downloadToFileAsync(modelId, blobId, encryptionKey, destinationPath, timeout?, signal?): Promise<string>

Defined in: shared.ts:143

Downloads a blob to a temporary local file and renames it to the destination in Node.js.

Parameters​

modelId​

string

UUID of the ParallelModel model that owns the resource.

blobId​

string

UUID of the stored blob.

encryptionKey​

string

Base64-encoded 32-byte encryption key for the blob.

destinationPath​

string

Local file path at which the downloaded blob is saved in Node.js.

timeout?​

number

HTTP request timeout in milliseconds; omit to use the transport default.

signal?​

AbortSignal

Optional abort signal used to cancel local waiting or HTTP requests.

Returns​

Promise<string>

The destination file path after the write succeeds.


downloadWithMetadataAsync()​

downloadWithMetadataAsync(modelId, blobId, encryptionKey, timeout?, signal?): Promise<{ bytes: Uint8Array<ArrayBuffer>; fileName: string | undefined; }>

Defined in: shared.ts:120

Downloads a blob and returns its bytes and the file name from the Content-Disposition header, when available.

Parameters​

modelId​

string

UUID of the ParallelModel model that owns the resource.

blobId​

string

UUID of the stored blob.

encryptionKey​

string

Base64-encoded 32-byte encryption key for the blob.

timeout?​

number

HTTP request timeout in milliseconds; omit to use the transport default.

signal?​

AbortSignal

Optional abort signal used to cancel local waiting or HTTP requests.

Returns​

Promise<{ bytes: Uint8Array<ArrayBuffer>; fileName: string | undefined; }>

The downloaded bytes and optional file name.


updateAsync()​

updateAsync(modelId, blobId, source, encryptionKey, name, description?, recordType?, accessTier?, tags?, timeout?, signal?): Promise<ParallelModelResponse<ParallelModelBlobResponseModel>>

Defined in: shared.ts:98

Updates an existing model-scoped blob using multipart form data.

Parameters​

modelId​

string

UUID of the ParallelModel model that owns the resource.

blobId​

string

UUID of the stored blob.

source​

UploadSource

Upload source: Node.js file path, Blob, or named byte array.

encryptionKey​

string

Base64-encoded 32-byte encryption key for the blob.

name​

string

Name of the resource or output artifact.

description?​

string = ''

Human-readable description of the resource.

recordType?​

string = 'Generic'

Storage record classification; defaults to Generic for blob writes.

accessTier?​

string = 'Hot'

Storage access tier; defaults to Hot for blob writes.

tags?​

readonly string[] = []

Metadata tags associated with the resource.

timeout?​

number

HTTP request timeout in milliseconds; omit to use the transport default.

signal?​

AbortSignal

Optional abort signal used to cancel local waiting or HTTP requests.

Returns​

Promise<ParallelModelResponse<ParallelModelBlobResponseModel>>

The decoded HTTP response envelope.


uploadAsync()​

uploadAsync(modelId, source, encryptionKey, name, description?, recordType?, accessTier?, tags?, timeout?, signal?): Promise<ParallelModelResponse<ParallelModelBlobResponseModel>>

Defined in: shared.ts:81

Uploads a file as a model-scoped blob using multipart form data.

Parameters​

modelId​

string

UUID of the ParallelModel model that owns the resource.

source​

UploadSource

Upload source: Node.js file path, Blob, or named byte array.

encryptionKey​

string

Base64-encoded 32-byte encryption key for the blob.

name​

string

Name of the resource or output artifact.

description?​

string = ''

Human-readable description of the resource.

recordType?​

string = 'Generic'

Storage record classification; defaults to Generic for blob writes.

accessTier?​

string = 'Hot'

Storage access tier; defaults to Hot for blob writes.

tags?​

readonly string[] = []

Metadata tags associated with the resource.

timeout?​

number

HTTP request timeout in milliseconds; omit to use the transport default.

signal?​

AbortSignal

Optional abort signal used to cancel local waiting or HTTP requests.

Returns​

Promise<ParallelModelResponse<ParallelModelBlobResponseModel>>

The decoded HTTP response envelope.