@visionfi/desktop-sdk
Version:
Desktop SDK for VisionFI Cloud Run services with Azure AD authentication
28 lines (27 loc) • 1.03 kB
TypeScript
/**
* Document Client - handles document operations for packages in Desktop SDK
* Copyright (c) 2024-2025 VisionFI. All Rights Reserved.
*/
import { AxiosInstance } from 'axios';
import { AddDocumentsOptions, AddDocumentsResponse, DeleteDocumentResponse } from '@visionfi/core';
import { UploadProgress } from '../../types.js';
export declare class DocumentClient {
private apiClient;
constructor(apiClient: AxiosInstance);
/**
* Add documents to a package
*/
add(packageId: string, options: AddDocumentsOptions): Promise<AddDocumentsResponse>;
/**
* Add a single file to a package with optional progress tracking
*/
addFile(packageId: string, fileBase64: string, fileName: string, onProgress?: (progress: UploadProgress) => void): Promise<AddDocumentsResponse>;
/**
* Delete a document from a package
*/
delete(packageId: string, documentUuid: string): Promise<DeleteDocumentResponse>;
/**
* Handle errors consistently
*/
private handleError;
}