@epilot/automation-client 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,n){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(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":"definitions","description":"Automation definitions"},{"name":"executions","description":"Automation executions"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/automation/definitions":{"get":{"operationId":"searchAutomations","summary":"searchAutomations","description":"Search available automation definitions","tags":["definitions"],"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 definitions","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"},"definition_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":"createAutomation","summary":"createAutomation","description":"Create new automation definition","tags":["definitions"],"requestBody":{"description":"Automation definition to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"definition_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 definition","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"definition_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/definitions/{definition_id}":{"get":{"operationId":"getAutomation","summary":"getAutomation","description":"List available automation definitions","tags":["definitions"],"parameters":[{"name":"definition_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The returned automation definition","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"definition_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":"putAutomation","summary":"putAutomation","description":"Update automation definition by id","tags":["definitions"],"parameters":[{"name":"definition_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"requestBody":{"description":"Automation definition to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"definition_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 definition","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"definition_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":"deleteAutomation","summary":"deleteAutomation","description":"Update automation definition by id","tags":["definitions"],"parameters":[{"name":"definition_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The deleted automation definition","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"definition_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"},"definition_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"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"},"definition_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"},"definition_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"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"},"definition_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"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"},"definition_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"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":{"AutomationDefinitionId":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"AutomationActionId":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"AutomationDefinition":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"definition_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"},"definition_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"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 n(a){if(t[a])return t[a].exports;var i=t[a]={exports:{}};return e[a].call(i.exports,i,i.exports,n),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"}}}},"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)})());
package/dist/openapi.d.ts CHANGED
@@ -65,38 +65,6 @@ declare namespace Components {
65
65
  * 9ec3711b-db63-449c-b894-54d5bb622a8f
66
66
  */
67
67
  export type AutomationActionId = string;
68
- export interface AutomationDefinition {
69
- id?: AutomationDefinitionId;
70
- /**
71
- * example:
72
- * Handle contact form
73
- */
74
- definition_name?: string;
75
- triggers?: {
76
- on: "entity_create" | "entity_update" | "entity_delete" | "journey_submit" | "frontend_submit";
77
- /**
78
- * example:
79
- * {
80
- * "entity_schema": "contact"
81
- * }
82
- */
83
- config: {
84
- [name: string]: any;
85
- };
86
- }[];
87
- /**
88
- * schemas this automation is available for
89
- */
90
- schemas?: string[];
91
- actions?: AutomationAction[];
92
- created_at?: string; // date-time
93
- updated_at?: string; // date-time
94
- }
95
- /**
96
- * example:
97
- * 7791b04a-16d2-44a2-9af9-2d59c25c512f
98
- */
99
- export type AutomationDefinitionId = string;
100
68
  export interface AutomationExecution {
101
69
  id?: AutomationExecutionId;
102
70
  /**
@@ -105,7 +73,12 @@ declare namespace Components {
105
73
  */
106
74
  status?: "pending" | "in_progress" | "success" | "failed" | "cancelled";
107
75
  entity_id?: EntityId;
108
- definition_id?: AutomationDefinitionId;
76
+ flow_id?: AutomationFlowId;
77
+ /**
78
+ * example:
79
+ * Handle contact form
80
+ */
81
+ flow_name?: string;
109
82
  created_at?: string; // date-time
110
83
  updated_at?: string; // date-time
111
84
  current_action?: AutomationActionId;
@@ -176,6 +149,38 @@ declare namespace Components {
176
149
  * 9baf184f-bc81-4128-bca3-d974c90a12c4
177
150
  */
178
151
  export type AutomationExecutionId = string;
152
+ export interface AutomationFlow {
153
+ id?: AutomationFlowId;
154
+ /**
155
+ * example:
156
+ * Handle contact form
157
+ */
158
+ flow_name?: string;
159
+ triggers?: {
160
+ on: "entity_create" | "entity_update" | "entity_delete" | "journey_submit" | "frontend_submit";
161
+ /**
162
+ * example:
163
+ * {
164
+ * "entity_schema": "contact"
165
+ * }
166
+ */
167
+ config: {
168
+ [name: string]: any;
169
+ };
170
+ }[];
171
+ /**
172
+ * schemas this automation is available for
173
+ */
174
+ schemas?: string[];
175
+ actions?: AutomationAction[];
176
+ created_at?: string; // date-time
177
+ updated_at?: string; // date-time
178
+ }
179
+ /**
180
+ * example:
181
+ * 7791b04a-16d2-44a2-9af9-2d59c25c512f
182
+ */
183
+ export type AutomationFlowId = string;
179
184
  /**
180
185
  * example:
181
186
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
@@ -195,32 +200,21 @@ declare namespace Paths {
195
200
  export type $200 = Components.Schemas.AutomationExecution;
196
201
  }
197
202
  }
198
- namespace CreateAutomation {
199
- export type RequestBody = Components.Schemas.AutomationDefinition;
200
- namespace Responses {
201
- export type $201 = Components.Schemas.AutomationDefinition;
202
- }
203
- }
204
- namespace DeleteAutomation {
205
- namespace Parameters {
206
- export type DefinitionId = Components.Schemas.AutomationDefinitionId;
207
- }
208
- export interface PathParameters {
209
- definition_id: Parameters.DefinitionId;
210
- }
203
+ namespace CreateFlow {
204
+ export type RequestBody = Components.Schemas.AutomationFlow;
211
205
  namespace Responses {
212
- export type $200 = Components.Schemas.AutomationDefinition;
206
+ export type $201 = Components.Schemas.AutomationFlow;
213
207
  }
214
208
  }
215
- namespace GetAutomation {
209
+ namespace DeleteFlow {
216
210
  namespace Parameters {
217
- export type DefinitionId = Components.Schemas.AutomationDefinitionId;
211
+ export type FlowId = Components.Schemas.AutomationFlowId;
218
212
  }
219
213
  export interface PathParameters {
220
- definition_id: Parameters.DefinitionId;
214
+ flow_id: Parameters.FlowId;
221
215
  }
222
216
  namespace Responses {
223
- export type $200 = Components.Schemas.AutomationDefinition;
217
+ export type $200 = Components.Schemas.AutomationFlow;
224
218
  }
225
219
  }
226
220
  namespace GetExecution {
@@ -249,19 +243,30 @@ declare namespace Paths {
249
243
  export type $200 = Components.Schemas.AutomationExecution[];
250
244
  }
251
245
  }
252
- namespace PutAutomation {
246
+ namespace GetFlow {
247
+ namespace Parameters {
248
+ export type FlowId = Components.Schemas.AutomationFlowId;
249
+ }
250
+ export interface PathParameters {
251
+ flow_id: Parameters.FlowId;
252
+ }
253
+ namespace Responses {
254
+ export type $200 = Components.Schemas.AutomationFlow;
255
+ }
256
+ }
257
+ namespace PutFlow {
253
258
  namespace Parameters {
254
- export type DefinitionId = Components.Schemas.AutomationDefinitionId;
259
+ export type FlowId = Components.Schemas.AutomationFlowId;
255
260
  }
256
261
  export interface PathParameters {
257
- definition_id: Parameters.DefinitionId;
262
+ flow_id: Parameters.FlowId;
258
263
  }
259
- export type RequestBody = Components.Schemas.AutomationDefinition;
264
+ export type RequestBody = Components.Schemas.AutomationFlow;
260
265
  namespace Responses {
261
- export type $201 = Components.Schemas.AutomationDefinition;
266
+ export type $201 = Components.Schemas.AutomationFlow;
262
267
  }
263
268
  }
264
- namespace SearchAutomations {
269
+ namespace SearchFlows {
265
270
  namespace Parameters {
266
271
  export type From = number;
267
272
  /**
@@ -283,14 +288,14 @@ declare namespace Paths {
283
288
  * 1
284
289
  */
285
290
  total?: number;
286
- results?: Components.Schemas.AutomationDefinition[];
291
+ results?: Components.Schemas.AutomationFlow[];
287
292
  }
288
293
  }
289
294
  }
290
295
  namespace StartExecution {
291
296
  export interface RequestBody {
292
297
  entity_id?: Components.Schemas.EntityId;
293
- definition_id?: Components.Schemas.AutomationDefinitionId;
298
+ flow_id?: Components.Schemas.AutomationFlowId;
294
299
  }
295
300
  namespace Responses {
296
301
  export type $201 = Components.Schemas.AutomationExecution;
@@ -300,55 +305,55 @@ declare namespace Paths {
300
305
 
301
306
  export interface OperationMethods {
302
307
  /**
303
- * searchAutomations - searchAutomations
308
+ * searchFlows - searchFlows
304
309
  *
305
- * Search available automation definitions
310
+ * Search available automation flows
306
311
  */
307
- 'searchAutomations'(
308
- parameters?: Parameters<Paths.SearchAutomations.QueryParameters> | null,
312
+ 'searchFlows'(
313
+ parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null,
309
314
  data?: any,
310
315
  config?: AxiosRequestConfig
311
- ): OperationResponse<Paths.SearchAutomations.Responses.$200>
316
+ ): OperationResponse<Paths.SearchFlows.Responses.$200>
312
317
  /**
313
- * createAutomation - createAutomation
318
+ * createFlow - createFlow
314
319
  *
315
- * Create new automation definition
320
+ * Create new automation flow
316
321
  */
317
- 'createAutomation'(
322
+ 'createFlow'(
318
323
  parameters?: Parameters<UnknownParamsObject> | null,
319
- data?: Paths.CreateAutomation.RequestBody,
324
+ data?: Paths.CreateFlow.RequestBody,
320
325
  config?: AxiosRequestConfig
321
- ): OperationResponse<Paths.CreateAutomation.Responses.$201>
326
+ ): OperationResponse<Paths.CreateFlow.Responses.$201>
322
327
  /**
323
- * getAutomation - getAutomation
328
+ * getFlow - getFlow
324
329
  *
325
- * List available automation definitions
330
+ * List available automation flows
326
331
  */
327
- 'getAutomation'(
328
- parameters?: Parameters<Paths.GetAutomation.PathParameters> | null,
332
+ 'getFlow'(
333
+ parameters?: Parameters<Paths.GetFlow.PathParameters> | null,
329
334
  data?: any,
330
335
  config?: AxiosRequestConfig
331
- ): OperationResponse<Paths.GetAutomation.Responses.$200>
336
+ ): OperationResponse<Paths.GetFlow.Responses.$200>
332
337
  /**
333
- * putAutomation - putAutomation
338
+ * putFlow - putFlow
334
339
  *
335
- * Update automation definition by id
340
+ * Update automation flow by id
336
341
  */
337
- 'putAutomation'(
338
- parameters?: Parameters<Paths.PutAutomation.PathParameters> | null,
339
- data?: Paths.PutAutomation.RequestBody,
342
+ 'putFlow'(
343
+ parameters?: Parameters<Paths.PutFlow.PathParameters> | null,
344
+ data?: Paths.PutFlow.RequestBody,
340
345
  config?: AxiosRequestConfig
341
- ): OperationResponse<Paths.PutAutomation.Responses.$201>
346
+ ): OperationResponse<Paths.PutFlow.Responses.$201>
342
347
  /**
343
- * deleteAutomation - deleteAutomation
348
+ * deleteFlow - deleteFlow
344
349
  *
345
- * Update automation definition by id
350
+ * Update automation flow by id
346
351
  */
347
- 'deleteAutomation'(
348
- parameters?: Parameters<Paths.DeleteAutomation.PathParameters> | null,
352
+ 'deleteFlow'(
353
+ parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null,
349
354
  data?: any,
350
355
  config?: AxiosRequestConfig
351
- ): OperationResponse<Paths.DeleteAutomation.Responses.$200>
356
+ ): OperationResponse<Paths.DeleteFlow.Responses.$200>
352
357
  /**
353
358
  * getExecutions - getExecutions
354
359
  *
@@ -392,59 +397,59 @@ export interface OperationMethods {
392
397
  }
393
398
 
394
399
  export interface PathsDictionary {
395
- ['/v1/automation/definitions']: {
400
+ ['/v1/automation/flows']: {
396
401
  /**
397
- * searchAutomations - searchAutomations
402
+ * searchFlows - searchFlows
398
403
  *
399
- * Search available automation definitions
404
+ * Search available automation flows
400
405
  */
401
406
  'get'(
402
- parameters?: Parameters<Paths.SearchAutomations.QueryParameters> | null,
407
+ parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null,
403
408
  data?: any,
404
409
  config?: AxiosRequestConfig
405
- ): OperationResponse<Paths.SearchAutomations.Responses.$200>
410
+ ): OperationResponse<Paths.SearchFlows.Responses.$200>
406
411
  /**
407
- * createAutomation - createAutomation
412
+ * createFlow - createFlow
408
413
  *
409
- * Create new automation definition
414
+ * Create new automation flow
410
415
  */
411
416
  'post'(
412
417
  parameters?: Parameters<UnknownParamsObject> | null,
413
- data?: Paths.CreateAutomation.RequestBody,
418
+ data?: Paths.CreateFlow.RequestBody,
414
419
  config?: AxiosRequestConfig
415
- ): OperationResponse<Paths.CreateAutomation.Responses.$201>
420
+ ): OperationResponse<Paths.CreateFlow.Responses.$201>
416
421
  }
417
- ['/v1/automation/definitions/{definition_id}']: {
422
+ ['/v1/automation/flows/{flow_id}']: {
418
423
  /**
419
- * getAutomation - getAutomation
424
+ * getFlow - getFlow
420
425
  *
421
- * List available automation definitions
426
+ * List available automation flows
422
427
  */
423
428
  'get'(
424
- parameters?: Parameters<Paths.GetAutomation.PathParameters> | null,
429
+ parameters?: Parameters<Paths.GetFlow.PathParameters> | null,
425
430
  data?: any,
426
431
  config?: AxiosRequestConfig
427
- ): OperationResponse<Paths.GetAutomation.Responses.$200>
432
+ ): OperationResponse<Paths.GetFlow.Responses.$200>
428
433
  /**
429
- * putAutomation - putAutomation
434
+ * putFlow - putFlow
430
435
  *
431
- * Update automation definition by id
436
+ * Update automation flow by id
432
437
  */
433
438
  'put'(
434
- parameters?: Parameters<Paths.PutAutomation.PathParameters> | null,
435
- data?: Paths.PutAutomation.RequestBody,
439
+ parameters?: Parameters<Paths.PutFlow.PathParameters> | null,
440
+ data?: Paths.PutFlow.RequestBody,
436
441
  config?: AxiosRequestConfig
437
- ): OperationResponse<Paths.PutAutomation.Responses.$201>
442
+ ): OperationResponse<Paths.PutFlow.Responses.$201>
438
443
  /**
439
- * deleteAutomation - deleteAutomation
444
+ * deleteFlow - deleteFlow
440
445
  *
441
- * Update automation definition by id
446
+ * Update automation flow by id
442
447
  */
443
448
  'delete'(
444
- parameters?: Parameters<Paths.DeleteAutomation.PathParameters> | null,
449
+ parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null,
445
450
  data?: any,
446
451
  config?: AxiosRequestConfig
447
- ): OperationResponse<Paths.DeleteAutomation.Responses.$200>
452
+ ): OperationResponse<Paths.DeleteFlow.Responses.$200>
448
453
  }
449
454
  ['/v1/automation/executions']: {
450
455
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "API Client for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,500 @@
1
+ /* eslint-disable */
2
+ import {
3
+ OpenAPIClient,
4
+ Parameters,
5
+ UnknownParamsObject,
6
+ OperationResponse,
7
+ AxiosRequestConfig,
8
+ } from 'openapi-client-axios';
9
+
10
+ declare namespace Components {
11
+ namespace Schemas {
12
+ export interface AutomationAction {
13
+ id?: AutomationActionId;
14
+ /**
15
+ * example:
16
+ * Create Contact
17
+ */
18
+ name?: string;
19
+ /**
20
+ * example:
21
+ * entity_mapping
22
+ */
23
+ type?: string;
24
+ /**
25
+ * example:
26
+ * {
27
+ * "target_schema": "contact",
28
+ * "mapping_attributes": [
29
+ * {
30
+ * "target": "email",
31
+ * "mode": "upsert_match",
32
+ * "source": "billing_contact.email"
33
+ * },
34
+ * {
35
+ * "target": "first_name",
36
+ * "mode": "copy_if_exists",
37
+ * "source": "billing_contact.first_name"
38
+ * },
39
+ * {
40
+ * "target": "last_name",
41
+ * "mode": "copy_if_exists",
42
+ * "source": "billing_contact.last_name"
43
+ * },
44
+ * {
45
+ * "target": "addresses",
46
+ * "mode": "append_if_exists",
47
+ * "source": "billing_contact",
48
+ * "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}"
49
+ * },
50
+ * {
51
+ * "target": "addresses",
52
+ * "mode": "append_if_exists",
53
+ * "source": "delivery_contact",
54
+ * "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}"
55
+ * }
56
+ * ]
57
+ * }
58
+ */
59
+ config?: {
60
+ [name: string]: any;
61
+ };
62
+ }
63
+ /**
64
+ * example:
65
+ * 9ec3711b-db63-449c-b894-54d5bb622a8f
66
+ */
67
+ export type AutomationActionId = string;
68
+ export interface AutomationExecution {
69
+ id?: AutomationExecutionId;
70
+ /**
71
+ * example:
72
+ * success
73
+ */
74
+ status?: "pending" | "in_progress" | "success" | "failed" | "cancelled";
75
+ entity_id?: EntityId;
76
+ flow_id?: AutomationFlowId;
77
+ /**
78
+ * example:
79
+ * Handle contact form
80
+ */
81
+ flow_name?: string;
82
+ created_at?: string; // date-time
83
+ updated_at?: string; // date-time
84
+ current_action?: AutomationActionId;
85
+ actions?: {
86
+ status?: "pending" | "in_progress" | "success" | "failed";
87
+ /**
88
+ * example:
89
+ * {
90
+ * "affected_entities": "cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"
91
+ * }
92
+ */
93
+ outputs?: {
94
+ [name: string]: any;
95
+ };
96
+ id?: AutomationActionId;
97
+ /**
98
+ * example:
99
+ * Create Contact
100
+ */
101
+ name?: string;
102
+ /**
103
+ * example:
104
+ * entity_mapping
105
+ */
106
+ type?: string;
107
+ /**
108
+ * example:
109
+ * {
110
+ * "target_schema": "contact",
111
+ * "mapping_attributes": [
112
+ * {
113
+ * "target": "email",
114
+ * "mode": "upsert_match",
115
+ * "source": "billing_contact.email"
116
+ * },
117
+ * {
118
+ * "target": "first_name",
119
+ * "mode": "copy_if_exists",
120
+ * "source": "billing_contact.first_name"
121
+ * },
122
+ * {
123
+ * "target": "last_name",
124
+ * "mode": "copy_if_exists",
125
+ * "source": "billing_contact.last_name"
126
+ * },
127
+ * {
128
+ * "target": "addresses",
129
+ * "mode": "append_if_exists",
130
+ * "source": "billing_contact",
131
+ * "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}"
132
+ * },
133
+ * {
134
+ * "target": "addresses",
135
+ * "mode": "append_if_exists",
136
+ * "source": "delivery_contact",
137
+ * "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}"
138
+ * }
139
+ * ]
140
+ * }
141
+ */
142
+ config?: {
143
+ [name: string]: any;
144
+ };
145
+ }[];
146
+ }
147
+ /**
148
+ * example:
149
+ * 9baf184f-bc81-4128-bca3-d974c90a12c4
150
+ */
151
+ export type AutomationExecutionId = string;
152
+ export interface AutomationFlow {
153
+ id?: AutomationFlowId;
154
+ /**
155
+ * example:
156
+ * Handle contact form
157
+ */
158
+ flow_name?: string;
159
+ triggers?: {
160
+ on: "entity_create" | "entity_update" | "entity_delete" | "journey_submit" | "frontend_submit";
161
+ /**
162
+ * example:
163
+ * {
164
+ * "entity_schema": "contact"
165
+ * }
166
+ */
167
+ config: {
168
+ [name: string]: any;
169
+ };
170
+ }[];
171
+ /**
172
+ * schemas this automation is available for
173
+ */
174
+ schemas?: string[];
175
+ actions?: AutomationAction[];
176
+ created_at?: string; // date-time
177
+ updated_at?: string; // date-time
178
+ }
179
+ /**
180
+ * example:
181
+ * 7791b04a-16d2-44a2-9af9-2d59c25c512f
182
+ */
183
+ export type AutomationFlowId = string;
184
+ /**
185
+ * example:
186
+ * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
187
+ */
188
+ export type EntityId = string;
189
+ }
190
+ }
191
+ declare namespace Paths {
192
+ namespace CancelExecution {
193
+ namespace Parameters {
194
+ export type ExecutionId = Components.Schemas.AutomationExecutionId;
195
+ }
196
+ export interface PathParameters {
197
+ execution_id: Parameters.ExecutionId;
198
+ }
199
+ namespace Responses {
200
+ export type $200 = Components.Schemas.AutomationExecution;
201
+ }
202
+ }
203
+ namespace CreateFlow {
204
+ export type RequestBody = Components.Schemas.AutomationFlow;
205
+ namespace Responses {
206
+ export type $201 = Components.Schemas.AutomationFlow;
207
+ }
208
+ }
209
+ namespace DeleteFlow {
210
+ namespace Parameters {
211
+ export type FlowId = Components.Schemas.AutomationFlowId;
212
+ }
213
+ export interface PathParameters {
214
+ flow_id: Parameters.FlowId;
215
+ }
216
+ namespace Responses {
217
+ export type $200 = Components.Schemas.AutomationFlow;
218
+ }
219
+ }
220
+ namespace GetExecution {
221
+ namespace Parameters {
222
+ export type ExecutionId = Components.Schemas.AutomationExecutionId;
223
+ }
224
+ export interface PathParameters {
225
+ execution_id: Parameters.ExecutionId;
226
+ }
227
+ namespace Responses {
228
+ export type $200 = Components.Schemas.AutomationExecution;
229
+ }
230
+ }
231
+ namespace GetExecutions {
232
+ namespace Parameters {
233
+ export type EntityId = Components.Schemas.EntityId;
234
+ export type From = number;
235
+ export type Size = number;
236
+ }
237
+ export interface QueryParameters {
238
+ entity_id?: Parameters.EntityId;
239
+ size?: Parameters.Size;
240
+ from?: Parameters.From;
241
+ }
242
+ namespace Responses {
243
+ export type $200 = Components.Schemas.AutomationExecution[];
244
+ }
245
+ }
246
+ namespace GetFlow {
247
+ namespace Parameters {
248
+ export type FlowId = Components.Schemas.AutomationFlowId;
249
+ }
250
+ export interface PathParameters {
251
+ flow_id: Parameters.FlowId;
252
+ }
253
+ namespace Responses {
254
+ export type $200 = Components.Schemas.AutomationFlow;
255
+ }
256
+ }
257
+ namespace PutFlow {
258
+ namespace Parameters {
259
+ export type FlowId = Components.Schemas.AutomationFlowId;
260
+ }
261
+ export interface PathParameters {
262
+ flow_id: Parameters.FlowId;
263
+ }
264
+ export type RequestBody = Components.Schemas.AutomationFlow;
265
+ namespace Responses {
266
+ export type $201 = Components.Schemas.AutomationFlow;
267
+ }
268
+ }
269
+ namespace SearchFlows {
270
+ namespace Parameters {
271
+ export type From = number;
272
+ /**
273
+ * example:
274
+ * submission
275
+ */
276
+ export type Schema = string;
277
+ export type Size = number;
278
+ }
279
+ export interface QueryParameters {
280
+ schema?: Parameters.Schema;
281
+ size?: Parameters.Size;
282
+ from?: Parameters.From;
283
+ }
284
+ namespace Responses {
285
+ export interface $200 {
286
+ /**
287
+ * example:
288
+ * 1
289
+ */
290
+ total?: number;
291
+ results?: Components.Schemas.AutomationFlow[];
292
+ }
293
+ }
294
+ }
295
+ namespace StartExecution {
296
+ export interface RequestBody {
297
+ entity_id?: Components.Schemas.EntityId;
298
+ flow_id?: Components.Schemas.AutomationFlowId;
299
+ }
300
+ namespace Responses {
301
+ export type $201 = Components.Schemas.AutomationExecution;
302
+ }
303
+ }
304
+ }
305
+
306
+ export interface OperationMethods {
307
+ /**
308
+ * searchFlows - searchFlows
309
+ *
310
+ * Search available automation flows
311
+ */
312
+ 'searchFlows'(
313
+ parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null,
314
+ data?: any,
315
+ config?: AxiosRequestConfig
316
+ ): OperationResponse<Paths.SearchFlows.Responses.$200>
317
+ /**
318
+ * createFlow - createFlow
319
+ *
320
+ * Create new automation flow
321
+ */
322
+ 'createFlow'(
323
+ parameters?: Parameters<UnknownParamsObject> | null,
324
+ data?: Paths.CreateFlow.RequestBody,
325
+ config?: AxiosRequestConfig
326
+ ): OperationResponse<Paths.CreateFlow.Responses.$201>
327
+ /**
328
+ * getFlow - getFlow
329
+ *
330
+ * List available automation flows
331
+ */
332
+ 'getFlow'(
333
+ parameters?: Parameters<Paths.GetFlow.PathParameters> | null,
334
+ data?: any,
335
+ config?: AxiosRequestConfig
336
+ ): OperationResponse<Paths.GetFlow.Responses.$200>
337
+ /**
338
+ * putFlow - putFlow
339
+ *
340
+ * Update automation flow by id
341
+ */
342
+ 'putFlow'(
343
+ parameters?: Parameters<Paths.PutFlow.PathParameters> | null,
344
+ data?: Paths.PutFlow.RequestBody,
345
+ config?: AxiosRequestConfig
346
+ ): OperationResponse<Paths.PutFlow.Responses.$201>
347
+ /**
348
+ * deleteFlow - deleteFlow
349
+ *
350
+ * Update automation flow by id
351
+ */
352
+ 'deleteFlow'(
353
+ parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null,
354
+ data?: any,
355
+ config?: AxiosRequestConfig
356
+ ): OperationResponse<Paths.DeleteFlow.Responses.$200>
357
+ /**
358
+ * getExecutions - getExecutions
359
+ *
360
+ * List automation executions
361
+ */
362
+ 'getExecutions'(
363
+ parameters?: Parameters<Paths.GetExecutions.QueryParameters> | null,
364
+ data?: any,
365
+ config?: AxiosRequestConfig
366
+ ): OperationResponse<Paths.GetExecutions.Responses.$200>
367
+ /**
368
+ * startExecution - startExecution
369
+ *
370
+ * Start new automation execution
371
+ */
372
+ 'startExecution'(
373
+ parameters?: Parameters<UnknownParamsObject> | null,
374
+ data?: Paths.StartExecution.RequestBody,
375
+ config?: AxiosRequestConfig
376
+ ): OperationResponse<Paths.StartExecution.Responses.$201>
377
+ /**
378
+ * getExecution - getExecution
379
+ *
380
+ * Get automation execution
381
+ */
382
+ 'getExecution'(
383
+ parameters?: Parameters<Paths.GetExecution.PathParameters> | null,
384
+ data?: any,
385
+ config?: AxiosRequestConfig
386
+ ): OperationResponse<Paths.GetExecution.Responses.$200>
387
+ /**
388
+ * cancelExecution - cancelExecution
389
+ *
390
+ * Cancel automation execution
391
+ */
392
+ 'cancelExecution'(
393
+ parameters?: Parameters<Paths.CancelExecution.PathParameters> | null,
394
+ data?: any,
395
+ config?: AxiosRequestConfig
396
+ ): OperationResponse<Paths.CancelExecution.Responses.$200>
397
+ }
398
+
399
+ export interface PathsDictionary {
400
+ ['/v1/automation/flows']: {
401
+ /**
402
+ * searchFlows - searchFlows
403
+ *
404
+ * Search available automation flows
405
+ */
406
+ 'get'(
407
+ parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null,
408
+ data?: any,
409
+ config?: AxiosRequestConfig
410
+ ): OperationResponse<Paths.SearchFlows.Responses.$200>
411
+ /**
412
+ * createFlow - createFlow
413
+ *
414
+ * Create new automation flow
415
+ */
416
+ 'post'(
417
+ parameters?: Parameters<UnknownParamsObject> | null,
418
+ data?: Paths.CreateFlow.RequestBody,
419
+ config?: AxiosRequestConfig
420
+ ): OperationResponse<Paths.CreateFlow.Responses.$201>
421
+ }
422
+ ['/v1/automation/flows/{flow_id}']: {
423
+ /**
424
+ * getFlow - getFlow
425
+ *
426
+ * List available automation flows
427
+ */
428
+ 'get'(
429
+ parameters?: Parameters<Paths.GetFlow.PathParameters> | null,
430
+ data?: any,
431
+ config?: AxiosRequestConfig
432
+ ): OperationResponse<Paths.GetFlow.Responses.$200>
433
+ /**
434
+ * putFlow - putFlow
435
+ *
436
+ * Update automation flow by id
437
+ */
438
+ 'put'(
439
+ parameters?: Parameters<Paths.PutFlow.PathParameters> | null,
440
+ data?: Paths.PutFlow.RequestBody,
441
+ config?: AxiosRequestConfig
442
+ ): OperationResponse<Paths.PutFlow.Responses.$201>
443
+ /**
444
+ * deleteFlow - deleteFlow
445
+ *
446
+ * Update automation flow by id
447
+ */
448
+ 'delete'(
449
+ parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null,
450
+ data?: any,
451
+ config?: AxiosRequestConfig
452
+ ): OperationResponse<Paths.DeleteFlow.Responses.$200>
453
+ }
454
+ ['/v1/automation/executions']: {
455
+ /**
456
+ * getExecutions - getExecutions
457
+ *
458
+ * List automation executions
459
+ */
460
+ 'get'(
461
+ parameters?: Parameters<Paths.GetExecutions.QueryParameters> | null,
462
+ data?: any,
463
+ config?: AxiosRequestConfig
464
+ ): OperationResponse<Paths.GetExecutions.Responses.$200>
465
+ /**
466
+ * startExecution - startExecution
467
+ *
468
+ * Start new automation execution
469
+ */
470
+ 'post'(
471
+ parameters?: Parameters<UnknownParamsObject> | null,
472
+ data?: Paths.StartExecution.RequestBody,
473
+ config?: AxiosRequestConfig
474
+ ): OperationResponse<Paths.StartExecution.Responses.$201>
475
+ }
476
+ ['/v1/automation/executions/{execution_id}']: {
477
+ /**
478
+ * getExecution - getExecution
479
+ *
480
+ * Get automation execution
481
+ */
482
+ 'get'(
483
+ parameters?: Parameters<Paths.GetExecution.PathParameters> | null,
484
+ data?: any,
485
+ config?: AxiosRequestConfig
486
+ ): OperationResponse<Paths.GetExecution.Responses.$200>
487
+ /**
488
+ * cancelExecution - cancelExecution
489
+ *
490
+ * Cancel automation execution
491
+ */
492
+ 'delete'(
493
+ parameters?: Parameters<Paths.CancelExecution.PathParameters> | null,
494
+ data?: any,
495
+ config?: AxiosRequestConfig
496
+ ): OperationResponse<Paths.CancelExecution.Responses.$200>
497
+ }
498
+ }
499
+
500
+ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>