@epilot/customer-portal-client 0.8.13 → 0.8.14

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
- (()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(534));t.default=a.default},534:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Customer Portal API","description":"Backend for epilot end customer portals","version":"1.0.0"},"tags":[{"name":"ECP","description":"ECP"},{"name":"ECP Admin","description":"ECP Admin"},{"name":"Public","description":"Public"}],"security":[{"PortalAuth":[]},{"AsOrganization":[]},{"AsCustomer":[]}],"paths":{"/v2/portal/portal":{"post":{"operationId":"upsertPortal","summary":"upserts a portal","description":"upserts a portal and db item","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}}}}},"responses":{"201":{"description":"Success - portal created with success.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Validation Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"Authentication Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/public/user":{"post":{"operationId":"createUser","summary":"creates a user","description":"Creates a user in cognito pool and db item","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com"},"password":{"type":"string","example":"Pass1234!"},"orgId":{"type":"string","example":728},"secondaryIdentifier":{"type":"string","example":123456},"contactId":{"type":"string","example":123456}}}}}},"responses":{"201":{"description":"Success - user created with success.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Validation Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"Authentication Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/sso/user":{"post":{"operationId":"createSSOUser","summary":"creates a sso user","description":"Creates a sso user as portal user","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","orgId"],"properties":{"email":{"type":"string","example":"testemail921@yopmail.com"},"orgId":{"type":"string","example":728}}}}}},"responses":{"201":{"description":"Success - SSO User created with success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"400":{"description":"Validation Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"Authentication Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/public/activate":{"post":{"operationId":"activateUser","summary":"activateUser","description":"Activates the user","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"token","schema":{"type":"string"},"required":true,"description":"Invite Token"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string","description":"User\'s display name (default: email address)","example":"Example User"},"password":{"type":"string","description":"User\'s password","example":"AKjhdakjsdh@!34"}}}}}},"responses":{"200":{"description":"Activated successfully"},"404":{"description":"Token not found for the user"}}}},"/v2/portal/auth":{"get":{"operationId":"testAuth","summary":"testAuth","description":"TODO","tags":["ECP"],"responses":{"200":{"description":"ok"}}}},"/v2/portal/public/config":{"get":{"operationId":"getPortalConfigByDomain","summary":"getPortalConfigByDomain","description":"TODO","tags":["ECP"],"security":[],"parameters":[{"in":"query","name":"domain","required":true,"schema":{"type":"string","example":"example.com"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"/v2/portal/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"TODO","tags":["ECP Admin","ECP"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}},"delete":{"operationId":"deletePortal","summary":"deletePortal","description":"TODO","tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"security":[{"EpilotAuth":[]}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"}}}},"/v2/portal/public/portal/config":{"get":{"operationId":"getPublicPortalConfig","summary":"getPublicPortalConfig","description":"TODO","tags":["ECP Admin"],"security":[],"parameters":[{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":12324}},{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"/v2/portal/org/portal/config":{"get":{"operationId":"getOrgPortalConfig","summary":"getOrgPortalConfig","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"/v2/portal/configs":{"get":{"operationId":"getAllPortalConfigs","summary":"getAllPortalConfigs","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}}}}},"/v2/portal/email-templates":{"post":{"operationId":"upsertEmailTemplates","summary":"upsertEmailTemplates","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"emailTemplates":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}}}}}}}}},"get":{"operationId":"getEmailTemplates","summary":"getEmailTemplates","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}}}}}}}},"/v2/portal/replace-ecp-template-variables":{"post":{"operationId":"replaceECPTemplateVariables","summary":"replaceECPTemplateVariables","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"ECPVariables payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","example":"7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"portalUser":{"type":"object","properties":{"invitationLink":{"type":"string","example":"https://end-customer-portal.ecp.dev.epilot.io/register/existing-customer?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com"}}}}}}}}}}},"/v2/portal/org/settings":{"get":{"operationId":"getOrganizationSettings","summary":"getOrganizationSettings","description":"get organization settings","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}}}}}}},"/v2/portal/schemas":{"get":{"operationId":"getSchemas","summary":"getSchemas","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"schemas":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/extra-permission-attributes":{"get":{"operationId":"extraPermissionAttributes","summary":"extraPermissionAttributes","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contact":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"contract":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"order":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"opportunity":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}}}}}}}}}}}},"/v2/portal/contact":{"get":{"operationId":"getContact","summary":"getContact","description":"Get the Contact by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"patch":{"operationId":"updateContact","summary":"updateContact","description":"Update the contact details","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}},"/v2/portal/ecp/contact":{"get":{"operationId":"getECPContact","summary":"getECPContact","description":"Get the Contact by id","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"id","required":true,"schema":{"type":"string","example":1234}}],"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/contact/email/count":{"get":{"operationId":"getCountByEmail","summary":"getCountByEmail","description":"Check Contact by email","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","example":"test@test.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"The returned count of contact","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","example":2}}}}}}}}},"/v2/portal/contact/valid/secondary/attributes":{"get":{"operationId":"getValidSecondaryAttributes","summary":"getValidSecondaryAttributes","description":"Get Valid Secondary Attributes","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"The returned count of contact","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"first_name"},"type":{"type":"string","example":"string"}}}}}}}}}}}},"/v2/portal/user":{"get":{"operationId":"getPortalUser","summary":"getPortalUser","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"patch":{"operationId":"updatePortalUser","summary":"updatePortalUser","description":"Update the portal user details","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"delete":{"operationId":"deletePortalUser","summary":"deletePortalUser","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned portal user id","content":{"application/json":{"schema":{"type":"string","example":123}}}}}}},"/v2/portal/user/confirm/{id}":{"get":{"operationId":"confirmUser","summary":"confirmUser","description":"TODO","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}},{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of portal user id"},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}},"/v2/portal/public/user/exists":{"get":{"operationId":"userExists","summary":"userExists","description":"Checks whether a user exists in the customer portal","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","example":"user@example.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"User exists in the portal","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","example":true},"user":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"404":{"description":"User does not exist in the portal","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","example":false}}}}}}}}},"/v2/portal/configure-distribution":{"get":{"operationId":"configureDistribution","summary":"configureDistribution","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"The returned configured distribution id","content":{"application/json":{"schema":{"type":"object","properties":{"domainName":{"type":"string","example":"dsj8op4ha01jha23.cloudfront.net"}}}}}}}}},"/v2/portal/order":{"get":{"operationId":"getAllOrders","summary":"getAllOrders","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned orders","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/order/{id}":{"get":{"operationId":"getOrder","summary":"getOrder","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of order"}],"responses":{"200":{"description":"The returned order","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"patch":{"operationId":"updateOrder","summary":"updateOrder","description":"Update the order details","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of order"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"responses":{"200":{"description":"The returned order","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}},"/v2/portal/opportunity":{"get":{"operationId":"getAllOpportunities","summary":"getAllOpportunities","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/opportunities/{id}":{"get":{"operationId":"getOpportunity","summary":"getOpportunity","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of opportunities"}],"responses":{"200":{"description":"The returned opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"patch":{"operationId":"updateOpportunity","summary":"Update an opportunity based on id","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of opportunities"}],"requestBody":{"description":"Updated opportunity body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The returned opportunity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"/v2/portal/contract":{"get":{"operationId":"getAllContracts","summary":"getAllContracts","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned contracts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/contract/{id}":{"get":{"operationId":"getContract","summary":"get contract based on id","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of the contract"}],"responses":{"200":{"description":"The returned contract","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"patch":{"operationId":"updateContract","summary":"Update contract based on id","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of the contract"}],"requestBody":{"description":"Updated Contract body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The returned updated contract","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"/v2/portal/entity/identifiers/{slug}":{"get":{"operationId":"getEntityIdentifiers","summary":"getEntityIdentifiers","description":"Get Entity\'s Identifiers","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"required":true,"description":"The slug of an entity"}],"responses":{"200":{"description":"The returned identifiers of an entity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"contract_number"},"type":{"type":"string","example":"string"}}}}}}}}}}}},"/v2/portal/entity/by-identifiers/{slug}":{"post":{"operationId":"getEntitiesByIdentifiers","summary":"getEntitiesByIdentifiers","description":"Get Entities By Identifiers","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"required":true,"description":"The slug of an entity"}],"requestBody":{"description":"Entity Identifiers","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The returned Entities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/entity/add-end-customer/{slug}/{id}":{"put":{"operationId":"addEndCustomerRelationToEntity","summary":"addEndCustomerRelationToEntity","description":"Add EndCustomer Relation To an Entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"required":true,"description":"The slug of an entity"},{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of the Entity"}],"responses":{"200":{"description":"The returned Entity","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/entity/file":{"post":{"operationId":"saveEntityFile","summary":"Add files to an entity","description":"Add files to an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Save file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345},"file_entity_id":{"type":"string","example":12345},"document_type":{"type":"string","example":12345},"access_control":{"type":"string","default":"private","enum":["private","public-read"]},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}}}}},"responses":{"200":{"description":"The returned File Entities","content":{"application/json":{"schema":{"type":"object","properties":{"createdFiles":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"delete":{"operationId":"deleteEntityFile","summary":"Delete files from an entity","description":"Delete files from an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Delete file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345}}}}}}},"responses":{"200":{"description":"The returned File Entities","content":{"application/json":{"schema":{"type":"object","properties":{"deletedFiles":{"type":"array","items":{"type":"string","example":123}}}}}}}}}},"/v2/portal/portal/files":{"post":{"operationId":"savePortalFiles","summary":"Add files to portal","description":"Add files to portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"Save portal file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345},"file_type":{"type":"string","example":"orderRightTeaser"},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}}}}},"responses":{"200":{"description":"The returned portal files","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}},"components":{"securitySchemes":{"PortalAuth":{"type":"http","scheme":"bearer","description":"Customer Portal Cognito Token"},"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id as internal user"},"AsContact":{"type":"apiKey","in":"header","name":"x-contact-id","description":"Set contact id as internal user"},"AsCustomer":{"type":"apiKey","in":"header","name":"x-portal-id","description":"Set portal id as customer"}},"schemas":{"InviteToken":{"type":"string"},"UserActivationPayload":{"type":"object","properties":{"display_name":{"type":"string","description":"User\'s display name (default: email address)","example":"Example User"},"password":{"type":"string","description":"User\'s password","example":"AKjhdakjsdh@!34"}}},"ErrorResp":{"type":"object","properties":{"message":{"type":"string"}}},"AddPortalResp":{"type":"object","properties":{"message":{"type":"string"}}},"EmailTemplates":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}},"DeleteEntityFile":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345}}}},"SaveEntityFile":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345},"file_entity_id":{"type":"string","example":12345},"document_type":{"type":"string","example":12345},"access_control":{"type":"string","default":"private","enum":["private","public-read"]},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}},"SavePortalFile":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345},"file_type":{"type":"string","example":"orderRightTeaser"},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}},"ExtraSchemaAttributes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"Origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"UpsertPortalConfig":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},"PortalConfig":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]},"OrganizationSettings":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}},"AuthConfig":{"type":"object","properties":{"user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"},"user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"user_pool_identity_pool_id":{"type":"string","example":"eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1"},"portal_id":{"type":"string","example":"7h2hwdj7hhjsdcjkq03eidna3ep"}},"required":["user_pool_id","user_pool_client_id","portal_id"]},"Exists":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean"},"active":{"type":"boolean"}},"example":{"exists":true,"active":false}},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"EntityId":{"type":"string"},"BaseEntity":{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},"Entity":{"type":"object","properties":{},"additionalProperties":true},"EntityItem":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"Grant":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}}}}')}},t={},r=function r(i){var a=t[i];if(void 0!==a)return a.exports;var p=t[i]={exports:{}};return e[i].call(p.exports,p,p.exports,r),p.exports}(914),i=exports;for(var a in r)i[a]=r[a];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(i(534));t.default=a.default},534:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Customer Portal API","description":"Backend for epilot end customer portals","version":"1.0.0"},"tags":[{"name":"ECP","description":"ECP"},{"name":"ECP Admin","description":"ECP Admin"},{"name":"Public","description":"Public"}],"security":[{"PortalAuth":[]},{"AsOrganization":[]},{"AsCustomer":[]}],"paths":{"/v2/portal/portal":{"post":{"operationId":"upsertPortal","summary":"upserts a portal","description":"upserts a portal and db item","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}}}}},"responses":{"201":{"description":"Success - portal created with success.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Validation Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"Authentication Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/public/user":{"post":{"operationId":"createUser","summary":"creates a user","description":"Creates a user in cognito pool and db item","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","example":"testemail921@yopmail.com"},"password":{"type":"string","example":"Pass1234!"},"orgId":{"type":"string","example":728},"secondaryIdentifier":{"type":"string","example":123456},"contactId":{"type":"string","example":123456}}}}}},"responses":{"201":{"description":"Success - user created with success.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Validation Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"Authentication Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/sso/user":{"post":{"operationId":"createSSOUser","summary":"creates a sso user","description":"Creates a sso user as portal user","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","orgId"],"properties":{"email":{"type":"string","example":"testemail921@yopmail.com"},"orgId":{"type":"string","example":728},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"}}}}}},"responses":{"201":{"description":"Success - SSO User created with success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"400":{"description":"Validation Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"Authentication Errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/public/activate":{"post":{"operationId":"activateUser","summary":"activateUser","description":"Activates the user","security":[],"tags":["Public"],"parameters":[{"in":"query","name":"token","schema":{"type":"string"},"required":true,"description":"Invite Token"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string","description":"User\'s display name (default: email address)","example":"Example User"},"password":{"type":"string","description":"User\'s password","example":"AKjhdakjsdh@!34"}}}}}},"responses":{"200":{"description":"Activated successfully"},"404":{"description":"Token not found for the user"}}}},"/v2/portal/auth":{"get":{"operationId":"testAuth","summary":"testAuth","description":"TODO","tags":["ECP"],"responses":{"200":{"description":"ok"}}}},"/v2/portal/public/config":{"get":{"operationId":"getPortalConfigByDomain","summary":"getPortalConfigByDomain","description":"TODO","tags":["ECP"],"security":[],"parameters":[{"in":"query","name":"domain","required":true,"schema":{"type":"string","example":"example.com"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"/v2/portal/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"TODO","tags":["ECP Admin","ECP"],"parameters":[{"in":"query","name":"origin","required":false,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"security":[{"EpilotAuth":[]},{"PortalAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}},"delete":{"operationId":"deletePortal","summary":"deletePortal","description":"TODO","tags":["ECP Admin"],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"security":[{"EpilotAuth":[]}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"}}}},"/v2/portal/public/portal/config":{"get":{"operationId":"getPublicPortalConfig","summary":"getPublicPortalConfig","description":"TODO","tags":["ECP Admin"],"security":[],"parameters":[{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":12324}},{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"/v2/portal/org/portal/config":{"get":{"operationId":"getOrgPortalConfig","summary":"getOrgPortalConfig","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}},"/v2/portal/configs":{"get":{"operationId":"getAllPortalConfigs","summary":"getAllPortalConfigs","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]}}}}}}}}}},"/v2/portal/email-templates":{"post":{"operationId":"upsertEmailTemplates","summary":"upsertEmailTemplates","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"emailTemplates":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}}}}}}}}},"get":{"operationId":"getEmailTemplates","summary":"getEmailTemplates","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}}}}}}}},"/v2/portal/replace-ecp-template-variables":{"post":{"operationId":"replaceECPTemplateVariables","summary":"replaceECPTemplateVariables","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"requestBody":{"description":"ECPVariables payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","example":"7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51"}}}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"portalUser":{"type":"object","properties":{"invitationLink":{"type":"string","example":"https://end-customer-portal.ecp.dev.epilot.io/register/existing-customer?contactId=7aa44fb8-d60e-40cc-9a3a-ba09a1ff7f51&email=john@doe.com"}}}}}}}}}}},"/v2/portal/org/settings":{"get":{"operationId":"getOrganizationSettings","summary":"getOrganizationSettings","description":"get organization settings","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}}}}}}},"/v2/portal/schemas":{"get":{"operationId":"getSchemas","summary":"getSchemas","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"schemas":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/extra-permission-attributes":{"get":{"operationId":"extraPermissionAttributes","summary":"extraPermissionAttributes","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contact":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"contract":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"order":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"opportunity":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}}}}}}}}}}}},"/v2/portal/contact":{"get":{"operationId":"getContact","summary":"getContact","description":"Get the Contact by id","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"files":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"patch":{"operationId":"updateContact","summary":"updateContact","description":"Update the contact details","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}},"/v2/portal/ecp/contact":{"get":{"operationId":"getECPContact","summary":"getECPContact","description":"Get the Contact by id","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"id","required":true,"schema":{"type":"string","example":1234}}],"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"500":{"description":"Other errors","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/portal/contact/email/count":{"get":{"operationId":"getCountByEmail","summary":"getCountByEmail","description":"Check Contact by email","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","example":"test@test.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"The returned count of contact","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","example":2}}}}}}}}},"/v2/portal/contact/valid/secondary/attributes":{"get":{"operationId":"getValidSecondaryAttributes","summary":"getValidSecondaryAttributes","description":"Get Valid Secondary Attributes","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"responses":{"200":{"description":"The returned count of contact","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"first_name"},"type":{"type":"string","example":"string"}}}}}}}}}}}},"/v2/portal/user":{"get":{"operationId":"getPortalUser","summary":"getPortalUser","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"patch":{"operationId":"updatePortalUser","summary":"updatePortalUser","description":"Update the portal user details","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"delete":{"operationId":"deletePortalUser","summary":"deletePortalUser","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned portal user id","content":{"application/json":{"schema":{"type":"string","example":123}}}}}}},"/v2/portal/user/confirm/{id}":{"get":{"operationId":"confirmUser","summary":"confirmUser","description":"TODO","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}},{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of portal user id"},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}},"/v2/portal/public/user/exists":{"get":{"operationId":"userExists","summary":"userExists","description":"Checks whether a user exists in the customer portal","tags":["Public"],"security":[],"parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string","example":"user@example.com"}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"User exists in the portal","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","example":true},"user":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}},"404":{"description":"User does not exist in the portal","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","example":false}}}}}}}}},"/v2/portal/configure-distribution":{"get":{"operationId":"configureDistribution","summary":"configureDistribution","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"origin","required":true,"schema":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}],"responses":{"200":{"description":"The returned configured distribution id","content":{"application/json":{"schema":{"type":"object","properties":{"domainName":{"type":"string","example":"dsj8op4ha01jha23.cloudfront.net"}}}}}}}}},"/v2/portal/order":{"get":{"operationId":"getAllOrders","summary":"getAllOrders","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned orders","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/order/{id}":{"get":{"operationId":"getOrder","summary":"getOrder","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of order"}],"responses":{"200":{"description":"The returned order","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"files":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"products":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"crossSellableProducts":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"workflow":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}}}},"patch":{"operationId":"updateOrder","summary":"updateOrder","description":"Update the order details","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of order"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}},"responses":{"200":{"description":"The returned order","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}},"/v2/portal/opportunity":{"get":{"operationId":"getAllOpportunities","summary":"getAllOpportunities","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/opportunities/{id}":{"get":{"operationId":"getOpportunity","summary":"getOpportunity","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of opportunities"}],"responses":{"200":{"description":"The returned opportunities","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"orders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"files":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"workflow":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}}}},"patch":{"operationId":"updateOpportunity","summary":"Update an opportunity based on id","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of opportunities"}],"requestBody":{"description":"Updated opportunity body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The returned opportunity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"/v2/portal/contract":{"get":{"operationId":"getAllContracts","summary":"getAllContracts","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"responses":{"200":{"description":"The returned contracts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/contract/{id}":{"get":{"operationId":"getContract","summary":"get contract based on id","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of the contract"}],"responses":{"200":{"description":"The returned contract","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"orders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"files":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}},"workflow":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}}}}}},"patch":{"operationId":"updateContract","summary":"Update contract based on id","description":"TODO","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of the contract"}],"requestBody":{"description":"Updated Contract body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The returned updated contract","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"/v2/portal/entity/identifiers/{slug}":{"get":{"operationId":"getEntityIdentifiers","summary":"getEntityIdentifiers","description":"Get Entity\'s Identifiers","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"required":true,"description":"The slug of an entity"}],"responses":{"200":{"description":"The returned identifiers of an entity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"contract_number"},"type":{"type":"string","example":"string"}}}}}}}}}}}},"/v2/portal/entity/by-identifiers/{slug}":{"post":{"operationId":"getEntitiesByIdentifiers","summary":"getEntitiesByIdentifiers","description":"Get Entities By Identifiers","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"required":true,"description":"The slug of an entity"}],"requestBody":{"description":"Entity Identifiers","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The returned Entities","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/entity/add-end-customer/{slug}/{id}":{"put":{"operationId":"addEndCustomerRelationToEntity","summary":"addEndCustomerRelationToEntity","description":"Add EndCustomer Relation To an Entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"parameters":[{"in":"path","name":"slug","schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"required":true,"description":"The slug of an entity"},{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of the Entity"}],"responses":{"200":{"description":"The returned Entity","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"relations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}}},"/v2/portal/entity/file":{"post":{"operationId":"saveEntityFile","summary":"Add files to an entity","description":"Add files to an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Save file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345},"file_entity_id":{"type":"string","example":12345},"document_type":{"type":"string","example":12345},"access_control":{"type":"string","default":"private","enum":["private","public-read"]},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}}}}},"responses":{"200":{"description":"The returned File Entities","content":{"application/json":{"schema":{"type":"object","properties":{"createdFiles":{"type":"array","items":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}}},"delete":{"operationId":"deleteEntityFile","summary":"Delete files from an entity","description":"Delete files from an entity","tags":["ECP"],"security":[{"PortalAuth":[]}],"requestBody":{"description":"Delete file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345}}}}}}},"responses":{"200":{"description":"The returned File Entities","content":{"application/json":{"schema":{"type":"object","properties":{"deletedFiles":{"type":"array","items":{"type":"string","example":123}}}}}}}}}},"/v2/portal/portal/files":{"post":{"operationId":"savePortalFiles","summary":"Add files to portal","description":"Add files to portal","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"requestBody":{"description":"Save portal file","required":true,"content":{"application/json":{"schema":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345},"file_type":{"type":"string","example":"orderRightTeaser"},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}}}}},"responses":{"200":{"description":"The returned portal files","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]}}}}}}}},"components":{"securitySchemes":{"PortalAuth":{"type":"http","scheme":"bearer","description":"Customer Portal Cognito Token"},"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id as internal user"},"AsContact":{"type":"apiKey","in":"header","name":"x-contact-id","description":"Set contact id as internal user"},"AsCustomer":{"type":"apiKey","in":"header","name":"x-portal-id","description":"Set portal id as customer"}},"schemas":{"InviteToken":{"type":"string"},"UserActivationPayload":{"type":"object","properties":{"display_name":{"type":"string","description":"User\'s display name (default: email address)","example":"Example User"},"password":{"type":"string","description":"User\'s password","example":"AKjhdakjsdh@!34"}}},"ErrorResp":{"type":"object","properties":{"message":{"type":"string"}}},"AddPortalResp":{"type":"object","properties":{"message":{"type":"string"}}},"EmailTemplates":{"type":"object","properties":{"confirmAccount":{"type":"string"},"forgotPassword":{"type":"string"},"invitation":{"type":"string"},"onNewQuote":{"type":"string"},"onMapAPendingUser":{"type":"string"}}},"DeleteEntityFile":{"type":"object","required":["file_entity_ids","entity_type","entity_id"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"file_entity_ids":{"type":"array","items":{"type":"string","example":12345}}}},"SaveEntityFile":{"type":"object","required":["entity_id","entity_type","files"],"properties":{"entity_id":{"type":"string","example":123456},"entity_type":{"type":"string","example":"order"},"files":{"type":"array","items":{"type":"object","required":["filename","s3ref"],"properties":{"filename":{"type":"string","example":12345},"file_entity_id":{"type":"string","example":12345},"document_type":{"type":"string","example":12345},"access_control":{"type":"string","default":"private","enum":["private","public-read"]},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}},"SavePortalFile":{"type":"object","required":["files","origin"],"properties":{"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"files":{"type":"array","items":{"type":"object","required":["file_type"],"properties":{"filename":{"type":"string","example":12345},"file_type":{"type":"string","example":"orderRightTeaser"},"_tags":{"type":"array","items":{"type":"string","example":12345}},"s3ref":{"type":"object","required":["bucket","key"],"properties":{"bucket":{"type":"string","example":12345},"key":{"type":"string","example":12345}}}}}}}},"ExtraSchemaAttributes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"group":{"type":"string"}}}},"Origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]},"UpsertPortalConfig":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},"PortalConfig":{"allOf":[{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"name":{"type":"string","example":"My Portal"},"is_epilot_domain":{"type":"boolean","example":true},"design_id":{"type":"string","example":3134},"default_user_to_notify":{"type":"object"},"self_registration":{"description":"Whether portal user has self registration","type":"boolean","example":false},"cognito_details":{"type":"object","properties":{"cognito_user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"cognito_user_pool_arn":{"type":"string","example":"arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341"},"cognito_user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"}}},"config":{"type":"string"},"contact_secondary_identifier":{"type":"string","example":"full_name"},"email_templates":{"type":"object","properties":{"confirmAccount":{"type":"string","example":"701f089d-6953-48b5-ac35-442de7c59cd3"},"forgotPassword":{"type":"string","example":"6538fddb-f0e9-4f0f-af51-6e57891ff20a"},"invitation":{"type":"string","example":"14ae65fb-0dc1-4863-8743-6bc01da469f6"}}},"grants":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]}},"images":{"type":"object","properties":{"orderLeftTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-left-teaser.jpeg"},"orderRightTeaser":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/order-right-teaser.jpeg"},"welcomeBanner":{"type":"string","nullable":true,"example":"https://epilot-bucket.s3.eu-central-1.amazonaws.com/12344/6538fddb-f0e9-4f0f-af51-6e57891ff20a/welcome-banner.jpeg"}}},"entity_identifiers":{"type":"object","additionalProperties":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"attributes":{"type":"array","items":{"type":"string","example":"contract_number"}}}}},"entity_actions":{"type":"array","items":{"type":"object","properties":{"journey_id":{"type":"string"},"slug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"action_Label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}}}}}}}},{"properties":{"id":{"type":"string","example":12345,"description":"ID of the organization"},"org_name":{"type":"string","example":"ABC Company"},"origin":{"type":"string","description":"Origin of the portal","enum":["END_CUSTOMER_PORTAL","INSTALLER_PORTAL"]}}}]},"OrganizationSettings":{"type":"object","properties":{"automation_entity_mapping":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"automation_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"central_inbox_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"contracts_preview_setting":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"disable_ivy":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"double_opt_in":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_catalog_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_opportunities_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ecommerce_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"end_customer_portal":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"entity_schema_builder":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"logic_editor_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"new_navigation":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"partnering":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"product-availability":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"sso":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"submission_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"user_roles_preview":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}},"AuthConfig":{"type":"object","properties":{"user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"},"user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"user_pool_identity_pool_id":{"type":"string","example":"eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1"},"portal_id":{"type":"string","example":"7h2hwdj7hhjsdcjkq03eidna3ep"}},"required":["user_pool_id","user_pool_client_id","portal_id"]},"Exists":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean"},"active":{"type":"boolean"}},"example":{"exists":true,"active":false}},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"EntityId":{"type":"string"},"BaseEntity":{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},"Entity":{"type":"object","properties":{},"additionalProperties":true},"EntityItem":{"allOf":[{"type":"object","properties":{"_id":{"type":"string"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},{"type":"object","properties":{},"additionalProperties":true}]},"Grant":{"type":"object","properties":{"action":{"type":"string","example":"entity-read"},"resource":{"type":"string","example":"entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"},"effect":{"type":"string","default":"allow","enum":["allow","deny"]}},"required":["action"]},"WorkflowExecution":{"type":"object","properties":{},"additionalProperties":true,"example":{"id":"8gja72h6kas6h","name":"Lead Qualification","trigger":"MANUAL","status":"STARTED","creationTime":"2021-04-27T12:01:13.000Z","lastUpdateTime":"2021-04-27T12:01:13.000Z","dueDate":"2021-04-27T12:01:13.000Z","assignedTo":["252","29052"],"flow":[{"id":"sectionId1","name":"Initial Information Gathering","steps":[{"id":"sada5641f3a21","name":"Call client and confirm address and product","status":"ASSIGNED","assignedTo":["11"]},{"id":"sada5641f3a22","name":"Check product availability","status":"UNASSIGNED"},{"id":"sada5641f3a23","name":"Send email confirming contact with the client","status":"SKIPPED"}]},{"id":"firstLevelStepId1","name":"Print and send catalog","status":"SKIPPED","dueDate":"2023-01-15T20:00:00"}]}}}}}')}},t={},i=function i(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,i),o.exports}(914),r=exports;for(var a in i)r[a]=i[a];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -539,6 +539,57 @@ declare namespace Components {
539
539
  */
540
540
  password?: string;
541
541
  }
542
+ /**
543
+ * example:
544
+ * {
545
+ * "id": "8gja72h6kas6h",
546
+ * "name": "Lead Qualification",
547
+ * "trigger": "MANUAL",
548
+ * "status": "STARTED",
549
+ * "creationTime": "2021-04-27T12:01:13.000Z",
550
+ * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
551
+ * "dueDate": "2021-04-27T12:01:13.000Z",
552
+ * "assignedTo": [
553
+ * "252",
554
+ * "29052"
555
+ * ],
556
+ * "flow": [
557
+ * {
558
+ * "id": "sectionId1",
559
+ * "name": "Initial Information Gathering",
560
+ * "steps": [
561
+ * {
562
+ * "id": "sada5641f3a21",
563
+ * "name": "Call client and confirm address and product",
564
+ * "status": "ASSIGNED",
565
+ * "assignedTo": [
566
+ * "11"
567
+ * ]
568
+ * },
569
+ * {
570
+ * "id": "sada5641f3a22",
571
+ * "name": "Check product availability",
572
+ * "status": "UNASSIGNED"
573
+ * },
574
+ * {
575
+ * "id": "sada5641f3a23",
576
+ * "name": "Send email confirming contact with the client",
577
+ * "status": "SKIPPED"
578
+ * }
579
+ * ]
580
+ * },
581
+ * {
582
+ * "id": "firstLevelStepId1",
583
+ * "name": "Print and send catalog",
584
+ * "status": "SKIPPED",
585
+ * "dueDate": "2023-01-15T20:00:00"
586
+ * }
587
+ * ]
588
+ * }
589
+ */
590
+ export interface WorkflowExecution {
591
+ [name: string]: any;
592
+ }
542
593
  }
