@epilot/automation-client 2.16.5 → 2.17.1-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 | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction;
129
+ export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerShareEntityAction | TriggerWebhookAction | ERPAction | 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",
@@ -297,6 +297,21 @@ declare namespace Components {
297
297
  * }
298
298
  */
299
299
  TriggerWebhookActionConfig | /**
300
+ * example:
301
+ * {
302
+ * "id": "2520gja-2sgmsaga-0asg-822jgal",
303
+ * "name": "Inform ERP",
304
+ * "type": "inform-erp",
305
+ * "config": {
306
+ * "entity_sources": [
307
+ * "contact",
308
+ * "account"
309
+ * ],
310
+ * "target_webhook_id": "25jg9ag2ga"
311
+ * }
312
+ * }
313
+ */
314
+ ERPActionConfig | /**
300
315
  * example:
301
316
  * {
302
317
  * "id": "08g988-ojt2jtaga-292h-8978gsaga",
@@ -945,15 +960,46 @@ declare namespace Components {
945
960
  */
946
961
  execution_summary: /* Execution item for bulk trigger automation. It maps each entity to its automation execution id & status */ ExecItem[];
947
962
  }
948
- export interface BulkTriggerRequest {
963
+ export type BulkTriggerRequest = {
949
964
  flow_id: /**
950
965
  * example:
951
966
  * 7791b04a-16d2-44a2-9af9-2d59c25c512f
952
967
  */
953
968
  AutomationFlowId;
954
- entities_refs?: EntityRef[];
955
- entities_query?: string;
956
- }
969
+ entities_refs: EntityRef[];
970
+ } | {
971
+ flow_id: /**
972
+ * example:
973
+ * 7791b04a-16d2-44a2-9af9-2d59c25c512f
974
+ */
975
+ AutomationFlowId;
976
+ entities_query: string;
977
+ } | {
978
+ flow_id: /**
979
+ * example:
980
+ * 7791b04a-16d2-44a2-9af9-2d59c25c512f
981
+ */
982
+ AutomationFlowId;
983
+ entities_filter: /**
984
+ * A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.
985
+ * example:
986
+ * [
987
+ * {
988
+ * "term": {
989
+ * "_schema": "contact"
990
+ * }
991
+ * },
992
+ * {
993
+ * "terms": {
994
+ * "status": [
995
+ * "active"
996
+ * ]
997
+ * }
998
+ * }
999
+ * ]
1000
+ */
1001
+ EntitySearchFilter;
1002
+ };
957
1003
  /**
958
1004
  * Creates an order entity with prices from journey
959
1005
  */
