@epilot/automation-client 2.9.8 → 2.9.9

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={914:function(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(o(240));t.default=i.default},240: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"}]},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}]},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}]}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"}]},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}]},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}]}},"/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":{}}}}}},"components":{},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},t={},o=function o(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,o),n.exports}(914),r=exports;for(var i in o)r[i]=o[i];o.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914:function(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(o(240));t.default=i.default},240: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"}]},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}]},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}]}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"}]},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}]},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}]}},"/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":{}}}}},"/v1/automation/public/executions:resume":{"post":{"operationId":"resumeExecutionWithToken","requestBody":{"content":{"application/json":{}}}}}},"components":{},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},t={},o=function o(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,o),n.exports}(914),r=exports;for(var i in o)r[i]=o[i];o.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
@@ -144,6 +144,16 @@
144
144
  }
145
145
  }
146
146
  }
147
+ },
148
+ "/v1/automation/public/executions:resume": {
149
+ "post": {
150
+ "operationId": "resumeExecutionWithToken",
151
+ "requestBody": {
152
+ "content": {
153
+ "application/json": {}
154
+ }
155
+ }
156
+ }
147
157
  }
148
158
  },
149
159
  "components": {},
package/dist/openapi.d.ts CHANGED
@@ -669,6 +669,12 @@ declare namespace Components {
669
669
  AutomationActionId;
670
670
  conditions?: ActionCondition[];
671
671
  actions: AnyAction[];
672
+ resume_token?: /**
673
+ * A unique token to resume a paused automation execution
674
+ * example:
675
+ * eyJraWQiOiJrZXkifQ==
676
+ */
677
+ ResumeToken;
672
678
  /**
673
679
  * Version of the flow
674
680
  * example:
@@ -940,7 +946,7 @@ declare namespace Components {
940
946
  id?: string;
941
947
  schema?: string;
942
948
  attribute?: string;
943
- attributeType?: "string" | "text" | "number" | "boolean" | "date" | "tag" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation";
949
+ attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tag" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user";
944
950
  };
945
951
  operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty";
946
952
  values?: string[];
@@ -1346,7 +1352,7 @@ declare namespace Components {
1346
1352
  details?: ErrorDetail[];
1347
1353
  };
1348
1354
  }
1349
- export type ExecutionStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled" | "skipped";
1355
+ export type ExecutionStatus = "pending" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped";
1350
1356
  export interface ExistsCondition {
1351
1357
  exists?: boolean;
1352
1358
  }
@@ -1784,6 +1790,20 @@ declare namespace Components {
1784
1790
  };
1785
1791
  mode: "append" | "prepend" | "set";
1786
1792
  }
1793
+ export interface ResumeReq {
1794
+ resume_token: /**
1795
+ * A unique token to resume a paused automation execution
1796
+ * example:
1797
+ * eyJraWQiOiJrZXkifQ==
1798
+ */
1799
+ ResumeToken;
1800
+ }
1801
+ /**
1802
+ * A unique token to resume a paused automation execution
1803
+ * example:
1804
+ * eyJraWQiOiJrZXkifQ==
1805
+ */
1806
+ export type ResumeToken = string;
1787
1807
  export interface RetryReq {
1788
1808
  retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
1789
1809
  }
@@ -1920,6 +1940,13 @@ declare namespace Components {
1920
1940
  * When true, it lets to send only the email by skip creating the thread & message entities.
1921
1941
  */
1922
1942
  skip_creating_entities?: boolean;
1943
+ /**
1944
+ * Pause automation execution after sending email to wait for a confirmation link to be clicked.
1945
+ *
1946
+ * The email template should contain a confirmation link using the variable `{{confirmation_url}}`
1947
+ *
1948
+ */
1949
+ wait_for_confirmation?: boolean;
1923
1950
  /**
1924
1951
  * Include extra file attachments in sent email.
1925
1952
  * Attachments in email template will be sent regardless of this configuration.
@@ -2482,6 +2509,15 @@ declare namespace Paths {
2482
2509
  export type $200 = Components.Schemas.AutomationFlow;
2483
2510
  }
2484
2511
  }
2512
+ namespace ResumeExecutionWithToken {
2513
+ export type RequestBody = Components.Schemas.ResumeReq;
2514
+ namespace Responses {
2515
+ export interface $200 {
2516
+ }
2517
+ export interface $400 {
2518
+ }
2519
+ }
2520
+ }
2485
2521
  namespace RetriggerAction {
2486
2522
  namespace Parameters {
2487
2523
  export type ActionId = /**
@@ -2647,6 +2683,21 @@ export interface OperationMethods {
2647
2683
  data?: Paths.RetriggerAction.RequestBody,
2648
2684
  config?: AxiosRequestConfig
2649
2685
  ): OperationResponse<Paths.RetriggerAction.Responses.$200>
2686
+ /**
2687
+ * resumeExecutionWithToken - resumeExecutionWithToken
2688
+ *
2689
+ * Resume a paused automation execution using a unique resume token.
2690
+ *
2691
+ * This public API is normally called when a user lands on a confirmation page via email link.
2692
+ *
2693
+ * Example link: https://automation.epilot.io/confirm-email?token=eyJraWQiOiJrZXkifQ...
2694
+ *
2695
+ */
2696
+ 'resumeExecutionWithToken'(
2697
+ parameters?: Parameters<UnknownParamsObject> | null,
2698
+ data?: Paths.ResumeExecutionWithToken.RequestBody,
2699
+ config?: AxiosRequestConfig
2700
+ ): OperationResponse<Paths.ResumeExecutionWithToken.Responses.$200>
2650
2701
  }