543
594
  }
544
595
  declare namespace Paths {
@@ -680,6 +731,16 @@ declare namespace Paths {
680
731
  * 728
681
732
  */
682
733
  orgId: string;
734
+ /**
735
+ * example:
736
+ * John
737
+ */
738
+ first_name?: string;
739
+ /**
740
+ * example:
741
+ * Doe
742
+ */
743
+ last_name?: string;
683
744
  }
684
745
  namespace Responses {
685
746
  export interface $201 {
@@ -860,21 +921,53 @@ declare namespace Paths {
860
921
  }
861
922
  namespace GetContact {
862
923
  namespace Responses {
863
- export type $200 = /**
864
- * example:
865
- * {
866
- * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
867
- * "_org": "123",
868
- * "_schema": "contact",
869
- * "_tags": [
870
- * "example",
871
- * "mock"
872
- * ],
873
- * "_created_at": {},
874
- * "_updated_at": {}
875
- * }
876
- */
877
- Components.Schemas.EntityItem;
924
+ export interface $200 {
925
+ entity?: /**
926
+ * example:
927
+ * {
928
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
929
+ * "_org": "123",
930
+ * "_schema": "contact",
931
+ * "_tags": [
932
+ * "example",
933
+ * "mock"
934
+ * ],
935
+ * "_created_at": {},
936
+ * "_updated_at": {}
937
+ * }
938
+ */
939
+ Components.Schemas.EntityItem;
940
+ files?: /**
941
+ * example:
942
+ * {
943
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
944
+ * "_org": "123",
945
+ * "_schema": "contact",
946
+ * "_tags": [
947
+ * "example",
948
+ * "mock"
949
+ * ],
950
+ * "_created_at": {},
951
+ * "_updated_at": {}
952
+ * }
953
+ */
954
+ Components.Schemas.EntityItem[];
955
+ relations?: /**
956
+ * example:
957
+ * {
958
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
959
+ * "_org": "123",
960
+ * "_schema": "contact",
961
+ * "_tags": [
962
+ * "example",
963
+ * "mock"
964
+ * ],
965
+ * "_created_at": {},
966
+ * "_updated_at": {}
967
+ * }
968
+ */
969
+ Components.Schemas.EntityItem[];
970
+ }
878
971
  export type $500 = Components.Schemas.ErrorResp;
879
972
  }
880
973
  }
@@ -902,6 +995,36 @@ declare namespace Paths {
902
995
  * }
903
996
  */
904
997
  Components.Schemas.EntityItem;
998
+ orders?: /**
999
+ * example:
1000
+ * {
1001
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1002
+ * "_org": "123",
1003
+ * "_schema": "contact",
1004
+ * "_tags": [
1005
+ * "example",
1006
+ * "mock"
1007
+ * ],
1008
+ * "_created_at": {},
1009
+ * "_updated_at": {}
1010
+ * }
1011
+ */
1012
+ Components.Schemas.EntityItem[];
1013
+ files?: /**
1014
+ * example:
1015
+ * {
1016
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1017
+ * "_org": "123",
1018
+ * "_schema": "contact",
1019
+ * "_tags": [
1020
+ * "example",
1021
+ * "mock"
1022
+ * ],
1023
+ * "_created_at": {},
1024
+ * "_updated_at": {}
1025
+ * }
1026
+ */
1027
+ Components.Schemas.EntityItem[];
905
1028
  relations?: /**
906
1029
  * example:
907
1030
  * {
@@ -917,6 +1040,55 @@ declare namespace Paths {
917
1040
  * }
918
1041
  */
919
1042
  Components.Schemas.EntityItem[];
1043
+ workflow?: /**
1044
+ * example:
1045
+ * {
1046
+ * "id": "8gja72h6kas6h",
1047
+ * "name": "Lead Qualification",
1048
+ * "trigger": "MANUAL",
1049
+ * "status": "STARTED",
1050
+ * "creationTime": "2021-04-27T12:01:13.000Z",
1051
+ * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
1052
+ * "dueDate": "2021-04-27T12:01:13.000Z",
1053
+ * "assignedTo": [
1054
+ * "252",
1055
+ * "29052"
1056
+ * ],
1057
+ * "flow": [
1058
+ * {
1059
+ * "id": "sectionId1",
1060
+ * "name": "Initial Information Gathering",
1061
+ * "steps": [
1062
+ * {
1063
+ * "id": "sada5641f3a21",
1064
+ * "name": "Call client and confirm address and product",
1065
+ * "status": "ASSIGNED",
1066
+ * "assignedTo": [
1067
+ * "11"
1068
+ * ]
1069
+ * },
1070
+ * {
1071
+ * "id": "sada5641f3a22",
1072
+ * "name": "Check product availability",
1073
+ * "status": "UNASSIGNED"
1074
+ * },
1075
+ * {
1076
+ * "id": "sada5641f3a23",
1077
+ * "name": "Send email confirming contact with the client",
1078
+ * "status": "SKIPPED"
1079
+ * }
1080
+ * ]
1081
+ * },
1082
+ * {
1083
+ * "id": "firstLevelStepId1",
1084
+ * "name": "Print and send catalog",
1085
+ * "status": "SKIPPED",
1086
+ * "dueDate": "2023-01-15T20:00:00"
1087
+ * }
1088
+ * ]
1089
+ * }
1090
+ */
1091
+ Components.Schemas.WorkflowExecution[];
920
1092
  }
921
1093
  }
922
1094
  }
