UNPKG

@visionfi/server-sdk

Version:

Server-side SDK for VisionFI API access using Google Service Account authentication

63 lines (44 loc) 1.37 kB
# @visionfi/server Server-side SDK for VisionFI API access using Google Service Account authentication. ## Installation ```bash npm install @visionfi/server ``` ## Quick Start ```typescript import { VisionFi } from '@visionfi/server'; // Initialize with service account const client = new VisionFi({ serviceAccountPath: './service-account.json' }); // Or use Application Default Credentials const client = new VisionFi(); // Verify authentication const auth = await client.verifyAuth(); // Create a package const pkg = await client.createPackage({ productType: 'consumer_loan_vehicle', description: 'Vehicle loan application' }); // Analyze a document const job = await client.analyzeDocument(fileBuffer, { fileName: 'document.pdf', analysisType: 'auto_loan_abstract' }); // Get results const results = await client.getResults(job.uuid); ``` ## Authentication This package supports three authentication methods: 1. **Service Account File**: Provide path to JSON key file 2. **Service Account JSON**: Pass JSON object directly 3. **Application Default Credentials**: Automatic in GCP environments ## Features - Document analysis and processing - Package management - DocuSign integration - Workflow management - Processing history and results ## License Copyright (c) 2024-2025 VisionFI. All Rights Reserved. See LICENSE file for details.