@epilot/automation-client 2.9.7 → 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,9 +946,9 @@ declare namespace Components {
940
946
  id?: string;
941
947
  schema?: string;
942
948
  attribute?: string;
943
- attributeType?: "text" | "number" | "boolean" | "date" | "tag" | "country" | "email" | "phone" | "product" | "price";
949
+ attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tag" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user";
944
950
  };
945
- 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";
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[];
947
953
  }
948
954
  export interface CopyValueMapper {
@@ -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",
@@ -1806,16 +1840,24 @@
1806
1840
  "attributeType": {
1807
1841
  "type": "string",
1808
1842
  "enum": [
1843
+ "string",
1809
1844
  "text",
1810
1845
  "number",
1811
1846
  "boolean",
1812
1847
  "date",
1848
+ "datetime",
1813
1849
  "tag",
1814
1850
  "country",
1815
1851
  "email",
1816
1852
  "phone",
1817
1853
  "product",
1818
- "price"
1854
+ "price",
1855
+ "status",
1856
+ "relation",
1857
+ "multiselect",
1858
+ "select",
1859
+ "radio",
1860
+ "relation_user"
1819
1861
  ]
1820
1862
  }
1821
1863
  }
@@ -1825,6 +1867,8 @@
1825
1867
  "enum": [
1826
1868
  "equals",
1827
1869
  "not_equals",
1870
+ "any_of",
1871
+ "none_of",
1828
1872
  "contains",
1829
1873
  "not_contains",
1830
1874
  "starts_with",
@@ -1932,6 +1976,9 @@
1932
1976
  "$ref": "#/components/schemas/AnyAction"
1933
1977
  }
1934
1978
  },
1979
+ "resume_token": {
1980
+ "$ref": "#/components/schemas/ResumeToken"
1981
+ },
1935
1982
  "version": {
1936
1983
  "type": "number",
1937
1984
  "description": "Version of the flow",
@@ -2111,6 +2158,7 @@
2111
2158
  "enum": [
2112
2159
  "pending",
2113
2160
  "in_progress",
2161
+ "paused",
2114
2162
  "success",
2115
2163
  "failed",
2116
2164
  "cancelled",
@@ -2792,6 +2840,23 @@
2792
2840
  "$ref": "#/components/schemas/RetryStrategy"
2793
2841
  }
2794
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
+ ]
2795
2860
  }
2796
2861
  }
2797
2862
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.9.7",
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",