@@ -1086,6 +1258,36 @@ declare namespace Paths {
1086
1258
  * }
1087
1259
  */
1088
1260
  Components.Schemas.EntityItem;
1261
+ orders?: /**
1262
+ * example:
1263
+ * {
1264
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1265
+ * "_org": "123",
1266
+ * "_schema": "contact",
1267
+ * "_tags": [
1268
+ * "example",
1269
+ * "mock"
1270
+ * ],
1271
+ * "_created_at": {},
1272
+ * "_updated_at": {}
1273
+ * }
1274
+ */
1275
+ Components.Schemas.EntityItem[];
1276
+ files?: /**
1277
+ * example:
1278
+ * {
1279
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1280
+ * "_org": "123",
1281
+ * "_schema": "contact",
1282
+ * "_tags": [
1283
+ * "example",
1284
+ * "mock"
1285
+ * ],
1286
+ * "_created_at": {},
1287
+ * "_updated_at": {}
1288
+ * }
1289
+ */
1290
+ Components.Schemas.EntityItem[];
1089
1291
  relations?: /**
1090
1292
  * example:
1091
1293
  * {
@@ -1101,6 +1303,55 @@ declare namespace Paths {
1101
1303
  * }
1102
1304
  */
1103
1305
  Components.Schemas.EntityItem[];
