@epilot/automation-client 2.27.0 → 2.29.0

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={330:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.default},466: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"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows:batchGet":{"post":{"operationId":"batchGetFlows","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs":{"post":{"operationId":"bulkTriggerExecutions","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs/{job_id}":{"get":{"operationId":"getBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}}},"/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":{}}},"responses":{}}},"/v1/automation/public/executions:resume":{"post":{"operationId":"resumeExecutionWithToken","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}/schedules/{schedule_id}":{"delete":{"operationId":"cancelSchedule","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"schedule_id","in":"path","required":true}],"responses":{}}}},"components":{"responses":{"NotFoundError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},t={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(330),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.default},466(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"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"createFlow","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows:batchGet":{"post":{"operationId":"batchGetFlows","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}},"put":{"operationId":"putFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFlow","parameters":[{"name":"flow_id","in":"path","required":true}],"responses":{}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","parameters":[{"name":"entity_id","in":"query"},{"name":"size","in":"query"},{"name":"from","in":"query"},{"name":"include_flows","in":"query"}],"responses":{}},"post":{"operationId":"startExecution","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs":{"post":{"operationId":"bulkTriggerExecutions","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/bulk-jobs/{job_id}":{"get":{"operationId":"getBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchBulkJob","parameters":[{"name":"job_id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"cancelExecution","parameters":[{"name":"execution_id","in":"path","required":true}],"responses":{}}},"/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":{}}},"responses":{}}},"/v1/automation/public/executions:resume":{"post":{"operationId":"resumeExecutionWithToken","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/automation/executions/{execution_id}/schedules/{schedule_id}":{"delete":{"operationId":"cancelSchedule","parameters":[{"name":"execution_id","in":"path","required":true},{"name":"schedule_id","in":"path","required":true}],"responses":{}}}},"components":{"responses":{"NotFoundError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://automation.sls.epilot.io"}]}')}},t={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(330),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -598,6 +598,77 @@ declare namespace Components {
598
598
  */
599
599
  target_unique?: string[];
600
600
  }
601
+ export interface AssignThreadAction {
602
+ id?: /**
603
+ * example:
604
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
605
+ */
606
+ AutomationActionId;
607
+ flow_action_id?: /**
608
+ * example:
609
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
610
+ */
611
+ AutomationActionId;
612
+ name?: string;
613
+ type?: "assign-thread";
614
+ config?: AssignThreadConfig;
615
+ /**
616
+ * Whether to stop execution in a failed state if this action fails
617
+ */
618
+ allow_failure?: boolean;
619
+ /**
620
+ * Flag indicating whether the action was created automatically or manually
621
+ */
622
+ created_automatically?: boolean;
623
+ /**
624
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
625
+ */
626
+ is_bulk_action?: boolean;
627
+ reason?: {
628
+ /**
629
+ * Why the action has to be skipped/failed
630
+ * example:
631
+ * There are no registered portal users for the given emails, hence skipping the action
632
+ */
633
+ message?: string;
634
+ /**
635
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
636
+ */
637
+ payload?: {
638
+ [name: string]: any;
639
+ };
640
+ };
641
+ /**
642
+ * Condition Id to be checked before executing the action
643
+ */
644
+ condition_id?: string;
645
+ /**
646
+ * Schedule Id which indicates the schedule of the action
647
+ */
648
+ schedule_id?: string;
649
+ execution_status?: ExecutionStatus;
650
+ started_at?: string;
651
+ updated_at?: string;
652
+ /**
653
+ * example:
654
+ * {}
655
+ */
656
+ outputs?: {
657
+ [name: string]: any;
658
+ };
659
+ error_output?: ErrorOutput;
660
+ retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
661
+ }
662
+ export interface AssignThreadConfig {
663
+ /**
664
+ * Assignees to remove from the thread, if they exist
665
+ */
666
+ remove?: string[];
667
+ /**
668
+ * Assignees to add to the thread
669
+ */
670
+ add?: string[];
671
+ }
601
672
  /**
602
673
  * example:
603
674
  * [
@@ -2807,7 +2878,14 @@ declare namespace Components {
2807
2878
  id?: string; // uuid
2808
2879
  type: "new_email_thread";
2809
2880
  configuration: {
2810
- direction?: "INBOUND" | "OUTBOUND" | "BOTH";
2881
+ /**
2882
+ * A list of shared inbox IDs that the email thread should be matched against.
2883
+ */
2884
+ shared_inbox_ids?: string[];
2885
+ /**
2886
+ * Whether the trigger should be matched against only inbound, outbound emails or both.
2887
+ */
2888
+ direction: "INBOUND" | "OUTBOUND" | "BOTH";
2811
2889
  };
2812
2890
  }
2813
2891
  export interface NumericCondition {
@@ -4726,6 +4804,8 @@ export type AnythingButCondition = Components.Schemas.AnythingButCondition;
4726
4804
  export type ApiCallerContext = Components.Schemas.ApiCallerContext;
4727
4805
  export type ApiSubmissionTrigger = Components.Schemas.ApiSubmissionTrigger;
4728
4806
  export type AppendValueMapper = Components.Schemas.AppendValueMapper;
4807
+ export type AssignThreadAction = Components.Schemas.AssignThreadAction;
4808
+ export type AssignThreadConfig = Components.Schemas.AssignThreadConfig;
4729
4809
  export type AssignUsersToStep = Components.Schemas.AssignUsersToStep;
4730
4810
  export type AutomationAction = Components.Schemas.AutomationAction;
4731
4811
  export type AutomationActionConfig = Components.Schemas.AutomationActionConfig;
package/dist/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Automation API",
5
5
  "description": "API Backend for epilot Automation Workflows feature",
6
- "version": "1.2.0"
6
+ "version": "1.4.0"
7
7
  },
8
8
  "tags": [
9
9
  {
@@ -2061,6 +2061,26 @@
2061
2061
  }
2062
2062
  ]
2063
2063
  },
2064
+ "AssignThreadAction": {
2065
+ "allOf": [
2066
+ {
2067
+ "$ref": "#/components/schemas/AutomationAction"
2068
+ },
2069
+ {
2070
+ "type": "object",
2071
+ "properties": {
2072
+ "type": {
2073
+ "enum": [
2074
+ "assign-thread"
2075
+ ]
2076
+ },
2077
+ "config": {
2078
+ "$ref": "#/components/schemas/AssignThreadConfig"
2079
+ }
2080
+ }
2081
+ }
2082
+ ]
2083
+ },
2064
2084
  "MoveThreadConfig": {
2065
2085
  "type": "object",
2066
2086
  "properties": {
@@ -2070,6 +2090,25 @@
2070
2090
  }
2071
2091
  }
2072
2092
  },
2093
+ "AssignThreadConfig": {
2094
+ "type": "object",
2095
+ "properties": {
2096
+ "remove": {
2097
+ "type": "array",
2098
+ "description": "Assignees to remove from the thread, if they exist",
2099
+ "items": {
2100
+ "type": "string"
2101
+ }
2102
+ },
2103
+ "add": {
2104
+ "type": "array",
2105
+ "description": "Assignees to add to the thread",
2106
+ "items": {
2107
+ "type": "string"
2108
+ }
2109
+ }
2110
+ }
2111
+ },
2073
2112
  "SendEmailActionConfig": {
2074
2113
  "allOf": [
2075
2114
  {
@@ -3970,9 +4009,20 @@
3970
4009
  },
3971
4010
  "configuration": {
3972
4011
  "type": "object",
4012
+ "required": [
4013
+ "direction"
4014
+ ],
3973
4015
  "properties": {
4016
+ "shared_inbox_ids": {
4017
+ "type": "array",
4018
+ "description": "A list of shared inbox IDs that the email thread should be matched against.",
4019
+ "items": {
4020
+ "type": "string"
4021
+ }
4022
+ },
3974
4023
  "direction": {
3975
4024
  "type": "string",
4025
+ "description": "Whether the trigger should be matched against only inbound, outbound emails or both.",
3976
4026
  "enum": [
3977
4027
  "INBOUND",
3978
4028
  "OUTBOUND",
@@ -4236,6 +4286,7 @@
4236
4286
  },
4237
4287
  "EntityOperation": {
4238
4288
  "type": "string",
4289
+ "nullable": true,
4239
4290
  "enum": [
4240
4291
  "createEntity",
4241
4292
  "updateEntity",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.27.0",
3
+ "version": "2.29.0",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",