@epilot/customer-portal-client 0.2.4 → 0.2.5

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 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)})());
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)})());
package/dist/openapi.d.ts CHANGED
@@ -69,6 +69,45 @@ declare namespace Components {
69
69
  };
70
70
  config?: string;
71
71
  }
72
+ export interface Contact {
73
+ /**
74
+ * example:
75
+ * 12454
76
+ */
77
+ customer_number?: string;
78
+ /**
79
+ * example:
80
+ * xyz
81
+ */
82
+ first_name?: string;
83
+ /**
84
+ * example:
85
+ * xyz
86
+ */
87
+ last_name?: string;
88
+ /**
89
+ * example:
90
+ * xyz
91
+ */
92
+ title?: string;
93
+ email?: {
94
+ /**
95
+ * example:
96
+ * xyz@asd.com
97
+ */
98
+ email?: string;
99
+ tags?: string[];
100
+ }[];
101
+ phone?: {
102
+ /**
103
+ * example:
104
+ * +1 123
105
+ */
106
+ phone?: string;
107
+ tags?: string[];
108
+ }[];
109
+ }
110
+ export type ContactId = string;
72
111
  export interface ErrorResp {
73
112
  message?: string;
74
113
  }
@@ -87,6 +126,52 @@ declare namespace Components {
87
126
  export interface PortalConfig {
88
127
  auth_config?: AuthConfig;
89
128
  }
129
+ export interface PortalUser {
130
+ /**
131
+ * example:
132
+ * 12454
133
+ */
134
+ user_number?: string;
135
+ /**
136
+ * example:
137
+ * xyz
138
+ */
139
+ mapped_contact?: string;
140
+ /**
141
+ * example:
142
+ * true
143
+ */
144
+ mapping_status?: boolean;
145
+ /**
146
+ * example:
147
+ * user_created
148
+ */
149
+ registration_status?: string;
150
+ /**
151
+ * example:
152
+ * 123
153
+ */
154
+ org_id?: string;
155
+ /**
156
+ * example:
157
+ * 789
158
+ */
159
+ brand_id?: string;
160
+ /**
161
+ * example:
162
+ * eu-central-1_AJ183HA10
163
+ */
164
+ user_pool_id?: string;
165
+ email?: {
166
+ /**
167
+ * example:
168
+ * xyz@asd.com
169
+ */
170
+ email?: string;
171
+ tags?: string[];
172
+ }[];
173
+ }
174
+ export type PortalUserId = string;
90
175
  export interface UserActivationPayload {
91
176
  /**
92
177
  * User's display name (default: email address)
@@ -163,27 +248,15 @@ declare namespace Paths {
163
248
  export type $500 = Components.Schemas.ErrorResp;
164
249
  }
165
250
  }
166
- namespace GetCustomerInfo {
251
+ namespace GetContact {
252
+ namespace Parameters {
253
+ export type Id = Components.Schemas.ContactId;
254
+ }
255
+ export interface PathParameters {
256
+ id: Parameters.Id;
257
+ }
167
258
  namespace Responses {
168
- export interface $200 {
169
- address?: {
170
- /**
171
- * example:
172
- * Melatengurtel
173
- */
174
- street?: string;
175
- /**
176
- * example:
177
- * 71
178
- */
179
- street_number?: string;
180
- /**
181
- * example:
182
- * Koln
183
- */
184
- city?: string;
185
- };
186
- }
259
+ export type $200 = Components.Schemas.Contact;
187
260
  }
188
261
  }
189
262
  namespace GetPortalConfig {
@@ -222,6 +295,29 @@ declare namespace Paths {
222
295
  export type $200 = Components.Schemas.Brand;
223
296
  }
224
297
  }
