@epilot/automation-client 2.25.0 → 2.27.0-rc.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
@@ -126,7 +126,7 @@ declare namespace Components {
126
126
  types?: (("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal") | string)[];
127
127
  };
128
128
  }
129
- export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerShareEntityAction | TriggerWebhookAction | InformERPAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction | FlowExecutionCancelAction;
129
+ export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerShareEntityAction | TriggerWebhookAction | InformERPAction | TriggerEventAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction | FlowExecutionCancelAction;
130
130
  export type AnyActionConfig = /**
131
131
  * example:
132
132
  * {
@@ -312,6 +312,20 @@ declare namespace Components {
312
312
  * }
313
313
  */
314
314
  InformERPActionConfig | /**
315
+ * example:
316
+ * {
317
+ * "id": "2520gja-2sgmsaga-0asg-822jgal",
318
+ * "name": "Trigger Event",
319
+ * "type": "trigger-event",
320
+ * "config": {
321
+ * "event_name": "my_custom_event",
322
+ * "event_inputs": {
323
+ * "key": "value"
324
+ * }
325
+ * }
326
+ * }
327
+ */
328
+ TriggerEventActionConfig | /**
315
329
  * example:
316
330
  * {
317
331
  * "id": "08g988-ojt2jtaga-292h-8978gsaga",
@@ -2718,6 +2732,73 @@ declare namespace Components {
2718
2732
  */
2719
2733
  version?: number;
2720
2734
  }
2735
+ export interface MoveThreadAction {
2736
+ id?: /**
2737
+ * example:
2738
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2739
+ */
2740
+ AutomationActionId;
2741
+ flow_action_id?: /**
2742
+ * example:
2743
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2744
+ */
2745
+ AutomationActionId;
2746
+ name?: string;
2747
+ type?: "move-thread";
2748
+ config?: MoveThreadConfig;
2749
+ /**
2750
+ * Whether to stop execution in a failed state if this action fails
2751
+ */
2752
+ allow_failure?: boolean;
2753
+ /**
2754
+ * Flag indicating whether the action was created automatically or manually
2755
+ */
2756
+ created_automatically?: boolean;
2757
+ /**
2758
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
2759
+ */
2760
+ is_bulk_action?: boolean;
2761
+ reason?: {
2762
+ /**
2763
+ * Why the action has to be skipped/failed
2764
+ * example:
2765
+ * There are no registered portal users for the given emails, hence skipping the action
2766
+ */
2767
+ message?: string;
2768
+ /**
2769
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
2770
+ */
2771
+ payload?: {
2772
+ [name: string]: any;
2773
+ };
2774
+ };
2775
+ /**
2776
+ * Condition Id to be checked before executing the action
2777
+ */
2778
+ condition_id?: string;
2779
+ /**
2780
+ * Schedule Id which indicates the schedule of the action
2781
+ */
2782
+ schedule_id?: string;
2783
+ execution_status?: ExecutionStatus;
2784
+ started_at?: string;
2785
+ updated_at?: string;
2786
+ /**
2787
+ * example:
2788
+ * {}
2789
+ */
2790
+ outputs?: {
2791
+ [name: string]: any;
2792
+ };
2793
+ error_output?: ErrorOutput;
2794
+ retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
2795
+ }
2796
+ export interface MoveThreadConfig {
2797
+ /**
2798
+ * ID of the inbox where the thread should be moved to
2799
+ */
2800
+ target_inbox_id?: string;
2801
+ }
2721
2802
  export interface NumericCondition {
2722
2803
  numeric?: (string | number)[];
2723
2804
  }
