Getting Started Guide
Set up and configure your first eJThB7 integration with step-by-step instructions.
1. Install the SDK
Add the core SDK to your project using your package manager.
npm install @ejthb7/core
Initialize Module
import { CoreEngine } from '@ejthb7/core'; const engine = new CoreEngine({ apiKey: 'YOUR_API_KEY', environment: 'development' });
2. Configure Settings
Environment Variables
EJTHB7_API_KEY='your-key-here' EJTHB7_REGION='us-west'
API Mode
The SDK will:
- • Enable sandbox endpoints (dev)
- • Show detailed errors (dev)
- • Send telemetry (prod)
- • Use global endpoints (prod)
3. SDK Integration
Basic Workflow
async function runWorkflow() { try { await engine.init(); const results = await engine.process({ type: 'import', source: '/data/users.csv', mapping: { id: 'user_id', name: 'full_name', role: 'position' } }); console.log('Success:', { count: results.created + results.updated, duration: results.durationMs }); } catch (error) { console.error('Workflow failed:', { code: error.code, message: error.message, details: error.details }); } }
Initialize
Load the SDK module with proper configuration
Process Data
Use the SDK's built-in processors for data transformation
Export Results
Output processed results in your desired format
4. Advanced Options
Custom Transformers
class CustomTransformer { constructor(options) { this.options = options; } transform(data) { return data.map(item => ({ ...item, processed: Date.now() })); } } // Usage const results = await engine .withTransformer(new CustomTransformer()) .process('data');
Pipeline Mode
Process multiple operations in sequence:
- • Data validation
- • Format conversion
- • Schema transformations
- • Error tracking
const pipeline = engine.createPipeline([ { stage: 'validate', processors: ['requiredFields('email,name')] }, { stage: 'format', processors: ['lowercaseEmail()', 'trimNames()'] } ]); const report = await pipeline.run();