298
+ namespace GetPortalUser {
299
+ namespace Parameters {
300
+ export type Id = Components.Schemas.PortalUserId;
301
+ }
302
+ export interface PathParameters {
303
+ id: Parameters.Id;
304
+ }
305
+ namespace Responses {
306
+ export type $200 = Components.Schemas.PortalUser;
307
+ }
308
+ }
309
+ namespace UpdateContact {
310
+ namespace Parameters {
311
+ export type Id = Components.Schemas.ContactId;
312
+ }
313
+ export interface PathParameters {
314
+ id: Parameters.Id;
315
+ }
316
+ export type RequestBody = Components.Schemas.Contact;
317
+ namespace Responses {
318
+ export type $200 = Components.Schemas.Contact;
319
+ }
320
+ }
225
321
  namespace UserExists {
226
322
  namespace Parameters {
227
323
  /**
@@ -308,15 +404,35 @@ export interface OperationMethods {
308
404
  config?: AxiosRequestConfig
309
405
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
310
406
  /**
311
- * getCustomerInfo - getCustomerInfo
407
+ * getContact - getContact
408
+ *
409
+ * Get the Contact by id
410
+ */
411
+ 'getContact'(
412
+ parameters?: Parameters<Paths.GetContact.PathParameters> | null,
413
+ data?: any,
414
+ config?: AxiosRequestConfig
415
+ ): OperationResponse<Paths.GetContact.Responses.$200>
416
+ /**
417
+ * updateContact - updateContact
418
+ *
419
+ * Update the contact details
420
+ */
421
+ 'updateContact'(
422
+ parameters?: Parameters<Paths.UpdateContact.PathParameters> | null,
423
+ data?: Paths.UpdateContact.RequestBody,
424
+ config?: AxiosRequestConfig
425
+ ): OperationResponse<Paths.UpdateContact.Responses.$200>
426
+ /**
427
+ * getPortalUser - getPortalUser
312
428
  *
313
429
  * TODO
314
430
  */
315
- 'getCustomerInfo'(
316
- parameters?: Parameters<UnknownParamsObject> | null,
431
+ 'getPortalUser'(
432
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
317
433
  data?: any,
318
434
  config?: AxiosRequestConfig
319
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
435
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
320
436
  /**
321
437
  * userExists - userExists
322
438
  *
@@ -402,17 +518,39 @@ export interface PathsDictionary {
402
518
  config?: AxiosRequestConfig
403
519
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
404
520
  }
405
- ['/v1/customer-portal/info']: {
521
+ ['/v1/customer-portal/contact/{id}']: {
522
+ /**
523
+ * getContact - getContact
524
+ *
525
+ * Get the Contact by id
526
+ */
527
+ 'get'(
528
+ parameters?: Parameters<Paths.GetContact.PathParameters> | null,
529
+ data?: any,
530
+ config?: AxiosRequestConfig
531
+ ): OperationResponse<Paths.GetContact.Responses.$200>
532
+ /**
533
+ * updateContact - updateContact
534
+ *
535
+ * Update the contact details
536
+ */
537
+ 'patch'(
538
+ parameters?: Parameters<Paths.UpdateContact.PathParameters> | null,
539
+ data?: Paths.UpdateContact.RequestBody,
540
+ config?: AxiosRequestConfig
541
+ ): OperationResponse<Paths.UpdateContact.Responses.$200>
542
+ }
543
+ ['/v1/customer-portal/user/{id}']: {
406
544
  /**
407
- * getCustomerInfo - getCustomerInfo
545
+ * getPortalUser - getPortalUser
408
546
  *
409
547
  * TODO
410
548
  */
411
549
  'get'(
412
- parameters?: Parameters<UnknownParamsObject> | null,
550
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
413
551
  data?: any,
414
552
  config?: AxiosRequestConfig
415
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
553
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
416
554
  }
417
555
  ['/v1/customer-portal/public/register/exists']: {
418
556
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/customer-portal-client",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
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
@@ -69,6 +69,45 @@ declare namespace Components {
69
69
  };
70
70
  config?: string;
71
71
  }
72
+ export interface Contact {
73
+ /**
74
+ * example:
75
+ * 12454
76
+ */
77
+ customer_number?: string;
78
+ /**
79
+ * example:
80
+ * xyz
81
+ */
82
+ first_name?: string;
83
+ /**
84
+ * example:
85
+ * xyz
86
+ */
87
+ last_name?: string;
88
+ /**
89
+ * example:
90
+ * xyz
91
+ */
92
+ title?: string;
93
+ email?: {
94
+ /**
95
+ * example:
96
+ * xyz@asd.com
97
+ */
98
+ email?: string;
99
+ tags?: string[];
100
+ }[];
101
+ phone?: {
102
+ /**
103
+ * example:
104
+ * +1 123
105
+ */
106
+ phone?: string;
107
+ tags?: string[];
108
+ }[];
109
+ }
110
+ export type ContactId = string;
72
111
  export interface ErrorResp {
73
112
  message?: string;
74
113
  }
@@ -87,6 +126,52 @@ declare namespace Components {
87
126
  export interface PortalConfig {
88
127
  auth_config?: AuthConfig;
89
128
  }
129
+ export interface PortalUser {
130
+ /**
131
+ * example:
132
+ * 12454
133
+ */
134
+ user_number?: string;
135
+ /**
136
+ * example:
137
+ * xyz
138
+ */
139
+ mapped_contact?: string;
140
+ /**
141
+ * example:
142
+ * true
143
+ */
144
+ mapping_status?: boolean;
145
+ /**
146
+ * example:
147
+ * user_created
148
+ */
149
+ registration_status?: string;
150
+ /**
151
+ * example:
152
+ * 123
153
+ */
154
+ org_id?: string;
155
+ /**
156
+ * example:
157
+ * 789
158
+ */
159
+ brand_id?: string;
160
+ /**
161
+ * example:
162
+ * eu-central-1_AJ183HA10
163
+ */
164
+ user_pool_id?: string;
165
+ email?: {
166
+ /**
167
+ * example:
168
+ * xyz@asd.com
169
+ */
170
+ email?: string;
171
+ tags?: string[];
172
+ }[];
173
+ }
174
+ export type PortalUserId = string;
90
175
  export interface UserActivationPayload {
91
176
  /**
92
177
  * User's display name (default: email address)
@@ -163,27 +248,15 @@ declare namespace Paths {
163
248
  export type $500 = Components.Schemas.ErrorResp;
164
249
  }
165
250
  }
166
- namespace GetCustomerInfo {
251
+ namespace GetContact {
252
+ namespace Parameters {
253
+ export type Id = Components.Schemas.ContactId;
254
+ }
255
+ export interface PathParameters {
256
+ id: Parameters.Id;
257
+ }
167
258
  namespace Responses {
168
- export interface $200 {
169
- address?: {
170
- /**
171
- * example:
172
- * Melatengurtel
173
- */
174
- street?: string;
175
- /**
176
- * example:
177
- * 71
178
- */
179
- street_number?: string;
180
- /**
181
- * example:
182
- * Koln
183
- */
184
- city?: string;
185
- };
186
- }
259
+ export type $200 = Components.Schemas.Contact;
187
260
  }
188
261
  }
189
262
  namespace GetPortalConfig {
@@ -222,6 +295,29 @@ declare namespace Paths {
222
295
  export type $200 = Components.Schemas.Brand;
223
296
  }
224
297
  }
298
+ namespace GetPortalUser {
299
+ namespace Parameters {
300
+ export type Id = Components.Schemas.PortalUserId;
301
+ }
302
+ export interface PathParameters {
303
+ id: Parameters.Id;
304
+ }
305
+ namespace Responses {
306
+ export type $200 = Components.Schemas.PortalUser;
307
+ }
308
+ }
309
+ namespace UpdateContact {
310
+ namespace Parameters {
311
+ export type Id = Components.Schemas.ContactId;
312
+ }
313
+ export interface PathParameters {
314
+ id: Parameters.Id;
315
+ }
316
+ export type RequestBody = Components.Schemas.Contact;
317
+ namespace Responses {
318
+ export type $200 = Components.Schemas.Contact;
319
+ }
320
+ }
225
321
  namespace UserExists {
226
322
  namespace Parameters {
227
323
  /**
@@ -308,15 +404,35 @@ export interface OperationMethods {
308
404
  config?: AxiosRequestConfig
309
405
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
310
406
  /**
311
- * getCustomerInfo - getCustomerInfo
407
+ * getContact - getContact
408
+ *
409
+ * Get the Contact by id
410
+ */
411
+ 'getContact'(
412
+ parameters?: Parameters<Paths.GetContact.PathParameters> | null,
413
+ data?: any,
414
+ config?: AxiosRequestConfig
415
+ ): OperationResponse<Paths.GetContact.Responses.$200>
416
+ /**
417
+ * updateContact - updateContact
418
+ *
419
+ * Update the contact details
420
+ */
421
+ 'updateContact'(
422
+ parameters?: Parameters<Paths.UpdateContact.PathParameters> | null,
423
+ data?: Paths.UpdateContact.RequestBody,
424
+ config?: AxiosRequestConfig
425
+ ): OperationResponse<Paths.UpdateContact.Responses.$200>
426
+ /**
427
+ * getPortalUser - getPortalUser
312
428
  *
313
429
  * TODO
314
430
  */
315
- 'getCustomerInfo'(
316
- parameters?: Parameters<UnknownParamsObject> | null,
431
+ 'getPortalUser'(
432
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
317
433
  data?: any,
318
434
  config?: AxiosRequestConfig
319
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
435
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
320
436
  /**
321
437
  * userExists - userExists
322
438
  *
@@ -402,17 +518,39 @@ export interface PathsDictionary {
402
518
  config?: AxiosRequestConfig
403
519
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
404
520
  }
405
- ['/v1/customer-portal/info']: {
521
+ ['/v1/customer-portal/contact/{id}']: {
522
+ /**
523
+ * getContact - getContact
524
+ *
525
+ * Get the Contact by id
526
+ */
527
+ 'get'(
528
+ parameters?: Parameters<Paths.GetContact.PathParameters> | null,
529
+ data?: any,
530
+ config?: AxiosRequestConfig
531
+ ): OperationResponse<Paths.GetContact.Responses.$200>
532
+ /**
533
+ * updateContact - updateContact
534
+ *
535
+ * Update the contact details
536
+ */
537
+ 'patch'(
538
+ parameters?: Parameters<Paths.UpdateContact.PathParameters> | null,
539
+ data?: Paths.UpdateContact.RequestBody,
540
+ config?: AxiosRequestConfig
541
+ ): OperationResponse<Paths.UpdateContact.Responses.$200>
542
+ }
543
+ ['/v1/customer-portal/user/{id}']: {
406
544
  /**
407
- * getCustomerInfo - getCustomerInfo
545
+ * getPortalUser - getPortalUser
408
546
  *
409
547
  * TODO
410
548
  */
411
549
  'get'(
412
- parameters?: Parameters<UnknownParamsObject> | null,
550
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
413
551
  data?: any,
414
552
  config?: AxiosRequestConfig
415
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
553
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
416
554
  }
417
555
  ['/v1/customer-portal/public/register/exists']: {
418
556
  /**