@epilot/automation-client 2.25.0 → 2.26.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/definition.js +1 -1
- package/dist/openapi.d.ts +69 -0
- package/dist/openapi.json +29 -0
- package/package.json +15 -14
- package/LICENSE +0 -21
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
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})})();
|
package/dist/openapi.d.ts
CHANGED
|
@@ -2718,6 +2718,73 @@ declare namespace Components {
|
|
|
2718
2718
|
*/
|
|
2719
2719
|
version?: number;
|
|
2720
2720
|
}
|
|
2721
|
+
export interface MoveThreadAction {
|
|
2722
|
+
id?: /**
|
|
2723
|
+
* example:
|
|
2724
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2725
|
+
*/
|
|
2726
|
+
AutomationActionId;
|
|
2727
|
+
flow_action_id?: /**
|
|
2728
|
+
* example:
|
|
2729
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
2730
|
+
*/
|
|
2731
|
+
AutomationActionId;
|
|
2732
|
+
name?: string;
|
|
2733
|
+
type?: "move-thread";
|
|
2734
|
+
config?: MoveThreadConfig;
|
|
2735
|
+
/**
|
|
2736
|
+
* Whether to stop execution in a failed state if this action fails
|
|
2737
|
+
*/
|
|
2738
|
+
allow_failure?: boolean;
|
|
2739
|
+
/**
|
|
2740
|
+
* Flag indicating whether the action was created automatically or manually
|
|
2741
|
+
*/
|
|
2742
|
+
created_automatically?: boolean;
|
|
2743
|
+
/**
|
|
2744
|
+
* Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
|
|
2745
|
+
*/
|
|
2746
|
+
is_bulk_action?: boolean;
|
|
2747
|
+
reason?: {
|
|
2748
|
+
/**
|
|
2749
|
+
* Why the action has to be skipped/failed
|
|
2750
|
+
* example:
|
|
2751
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
2752
|
+
*/
|
|
2753
|
+
message?: string;
|
|
2754
|
+
/**
|
|
2755
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
2756
|
+
*/
|
|
2757
|
+
payload?: {
|
|
2758
|
+
[name: string]: any;
|
|
2759
|
+
};
|
|
2760
|
+
};
|
|
2761
|
+
/**
|
|
2762
|
+
* Condition Id to be checked before executing the action
|
|
2763
|
+
*/
|
|
2764
|
+
condition_id?: string;
|
|
2765
|
+
/**
|
|
2766
|
+
* Schedule Id which indicates the schedule of the action
|
|
2767
|
+
*/
|
|
2768
|
+
schedule_id?: string;
|
|
2769
|
+
execution_status?: ExecutionStatus;
|
|
2770
|
+
started_at?: string;
|
|
2771
|
+
updated_at?: string;
|
|
2772
|
+
/**
|
|
2773
|
+
* example:
|
|
2774
|
+
* {}
|
|
2775
|
+
*/
|
|
2776
|
+
outputs?: {
|
|
2777
|
+
[name: string]: any;
|
|
2778
|
+
};
|
|
2779
|
+
error_output?: ErrorOutput;
|
|
2780
|
+
retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
|
|
2781
|
+
}
|
|
2782
|
+
export interface MoveThreadConfig {
|
|
2783
|
+
/**
|
|
2784
|
+
* ID of the inbox where the thread should be moved to
|
|
2785
|
+
*/
|
|
2786
|
+
target_inbox_id?: string;
|
|
2787
|
+
}
|
|
2721
2788
|
export interface NumericCondition {
|
|
2722
2789
|
numeric?: (string | number)[];
|
|
2723
2790
|
}
|
|
@@ -4542,6 +4609,8 @@ export type MappingAttribute = Components.Schemas.MappingAttribute;
|
|
|
4542
4609
|
export type MappingAttributeMode = Components.Schemas.MappingAttributeMode;
|
|
4543
4610
|
export type MappingAttributeV2 = Components.Schemas.MappingAttributeV2;
|
|
4544
4611
|
export type MappingConfigRef = Components.Schemas.MappingConfigRef;
|
|
4612
|
+
export type MoveThreadAction = Components.Schemas.MoveThreadAction;
|
|
4613
|
+
export type MoveThreadConfig = Components.Schemas.MoveThreadConfig;
|
|
4545
4614
|
export type NumericCondition = Components.Schemas.NumericCondition;
|
|
4546
4615
|
export type OperationNode = Components.Schemas.OperationNode;
|
|
4547
4616
|
export type OperationObjectNode = Components.Schemas.OperationObjectNode;
|
package/dist/openapi.json
CHANGED
|
@@ -2032,6 +2032,35 @@
|
|
|
2032
2032
|
"value_json"
|
|
2033
2033
|
]
|
|
2034
2034
|
},
|
|
2035
|
+
"MoveThreadAction": {
|
|
2036
|
+
"allOf": [
|
|
2037
|
+
{
|
|
2038
|
+
"$ref": "#/components/schemas/AutomationAction"
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
"type": "object",
|
|
2042
|
+
"properties": {
|
|
2043
|
+
"type": {
|
|
2044
|
+
"enum": [
|
|
2045
|
+
"move-thread"
|
|
2046
|
+
]
|
|
2047
|
+
},
|
|
2048
|
+
"config": {
|
|
2049
|
+
"$ref": "#/components/schemas/MoveThreadConfig"
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
]
|
|
2054
|
+
},
|
|
2055
|
+
"MoveThreadConfig": {
|
|
2056
|
+
"type": "object",
|
|
2057
|
+
"properties": {
|
|
2058
|
+
"target_inbox_id": {
|
|
2059
|
+
"type": "string",
|
|
2060
|
+
"description": "ID of the inbox where the thread should be moved to"
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
},
|
|
2035
2064
|
"SendEmailActionConfig": {
|
|
2036
2065
|
"allOf": [
|
|
2037
2066
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/automation-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.0",
|
|
4
4
|
"description": "Client library for epilot automation API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,6 +21,18 @@
|
|
|
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
|
+
},
|
|
24
36
|
"files": [
|
|
25
37
|
"*.js",
|
|
26
38
|
"*.d.ts",
|
|
@@ -63,16 +75,5 @@
|
|
|
63
75
|
"webpack-cli": "^4.4.0",
|
|
64
76
|
"whatwg-url": "^11.0.0"
|
|
65
77
|
},
|
|
66
|
-
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
|
|
67
|
-
|
|
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
|
-
}
|
|
78
|
+
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
|
|
79
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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.
|