grexx-api
v13.3.31
Published
Grexx Platform API library
Keywords
Readme
Grexx Platform API - TypeScript Client
This is the TypeScript client for the Grexx Platform API, generated from the OpenAPI 3.0.2 specification. It provides a strongly-typed interface to interact with the API endpoints.
Table of Contents
Overview
The Grexx Platform API allows you to interact with the Grexx platform for managing cases, datasets, forms, tasks, and more. This client provides a convenient way to access the API with TypeScript types and interfaces for better development experience.
Installation
Install the client package using npm or yarn:
npm install grexx-api-client
# or
yarn add grexx-api-clientUsage
Initialization
To use the client, initialize the OpenAPI configuration with the base URL of your Grexx platform and any required authentication details.
import { OpenAPI } from 'grexx-api';
OpenAPI.BASE = 'https://name.grexx.today/api/v1';
OpenAPI.TOKEN = 'your-api-key'; // Replace with your API key if requiredExamples
Retrieve Case Information
import { CaseService } from 'grexx-api';
const casePath = 'example-case-id';
CaseService.caseInfo(casePath, { css: true, rootline: false })
.then(response => {
console.log('Case Info:', response);
})
.catch(error => {
console.error('Error fetching case info:', error);
});Submit a Task
import { CaseService } from 'grexx-api';
const taskId = 12345;
const casePath = 'example-case-id';
CaseService.taskSubmit(taskId, casePath, {
fields: { fieldName: 'value' },
autoProgress: true,
})
.then(response => {
console.log('Task submitted successfully:', response);
})
.catch(error => {
console.error('Error submitting task:', error);
});