@epilot/customer-portal-client
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -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 o=s(r(279));t.default=o.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":"mock","description":"Mock endpoints"}],"security":[{"CustomerPortalAuth":[]},{"AsOrganization":[]},{"AsBrand":[]},{"AsCustomer":[]}],"paths":{"/v1/customer-portal/auth":{"get":{"operationId":"testAuth","summary":"testAuth","description":"TODO","tags":["mock"],"responses":{"200":{"description":"ok"}}}},"/v1/customer-portal/portal":{"post":{"operationId":"createPortal","summary":"creates a portal","description":"Creates a portal and db item","security":[{"EpilotAuth":[]}],"tags":["mock"],"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/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"TODO","tags":["mock"],"security":[],"parameters":[{"in":"query","name":"orgId","required":true,"schema":{"type":"string","example":739224}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"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"]}}}}}}}}},"/v1/customer-portal/info":{"get":{"operationId":"getCustomerInfo","summary":"getCustomerInfo","description":"TODO","tags":["mock"],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"object","properties":{"street":{"type":"string","example":"Melatengurtel"},"street_number":{"type":"string","example":"71"},"city":{"type":"string","example":"Koln"}}}}}}}}}}},"/v1/customer-portal/public/register/exists":{"get":{"operationId":"userExists","summary":"userExists","description":"Checks whether a user exists in the customer portal","tags":["mock"],"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":{"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"}}},"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}}}}}')}},t={};return function r(s){if(t[s])return t[s].exports;var o=t[s]={exports:{}};return e[s].call(o.exports,o,o.exports,r),o.exports}(914)})()); | ||
!function(e,t){for(var s in t)e[s]=t[s];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,s){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(s(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/info":{"get":{"operationId":"getCustomerInfo","summary":"getCustomerInfo","description":"TODO","tags":["ECP"],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"object","properties":{"street":{"type":"string","example":"Melatengurtel"},"street_number":{"type":"string","example":"71"},"city":{"type":"string","example":"Koln"}}}}}}}}}}},"/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"},"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}}}}}')}},t={};return function s(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,s),i.exports}(914)})()); |
@@ -37,2 +37,37 @@ /* eslint-disable */ | ||
} | ||
export interface Brand { | ||
/** | ||
* example: | ||
* 12454 | ||
*/ | ||
id?: string; | ||
/** | ||
* example: | ||
* 66 | ||
*/ | ||
organization_id?: string; | ||
/** | ||
* example: | ||
* 3134 | ||
*/ | ||
design_id?: string; | ||
cognito_details?: { | ||
/** | ||
* example: | ||
* 6bsd0jkgoie74k2i8mrhc1vest | ||
*/ | ||
cognito_user_pool_client_id?: string; | ||
/** | ||
* example: | ||
* arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341 | ||
*/ | ||
cognito_user_pool_arn?: string; | ||
/** | ||
* example: | ||
* eu-central-1_CUEQRNbUb | ||
*/ | ||
cognito_user_pool_id?: string; | ||
}; | ||
config?: string; | ||
} | ||
export interface ErrorResp { | ||
@@ -52,8 +87,32 @@ message?: string; | ||
} | ||
export type InviteToken = string; | ||
export interface PortalConfig { | ||
auth_config?: AuthConfig; | ||
} | ||
export interface UserActivationPayload { | ||
/** | ||
* User's display name (default: email address) | ||
* example: | ||
* Example User | ||
*/ | ||
display_name?: string; | ||
/** | ||
* User's password | ||
* example: | ||
* AKjhdakjsdh@!34 | ||
*/ | ||
password?: string; | ||
} | ||
} | ||
} | ||
declare namespace Paths { | ||
namespace ActivateUser { | ||
namespace Parameters { | ||
export type Token = Components.Schemas.InviteToken; | ||
} | ||
export interface QueryParameters { | ||
token: Parameters.Token; | ||
} | ||
export type RequestBody = Components.Schemas.UserActivationPayload; | ||
} | ||
namespace CreatePortal { | ||
@@ -89,2 +148,22 @@ export interface RequestBody { | ||
} | ||
namespace CreateUser { | ||
export interface RequestBody { | ||
/** | ||
* example: | ||
* email@test.com | ||
*/ | ||
email?: string; | ||
/** | ||
* example: | ||
* example.com | ||
*/ | ||
domain?: string; | ||
} | ||
namespace Responses { | ||
export type $201 = Components.Schemas.AddPortalResp; | ||
export type $400 = Components.Schemas.ErrorResp; | ||
export type $401 = Components.Schemas.ErrorResp; | ||
export type $500 = Components.Schemas.ErrorResp; | ||
} | ||
} | ||
namespace GetCustomerInfo { | ||
@@ -117,13 +196,34 @@ namespace Responses { | ||
* example: | ||
* 739224 | ||
* 12324 | ||
*/ | ||
export type BrandId = string; | ||
/** | ||
* example: | ||
* 2342 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
brand_id: Parameters.BrandId; | ||
org_id: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.PortalConfig; | ||
export type $200 = Components.Schemas.Brand; | ||
} | ||
} | ||
namespace GetPortalConfigByDomain { | ||
namespace Parameters { | ||
/** | ||
* example: | ||
* example.com | ||
*/ | ||
export type Domain = string; | ||
} | ||
export interface QueryParameters { | ||
domain: Parameters.Domain; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.Brand; | ||
} | ||
} | ||
namespace UserExists { | ||
@@ -155,2 +255,32 @@ namespace Parameters { | ||
/** | ||
* createPortal - creates a portal | ||
* | ||
* Creates a portal and db item | ||
*/ | ||
'createPortal'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
/** | ||
* createUser - creates a user | ||
* | ||
* Creates a user in cognito pool and db item | ||
*/ | ||
'createUser'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500> | ||
/** | ||
* activateUser - activateUser | ||
* | ||
* Activates the user | ||
*/ | ||
'activateUser'( | ||
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null, | ||
data?: Paths.ActivateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<any> | ||
/** | ||
* testAuth - testAuth | ||
@@ -166,11 +296,11 @@ * | ||
/** | ||
* createPortal - creates a portal | ||
* getPortalConfigByDomain - getPortalConfigByDomain | ||
* | ||
* Creates a portal and db item | ||
* TODO | ||
*/ | ||
'createPortal'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
'getPortalConfigByDomain'( | ||
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200> | ||
/** | ||
@@ -209,2 +339,38 @@ * getPortalConfig - getPortalConfig | ||
export interface PathsDictionary { | ||
['/v1/customer-portal/portal']: { | ||
/** | ||
* createPortal - creates a portal | ||
* | ||
* Creates a portal and db item | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
} | ||
['/v1/customer-portal/public/user']: { | ||
/** | ||
* createUser - creates a user | ||
* | ||
* Creates a user in cognito pool and db item | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500> | ||
} | ||
['/v1/customer-portal/public/activate']: { | ||
/** | ||
* activateUser - activateUser | ||
* | ||
* Activates the user | ||
*/ | ||
'post'( | ||
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null, | ||
data?: Paths.ActivateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<any> | ||
} | ||
['/v1/customer-portal/auth']: { | ||
@@ -222,15 +388,15 @@ /** | ||
} | ||
['/v1/customer-portal/portal']: { | ||
['/v1/customer-portal/public/config']: { | ||
/** | ||
* createPortal - creates a portal | ||
* getPortalConfigByDomain - getPortalConfigByDomain | ||
* | ||
* Creates a portal and db item | ||
* TODO | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
'get'( | ||
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200> | ||
} | ||
['/v1/customer-portal/public/config']: { | ||
['/v1/customer-portal/config']: { | ||
/** | ||
@@ -237,0 +403,0 @@ * getPortalConfig - getPortalConfig |
{ | ||
"name": "@epilot/customer-portal-client", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "API Client for epilot customer-portal API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -37,2 +37,37 @@ /* eslint-disable */ | ||
} | ||
export interface Brand { | ||
/** | ||
* example: | ||
* 12454 | ||
*/ | ||
id?: string; | ||
/** | ||
* example: | ||
* 66 | ||
*/ | ||
organization_id?: string; | ||
/** | ||
* example: | ||
* 3134 | ||
*/ | ||
design_id?: string; | ||
cognito_details?: { | ||
/** | ||
* example: | ||
* 6bsd0jkgoie74k2i8mrhc1vest | ||
*/ | ||
cognito_user_pool_client_id?: string; | ||
/** | ||
* example: | ||
* arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341 | ||
*/ | ||
cognito_user_pool_arn?: string; | ||
/** | ||
* example: | ||
* eu-central-1_CUEQRNbUb | ||
*/ | ||
cognito_user_pool_id?: string; | ||
}; | ||
config?: string; | ||
} | ||
export interface ErrorResp { | ||
@@ -52,8 +87,32 @@ message?: string; | ||
} | ||
export type InviteToken = string; | ||
export interface PortalConfig { | ||
auth_config?: AuthConfig; | ||
} | ||
export interface UserActivationPayload { | ||
/** | ||
* User's display name (default: email address) | ||
* example: | ||
* Example User | ||
*/ | ||
display_name?: string; | ||
/** | ||
* User's password | ||
* example: | ||
* AKjhdakjsdh@!34 | ||
*/ | ||
password?: string; | ||
} | ||
} | ||
} | ||
declare namespace Paths { | ||
namespace ActivateUser { | ||
namespace Parameters { | ||
export type Token = Components.Schemas.InviteToken; | ||
} | ||
export interface QueryParameters { | ||
token: Parameters.Token; | ||
} | ||
export type RequestBody = Components.Schemas.UserActivationPayload; | ||
} | ||
namespace CreatePortal { | ||
@@ -89,2 +148,22 @@ export interface RequestBody { | ||
} | ||
namespace CreateUser { | ||
export interface RequestBody { | ||
/** | ||
* example: | ||
* email@test.com | ||
*/ | ||
email?: string; | ||
/** | ||
* example: | ||
* example.com | ||
*/ | ||
domain?: string; | ||
} | ||
namespace Responses { | ||
export type $201 = Components.Schemas.AddPortalResp; | ||
export type $400 = Components.Schemas.ErrorResp; | ||
export type $401 = Components.Schemas.ErrorResp; | ||
export type $500 = Components.Schemas.ErrorResp; | ||
} | ||
} | ||
namespace GetCustomerInfo { | ||
@@ -117,13 +196,34 @@ namespace Responses { | ||
* example: | ||
* 739224 | ||
* 12324 | ||
*/ | ||
export type BrandId = string; | ||
/** | ||
* example: | ||
* 2342 | ||
*/ | ||
export type OrgId = string; | ||
} | ||
export interface QueryParameters { | ||
orgId: Parameters.OrgId; | ||
brand_id: Parameters.BrandId; | ||
org_id: Parameters.OrgId; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.PortalConfig; | ||
export type $200 = Components.Schemas.Brand; | ||
} | ||
} | ||
namespace GetPortalConfigByDomain { | ||
namespace Parameters { | ||
/** | ||
* example: | ||
* example.com | ||
*/ | ||
export type Domain = string; | ||
} | ||
export interface QueryParameters { | ||
domain: Parameters.Domain; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.Brand; | ||
} | ||
} | ||
namespace UserExists { | ||
@@ -155,2 +255,32 @@ namespace Parameters { | ||
/** | ||
* createPortal - creates a portal | ||
* | ||
* Creates a portal and db item | ||
*/ | ||
'createPortal'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
/** | ||
* createUser - creates a user | ||
* | ||
* Creates a user in cognito pool and db item | ||
*/ | ||
'createUser'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500> | ||
/** | ||
* activateUser - activateUser | ||
* | ||
* Activates the user | ||
*/ | ||
'activateUser'( | ||
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null, | ||
data?: Paths.ActivateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<any> | ||
/** | ||
* testAuth - testAuth | ||
@@ -166,11 +296,11 @@ * | ||
/** | ||
* createPortal - creates a portal | ||
* getPortalConfigByDomain - getPortalConfigByDomain | ||
* | ||
* Creates a portal and db item | ||
* TODO | ||
*/ | ||
'createPortal'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
'getPortalConfigByDomain'( | ||
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200> | ||
/** | ||
@@ -209,2 +339,38 @@ * getPortalConfig - getPortalConfig | ||
export interface PathsDictionary { | ||
['/v1/customer-portal/portal']: { | ||
/** | ||
* createPortal - creates a portal | ||
* | ||
* Creates a portal and db item | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
} | ||
['/v1/customer-portal/public/user']: { | ||
/** | ||
* createUser - creates a user | ||
* | ||
* Creates a user in cognito pool and db item | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500> | ||
} | ||
['/v1/customer-portal/public/activate']: { | ||
/** | ||
* activateUser - activateUser | ||
* | ||
* Activates the user | ||
*/ | ||
'post'( | ||
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null, | ||
data?: Paths.ActivateUser.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<any> | ||
} | ||
['/v1/customer-portal/auth']: { | ||
@@ -222,15 +388,15 @@ /** | ||
} | ||
['/v1/customer-portal/portal']: { | ||
['/v1/customer-portal/public/config']: { | ||
/** | ||
* createPortal - creates a portal | ||
* getPortalConfigByDomain - getPortalConfigByDomain | ||
* | ||
* Creates a portal and db item | ||
* TODO | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreatePortal.RequestBody, | ||
'get'( | ||
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500> | ||
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200> | ||
} | ||
['/v1/customer-portal/public/config']: { | ||
['/v1/customer-portal/config']: { | ||
/** | ||
@@ -237,0 +403,0 @@ * getPortalConfig - getPortalConfig |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35905
887