@@ -3115,6 +3196,145 @@ declare namespace Components {
3115
3196
  export interface TriggerContext {
3116
3197
  [name: string]: string;
3117
3198
  }
3199
+ export interface TriggerEventAction {
3200
+ id?: /**
3201
+ * example:
3202
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
3203
+ */
3204
+ AutomationActionId;
3205
+ flow_action_id?: /**
3206
+ * example:
3207
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
3208
+ */
3209
+ AutomationActionId;
3210
+ name?: string;
3211
+ type?: "trigger-event";
3212
+ config?: /* Configuration for triggering an event catalog event */ TriggerEventConfig;
3213
+ /**
3214
+ * Whether to stop execution in a failed state if this action fails
3215
+ */
3216
+ allow_failure?: boolean;
3217
+ /**
3218
+ * Flag indicating whether the action was created automatically or manually
3219
+ */
3220
+ created_automatically?: boolean;
3221
+ /**
3222
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
3223
+ */
3224
+ is_bulk_action?: boolean;
3225
+ reason?: {
3226
+ /**
3227
+ * Why the action has to be skipped/failed
3228
+ * example:
3229
+ * There are no registered portal users for the given emails, hence skipping the action
3230
+ */
3231
+ message?: string;
3232
+ /**
3233
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
3234
+ */
3235
+ payload?: {
3236
+ [name: string]: any;
3237
+ };
3238
+ };
3239
+ /**
3240
+ * Condition Id to be checked before executing the action
3241
+ */
3242
+ condition_id?: string;
3243
+ /**
3244
+ * Schedule Id which indicates the schedule of the action
3245
+ */
3246
+ schedule_id?: string;
3247
+ execution_status?: ExecutionStatus;
3248
+ started_at?: string;
3249
+ updated_at?: string;
3250
+ /**
3251
+ * example:
3252
+ * {}
3253
+ */
3254
+ outputs?: {
3255
+ [name: string]: any;
3256
+ };
3257
+ error_output?: ErrorOutput;
3258
+ retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
3259
+ }
3260
+ /**
3261
+ * example:
3262
+ * {
3263
+ * "id": "2520gja-2sgmsaga-0asg-822jgal",
3264
+ * "name": "Trigger Event",
3265
+ * "type": "trigger-event",
3266
+ * "config": {
3267
+ * "event_name": "my_custom_event",
3268
+ * "event_inputs": {
3269
+ * "key": "value"
3270
+ * }
3271
+ * }
3272
+ * }
3273
+ */
3274
+ export interface TriggerEventActionConfig {
3275
+ id?: /**
3276
+ * example:
3277
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
3278
+ */
3279
+ AutomationActionId;
3280
+ flow_action_id?: /**
3281
+ * example:
3282
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
3283
+ */
3284
+ AutomationActionId;
3285
+ name?: string;
3286
+ type?: "trigger-event";
3287
+ config?: /* Configuration for triggering an event catalog event */ TriggerEventConfig;
3288
+ /**
3289
+ * Whether to stop execution in a failed state if this action fails
3290
+ */
3291
+ allow_failure?: boolean;
3292
+ /**
3293
+ * Flag indicating whether the action was created automatically or manually
3294
+ */
3295
+ created_automatically?: boolean;
3296
+ /**
3297
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
3298
+ */
3299
+ is_bulk_action?: boolean;
3300
+ reason?: {
3301
+ /**
3302
+ * Why the action has to be skipped/failed
3303
+ * example:
3304
+ * There are no registered portal users for the given emails, hence skipping the action
3305
+ */
3306
+ message?: string;
3307
+ /**
3308
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
3309
+ */
3310
+ payload?: {
3311
+ [name: string]: any;
3312
+ };
3313
+ };
3314
+ /**
3315
+ * Condition Id to be checked before executing the action
3316
+ */
3317
+ condition_id?: string;
3318
+ /**
3319
+ * Schedule Id which indicates the schedule of the action
3320
+ */
3321
+ schedule_id?: string;
3322
+ }
3323
+ /**
3324
+ * Configuration for triggering an event catalog event
3325
+ */
3326
+ export interface TriggerEventConfig {
3327
+ /**
3328
+ * The event catalog event name to trigger
3329
+ */
3330
+ event_name: string;
3331
+ /**
3332
+ * Inputs to be passed to trigger the event
3333
+ */
3334
+ event_inputs?: {
3335
+ [name: string]: any;
3336
+ };
3337
+ }
3118
3338
  export interface TriggerEventEntityActivity {
3119
3339
  type?: "entity_activity";
3120
3340
  /**
@@ -4542,6 +4762,8 @@ export type MappingAttribute = Components.Schemas.MappingAttribute;
4542
4762
  export type MappingAttributeMode = Components.Schemas.MappingAttributeMode;
4543
4763
  export type MappingAttributeV2 = Components.Schemas.MappingAttributeV2;
4544
4764
  export type MappingConfigRef = Components.Schemas.MappingConfigRef;
4765
+ export type MoveThreadAction = Components.Schemas.MoveThreadAction;
4766
+ export type MoveThreadConfig = Components.Schemas.MoveThreadConfig;
4545
4767
  export type NumericCondition = Components.Schemas.NumericCondition;
4546
4768
  export type OperationNode = Components.Schemas.OperationNode;
4547
4769
  export type OperationObjectNode = Components.Schemas.OperationObjectNode;
@@ -4568,6 +4790,9 @@ export type StartExecutionRequest = Components.Schemas.StartExecutionRequest;
4568
4790
  export type SuffixCondition = Components.Schemas.SuffixCondition;
4569
4791
  export type TriggerCondition = Components.Schemas.TriggerCondition;
4570
4792
  export type TriggerContext = Components.Schemas.TriggerContext;
4793
+ export type TriggerEventAction = Components.Schemas.TriggerEventAction;
4794
+ export type TriggerEventActionConfig = Components.Schemas.TriggerEventActionConfig;
4795
+ export type TriggerEventConfig = Components.Schemas.TriggerEventConfig;
4571
4796
  export type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity;
4572
4797
  export type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation;
4573
4798
  export type TriggerEventFlowAutomationTask = Components.Schemas.TriggerEventFlowAutomationTask;
package/dist/openapi.json CHANGED
@@ -1236,6 +1236,9 @@
1236
1236
  {
1237
1237
  "$ref": "#/components/schemas/InformERPAction"
1238
1238
  },
1239
+ {
1240
+ "$ref": "#/components/schemas/TriggerEventAction"
1241
+ },
1239
1242
  {
1240
1243
  "$ref": "#/components/schemas/CreateDocumentAction"
1241
1244
  },
@@ -1273,6 +1276,9 @@
1273
1276
  {
1274
1277
  "$ref": "#/components/schemas/InformERPActionConfig"
1275
1278
  },
1279
+ {
1280
+ "$ref": "#/components/schemas/TriggerEventActionConfig"
1281
+ },
1276
1282
  {
1277
1283
  "$ref": "#/components/schemas/CreateDocumentActionConfig"
1278
1284
  },
@@ -2032,6 +2038,35 @@
2032
2038
  "value_json"
2033
2039
  ]
2034
2040
  },
2041
+ "MoveThreadAction": {
2042
+ "allOf": [
2043
+ {
2044
+ "$ref": "#/components/schemas/AutomationAction"
2045
+ },
2046
+ {
2047
+ "type": "object",
2048
+ "properties": {
2049
+ "type": {
2050
+ "enum": [
2051
+ "move-thread"
2052
+ ]
2053
+ },
2054
+ "config": {
2055
+ "$ref": "#/components/schemas/MoveThreadConfig"
2056
+ }
2057
+ }
2058
+ }
2059
+ ]
2060
+ },
2061
+ "MoveThreadConfig": {
2062
+ "type": "object",
2063
+ "properties": {
2064
+ "target_inbox_id": {
2065
+ "type": "string",
2066
+ "description": "ID of the inbox where the thread should be moved to"
2067
+ }
2068
+ }
2069
+ },
2035
2070
  "SendEmailActionConfig": {
2036
2071
  "allOf": [
2037
2072
  {
@@ -2670,6 +2705,75 @@
2670
2705
  }
2671
2706
  }
2672
2707
  },
2708
+ "TriggerEventActionConfig": {
2709
+ "allOf": [
2710
+ {
2711
+ "$ref": "#/components/schemas/AutomationActionConfig"
2712
+ },
2713
+ {
2714
+ "type": "object",
2715
+ "properties": {
2716
+ "type": {
2717
+ "enum": [
2718
+ "trigger-event"
2719
+ ]
2720
+ },
2721
+ "config": {
2722
+ "$ref": "#/components/schemas/TriggerEventConfig"
2723
+ }
2724
+ }
2725
+ }
2726
+ ],
2727
+ "example": {
2728
+ "id": "2520gja-2sgmsaga-0asg-822jgal",
2729
+ "name": "Trigger Event",
2730
+ "type": "trigger-event",
2731
+ "config": {
2732
+ "event_name": "my_custom_event",
2733
+ "event_inputs": {
2734
+ "key": "value"
2735
+ }
2736
+ }
2737
+ }
2738
+ },
2739
+ "TriggerEventAction": {
2740
+ "allOf": [
2741
+ {
2742
+ "$ref": "#/components/schemas/AutomationAction"
2743
+ },
2744
+ {
2745
+ "type": "object",
2746
+ "properties": {
2747
+ "type": {
2748
+ "enum": [
2749
+ "trigger-event"
2750
+ ]
2751
+ },
2752
+ "config": {
2753
+ "$ref": "#/components/schemas/TriggerEventConfig"
2754
+ }
2755
+ }
2756
+ }
2757
+ ]
2758
+ },
2759
+ "TriggerEventConfig": {
2760
+ "type": "object",
2761
+ "description": "Configuration for triggering an event catalog event",
2762
+ "properties": {
2763
+ "event_name": {
2764
+ "type": "string",
2765
+ "description": "The event catalog event name to trigger"
2766
+ },
2767
+ "event_inputs": {
2768
+ "type": "object",
2769
+ "additionalProperties": true,
2770
+ "description": "Inputs to be passed to trigger the event"
2771
+ }
2772
+ },
2773
+ "required": [
2774
+ "event_name"
2775
+ ]
2776
+ },
2673
2777
  "FlowExecutionCancelActionConfig": {
2674
2778
  "allOf": [
2675
2779
  {
@@ -4617,9 +4721,6 @@
4617
4721
  }
4618
4722
  },
4619
4723
  "servers": [
4620
- {
4621
- "url": "https://automation.sls.epilot.io"
4622
- },
4623
4724
  {
4624
4725
  "url": "https://automation.sls.epilot.io"
4625
4726
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.25.0",
3
+ "version": "2.27.0-rc.1",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,6 +21,18 @@
21
21
  "sdk",
22
22
  "automation"
23
23
  ],
24
+ "scripts": {
25
+ "test": "jest",
26
+ "typescript": "tsc",
27
+ "bundle-definition": "webpack",
28
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/automation.yaml",
29
+ "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
30
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
31
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
32
+ "build:watch": "npm run build && tsc -w",
33
+ "prepublishOnly": "npm run typegen && npm run build",
34
+ "lint": "pnpm exec eslint src"
35
+ },
24
36
  "files": [
25
37
  "*.js",
26
38
  "*.d.ts",
@@ -63,16 +75,5 @@
63
75
  "webpack-cli": "^4.4.0",
64
76
  "whatwg-url": "^11.0.0"
65
77
  },
66
- "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7",
67
- "scripts": {
68
- "test": "jest",
69
- "typescript": "tsc",
70
- "bundle-definition": "webpack",
71
- "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/automation.yaml",
72
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
73
- "build": "tsc && npm run build:patch && npm run bundle-definition",
74
- "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
75
- "build:watch": "npm run build && tsc -w",
76
- "lint": "pnpm exec eslint src"
77
- }
78
- }
78
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
79
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2025 epilot GmbH
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.