1306
+ workflow?: /**
1307
+ * example:
1308
+ * {
1309
+ * "id": "8gja72h6kas6h",
1310
+ * "name": "Lead Qualification",
1311
+ * "trigger": "MANUAL",
1312
+ * "status": "STARTED",
1313
+ * "creationTime": "2021-04-27T12:01:13.000Z",
1314
+ * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
1315
+ * "dueDate": "2021-04-27T12:01:13.000Z",
1316
+ * "assignedTo": [
1317
+ * "252",
1318
+ * "29052"
1319
+ * ],
1320
+ * "flow": [
1321
+ * {
1322
+ * "id": "sectionId1",
1323
+ * "name": "Initial Information Gathering",
1324
+ * "steps": [
1325
+ * {
1326
+ * "id": "sada5641f3a21",
1327
+ * "name": "Call client and confirm address and product",
1328
+ * "status": "ASSIGNED",
1329
+ * "assignedTo": [
1330
+ * "11"
1331
+ * ]
1332
+ * },
1333
+ * {
1334
+ * "id": "sada5641f3a22",
1335
+ * "name": "Check product availability",
1336
+ * "status": "UNASSIGNED"
1337
+ * },
1338
+ * {
1339
+ * "id": "sada5641f3a23",
1340
+ * "name": "Send email confirming contact with the client",
1341
+ * "status": "SKIPPED"
1342
+ * }
1343
+ * ]
1344
+ * },
1345
+ * {
1346
+ * "id": "firstLevelStepId1",
1347
+ * "name": "Print and send catalog",
1348
+ * "status": "SKIPPED",
1349
+ * "dueDate": "2023-01-15T20:00:00"
1350
+ * }
1351
+ * ]
1352
+ * }
1353
+ */
1354
+ Components.Schemas.WorkflowExecution[];
1104
1355
  }
