@epilot/automation-client 0.7.7 → 0.7.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "0.7.7",
3
+ "version": "0.7.9",
4
4
  "description": "API Client for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,19 @@
1
+ import { getClient } from './client';
2
+
3
+ describe('client', () => {
4
+ describe('getClient', () => {
5
+ it('should inititalise and return client', async () => {
6
+ const client = getClient();
7
+
8
+ expect(client.api.initalized).toBe(true);
9
+ });
10
+
11
+ it('should have operations', async () => {
12
+ const client = getClient();
13
+
14
+ const operations = client.api.getOperations();
15
+
16
+ expect(operations.length).toBeGreaterThan(0);
17
+ });
18
+ });
19
+ });
package/src/client.ts ADDED
@@ -0,0 +1,10 @@
1
+ import OpenAPIClientAxios from 'openapi-client-axios';
2
+
3
+ import definition from './definition';
4
+ import { Client } from './openapi';
5
+
6
+ export const getClient = () => {
7
+ const api = new OpenAPIClientAxios({ definition, quick: true });
8
+
9
+ return api.initSync<Client>();
10
+ };
@@ -0,0 +1,5 @@
1
+ import type { Document } from 'openapi-client-axios';
2
+
3
+ import definition from './openapi.json';
4
+
5
+ export default definition as Document;
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './client';
2
+ export type { Client, Components, Paths, PathsDictionary, OperationMethods } from './openapi';
3
+ export type { OpenAPIClient, OpenAPIClientAxios, Document } from 'openapi-client-axios';
package/src/openapi.d.ts CHANGED
@@ -94,6 +94,12 @@ declare namespace Components {
94
94
  * submission
95
95
  */
96
96
  entity_schema?: string;
97
+ /**
98
+ * Flag indicating whether the flow was created automatically
99
+ * example:
100
+ * true
101
+ */
102
+ created_automatically?: boolean;
97
103
  actions?: AnyAction[];
98
104
  created_at?: string; // date-time
99
105
  updated_at?: string; // date-time
@@ -422,6 +428,7 @@ declare namespace Components {
422
428
  export interface TriggerWorkflowConfig {
423
429
  target_workflow?: string;
424
430
  conditions?: TriggerWorkflowCondition[];
431
+ assignees?: string[];
425
432
  assign_steps?: AssignUsersToStep[];
426
433
  }
427
434
  }