@epilot/customer-portal-client 0.2.2 → 0.2.3

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 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)})());
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)})());
package/dist/openapi.d.ts CHANGED
@@ -49,7 +49,6 @@ declare namespace Components {
49
49
  active?: boolean;
50
50
  }
51
51
  export interface PortalConfig {
52
- theme?: string;
53
52
  auth_config?: AuthConfig;
54
53
  }
55
54
  }
@@ -61,24 +60,22 @@ declare namespace Paths {
61
60
  * example:
62
61
  * testing-pool
63
62
  */
64
- userpool_name?: string;
63
+ id?: string;
65
64
  /**
66
65
  * example:
67
- * testing-pool
66
+ * 15434
67
+ */
68
+ organization_id?: string;
69
+ /**
70
+ * example:
71
+ * example.com
72
+ */
73
+ domain?: string;
74
+ /**
75
+ * example:
76
+ * 123e4567-e89b-12d3-a456-426614174000
68
77
  */
69
- brandId?: string;
70
- config?: {
71
- /**
72
- * example:
73
- * example.com
74
- */
75
- domain?: string;
76
- /**
77
- * example:
78
- * af1198c0-3a9b-11eb-b62d-0ff2447a94d8
79
- */
80
- styleId?: string;
81
- };
78
+ design_id?: string;
82
79
  }
83
80
  namespace Responses {
84
81
  export type $201 = Components.Schemas.AddPortalResp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/customer-portal-client",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
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,7 +49,6 @@ declare namespace Components {
49
49
  active?: boolean;
50
50
  }
51
51
  export interface PortalConfig {
52
- theme?: string;
53
52
  auth_config?: AuthConfig;
54
53
  }
55
54
  }
@@ -61,24 +60,22 @@ declare namespace Paths {
61
60
  * example:
62
61
  * testing-pool
63
62
  */
64
- userpool_name?: string;
63
+ id?: string;
65
64
  /**
66
65
  * example:
67
- * testing-pool
66
+ * 15434
67
+ */
68
+ organization_id?: string;
69
+ /**
70
+ * example:
71
+ * example.com
72
+ */
73
+ domain?: string;
74
+ /**
75
+ * example:
76
+ * 123e4567-e89b-12d3-a456-426614174000
68
77
  */
69
- brandId?: string;
70
- config?: {
71
- /**
72
- * example:
73
- * example.com
74
- */
75
- domain?: string;
76
- /**
77
- * example:
78
- * af1198c0-3a9b-11eb-b62d-0ff2447a94d8
79
- */
80
- styleId?: string;
81
- };
78
+ design_id?: string;
82
79
  }
83
80
  namespace Responses {
84
81
  export type $201 = Components.Schemas.AddPortalResp;