@epilot/automation-client 2.8.9 → 2.9.1
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/openapi.d.ts +78 -4
- package/dist/openapi.json +49 -15
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare namespace Components {
|
|
|
25
25
|
types?: (("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword") | string)[];
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | AutomationAction;
|
|
28
|
+
export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | AutomationAction | ConditionAction;
|
|
29
29
|
export type AnyActionConfig = /**
|
|
30
30
|
* example:
|
|
31
31
|
* {
|
|
@@ -344,7 +344,7 @@ declare namespace Components {
|
|
|
344
344
|
*/
|
|
345
345
|
EntityOperationTrigger | ActivityTrigger | EntityManualTrigger | ReceivedEmailTrigger;
|
|
346
346
|
export interface AnythingButCondition {
|
|
347
|
-
"anything-but"?:
|
|
347
|
+
"anything-but"?: string[];
|
|
348
348
|
}
|
|
349
349
|
export interface ApiCallerContext {
|
|
350
350
|
[name: string]: any;
|
|
@@ -625,6 +625,25 @@ declare namespace Components {
|
|
|
625
625
|
*/
|
|
626
626
|
AutomationActionId;
|
|
627
627
|
actions: AnyAction[];
|
|
628
|
+
/**
|
|
629
|
+
* The edges between actions which define the flow order
|
|
630
|
+
*/
|
|
631
|
+
edges?: /**
|
|
632
|
+
* example:
|
|
633
|
+
* {
|
|
634
|
+
* "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
|
|
635
|
+
* "start": "3567cabc-587f-4ba2-8752-1f3da0100d1f",
|
|
636
|
+
* "end": "4e29af6c-9824-461c-bcfb-505840a949ba",
|
|
637
|
+
* "condition_output": true
|
|
638
|
+
* }
|
|
639
|
+
*/
|
|
640
|
+
Edge[];
|
|
641
|
+
/**
|
|
642
|
+
* Version of the flow
|
|
643
|
+
* example:
|
|
644
|
+
* 2
|
|
645
|
+
*/
|
|
646
|
+
version?: number;
|
|
628
647
|
trigger_event?: TriggerEventManual | TriggerEventEntityActivity | TriggerEventEntityOperation;
|
|
629
648
|
}
|
|
630
649
|
/**
|
|
@@ -858,6 +877,60 @@ declare namespace Components {
|
|
|
858
877
|
target_unique?: string[];
|
|
859
878
|
}
|
|
860
879
|
export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty";
|
|
880
|
+
export interface ConditionAction {
|
|
881
|
+
id?: /**
|
|
882
|
+
* example:
|
|
883
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
884
|
+
*/
|
|
885
|
+
AutomationActionId;
|
|
886
|
+
flow_action_id?: /**
|
|
887
|
+
* example:
|
|
888
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
889
|
+
*/
|
|
890
|
+
AutomationActionId;
|
|
891
|
+
name?: string;
|
|
892
|
+
type?: "condition";
|
|
893
|
+
config?: ConditionConfig;
|
|
894
|
+
/**
|
|
895
|
+
* Whether to stop execution in a failed state if this action fails
|
|
896
|
+
*/
|
|
897
|
+
allow_failure?: boolean;
|
|
898
|
+
/**
|
|
899
|
+
* Flag indicating whether the action was created automatically or manually
|
|
900
|
+
*/
|
|
901
|
+
created_automatically?: boolean;
|
|
902
|
+
/**
|
|
903
|
+
* Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
|
|
904
|
+
*/
|
|
905
|
+
is_bulk_action?: boolean;
|
|
906
|
+
reason?: {
|
|
907
|
+
/**
|
|
908
|
+
* Why the action has to be skipped/failed
|
|
909
|
+
* example:
|
|
910
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
911
|
+
*/
|
|
912
|
+
message?: string;
|
|
913
|
+
/**
|
|
914
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
915
|
+
*/
|
|
916
|
+
payload?: {
|
|
917
|
+
[name: string]: any;
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
execution_status?: ExecutionStatus;
|
|
921
|
+
started_at?: string;
|
|
922
|
+
updated_at?: string;
|
|
923
|
+
/**
|
|
924
|
+
* example:
|
|
925
|
+
* {}
|
|
926
|
+
*/
|
|
927
|
+
outputs?: {
|
|
928
|
+
[name: string]: any;
|
|
929
|
+
};
|
|
930
|
+
error_output?: ErrorOutput;
|
|
931
|
+
retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
|
|
932
|
+
actions?: AnyAction[];
|
|
933
|
+
}
|
|
861
934
|
export interface ConditionActionConfig {
|
|
862
935
|
id?: /**
|
|
863
936
|
* example:
|
|
@@ -898,12 +971,13 @@ declare namespace Components {
|
|
|
898
971
|
[name: string]: any;
|
|
899
972
|
};
|
|
900
973
|
};
|
|
974
|
+
actions?: AnyActionConfig[];
|
|
901
975
|
}
|
|
902
976
|
export interface ConditionConfig {
|
|
903
977
|
source?: {
|
|
904
978
|
id?: string;
|
|
905
979
|
type?: string;
|
|
906
|
-
|
|
980
|
+
attribute?: string;
|
|
907
981
|
};
|
|
908
982
|
operation?: "equals" | "not_equals" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty";
|
|
909
983
|
values?: string[];
|
|
@@ -1320,7 +1394,7 @@ declare namespace Components {
|
|
|
1320
1394
|
exists?: boolean;
|
|
1321
1395
|
}
|
|
1322
1396
|
export type FilterConditionOnEvent = OrCondition | {
|
|
1323
|
-
[name: string]: (string |
|
|
1397
|
+
[name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[];
|
|
1324
1398
|
};
|
|
1325
1399
|
export interface FrontendSubmitTrigger {
|
|
1326
1400
|
type: "frontend_submission";
|
package/dist/openapi.json
CHANGED
|
@@ -615,6 +615,9 @@
|
|
|
615
615
|
},
|
|
616
616
|
{
|
|
617
617
|
"$ref": "#/components/schemas/AutomationAction"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"$ref": "#/components/schemas/ConditionAction"
|
|
618
621
|
}
|
|
619
622
|
]
|
|
620
623
|
},
|
|
@@ -1811,7 +1814,7 @@
|
|
|
1811
1814
|
"type": {
|
|
1812
1815
|
"type": "string"
|
|
1813
1816
|
},
|
|
1814
|
-
"
|
|
1817
|
+
"attribute": {
|
|
1815
1818
|
"type": "string"
|
|
1816
1819
|
}
|
|
1817
1820
|
}
|
|
@@ -1841,6 +1844,32 @@
|
|
|
1841
1844
|
}
|
|
1842
1845
|
}
|
|
1843
1846
|
},
|
|
1847
|
+
"ConditionAction": {
|
|
1848
|
+
"allOf": [
|
|
1849
|
+
{
|
|
1850
|
+
"$ref": "#/components/schemas/AutomationAction"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
"type": "object",
|
|
1854
|
+
"properties": {
|
|
1855
|
+
"type": {
|
|
1856
|
+
"enum": [
|
|
1857
|
+
"condition"
|
|
1858
|
+
]
|
|
1859
|
+
},
|
|
1860
|
+
"actions": {
|
|
1861
|
+
"type": "array",
|
|
1862
|
+
"items": {
|
|
1863
|
+
"$ref": "#/components/schemas/AnyAction"
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
"config": {
|
|
1867
|
+
"$ref": "#/components/schemas/ConditionConfig"
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
]
|
|
1872
|
+
},
|
|
1844
1873
|
"ConditionActionConfig": {
|
|
1845
1874
|
"allOf": [
|
|
1846
1875
|
{
|
|
@@ -1854,6 +1883,12 @@
|
|
|
1854
1883
|
"condition"
|
|
1855
1884
|
]
|
|
1856
1885
|
},
|
|
1886
|
+
"actions": {
|
|
1887
|
+
"type": "array",
|
|
1888
|
+
"items": {
|
|
1889
|
+
"$ref": "#/components/schemas/AnyActionConfig"
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1857
1892
|
"config": {
|
|
1858
1893
|
"$ref": "#/components/schemas/ConditionConfig"
|
|
1859
1894
|
}
|
|
@@ -1910,6 +1945,18 @@
|
|
|
1910
1945
|
"$ref": "#/components/schemas/AnyAction"
|
|
1911
1946
|
}
|
|
1912
1947
|
},
|
|
1948
|
+
"edges": {
|
|
1949
|
+
"type": "array",
|
|
1950
|
+
"description": "The edges between actions which define the flow order",
|
|
1951
|
+
"items": {
|
|
1952
|
+
"$ref": "#/components/schemas/Edge"
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
"version": {
|
|
1956
|
+
"type": "number",
|
|
1957
|
+
"description": "Version of the flow",
|
|
1958
|
+
"example": 2
|
|
1959
|
+
},
|
|
1913
1960
|
"trigger_event": {
|
|
1914
1961
|
"oneOf": [
|
|
1915
1962
|
{
|
|
@@ -2522,12 +2569,6 @@
|
|
|
2522
2569
|
{
|
|
2523
2570
|
"type": "string"
|
|
2524
2571
|
},
|
|
2525
|
-
{
|
|
2526
|
-
"type": "number"
|
|
2527
|
-
},
|
|
2528
|
-
{
|
|
2529
|
-
"type": "boolean"
|
|
2530
|
-
},
|
|
2531
2572
|
{
|
|
2532
2573
|
"$ref": "#/components/schemas/EqualsIgnoreCaseCondition"
|
|
2533
2574
|
},
|
|
@@ -2569,14 +2610,7 @@
|
|
|
2569
2610
|
"anything-but": {
|
|
2570
2611
|
"type": "array",
|
|
2571
2612
|
"items": {
|
|
2572
|
-
"
|
|
2573
|
-
{
|
|
2574
|
-
"type": "string"
|
|
2575
|
-
},
|
|
2576
|
-
{
|
|
2577
|
-
"type": "integer"
|
|
2578
|
-
}
|
|
2579
|
-
]
|
|
2613
|
+
"type": "string"
|
|
2580
2614
|
}
|
|
2581
2615
|
}
|
|
2582
2616
|
}
|