@epilot/automation-client 2.28.0 → 2.30.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 +1 -1
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +74 -23
- package/dist/openapi.json +43 -38
- package/package.json +5 -8
package/dist/client.d.ts
CHANGED
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={330
|
|
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})})();
|
package/dist/openapi.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
1
|
import type {
|
|
4
2
|
OpenAPIClient,
|
|
5
3
|
Parameters,
|
|
@@ -598,6 +596,77 @@ declare namespace Components {
|
|
|
598
596
|
*/
|
|
599
597
|
target_unique?: string[];
|
|
600
598
|
}
|
|
599
|
+
export interface AssignThreadAction {
|
|
600
|
+
id?: /**
|
|
601
|
+
* example:
|
|
602
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
603
|
+
*/
|
|
604
|
+
AutomationActionId;
|
|
605
|
+
flow_action_id?: /**
|
|
606
|
+
* example:
|
|
607
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
608
|
+
*/
|
|
609
|
+
AutomationActionId;
|
|
610
|
+
name?: string;
|
|
611
|
+
type?: "assign-thread";
|
|
612
|
+
config?: AssignThreadConfig;
|
|
613
|
+
/**
|
|
614
|
+
* Whether to stop execution in a failed state if this action fails
|
|
615
|
+
*/
|
|
616
|
+
allow_failure?: boolean;
|
|
617
|
+
/**
|
|
618
|
+
* Flag indicating whether the action was created automatically or manually
|
|
619
|
+
*/
|
|
620
|
+
created_automatically?: boolean;
|
|
621
|
+
/**
|
|
622
|
+
* Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
|
|
623
|
+
*/
|
|
624
|
+
is_bulk_action?: boolean;
|
|
625
|
+
reason?: {
|
|
626
|
+
/**
|
|
627
|
+
* Why the action has to be skipped/failed
|
|
628
|
+
* example:
|
|
629
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
630
|
+
*/
|
|
631
|
+
message?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
634
|
+
*/
|
|
635
|
+
payload?: {
|
|
636
|
+
[name: string]: any;
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* Condition Id to be checked before executing the action
|
|
641
|
+
*/
|
|
642
|
+
condition_id?: string;
|
|
643
|
+
/**
|
|
644
|
+
* Schedule Id which indicates the schedule of the action
|
|
645
|
+
*/
|
|
646
|
+
schedule_id?: string;
|
|
647
|
+
execution_status?: ExecutionStatus;
|
|
648
|
+
started_at?: string;
|
|
649
|
+
updated_at?: string;
|
|
650
|
+
/**
|
|
651
|
+
* example:
|
|
652
|
+
* {}
|
|
653
|
+
*/
|
|
654
|
+
outputs?: {
|
|
655
|
+
[name: string]: any;
|
|
656
|
+
};
|
|
657
|
+
error_output?: ErrorOutput;
|
|
658
|
+
retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
|
|
659
|
+
}
|
|
660
|
+
export interface AssignThreadConfig {
|
|
661
|
+
/**
|
|
662
|
+
* Assignees to remove from the thread, if they exist
|
|
663
|
+
*/
|
|
664
|
+
remove?: string[];
|
|
665
|
+
/**
|
|
666
|
+
* Assignees to add to the thread
|
|
667
|
+
*/
|
|
668
|
+
add?: string[];
|
|
669
|
+
}
|
|
601
670
|
/**
|
|
602
671
|
* example:
|
|
603
672
|
* [
|
|
@@ -937,7 +1006,6 @@ declare namespace Components {
|
|
|
937
1006
|
* Source blueprint/manifest ID used when automation is created via blueprints.
|
|
938
1007
|
*/
|
|
939
1008
|
_manifest?: string /* uuid */[] | null;
|
|
940
|
-
workflow_context?: /* For automation that are connected to workflows V2, this field tracks various information about the workflow. */ WorkflowContext;
|
|
941
1009
|
}
|
|
942
1010
|
/**
|
|
943
1011
|
* ID of the Automation Flow
|
|
@@ -2241,11 +2309,7 @@ declare namespace Components {
|
|
|
2241
2309
|
*/
|
|
2242
2310
|
id?: string; // uuid
|
|
2243
2311
|
type: "flows_trigger";
|
|
2244
|
-
configuration
|
|
2245
|
-
/**
|
|
2246
|
-
* The ID of the workflow v2 that triggers this automation
|
|
2247
|
-
*/
|
|
2248
|
-
source_id: string; // uuid
|
|
2312
|
+
configuration?: {
|
|
2249
2313
|
/**
|
|
2250
2314
|
* When Journeys are linked to Workflows V2 as Journey Automations, this field will contain the ID of the Journey
|
|
2251
2315
|
*/
|
|
@@ -3892,20 +3956,6 @@ declare namespace Components {
|
|
|
3892
3956
|
export interface WildcardCondition {
|
|
3893
3957
|
wildcard?: string;
|
|
3894
3958
|
}
|
|
3895
|
-
/**
|
|
3896
|
-
* For automation that are connected to workflows V2, this field tracks various information about the workflow.
|
|
3897
|
-
*/
|
|
3898
|
-
export interface WorkflowContext {
|
|
3899
|
-
/**
|
|
3900
|
-
* The ID of the workflow this automation is connected to
|
|
3901
|
-
*/
|
|
3902
|
-
workflow_id: string; // uuid
|
|
3903
|
-
/**
|
|
3904
|
-
* The ID of the task in the workflow that this automation is connected to
|
|
3905
|
-
*/
|
|
3906
|
-
task_id?: string; // uuid
|
|
3907
|
-
workflow_role: /* The role this automation plays in the workflow. */ WorkflowContextRole;
|
|
3908
|
-
}
|
|
3909
3959
|
/**
|
|
3910
3960
|
* The role this automation plays in the workflow.
|
|
3911
3961
|
*/
|
|
@@ -4733,6 +4783,8 @@ export type AnythingButCondition = Components.Schemas.AnythingButCondition;
|
|
|
4733
4783
|
export type ApiCallerContext = Components.Schemas.ApiCallerContext;
|
|
4734
4784
|
export type ApiSubmissionTrigger = Components.Schemas.ApiSubmissionTrigger;
|
|
4735
4785
|
export type AppendValueMapper = Components.Schemas.AppendValueMapper;
|
|
4786
|
+
export type AssignThreadAction = Components.Schemas.AssignThreadAction;
|
|
4787
|
+
export type AssignThreadConfig = Components.Schemas.AssignThreadConfig;
|
|
4736
4788
|
export type AssignUsersToStep = Components.Schemas.AssignUsersToStep;
|
|
4737
4789
|
export type AutomationAction = Components.Schemas.AutomationAction;
|
|
4738
4790
|
export type AutomationActionConfig = Components.Schemas.AutomationActionConfig;
|
|
@@ -4843,6 +4895,5 @@ export type TriggerWorkflowActionConfig = Components.Schemas.TriggerWorkflowActi
|
|
|
4843
4895
|
export type TriggerWorkflowCondition = Components.Schemas.TriggerWorkflowCondition;
|
|
4844
4896
|
export type TriggerWorkflowConfig = Components.Schemas.TriggerWorkflowConfig;
|
|
4845
4897
|
export type WildcardCondition = Components.Schemas.WildcardCondition;
|
|
4846
|
-
export type WorkflowContext = Components.Schemas.WorkflowContext;
|
|
4847
4898
|
export type WorkflowContextRole = Components.Schemas.WorkflowContextRole;
|
|
4848
4899
|
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.
|
|
6
|
+
"version": "1.4.0"
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
9
9
|
{
|
|
@@ -1131,9 +1131,6 @@
|
|
|
1131
1131
|
"example": "123e4567-e89b-12d3-a456-426614174000"
|
|
1132
1132
|
},
|
|
1133
1133
|
"nullable": true
|
|
1134
|
-
},
|
|
1135
|
-
"workflow_context": {
|
|
1136
|
-
"$ref": "#/components/schemas/WorkflowContext"
|
|
1137
1134
|
}
|
|
1138
1135
|
},
|
|
1139
1136
|
"required": [
|
|
@@ -1142,29 +1139,6 @@
|
|
|
1142
1139
|
"actions"
|
|
1143
1140
|
]
|
|
1144
1141
|
},
|
|
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
1142
|
"WorkflowContextRole": {
|
|
1169
1143
|
"type": "string",
|
|
1170
1144
|
"description": "The role this automation plays in the workflow.",
|
|
@@ -2061,6 +2035,26 @@
|
|
|
2061
2035
|
}
|
|
2062
2036
|
]
|
|
2063
2037
|
},
|
|
2038
|
+
"AssignThreadAction": {
|
|
2039
|
+
"allOf": [
|
|
2040
|
+
{
|
|
2041
|
+
"$ref": "#/components/schemas/AutomationAction"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
"type": "object",
|
|
2045
|
+
"properties": {
|
|
2046
|
+
"type": {
|
|
2047
|
+
"enum": [
|
|
2048
|
+
"assign-thread"
|
|
2049
|
+
]
|
|
2050
|
+
},
|
|
2051
|
+
"config": {
|
|
2052
|
+
"$ref": "#/components/schemas/AssignThreadConfig"
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
]
|
|
2057
|
+
},
|
|
2064
2058
|
"MoveThreadConfig": {
|
|
2065
2059
|
"type": "object",
|
|
2066
2060
|
"properties": {
|
|
@@ -2070,6 +2064,25 @@
|
|
|
2070
2064
|
}
|
|
2071
2065
|
}
|
|
2072
2066
|
},
|
|
2067
|
+
"AssignThreadConfig": {
|
|
2068
|
+
"type": "object",
|
|
2069
|
+
"properties": {
|
|
2070
|
+
"remove": {
|
|
2071
|
+
"type": "array",
|
|
2072
|
+
"description": "Assignees to remove from the thread, if they exist",
|
|
2073
|
+
"items": {
|
|
2074
|
+
"type": "string"
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
2077
|
+
"add": {
|
|
2078
|
+
"type": "array",
|
|
2079
|
+
"description": "Assignees to add to the thread",
|
|
2080
|
+
"items": {
|
|
2081
|
+
"type": "string"
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2073
2086
|
"SendEmailActionConfig": {
|
|
2074
2087
|
"allOf": [
|
|
2075
2088
|
{
|
|
@@ -3836,25 +3849,16 @@
|
|
|
3836
3849
|
"configuration": {
|
|
3837
3850
|
"type": "object",
|
|
3838
3851
|
"properties": {
|
|
3839
|
-
"source_id": {
|
|
3840
|
-
"type": "string",
|
|
3841
|
-
"format": "uuid",
|
|
3842
|
-
"description": "The ID of the workflow v2 that triggers this automation"
|
|
3843
|
-
},
|
|
3844
3852
|
"journey_id": {
|
|
3845
3853
|
"type": "string",
|
|
3846
3854
|
"format": "uuid",
|
|
3847
3855
|
"description": "When Journeys are linked to Workflows V2 as Journey Automations, this field will contain the ID of the Journey"
|
|
3848
3856
|
}
|
|
3849
|
-
}
|
|
3850
|
-
"required": [
|
|
3851
|
-
"source_id"
|
|
3852
|
-
]
|
|
3857
|
+
}
|
|
3853
3858
|
}
|
|
3854
3859
|
},
|
|
3855
3860
|
"required": [
|
|
3856
|
-
"type"
|
|
3857
|
-
"configuration"
|
|
3861
|
+
"type"
|
|
3858
3862
|
]
|
|
3859
3863
|
}
|
|
3860
3864
|
]
|
|
@@ -4247,6 +4251,7 @@
|
|
|
4247
4251
|
},
|
|
4248
4252
|
"EntityOperation": {
|
|
4249
4253
|
"type": "string",
|
|
4254
|
+
"nullable": true,
|
|
4250
4255
|
"enum": [
|
|
4251
4256
|
"createEntity",
|
|
4252
4257
|
"updateEntity",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/automation-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.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": "
|
|
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
|
|
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": "
|
|
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
|
+
}
|