2651
2702
 
2652
2703
  export interface PathsDictionary {
@@ -2760,6 +2811,23 @@ export interface PathsDictionary {
2760
2811
  config?: AxiosRequestConfig
2761
2812
  ): OperationResponse<Paths.RetriggerAction.Responses.$200>
2762
2813
  }
2814
+ ['/v1/automation/public/executions:resume']: {
2815
+ /**
2816
+ * resumeExecutionWithToken - resumeExecutionWithToken
2817
+ *
2818
+ * Resume a paused automation execution using a unique resume token.
2819
+ *
2820
+ * This public API is normally called when a user lands on a confirmation page via email link.
2821
+ *
2822
+ * Example link: https://automation.epilot.io/confirm-email?token=eyJraWQiOiJrZXkifQ...
2823
+ *
2824
+ */
2825
+ 'post'(
2826
+ parameters?: Parameters<UnknownParamsObject> | null,
2827
+ data?: Paths.ResumeExecutionWithToken.RequestBody,
2828
+ config?: AxiosRequestConfig
2829
+ ): OperationResponse<Paths.ResumeExecutionWithToken.Responses.$200>
2830
+ }
2763
2831
  }
2764
2832
 
2765
2833
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
package/dist/openapi.json CHANGED
@@ -402,6 +402,35 @@
402
402
  }
403
403
  }
404
404
  }
405
+ },
406
+ "/v1/automation/public/executions:resume": {
407
+ "post": {
408
+ "operationId": "resumeExecutionWithToken",
409
+ "summary": "resumeExecutionWithToken",
410
+ "description": "Resume a paused automation execution using a unique resume token.\n\nThis public API is normally called when a user lands on a confirmation page via email link.\n\nExample link: https://automation.epilot.io/confirm-email?token=eyJraWQiOiJrZXkifQ...\n",
411
+ "tags": [
412
+ "executions"
413
+ ],
414
+ "security": [],
415
+ "requestBody": {
416
+ "description": "Retry request details.",
417
+ "content": {
418
+ "application/json": {
419
+ "schema": {
420
+ "$ref": "#/components/schemas/ResumeReq"
421
+ }
422
+ }
423
+ }
424
+ },
425
+ "responses": {
426
+ "200": {
427
+ "description": "execution resumed with success"
428
+ },
429
+ "400": {
430
+ "description": "execution could not be resumed"
431
+ }
432
+ }
433
+ }
405
434
  }
406
435
  },
407
436
  "components": {
@@ -1407,6 +1436,11 @@
1407
1436
  "description": "When true, it lets to send only the email by skip creating the thread & message entities.",
1408
1437
  "default": false
1409
1438
  },
1439
+ "wait_for_confirmation": {
1440
+ "type": "boolean",
1441
+ "description": "Pause automation execution after sending email to wait for a confirmation link to be clicked.\n\nThe email template should contain a confirmation link using the variable `{{confirmation_url}}`\n",
1442
+ "default": false
1443
+ },
1410
1444
  "attachments": {
1411
1445
  "type": "array",
1412
1446
  "description": "Include extra file attachments in sent email.\nAttachments in email template will be sent regardless of this configuration.\n",
@@ -1811,6 +1845,7 @@
1811
1845
  "number",
1812
1846
  "boolean",
1813
1847
  "date",
1848
+ "datetime",
1814
1849
  "tag",
1815
1850
  "country",
1816
1851
  "email",
@@ -1818,7 +1853,11 @@
1818
1853
  "product",
1819
1854
  "price",
1820
1855
  "status",
1821
- "relation"
1856
+ "relation",
1857
+ "multiselect",
1858
+ "select",
1859
+ "radio",
1860
+ "relation_user"
1822
1861
  ]
1823
1862
  }
1824
1863
  }
@@ -1937,6 +1976,9 @@
1937
1976
  "$ref": "#/components/schemas/AnyAction"
1938
1977
  }
1939
1978
  },
1979
+ "resume_token": {
1980
+ "$ref": "#/components/schemas/ResumeToken"
1981
+ },
1940
1982
  "version": {
1941
1983
  "type": "number",
1942
1984
  "description": "Version of the flow",
@@ -2116,6 +2158,7 @@
2116
2158
  "enum": [
2117
2159
  "pending",
2118
2160
  "in_progress",
2161
+ "paused",
2119
2162
  "success",
2120
2163
  "failed",
2121
2164
  "cancelled",
@@ -2797,6 +2840,23 @@
2797
2840
  "$ref": "#/components/schemas/RetryStrategy"
2798
2841
  }
2799
2842
  }
2843
+ },
2844
+ "ResumeToken": {
2845
+ "type": "string",
2846
+ "description": "A unique token to resume a paused automation execution",
2847
+ "example": "eyJraWQiOiJrZXkifQ=="
2848
+ },
2849
+ "ResumeReq": {
2850
+ "type": "object",
2851
+ "additionalProperties": false,
2852
+ "properties": {
2853
+ "resume_token": {
2854
+ "$ref": "#/components/schemas/ResumeToken"
2855
+ }
2856
+ },
2857
+ "required": [
2858
+ "resume_token"
2859
+ ]
2800
2860
  }
2801
2861
  }
2802
2862
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.9.8",
3
+ "version": "2.9.9",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",