@epilot/automation-client 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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":{"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"]},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}}}},{"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":{"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"]},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}}}},{"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":{"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"]},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}}}},{"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":{"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"]},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}}}},{"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"}}}},"schemas":{"type":"array","description":"schemas this automation is available for","items":{"type":"string","example":"submission"}},"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":{"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"]},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}}}},{"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)})());
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"}}}},"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"}}}},"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"}}}},"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"}}}},"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"}}}},"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"}}}},"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"}}}},"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"}}}},"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)})());
package/dist/openapi.d.ts CHANGED
@@ -81,9 +81,11 @@ declare namespace Components {
81
81
  flow_name?: string;
82
82
  created_at?: string; // date-time
83
83
  updated_at?: string; // date-time
84
- current_action?: AutomationActionId;
84
+ current_action_id?: AutomationActionId;
85
85
  actions?: {
86
86
  status?: "pending" | "in_progress" | "success" | "failed";
87
+ started_at?: string; // date-time
88
+ updated_at?: string; // date-time
87
89
  /**
88
90
  * example:
89
91
  * {
@@ -93,6 +95,17 @@ declare namespace Components {
93
95
  outputs?: {
94
96
  [name: string]: any;
95
97
  };
98
+ /**
99
+ * example:
100
+ * {
101
+ * "email": "$.contact.email",
102
+ * "name": "$.contact.name",
103
+ * "template_id": "6a5b1249-4093-4724-b25a-ae985f7877d6"
104
+ * }
105
+ */
106
+ inputs?: {
107
+ [name: string]: any;
108
+ };
96
109
  id?: AutomationActionId;
97
110
  /**
98
111
  * example:
@@ -168,10 +181,6 @@ declare namespace Components {
168
181
  [name: string]: any;
169
182
  };
170
183
  }[];
171
- /**
172
- * schemas this automation is available for
173
- */
174
- schemas?: string[];
175
184
  actions?: AutomationAction[];
176
185
  created_at?: string; // date-time
177
186
  updated_at?: string; // date-time
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "API Client for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/openapi.d.ts CHANGED
@@ -81,9 +81,11 @@ declare namespace Components {
81
81
  flow_name?: string;
82
82
  created_at?: string; // date-time
83
83
  updated_at?: string; // date-time
84
- current_action?: AutomationActionId;
84
+ current_action_id?: AutomationActionId;
85
85
  actions?: {
86
86
  status?: "pending" | "in_progress" | "success" | "failed";
87
+ started_at?: string; // date-time
88
+ updated_at?: string; // date-time
87
89
  /**
88
90
  * example:
89
91
  * {
@@ -93,6 +95,17 @@ declare namespace Components {
93
95
  outputs?: {
94
96
  [name: string]: any;
95
97
  };
98
+ /**
99
+ * example:
100
+ * {
101
+ * "email": "$.contact.email",
102
+ * "name": "$.contact.name",
103
+ * "template_id": "6a5b1249-4093-4724-b25a-ae985f7877d6"
104
+ * }
105
+ */
106
+ inputs?: {
107
+ [name: string]: any;
108
+ };
96
109
  id?: AutomationActionId;
97
110
  /**
98
111
  * example:
@@ -168,10 +181,6 @@ declare namespace Components {
168
181
  [name: string]: any;
169
182
  };
170
183
  }[];
171
- /**
172
- * schemas this automation is available for
173
- */
174
- schemas?: string[];
175
184
  actions?: AutomationAction[];
176
185
  created_at?: string; // date-time
177
186
  updated_at?: string; // date-time