@epilot/automation-client 2.24.3 → 2.25.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 epilot GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330:function(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={390:function(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}(390),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
@@ -2039,11 +2039,34 @@ declare namespace Components {
2039
2039
  */
2040
2040
  AutomationExecutionId;
2041
2041
  execution_status: ExecutionStatus;
2042
+ /**
2043
+ * Timestamp in UTC ISO format
2044
+ * example:
2045
+ * 2025-10-30T15:56:47.842Z
2046
+ */
2047
+ timestamp?: string; // date-time
2042
2048
  /**
2043
2049
  * Error message for the failed automation execution
2044
2050
  */
2045
2051
  error?: string;
2046
2052
  }
2053
+ /**
2054
+ * [Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers.
2055
+ */
2056
+ export interface ExecutionChain {
2057
+ /**
2058
+ * ID of the parent flow execution that triggered this one
2059
+ */
2060
+ parent_execution_id?: string;
2061
+ /**
2062
+ * ID of the automation task that triggered this execution
2063
+ */
2064
+ parent_task_id?: string;
2065
+ /**
2066
+ * Current depth in the execution chain (0 = manual start)
2067
+ */
2068
+ depth?: number;
2069
+ }
2047
2070
  export type ExecutionStatus = "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot";
2048
2071
  export interface ExistsCondition {
2049
2072
  exists?: boolean;
@@ -3638,6 +3661,7 @@ declare namespace Components {
3638
3661
  workflow_exec_id: string;
3639
3662
  workflow_exec_task_id?: string;
3640
3663
  workflow_role: /* The role this automation plays in the workflow. */ WorkflowContextRole;
3664
+ _execution_chain?: /* [Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers. */ ExecutionChain;
3641
3665
  }
3642
3666
  }
3643
3667
  }
@@ -4496,6 +4520,7 @@ export type ErrorDetail = Components.Schemas.ErrorDetail;
4496
4520
  export type ErrorObject = Components.Schemas.ErrorObject;
4497
4521
  export type ErrorOutput = Components.Schemas.ErrorOutput;
4498
4522
  export type ExecItem = Components.Schemas.ExecItem;
4523
+ export type ExecutionChain = Components.Schemas.ExecutionChain;
4499
4524
  export type ExecutionStatus = Components.Schemas.ExecutionStatus;
4500
4525
  export type ExistsCondition = Components.Schemas.ExistsCondition;
4501
4526
  export type FilterConditionOnEvent = Components.Schemas.FilterConditionOnEvent;
package/dist/openapi.json CHANGED
@@ -3099,6 +3099,27 @@
3099
3099
  },
3100
3100
  "workflow_role": {
3101
3101
  "$ref": "#/components/schemas/WorkflowContextRole"
3102
+ },
3103
+ "_execution_chain": {
3104
+ "$ref": "#/components/schemas/ExecutionChain"
3105
+ }
3106
+ }
3107
+ },
3108
+ "ExecutionChain": {
3109
+ "type": "object",
3110
+ "description": "[Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers.",
3111
+ "properties": {
3112
+ "parent_execution_id": {
3113
+ "type": "string",
3114
+ "description": "ID of the parent flow execution that triggered this one"
3115
+ },
3116
+ "parent_task_id": {
3117
+ "type": "string",
3118
+ "description": "ID of the automation task that triggered this execution"
3119
+ },
3120
+ "depth": {
3121
+ "type": "integer",
3122
+ "description": "Current depth in the execution chain (0 = manual start)"
3102
3123
  }
3103
3124
  }
3104
3125
  },
@@ -3609,6 +3630,12 @@
3609
3630
  "execution_status": {
3610
3631
  "$ref": "#/components/schemas/ExecutionStatus"
3611
3632
  },
3633
+ "timestamp": {
3634
+ "type": "string",
3635
+ "format": "date-time",
3636
+ "description": "Timestamp in UTC ISO format",
3637
+ "example": "2025-10-30T15:56:47.842Z"
3638
+ },
3612
3639
  "error": {
3613
3640
  "type": "string",
3614
3641
  "description": "Error message for the failed automation execution"
@@ -4590,6 +4617,9 @@
4590
4617
  }
4591
4618
  },
4592
4619
  "servers": [
4620
+ {
4621
+ "url": "https://automation.sls.epilot.io"
4622
+ },
4593
4623
  {
4594
4624
  "url": "https://automation.sls.epilot.io"
4595
4625
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.24.3",
3
+ "version": "2.25.0",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,18 +21,6 @@
21
21
  "sdk",
22
22
  "automation"
23
23
  ],
24
- "scripts": {
25
- "test": "jest",
26
- "typescript": "tsc",
27
- "bundle-definition": "webpack",
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",
30
- "build": "tsc && npm run build:patch && npm run bundle-definition",
31
- "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
32
- "build:watch": "npm run build && tsc -w",
33
- "prepublishOnly": "npm run typegen && npm run build",
34
- "lint": "pnpm exec eslint src"
35
- },
36
24
  "files": [
37
25
  "*.js",
38
26
  "*.d.ts",
@@ -75,5 +63,16 @@
75
63
  "webpack-cli": "^4.4.0",
76
64
  "whatwg-url": "^11.0.0"
77
65
  },
78
- "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
79
- }
66
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7",
67
+ "scripts": {
68
+ "test": "jest",
69
+ "typescript": "tsc",
70
+ "bundle-definition": "webpack",
71
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/automation.yaml",
72
+ "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
73
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
74
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
75
+ "build:watch": "npm run build && tsc -w",
76
+ "lint": "pnpm exec eslint src"
77
+ }
78
+ }