CollectionsResource

Collection discovery, mutation, metadata, and upload operations.

Constructors

Link copied to clipboard
constructor(http: VmodalHttp, signedUploads: SignedUploadTransport)

Functions

Link copied to clipboard
fun addAssets(collectionId: String, assetIds: List<String>, mode: String, groupName: String, streamName: String = "astream"): CollectionAddAssetsResponse

Adds existing asset identifiers to a collection.

Link copied to clipboard

Always throws FeatureDisabled before transport.

Link copied to clipboard

Always throws FeatureDisabled before transport.

Link copied to clipboard

Always throws FeatureDisabled before transport.

Link copied to clipboard
fun delete(groupName: String, mode: String, scope: String = "all", dryRun: Boolean = false, confirm: Boolean = false): DeleteCollectionResponse

Performs a dry-run or confirmed collection deletion.

Link copied to clipboard
fun edit(): Nothing

Always throws FeatureDisabled before transport.

Link copied to clipboard
fun listGroups(mode: String? = null): GroupsResponse

Lists accessible collection groups, optionally filtered by mode.

Link copied to clipboard
fun updateDescription(groupName: String, mode: String, streamName: String, filenameSanitized: String, description: String? = null, tag: List<String>? = null): CollectionDescriptionUpdateResponse

Updates an item's description and/or tags.

Link copied to clipboard
fun uploadFile(part: VmodalFilePart, groupName: String = "", mode: String = "vid_file", streamName: String = "astream", description: String = "", tag: List<String> = emptyList()): UploadResponse

Compatibility helper for small files. New video code should call videoUploadAsync because this endpoint is multipart/form-data and does not use the scalable signed-R2 flow.

fun uploadFile(file: File, groupName: String = "", mode: String = "vid_file", streamName: String = "astream", description: String = "", tag: List<String> = emptyList()): UploadResponse

Creates a replayable multipart part from file and uploads it.

Link copied to clipboard

Always throws FeatureDisabled before transport.

Link copied to clipboard
fun uploadMetadataJsonl(part: VmodalFilePart, mode: String = "img_file", groupName: String = "", streamName: String = "", writeMode: String = "append", allowOverlap: Boolean = false): MetadataParquetUploadResponse

Uploads replayable metadata content and returns a typed result.

Link copied to clipboard
fun CollectionsResource.videoUpload(source: UploadSource, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions(), onProgress: (UploadProgress) -> Unit = {}): VideoUploadResponse

Blocking counterpart for workers and tests. Never call this method on Android's main thread.

Link copied to clipboard
fun CollectionsResource.videoUploadAsync(source: UploadSource, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions(), onProgress: (UploadProgress) -> Unit = {}, onSuccess: (VideoUploadResponse) -> Unit, onFailure: (Exception) -> Unit): UploadHandle

Starts a non-blocking, cancelable upload and returns its UploadHandle.

Link copied to clipboard
fun CollectionsResource.videoUploadBulk(sources: List<UploadSource>, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions()): VideoUploadBulkResponse

Uploads sources sequentially on the calling worker thread.

Link copied to clipboard
fun CollectionsResource.videoUploadBulkAsync(sources: List<UploadSource>, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions(), onProgress: (UploadProgress) -> Unit = {}, onSuccess: (VideoUploadBulkResponse) -> Unit, onFailure: (Exception) -> Unit): UploadHandle

Starts a cancelable bulk upload and reports aggregate byte progress.