Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@epilot/automation-client

Package Overview
Dependencies
Maintainers
7
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epilot/automation-client - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

src/openapi.d.ts

2

dist/definition.js

@@ -1,1 +0,1 @@

!function(e,t){for(var a in t)e[a]=t[a];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,a){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(a(279));t.default=i.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Automation API","description":"API Backend for epilot Automation Workflows feature","version":"1.0.0"},"tags":[{"name":"flows","description":"Automation flows"},{"name":"executions","description":"Automation executions"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","summary":"searchFlows","description":"Search available automation flows","tags":["flows"],"parameters":[{"name":"schema","in":"query","description":"Entity Schema","schema":{"type":"string","example":"submission"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of automation flows","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}}}},"post":{"operationId":"createFlow","summary":"createFlow","description":"Create new automation flow","tags":["flows"],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"The created automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","summary":"getFlow","description":"List available automation flows","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The returned automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"put":{"operationId":"putFlow","summary":"putFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"The updated automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"delete":{"operationId":"deleteFlow","summary":"deleteFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The deleted automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","summary":"getExecutions","description":"List automation executions","parameters":[{"name":"entity_id","in":"query","schema":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"tags":["executions"],"responses":{"200":{"description":"List of automation executions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}]}}}}}}}}}},"post":{"operationId":"startExecution","summary":"startExecution","description":"Start new automation execution","requestBody":{"description":"Execution parameters","content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}}}}},"tags":["executions"],"responses":{"201":{"description":"The created execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}]}}}}}}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","summary":"getExecution","description":"Get automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The returned execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}]}}}}}}}}},"delete":{"operationId":"cancelExecution","summary":"cancelExecution","description":"Cancel automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The cancelled execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}]}}}}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"}},"schemas":{"AutomationFlowId":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"AutomationActionId":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"AutomationFlow":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"type":"object","properties":{"on":{"type":"string","enum":["entity_create","entity_update","entity_delete","journey_submit","frontend_submit"]},"config":{"type":"object","additionalProperties":true,"example":{"entity_schema":"contact"}}},"required":["on","config"],"example":{"on":"journey_submit","config":{"journey_id":"53c5d0bb-4ee7-4ed6-b3e0-0262383fd4b9"}}}},"trigger_conditions":{"description":"List of conditions to be met for the automation to be triggered","type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","contains","equals"]}},"example":{"source":"billing_contact.company_name","comparison":"not_empty"}}},"entity":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f","description":"The entity schema"},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AutomationAction":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}},"AutomationExecutionId":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"AutomationExecution":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string","example":"Create Contact"},"type":{"type":"string","example":"entity_mapping"},"config":{"type":"object","additionalProperties":true,"example":{"target_schema":"contact","mapping_attributes":[{"target":"email","mode":"upsert_match","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}}}]}}}},"EntityId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"}}}}')}},t={};return function a(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,a),i.exports}(914)})());
!function(e,t){for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,i){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(i(279));t.default=r.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Automation API","description":"API Backend for epilot Automation Workflows feature","version":"1.0.0"},"tags":[{"name":"flows","description":"Automation flows"},{"name":"executions","description":"Automation executions"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","summary":"searchFlows","description":"Search available automation flows","tags":["flows"],"parameters":[{"name":"schema","in":"query","description":"Entity Schema","schema":{"type":"string","example":"submission"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of automation flows","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}}}},"post":{"operationId":"createFlow","summary":"createFlow","description":"Create new automation flow","tags":["flows"],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"The created automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","summary":"getFlow","description":"List available automation flows","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The returned automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"put":{"operationId":"putFlow","summary":"putFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"The updated automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"delete":{"operationId":"deleteFlow","summary":"deleteFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The deleted automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","summary":"getExecutions","description":"List automation executions","parameters":[{"name":"entity_id","in":"query","schema":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"tags":["executions"],"responses":{"200":{"description":"List of automation executions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}}},"post":{"operationId":"startExecution","summary":"startExecution","description":"Start new automation execution","requestBody":{"description":"Execution parameters","content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}}}}},"tags":["executions"],"responses":{"201":{"description":"The created execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","summary":"getExecution","description":"Get automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The returned execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}},"delete":{"operationId":"cancelExecution","summary":"cancelExecution","description":"Cancel automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The cancelled execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"}},"schemas":{"AutomationFlowId":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"AutomationActionId":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"AutomationFlow":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}]},"entity":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AnyAction":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]},"AutomationAction":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},"MapEntityAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},"MapEntityActionConfig":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}}}}},"MappingAttribute":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}}},"TriggerWorkflowAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","add_context":["contact"],"assign_steps":{"First Step Daniel":[10010729],"call me":[10010728,10010729]}}}},"TriggerWorkflowConfig":{"type":"object","properties":{"target_workflow":{"type":"string"},"add_context":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"object","additionalProperties":true}}},"TriggerWebhookAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},"TriggerWebhookActionConfig":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"AutomationExecutionId":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"AutomationExecution":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}},"StartExecutionRequest":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}},"EntityId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"OrganizationId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"JourneySubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["journey_submit"]},"configuration":{"type":"object","properties":{"journey_id":{"type":"string","format":"uuid"}}}}},"FrontendSubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submit"]},"configuration":{"type":"object","properties":{"frontend_id":{"type":"string","example":"99"}}}}},"EntityOperationTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}},"conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["not_empty","is_empty","equals","contains","array_in"]}}},"example":[{"source":"source_type","comparison":"equals","value":"journey"},{"source":"source_id","comparison":"array_in","value":["c69b3f50-0c9b-11ec-b2e4-8724b261c6ab","6053c022-d50a-4b8d-9dcd-3b31213af36b"]}]}}}}}}}}')}},t={};return function i(a){if(t[a])return t[a].exports;var r=t[a]={exports:{}};return e[a].call(r.exports,r,r.exports,i),r.exports}(914)})());

