kodexa-typescript
v6.1.0-33
Published
A Typescript SDK for the Kodexa platform
Downloads
5
Readme
Kodexa for Typescript
Getting Started
This project provides an SDK for working with the Kodexa platform from Typescript Its core is based around a set of generated classes from the OpenAPI specification for the Platform.
The actual code is generated using https://github.com/ferdikoomen/openapi-typescript-codegen
openapi --input ./resources/api-docs.yaml --output ./src --client axios --name KodexaClient
How to use the client
The client is generated from the OpenAPI specification for the Kodexa Platform. You can find the specification in the resources directory of this project.
You can access the KodexaClient to connect:
import { KodexaClient } from 'kodexa-typescript';
// API_KEY Auth
const tokenClient = new KodexaClient({
BASE: process.env.KODEXA_URL,
HEADERS: {
'x-access-token': process.env.KODEXA_ACCESS_TOKEN
}
});
// Basic Auth
const basicAuthClient = new KodexaClient({
BASE: process.env.KODEXA_URL,
USERNAME: '[email protected]',
PASSWORD: 'aPa5sWoRd'
});
// JWT Auth
const jwtClient = new KodexaClient({
BASE: process.env.KODEXA_URL,
TOKEN: '28936823647823487264723648'
});