@epilot/automation-client 2.18.7 → 2.18.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.
package/dist/openapi.d.ts CHANGED
@@ -792,6 +792,14 @@ declare namespace Components {
792
792
  * eyJraWQiOiJrZXkifQ==
793
793
  */
794
794
  ResumeToken;
795
+ trigger_context?: /**
796
+ * Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
797
+ * example:
798
+ * {
799
+ * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
800
+ * }
801
+ */
802
+ TriggerContext;
795
803
  /**
796
804
  * Version of the flow
797
805
  * example:
@@ -972,6 +980,14 @@ declare namespace Components {
972
980
  * Time when the bulk trigger automation executions job was approved
973
981
  */
974
982
  approved_at?: string; // date-time
983
+ trigger_context?: /**
984
+ * Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
985
+ * example:
986
+ * {
987
+ * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
988
+ * }
989
+ */
990
+ TriggerContext;
975
991
  /**
976
992
  * Task token to approve/cancel the bulk automation job
977
993
  * example:
@@ -1049,6 +1065,14 @@ declare namespace Components {
1049
1065
  */
1050
1066
  AutomationFlowId;
1051
1067
  entities_refs: EntityRef[];
1068
+ trigger_context?: /**
1069
+ * Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
1070
+ * example:
1071
+ * {
1072
+ * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
1073
+ * }
1074
+ */
1075
+ TriggerContext;
1052
1076
  } | {
1053
1077
  flow_id: /**
1054
1078
  * ID of the Automation Flow
@@ -1057,6 +1081,14 @@ declare namespace Components {
1057
1081
  */
1058
1082
  AutomationFlowId;
1059
1083
  entities_query: string;
1084
+ trigger_context?: /**
1085
+ * Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
1086
+ * example:
1087
+ * {
1088
+ * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
1089
+ * }
1090
+ */
1091
+ TriggerContext;
1060
1092
  } | {
1061
1093
  flow_id: /**
1062
1094
  * ID of the Automation Flow
@@ -1083,6 +1115,14 @@ declare namespace Components {
1083
1115
  * ]
1084
1116
  */
1085
1117
  EntitySearchFilter;
1118
+ trigger_context?: /**
1119
+ * Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
1120
+ * example:
1121
+ * {
1122
+ * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
1123
+ * }
1124
+ */
1125
+ TriggerContext;
1086
1126
  };
