@epilot/automation-client 1.9.1 → 1.9.3
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 +17 -29
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -5
- package/dist/openapi.d.ts +15 -0
- package/dist/openapi.json +1997 -0
- package/package.json +33 -17
- package/tsconfig.json +23 -0
- package/src/openapi.d.ts +0 -1746
package/README.md
CHANGED
|
@@ -1,43 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @epilot/automation-client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/epilot-dev/sdk-js/actions?query=automation%3ACI)
|
|
4
|
+
[](https://www.npmjs.com/package/@epilot/automation-client)
|
|
5
|
+
[](https://bundlephobia.com/package/@epilot/automation-client)
|
|
6
|
+
[](https://github.com/epilot-dev/sdk-js/blob/main/LICENSE)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
Client library for epilot [Workflow API](https://docs.epilot.io/api/automation)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## Installation
|
|
10
13
|
|
|
11
14
|
```bash
|
|
12
|
-
npm install --save
|
|
15
|
+
npm install --save @epilot/automation-client
|
|
13
16
|
```
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { getClient } from '@epilot/automation-client';
|
|
19
|
-
```
|
|
18
|
+
## Usage
|
|
20
19
|
|
|
21
|
-
Use the client:
|
|
22
20
|
```typescript
|
|
23
|
-
|
|
24
|
-
const client = await getClient();
|
|
21
|
+
import { getClient } from "@epilot/automation-client";
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
const res = await
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## BaseURL & Authorization
|
|
31
|
-
|
|
32
|
-
To pass an authorization header and set up the API url, you can use axios
|
|
33
|
-
defaults:
|
|
34
|
-
|
|
35
|
-
```typescript
|
|
36
|
-
const client = getClient();
|
|
37
|
-
client.defaults.baseURL = config.API_URL;
|
|
38
|
-
client.defaults.headers['authorization'] = `Bearer ${token}`;
|
|
23
|
+
const automationClient = getClient();
|
|
24
|
+
const res = await automationClient.searchFlows(null, {
|
|
25
|
+
schema: "mySchema",
|
|
26
|
+
});
|
|
39
27
|
```
|
|
40
28
|
|
|
41
|
-
##
|
|
29
|
+
## Documentation
|
|
42
30
|
|
|
43
|
-
https://docs.
|
|
31
|
+
https://docs.epilot.io/docs/automation/intro
|