@eml-payments/openapi-client
v0.0.1
Published
ARLO OpenAPI Client
Downloads
59
Keywords
Readme
@eml-payments/openapi-client
ARLO OpenAPI Client – auto-generated TypeScript client using OpenAPI Generator.
This package provides typed interfaces and API methods for interacting with EML's ARLO services.
📦 Installation
From npm (recommended):
npm install @eml-payments/openapi-client🛠 Usage
Example
import { ClientApi, CreateClientRequest } from '@eml-payments/openapi-client';
const api = new ClientApi();
api.createClient({
companyName: 'Acme Corp',
parentAccountId: 'ARLO-ACC-001',
availableBalance: 50000
} as CreateClientRequest).then(response => {
console.log('Client created:', response);
});🧱 Package Structure
.
├── apis/ # All API interfaces (e.g., ClientApi.ts, EndUsersApi.ts)
├── models/ # Request and response models
├── runtime.ts # Fetch API runtime configuration
├── index.ts # Main entry point
├── sources/ # OpenAPI JSON specs (local, not published)
└── scripts # Custom npm scripts for build📜 Scripts
# Build client API from client.json
npm run build:client
# Build wallet API from wallet.json
npm run build:wallet
# Build both APIs
npm run build:all⚠️ These scripts rely on local OpenAPI specs in the
./sourcesdirectory. They regenerate TypeScript types and API clients in-place.
📚 Requirements
- Node.js >= 14
- TypeScript >= 4.4
- OpenAPI Generator CLI
You can install OpenAPI Generator globally or use npx as in the scripts.
🧪 Development
- Modify the OpenAPI spec in
./sources/client.jsonorwallet.json. - Regenerate the client:
npm run build:all - Commit updated
apis/,models/, andruntime.ts.