1087
1127
  /**
1088
1128
  * A reason for cancelling a flow execution
@@ -1942,7 +1982,7 @@ declare namespace Components {
1942
1982
  export interface EqualsIgnoreCaseCondition {
1943
1983
  "equals-ignore-case"?: string;
1944
1984
  }
1945
- export type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR";
1985
+ export type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR";
1946
1986
  export interface ErrorDetail {
1947
1987
  explanation: string;
1948
1988
  context?: string;
@@ -3019,6 +3059,16 @@ declare namespace Components {
3019
3059
  comparison: Comparison;
3020
3060
  value?: string | number | string[] | number[];
3021
3061
  }
3062
+ /**
3063
+ * Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
3064
+ * example:
3065
+ * {
3066
+ * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
3067
+ * }
3068
+ */
3069
+ export interface TriggerContext {
3070
+ [name: string]: string;
3071
+ }
3022
3072
  export interface TriggerEventEntityActivity {
3023
3073
  type?: "entity_activity";
3024
3074
  /**
@@ -4395,6 +4445,7 @@ export type SetValueMapper = Components.Schemas.SetValueMapper;
4395
4445
  export type StartExecutionRequest = Components.Schemas.StartExecutionRequest;
4396
4446
  export type SuffixCondition = Components.Schemas.SuffixCondition;
4397
4447
  export type TriggerCondition = Components.Schemas.TriggerCondition;
4448
+ export type TriggerContext = Components.Schemas.TriggerContext;
4398
4449
  export type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity;
4399
4450
  export type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation;
4400
4451
  export type TriggerEventFlowAutomationTask = Components.Schemas.TriggerEventFlowAutomationTask;
package/dist/openapi.json CHANGED
@@ -574,7 +574,10 @@
574
574
  "entity_schema": "opportunity",
575
575
  "entity_id": "b35a6c51-2a15-4ef1-9623-20db37b0744f"
576
576
  }
577
- ]
577
+ ],
578
+ "trigger_context": {
579
+ "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
580
+ }
578
581
  }
579
582
  }
580
583
  }
@@ -1336,7 +1339,12 @@
1336
1339
  "TEMPLATE_ERROR",
1337
1340
  "INVALID_PAYLOAD",
1338
1341
  "INVALID_SCHEDULE_CONFIG",
1339
- "CUSTOM_ACTION_ERROR"
1342
+ "CUSTOM_ACTION_ERROR",
1343
+ "ORDER_CREATION_ERROR",
1344
+ "DOCUMENT_GENERATION_ERROR",
1345
+ "BULK_EMAIL_ERROR",
1346
+ "SHARING_ERROR",
1347
+ "CANCEL_FLOW_EXECUTION_ERROR"
1340
1348
  ]
1341
1349
  },
1342
1350
  "ErrorDetail": {
@@ -2925,6 +2933,9 @@
2925
2933
  "resume_token": {
2926
2934
  "$ref": "#/components/schemas/ResumeToken"
2927
2935
  },
2936
+ "trigger_context": {
2937
+ "$ref": "#/components/schemas/TriggerContext"
2938
+ },
2928
2939
  "version": {
2929
2940
  "type": "number",
2930
2941
  "description": "Version of the flow",
@@ -3227,13 +3238,15 @@
3227
3238
  "items": {
3228
3239
  "$ref": "#/components/schemas/EntityRef"
3229
3240
  }
3241
+ },
3242
+ "trigger_context": {
3243
+ "$ref": "#/components/schemas/TriggerContext"
3230
3244
  }
3231
3245
  },
3232
3246
  "required": [
3233
3247
  "flow_id",
3234
3248
  "entities_refs"
3235
- ],
3236
- "additionalProperties": false
3249
+ ]
3237
3250
  },
3238
3251
  {
3239
3252
  "type": "object",
@@ -3243,13 +3256,15 @@
3243
3256
  },
3244
3257
  "entities_query": {
3245
3258
  "type": "string"
3259
+ },
3260
+ "trigger_context": {
3261
+ "$ref": "#/components/schemas/TriggerContext"
3246
3262
  }
3247
3263
  },
3248
3264
  "required": [
3249
3265
  "flow_id",
3250
3266
  "entities_query"
3251
- ],
3252
- "additionalProperties": false
3267
+ ]
3253
3268
  },
3254
3269
  {
3255
3270
  "type": "object",
@@ -3259,13 +3274,15 @@
3259
3274
  },
3260
3275
  "entities_filter": {
3261
3276
  "$ref": "#/components/schemas/EntitySearchFilter"
3277
+ },
3278
+ "trigger_context": {
3279
+ "$ref": "#/components/schemas/TriggerContext"
3262
3280
  }
3263
3281
  },
3264
3282
  "required": [
3265
3283
  "flow_id",
3266
3284
  "entities_filter"
3267
- ],
3268
- "additionalProperties": false
3285
+ ]
3269
3286
  }
3270
3287
  ]
3271
3288
  },
@@ -3338,6 +3355,9 @@
3338
3355
  "description": "Time when the bulk trigger automation executions job was approved",
3339
3356
  "format": "date-time"
3340
3357
  },
3358
+ "trigger_context": {
3359
+ "$ref": "#/components/schemas/TriggerContext"
3360
+ },
3341
3361
  "task_token": {
3342
3362
  "type": "string",
3343
3363
  "description": "Task token to approve/cancel the bulk automation job",
@@ -3473,6 +3493,16 @@
3473
3493
  "type": "string",
3474
3494
  "example": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74"
3475
3495
  },
3496
+ "TriggerContext": {
3497
+ "type": "object",
3498
+ "additionalProperties": {
3499
+ "type": "string"
3500
+ },
3501
+ "description": "Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.",
3502
+ "example": {
3503
+ "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
3504
+ }
3505
+ },
3476
3506
  "AutomationTrigger": {
3477
3507
  "type": "object",
3478
3508
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.18.7",
3
+ "version": "2.18.9",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "test": "jest",
26
26
  "typescript": "tsc",
27
27
  "bundle-definition": "webpack",
28
- "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/automation.yaml",
28
+ "openapi": "node ../../scripts/update-openapi.js ../../../backend/automation-api/lambda/ApiHandlerFunction/openapi.yml",
29
29
  "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
30
30
  "build": "tsc && npm run build:patch && npm run bundle-definition",
31
31
  "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",