@epilot/customer-portal-client 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){for(var 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 o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(r(279));t.default=s.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","tags":["mock"],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userpool_name":{"type":"string","example":"testing-pool"},"config":{"type":"object","properties":{"domain":{"type":"string","example":"example.com"},"styleId":{"type":"string","example":"af1198c0-3a9b-11eb-b62d-0ff2447a94d8"}}}}}}}},"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":"domain","required":true,"schema":{"type":"string","example":"exmaple.com"}}],"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(o){if(t[o])return t[o].exports;var s=t[o]={exports:{}};return e[o].call(s.exports,s,s.exports,r),s.exports}(914)})());
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","tags":["mock"],"requestBody":{"description":"Portal payload","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userpool_name":{"type":"string","example":"testing-pool"},"brandId":{"type":"string","example":"testing-pool"},"config":{"type":"object","properties":{"domain":{"type":"string","example":"example.com"},"styleId":{"type":"string","example":"af1198c0-3a9b-11eb-b62d-0ff2447a94d8"}}}}}}}},"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":{"theme":{"type":"string"},"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":{"theme":{"type":"string"},"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)})());
package/dist/openapi.d.ts CHANGED
@@ -49,6 +49,7 @@ declare namespace Components {
49
49
  active?: boolean;
50
50
  }
51
51
  export interface PortalConfig {
52
+ theme?: string;
52
53
  auth_config?: AuthConfig;
53
54
  }
54
55
  }
@@ -61,6 +62,11 @@ declare namespace Paths {
61
62
  * testing-pool
62
63
  */
63
64
  userpool_name?: string;
65
+ /**
66
+ * example:
67
+ * testing-pool
68
+ */
69
+ brandId?: string;
64
70
  config?: {
65
71
  /**
66
72
  * example:
@@ -108,12 +114,12 @@ declare namespace Paths {
108
114
  namespace Parameters {
109
115
  /**
110
116
  * example:
111
- * exmaple.com
117
+ * 739224
112
118
  */
113
- export type Domain = string;
119
+ export type OrgId = string;
114
120
  }
115
121
  export interface QueryParameters {
116
- domain: Parameters.Domain;
122
+ orgId: Parameters.OrgId;
117
123
  }
118
124
  namespace Responses {
119
125
  export type $200 = Components.Schemas.PortalConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/customer-portal-client",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "API Client for epilot customer-portal API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/openapi.d.ts CHANGED
@@ -49,6 +49,7 @@ declare namespace Components {
49
49
  active?: boolean;
50
50
  }
51
51
  export interface PortalConfig {
52
+ theme?: string;
52
53
  auth_config?: AuthConfig;
53
54
  }
54
55
  }
@@ -61,6 +62,11 @@ declare namespace Paths {
61
62
  * testing-pool
62
63
  */
63
64
  userpool_name?: string;
65
+ /**
66
+ * example:
67
+ * testing-pool
68
+ */
69
+ brandId?: string;
64
70
  config?: {
65
71
  /**
66
72
  * example:
@@ -108,12 +114,12 @@ declare namespace Paths {
108
114
  namespace Parameters {
109
115
  /**
110
116
  * example:
111
- * exmaple.com
117
+ * 739224
112
118
  */
113
- export type Domain = string;
119
+ export type OrgId = string;
114
120
  }
115
121
  export interface QueryParameters {
116
- domain: Parameters.Domain;
122
+ orgId: Parameters.OrgId;
117
123
  }
118
124
  namespace Responses {
119
125
  export type $200 = Components.Schemas.PortalConfig;