@epilot/automation-client 2.29.0 → 2.31.0

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/dist/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Client } from './openapi';
1
+ import type { Client } from './openapi';
2
2
  export declare const getClient: () => Client;
3
3
  export declare const createClient: () => Client;
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","parameters":[{"name":"schema","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"trigger_source_id","in":"query"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows:batchGet":{"post":{"operationId":"batchGetFlows","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs":{"post":{"operationId":"bulkTriggerExecutions","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs/{job_id}":{"get":{"operationId":"getBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions/{execution_id}/{action_id}/retrigger":{"post":{"operationId":"retriggerAction","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"action_id","in":"path","required":true}],"requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/automation/public/executions:resume":{"post":{"operationId":"resumeExecutionWithToken","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}/schedules/{schedule_id}":{"delete":{"operationId":"cancelSchedule","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"schedule_id","in":"path","required":true}],"responses":{}}}},"components":{"responses":{"NotFoundError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},t={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(330),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={438(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","parameters":[{"name":"schema","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"trigger_source_id","in":"query"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows:batchGet":{"post":{"operationId":"batchGetFlows","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs":{"post":{"operationId":"bulkTriggerExecutions","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs/{job_id}":{"get":{"operationId":"getBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions/{execution_id}/{action_id}/retrigger":{"post":{"operationId":"retriggerAction","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"action_id","in":"path","required":true}],"requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/automation/public/executions:resume":{"post":{"operationId":"resumeExecutionWithToken","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}/schedules/{schedule_id}":{"delete":{"operationId":"cancelSchedule","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"schedule_id","in":"path","required":true}],"responses":{}}}},"components":{"responses":{"NotFoundError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},t={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(438),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  import type {
4
2
  OpenAPIClient,
5
3
  Parameters,
@@ -1008,7 +1006,10 @@ declare namespace Components {
1008
1006
  * Source blueprint/manifest ID used when automation is created via blueprints.
1009
1007
  */
1010
1008
  _manifest?: string /* uuid */[] | null;
1011
- workflow_context?: /* For automation that are connected to workflows V2, this field tracks various information about the workflow. */ WorkflowContext;
1009
+ /**
1010
+ * If true, automation is displayed in read-only mode in the UI to discourage changes
1011
+ */
1012
+ protected?: boolean;
1012
1013
  }
1013
1014
  /**
1014
1015
  * ID of the Automation Flow
@@ -2312,11 +2313,7 @@ declare namespace Components {
2312
2313
  */
2313
2314
  id?: string; // uuid
2314
2315
  type: "flows_trigger";
2315
- configuration: {
2316
- /**
2317
- * The ID of the workflow v2 that triggers this automation
2318
- */
2319
- source_id: string; // uuid
2316
+ configuration?: {
2320
2317
  /**
2321
2318
  * When Journeys are linked to Workflows V2 as Journey Automations, this field will contain the ID of the Journey
2322
2319
  */
@@ -3963,20 +3960,6 @@ declare namespace Components {
3963
3960
  export interface WildcardCondition {
3964
3961
  wildcard?: string;
3965
3962
  }
3966
- /**
3967
- * For automation that are connected to workflows V2, this field tracks various information about the workflow.
3968
- */
3969
- export interface WorkflowContext {
3970
- /**
3971
- * The ID of the workflow this automation is connected to
3972
- */
3973
- workflow_id: string; // uuid
3974
- /**
3975
- * The ID of the task in the workflow that this automation is connected to
3976
- */
3977
- task_id?: string; // uuid
3978
- workflow_role: /* The role this automation plays in the workflow. */ WorkflowContextRole;
3979
- }
3980
3963
  /**
3981
3964
  * The role this automation plays in the workflow.
3982
3965
  */
@@ -4916,6 +4899,5 @@ export type TriggerWorkflowActionConfig = Components.Schemas.TriggerWorkflowActi
4916
4899
  export type TriggerWorkflowCondition = Components.Schemas.TriggerWorkflowCondition;
4917
4900
  export type TriggerWorkflowConfig = Components.Schemas.TriggerWorkflowConfig;
4918
4901
  export type WildcardCondition = Components.Schemas.WildcardCondition;
4919
- export type WorkflowContext = Components.Schemas.WorkflowContext;
4920
4902
  export type WorkflowContextRole = Components.Schemas.WorkflowContextRole;
4921
4903
  export type WorkflowExecutionContext = Components.Schemas.WorkflowExecutionContext;
package/dist/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Automation API",
5
5
  "description": "API Backend for epilot Automation Workflows feature",
6
- "version": "1.4.0"
6
+ "version": "1.4.1"
7
7
  },
8
8
  "tags": [
9
9
  {
@@ -1132,8 +1132,9 @@
1132
1132
  },
1133
1133
  "nullable": true
1134
1134
  },
1135
- "workflow_context": {
1136
- "$ref": "#/components/schemas/WorkflowContext"
1135
+ "protected": {
1136
+ "type": "boolean",
1137
+ "description": "If true, automation is displayed in read-only mode in the UI to discourage changes"
1137
1138
  }
1138
1139
  },
1139
1140
  "required": [
@@ -1142,29 +1143,6 @@
1142
1143
  "actions"
1143
1144
  ]
1144
1145
  },
1145
- "WorkflowContext": {
1146
- "type": "object",
1147
- "description": "For automation that are connected to workflows V2, this field tracks various information about the workflow.",
1148
- "required": [
1149
- "workflow_id",
1150
- "workflow_role"
1151
- ],
1152
- "properties": {
1153
- "workflow_id": {
1154
- "type": "string",
1155
- "format": "uuid",
1156
- "description": "The ID of the workflow this automation is connected to"
1157
- },
1158
- "task_id": {
1159
- "type": "string",
1160
- "format": "uuid",
1161
- "description": "The ID of the task in the workflow that this automation is connected to"
1162
- },
1163
- "workflow_role": {
1164
- "$ref": "#/components/schemas/WorkflowContextRole"
1165
- }
1166
- }
1167
- },
1168
1146
  "WorkflowContextRole": {
1169
1147
  "type": "string",
1170
1148
  "description": "The role this automation plays in the workflow.",
@@ -3875,25 +3853,16 @@
3875
3853
  "configuration": {
3876
3854
  "type": "object",
3877
3855
  "properties": {
3878
- "source_id": {
3879
- "type": "string",
3880
- "format": "uuid",
3881
- "description": "The ID of the workflow v2 that triggers this automation"
3882
- },
3883
3856
  "journey_id": {
3884
3857
  "type": "string",
3885
3858
  "format": "uuid",
3886
3859
  "description": "When Journeys are linked to Workflows V2 as Journey Automations, this field will contain the ID of the Journey"
3887
3860
  }
3888
- },
3889
- "required": [
3890
- "source_id"
3891
- ]
3861
+ }
3892
3862
  }
3893
3863
  },
3894
3864
  "required": [
3895
- "type",
3896
- "configuration"
3865
+ "type"
3897
3866
  ]
3898
3867
  }
3899
3868
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.29.0",
3
+ "version": "2.31.0",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,16 +22,16 @@
22
22
  "automation"
23
23
  ],
24
24
  "scripts": {
25
- "test": "jest",
25
+ "test": "vitest",
26
26
  "typescript": "tsc",
27
27
  "bundle-definition": "webpack",
28
28
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/automation.yaml",
29
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
29
+ "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
30
30
  "build": "tsc && npm run build:patch && npm run bundle-definition",
31
31
  "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
32
32
  "build:watch": "npm run build && tsc -w",
33
33
  "prepublishOnly": "npm run typegen && npm run build",
34
- "lint": "pnpm exec eslint src"
34
+ "lint": "biome check src"
35
35
  },
36
36
  "files": [
37
37
  "*.js",
@@ -59,15 +59,12 @@
59
59
  "devDependencies": {
60
60
  "@oclif/command": "^1.8.18",
61
61
  "@oclif/errors": "^1.3.6",
62
- "@types/jest": "^26.0.20",
63
62
  "axios": "^1.11.0",
64
63
  "copy-webpack-plugin": "^7.0.0",
65
- "jest": "^29.6.2",
66
64
  "json-loader": "^0.5.7",
67
65
  "node-fetch": "^3.2.10",
68
66
  "openapi-client-axios": "^7.8.0",
69
67
  "openapicmd": "^2.7.0",
70
- "ts-jest": "^29.4.1",
71
68
  "ts-loader": "^8.0.14",
72
69
  "ts-node": "^10.9.1",
73
70
  "typescript": "^4.1.3",
@@ -76,4 +73,4 @@
76
73
  "whatwg-url": "^11.0.0"
77
74
  },
78
75
  "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
79
- }
76
+ }