1105
1356
  }
1106
1357
  }
@@ -1128,6 +1379,21 @@ declare namespace Paths {
1128
1379
  * }
1129
1380
  */
1130
1381
  Components.Schemas.EntityItem;
1382
+ files?: /**
1383
+ * example:
1384
+ * {
1385
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1386
+ * "_org": "123",
1387
+ * "_schema": "contact",
1388
+ * "_tags": [
1389
+ * "example",
1390
+ * "mock"
1391
+ * ],
1392
+ * "_created_at": {},
1393
+ * "_updated_at": {}
1394
+ * }
1395
+ */
1396
+ Components.Schemas.EntityItem[];
1131
1397
  relations?: /**
1132
1398
  * example:
1133
1399
  * {
@@ -1143,6 +1409,85 @@ declare namespace Paths {
1143
1409
  * }
1144
1410
  */
1145
1411
  Components.Schemas.EntityItem[];
1412
+ products?: /**
1413
+ * example:
1414
+ * {
1415
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1416
+ * "_org": "123",
1417
+ * "_schema": "contact",
1418
+ * "_tags": [
1419
+ * "example",
1420
+ * "mock"
1421
+ * ],
1422
+ * "_created_at": {},
1423
+ * "_updated_at": {}
1424
+ * }
1425
+ */
1426
+ Components.Schemas.EntityItem[];
1427
+ crossSellableProducts?: /**
1428
+ * example:
1429
+ * {
1430
+ * "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1431
+ * "_org": "123",
1432
+ * "_schema": "contact",
1433
+ * "_tags": [
1434
+ * "example",
1435
+ * "mock"
1436
+ * ],
1437
+ * "_created_at": {},
1438
+ * "_updated_at": {}
1439
+ * }
1440
+ */
1441
+ Components.Schemas.EntityItem[];
1442
+ workflow?: /**
1443
+ * example:
1444
+ * {
1445
+ * "id": "8gja72h6kas6h",
1446
+ * "name": "Lead Qualification",
1447
+ * "trigger": "MANUAL",
1448
+ * "status": "STARTED",
1449
+ * "creationTime": "2021-04-27T12:01:13.000Z",
1450
+ * "lastUpdateTime": "2021-04-27T12:01:13.000Z",
1451
+ * "dueDate": "2021-04-27T12:01:13.000Z",
1452
+ * "assignedTo": [
1453
+ * "252",
1454
+ * "29052"
1455
+ * ],
1456
+ * "flow": [
1457
+ * {
1458
+ * "id": "sectionId1",
1459
+ * "name": "Initial Information Gathering",
1460
+ * "steps": [
1461
+ * {
1462
+ * "id": "sada5641f3a21",
1463
+ * "name": "Call client and confirm address and product",
1464
+ * "status": "ASSIGNED",
1465
+ * "assignedTo": [
1466
+ * "11"
1467
+ * ]
1468
+ * },
1469
+ * {
1470
+ * "id": "sada5641f3a22",
1471
+ * "name": "Check product availability",
1472
+ * "status": "UNASSIGNED"
1473
+ * },
1474
+ * {
1475
+ * "id": "sada5641f3a23",
1476
+ * "name": "Send email confirming contact with the client",
1477
+ * "status": "SKIPPED"
1478
+ * }
1479
+ * ]
1480
+ * },
1481
+ * {
1482
+ * "id": "firstLevelStepId1",
1483
+ * "name": "Print and send catalog",
1484
+ * "status": "SKIPPED",
1485
+ * "dueDate": "2023-01-15T20:00:00"
1486
+ * }
1487
+ * ]
1488
+ * }
1489
+ */
1490
+ Components.Schemas.WorkflowExecution[];
1146
1491
  }
1147
1492
  }
1148
1493
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/customer-portal-client",
3
- "version": "0.8.13",
3
+ "version": "0.8.14",
4
4
  "description": "API Client for epilot customer-portal API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",