@@ -12,49 +12,7 @@ /* eslint-disable */

namespace Schemas {
export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | AutomationAction;
export interface AutomationAction {
id?: AutomationActionId;
/**
* example:
* Create Contact
*/
name?: string;
/**
* example:
* entity_mapping
*/
type?: string;
/**
* example:
* {
* "target_schema": "contact",
* "mapping_attributes": [
* {
* "target": "email",
* "mode": "upsert_match",
* "source": "billing_contact.email"
* },
* {
* "target": "first_name",
* "mode": "copy_if_exists",
* "source": "billing_contact.first_name"
* },
* {
* "target": "last_name",
* "mode": "copy_if_exists",
* "source": "billing_contact.last_name"
* },
* {
* "target": "addresses",
* "mode": "append_if_exists",
* "source": "billing_contact",
* "value_json": "{\n \"street_name\": \"{{billing_contact.street_name}}\",\n \"street_number\": \"{{billing_contact.street_number}}\",\n \"city\": \"{{billing_contact.city}}\",\n \"postal_code\": \"{{billing_contact.postal_code}}\",\n \"country\": \"{{billing_contact.country}}\",\n}"
* },
* {
* "target": "addresses",
* "mode": "append_if_exists",
* "source": "delivery_contact",
* "value_json": "{\n \"street_name\": \"{{delivery_contact.street_name}}\",\n \"street_number\": \"{{delivery_contact.street_number}}\",\n \"city\": \"{{delivery_contact.city}}\",\n \"postal_code\": \"{{delivery_contact.postal_code}}\",\n \"country\": \"{{delivery_contact.country}}\",\n}"
* }
* ]
* }
*/
config?: {

@@ -77,2 +35,3 @@ [name: string]: any;

entity_id?: EntityId;
org_id?: OrganizationId;
flow_id?: AutomationFlowId;

@@ -112,47 +71,4 @@ /**

id?: AutomationActionId;
/**
* example:
* Create Contact
*/
name?: string;
/**
* example:
* entity_mapping
*/
type?: string;
/**
* example:
* {
* "target_schema": "contact",
* "mapping_attributes": [
* {
* "target": "email",
* "mode": "upsert_match",
* "source": "billing_contact.email"
* },
* {
* "target": "first_name",
* "mode": "copy_if_exists",
* "source": "billing_contact.first_name"
* },
* {
* "target": "last_name",
* "mode": "copy_if_exists",
* "source": "billing_contact.last_name"
* },
* {
* "target": "addresses",
* "mode": "append_if_exists",
* "source": "billing_contact",
* "value_json": "{\n \"street_name\": \"{{billing_contact.street_name}}\",\n \"street_number\": \"{{billing_contact.street_number}}\",\n \"city\": \"{{billing_contact.city}}\",\n \"postal_code\": \"{{billing_contact.postal_code}}\",\n \"country\": \"{{billing_contact.country}}\",\n}"
* },
* {
* "target": "addresses",
* "mode": "append_if_exists",
* "source": "delivery_contact",
* "value_json": "{\n \"street_name\": \"{{delivery_contact.street_name}}\",\n \"street_number\": \"{{delivery_contact.street_number}}\",\n \"city\": \"{{delivery_contact.city}}\",\n \"postal_code\": \"{{delivery_contact.postal_code}}\",\n \"country\": \"{{delivery_contact.country}}\",\n}"
* }
* ]
* }
*/
config?: {

@@ -175,22 +91,4 @@ [name: string]: any;

flow_name?: string;
triggers?: {
on: "entity_create" | "entity_update" | "entity_delete" | "journey_submit" | "frontend_submit";
/**
* example:
* {
* "entity_schema": "contact"
* }
*/
config: {
[name: string]: any;
};
}[];
trigger?: EntityOperationTrigger;
/**
* List of conditions to be met for the automation to be triggered
*/
trigger_conditions?: {
source?: string;
comparison?: "not_empty" | "is_empty" | "contains" | "equals";
}[];
/**
* The entity schema

@@ -200,4 +98,4 @@ * example:

*/
entity?: AutomationFlowId;
actions?: AutomationAction[];
entity?: string;
actions?: AnyAction[];
created_at?: string; // date-time

@@ -216,2 +114,192 @@ updated_at?: string; // date-time

export type EntityId = string;
export interface EntityOperationTrigger {
type?: "entity_operation";
configuration?: {
/**
* example:
* submission
*/
schema?: string;
operations?: ("createEntity" | "updateEntity" | "deleteEntity")[];
/**
* example:
* [
* {
* "source": "source_type",
* "comparison": "equals",
* "value": "journey"
* },
* {
* "source": "source_id",
* "comparison": "array_in",
* "value": [
* "c69b3f50-0c9b-11ec-b2e4-8724b261c6ab",
* "6053c022-d50a-4b8d-9dcd-3b31213af36b"
* ]
* }
* ]
*/
conditions?: {
source?: string;
comparison?: "not_empty" | "is_empty" | "equals" | "contains" | "array_in";
}[];
};
}
export interface FrontendSubmitTrigger {
type?: "frontend_submit";
configuration?: {
/**
* example:
* 99
*/
frontend_id?: string;
};
}
export interface JourneySubmitTrigger {
type?: "journey_submit";
configuration?: {
journey_id?: string; // uuid
};
}
/**
* example:
* {
* "id": "2520gja-2sgmsaga-0asg-822jgal",
* "name": "Map Entity",
* "type": "map-entity",
* "config": {
* "target_schema": "contact",
* "target_unique": [
* "email.email"
* ],
* "mapping_attributes": [
* {
* "target": "email",
* "mode": "copy_if_exists",
* "source": "billing_contact.email"
* },
* {
* "target": "first_name",
* "mode": "copy_if_exists",
* "source": "billing_contact.first_name"
* },
* {
* "target": "last_name",
* "mode": "copy_if_exists",
* "source": "billing_contact.last_name"
* },
* {
* "target": "addresses",
* "mode": "append_if_exists",
* "source": "billing_contact",
* "value_json": "{\n \"street_name\": \"{{billing_contact.street_name}}\",\n \"street_number\": \"{{billing_contact.street_number}}\",\n \"city\": \"{{billing_contact.city}}\",\n \"postal_code\": \"{{billing_contact.postal_code}}\",\n \"country\": \"{{billing_contact.country}}\",\n}"
* },
* {
* "target": "addresses",
* "mode": "append_if_exists",
* "source": "delivery_contact",
* "value_json": "{\n \"street_name\": \"{{delivery_contact.street_name}}\",\n \"street_number\": \"{{delivery_contact.street_number}}\",\n \"city\": \"{{delivery_contact.city}}\",\n \"postal_code\": \"{{delivery_contact.postal_code}}\",\n \"country\": \"{{delivery_contact.country}}\",\n}"
* }
* ]
* }
* }
*/
export interface MapEntityAction {
id?: AutomationActionId;
name?: string;
type?: string;
config?: MapEntityActionConfig;
outputs?: {
[name: string]: any;
};
}
export interface MapEntityActionConfig {
target_schema?: string;
target_unique?: string[];
mapping_attributes?: MappingAttribute[];
}
export interface MappingAttribute {
target?: string;
mode?: "copy_if_exists" | "append_if_exists";
source?: string;
value_json?: string;
}
/**
* example:
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74
*/
export type OrganizationId = string;
export interface StartExecutionRequest {
entity_id?: EntityId;
flow_id?: AutomationFlowId;
}
/**
* example:
* {
* "id": "2520gja-2sgmsaga-0asg-822jgal",
* "name": "Trigger Webhook",
* "type": "trigger-webhook",
* "config": {
* "entity_sources": [
* "contact",
* "account"
* ],
* "target_webhook_id": "25jg9ag2ga"
* }
* }
*/
export interface TriggerWebhookAction {
id?: AutomationActionId;
name?: string;
type?: string;
config?: TriggerWebhookActionConfig;
outputs?: {
[name: string]: any;
};
}
export interface TriggerWebhookActionConfig {
entity_sources?: string[];
target_webhook_id?: string;
}
/**
* example:
* {
* "id": "08g988-ojt2jtaga-292h-8978gsaga",
* "name": "Trigger Workflow",
* "type": "trigger-workflow",
* "config": {
* "target_workflow": "mfptvUMH",
* "add_context": [
* "contact"
* ],
* "assign_steps": {
* "First Step Daniel": [
* 10010729
* ],
* "call me": [
* 10010728,
* 10010729
* ]
* }
* }
* }
*/
export interface TriggerWorkflowAction {
id?: AutomationActionId;
name?: string;
type?: string;
config?: TriggerWorkflowConfig;
outputs?: {
workflow?: {
[name: string]: any;
};
};
}
export interface TriggerWorkflowConfig {
target_workflow?: string;
add_context?: string[];
assign_steps?: {
[name: string]: any;
};
}
}

@@ -294,3 +382,3 @@ }

namespace Responses {
export type $201 = Components.Schemas.AutomationFlow;
export type $200 = Components.Schemas.AutomationFlow;
}

@@ -325,6 +413,3 @@ }

namespace StartExecution {
export interface RequestBody {
entity_id?: Components.Schemas.EntityId;
flow_id?: Components.Schemas.AutomationFlowId;
}
export type RequestBody = Components.Schemas.StartExecutionRequest;
namespace Responses {

@@ -376,3 +461,3 @@ export type $201 = Components.Schemas.AutomationExecution;

config?: AxiosRequestConfig
): OperationResponse<Paths.PutFlow.Responses.$201>
): OperationResponse<Paths.PutFlow.Responses.$200>
/**

@@ -473,3 +558,3 @@ * deleteFlow - deleteFlow

config?: AxiosRequestConfig
): OperationResponse<Paths.PutFlow.Responses.$201>
): OperationResponse<Paths.PutFlow.Responses.$200>
/**

@@ -476,0 +561,0 @@ * deleteFlow - deleteFlow

{
"name": "@epilot/automation-client",
"version": "0.5.0",
"version": "0.5.1",
"description": "API Client for epilot automation API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc