@epilot/automation-client 2.9.0 → 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 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
  * {
@@ -877,6 +877,60 @@ declare namespace Components {
877
877
  target_unique?: string[];
878
878
  }
879
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
+ }
880
934
  export interface ConditionActionConfig {
881
935
  id?: /**
882
936
  * example:
@@ -917,6 +971,7 @@ declare namespace Components {
917
971
  [name: string]: any;
918
972
  };
919
973
  };
974
+ actions?: AnyActionConfig[];
920
975
  }
921
976
  export interface ConditionConfig {
922
977
  source?: {
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
  },
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",