@epilot/customer-portal-client
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -1,1 +0,1 @@ | ||
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=s(r(279));t.default=i.default},279: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"}],"security":[{"CustomerPortalAuth":[]},{"AsOrganization":[]},{"AsBrand":[]},{"AsCustomer":[]}],"paths":{"/v1/customer-portal/portal":{"post":{"operationId":"createPortal","summary":"creates a portal","description":"Creates a portal and db item","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"testing-pool"},"organization_id":{"type":"string","example":15434},"domain":{"type":"string","example":"example.com"},"design_id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"}}}}}},"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"}}}}}}}}},"/v1/customer-portal/public/user":{"post":{"operationId":"createUser","summary":"creates a user","description":"Creates a user in cognito pool and db item","security":[],"tags":["ECP Admin"],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","example":"email@test.com"},"domain":{"type":"string","example":"example.com"}}}}}},"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"}}}}}}}}},"/v1/customer-portal/public/activate":{"post":{"operationId":"activateUser","summary":"activateUser","description":"Activates the user","security":[],"tags":["ECP Admin"],"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"}}}},"/v1/customer-portal/auth":{"get":{"operationId":"testAuth","summary":"testAuth","description":"TODO","tags":["ECP"],"responses":{"200":{"description":"ok"}}}},"/v1/customer-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":{"type":"object","properties":{"id":{"type":"string","example":12454},"organization_id":{"type":"string","example":66},"design_id":{"type":"string","example":3134},"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"}}}}}}}}},"/v1/customer-portal/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"brand_id","required":true,"schema":{"type":"string","example":12324}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":2342}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":12454},"organization_id":{"type":"string","example":66},"design_id":{"type":"string","example":3134},"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"}}}}}}}}},"/v1/customer-portal/contact/{id}":{"get":{"operationId":"getContact","summary":"getContact","description":"Get the Contact by id","tags":["ECP"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of contact"}],"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}}},"patch":{"operationId":"updateContact","summary":"updateContact","description":"Update the contact details","tags":["ECP"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of contact"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}},"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}}}},"/v1/customer-portal/user/{id}":{"get":{"operationId":"getPortalUser","summary":"getPortalUser","description":"TODO","tags":["ECP"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of portal user id"}],"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"type":"object","properties":{"user_number":{"type":"string","example":12454},"mapped_contact":{"type":"string","example":"xyz"},"mapping_status":{"type":"boolean","example":true},"registration_status":{"type":"string","example":"user_created"},"org_id":{"type":"string","example":123},"brand_id":{"type":"string","example":789},"user_pool_id":{"type":"string","example":"eu-central-1_AJ183HA10"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}}}},"/v1/customer-portal/public/register/exists":{"get":{"operationId":"userExists","summary":"userExists","description":"Checks whether a user exists in the customer portal","tags":["ECP"],"security":[],"parameters":[{"in":"query","name":"username","required":false,"schema":{"type":"string","example":"user@example.com"}},{"in":"query","name":"customerId","required":false,"schema":{"type":"string","example":12345678}}],"responses":{"200":{"description":"User exists in the portal","content":{"application/json":{"schema":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean"},"active":{"type":"boolean"}},"example":{"exists":true,"active":false}}}}},"404":{"description":"User does not exist in the portal","content":{"application/json":{"schema":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean"},"active":{"type":"boolean"}},"example":{"exists":true,"active":false}}}}}}}}},"components":{"securitySchemes":{"CustomerPortalAuth":{"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"},"AsBrand":{"type":"apiKey","in":"header","name":"x-ivy-brand-id","description":"Set brand 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"},"ContactId":{"type":"string"},"PortalUserId":{"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"}}},"PortalConfig":{"type":"object","properties":{"auth_config":{"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"]}}},"ErrorResp":{"type":"object","properties":{"message":{"type":"string"}}},"AddPortalResp":{"type":"object","properties":{"message":{"type":"string"}}},"Brand":{"type":"object","properties":{"id":{"type":"string","example":12454},"organization_id":{"type":"string","example":66},"design_id":{"type":"string","example":3134},"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"}}},"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}},"Contact":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}},"PortalUser":{"type":"object","properties":{"user_number":{"type":"string","example":12454},"mapped_contact":{"type":"string","example":"xyz"},"mapping_status":{"type":"boolean","example":true},"registration_status":{"type":"string","example":"user_created"},"org_id":{"type":"string","example":123},"brand_id":{"type":"string","example":789},"user_pool_id":{"type":"string","example":"eu-central-1_AJ183HA10"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}')}},t={};return function r(s){if(t[s])return t[s].exports;var i=t[s]={exports:{}};return e[s].call(i.exports,i,i.exports,r),i.exports}(914)})()); | ||
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=s(r(279));t.default=i.default},279: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"}],"security":[{"CustomerPortalAuth":[]},{"AsOrganization":[]},{"AsBrand":[]},{"AsCustomer":[]}],"paths":{"/v1/customer-portal/portal":{"post":{"operationId":"createPortal","summary":"creates a portal","description":"Creates a portal and db item","security":[{"EpilotAuth":[]}],"tags":["ECP Admin"],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"testing-pool"},"organization_id":{"type":"string","example":15434},"domain":{"type":"string","example":"example.com"},"design_id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"}}}}}},"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"}}}}}}}}},"/v1/customer-portal/public/user":{"post":{"operationId":"createUser","summary":"creates a user","description":"Creates a user in cognito pool and db item","security":[],"tags":["ECP Admin"],"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},"userPoolId":{"type":"string","example":"eu-central-1_391JDA1HFO"},"clientId":{"type":"string","example":"aj123jfoavnashf2fj"},"brandId":{"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"}}}}}}}}},"/v1/customer-portal/public/activate":{"post":{"operationId":"activateUser","summary":"activateUser","description":"Activates the user","security":[],"tags":["ECP Admin"],"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"}}}},"/v1/customer-portal/auth":{"get":{"operationId":"testAuth","summary":"testAuth","description":"TODO","tags":["ECP"],"responses":{"200":{"description":"ok"}}}},"/v1/customer-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":{"type":"object","properties":{"id":{"type":"string","example":12454},"organization_id":{"type":"string","example":66},"design_id":{"type":"string","example":3134},"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"}}}}}}}}},"/v1/customer-portal/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"TODO","tags":["ECP Admin"],"security":[{"EpilotAuth":[]}],"parameters":[{"in":"query","name":"brand_id","required":true,"schema":{"type":"string","example":12324}},{"in":"query","name":"org_id","required":true,"schema":{"type":"string","example":2342}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":12454},"organization_id":{"type":"string","example":66},"design_id":{"type":"string","example":3134},"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"}}}}}}}}},"/v1/customer-portal/contact/{id}":{"get":{"operationId":"getContact","summary":"getContact","description":"Get the Contact by id","tags":["ECP"],"security":[{"CustomerPortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of contact"},{"in":"query","name":"orgId","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}}},"patch":{"operationId":"updateContact","summary":"updateContact","description":"Update the contact details","tags":["ECP"],"security":[{"CustomerPortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of contact"},{"in":"query","name":"orgId","required":true,"schema":{"type":"string","example":123}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}},"responses":{"200":{"description":"The returned contact","content":{"application/json":{"schema":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}}}},"/v1/customer-portal/user/{id}":{"get":{"operationId":"getPortalUser","summary":"getPortalUser","description":"TODO","tags":["ECP"],"security":[{"CustomerPortalAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of portal user id"},{"in":"query","name":"orgId","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"type":"object","properties":{"user_number":{"type":"string","example":12454},"mapped_contact":{"type":"string","example":"xyz"},"mapping_status":{"type":"boolean","example":true},"registration_status":{"type":"string","example":"user_created"},"org_id":{"type":"string","example":123},"brand_id":{"type":"string","example":789},"user_pool_id":{"type":"string","example":"eu-central-1_AJ183HA10"},"clientId":{"type":"string","example":"aj123jfoavnashf2fj"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}}}},"/v1/customer-portal/user/confirm/{id}":{"get":{"operationId":"confirmUser","summary":"confirmUser","description":"TODO","tags":["ECP"],"security":[],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The Id of portal user id"},{"in":"query","name":"orgId","required":true,"schema":{"type":"string","example":123}}],"responses":{"200":{"description":"The returned portal user","content":{"application/json":{"schema":{"type":"object","properties":{"user_number":{"type":"string","example":12454},"mapped_contact":{"type":"string","example":"xyz"},"mapping_status":{"type":"boolean","example":true},"registration_status":{"type":"string","example":"user_created"},"org_id":{"type":"string","example":123},"brand_id":{"type":"string","example":789},"user_pool_id":{"type":"string","example":"eu-central-1_AJ183HA10"},"clientId":{"type":"string","example":"aj123jfoavnashf2fj"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}}}},"/v1/customer-portal/public/register/exists":{"get":{"operationId":"userExists","summary":"userExists","description":"Checks whether a user exists in the customer portal","tags":["ECP"],"security":[],"parameters":[{"in":"query","name":"username","required":false,"schema":{"type":"string","example":"user@example.com"}},{"in":"query","name":"customerId","required":false,"schema":{"type":"string","example":12345678}}],"responses":{"200":{"description":"User exists in the portal","content":{"application/json":{"schema":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean"},"active":{"type":"boolean"}},"example":{"exists":true,"active":false}}}}},"404":{"description":"User does not exist in the portal","content":{"application/json":{"schema":{"type":"object","required":["exists"],"properties":{"exists":{"type":"boolean"},"active":{"type":"boolean"}},"example":{"exists":true,"active":false}}}}}}}}},"components":{"securitySchemes":{"CustomerPortalAuth":{"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"},"AsBrand":{"type":"apiKey","in":"header","name":"x-ivy-brand-id","description":"Set brand 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"},"ContactId":{"type":"string"},"PortalUserId":{"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"}}},"PortalConfig":{"type":"object","properties":{"auth_config":{"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"]}}},"ErrorResp":{"type":"object","properties":{"message":{"type":"string"}}},"AddPortalResp":{"type":"object","properties":{"message":{"type":"string"}}},"Brand":{"type":"object","properties":{"id":{"type":"string","example":12454},"organization_id":{"type":"string","example":66},"design_id":{"type":"string","example":3134},"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"}}},"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}},"Contact":{"type":"object","properties":{"customer_number":{"type":"string","example":12454},"first_name":{"type":"string","example":"xyz"},"last_name":{"type":"string","example":"xyz"},"title":{"type":"string","example":"xyz"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}},"phone":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","example":"+1 123"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}},"PortalUser":{"type":"object","properties":{"user_number":{"type":"string","example":12454},"mapped_contact":{"type":"string","example":"xyz"},"mapping_status":{"type":"boolean","example":true},"registration_status":{"type":"string","example":"user_created"},"org_id":{"type":"string","example":123},"brand_id":{"type":"string","example":789},"user_pool_id":{"type":"string","example":"eu-central-1_AJ183HA10"},"clientId":{"type":"string","example":"aj123jfoavnashf2fj"},"email":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","example":"xyz@asd.com"},"_tags":{"type":"array","items":{"type":"string","example":"primary"}}}}}}}}}}')}},t={};return function r(s){if(t[s])return t[s].exports;var i=t[s]={exports:{}};return e[s].call(i.exports,i,i.exports,r),i.exports}(914)})()); |
@@ -99,3 +99,3 @@ /* eslint-disable */ | ||
email?: string; | ||
tags?: string[]; | ||
_tags?: string[]; | ||
}[]; | ||
@@ -108,3 +108,3 @@ phone?: { | ||
phone?: string; | ||
tags?: string[]; | ||
_tags?: string[]; | ||
}[]; | ||
@@ -167,2 +167,7 @@ } | ||
user_pool_id?: string; | ||
/** | ||
* example: | ||
* aj123jfoavnashf2fj | ||
*/ | ||
clientId?: string; | ||
email?: { | ||
@@ -174,3 +179,3 @@ /** | ||
email?: string; | ||
tags?: string[]; | ||
_tags?: string[]; | ||
}[]; | ||
@@ -205,2 +210,21 @@ } | ||
} | ||
namespace ConfirmUser { | ||
namespace Parameters { | ||
export type Id = Components.Schemas.PortalUserId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
export interface PathParameters { | ||
id: Parameters.Id; | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.PortalUser; | ||
} | ||
} | ||
namespace CreatePortal { | ||
@@ -240,3 +264,3 @@ export interface RequestBody { | ||
* example: | ||
* email@test.com | ||
* testemail921@yopmail.com | ||
*/ | ||
@@ -246,5 +270,25 @@ email?: string; | ||
* example: | ||
* example.com | ||
* Pass1234! | ||
*/ | ||
domain?: string; | ||
password?: string; | ||
/** | ||
* example: | ||
* 728 | ||
*/ | ||
orgId?: string; | ||
/** | ||
* example: | ||
* eu-central-1_391JDA1HFO | ||
*/ | ||
userPoolId?: string; | ||
/** | ||
* example: | ||
* aj123jfoavnashf2fj | ||
*/ | ||
clientId?: string; | ||
/** | ||
* example: | ||
* 123456 | ||
*/ | ||
brandId?: string; | ||
} | ||
@@ -261,2 +305,7 @@ namespace Responses { | ||
export type Id = Components.Schemas.ContactId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
@@ -266,2 +315,5 @@ export interface PathParameters { | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
@@ -310,2 +362,7 @@ export type $200 = Components.Schemas.Contact; | ||
export type Id = Components.Schemas.PortalUserId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
@@ -315,2 +372,5 @@ export interface PathParameters { | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
@@ -323,2 +383,7 @@ export type $200 = Components.Schemas.PortalUser; | ||
export type Id = Components.Schemas.ContactId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
@@ -328,2 +393,5 @@ export interface PathParameters { | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
export type RequestBody = Components.Schemas.Contact; | ||
@@ -425,3 +493,3 @@ namespace Responses { | ||
'getContact'( | ||
parameters?: Parameters<Paths.GetContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetContact.PathParameters & Paths.GetContact.QueryParameters> | null, | ||
data?: any, | ||
@@ -436,3 +504,3 @@ config?: AxiosRequestConfig | ||
'updateContact'( | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters & Paths.UpdateContact.QueryParameters> | null, | ||
data?: Paths.UpdateContact.RequestBody, | ||
@@ -447,3 +515,3 @@ config?: AxiosRequestConfig | ||
'getPortalUser'( | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters & Paths.GetPortalUser.QueryParameters> | null, | ||
data?: any, | ||
@@ -453,2 +521,12 @@ config?: AxiosRequestConfig | ||
/** | ||
* confirmUser - confirmUser | ||
* | ||
* TODO | ||
*/ | ||
'confirmUser'( | ||
parameters?: Parameters<Paths.ConfirmUser.PathParameters & Paths.ConfirmUser.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.ConfirmUser.Responses.$200> | ||
/** | ||
* userExists - userExists | ||
@@ -545,3 +623,3 @@ * | ||
'get'( | ||
parameters?: Parameters<Paths.GetContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetContact.PathParameters & Paths.GetContact.QueryParameters> | null, | ||
data?: any, | ||
@@ -556,3 +634,3 @@ config?: AxiosRequestConfig | ||
'patch'( | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters & Paths.UpdateContact.QueryParameters> | null, | ||
data?: Paths.UpdateContact.RequestBody, | ||
@@ -569,3 +647,3 @@ config?: AxiosRequestConfig | ||
'get'( | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters & Paths.GetPortalUser.QueryParameters> | null, | ||
data?: any, | ||
@@ -575,2 +653,14 @@ config?: AxiosRequestConfig | ||
} | ||
['/v1/customer-portal/user/confirm/{id}']: { | ||
/** | ||
* confirmUser - confirmUser | ||
* | ||
* TODO | ||
*/ | ||
'get'( | ||
parameters?: Parameters<Paths.ConfirmUser.PathParameters & Paths.ConfirmUser.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.ConfirmUser.Responses.$200> | ||
} | ||
['/v1/customer-portal/public/register/exists']: { | ||
@@ -577,0 +667,0 @@ /** |
{ | ||
"name": "@epilot/customer-portal-client", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "API Client for epilot customer-portal API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -99,3 +99,3 @@ /* eslint-disable */ | ||
email?: string; | ||
tags?: string[]; | ||
_tags?: string[]; | ||
}[]; | ||
@@ -108,3 +108,3 @@ phone?: { | ||
phone?: string; | ||
tags?: string[]; | ||
_tags?: string[]; | ||
}[]; | ||
@@ -167,2 +167,7 @@ } | ||
user_pool_id?: string; | ||
/** | ||
* example: | ||
* aj123jfoavnashf2fj | ||
*/ | ||
clientId?: string; | ||
email?: { | ||
@@ -174,3 +179,3 @@ /** | ||
email?: string; | ||
tags?: string[]; | ||
_tags?: string[]; | ||
}[]; | ||
@@ -205,2 +210,21 @@ } | ||
} | ||
namespace ConfirmUser { | ||
namespace Parameters { | ||
export type Id = Components.Schemas.PortalUserId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
export interface PathParameters { | ||
id: Parameters.Id; | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.PortalUser; | ||
} | ||
} | ||
namespace CreatePortal { | ||
@@ -240,3 +264,3 @@ export interface RequestBody { | ||
* example: | ||
* email@test.com | ||
* testemail921@yopmail.com | ||
*/ | ||
@@ -246,5 +270,25 @@ email?: string; | ||
* example: | ||
* example.com | ||
* Pass1234! | ||
*/ | ||
domain?: string; | ||
password?: string; | ||
/** | ||
* example: | ||
* 728 | ||
*/ | ||
orgId?: string; | ||
/** | ||
* example: | ||
* eu-central-1_391JDA1HFO | ||
*/ | ||
userPoolId?: string; | ||
/** | ||
* example: | ||
* aj123jfoavnashf2fj | ||
*/ | ||
clientId?: string; | ||
/** | ||
* example: | ||
* 123456 | ||
*/ | ||
brandId?: string; | ||
} | ||
@@ -261,2 +305,7 @@ namespace Responses { | ||
export type Id = Components.Schemas.ContactId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
@@ -266,2 +315,5 @@ export interface PathParameters { | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
@@ -310,2 +362,7 @@ export type $200 = Components.Schemas.Contact; | ||
export type Id = Components.Schemas.PortalUserId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
@@ -315,2 +372,5 @@ export interface PathParameters { | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
@@ -323,2 +383,7 @@ export type $200 = Components.Schemas.PortalUser; | ||
export type Id = Components.Schemas.ContactId; | ||
/** | ||
* example: | ||
* 123 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
@@ -328,2 +393,5 @@ export interface PathParameters { | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
} | ||
export type RequestBody = Components.Schemas.Contact; | ||
@@ -425,3 +493,3 @@ namespace Responses { | ||
'getContact'( | ||
parameters?: Parameters<Paths.GetContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetContact.PathParameters & Paths.GetContact.QueryParameters> | null, | ||
data?: any, | ||
@@ -436,3 +504,3 @@ config?: AxiosRequestConfig | ||
'updateContact'( | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters & Paths.UpdateContact.QueryParameters> | null, | ||
data?: Paths.UpdateContact.RequestBody, | ||
@@ -447,3 +515,3 @@ config?: AxiosRequestConfig | ||
'getPortalUser'( | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters & Paths.GetPortalUser.QueryParameters> | null, | ||
data?: any, | ||
@@ -453,2 +521,12 @@ config?: AxiosRequestConfig | ||
/** | ||
* confirmUser - confirmUser | ||
* | ||
* TODO | ||
*/ | ||
'confirmUser'( | ||
parameters?: Parameters<Paths.ConfirmUser.PathParameters & Paths.ConfirmUser.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.ConfirmUser.Responses.$200> | ||
/** | ||
* userExists - userExists | ||
@@ -545,3 +623,3 @@ * | ||
'get'( | ||
parameters?: Parameters<Paths.GetContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetContact.PathParameters & Paths.GetContact.QueryParameters> | null, | ||
data?: any, | ||
@@ -556,3 +634,3 @@ config?: AxiosRequestConfig | ||
'patch'( | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters> | null, | ||
parameters?: Parameters<Paths.UpdateContact.PathParameters & Paths.UpdateContact.QueryParameters> | null, | ||
data?: Paths.UpdateContact.RequestBody, | ||
@@ -569,3 +647,3 @@ config?: AxiosRequestConfig | ||
'get'( | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetPortalUser.PathParameters & Paths.GetPortalUser.QueryParameters> | null, | ||
data?: any, | ||
@@ -575,2 +653,14 @@ config?: AxiosRequestConfig | ||
} | ||
['/v1/customer-portal/user/confirm/{id}']: { | ||
/** | ||
* confirmUser - confirmUser | ||
* | ||
* TODO | ||
*/ | ||
'get'( | ||
parameters?: Parameters<Paths.ConfirmUser.PathParameters & Paths.ConfirmUser.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.ConfirmUser.Responses.$200> | ||
} | ||
['/v1/customer-portal/public/register/exists']: { | ||
@@ -577,0 +667,0 @@ /** |
52855
1343