@@ -1383,6 +1429,139 @@ declare namespace Components {
1383
1429
  export type DiffAdded = FilterConditionOnEvent;
1384
1430
  export type DiffDeleted = FilterConditionOnEvent;
1385
1431
  export type DiffUpdated = FilterConditionOnEvent;
1432
+ export interface ERPAction {
1433
+ id?: /**
1434
+ * example:
1435
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
1436
+ */
1437
+ AutomationActionId;
1438
+ flow_action_id?: /**
1439
+ * example:
1440
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
1441
+ */
1442
+ AutomationActionId;
1443
+ name?: string;
1444
+ type?: "inform-erp";
1445
+ config?: ERPConfig;
1446
+ /**
1447
+ * Whether to stop execution in a failed state if this action fails
1448
+ */
1449
+ allow_failure?: boolean;
1450
+ /**
1451
+ * Flag indicating whether the action was created automatically or manually
1452
+ */
1453
+ created_automatically?: boolean;
1454
+ /**
1455
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
1456
+ */
1457
+ is_bulk_action?: boolean;
1458
+ reason?: {
1459
+ /**
1460
+ * Why the action has to be skipped/failed
1461
+ * example:
1462
+ * There are no registered portal users for the given emails, hence skipping the action
1463
+ */
1464
+ message?: string;
1465
+ /**
1466
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
1467
+ */
1468
+ payload?: {
1469
+ [name: string]: any;
1470
+ };
1471
+ };
1472
+ /**
1473
+ * Condition Id to be checked before executing the action
1474
+ */
1475
+ condition_id?: string;
1476
+ /**
1477
+ * Schedule Id which indicates the schedule of the action
1478
+ */
1479
+ schedule_id?: string;
1480
+ execution_status?: ExecutionStatus;
1481
+ started_at?: string;
1482
+ updated_at?: string;
1483
+ /**
1484
+ * example:
1485
+ * {}
1486
+ */
1487
+ outputs?: {
1488
+ [name: string]: any;
1489
+ };
1490
+ error_output?: ErrorOutput;
1491
+ retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
1492
+ }
1493
+ /**
1494
+ * example:
1495
+ * {
1496
+ * "id": "2520gja-2sgmsaga-0asg-822jgal",
1497
+ * "name": "Inform ERP",
1498
+ * "type": "inform-erp",
1499
+ * "config": {
1500
+ * "entity_sources": [
1501
+ * "contact",
1502
+ * "account"
1503
+ * ],
1504
+ * "target_webhook_id": "25jg9ag2ga"
1505
+ * }
1506
+ * }
1507
+ */
1508
+ export interface ERPActionConfig {
1509
+ id?: /**
1510
+ * example:
1511
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
1512
+ */
1513
+ AutomationActionId;
1514
+ flow_action_id?: /**
1515
+ * example:
1516
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
1517
+ */
1518
+ AutomationActionId;
1519
+ name?: string;
1520
+ type?: "inform-erp";
1521
+ config?: ERPConfig;
1522
+ /**
1523
+ * Whether to stop execution in a failed state if this action fails
1524
+ */
1525
+ allow_failure?: boolean;
1526
+ /**
1527
+ * Flag indicating whether the action was created automatically or manually
1528
+ */
1529
+ created_automatically?: boolean;
1530
+ /**
1531
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
1532
+ */
1533
+ is_bulk_action?: boolean;
1534
+ reason?: {
1535
+ /**
1536
+ * Why the action has to be skipped/failed
1537
+ * example:
1538
+ * There are no registered portal users for the given emails, hence skipping the action
1539
+ */
1540
+ message?: string;
1541
+ /**
1542
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
1543
+ */
1544
+ payload?: {
1545
+ [name: string]: any;
1546
+ };
1547
+ };
1548
+ /**
1549
+ * Condition Id to be checked before executing the action
1550
+ */
1551
+ condition_id?: string;
1552
+ /**
1553
+ * Schedule Id which indicates the schedule of the action
1554
+ */
1555
+ schedule_id?: string;
1556
+ }
1557
+ export interface ERPConfig {
1558
+ entity_sources?: string[];
1559
+ target_webhook_id?: string;
1560
+ /**
1561
+ * Whether to wait for the request to finish before continuing automation execution
1562
+ */
1563
+ sync?: boolean;
1564
+ }
1386
1565
  /**
1387
1566
  * example:
1388
1567
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
@@ -1418,7 +1597,7 @@ declare namespace Components {
1418
1597
  schema?: string;
1419
1598
  };
1420
1599
  }
1421
- export type EntityOperation = "createEntity" | "updateEntity" | "deleteEntity";
1600
+ export type EntityOperation = "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity";
1422
1601
  /**
1423
1602
  * - If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.
1424
1603
  * - The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`
@@ -1632,6 +1811,166 @@ declare namespace Components {
1632
1811
  EntityId;
1633
1812
  entity_schema: string;
1634
1813
  }
1814
+ /**
1815
+ * A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.
1816
+ * example:
1817
+ * [
1818
+ * {
1819
+ * "term": {
1820
+ * "_schema": "contact"
1821
+ * }
1822
+ * },
1823
+ * {
1824
+ * "terms": {
1825
+ * "status": [
1826
+ * "active"
1827
+ * ]
1828
+ * }
1829
+ * }
1830
+ * ]
1831
+ */
1832
+ export type EntitySearchFilter = {
1833
+ /**
1834
+ * Returns documents that contain an exact term in a provided field.
1835
+ *
1836
+ * To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
1837
+ *
1838
+ * You likely DO NOT want to use this filter on text fields and want to target its .keyword instead.
1839
+ *
1840
+ * example:
1841
+ * {
1842
+ * "_schema": "contact"
1843
+ * }
1844
+ */
1845
+ term?: {
1846
+ [name: string]: /* A filter field value. */ EntitySearchFilterValue;
1847
+ };
1848
+ /**
1849
+ * Returns documents that contain one of the exact terms in a provided field. See term filter for more info.
1850
+ * example:
1851
+ * {
1852
+ * "status": [
1853
+ * "active"
1854
+ * ]
1855
+ * }
1856
+ */
1857
+ terms?: {
1858
+ [name: string]: /* A filter field value. */ EntitySearchFilterValue[];
1859
+ };
1860
+ /**
1861
+ * Returns documents based on their IDs.
1862
+ * example:
1863
+ * {
1864
+ * "values": [
1865
+ * "550e8400-e29b-41d4-a716-446655440000"
1866
+ * ]
1867
+ * }
1868
+ */
1869
+ ids?: {
1870
+ values?: string[];
1871
+ };
1872
+ /**
1873
+ * Returns documents with fields that have terms within a certain range.
1874
+ * example:
1875
+ * {
1876
+ * "_created_at": {
1877
+ * "gte": "2021-01-01T00:00:00.000Z",
1878
+ * "lte": "2021-01-31T23:59:59.999Z"
1879
+ * }
1880
+ * }
1881
+ */
1882
+ range?: {
1883
+ [name: string]: {
1884
+ gt?: /* A filter field value. */ EntitySearchFilterValue;
1885
+ gte?: /* A filter field value. */ EntitySearchFilterValue;
1886
+ lt?: /* A filter field value. */ EntitySearchFilterValue;
1887
+ lte?: /* A filter field value. */ EntitySearchFilterValue;
1888
+ /**
1889
+ * The date format used to parse date values.
1890
+ */
1891
+ format?: string;
1892
+ /**
1893
+ * Indicates how the range query matches values for range fields.
1894
+ */
1895
+ relation?: "INTERSECTS" | "CONTAINS" | "WITHIN";
1896
+ /**
1897
+ * Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC.
1898
+ */
1899
+ time_zone?: string;
1900
+ };
1901
+ };
1902
+ /**
1903
+ * Returns documents that have a value in the specified field.
1904
+ * example:
1905
+ * {
1906
+ * "field": "_tags"
1907
+ * }
1908
+ */
1909
+ exists?: {
1910
+ field: string;
1911
+ };
1912
+ $and?: /**
1913
+ * A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.
1914
+ * example:
1915
+ * [
1916
+ * {
1917
+ * "term": {
1918
+ * "_schema": "contact"
1919
+ * }
1920
+ * },
1921
+ * {
1922
+ * "terms": {
1923
+ * "status": [
1924
+ * "active"
1925
+ * ]
1926
+ * }
1927
+ * }
1928
+ * ]
1929
+ */
1930
+ EntitySearchFilter;
1931
+ $or?: /**
1932
+ * A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.
1933
+ * example:
1934
+ * [
1935
+ * {
1936
+ * "term": {
1937
+ * "_schema": "contact"
1938
+ * }
1939
+ * },
1940
+ * {
1941
+ * "terms": {
1942
+ * "status": [
1943
+ * "active"
1944
+ * ]
1945
+ * }
1946
+ * }
1947
+ * ]
1948
+ */
1949
+ EntitySearchFilter;
1950
+ $not?: /**
1951
+ * A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.
1952
+ * example:
1953
+ * [
1954
+ * {
1955
+ * "term": {
1956
+ * "_schema": "contact"
1957
+ * }
1958
+ * },
1959
+ * {
1960
+ * "terms": {
1961
+ * "status": [
1962
+ * "active"
1963
+ * ]
1964
+ * }
1965
+ * }
1966
+ * ]
1967
+ */
1968
+ EntitySearchFilter;
1969
+ }[];
1970
+ /**
1971
+ * A filter field value.
1972
+ */
1973
+ export type EntitySearchFilterValue = /* A filter field value. */ (string | null) | number | boolean;
1635
1974
  export interface EqualsIgnoreCaseCondition {
1636
1975
  "equals-ignore-case"?: string;
1637
1976
  }
@@ -2476,6 +2815,119 @@ declare namespace Components {
2476
2815
  EntityId;
2477
2816
  caller?: ApiCallerContext;
2478
2817
  }
2818
+ export interface TriggerShareEntityAction {
2819
+ id?: /**
2820
+ * example:
2821
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2822
+ */
2823
+ AutomationActionId;
2824
+ flow_action_id?: /**
2825
+ * example:
2826
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2827
+ */
2828
+ AutomationActionId;
2829
+ name?: string;
2830
+ type?: "trigger-share-entity";
2831
+ config?: TriggerShareEntityConfig;
2832
+ /**
2833
+ * Whether to stop execution in a failed state if this action fails
2834
+ */
2835
+ allow_failure?: boolean;
2836
+ /**
2837
+ * Flag indicating whether the action was created automatically or manually
2838
+ */
2839
+ created_automatically?: boolean;
2840
+ /**
2841
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
2842
+ */
2843
+ is_bulk_action?: boolean;
2844
+ reason?: {
2845
+ /**
2846
+ * Why the action has to be skipped/failed
2847
+ * example:
2848
+ * There are no registered portal users for the given emails, hence skipping the action
2849
+ */
2850
+ message?: string;
2851
+ /**
2852
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
2853
+ */
2854
+ payload?: {
2855
+ [name: string]: any;
2856
+ };
2857
+ };
2858
+ /**
2859
+ * Condition Id to be checked before executing the action
2860
+ */
2861
+ condition_id?: string;
2862
+ /**
2863
+ * Schedule Id which indicates the schedule of the action
2864
+ */
2865
+ schedule_id?: string;
2866
+ execution_status?: ExecutionStatus;
2867
+ started_at?: string;
2868
+ updated_at?: string;
2869
+ /**
2870
+ * example:
2871
+ * {}
2872
+ */
2873
+ outputs?: {
2874
+ [name: string]: any;
2875
+ };
2876
+ error_output?: ErrorOutput;
2877
+ retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy;
2878
+ }
2879
+ export interface TriggerShareEntityActionConfig {
2880
+ id?: /**
2881
+ * example:
2882
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2883
+ */
2884
+ AutomationActionId;
2885
+ flow_action_id?: /**
2886
+ * example:
2887
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
2888
+ */
2889
+ AutomationActionId;
2890
+ name?: string;
2891
+ type?: "trigger-workflow";
2892
+ config?: TriggerShareEntityConfig;
2893
+ /**
2894
+ * Whether to stop execution in a failed state if this action fails
2895
+ */
2896
+ allow_failure?: boolean;
2897
+ /**
2898
+ * Flag indicating whether the action was created automatically or manually
2899
+ */
2900
+ created_automatically?: boolean;
2901
+ /**
2902
+ * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity
2903
+ */
2904
+ is_bulk_action?: boolean;
2905
+ reason?: {
2906
+ /**
2907
+ * Why the action has to be skipped/failed
2908
+ * example:
2909
+ * There are no registered portal users for the given emails, hence skipping the action
2910
+ */
2911
+ message?: string;
2912
+ /**
2913
+ * Extra metadata about the skipping reason - such as a certain condition not met, etc.
2914
+ */
2915
+ payload?: {
2916
+ [name: string]: any;
2917
+ };
2918
+ };
2919
+ /**
2920
+ * Condition Id to be checked before executing the action
2921
+ */
2922
+ condition_id?: string;
2923
+ /**
2924
+ * Schedule Id which indicates the schedule of the action
2925
+ */
2926
+ schedule_id?: string;
2927
+ }
2928
+ export interface TriggerShareEntityConfig {
2929
+ partner_org_ids?: string[];
2930
+ }
2479
2931
  export interface TriggerWebhookAction {
2480
2932
  id?: /**
2481
2933
  * example:
@@ -3542,12 +3994,17 @@ export type CustomAction = Components.Schemas.CustomAction;
3542
3994
  export type DiffAdded = Components.Schemas.DiffAdded;
3543
3995
  export type DiffDeleted = Components.Schemas.DiffDeleted;
3544
3996
  export type DiffUpdated = Components.Schemas.DiffUpdated;
3997
+ export type ERPAction = Components.Schemas.ERPAction;
3998
+ export type ERPActionConfig = Components.Schemas.ERPActionConfig;
3999
+ export type ERPConfig = Components.Schemas.ERPConfig;
3545
4000
  export type EntityId = Components.Schemas.EntityId;
3546
4001
  export type EntityItemSnapshot = Components.Schemas.EntityItemSnapshot;
3547
4002
  export type EntityManualTrigger = Components.Schemas.EntityManualTrigger;
3548
4003
  export type EntityOperation = Components.Schemas.EntityOperation;
3549
4004
  export type EntityOperationTrigger = Components.Schemas.EntityOperationTrigger;
3550
4005
  export type EntityRef = Components.Schemas.EntityRef;
4006
+ export type EntitySearchFilter = Components.Schemas.EntitySearchFilter;
4007
+ export type EntitySearchFilterValue = Components.Schemas.EntitySearchFilterValue;
3551
4008
  export type EqualsIgnoreCaseCondition = Components.Schemas.EqualsIgnoreCaseCondition;
3552
4009
  export type ErrorCode = Components.Schemas.ErrorCode;
3553
4010
  export type ErrorDetail = Components.Schemas.ErrorDetail;
@@ -3597,6 +4054,9 @@ export type TriggerCondition = Components.Schemas.TriggerCondition;
3597
4054
  export type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity;
3598
4055
  export type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation;
3599
4056
  export type TriggerEventManual = Components.Schemas.TriggerEventManual;
4057
+ export type TriggerShareEntityAction = Components.Schemas.TriggerShareEntityAction;
4058
+ export type TriggerShareEntityActionConfig = Components.Schemas.TriggerShareEntityActionConfig;
4059
+ export type TriggerShareEntityConfig = Components.Schemas.TriggerShareEntityConfig;
3600
4060
  export type TriggerWebhookAction = Components.Schemas.TriggerWebhookAction;
3601
4061
  export type TriggerWebhookActionConfig = Components.Schemas.TriggerWebhookActionConfig;
3602
4062
  export type TriggerWebhookConfig = Components.Schemas.TriggerWebhookConfig;
package/dist/openapi.json CHANGED
@@ -330,9 +330,15 @@
330
330
  },
331
331
  "example": {
332
332
  "flow_id": "8e2e067e-3c63-4b1a-8e02-6150a3d1fd89",
333
- "entity_ids": [
334
- "7791b04a-16d2-44a2-9af9-2d59c25c512f",
335
- "b35a6c51-2a15-4ef1-9623-20db37b0744f"
333
+ "entities_refs": [
334
+ {
335
+ "entity_schema": "opportunity",
336
+ "entity_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f"
337
+ },
338
+ {
339
+ "entity_schema": "opportunity",
340
+ "entity_id": "b35a6c51-2a15-4ef1-9623-20db37b0744f"
341
+ }
336
342
  ]
337
343
  }
338
344
  }
@@ -840,9 +846,15 @@
840
846
  {
841
847
  "$ref": "#/components/schemas/TriggerWorkflowAction"
842
848
  },
849
+ {
850
+ "$ref": "#/components/schemas/TriggerShareEntityAction"
851
+ },
843
852
  {
844
853
  "$ref": "#/components/schemas/TriggerWebhookAction"
845
854
  },
855
+ {
856
+ "$ref": "#/components/schemas/ERPAction"
857
+ },
846
858
  {
847
859
  "$ref": "#/components/schemas/CreateDocumentAction"
848
860
  },
@@ -868,9 +880,15 @@
868
880
  {
869
881
  "$ref": "#/components/schemas/TriggerWorkflowActionConfig"
870
882
  },
883
+ {
884
+ "$ref": "#/components/schemas/TriggerShareEntityActionConfig"
885
+ },
871
886
  {
872
887
  "$ref": "#/components/schemas/TriggerWebhookActionConfig"
873
888
  },
889
+ {
890
+ "$ref": "#/components/schemas/ERPActionConfig"
891
+ },
874
892
  {
875
893
  "$ref": "#/components/schemas/CreateDocumentActionConfig"
876
894
  },
@@ -1978,6 +1996,57 @@
1978
1996
  "value": "test@epilot.cloud"
1979
1997
  }
1980
1998
  },
1999
+ "TriggerShareEntityActionConfig": {
2000
+ "allOf": [
2001
+ {
2002
+ "$ref": "#/components/schemas/AutomationActionConfig"
2003
+ },
2004
+ {
2005
+ "type": "object",
2006
+ "properties": {
2007
+ "type": {
2008
+ "enum": [
2009
+ "trigger-workflow"
2010
+ ]
2011
+ },
2012
+ "config": {
2013
+ "$ref": "#/components/schemas/TriggerShareEntityConfig"
2014
+ }
2015
+ }
2016
+ }
2017
+ ]
2018
+ },
2019
+ "TriggerShareEntityAction": {
2020
+ "allOf": [
2021
+ {
2022
+ "$ref": "#/components/schemas/AutomationAction"
2023
+ },
2024
+ {
2025
+ "type": "object",
2026
+ "properties": {
2027
+ "type": {
2028
+ "enum": [
2029
+ "trigger-share-entity"
2030
+ ]
2031
+ },
2032
+ "config": {
2033
+ "$ref": "#/components/schemas/TriggerShareEntityConfig"
2034
+ }
2035
+ }
2036
+ }
2037
+ ]
2038
+ },
2039
+ "TriggerShareEntityConfig": {
2040
+ "type": "object",
2041
+ "properties": {
2042
+ "partner_org_ids": {
2043
+ "type": "array",
2044
+ "items": {
2045
+ "type": "string"
2046
+ }
2047
+ }
2048
+ }
2049
+ },
1981
2050
  "AssignUsersToStep": {
1982
2051
  "type": "object",
1983
2052
  "properties": {
@@ -2126,6 +2195,77 @@
2126
2195
  }
2127
2196
  }
2128
2197
  },
2198
+ "ERPActionConfig": {
2199
+ "allOf": [
2200
+ {
2201
+ "$ref": "#/components/schemas/AutomationActionConfig"
2202
+ },
2203
+ {
2204
+ "type": "object",
2205
+ "properties": {
2206
+ "type": {
2207
+ "enum": [
2208
+ "inform-erp"
2209
+ ]
2210
+ },
2211
+ "config": {
2212
+ "$ref": "#/components/schemas/ERPConfig"
2213
+ }
2214
+ }
2215
+ }
2216
+ ],
2217
+ "example": {
2218
+ "id": "2520gja-2sgmsaga-0asg-822jgal",
2219
+ "name": "Inform ERP",
2220
+ "type": "inform-erp",
2221
+ "config": {
2222
+ "entity_sources": [
2223
+ "contact",
2224
+ "account"
2225
+ ],
2226
+ "target_webhook_id": "25jg9ag2ga"
2227
+ }
2228
+ }
2229
+ },
2230
+ "ERPAction": {
2231
+ "allOf": [
2232
+ {
2233
+ "$ref": "#/components/schemas/AutomationAction"
2234
+ },
2235
+ {
2236
+ "type": "object",
2237
+ "properties": {
2238
+ "type": {
2239
+ "enum": [
2240
+ "inform-erp"
2241
+ ]
2242
+ },
2243
+ "config": {
2244
+ "$ref": "#/components/schemas/ERPConfig"
2245
+ }
2246
+ }
2247
+ }
2248
+ ]
2249
+ },
2250
+ "ERPConfig": {
2251
+ "type": "object",
2252
+ "properties": {
2253
+ "entity_sources": {
2254
+ "type": "array",
2255
+ "items": {
2256
+ "type": "string"
2257
+ }
2258
+ },
2259
+ "target_webhook_id": {
2260
+ "type": "string"
2261
+ },
2262
+ "sync": {
2263
+ "type": "boolean",
2264
+ "description": "Whether to wait for the request to finish before continuing automation execution",
2265
+ "default": false
2266
+ }
2267
+ }
2268
+ },
2129
2269
  "ConditionStatement": {
2130
2270
  "type": "object",
2131
2271
  "properties": {
@@ -2637,23 +2777,58 @@
2637
2777
  ]
2638
2778
  },
2639
2779
  "BulkTriggerRequest": {
2640
- "type": "object",
2641
- "properties": {
2642
- "flow_id": {
2643
- "$ref": "#/components/schemas/AutomationFlowId"
2780
+ "oneOf": [
2781
+ {
2782
+ "type": "object",
2783
+ "properties": {
2784
+ "flow_id": {
2785
+ "$ref": "#/components/schemas/AutomationFlowId"
2786
+ },
2787
+ "entities_refs": {
2788
+ "type": "array",
2789
+ "items": {
2790
+ "$ref": "#/components/schemas/EntityRef"
2791
+ }
2792
+ }
2793
+ },
2794
+ "required": [
2795
+ "flow_id",
2796
+ "entities_refs"
2797
+ ],
2798
+ "additionalProperties": false
2644
2799
  },
2645
- "entities_refs": {
2646
- "type": "array",
2647
- "items": {
2648
- "$ref": "#/components/schemas/EntityRef"
2649
- }
2800
+ {
2801
+ "type": "object",
2802
+ "properties": {
2803
+ "flow_id": {
2804
+ "$ref": "#/components/schemas/AutomationFlowId"
2805
+ },
2806
+ "entities_query": {
2807
+ "type": "string"
2808
+ }
2809
+ },
2810
+ "required": [
2811
+ "flow_id",
2812
+ "entities_query"
2813
+ ],
2814
+ "additionalProperties": false
2650
2815
  },
2651
- "entities_query": {
2652
- "type": "string"
2816
+ {
2817
+ "type": "object",
2818
+ "properties": {
2819
+ "flow_id": {
2820
+ "$ref": "#/components/schemas/AutomationFlowId"
2821
+ },
2822
+ "entities_filter": {
2823
+ "$ref": "#/components/schemas/EntitySearchFilter"
2824
+ }
2825
+ },
2826
+ "required": [
2827
+ "flow_id",
2828
+ "entities_filter"
2829
+ ],
2830
+ "additionalProperties": false
2653
2831
  }
2654
- },
2655
- "required": [
2656
- "flow_id"
2657
2832
  ]
2658
2833
  },
2659
2834
  "EntityRef": {
@@ -3170,7 +3345,180 @@
3170
3345
  "enum": [
3171
3346
  "createEntity",
3172
3347
  "updateEntity",
3173
- "deleteEntity"
3348
+ "deleteEntity",
3349
+ "softDeleteEntity",
3350
+ "restoreEntity"
3351
+ ]
3352
+ },
3353
+ "EntitySearchFilter": {
3354
+ "type": "array",
3355
+ "description": "A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.",
3356
+ "items": {
3357
+ "type": "object",
3358
+ "minProperties": 1,
3359
+ "maxProperties": 1,
3360
+ "properties": {
3361
+ "term": {
3362
+ "description": "Returns documents that contain an exact term in a provided field.\n\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.\n\nYou likely DO NOT want to use this filter on text fields and want to target its .keyword instead.\n",
3363
+ "externalDocs": {
3364
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html"
3365
+ },
3366
+ "type": "object",
3367
+ "minProperties": 1,
3368
+ "maxProperties": 1,
3369
+ "additionalProperties": {
3370
+ "$ref": "#/components/schemas/EntitySearchFilterValue"
3371
+ },
3372
+ "example": {
3373
+ "_schema": "contact"
3374
+ }
3375
+ },
3376
+ "terms": {
3377
+ "description": "Returns documents that contain one of the exact terms in a provided field. See term filter for more info.",
3378
+ "externalDocs": {
3379
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html"
3380
+ },
3381
+ "type": "object",
3382
+ "minProperties": 1,
3383
+ "maxProperties": 1,
3384
+ "additionalProperties": {
3385
+ "type": "array",
3386
+ "items": {
3387
+ "$ref": "#/components/schemas/EntitySearchFilterValue"
3388
+ }
3389
+ },
3390
+ "example": {
3391
+ "status": [
3392
+ "active"
3393
+ ]
3394
+ }
3395
+ },
3396
+ "ids": {
3397
+ "description": "Returns documents based on their IDs.",
3398
+ "externalDocs": {
3399
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html"
3400
+ },
3401
+ "type": "object",
3402
+ "properties": {
3403
+ "values": {
3404
+ "type": "array",
3405
+ "items": {
3406
+ "type": "string"
3407
+ }
3408
+ }
3409
+ },
3410
+ "example": {
3411
+ "values": [
3412
+ "550e8400-e29b-41d4-a716-446655440000"
3413
+ ]
3414
+ }
3415
+ },
3416
+ "range": {
3417
+ "description": "Returns documents with fields that have terms within a certain range.",
3418
+ "externalDocs": {
3419
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html"
3420
+ },
3421
+ "type": "object",
3422
+ "minProperties": 1,
3423
+ "maxProperties": 1,
3424
+ "additionalProperties": {
3425
+ "type": "object",
3426
+ "properties": {
3427
+ "gt": {
3428
+ "$ref": "#/components/schemas/EntitySearchFilterValue"
3429
+ },
3430
+ "gte": {
3431
+ "$ref": "#/components/schemas/EntitySearchFilterValue"
3432
+ },
3433
+ "lt": {
3434
+ "$ref": "#/components/schemas/EntitySearchFilterValue"
3435
+ },
3436
+ "lte": {
3437
+ "$ref": "#/components/schemas/EntitySearchFilterValue"
3438
+ },
3439
+ "format": {
3440
+ "type": "string",
3441
+ "description": "The date format used to parse date values."
3442
+ },
3443
+ "relation": {
3444
+ "type": "string",
3445
+ "enum": [
3446
+ "INTERSECTS",
3447
+ "CONTAINS",
3448
+ "WITHIN"
3449
+ ],
3450
+ "description": "Indicates how the range query matches values for range fields."
3451
+ },
3452
+ "time_zone": {
3453
+ "type": "string",
3454
+ "description": "Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC."
3455
+ }
3456
+ }
3457
+ },
3458
+ "example": {
3459
+ "_created_at": {
3460
+ "gte": "2021-01-01T00:00:00.000Z",
3461
+ "lte": "2021-01-31T23:59:59.999Z"
3462
+ }
3463
+ }
3464
+ },
3465
+ "exists": {
3466
+ "description": "Returns documents that have a value in the specified field.",
3467
+ "externalDocs": {
3468
+ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html"
3469
+ },
3470
+ "type": "object",
3471
+ "properties": {
3472
+ "field": {
3473
+ "type": "string"
3474
+ }
3475
+ },
3476
+ "required": [
3477
+ "field"
3478
+ ],
3479
+ "example": {
3480
+ "field": "_tags"
3481
+ }
3482
+ },
3483
+ "$and": {
3484
+ "$ref": "#/components/schemas/EntitySearchFilter"
3485
+ },
3486
+ "$or": {
3487
+ "$ref": "#/components/schemas/EntitySearchFilter"
3488
+ },
3489
+ "$not": {
3490
+ "$ref": "#/components/schemas/EntitySearchFilter"
3491
+ }
3492
+ }
3493
+ },
3494
+ "example": [
3495
+ {
3496
+ "term": {
3497
+ "_schema": "contact"
3498
+ }
3499
+ },
3500
+ {
3501
+ "terms": {
3502
+ "status": [
3503
+ "active"
3504
+ ]
3505
+ }
3506
+ }
3507
+ ]
3508
+ },
3509
+ "EntitySearchFilterValue": {
3510
+ "description": "A filter field value.",
3511
+ "oneOf": [
3512
+ {
3513
+ "type": "string",
3514
+ "nullable": true
3515
+ },
3516
+ {
3517
+ "type": "number"
3518
+ },
3519
+ {
3520
+ "type": "boolean"
3521
+ }
3174
3522
  ]
3175
3523
  },
3176
3524
  "EntityManualTrigger": {
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "2.16.5",
3
+ "version": "2.17.1-rc.1",
4
4
  "description": "Client library for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "epilot GmbH",
8
8
  "license": "MIT",
9
+ "private": false,
9
10
  "repository": {
10
11
  "type": "git",
11
12
  "url": "git+https://github.com/epilot-dev/sdk-js.git",