grexx-api 12.6.6 → 12.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
# Grexx Platform API - TypeScript Client
|
|
3
|
+
|
|
4
|
+
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.
|
|
5
|
+
|
|
6
|
+
## Table of Contents
|
|
7
|
+
|
|
8
|
+
- [Overview](#overview)
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [Usage](#usage)
|
|
11
|
+
- [Initialization](#initialization)
|
|
12
|
+
- [Examples](#examples)
|
|
13
|
+
- [Endpoints](#endpoints)
|
|
14
|
+
- [Development](#development)
|
|
15
|
+
- [License](#license)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
Install the client package using npm or yarn:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install grexx-api-client
|
|
29
|
+
# or
|
|
30
|
+
yarn add grexx-api-client
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
### Initialization
|
|
36
|
+
|
|
37
|
+
To use the client, initialize it with the base URL of your Grexx platform and any required authentication details.
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { GrexxApiClient } from 'grexx-api-client';
|
|
41
|
+
|
|
42
|
+
const client = new GrexxApiClient({
|
|
43
|
+
baseUrl: 'https://name.grexx.today/api/v1',
|
|
44
|
+
apiKey: 'your-api-key', // Replace with your API key if required
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Examples
|
|
49
|
+
|
|
50
|
+
#### Retrieve Case Information
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
const casePath = 'example-case-id';
|
|
54
|
+
|
|
55
|
+
client.getCaseInfo(casePath, { css: true, rootline: false })
|
|
56
|
+
.then(response => {
|
|
57
|
+
console.log('Case Info:', response);
|
|
58
|
+
})
|
|
59
|
+
.catch(error => {
|
|
60
|
+
console.error('Error fetching case info:', error);
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### Submit a Task
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
const taskId = 12345;
|
|
68
|
+
const casePath = 'example-case-id';
|
|
69
|
+
|
|
70
|
+
client.submitTask(taskId, casePath, {
|
|
71
|
+
fields: { fieldName: 'value' },
|
|
72
|
+
autoProgress: true,
|
|
73
|
+
})
|
|
74
|
+
.then(response => {
|
|
75
|
+
console.log('Task submitted successfully:', response);
|
|
76
|
+
})
|
|
77
|
+
.catch(error => {
|
|
78
|
+
console.error('Error submitting task:', error);
|
|
79
|
+
});
|
|
80
|
+
```
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OpenAPI = void 0;
|
|
4
4
|
exports.OpenAPI = {
|
|
5
5
|
BASE: 'https://name.grexx.today/api/v1',
|
|
6
|
-
VERSION: '12.6.
|
|
6
|
+
VERSION: '12.6.11',
|
|
7
7
|
WITH_CREDENTIALS: false,
|
|
8
8
|
CREDENTIALS: 'include',
|
|
9
9
|
TOKEN: undefined,
|
package/openapi-spec.yaml
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grexx-api",
|
|
3
|
-
"version": "12.6.
|
|
3
|
+
"version": "12.6.11",
|
|
4
4
|
"description": "Grexx platform API javascript library",
|
|
5
5
|
"main": "dist/generated/index.js",
|
|
6
6
|
"types": "dist/generated/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"generate": "ts-node ./generate-spec.ts && npx openapi-typescript-codegen --input openapi-spec.yaml --output ./src/generated",
|
|
9
|
+
"generate": "ts-node ./generate-spec-for-version.ts && npx openapi-typescript-codegen --input openapi-spec.yaml --output ./src/generated",
|
|
10
10
|
"docs": "typedoc",
|
|
11
11
|
"build-and-publish": "npm run generate && npm run build && npm publish"
|
|
12
12
|
},
|
package/typedoc.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://typedoc.org/schema.json",
|
|
3
3
|
"name": "Grexx platform javascript library",
|
|
4
4
|
"entryPoints": ["src/generated/index.ts"],
|
|
5
|
-
"out": "docs",
|
|
5
|
+
"out": "./src/client/grexx-api/docs/",
|
|
6
6
|
"sidebarLinks": {
|
|
7
7
|
"JavaScript Browser API documentation": "/docs/api/js",
|
|
8
8
|
"Exit documentation": "/home"
|
|
File without changes
|