import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios'; /* Auto-copied from automation-client */ declare namespace Components { namespace Responses { /** * example: * { * "status": 403, * "error": "Forbidden" * } */ export interface ForbiddenError { /** * The HTTP status code of the error * example: * 400 */ status?: number; /** * The error message */ error?: string; } /** * example: * { * "status": 404, * "error": "Not Found" * } */ export interface NotFoundError { /** * The HTTP status code of the error * example: * 400 */ status?: number; /** * The error message */ error?: string; } } namespace Schemas { export interface ActionCondition { id?: string; /** * Schedule Id which indicates the schedule of the actions inside the condition */ schedule_id?: string; /** * Result of the condition evaluation */ evaluationResult?: boolean; error_output?: ErrorOutput; statements?: /** * example: * { * "source": { * "origin": "trigger", * "originType": "entity", * "id": "trigger-id", * "schema": "contact", * "attribute": "email", * "attributeType": "text" * }, * "operation": "equals", * "values": [ * "hello@epilot.cloud" * ] * } */ ConditionStatement[]; } export interface ActionSchedule { /** * Schedule Id */ id: string; /** * The id of the configured scheduler which will be added on automation triggered */ scheduleApiId?: string; numberOfUnits?: number; timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"; timeRelation?: "after" | "before"; source: /* The source of the schedule_at timestamp that will be used to schedule the action */ ActionScheduleSource; } /** * The source of the schedule_at timestamp that will be used to schedule the action */ export interface ActionScheduleSource { /** * The id of the action or trigger */ id: string; origin: "trigger" | "action" | "action_task" | "automation"; schema?: string; attribute?: string; } /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ export type ActivityId = string; export interface ActivityTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "activity"; configuration: { /** * example: * submission */ schema?: string; types?: (("CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal") | string)[]; }; } export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerShareEntityAction | TriggerWebhookAction | InformERPAction | TriggerEventAction | CreateDocumentAction | SendEmailAction | /* Creates an order entity with prices from journey */ CartCheckoutAction | CustomAction | AutomationAction | FlowExecutionCancelAction | ForwardEmailAction | ReplyEmailAction; export type AnyActionConfig = /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Map Entity", * "type": "map-entity", * "config": { * "target_schema": "contact", * "target_unique": [ * "email.0.email" * ], * "relation_attributes": [ * { * "target": "company", * "mode": "append", * "source_filter": { * "schema": "account", * "limit": 1 * } * } * ], * "mapping_attributes": [ * { * "target": "_tags", * "operation": { * "_append": [ * "primary", * "payer" * ], * "_uniq": true * } * }, * { * "target": "email", * "operation": { * "_append": [ * { * "email": { * "_copy": "billing_contact.email" * } * } * ] * } * }, * { * "target": "first_name", * "operation": { * "_copy": "billing_contact.first_name" * } * }, * { * "target": "last_name", * "operation": { * "_copy": "billing_contact.last_name" * } * }, * { * "target": "contact_type", * "operation": { * "_set": "customer" * } * }, * { * "target": "address", * "operation": { * "_append": [ * { * "_tags": [ * "billing", * "primary" * ], * "street_name": { * "_copy": "billing_contact.street_name" * }, * "street_number": { * "_copy": "billing_contact.street_number" * }, * "city": { * "_copy": "billing_contact.city" * }, * "postal_code": { * "_copy": "billing_contact.postal_code" * }, * "country": { * "_copy": "billing_contact.country" * } * }, * { * "_tags": [ * "delivery" * ], * "street_name": { * "_copy": "delivery_contact.street_name" * }, * "street_number": { * "_copy": "delivery_contact.street_number" * }, * "city": { * "_copy": "delivery_contact.city" * }, * "postal_code": { * "_copy": "delivery_contact.postal_code" * }, * "country": { * "_copy": "delivery_contact.country" * } * } * ], * "_uniq": [ * "street_name", * "street_number", * "postal_code", * "country" * ] * } * } * ] * } * } */ MapEntityActionConfig | /** * example: * { * "id": "08g988-ojt2jtaga-292h-8978gsaga", * "name": "Trigger Workflow", * "type": "trigger-workflow", * "config": { * "target_workflow": "mfptvUMH", * "conditions": [ * { * "schema": "ivy-opportunity", * "source": "customer.type", * "comparison": "equals", * "value": "PRIVATE" * } * ], * "assign_steps": [ * { * "step_name": "Lead Sales", * "user_ids": [ * 10010729 * ] * }, * { * "step_name": "Operations", * "user_ids": [ * 10010728, * 10010729 * ] * } * ] * } * } */ TriggerWorkflowActionConfig | TriggerShareEntityActionConfig | /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Trigger Webhook", * "type": "trigger-webhook", * "config": { * "entity_sources": [ * "contact", * "account" * ], * "target_webhook_id": "25jg9ag2ga" * } * } */ TriggerWebhookActionConfig | /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Inform ERP", * "type": "inform-erp", * "config": { * "entity_sources": [ * "contact", * "account" * ], * "target_webhook_id": "25jg9ag2ga" * } * } */ InformERPActionConfig | /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Trigger Event", * "type": "trigger-event", * "config": { * "event_name": "my_custom_event", * "event_inputs": { * "key": "value" * } * } * } */ TriggerEventActionConfig | /** * example: * { * "id": "08g988-ojt2jtaga-292h-8978gsaga", * "name": "Create Document", * "type": "create-document", * "config": { * "template_id": { * "type": "string", * "example": "112b08ba-789c-42f2-9940-43b302f641e8\"" * }, * "filename": { * "type": "string", * "example": "newsletter.pdf\"" * } * } * } */ CreateDocumentActionConfig | /** * example: * { * "id": "25jga0-gkasl26-0asg-908sgaj2", * "name": "Send Email", * "type": "send-email", * "config": { * "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2", * "language_code": "de" * } * } */ SendEmailActionConfig | /* Creates an order entity with prices from journey */ CartCheckoutActionConfig | CustomAction | AutomationActionConfig | /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Cancel Flow Execution", * "type": "cancel-flow-execution", * "config": { * "selected_reasons": [ * { * "id": "_6kITMwkv_0Uo4i7fO7Ja", * "title": "when you are done! that's when you close it." * }, * { * "id": "qgK9sGbKoS7NxlAbNReVn", * "title": "Client didn't want our services" * } * ], * "extra_description": "Test cancellation" * } * } */ FlowExecutionCancelActionConfig | /** * example: * { * "id": "25jga0-gkasl26-0asg-908sgaj2", * "name": "Forward Email", * "type": "forward-email", * "config": { * "forward_to": [ * { * "email": "external@outlook.com", * "name": "External User" * } * ] * } * } */ ForwardEmailActionConfig | /** * example: * { * "id": "25jga0-gkasl26-0asg-908sgaj2", * "name": "Reply Email", * "type": "reply-email", * "config": { * "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2", * "language_code": "de", * "reply_mode": "reply_in_thread" * } * } */ ReplyEmailActionConfig; export type AnyTrigger = FrontendSubmitTrigger | JourneySubmitTrigger | ApiSubmissionTrigger | /** * - If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs. * - The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html` * | Comparison | Example | Rule syntax | * |------------------------|-----------------------------------------------------|----------------------------------------------------------| * | Null | first_name is null | `"first_name": [ null ]` | * | Empty | last_name is empty | `"last_name": [""]` | * | Equals | email is "j.doe@email.com" | `"email": [ "j.doe@email.com" ]` | * | Equals (ignore case) | first_name is "John" | `"first_name": [ { "equals-ignore-case": "john" } ]` | * | And | fist_name is "John" and last_name is "Doe" | `"first_name": [ "John" ], "last_name": ["Doe"]` | * | Or | PaymentType is "Invoice" or "SEPA" | `"PaymentType": [ "invoice", "sepa"]` | * | Or (multiple fields) | first_name is "John", or last_name is "Doe". | `"$or": [ { "first_name": [ "John" ] }, { "last_name": [ "Doe" ] } ]` | * | Not | status is anything but "cancelled" | `"status": [ { "anything-but": [ "cancelled" ] } ]` | * | Numeric (equals) | Price is 100 | `"Price": [ { "numeric": [ "=", 100 ] } ]` | * | Numeric (range) | Price is more than 10, and less than or equal to 20 | `"Price": [ { "numeric": [ ">", 10, "<=", 20 ] } ]` | * | Exists | ProductName exists | `"ProductName": [ { "exists": true } ]` | * | Does not exist | ProductName does not exist | `"ProductName": [ { "exists": false } ]` | * | Begins with | OpportunityNumber starts with OPP- | `"opportunity_number": [ { "prefix": "OPP-" } ]` | * | Ends with | FileName ends with a .png extension | `"filename": [ { "suffix": ".png" } ]` | * | Wildcard | search a string using a wildcard | `"email": [ { "wildcard": "*@doe.com" } ]` | * - To run the execution on all update events * ``` * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"] * } * } * } * ``` * - To run the execution only when the updates are from a portal user * ``` * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"] * }, * "activity": { * "type": "EntityUpdatedFromPortal" * } * } * } * ``` * - To run the execution only when there is an update on a specific attribute * ``` * Only starts the automation when the email on a contact is changed * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"], * "payload": { * "_schema": ["contact"] * }, * "diff": { * "updated": { * "email": [{ "exists": true }] * } * } * } * } * } * ``` * - To run the execution only when a specific attribute is altered(created/updated/deleted) * ``` * Only starts the automation when a price is altered on a contract * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "payload": { * "_schema": ["contract"] * }, * "diff": { * // Whether he first_name has been added, updated, or removed * $or: [ * { * 'added.first_name': [{ exists: true }] * }, * { * 'updated.first_name': [{ exists: true }] * }, * { * 'deleted.first_name': [{ exists: true }] * } * ] * } * } * } * } * ``` * - To run the execution if an attribute is changed from one state to another * ``` * Only starts the automation when the order status changes from `open_for_acceptance` to `placed` * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"], * "payload": { * "_schema": ["order"], * "status": ["placed"] * }, * "diff": { * "updated": { * "status": ["open_for_acceptance"] * } * } * } * } * } * ``` * */ EntityOperationTrigger | ActivityTrigger | EntityManualTrigger | ReceivedEmailTrigger | NewEmailThreadTrigger | FlowsTrigger; export interface AnythingButCondition { "anything-but"?: string[]; } export interface ApiCallerContext { [name: string]: any; EpilotAuth?: { /** * example: * { * "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce", * "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D", * "custom:ivy_org_id": "739224", * "cognito:username": "n.ahmad@epilot.cloud", * "custom:ivy_user_id": "10006129", * "aud": "6e0jbdnger7nmoktaaflarue1l", * "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75", * "token_use": "id", * "auth_time": 1614333023, * "exp": 1614336623, * "iat": 1614333023, * "email": "n.ahmad@epilot.cloud" * } */ claims?: { /** * example: * 10006129 */ userId?: string; /** * example: * 476e9b48-42f4-4234-a2b0-4668b34626ce */ sub?: string; /** * example: * example@epilot.cloud */ email?: string; /** * example: * example@epilot.cloud */ "cognito:username"?: string; /** * example: * 10006129 */ "custom:ivy_user_id"?: string; }; /** * example: * 10006129 */ userId?: string; /** * example: * 739224 */ organizationId?: string; /** * example: * eyJraWQiOi... */ token?: string; }; } export interface ApiSubmissionTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "api_submission"; configuration: { source_id?: string; }; } export interface AppendValueMapper { mode: /** * - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property. * */ MappingAttributeMode; /** * JSON like target path for the attribute. Eg. last_name */ target: string; /** * JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price * */ source?: string; /** * To be provided only when mapping json objects into a target attribute. Eg array of addresses. * */ value_json: string; /** * Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code] * */ target_unique?: string[]; } export interface AssignThreadAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "assign-thread"; config?: AssignThreadConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } export interface AssignThreadConfig { /** * Assignees to remove from the thread, if they exist */ remove?: string[]; /** * Assignees to add to the thread */ add?: string[]; } /** * example: * [ * { * "step_id": "xyh9t2ha", * "step_name": "Lead Sales", * "user_ids": [ * 10010729 * ] * }, * { * "step_id": "29jgasl", * "step_name": "Operations", * "user_ids": [ * 10010728, * 10010729 * ] * } * ] */ export interface AssignUsersToStep { step_id?: string; step_name?: string; user_ids?: number[]; } export interface AutomationAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: string; config?: { [name: string]: any; }; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } export interface AutomationActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: string; config?: { [name: string]: any; }; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface AutomationActionExecutionState { execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ export type AutomationActionId = string; /** * A snapshot of a single completed pass through a looped action. */ export interface AutomationActionIteration { /** * Zero-based iteration index within the loop scope. */ index: number; execution_status: ExecutionStatus; started_at?: string; // date-time ended_at?: string; // date-time outputs?: { [name: string]: any; }; error_output?: ErrorOutput; } export interface AutomationExecution { id: /** * example: * 9baf184f-bc81-4128-bca3-d974c90a12c4 */ AutomationExecutionId; execution_status?: ExecutionStatus; entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; activity_id?: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ ActivityId; entity_snapshot?: EntityItemSnapshot; org_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ OrganizationId; flow_id: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ AutomationFlowId; /** * example: * Handle contact form */ flow_name?: string; created_at?: string; // date-time updated_at?: string; // date-time current_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; conditions?: ActionCondition[]; schedules?: ActionSchedule[]; actions: AnyAction[]; resume_token?: /** * A unique token to resume a paused automation execution * example: * eyJraWQiOiJrZXkifQ== */ ResumeToken; trigger_context?: /** * 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. * example: * { * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" * } */ TriggerContext; /** * Version of the flow * example: * 2 */ version?: number; trigger_event?: TriggerEventManual | TriggerEventEntityActivity | TriggerEventEntityOperation | TriggerEventFlowAutomationTask | TriggerEventMessaging; workflow_context?: WorkflowExecutionContext; /** * Loop scope definitions propagated from the flow onto the execution record. Each loop has an id and a source_path resolved against the trigger entity at execution time. Actions referencing a loop's id via their loop_id property run once per item in the resolved array. * */ loops?: /* A loop scope on an automation flow. */ AutomationLoop[]; /** * Runtime iteration state, keyed by loop_id. Tracks the current_index and total for each active loop scope. Entries are removed once a loop exits. * */ loop_state?: { [name: string]: AutomationLoopState; }; } /** * example: * 9baf184f-bc81-4128-bca3-d974c90a12c4 */ export type AutomationExecutionId = string; export interface AutomationFlow { id?: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ AutomationFlowId; /** * A descriptive name for the Automation * example: * Handle contact form */ flow_name: string; /** * Whether the automation is enabled or not */ enabled?: boolean; disable_details?: { /** * When the flow was disabled */ disabled_at: string; // date-time /** * Who disabled the flow (system or user) */ disabled_by: "system" | "user"; /** * The 360 user email that disabled the flow */ blame?: string; }; triggers: AnyTrigger[]; trigger_conditions?: /** * example: * { * "source": "billing_contact.email", * "comparison": "exists" * } */ TriggerCondition[]; /** * The triggering entity schema * example: * submission */ entity_schema?: string; conditions?: ActionCondition[]; schedules?: ActionSchedule[]; /** * Loop scope definitions. Each loop has an id and a source_path resolved against the trigger entity at execution time. Actions referencing a loop's id via their loop_id property run once per item in the resolved array. Loop members must be contiguous in the actions array. * */ loops?: /* A loop scope on an automation flow. */ AutomationLoop[]; /** * The actions (nodes) of the automation flow */ actions: AnyAction[]; /** * Number of automation executions that ran * example: * 7 */ runs?: number; /** * Customized execution hot flow rate limit. Takes precedence over the default hot flow rate limit if specified. */ max_executions?: { /** * Maximum number of executions per time window * example: * 100 */ count?: number; /** * ISO 8601 duration time window for the threshold * example: * PT1M */ window?: string; }; created_at?: string; // date-time updated_at?: string; // date-time /** * User / service who created automation flow * example: * user:123 */ created_by?: string; /** * User / service who last updated automation flow * example: * user:123 */ last_updated_by?: string; /** * Organization the automation flow belongs to * example: * 123 */ org_id?: string; /** * Determines if the flow is a system generated flow */ system_flow?: boolean; /** * Version of the flow * example: * 2 */ version?: number; /** * Source blueprint/manifest ID used when automation is created via blueprints. */ _manifest?: string /* uuid */[] | null; /** * If true, automation is displayed in read-only mode in the UI to discourage changes */ protected?: boolean; } /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ export type AutomationFlowId = string; /** * A loop scope on an automation flow. */ export interface AutomationLoop { /** * Stable identifier referenced by AutomationActionConfig.loop_id * example: * loop_contracts */ id: string; /** * Path resolved against the trigger entity to produce the array of iteration items. e.g. submission.steps[0]['Contracts']. * * example: * submission.steps[0]['Contracts'] */ source_path: string; /** * How source_path is interpreted. 'journey-multi-select' is the v1 source type (journey card block with multi-select). Future source types (e.g. 'previous-action-outputs', 'entity-relation') will be added here. * */ source_type?: "journey-multi-select" | "previous-action-outputs" | "entity-relation"; /** * Maximum number of iterations. 0 / omitted = iterate the full resolved array. * */ length?: number; } export interface AutomationLoopState { current_index: number; total: number; } export interface AutomationTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid } export interface BulkTriggerJob { job_id: /** * Job ID for tracking the status of bulk trigger automation executions * example: * 8c086140-f33e-4bb7-a993-50c0f2402c7b */ JobId; org_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ OrganizationId; flow_id: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ AutomationFlowId; /** * Status of the bulk trigger automation job * * approval: Waiting for user approval to start the bulk trigger automation * * querying_entities: Loading entities in batches * * entities_loaded: All entities have been loaded and stored * * executing: Automation execution are currently running * * monitoring: All executions have been started, now monitoring their completion * * send_report: Automation executions finished running. Report is being created & sent to the user who initiated the bulk trigger automation * * finished: Automation executions finished running. Some may have failed. Check the status of each entity. * * failed: Bulk trigger automation execution failed. Some executions might have started. Check the status of each entity. * * cancelled: Bulk trigger automation execution was cancelled * */ status: "approval" | "querying_entities" | "entities_loaded" | "executing" | "monitoring" | "send_report" | "finished" | "failed" | "cancelled"; /** * User ID who created the bulk trigger automation job * example: * 1234 */ created_by: string; created_at: string; // date-time updated_at: string; // date-time /** * Time when the bulk trigger automation executions job was approved */ approved_at?: string; // date-time trigger_context?: /** * 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. * example: * { * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" * } */ TriggerContext; /** * Task token to approve/cancel the bulk automation job * example: * 8c086140-f33e-4bb7-a993-50c0f2402c7b */ task_token?: string; /** * Entity ID of the report file entity */ report_file_entity_id?: string; /** * Query configuration for loading entities */ entity_query?: { type: "refs" | "query" | "filter"; data: EntityRef[] | string | /** * 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. * example: * [ * { * "term": { * "_schema": "contact" * } * }, * { * "terms": { * "status": [ * "active" * ] * } * } * ] */ EntitySearchFilter; }; /** * Pagination state for entity loading */ pagination_state?: { /** * Number of entities per page */ page_size?: number; /** * Number of pages processed so far */ pages_processed?: number; /** * Total number of entities processed so far */ total_processed?: number; /** * Stable query ID for pagination */ stable_query_id?: string; /** * Last sort value used for pagination */ search_after?: (string | number)[]; /** * Whether there are more entities to load */ has_more?: boolean; }; /** * List of entities & their automation execution id & status */ execution_summary?: /* Execution item for bulk trigger automation. It maps each entity to its automation execution id & status */ ExecItem[]; } export type BulkTriggerRequest = { flow_id: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ AutomationFlowId; entities_refs: EntityRef[]; trigger_context?: /** * 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. * example: * { * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" * } */ TriggerContext; } | { flow_id: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ AutomationFlowId; entities_query: string; trigger_context?: /** * 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. * example: * { * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" * } */ TriggerContext; } | { flow_id: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ AutomationFlowId; entities_filter: /** * 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. * example: * [ * { * "term": { * "_schema": "contact" * } * }, * { * "terms": { * "status": [ * "active" * ] * } * } * ] */ EntitySearchFilter; trigger_context?: /** * 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. * example: * { * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" * } */ TriggerContext; }; /** * A reason for cancelling a flow execution */ export interface CancellationReason { /** * Unique identifier for the cancellation reason * example: * _6kITMwkv_0Uo4i7fO7Ja */ id: string; /** * Human-readable title for the cancellation reason * example: * Process completed successfully */ title: string; } /** * Creates an order entity with prices from journey */ export interface CartCheckoutAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "cart-checkout"; config?: CartCheckoutConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * Creates an order entity with prices from journey */ export interface CartCheckoutActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "cart-checkout"; config?: CartCheckoutConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface CartCheckoutConfig { /** * Version of the config */ version?: string; mapping_config?: MappingConfigRef; relation_attributes?: RelationAttribute[]; mapping_attributes?: (/** * example: * { * "target": "_tags", * "operation": { * "_append": [ * "new", * "tags" * ], * "_uniq": true * } * } */ MappingAttributeV2 | MappingAttribute)[]; /** * Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback * */ linkback_relation_attribute?: string; /** * Relation tags (labels) to include in main entity linkback relation attribute */ linkback_relation_tags?: string[]; /** * Unique key for target entity (see upsertEntity of Entity API) */ target_unique?: string[]; } export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty"; /** * example: * { * "source": { * "origin": "trigger", * "originType": "entity", * "id": "trigger-id", * "schema": "contact", * "attribute": "email", * "attributeType": "text" * }, * "operation": "equals", * "values": [ * "hello@epilot.cloud" * ] * } */ export interface ConditionStatement { /** * example: * 1c8d3d9c-6d4c-4a83-aa22-aa0d630cbc2d */ id?: string; // uuid source?: { /** * The id of the action or trigger */ id?: string; origin?: "trigger" | "action"; originType?: "entity" | "workflow" | "journey_block"; schema?: string; attribute?: string; attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "payment" | "relation_payment_method"; attributeRepeatable?: boolean; /** * Whether to apply the operation to each item of the repeatable attribute */ repeatableItemOp?: boolean; attributeOperation?: "all" | "updated" | "added" | "deleted"; }; operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "entity_exists" | "entity_does_not_exist"; values?: string[]; } export interface CopyValueMapper { mode: /** * - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property. * */ MappingAttributeMode; /** * JSON like target path for the attribute. Eg. last_name */ target: string; /** * JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price * */ source: string; } export interface CreateDocumentAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "create-document"; config?: CreateDocumentConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "08g988-ojt2jtaga-292h-8978gsaga", * "name": "Create Document", * "type": "create-document", * "config": { * "template_id": { * "type": "string", * "example": "112b08ba-789c-42f2-9940-43b302f641e8\"" * }, * "filename": { * "type": "string", * "example": "newsletter.pdf\"" * } * } * } */ export interface CreateDocumentActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "create-document"; config?: CreateDocumentConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface CreateDocumentConfig { template_id?: string; filename?: string; } export interface CustomAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "custom-action"; config?: { [name: string]: any; /** * The name of the custom action * example: * Credit Check */ name?: string; /** * The description of the custom action * example: * Check if the customer has a credit limit */ description?: string; /** * The ID of the app to fetch configuration from the app API * example: * c451c26a-cc7a-4c1c-92bf-1c6246cbfe88 */ app_id?: string; /** * The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component * example: * 2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88 */ component_id?: string; /** * Whether to wait for the callback from the custom action */ wait_for_callback?: boolean; }; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } export type DiffAdded = FilterConditionOnEvent; export type DiffDeleted = FilterConditionOnEvent; export type DiffUpdated = FilterConditionOnEvent; /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ export type EntityId = string; export interface EntityItemSnapshot { [name: string]: any; _id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; _title: string; _org: string; _schema: string; _tags?: string[]; _created_at: string; // date-time _updated_at: string; // date-time } export interface EntityManualTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "entity_manual"; configuration: { /** * Which entity type can this automation be triggered from * example: * submission */ schema?: string; }; } export type EntityOperation = "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"; /** * - If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs. * - The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html` * | Comparison | Example | Rule syntax | * |------------------------|-----------------------------------------------------|----------------------------------------------------------| * | Null | first_name is null | `"first_name": [ null ]` | * | Empty | last_name is empty | `"last_name": [""]` | * | Equals | email is "j.doe@email.com" | `"email": [ "j.doe@email.com" ]` | * | Equals (ignore case) | first_name is "John" | `"first_name": [ { "equals-ignore-case": "john" } ]` | * | And | fist_name is "John" and last_name is "Doe" | `"first_name": [ "John" ], "last_name": ["Doe"]` | * | Or | PaymentType is "Invoice" or "SEPA" | `"PaymentType": [ "invoice", "sepa"]` | * | Or (multiple fields) | first_name is "John", or last_name is "Doe". | `"$or": [ { "first_name": [ "John" ] }, { "last_name": [ "Doe" ] } ]` | * | Not | status is anything but "cancelled" | `"status": [ { "anything-but": [ "cancelled" ] } ]` | * | Numeric (equals) | Price is 100 | `"Price": [ { "numeric": [ "=", 100 ] } ]` | * | Numeric (range) | Price is more than 10, and less than or equal to 20 | `"Price": [ { "numeric": [ ">", 10, "<=", 20 ] } ]` | * | Exists | ProductName exists | `"ProductName": [ { "exists": true } ]` | * | Does not exist | ProductName does not exist | `"ProductName": [ { "exists": false } ]` | * | Begins with | OpportunityNumber starts with OPP- | `"opportunity_number": [ { "prefix": "OPP-" } ]` | * | Ends with | FileName ends with a .png extension | `"filename": [ { "suffix": ".png" } ]` | * | Wildcard | search a string using a wildcard | `"email": [ { "wildcard": "*@doe.com" } ]` | * - To run the execution on all update events * ``` * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"] * } * } * } * ``` * - To run the execution only when the updates are from a portal user * ``` * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"] * }, * "activity": { * "type": "EntityUpdatedFromPortal" * } * } * } * ``` * - To run the execution only when there is an update on a specific attribute * ``` * Only starts the automation when the email on a contact is changed * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"], * "payload": { * "_schema": ["contact"] * }, * "diff": { * "updated": { * "email": [{ "exists": true }] * } * } * } * } * } * ``` * - To run the execution only when a specific attribute is altered(created/updated/deleted) * ``` * Only starts the automation when a price is altered on a contract * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "payload": { * "_schema": ["contract"] * }, * "diff": { * // Whether he first_name has been added, updated, or removed * $or: [ * { * 'added.first_name': [{ exists: true }] * }, * { * 'updated.first_name': [{ exists: true }] * }, * { * 'deleted.first_name': [{ exists: true }] * } * ] * } * } * } * } * ``` * - To run the execution if an attribute is changed from one state to another * ``` * Only starts the automation when the order status changes from `open_for_acceptance` to `placed` * { * "type": "filter_entity_event", * "configuration": { * "operation": { * "operation": ["updateEntity"], * "payload": { * "_schema": ["order"], * "status": ["placed"] * }, * "diff": { * "updated": { * "status": ["open_for_acceptance"] * } * } * } * } * } * ``` * */ export interface EntityOperationTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "entity_operation"; configuration: { /** * example: * submission */ schema?: string; operations?: [ EntityOperation, ...EntityOperation[] ]; include_activities?: string[]; exclude_activities?: string[]; filter_config?: { operation?: { /** * Filter on operation type. If not specified, all operations will be matched on execution. * Example: * 1. Filter all the createEntity/updateEntity operations * ``` * { * "operation":{ * "operation": ["createEntity", "updateEntity"] * } * } * ``` * */ operation?: EntityOperation[]; payload?: FilterConditionOnEvent; diff?: OrConditionForDiff | { added?: DiffAdded; updated?: DiffUpdated; deleted?: DiffDeleted; }; }; activity?: { /** * Filter on activity type. If not specified, all activities will be matched on execution. * Example: * 1. Filter the events when an entity is updated from portal * ``` * { * "activity":{ * "type": ["EntityUpdatedFromPortal"] * } * } * ``` * 2. Filter the events when either a doc is uploaded/removed on an entity from a portal * ``` * { * "activity":{ * "type": ["DocUploadedFromPortal", "DocRemovedFromPortal"] * } * } * ``` * * example: * [ * "EntityUpdatedFromPortal", * "EntityUpdated", * "DocUploadedFromPortal" * ] */ type?: (string | EqualsIgnoreCaseCondition | AnythingButCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[]; }; }; ecp_config?: { /** * example: * END_CUSTOMER_PORTAL */ origin?: string; /** * example: * any-portal-id */ portal_id?: string; file_config?: { /** * example: * true */ shared_with_end_customer?: boolean; }; }; }; } export interface EntityRef { entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; entity_schema: string; } /** * 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. * example: * [ * { * "term": { * "_schema": "contact" * } * }, * { * "terms": { * "status": [ * "active" * ] * } * } * ] */ export type EntitySearchFilter = { /** * Returns documents that contain an exact term in a provided field. * * To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization. * * You likely DO NOT want to use this filter on text fields and want to target its .keyword instead. * * example: * { * "_schema": "contact" * } */ term?: { [name: string]: /* A filter field value. */ EntitySearchFilterValue; }; /** * Returns documents that contain one of the exact terms in a provided field. See term filter for more info. * example: * { * "status": [ * "active" * ] * } */ terms?: { [name: string]: /* A filter field value. */ EntitySearchFilterValue[]; }; /** * Returns documents based on their IDs. * example: * { * "values": [ * "550e8400-e29b-41d4-a716-446655440000" * ] * } */ ids?: { values?: string[]; }; /** * Returns documents with fields that have terms within a certain range. * example: * { * "_created_at": { * "gte": "2021-01-01T00:00:00.000Z", * "lte": "2021-01-31T23:59:59.999Z" * } * } */ range?: { [name: string]: { gt?: /* A filter field value. */ EntitySearchFilterValue; gte?: /* A filter field value. */ EntitySearchFilterValue; lt?: /* A filter field value. */ EntitySearchFilterValue; lte?: /* A filter field value. */ EntitySearchFilterValue; /** * The date format used to parse date values. */ format?: string; /** * Indicates how the range query matches values for range fields. */ relation?: "INTERSECTS" | "CONTAINS" | "WITHIN"; /** * Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query to UTC. */ time_zone?: string; }; }; /** * Returns documents that have a value in the specified field. * example: * { * "field": "_tags" * } */ exists?: { field: string; }; $and?: /** * 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. * example: * [ * { * "term": { * "_schema": "contact" * } * }, * { * "terms": { * "status": [ * "active" * ] * } * } * ] */ EntitySearchFilter; $or?: /** * 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. * example: * [ * { * "term": { * "_schema": "contact" * } * }, * { * "terms": { * "status": [ * "active" * ] * } * } * ] */ EntitySearchFilter; $not?: /** * 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. * example: * [ * { * "term": { * "_schema": "contact" * } * }, * { * "terms": { * "status": [ * "active" * ] * } * } * ] */ EntitySearchFilter; }[]; /** * A filter field value. */ export type EntitySearchFilterValue = /* A filter field value. */ (string | null) | number | boolean; export interface EqualsIgnoreCaseCondition { "equals-ignore-case"?: string; } 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" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"; export interface ErrorDetail { explanation: string; context?: string; id?: string; } export interface ErrorObject { /** * The HTTP status code of the error * example: * 400 */ status?: number; /** * The error message */ error?: string; } export interface ErrorOutput { error_code: ErrorCode; error_reason: string; error_info?: { [name: string]: any; details?: ErrorDetail[]; }; } /** * Execution item for bulk trigger automation. It maps each entity to its automation execution id & status */ export interface ExecItem { entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; entity_schema?: string; execution_id?: /** * example: * 9baf184f-bc81-4128-bca3-d974c90a12c4 */ AutomationExecutionId; execution_status: ExecutionStatus; /** * Timestamp in UTC ISO format * example: * 2025-10-30T15:56:47.842Z */ timestamp?: string; // date-time /** * Error message for the failed automation execution */ error?: string; } /** * [Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers. */ export interface ExecutionChain { /** * ID of the parent flow execution that triggered this one */ parent_execution_id?: string; /** * ID of the automation task that triggered this execution */ parent_task_id?: string; /** * Current depth in the execution chain (0 = manual start) */ depth?: number; } export type ExecutionStatus = "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"; export interface ExistsCondition { exists?: boolean; } export type FilterConditionOnEvent = OrCondition | { [name: string]: (string | EqualsIgnoreCaseCondition | AnythingButCondition | NumericCondition | ExistsCondition | PrefixCondition | SuffixCondition | WildcardCondition)[]; }; export interface FlowExecutionCancelAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "cancel-flow-execution"; config?: /* Configuration for cancelling a flow execution with selected reasons */ FlowExecutionCancelConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Cancel Flow Execution", * "type": "cancel-flow-execution", * "config": { * "selected_reasons": [ * { * "id": "_6kITMwkv_0Uo4i7fO7Ja", * "title": "when you are done! that's when you close it." * }, * { * "id": "qgK9sGbKoS7NxlAbNReVn", * "title": "Client didn't want our services" * } * ], * "extra_description": "Test cancellation" * } * } */ export interface FlowExecutionCancelActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "cancel-flow-execution"; config?: /* Configuration for cancelling a flow execution with selected reasons */ FlowExecutionCancelConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } /** * Configuration for cancelling a flow execution with selected reasons */ export interface FlowExecutionCancelConfig { /** * List of reasons selected for this specific cancellation */ selected_reasons?: /* A reason for cancelling a flow execution */ CancellationReason[]; /** * Additional description or notes for the cancellation * example: * Process completed successfully */ extra_description?: string; } export interface FlowsTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "flows_trigger"; configuration?: { /** * When Journeys are linked to Workflows V2 as Journey Automations, this field will contain the ID of the Journey */ journey_id?: string; // uuid }; } export interface ForwardEmailAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "forward-email"; config?: ForwardEmailConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "25jga0-gkasl26-0asg-908sgaj2", * "name": "Forward Email", * "type": "forward-email", * "config": { * "forward_to": [ * { * "email": "external@outlook.com", * "name": "External User" * } * ] * } * } */ export interface ForwardEmailActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "forward-email"; config?: ForwardEmailConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface ForwardEmailConfig { /** * List of email addresses to forward the incoming email to */ forward_to: { /** * Email address to forward to */ email: string; // email /** * Display name for the recipient */ name?: string; }[]; /** * Whether to include the original email attachments in the forwarded email */ include_attachments?: boolean; /** * Prefix to add to the original email subject */ subject_prefix?: string; /** * When enabled, the email thread will be automatically marked as done after this action completes. */ mark_as_done?: boolean; /** * When enabled, the email thread will be marked as read after this action completes. */ mark_as_read?: boolean; } export interface FrontendSubmitTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "frontend_submission"; configuration: { /** * example: * 99 */ source_id?: string; }; } export interface GetExecutionsResp { total: number; results: AutomationExecution[]; } export interface InformERPAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "inform-erp"; config?: InformERPConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Inform ERP", * "type": "inform-erp", * "config": { * "entity_sources": [ * "contact", * "account" * ], * "target_webhook_id": "25jg9ag2ga" * } * } */ export interface InformERPActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "inform-erp"; config?: InformERPConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface InformERPConfig { entity_sources?: string[]; target_webhook_id?: string; /** * Whether to wait for the request to finish before continuing automation execution */ sync?: boolean; } /** * Job ID for tracking the status of bulk trigger automation executions * example: * 8c086140-f33e-4bb7-a993-50c0f2402c7b */ export type JobId = string; export interface JourneySubmitTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "journey_submission"; configuration: { source_id: string; // uuid }; } export interface MapEntityAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "map-entity"; config?: MapEntityConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Map Entity", * "type": "map-entity", * "config": { * "target_schema": "contact", * "target_unique": [ * "email.0.email" * ], * "relation_attributes": [ * { * "target": "company", * "mode": "append", * "source_filter": { * "schema": "account", * "limit": 1 * } * } * ], * "mapping_attributes": [ * { * "target": "_tags", * "operation": { * "_append": [ * "primary", * "payer" * ], * "_uniq": true * } * }, * { * "target": "email", * "operation": { * "_append": [ * { * "email": { * "_copy": "billing_contact.email" * } * } * ] * } * }, * { * "target": "first_name", * "operation": { * "_copy": "billing_contact.first_name" * } * }, * { * "target": "last_name", * "operation": { * "_copy": "billing_contact.last_name" * } * }, * { * "target": "contact_type", * "operation": { * "_set": "customer" * } * }, * { * "target": "address", * "operation": { * "_append": [ * { * "_tags": [ * "billing", * "primary" * ], * "street_name": { * "_copy": "billing_contact.street_name" * }, * "street_number": { * "_copy": "billing_contact.street_number" * }, * "city": { * "_copy": "billing_contact.city" * }, * "postal_code": { * "_copy": "billing_contact.postal_code" * }, * "country": { * "_copy": "billing_contact.country" * } * }, * { * "_tags": [ * "delivery" * ], * "street_name": { * "_copy": "delivery_contact.street_name" * }, * "street_number": { * "_copy": "delivery_contact.street_number" * }, * "city": { * "_copy": "delivery_contact.city" * }, * "postal_code": { * "_copy": "delivery_contact.postal_code" * }, * "country": { * "_copy": "delivery_contact.country" * } * } * ], * "_uniq": [ * "street_name", * "street_number", * "postal_code", * "country" * ] * } * } * ] * } * } */ export interface MapEntityActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "map-entity"; config?: MapEntityConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface MapEntityConfig { mapping_config?: MappingConfigRef; /** * Schema of target entity */ target_schema: string; /** * Unique key for target entity (see upsertEntity of Entity API) */ target_unique?: string[]; /** * Attribute mappings */ mapping_attributes?: (/** * example: * { * "target": "_tags", * "operation": { * "_append": [ * "new", * "tags" * ], * "_uniq": true * } * } */ MappingAttributeV2 | MappingAttribute)[]; /** * Relation mappings */ relation_attributes?: RelationAttribute[]; /** * Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback * */ linkback_relation_attribute?: string; /** * Relation tags (labels) to include in main entity linkback relation attribute */ linkback_relation_tags?: string[]; } export type MappingAttribute = SetValueMapper | CopyValueMapper | AppendValueMapper; /** * - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property. * */ export type MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value"; /** * example: * { * "target": "_tags", * "operation": { * "_append": [ * "new", * "tags" * ], * "_uniq": true * } * } */ export interface MappingAttributeV2 { /** * Target JSON path for the attribute to set */ target?: string; operation: /* Mapping operation nodes are either primitive values or operation node objects */ OperationNode; } export interface MappingConfigRef { /** * Id of Entity Mapping Configuration to run for mapping. */ config_id: string; /** * Id of TargetConfig to run for mapping. */ target_id: string; /** * Version of Entity Mapping Configuration to run for mapping. */ version?: number; } export interface MoveThreadAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "move-thread"; config?: MoveThreadConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } export interface MoveThreadConfig { /** * ID of the inbox where the thread should be moved to */ target_inbox_id?: string; } export interface NewEmailThreadTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "new_email_thread"; configuration: { /** * A list of shared inbox IDs that the email thread should be matched against. */ shared_inbox_ids?: string[]; /** * Whether the trigger should be matched against only inbound, outbound emails or both. */ direction: "INBOUND" | "OUTBOUND" | "BOTH"; }; } export interface NumericCondition { numeric?: (string | number)[]; } /** * Mapping operation nodes are either primitive values or operation node objects */ export type OperationNode = /* Mapping operation nodes are either primitive values or operation node objects */ OperationObjectNode | PrimitiveJSONValue; export interface OperationObjectNode { [name: string]: any; _set?: PrimitiveJSONValue; /** * Append to array */ _append?: any; /** * Unique array */ _uniq?: /* Unique array */ boolean | string[]; /** * Copy JSONPath value from source entity context * example: * contact.first_name */ _copy?: string; } export interface OrCondition { $or?: FilterConditionOnEvent[]; } export interface OrConditionForDiff { $or?: (DiffAdded | DiffUpdated | DiffDeleted)[]; } /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ export type OrganizationId = string; export interface PatchBulkJobRequest { action: "APPROVE" | "CANCEL"; task_token: string; } export interface PrefixCondition { prefix?: string; } export type PrimitiveJSONValue = any; export interface ReceivedEmailTrigger { /** * example: * 12d4f45a-1883-4841-a94c-5928cb338a94 */ id?: string; // uuid type: "received_email"; configuration: { message_type?: "RECEIVED"; }; } export interface RelationAttribute { /** * Target attribute to store the relation in */ target: string; /** * Relation tags (labels) to set for the stored relations */ target_tags?: string[]; /** * Include all relation tags (labels) present on the main entity relation */ target_tags_include_source?: boolean; /** * A filter to identify which source entities to pick as relations from main entity */ source_filter?: { /** * Limit relations to maximum number (default, all matched relations) */ limit?: number; /** * Filter by specific schema */ schema?: string; /** * Filter by a specific relation attribute on the main entity */ attribute?: string; /** * Filter by relation tag (label) on the main entity */ relation_tag?: string; /** * Filter by a specific tag on the related entity */ tag?: string; /** * Picks main entity as relation (overrides other filters) */ self?: boolean; }; related_to?: { [name: string]: any; }; mode: "append" | "prepend" | "set"; } export interface ReplyEmailAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "reply-email"; config?: ReplyEmailConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "25jga0-gkasl26-0asg-908sgaj2", * "name": "Reply Email", * "type": "reply-email", * "config": { * "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2", * "language_code": "de", * "reply_mode": "reply_in_thread" * } * } */ export interface ReplyEmailActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "reply-email"; config?: ReplyEmailConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface ReplyEmailConfig { /** * ID of the email template to use for the reply */ email_template_id?: string; /** * Language code for the email template */ language_code?: "de" | "en"; /** * Controls how the reply email is sent. * - reply_in_thread: Sends the email as a reply within the existing email thread (default). * - new_email: Sends the email as a new standalone email to the original sender, creating a fresh thread. * */ reply_mode?: "reply_in_thread" | "new_email"; /** * When enabled, the email thread will be automatically marked as done after this action completes. */ mark_as_done?: boolean; /** * When enabled, the email thread will be marked as read after this action completes. */ mark_as_read?: boolean; } export interface ResumeReq { resume_token: /** * A unique token to resume a paused automation execution * example: * eyJraWQiOiJrZXkifQ== */ ResumeToken; } export interface ResumeResp { execution: AutomationExecution; resumedAction: AnyAction; } /** * A unique token to resume a paused automation execution * example: * eyJraWQiOiJrZXkifQ== */ export type ResumeToken = string; export interface RetryReq { /** * The condition id to retry when retry strategy is RETRY_ALL_PARENT_CONDITION_ACTIONS */ condition_id?: string; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; } /** * different behaviors for retrying failed execution actions. */ export type RetryStrategy = "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"; export interface SearchAutomationsResp { total: number; results: AutomationFlow[]; } export interface SendEmailAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "send-email"; config?: SendEmailConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "25jga0-gkasl26-0asg-908sgaj2", * "name": "Send Email", * "type": "send-email", * "config": { * "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2", * "language_code": "de" * } * } */ export interface SendEmailActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "send-email"; config?: SendEmailConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface SendEmailCondition { _equals?: { source?: string; value?: string; }; } export interface SendEmailConfig { email_template_id?: string; language_code?: "de" | "en"; /** * Send an email exclusively to the portal user if they are registered on the portal. */ notify_portal_user_only?: boolean; /** * When true, it lets to send only the email by skip creating the thread & message entities. */ skip_creating_entities?: boolean; /** * Pause automation execution after sending email to wait for a confirmation link to be clicked. * * The email template should contain a confirmation link using the variable `{{confirmation_url}}` * */ wait_for_confirmation?: boolean; /** * When enabled, overrides the template's "To" field with the sender address of the triggering incoming email. * This is useful for auto-reply scenarios where you want to automatically respond to the person who sent the email. * Only works when the automation is triggered by a received email (received_email or new_email_thread triggers). * */ reply_to_sender?: boolean; /** * Controls how the auto-reply email is sent when reply_to_sender is enabled. * - reply_in_thread: Sends the email as a reply within the existing email thread (default). * - new_email: Sends the email as a new standalone email to the original sender, creating a fresh thread. * */ reply_mode?: "reply_in_thread" | "new_email"; /** * When enabled, the email thread will be automatically marked as done after this action completes. */ mark_as_done?: boolean; /** * When enabled, the email thread will be marked as read after this action completes. */ mark_as_read?: boolean; /** * Include extra file attachments in sent email. * Attachments in email template will be sent regardless of this configuration. * */ attachments?: { /** * Specify filters to match file entities related to main entity */ source_filter?: { /** * Limit files to maximum number (default, all matched file relations) * example: * 1 */ limit?: number; /** * Match by filename. Regex syntax supported * example: * .* */ filename_regex?: string; /** * Filter by a specific relation attribute on the main entity * example: * _files */ attribute?: string; /** * Filter by relation tag (label) on the main entity * example: * contract */ relation_tag?: string; /** * Filter by a specific tag on the related file entity */ tag?: string; /** * Filter by a specific document type (e.g. document) */ document_type?: "document" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"; /** * Picks main entity as file (only works if source entity is a file) */ self?: boolean; }; }[]; /** * Conditions necessary to send out email. Otherwise it will be skipped */ conditions?: SendEmailCondition[]; } export interface SetValueMapper { mode: /** * - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property. * */ MappingAttributeMode; /** * JSON like target path for the attribute. Eg. last_name */ target: string; /** * Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any. * */ value: any; } export interface StartExecutionRequest { entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; flow_id: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ AutomationFlowId; workflow_context?: WorkflowExecutionContext; /** * Use workflow_context.workflow_exec_id instead */ flow_execution_id?: string; /** * Use workflow_context.workflow_exec_task_id instead */ flow_automation_task_id?: string; } export interface SuffixCondition { suffix?: string; } /** * example: * { * "source": "billing_contact.email", * "comparison": "exists" * } */ export interface TriggerCondition { source: string; comparison: Comparison; value?: string | number | string[] | number[]; } /** * 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. * example: * { * "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" * } */ export interface TriggerContext { [name: string]: string; } export interface TriggerEventAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-event"; config?: /* Configuration for triggering an event catalog event */ TriggerEventConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Trigger Event", * "type": "trigger-event", * "config": { * "event_name": "my_custom_event", * "event_inputs": { * "key": "value" * } * } * } */ export interface TriggerEventActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-event"; config?: /* Configuration for triggering an event catalog event */ TriggerEventConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } /** * Configuration for triggering an event catalog event */ export interface TriggerEventConfig { /** * The event catalog event name to trigger */ event_name: string; /** * Inputs to be passed to trigger the event */ event_inputs?: { [name: string]: any; }; } export interface TriggerEventEntityActivity { type?: "entity_activity"; /** * example: * 123 */ org_id: string; activity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ ActivityId; activity_type: string; entity_id?: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; } export interface TriggerEventEntityOperation { type?: "entity_operation"; entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; /** * example: * 123 */ org_id: string; activity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ ActivityId; operation_type: EntityOperation; } export interface TriggerEventFlowAutomationTask { type?: "flow_automation_task"; /** * example: * 123 */ org_id: string; entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; /** * example: * wfwAJoT_cK */ flow_execution_id: string; /** * example: * 2fa221ec-3aac-4655-ab8f-c062eca44a3 */ flow_automation_task_id: string; // UUID caller?: ApiCallerContext; } export interface TriggerEventManual { type?: "manual"; /** * example: * 123 */ org_id: string; entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; caller?: ApiCallerContext; } export interface TriggerEventMessaging { type?: "new_email_thread"; /** * example: * 123 */ org_id: string; thread_id: string; message_id: string; entity_id: /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ EntityId; } export interface TriggerShareEntityAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-share-entity"; config?: TriggerShareEntityConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } export interface TriggerShareEntityActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-workflow"; config?: TriggerShareEntityConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface TriggerShareEntityConfig { partner_org_ids?: string[]; } export interface TriggerWebhookAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-webhook"; config?: TriggerWebhookConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "2520gja-2sgmsaga-0asg-822jgal", * "name": "Trigger Webhook", * "type": "trigger-webhook", * "config": { * "entity_sources": [ * "contact", * "account" * ], * "target_webhook_id": "25jg9ag2ga" * } * } */ export interface TriggerWebhookActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-webhook"; config?: TriggerWebhookConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } export interface TriggerWebhookConfig { /** * The latest webhook event_id for an execution of this action */ event_id?: string; entity_sources?: string[]; target_webhook_id?: string; /** * Whether to wait for the request to finish before continuing automation execution */ sync?: boolean; } export interface TriggerWorkflowAction { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-workflow"; config?: TriggerWorkflowConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; execution_status?: ExecutionStatus; started_at?: string; updated_at?: string; /** * example: * {} */ outputs?: { [name: string]: any; }; error_output?: ErrorOutput; retry_strategy?: /* different behaviors for retrying failed execution actions. */ RetryStrategy; /** * For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass. * */ iterations?: /* A snapshot of a single completed pass through a looped action. */ AutomationActionIteration[]; } /** * example: * { * "id": "08g988-ojt2jtaga-292h-8978gsaga", * "name": "Trigger Workflow", * "type": "trigger-workflow", * "config": { * "target_workflow": "mfptvUMH", * "conditions": [ * { * "schema": "ivy-opportunity", * "source": "customer.type", * "comparison": "equals", * "value": "PRIVATE" * } * ], * "assign_steps": [ * { * "step_name": "Lead Sales", * "user_ids": [ * 10010729 * ] * }, * { * "step_name": "Operations", * "user_ids": [ * 10010728, * 10010729 * ] * } * ] * } * } */ export interface TriggerWorkflowActionConfig { id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; flow_action_id?: /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ AutomationActionId; name?: string; type?: "trigger-workflow"; config?: TriggerWorkflowConfig; /** * Whether to stop execution in a failed state if this action fails */ allow_failure?: boolean; /** * Flag indicating whether the action was created automatically or manually */ created_automatically?: boolean; /** * Flag indicating whether the same action can be in bulk in a single execution. e.g; send-email / map-entity */ is_bulk_action?: boolean; reason?: { /** * Why the action has to be skipped/failed * example: * There are no registered portal users for the given emails, hence skipping the action */ message?: string; /** * Extra metadata about the skipping reason - such as a certain condition not met, etc. */ payload?: { [name: string]: any; }; }; /** * Condition Id to be checked before executing the action */ condition_id?: string; /** * Schedule Id which indicates the schedule of the action */ schedule_id?: string; /** * Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array. * */ loop_id?: string; } /** * example: * { * "source": "email", * "comparison": "equals", * "schema": "contact", * "value": "test@epilot.cloud" * } */ export interface TriggerWorkflowCondition { source: string; comparison: Comparison; value?: string | number | string[] | number[]; schema: string; } export interface TriggerWorkflowConfig { target_workflow?: string; conditions?: /** * example: * { * "source": "email", * "comparison": "equals", * "schema": "contact", * "value": "test@epilot.cloud" * } */ TriggerWorkflowCondition[]; assignees?: string[]; assign_steps?: /** * example: * [ * { * "step_id": "xyh9t2ha", * "step_name": "Lead Sales", * "user_ids": [ * 10010729 * ] * }, * { * "step_id": "29jgasl", * "step_name": "Operations", * "user_ids": [ * 10010728, * 10010729 * ] * } * ] */ AssignUsersToStep[]; filter_with_purposes?: boolean; } export interface WildcardCondition { wildcard?: string; } /** * The role this automation plays in the workflow. */ export type WorkflowContextRole = "trigger_workflow" | "run_task_automation"; export interface WorkflowExecutionContext { workflow_exec_id: string; workflow_exec_task_id?: string; workflow_role: /* The role this automation plays in the workflow. */ WorkflowContextRole; _execution_chain?: /* [Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers. */ ExecutionChain; /** * Additional entity contexts from the parent flow execution. Used when an automation is triggered from a workflow task to carry all flow contexts into the automation, not just the primary entity. * */ entity_contexts?: { entity_id?: string; entity_schema?: string; is_primary?: boolean; }[]; } } } declare namespace Paths { namespace BatchGetFlows { export interface RequestBody { ids?: /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ Components.Schemas.AutomationFlowId[]; } namespace Responses { export type $200 = Components.Schemas.SearchAutomationsResp; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; } } namespace BulkTriggerExecutions { export type RequestBody = Components.Schemas.BulkTriggerRequest; namespace Responses { export type $202 = Components.Schemas.BulkTriggerJob; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; } } namespace CancelExecution { namespace Parameters { export type ExecutionId = /** * example: * 9baf184f-bc81-4128-bca3-d974c90a12c4 */ Components.Schemas.AutomationExecutionId; } export interface PathParameters { execution_id: Parameters.ExecutionId; } namespace Responses { export type $200 = Components.Schemas.AutomationExecution; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace CancelSchedule { namespace Parameters { export type ExecutionId = /** * example: * 9baf184f-bc81-4128-bca3-d974c90a12c4 */ Components.Schemas.AutomationExecutionId; export type ScheduleId = string; } export interface PathParameters { execution_id: Parameters.ExecutionId; schedule_id: Parameters.ScheduleId; } namespace Responses { export type $200 = Components.Schemas.ActionSchedule; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace CreateFlow { export type RequestBody = Components.Schemas.AutomationFlow; namespace Responses { export type $201 = Components.Schemas.AutomationFlow; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; } } namespace DeleteFlow { namespace Parameters { export type FlowId = /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ Components.Schemas.AutomationFlowId; } export interface PathParameters { flow_id: Parameters.FlowId; } namespace Responses { export interface $200 { } export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace GetBulkJob { namespace Parameters { export type JobId = /** * Job ID for tracking the status of bulk trigger automation executions * example: * 8c086140-f33e-4bb7-a993-50c0f2402c7b */ Components.Schemas.JobId; } export interface PathParameters { job_id: Parameters.JobId; } namespace Responses { export type $200 = Components.Schemas.BulkTriggerJob; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace GetExecution { namespace Parameters { export type ExecutionId = /** * example: * 9baf184f-bc81-4128-bca3-d974c90a12c4 */ Components.Schemas.AutomationExecutionId; } export interface PathParameters { execution_id: Parameters.ExecutionId; } namespace Responses { export type $200 = Components.Schemas.AutomationExecution; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace GetExecutions { namespace Parameters { export type EntityId = /** * example: * e3d3ebac-baab-4395-abf4-50b5bf1f8b74 */ Components.Schemas.EntityId; export type From = number; export type IncludeFlows = boolean; export type Size = number; } export interface QueryParameters { entity_id?: Parameters.EntityId; size?: Parameters.Size; from?: Parameters.From; include_flows?: Parameters.IncludeFlows; } namespace Responses { export type $200 = Components.Schemas.GetExecutionsResp; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; } } namespace GetFlow { namespace Parameters { export type FlowId = /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ Components.Schemas.AutomationFlowId; } export interface PathParameters { flow_id: Parameters.FlowId; } namespace Responses { export type $200 = Components.Schemas.AutomationFlow; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace PatchBulkJob { namespace Parameters { export type JobId = /** * Job ID for tracking the status of bulk trigger automation executions * example: * 8c086140-f33e-4bb7-a993-50c0f2402c7b */ Components.Schemas.JobId; } export interface PathParameters { job_id: Parameters.JobId; } export type RequestBody = Components.Schemas.PatchBulkJobRequest; namespace Responses { export type $200 = Components.Schemas.BulkTriggerJob; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace PutFlow { namespace Parameters { export type FlowId = /** * ID of the Automation Flow * example: * 7791b04a-16d2-44a2-9af9-2d59c25c512f */ Components.Schemas.AutomationFlowId; } export interface PathParameters { flow_id: Parameters.FlowId; } export type RequestBody = Components.Schemas.AutomationFlow; namespace Responses { export type $200 = Components.Schemas.AutomationFlow; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; } } namespace ResumeExecutionWithToken { export type RequestBody = Components.Schemas.ResumeReq; namespace Responses { export type $200 = Components.Schemas.ResumeResp; export interface $400 { } export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace RetriggerAction { namespace Parameters { export type ActionId = /** * example: * 9ec3711b-db63-449c-b894-54d5bb622a8f */ Components.Schemas.AutomationActionId; export type ExecutionId = /** * example: * 9baf184f-bc81-4128-bca3-d974c90a12c4 */ Components.Schemas.AutomationExecutionId; } export interface PathParameters { execution_id: Parameters.ExecutionId; action_id: Parameters.ActionId; } export type RequestBody = Components.Schemas.RetryReq; namespace Responses { export interface $200 { } export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; export type $404 = /** * example: * { * "status": 404, * "error": "Not Found" * } */ Components.Responses.NotFoundError; } } namespace SearchFlows { namespace Parameters { export type From = number; export type IncludeFlows = boolean; /** * example: * submission */ export type Schema = string; export type Size = number; /** * example: * wfABCDEFGH */ export type TargetWorkflow = string; /** * example: * 600945fe-212e-4b97-acf7-391d64648384 */ export type TriggerSourceId = string; } export interface QueryParameters { schema?: /** * example: * submission */ Parameters.Schema; size?: Parameters.Size; from?: Parameters.From; trigger_source_id?: /** * example: * 600945fe-212e-4b97-acf7-391d64648384 */ Parameters.TriggerSourceId; target_workflow?: /** * example: * wfABCDEFGH */ Parameters.TargetWorkflow; include_flows?: Parameters.IncludeFlows; } namespace Responses { export type $200 = Components.Schemas.SearchAutomationsResp; } } namespace StartExecution { export type RequestBody = Components.Schemas.StartExecutionRequest; namespace Responses { export type $201 = Components.Schemas.AutomationExecution; export type $403 = /** * example: * { * "status": 403, * "error": "Forbidden" * } */ Components.Responses.ForbiddenError; } } } interface OperationMethods { /** * searchFlows - searchFlows * * Search available automation flows */ 'searchFlows'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createFlow - createFlow * * Create new automation flow */ 'createFlow'( parameters?: Parameters | null, data?: Paths.CreateFlow.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * batchGetFlows - batchGetFlows * * Get multiple automation flows by their IDs */ 'batchGetFlows'( parameters?: Parameters | null, data?: Paths.BatchGetFlows.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getFlow - getFlow * * List available automation flows */ 'getFlow'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * putFlow - putFlow * * Update automation flow by id */ 'putFlow'( parameters?: Parameters | null, data?: Paths.PutFlow.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteFlow - deleteFlow * * Update automation flow by id */ 'deleteFlow'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * getExecutions - getExecutions * * List automation executions */ 'getExecutions'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * startExecution - startExecution * * Start new automation execution */ 'startExecution'( parameters?: Parameters | null, data?: Paths.StartExecution.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * bulkTriggerExecutions - bulkTriggerExecutions * * Create a bulk job that triggers multiple automation executions */ 'bulkTriggerExecutions'( parameters?: Parameters | null, data?: Paths.BulkTriggerExecutions.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getBulkJob - getBulkJob * * Get the status of a bulk job that triggers multiple automation executions */ 'getBulkJob'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * patchBulkJob - patchBulkJob * * Approve / Cancel bulk job that triggers multiple automation executions */ 'patchBulkJob'( parameters?: Parameters | null, data?: Paths.PatchBulkJob.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getExecution - getExecution * * Get automation execution */ 'getExecution'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * cancelExecution - cancelExecution * * Cancel automation execution */ 'cancelExecution'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * retriggerAction - retriggerAction * * Retry a specific automation execution action which failed / is stuck. */ 'retriggerAction'( parameters?: Parameters | null, data?: Paths.RetriggerAction.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * resumeExecutionWithToken - resumeExecutionWithToken * * Resume a paused automation execution using a unique resume token. * * This public API is normally called when a user lands on a confirmation page via email link. * * Example link: https://automation.epilot.io/confirm-email?token=eyJraWQiOiJrZXkifQ... * */ 'resumeExecutionWithToken'( parameters?: Parameters | null, data?: Paths.ResumeExecutionWithToken.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * cancelSchedule - cancelSchedule * * Cancel a scheduled automation */ 'cancelSchedule'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } interface PathsDictionary { ['/v1/automation/flows']: { /** * searchFlows - searchFlows * * Search available automation flows */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createFlow - createFlow * * Create new automation flow */ 'post'( parameters?: Parameters | null, data?: Paths.CreateFlow.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/flows:batchGet']: { /** * batchGetFlows - batchGetFlows * * Get multiple automation flows by their IDs */ 'post'( parameters?: Parameters | null, data?: Paths.BatchGetFlows.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/flows/{flow_id}']: { /** * getFlow - getFlow * * List available automation flows */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * putFlow - putFlow * * Update automation flow by id */ 'put'( parameters?: Parameters | null, data?: Paths.PutFlow.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteFlow - deleteFlow * * Update automation flow by id */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/executions']: { /** * getExecutions - getExecutions * * List automation executions */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * startExecution - startExecution * * Start new automation execution */ 'post'( parameters?: Parameters | null, data?: Paths.StartExecution.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/executions/bulk-jobs']: { /** * bulkTriggerExecutions - bulkTriggerExecutions * * Create a bulk job that triggers multiple automation executions */ 'post'( parameters?: Parameters | null, data?: Paths.BulkTriggerExecutions.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/executions/bulk-jobs/{job_id}']: { /** * getBulkJob - getBulkJob * * Get the status of a bulk job that triggers multiple automation executions */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * patchBulkJob - patchBulkJob * * Approve / Cancel bulk job that triggers multiple automation executions */ 'patch'( parameters?: Parameters | null, data?: Paths.PatchBulkJob.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/executions/{execution_id}']: { /** * getExecution - getExecution * * Get automation execution */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * cancelExecution - cancelExecution * * Cancel automation execution */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/executions/{execution_id}/{action_id}/retrigger']: { /** * retriggerAction - retriggerAction * * Retry a specific automation execution action which failed / is stuck. */ 'post'( parameters?: Parameters | null, data?: Paths.RetriggerAction.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/public/executions:resume']: { /** * resumeExecutionWithToken - resumeExecutionWithToken * * Resume a paused automation execution using a unique resume token. * * This public API is normally called when a user lands on a confirmation page via email link. * * Example link: https://automation.epilot.io/confirm-email?token=eyJraWQiOiJrZXkifQ... * */ 'post'( parameters?: Parameters | null, data?: Paths.ResumeExecutionWithToken.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/automation/executions/{execution_id}/schedules/{schedule_id}']: { /** * cancelSchedule - cancelSchedule * * Cancel a scheduled automation */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } } type Client = OpenAPIClient type ActionCondition = Components.Schemas.ActionCondition; type ActionSchedule = Components.Schemas.ActionSchedule; type ActionScheduleSource = Components.Schemas.ActionScheduleSource; type ActivityId = Components.Schemas.ActivityId; type ActivityTrigger = Components.Schemas.ActivityTrigger; type AnyAction = Components.Schemas.AnyAction; type AnyActionConfig = Components.Schemas.AnyActionConfig; type AnyTrigger = Components.Schemas.AnyTrigger; type AnythingButCondition = Components.Schemas.AnythingButCondition; type ApiCallerContext = Components.Schemas.ApiCallerContext; type ApiSubmissionTrigger = Components.Schemas.ApiSubmissionTrigger; type AppendValueMapper = Components.Schemas.AppendValueMapper; type AssignThreadAction = Components.Schemas.AssignThreadAction; type AssignThreadConfig = Components.Schemas.AssignThreadConfig; type AssignUsersToStep = Components.Schemas.AssignUsersToStep; type AutomationAction = Components.Schemas.AutomationAction; type AutomationActionConfig = Components.Schemas.AutomationActionConfig; type AutomationActionExecutionState = Components.Schemas.AutomationActionExecutionState; type AutomationActionId = Components.Schemas.AutomationActionId; type AutomationActionIteration = Components.Schemas.AutomationActionIteration; type AutomationExecution = Components.Schemas.AutomationExecution; type AutomationExecutionId = Components.Schemas.AutomationExecutionId; type AutomationFlow = Components.Schemas.AutomationFlow; type AutomationFlowId = Components.Schemas.AutomationFlowId; type AutomationLoop = Components.Schemas.AutomationLoop; type AutomationLoopState = Components.Schemas.AutomationLoopState; type AutomationTrigger = Components.Schemas.AutomationTrigger; type BulkTriggerJob = Components.Schemas.BulkTriggerJob; type BulkTriggerRequest = Components.Schemas.BulkTriggerRequest; type CancellationReason = Components.Schemas.CancellationReason; type CartCheckoutAction = Components.Schemas.CartCheckoutAction; type CartCheckoutActionConfig = Components.Schemas.CartCheckoutActionConfig; type CartCheckoutConfig = Components.Schemas.CartCheckoutConfig; type Comparison = Components.Schemas.Comparison; type ConditionStatement = Components.Schemas.ConditionStatement; type CopyValueMapper = Components.Schemas.CopyValueMapper; type CreateDocumentAction = Components.Schemas.CreateDocumentAction; type CreateDocumentActionConfig = Components.Schemas.CreateDocumentActionConfig; type CreateDocumentConfig = Components.Schemas.CreateDocumentConfig; type CustomAction = Components.Schemas.CustomAction; type DiffAdded = Components.Schemas.DiffAdded; type DiffDeleted = Components.Schemas.DiffDeleted; type DiffUpdated = Components.Schemas.DiffUpdated; type EntityId = Components.Schemas.EntityId; type EntityItemSnapshot = Components.Schemas.EntityItemSnapshot; type EntityManualTrigger = Components.Schemas.EntityManualTrigger; type EntityOperation = Components.Schemas.EntityOperation; type EntityOperationTrigger = Components.Schemas.EntityOperationTrigger; type EntityRef = Components.Schemas.EntityRef; type EntitySearchFilter = Components.Schemas.EntitySearchFilter; type EntitySearchFilterValue = Components.Schemas.EntitySearchFilterValue; type EqualsIgnoreCaseCondition = Components.Schemas.EqualsIgnoreCaseCondition; type ErrorCode = Components.Schemas.ErrorCode; type ErrorDetail = Components.Schemas.ErrorDetail; type ErrorObject = Components.Schemas.ErrorObject; type ErrorOutput = Components.Schemas.ErrorOutput; type ExecItem = Components.Schemas.ExecItem; type ExecutionChain = Components.Schemas.ExecutionChain; type ExecutionStatus = Components.Schemas.ExecutionStatus; type ExistsCondition = Components.Schemas.ExistsCondition; type FilterConditionOnEvent = Components.Schemas.FilterConditionOnEvent; type FlowExecutionCancelAction = Components.Schemas.FlowExecutionCancelAction; type FlowExecutionCancelActionConfig = Components.Schemas.FlowExecutionCancelActionConfig; type FlowExecutionCancelConfig = Components.Schemas.FlowExecutionCancelConfig; type FlowsTrigger = Components.Schemas.FlowsTrigger; type ForwardEmailAction = Components.Schemas.ForwardEmailAction; type ForwardEmailActionConfig = Components.Schemas.ForwardEmailActionConfig; type ForwardEmailConfig = Components.Schemas.ForwardEmailConfig; type FrontendSubmitTrigger = Components.Schemas.FrontendSubmitTrigger; type GetExecutionsResp = Components.Schemas.GetExecutionsResp; type InformERPAction = Components.Schemas.InformERPAction; type InformERPActionConfig = Components.Schemas.InformERPActionConfig; type InformERPConfig = Components.Schemas.InformERPConfig; type JobId = Components.Schemas.JobId; type JourneySubmitTrigger = Components.Schemas.JourneySubmitTrigger; type MapEntityAction = Components.Schemas.MapEntityAction; type MapEntityActionConfig = Components.Schemas.MapEntityActionConfig; type MapEntityConfig = Components.Schemas.MapEntityConfig; type MappingAttribute = Components.Schemas.MappingAttribute; type MappingAttributeMode = Components.Schemas.MappingAttributeMode; type MappingAttributeV2 = Components.Schemas.MappingAttributeV2; type MappingConfigRef = Components.Schemas.MappingConfigRef; type MoveThreadAction = Components.Schemas.MoveThreadAction; type MoveThreadConfig = Components.Schemas.MoveThreadConfig; type NewEmailThreadTrigger = Components.Schemas.NewEmailThreadTrigger; type NumericCondition = Components.Schemas.NumericCondition; type OperationNode = Components.Schemas.OperationNode; type OperationObjectNode = Components.Schemas.OperationObjectNode; type OrCondition = Components.Schemas.OrCondition; type OrConditionForDiff = Components.Schemas.OrConditionForDiff; type OrganizationId = Components.Schemas.OrganizationId; type PatchBulkJobRequest = Components.Schemas.PatchBulkJobRequest; type PrefixCondition = Components.Schemas.PrefixCondition; type PrimitiveJSONValue = Components.Schemas.PrimitiveJSONValue; type ReceivedEmailTrigger = Components.Schemas.ReceivedEmailTrigger; type RelationAttribute = Components.Schemas.RelationAttribute; type ReplyEmailAction = Components.Schemas.ReplyEmailAction; type ReplyEmailActionConfig = Components.Schemas.ReplyEmailActionConfig; type ReplyEmailConfig = Components.Schemas.ReplyEmailConfig; type ResumeReq = Components.Schemas.ResumeReq; type ResumeResp = Components.Schemas.ResumeResp; type ResumeToken = Components.Schemas.ResumeToken; type RetryReq = Components.Schemas.RetryReq; type RetryStrategy = Components.Schemas.RetryStrategy; type SearchAutomationsResp = Components.Schemas.SearchAutomationsResp; type SendEmailAction = Components.Schemas.SendEmailAction; type SendEmailActionConfig = Components.Schemas.SendEmailActionConfig; type SendEmailCondition = Components.Schemas.SendEmailCondition; type SendEmailConfig = Components.Schemas.SendEmailConfig; type SetValueMapper = Components.Schemas.SetValueMapper; type StartExecutionRequest = Components.Schemas.StartExecutionRequest; type SuffixCondition = Components.Schemas.SuffixCondition; type TriggerCondition = Components.Schemas.TriggerCondition; type TriggerContext = Components.Schemas.TriggerContext; type TriggerEventAction = Components.Schemas.TriggerEventAction; type TriggerEventActionConfig = Components.Schemas.TriggerEventActionConfig; type TriggerEventConfig = Components.Schemas.TriggerEventConfig; type TriggerEventEntityActivity = Components.Schemas.TriggerEventEntityActivity; type TriggerEventEntityOperation = Components.Schemas.TriggerEventEntityOperation; type TriggerEventFlowAutomationTask = Components.Schemas.TriggerEventFlowAutomationTask; type TriggerEventManual = Components.Schemas.TriggerEventManual; type TriggerEventMessaging = Components.Schemas.TriggerEventMessaging; type TriggerShareEntityAction = Components.Schemas.TriggerShareEntityAction; type TriggerShareEntityActionConfig = Components.Schemas.TriggerShareEntityActionConfig; type TriggerShareEntityConfig = Components.Schemas.TriggerShareEntityConfig; type TriggerWebhookAction = Components.Schemas.TriggerWebhookAction; type TriggerWebhookActionConfig = Components.Schemas.TriggerWebhookActionConfig; type TriggerWebhookConfig = Components.Schemas.TriggerWebhookConfig; type TriggerWorkflowAction = Components.Schemas.TriggerWorkflowAction; type TriggerWorkflowActionConfig = Components.Schemas.TriggerWorkflowActionConfig; type TriggerWorkflowCondition = Components.Schemas.TriggerWorkflowCondition; type TriggerWorkflowConfig = Components.Schemas.TriggerWorkflowConfig; type WildcardCondition = Components.Schemas.WildcardCondition; type WorkflowContextRole = Components.Schemas.WorkflowContextRole; type WorkflowExecutionContext = Components.Schemas.WorkflowExecutionContext; export { type EntityRef as $, type ActionCondition as A, type AutomationLoopState as B, type Client as C, type AutomationTrigger as D, type BulkTriggerJob as E, type BulkTriggerRequest as F, type CancellationReason as G, type CartCheckoutAction as H, type CartCheckoutActionConfig as I, type CartCheckoutConfig as J, type Comparison as K, type ConditionStatement as L, type CopyValueMapper as M, type CreateDocumentAction as N, type OperationMethods as O, Paths as P, type CreateDocumentActionConfig as Q, type CreateDocumentConfig as R, type CustomAction as S, type DiffAdded as T, type DiffDeleted as U, type DiffUpdated as V, type EntityId as W, type EntityItemSnapshot as X, type EntityManualTrigger as Y, type EntityOperation as Z, type EntityOperationTrigger as _, Components as a, type TriggerCondition as a$, type EntitySearchFilter as a0, type EntitySearchFilterValue as a1, type EqualsIgnoreCaseCondition as a2, type ErrorCode as a3, type ErrorDetail as a4, type ErrorObject as a5, type ErrorOutput as a6, type ExecItem as a7, type ExecutionChain as a8, type ExecutionStatus as a9, type NumericCondition as aA, type OperationNode as aB, type OperationObjectNode as aC, type OrCondition as aD, type OrConditionForDiff as aE, type OrganizationId as aF, type PatchBulkJobRequest as aG, type PrefixCondition as aH, type PrimitiveJSONValue as aI, type ReceivedEmailTrigger as aJ, type RelationAttribute as aK, type ReplyEmailAction as aL, type ReplyEmailActionConfig as aM, type ReplyEmailConfig as aN, type ResumeReq as aO, type ResumeResp as aP, type ResumeToken as aQ, type RetryReq as aR, type RetryStrategy as aS, type SearchAutomationsResp as aT, type SendEmailAction as aU, type SendEmailActionConfig as aV, type SendEmailCondition as aW, type SendEmailConfig as aX, type SetValueMapper as aY, type StartExecutionRequest as aZ, type SuffixCondition as a_, type ExistsCondition as aa, type FilterConditionOnEvent as ab, type FlowExecutionCancelAction as ac, type FlowExecutionCancelActionConfig as ad, type FlowExecutionCancelConfig as ae, type FlowsTrigger as af, type ForwardEmailAction as ag, type ForwardEmailActionConfig as ah, type ForwardEmailConfig as ai, type FrontendSubmitTrigger as aj, type GetExecutionsResp as ak, type InformERPAction as al, type InformERPActionConfig as am, type InformERPConfig as an, type JobId as ao, type JourneySubmitTrigger as ap, type MapEntityAction as aq, type MapEntityActionConfig as ar, type MapEntityConfig as as, type MappingAttribute as at, type MappingAttributeMode as au, type MappingAttributeV2 as av, type MappingConfigRef as aw, type MoveThreadAction as ax, type MoveThreadConfig as ay, type NewEmailThreadTrigger as az, type PathsDictionary as b, type TriggerContext as b0, type TriggerEventAction as b1, type TriggerEventActionConfig as b2, type TriggerEventConfig as b3, type TriggerEventEntityActivity as b4, type TriggerEventEntityOperation as b5, type TriggerEventFlowAutomationTask as b6, type TriggerEventManual as b7, type TriggerEventMessaging as b8, type TriggerShareEntityAction as b9, type TriggerShareEntityActionConfig as ba, type TriggerShareEntityConfig as bb, type TriggerWebhookAction as bc, type TriggerWebhookActionConfig as bd, type TriggerWebhookConfig as be, type TriggerWorkflowAction as bf, type TriggerWorkflowActionConfig as bg, type TriggerWorkflowCondition as bh, type TriggerWorkflowConfig as bi, type WildcardCondition as bj, type WorkflowContextRole as bk, type WorkflowExecutionContext as bl, type ActionSchedule as c, type ActionScheduleSource as d, type ActivityId as e, type ActivityTrigger as f, type AnyAction as g, type AnyActionConfig as h, type AnyTrigger as i, type AnythingButCondition as j, type ApiCallerContext as k, type ApiSubmissionTrigger as l, type AppendValueMapper as m, type AssignThreadAction as n, type AssignThreadConfig as o, type AssignUsersToStep as p, type AutomationAction as q, type AutomationActionConfig as r, type AutomationActionExecutionState as s, type AutomationActionId as t, type AutomationActionIteration as u, type AutomationExecution as v, type AutomationExecutionId as w, type AutomationFlow as x, type AutomationFlowId as y, type AutomationLoop as z };