@epilot/automation-client 2.16.5 → 2.17.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.
@@ -226,4 +226,4 @@
226
226
  "url": "https://automation.sls.epilot.io"
227
227
  }
228
228
  ]
229
- }
229
+ }
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 | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction;
129
+ export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerShareEntityAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction;
130
130
  export type AnyActionConfig = /**
131
131
  * example:
132
132
  * {
@@ -281,7 +281,7 @@ declare namespace Components {
281
281
  * }
282
282
  * }
283
283
  */
284
- TriggerWorkflowActionConfig | /**
284
+ TriggerWorkflowActionConfig | TriggerShareEntityActionConfig | /**
285
285
  * example:
286
286
  * {
287
287
  * "id": "2520gja-2sgmsaga-0asg-822jgal",
@@ -2476,6 +2476,119 @@ declare namespace Components {
2476
2476
  EntityId;
2477
2477
  caller?: ApiCallerContext;
2478
2478
  }
2479
+ export interface TriggerShareEntityAction {
2480
+ id?: /**
2481
+ * example:
2482
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2483
+ */
2484
+ AutomationActionId;
2485
+ flow_action_id?: /**
2486
+ * example:
2487
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2488
+ */
2489
+ AutomationActionId;
2490
+ name?: string;
2491
+ type?: "trigger-share-entity";
2492
+ config?: TriggerShareEntityConfig;
2493
+ /**
2494
+ * Whether to stop execution in a failed state if this action fails
2495
+ */
2496
+ allow_failure?: boolean;
2497
+ /**
2498
+ * Flag indicating whether the action was created automatically or manually
2499
+ */
2500
+ created_automatically?: boolean;
2501
+ /**
2502
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
2503
+ */
2504
+ is_bulk_action?: boolean;
2505
+ reason?: {
2506
+ /**
2507
+ * Why the action has to be skipped/failed
2508
+ * example:
2509
+ * There are no registered portal users for the given emails, hence skipping the action
2510
+ */
2511
+ message?: string;
2512
+ /**
2513
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
2514
+ */
2515
+ payload?: {
2516
+ [name: string]: any;
2517
+ };
2518
+ };
2519
+ /**
2520
+ * Condition Id to be checked before executing the action
2521
+ */
2522
+ condition_id?: string;
2523
+ /**
2524
+ * Schedule Id which indicates the schedule of the action
2525
+ */
2526
+ schedule_id?: string;
2527
+ execution_status?: ExecutionStatus;
2528
+ started_at?: string;
2529
+ updated_at?: string;
2530
+ /**
2531
+ * example:
2532
+ * {}
2533
+ */
2534
+ outputs?: {
2535
+ [name: string]: any;
2536
+ };
2537
+ error_output?: ErrorOutput;
2538
+ retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
2539
+ }
2540
+ export interface TriggerShareEntityActionConfig {
2541
+ id?: /**
2542
+ * example:
2543
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2544
+ */
2545
+ AutomationActionId;
2546
+ flow_action_id?: /**
2547
+ * example:
2548
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2549
+ */
2550
+ AutomationActionId;
2551
+ name?: string;
2552
+ type?: "trigger-workflow";
2553
+ config?: TriggerShareEntityConfig;
2554
+ /**
2555
+ * Whether to stop execution in a failed state if this action fails
2556
+ */
2557
+ allow_failure?: boolean;
2558
+ /**
2559
+ * Flag indicating whether the action was created automatically or manually
2560
+ */
2561
+ created_automatically?: boolean;
2562
+ /**
2563
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
2564
+ */
2565
+ is_bulk_action?: boolean;
2566
+ reason?: {
2567
+ /**
2568
+ * Why the action has to be skipped/failed
2569
+ * example:
2570
+ * There are no registered portal users for the given emails, hence skipping the action
2571
+ */
2572
+ message?: string;
2573
+ /**
2574
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
2575
+ */
2576
+ payload?: {
2577
+ [name: string]: any;
2578
+ };
2579
+ };
2580
+ /**
2581
+ * Condition Id to be checked before executing the action
2582
+ */
2583
+ condition_id?: string;
2584
+ /**
2585
+ * Schedule Id which indicates the schedule of the action
2586
+ */
2587
+ schedule_id?: string;
2588
+ }
2589
+ export interface TriggerShareEntityConfig {
2590
+ partner_org_ids?: string[];
2591
+ }
2479
2592
  export interface TriggerWebhookAction {
2480
2593
  id?: /**
2481
2594
  * example:
@@ -3597,6 +3710,9 @@ export type TriggerCondition = Components.Schemas.TriggerCondition;
3597
3710
  export type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity;
3598
3711
  export type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation;
3599
3712
  export type TriggerEventManual = Components.Schemas.TriggerEventManual;
3713
+ export type TriggerShareEntityAction = Components.Schemas.TriggerShareEntityAction;
3714
+ export type TriggerShareEntityActionConfig = Components.Schemas.TriggerShareEntityActionConfig;
3715
+ export type TriggerShareEntityConfig = Components.Schemas.TriggerShareEntityConfig;
3600
3716
  export type TriggerWebhookAction = Components.Schemas.TriggerWebhookAction;
3601
3717
  export type TriggerWebhookActionConfig = Components.Schemas.TriggerWebhookActionConfig;
3602
3718
  export type TriggerWebhookConfig = Components.Schemas.TriggerWebhookConfig;
package/dist/openapi.json CHANGED
@@ -840,6 +840,9 @@
840
840
  {
841
841
  "$ref": "#/components/schemas/TriggerWorkflowAction"
842
842
  },
843
+ {
844
+ "$ref": "#/components/schemas/TriggerShareEntityAction"
845
+ },
843
846
  {
844
847
  "$ref": "#/components/schemas/TriggerWebhookAction"
845
848
  },
@@ -868,6 +871,9 @@
868
871
  {
869
872
  "$ref": "#/components/schemas/TriggerWorkflowActionConfig"
870
873
  },
874
+ {
875
+ "$ref": "#/components/schemas/TriggerShareEntityActionConfig"
876
+ },
871
877
  {
872
878
  "$ref": "#/components/schemas/TriggerWebhookActionConfig"
873
879
  },
@@ -1978,6 +1984,57 @@
1978
1984
  "value": "test@epilot.cloud"
1979
1985
  }
1980
1986
  },
1987
+ "TriggerShareEntityActionConfig": {
1988
+ "allOf": [
1989
+ {
1990
+ "$ref": "#/components/schemas/AutomationActionConfig"
1991
+ },
1992
+ {
1993
+ "type": "object",
1994
+ "properties": {
1995
+ "type": {
1996
+ "enum": [
1997
+ "trigger-workflow"
1998
+ ]
1999
+ },
2000
+ "config": {
2001
+ "$ref": "#/components/schemas/TriggerShareEntityConfig"
2002
+ }
2003
+ }
2004
+ }
2005
+ ]
2006
+ },
2007
+ "TriggerShareEntityAction": {
2008
+ "allOf": [
2009
+ {
2010
+ "$ref": "#/components/schemas/AutomationAction"
2011
+ },
2012
+ {
2013
+ "type": "object",
2014
+ "properties": {
2015
+ "type": {
2016
+ "enum": [
2017
+ "trigger-share-entity"
2018
+ ]
2019
+ },
2020
+ "config": {
2021
+ "$ref": "#/components/schemas/TriggerShareEntityConfig"
2022
+ }
2023
+ }
2024
+ }
2025
+ ]
2026
+ },
2027
+ "TriggerShareEntityConfig": {
2028
+ "type": "object",
2029
+ "properties": {
2030
+ "partner_org_ids": {
2031
+ "type": "array",
2032
+ "items": {
2033
+ "type": "string"
2034
+ }
2035
+ }
2036
+ }
2037
+ },
1981
2038
  "AssignUsersToStep": {
1982
2039
  "type": "object",
1983
2040
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.16.5",
3
+ "version": "2.17.0",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",