@epilot/automation-client 2.8.2 → 2.8.5
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 +100 -2
- package/dist/openapi.json +149 -6
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare namespace Components {
|
|
|
22
22
|
* submission
|
|
23
23
|
*/
|
|
24
24
|
schema?: string;
|
|
25
|
-
types?: ("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal")[];
|
|
25
|
+
types?: (("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword") | string)[];
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | AutomationAction;
|
|
@@ -225,7 +225,7 @@ declare namespace Components {
|
|
|
225
225
|
* }
|
|
226
226
|
* }
|
|
227
227
|
*/
|
|
228
|
-
SendEmailActionConfig | /* Creates an order entity with prices from journey */ CartCheckoutActionConfig | AutomationActionConfig;
|
|
228
|
+
SendEmailActionConfig | /* Creates an order entity with prices from journey */ CartCheckoutActionConfig | AutomationActionConfig | ConditionActionConfig;
|
|
229
229
|
export type AnyTrigger = FrontendSubmitTrigger | JourneySubmitTrigger | ApiSubmissionTrigger | /**
|
|
230
230
|
* - If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.
|
|
231
231
|
* - The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`
|
|
@@ -655,7 +655,23 @@ declare namespace Components {
|
|
|
655
655
|
* submission
|
|
656
656
|
*/
|
|
657
657
|
entity_schema?: string;
|
|
658
|
+
/**
|
|
659
|
+
* The actions (nodes) of the automation flow
|
|
660
|
+
*/
|
|
658
661
|
actions: AnyActionConfig[];
|
|
662
|
+
/**
|
|
663
|
+
* The edges between actions which define the flow order
|
|
664
|
+
*/
|
|
665
|
+
edges?: /**
|
|
666
|
+
* example:
|
|
667
|
+
* {
|
|
668
|
+
* "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
|
|
669
|
+
* "start": "3567cabc-587f-4ba2-8752-1f3da0100d1f",
|
|
670
|
+
* "end": "4e29af6c-9824-461c-bcfb-505840a949ba",
|
|
671
|
+
* "condition_output": true
|
|
672
|
+
* }
|
|
673
|
+
*/
|
|
674
|
+
Edge[];
|
|
659
675
|
/**
|
|
660
676
|
* Number of automation executions that ran
|
|
661
677
|
* example:
|
|
@@ -686,6 +702,12 @@ declare namespace Components {
|
|
|
686
702
|
* Determines if the flow is a system generated flow
|
|
687
703
|
*/
|
|
688
704
|
system_flow?: boolean;
|
|
705
|
+
/**
|
|
706
|
+
* Version of the flow
|
|
707
|
+
* example:
|
|
708
|
+
* 2
|
|
709
|
+
*/
|
|
710
|
+
version?: number;
|
|
689
711
|
}
|
|
690
712
|
/**
|
|
691
713
|
* example:
|
|
@@ -820,6 +842,52 @@ declare namespace Components {
|
|
|
820
842
|
target_unique?: string[];
|
|
821
843
|
}
|
|
822
844
|
export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty";
|
|
845
|
+
export interface ConditionActionConfig {
|
|
846
|
+
id?: /**
|
|
847
|
+
* example:
|
|
848
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
849
|
+
*/
|
|
850
|
+
AutomationActionId;
|
|
851
|
+
flow_action_id?: /**
|
|
852
|
+
* example:
|
|
853
|
+
* 9ec3711b-db63-449c-b894-54d5bb622a8f
|
|
854
|
+
*/
|
|
855
|
+
AutomationActionId;
|
|
856
|
+
name?: string;
|
|
857
|
+
type?: "condition";
|
|
858
|
+
config?: ConditionConfig;
|
|
859
|
+
/**
|
|
860
|
+
* Whether to stop execution in a failed state if this action fails
|
|
861
|
+
*/
|
|
862
|
+
allow_failure?: boolean;
|
|
863
|
+
/**
|
|
864
|
+
* Flag indicating whether the action was created automatically or manually
|
|
865
|
+
*/
|
|
866
|
+
created_automatically?: boolean;
|
|
867
|
+
reason?: {
|
|
868
|
+
/**
|
|
869
|
+
* Why the action has to be skipped/failed
|
|
870
|
+
* example:
|
|
871
|
+
* There are no registered portal users for the given emails, hence skipping the action
|
|
872
|
+
*/
|
|
873
|
+
message?: string;
|
|
874
|
+
/**
|
|
875
|
+
* Extra metadata about the skipping reason - such as a certain condition not met, etc.
|
|
876
|
+
*/
|
|
877
|
+
payload?: {
|
|
878
|
+
[name: string]: any;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
export interface ConditionConfig {
|
|
883
|
+
source?: {
|
|
884
|
+
id?: string;
|
|
885
|
+
type?: string;
|
|
886
|
+
attributes?: string;
|
|
887
|
+
};
|
|
888
|
+
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";
|
|
889
|
+
values?: string[];
|
|
890
|
+
}
|
|
823
891
|
export interface CopyValueMapper {
|
|
824
892
|
mode: /**
|
|
825
893
|
* - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.
|
|
@@ -947,6 +1015,30 @@ declare namespace Components {
|
|
|
947
1015
|
export type DiffAdded = FilterConditionOnEvent;
|
|
948
1016
|
export type DiffDeleted = FilterConditionOnEvent;
|
|
949
1017
|
export type DiffUpdated = FilterConditionOnEvent;
|
|
1018
|
+
/**
|
|
1019
|
+
* example:
|
|
1020
|
+
* {
|
|
1021
|
+
* "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
|
|
1022
|
+
* "start": "3567cabc-587f-4ba2-8752-1f3da0100d1f",
|
|
1023
|
+
* "end": "4e29af6c-9824-461c-bcfb-505840a949ba",
|
|
1024
|
+
* "condition_output": true
|
|
1025
|
+
* }
|
|
1026
|
+
*/
|
|
1027
|
+
export interface Edge {
|
|
1028
|
+
id: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* The action id from which the edge starts
|
|
1031
|
+
*/
|
|
1032
|
+
start?: string;
|
|
1033
|
+
/**
|
|
1034
|
+
* The action id to which the edge ends
|
|
1035
|
+
*/
|
|
1036
|
+
end?: string;
|
|
1037
|
+
/**
|
|
1038
|
+
* The condition output of the edge (binary)
|
|
1039
|
+
*/
|
|
1040
|
+
condition_output?: boolean;
|
|
1041
|
+
}
|
|
950
1042
|
/**
|
|
951
1043
|
* example:
|
|
952
1044
|
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
|
|
@@ -1168,11 +1260,17 @@ declare namespace Components {
|
|
|
1168
1260
|
"equals-ignore-case"?: string;
|
|
1169
1261
|
}
|
|
1170
1262
|
export type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR";
|
|
1263
|
+
export interface ErrorDetail {
|
|
1264
|
+
explanation: string;
|
|
1265
|
+
context?: string;
|
|
1266
|
+
id?: string;
|
|
1267
|
+
}
|
|
1171
1268
|
export interface ErrorOutput {
|
|
1172
1269
|
error_code: ErrorCode;
|
|
1173
1270
|
error_reason: string;
|
|
1174
1271
|
error_info?: {
|
|
1175
1272
|
[name: string]: any;
|
|
1273
|
+
details?: ErrorDetail[];
|
|
1176
1274
|
};
|
|
1177
1275
|
}
|
|
1178
1276
|
export type ExecutionStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled" | "skipped";
|
package/dist/openapi.json
CHANGED
|
@@ -457,11 +457,19 @@
|
|
|
457
457
|
},
|
|
458
458
|
"actions": {
|
|
459
459
|
"type": "array",
|
|
460
|
+
"description": "The actions (nodes) of the automation flow",
|
|
460
461
|
"items": {
|
|
461
462
|
"$ref": "#/components/schemas/AnyActionConfig"
|
|
462
463
|
},
|
|
463
464
|
"readOnly": true
|
|
464
465
|
},
|
|
466
|
+
"edges": {
|
|
467
|
+
"type": "array",
|
|
468
|
+
"description": "The edges between actions which define the flow order",
|
|
469
|
+
"items": {
|
|
470
|
+
"$ref": "#/components/schemas/Edge"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
465
473
|
"runs": {
|
|
466
474
|
"type": "number",
|
|
467
475
|
"example": 7,
|
|
@@ -498,6 +506,11 @@
|
|
|
498
506
|
"system_flow": {
|
|
499
507
|
"type": "boolean",
|
|
500
508
|
"description": "Determines if the flow is a system generated flow"
|
|
509
|
+
},
|
|
510
|
+
"version": {
|
|
511
|
+
"type": "number",
|
|
512
|
+
"description": "Version of the flow",
|
|
513
|
+
"example": 2
|
|
501
514
|
}
|
|
502
515
|
},
|
|
503
516
|
"required": [
|
|
@@ -506,6 +519,37 @@
|
|
|
506
519
|
"actions"
|
|
507
520
|
]
|
|
508
521
|
},
|
|
522
|
+
"Edge": {
|
|
523
|
+
"type": "object",
|
|
524
|
+
"properties": {
|
|
525
|
+
"id": {
|
|
526
|
+
"type": "string"
|
|
527
|
+
},
|
|
528
|
+
"start": {
|
|
529
|
+
"type": "string",
|
|
530
|
+
"description": "The action id from which the edge starts"
|
|
531
|
+
},
|
|
532
|
+
"end": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"description": "The action id to which the edge ends"
|
|
535
|
+
},
|
|
536
|
+
"condition_output": {
|
|
537
|
+
"type": "boolean",
|
|
538
|
+
"description": "The condition output of the edge (binary)"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"required": [
|
|
542
|
+
"id",
|
|
543
|
+
"source",
|
|
544
|
+
"target"
|
|
545
|
+
],
|
|
546
|
+
"example": {
|
|
547
|
+
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
|
|
548
|
+
"start": "3567cabc-587f-4ba2-8752-1f3da0100d1f",
|
|
549
|
+
"end": "4e29af6c-9824-461c-bcfb-505840a949ba",
|
|
550
|
+
"condition_output": true
|
|
551
|
+
}
|
|
552
|
+
},
|
|
509
553
|
"SearchAutomationsResp": {
|
|
510
554
|
"type": "object",
|
|
511
555
|
"properties": {
|
|
@@ -596,6 +640,9 @@
|
|
|
596
640
|
},
|
|
597
641
|
{
|
|
598
642
|
"$ref": "#/components/schemas/AutomationActionConfig"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"$ref": "#/components/schemas/ConditionActionConfig"
|
|
599
646
|
}
|
|
600
647
|
]
|
|
601
648
|
},
|
|
@@ -697,7 +744,15 @@
|
|
|
697
744
|
},
|
|
698
745
|
"error_info": {
|
|
699
746
|
"type": "object",
|
|
700
|
-
"additionalProperties": true
|
|
747
|
+
"additionalProperties": true,
|
|
748
|
+
"properties": {
|
|
749
|
+
"details": {
|
|
750
|
+
"type": "array",
|
|
751
|
+
"items": {
|
|
752
|
+
"$ref": "#/components/schemas/ErrorDetail"
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
701
756
|
}
|
|
702
757
|
},
|
|
703
758
|
"required": [
|
|
@@ -719,6 +774,23 @@
|
|
|
719
774
|
"TEMPLATE_ERROR"
|
|
720
775
|
]
|
|
721
776
|
},
|
|
777
|
+
"ErrorDetail": {
|
|
778
|
+
"type": "object",
|
|
779
|
+
"properties": {
|
|
780
|
+
"explanation": {
|
|
781
|
+
"type": "string"
|
|
782
|
+
},
|
|
783
|
+
"context": {
|
|
784
|
+
"type": "string"
|
|
785
|
+
},
|
|
786
|
+
"id": {
|
|
787
|
+
"type": "string"
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
"required": [
|
|
791
|
+
"explanation"
|
|
792
|
+
]
|
|
793
|
+
},
|
|
722
794
|
"CartCheckoutActionConfig": {
|
|
723
795
|
"allOf": [
|
|
724
796
|
{
|
|
@@ -1718,6 +1790,68 @@
|
|
|
1718
1790
|
}
|
|
1719
1791
|
}
|
|
1720
1792
|
},
|
|
1793
|
+
"ConditionConfig": {
|
|
1794
|
+
"type": "object",
|
|
1795
|
+
"properties": {
|
|
1796
|
+
"source": {
|
|
1797
|
+
"type": "object",
|
|
1798
|
+
"properties": {
|
|
1799
|
+
"id": {
|
|
1800
|
+
"type": "string"
|
|
1801
|
+
},
|
|
1802
|
+
"type": {
|
|
1803
|
+
"type": "string"
|
|
1804
|
+
},
|
|
1805
|
+
"attributes": {
|
|
1806
|
+
"type": "string"
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
"operation": {
|
|
1811
|
+
"type": "string",
|
|
1812
|
+
"enum": [
|
|
1813
|
+
"equals",
|
|
1814
|
+
"not_equals",
|
|
1815
|
+
"contains",
|
|
1816
|
+
"not_contains",
|
|
1817
|
+
"starts_with",
|
|
1818
|
+
"ends_with",
|
|
1819
|
+
"greater_than",
|
|
1820
|
+
"less_than",
|
|
1821
|
+
"greater_than_or_equals",
|
|
1822
|
+
"less_than_or_equals",
|
|
1823
|
+
"is_empty",
|
|
1824
|
+
"is_not_empty"
|
|
1825
|
+
]
|
|
1826
|
+
},
|
|
1827
|
+
"values": {
|
|
1828
|
+
"type": "array",
|
|
1829
|
+
"items": {
|
|
1830
|
+
"type": "string"
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
"ConditionActionConfig": {
|
|
1836
|
+
"allOf": [
|
|
1837
|
+
{
|
|
1838
|
+
"$ref": "#/components/schemas/AutomationActionConfig"
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
"type": "object",
|
|
1842
|
+
"properties": {
|
|
1843
|
+
"type": {
|
|
1844
|
+
"enum": [
|
|
1845
|
+
"condition"
|
|
1846
|
+
]
|
|
1847
|
+
},
|
|
1848
|
+
"config": {
|
|
1849
|
+
"$ref": "#/components/schemas/ConditionConfig"
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1721
1855
|
"AutomationExecutionId": {
|
|
1722
1856
|
"type": "string",
|
|
1723
1857
|
"example": "9baf184f-bc81-4128-bca3-d974c90a12c4"
|
|
@@ -2238,11 +2372,20 @@
|
|
|
2238
2372
|
"types": {
|
|
2239
2373
|
"type": "array",
|
|
2240
2374
|
"items": {
|
|
2241
|
-
"
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2375
|
+
"anyOf": [
|
|
2376
|
+
{
|
|
2377
|
+
"type": "string",
|
|
2378
|
+
"enum": [
|
|
2379
|
+
"CreateMeterReading",
|
|
2380
|
+
"UpdateMeterReading",
|
|
2381
|
+
"DocDownloadedFromPortal",
|
|
2382
|
+
"PortalUserResetPassword",
|
|
2383
|
+
"PortalUserResetForgotPassword"
|
|
2384
|
+
]
|
|
2385
|
+
},
|
|
2386
|
+
{
|
|
2387
|
+
"type": "string"
|
|
2388
|
+
}
|
|
2246
2389
|
]
|
|
2247
2390
|
}
|
|
2248
2391
|
}
|