@epilot/customer-portal-client 0.2.3 → 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 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)})());
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
@@ -34,6 +34,80 @@ declare namespace Components {
34
34
  */
35
35
  portal_id: string;
36
36
  }
37
+ export interface Brand {
38
+ /**
39
+ * example:
40
+ * 12454
41
+ */
42
+ id?: string;
43
+ /**
44
+ * example:
45
+ * 66
46
+ */
47
+ organization_id?: string;
48
+ /**
49
+ * example:
50
+ * 3134
51
+ */
52
+ design_id?: string;
53
+ cognito_details?: {
54
+ /**
55
+ * example:
56
+ * 6bsd0jkgoie74k2i8mrhc1vest
57
+ */
58
+ cognito_user_pool_client_id?: string;
59
+ /**
60
+ * example:
61
+ * arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341
62
+ */
63
+ cognito_user_pool_arn?: string;
64
+ /**
65
+ * example:
66
+ * eu-central-1_CUEQRNbUb
67
+ */
68
+ cognito_user_pool_id?: string;
69
+ };
70
+ config?: string;
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;
37
111
  export interface ErrorResp {
38
112
  message?: string;
39
113
  }
@@ -48,12 +122,82 @@ declare namespace Components {
48
122
  exists: boolean;
49
123
  active?: boolean;
50
124
  }
125
+ export type InviteToken = string;
51
126
  export interface PortalConfig {
52
127
  auth_config?: AuthConfig;
53
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;
175
+ export interface UserActivationPayload {
176
+ /**
177
+ * User's display name (default: email address)
178
+ * example:
179
+ * Example User
180
+ */
181
+ display_name?: string;
182
+ /**
183
+ * User's password
184
+ * example:
185
+ * AKjhdakjsdh@!34
186
+ */
187
+ password?: string;
188
+ }
54
189
  }
55
190
  }
56
191
  declare namespace Paths {
192
+ namespace ActivateUser {
193
+ namespace Parameters {
194
+ export type Token = Components.Schemas.InviteToken;
195
+ }
196
+ export interface QueryParameters {
197
+ token: Parameters.Token;
198
+ }
199
+ export type RequestBody = Components.Schemas.UserActivationPayload;
200
+ }
57
201
  namespace CreatePortal {
58
202
  export interface RequestBody {
59
203
  /**
@@ -84,42 +228,94 @@ declare namespace Paths {
84
228
  export type $500 = Components.Schemas.ErrorResp;
85
229
  }
86
230
  }
87
- namespace GetCustomerInfo {
231
+ namespace CreateUser {
232
+ export interface RequestBody {
233
+ /**
234
+ * example:
235
+ * email@test.com
236
+ */
237
+ email?: string;
238
+ /**
239
+ * example:
240
+ * example.com
241
+ */
242
+ domain?: string;
243
+ }
244
+ namespace Responses {
245
+ export type $201 = Components.Schemas.AddPortalResp;
246
+ export type $400 = Components.Schemas.ErrorResp;
247
+ export type $401 = Components.Schemas.ErrorResp;
248
+ export type $500 = Components.Schemas.ErrorResp;
249
+ }
250
+ }
251
+ namespace GetContact {
252
+ namespace Parameters {
253
+ export type Id = Components.Schemas.ContactId;
254
+ }
255
+ export interface PathParameters {
256
+ id: Parameters.Id;
257
+ }
88
258
  namespace Responses {
89
- export interface $200 {
90
- address?: {
91
- /**
92
- * example:
93
- * Melatengurtel
94
- */
95
- street?: string;
96
- /**
97
- * example:
98
- * 71
99
- */
100
- street_number?: string;
101
- /**
102
- * example:
103
- * Koln
104
- */
105
- city?: string;
106
- };
107
- }
259
+ export type $200 = Components.Schemas.Contact;
108
260
  }
109
261
  }
110
262
  namespace GetPortalConfig {
111
263
  namespace Parameters {
112
264
  /**
113
265
  * example:
114
- * 739224
266
+ * 12324
267
+ */
268
+ export type BrandId = string;
269
+ /**
270
+ * example:
271
+ * 2342
115
272
  */
116
273
  export type OrgId = string;
117
274
  }
118
275
  export interface QueryParameters {
119
- orgId: Parameters.OrgId;
276
+ brand_id: Parameters.BrandId;
277
+ org_id: Parameters.OrgId;
278
+ }
279
+ namespace Responses {
280
+ export type $200 = Components.Schemas.Brand;
281
+ }
282
+ }
283
+ namespace GetPortalConfigByDomain {
284
+ namespace Parameters {
285
+ /**
286
+ * example:
287
+ * example.com
288
+ */
289
+ export type Domain = string;
290
+ }
291
+ export interface QueryParameters {
292
+ domain: Parameters.Domain;
293
+ }
294
+ namespace Responses {
295
+ export type $200 = Components.Schemas.Brand;
296
+ }
297
+ }
298
+ namespace GetPortalUser {
299
+ namespace Parameters {
300
+ export type Id = Components.Schemas.PortalUserId;
301
+ }
302
+ export interface PathParameters {
303
+ id: Parameters.Id;
120
304
  }
121
305
  namespace Responses {
122
- export type $200 = Components.Schemas.PortalConfig;
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;
123
319
  }
124
320
  }
125
321
  namespace UserExists {
@@ -147,6 +343,36 @@ declare namespace Paths {
147
343
  }
148
344
 
149
345
  export interface OperationMethods {
346
+ /**
347
+ * createPortal - creates a portal
348
+ *
349
+ * Creates a portal and db item
350
+ */
351
+ 'createPortal'(
352
+ parameters?: Parameters<UnknownParamsObject> | null,
353
+ data?: Paths.CreatePortal.RequestBody,
354
+ config?: AxiosRequestConfig
355
+ ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
356
+ /**
357
+ * createUser - creates a user
358
+ *
359
+ * Creates a user in cognito pool and db item
360
+ */
361
+ 'createUser'(
362
+ parameters?: Parameters<UnknownParamsObject> | null,
363
+ data?: Paths.CreateUser.RequestBody,
364
+ config?: AxiosRequestConfig
365
+ ): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
366
+ /**
367
+ * activateUser - activateUser
368
+ *
369
+ * Activates the user
370
+ */
371
+ 'activateUser'(
372
+ parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
373
+ data?: Paths.ActivateUser.RequestBody,
374
+ config?: AxiosRequestConfig
375
+ ): OperationResponse<any>
150
376
  /**
151
377
  * testAuth - testAuth
152
378
  *
@@ -158,15 +384,15 @@ export interface OperationMethods {
158
384
  config?: AxiosRequestConfig
159
385
  ): OperationResponse<any>
160
386
  /**
161
- * createPortal - creates a portal
387
+ * getPortalConfigByDomain - getPortalConfigByDomain
162
388
  *
163
- * Creates a portal and db item
389
+ * TODO
164
390
  */
165
- 'createPortal'(
166
- parameters?: Parameters<UnknownParamsObject> | null,
167
- data?: Paths.CreatePortal.RequestBody,
391
+ 'getPortalConfigByDomain'(
392
+ parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
393
+ data?: any,
168
394
  config?: AxiosRequestConfig
169
- ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
395
+ ): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
170
396
  /**
171
397
  * getPortalConfig - getPortalConfig
172
398
  *
@@ -178,15 +404,35 @@ export interface OperationMethods {
178
404
  config?: AxiosRequestConfig
179
405
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
180
406
  /**
181
- * 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
182
428
  *
183
429
  * TODO
184
430
  */
185
- 'getCustomerInfo'(
186
- parameters?: Parameters<UnknownParamsObject> | null,
431
+ 'getPortalUser'(
432
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
187
433
  data?: any,
188
434
  config?: AxiosRequestConfig
189
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
435
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
190
436
  /**
191
437
  * userExists - userExists
192
438
  *
@@ -200,6 +446,42 @@ export interface OperationMethods {
200
446
  }
201
447
 
202
448
  export interface PathsDictionary {
449
+ ['/v1/customer-portal/portal']: {
450
+ /**
451
+ * createPortal - creates a portal
452
+ *
453
+ * Creates a portal and db item
454
+ */
455
+ 'post'(
456
+ parameters?: Parameters<UnknownParamsObject> | null,
457
+ data?: Paths.CreatePortal.RequestBody,
458
+ config?: AxiosRequestConfig
459
+ ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
460
+ }
461
+ ['/v1/customer-portal/public/user']: {
462
+ /**
463
+ * createUser - creates a user
464
+ *
465
+ * Creates a user in cognito pool and db item
466
+ */
467
+ 'post'(
468
+ parameters?: Parameters<UnknownParamsObject> | null,
469
+ data?: Paths.CreateUser.RequestBody,
470
+ config?: AxiosRequestConfig
471
+ ): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
472
+ }
473
+ ['/v1/customer-portal/public/activate']: {
474
+ /**
475
+ * activateUser - activateUser
476
+ *
477
+ * Activates the user
478
+ */
479
+ 'post'(
480
+ parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
481
+ data?: Paths.ActivateUser.RequestBody,
482
+ config?: AxiosRequestConfig
483
+ ): OperationResponse<any>
484
+ }
203
485
  ['/v1/customer-portal/auth']: {
204
486
  /**
205
487
  * testAuth - testAuth
@@ -212,19 +494,19 @@ export interface PathsDictionary {
212
494
  config?: AxiosRequestConfig
213
495
  ): OperationResponse<any>
214
496
  }
215
- ['/v1/customer-portal/portal']: {
497
+ ['/v1/customer-portal/public/config']: {
216
498
  /**
217
- * createPortal - creates a portal
499
+ * getPortalConfigByDomain - getPortalConfigByDomain
218
500
  *
219
- * Creates a portal and db item
501
+ * TODO
220
502
  */
221
- 'post'(
222
- parameters?: Parameters<UnknownParamsObject> | null,
223
- data?: Paths.CreatePortal.RequestBody,
503
+ 'get'(
504
+ parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
505
+ data?: any,
224
506
  config?: AxiosRequestConfig
225
- ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
507
+ ): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
226
508
  }
227
- ['/v1/customer-portal/public/config']: {
509
+ ['/v1/customer-portal/config']: {
228
510
  /**
229
511
  * getPortalConfig - getPortalConfig
230
512
  *
@@ -236,17 +518,39 @@ export interface PathsDictionary {
236
518
  config?: AxiosRequestConfig
237
519
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
238
520
  }
239
- ['/v1/customer-portal/info']: {
521
+ ['/v1/customer-portal/contact/{id}']: {
240
522
  /**
241
- * getCustomerInfo - getCustomerInfo
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}']: {
544
+ /**
545
+ * getPortalUser - getPortalUser
242
546
  *
243
547
  * TODO
244
548
  */
245
549
  'get'(
246
- parameters?: Parameters<UnknownParamsObject> | null,
550
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
247
551
  data?: any,
248
552
  config?: AxiosRequestConfig
249
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
553
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
250
554
  }
251
555
  ['/v1/customer-portal/public/register/exists']: {
252
556
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/customer-portal-client",
3
- "version": "0.2.3",
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
@@ -34,6 +34,80 @@ declare namespace Components {
34
34
  */
35
35
  portal_id: string;
36
36
  }
37
+ export interface Brand {
38
+ /**
39
+ * example:
40
+ * 12454
41
+ */
42
+ id?: string;
43
+ /**
44
+ * example:
45
+ * 66
46
+ */
47
+ organization_id?: string;
48
+ /**
49
+ * example:
50
+ * 3134
51
+ */
52
+ design_id?: string;
53
+ cognito_details?: {
54
+ /**
55
+ * example:
56
+ * 6bsd0jkgoie74k2i8mrhc1vest
57
+ */
58
+ cognito_user_pool_client_id?: string;
59
+ /**
60
+ * example:
61
+ * arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341
62
+ */
63
+ cognito_user_pool_arn?: string;
64
+ /**
65
+ * example:
66
+ * eu-central-1_CUEQRNbUb
67
+ */
68
+ cognito_user_pool_id?: string;
69
+ };
70
+ config?: string;
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;
37
111
  export interface ErrorResp {
38
112
  message?: string;
39
113
  }
@@ -48,12 +122,82 @@ declare namespace Components {
48
122
  exists: boolean;
49
123
  active?: boolean;
50
124
  }
125
+ export type InviteToken = string;
51
126
  export interface PortalConfig {
52
127
  auth_config?: AuthConfig;
53
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;
175
+ export interface UserActivationPayload {
176
+ /**
177
+ * User's display name (default: email address)
178
+ * example:
179
+ * Example User
180
+ */
181
+ display_name?: string;
182
+ /**
183
+ * User's password
184
+ * example:
185
+ * AKjhdakjsdh@!34
186
+ */
187
+ password?: string;
188
+ }
54
189
  }
55
190
  }
56
191
  declare namespace Paths {
192
+ namespace ActivateUser {
193
+ namespace Parameters {
194
+ export type Token = Components.Schemas.InviteToken;
195
+ }
196
+ export interface QueryParameters {
197
+ token: Parameters.Token;
198
+ }
199
+ export type RequestBody = Components.Schemas.UserActivationPayload;
200
+ }
57
201
  namespace CreatePortal {
58
202
  export interface RequestBody {
59
203
  /**
@@ -84,42 +228,94 @@ declare namespace Paths {
84
228
  export type $500 = Components.Schemas.ErrorResp;
85
229
  }
86
230
  }
87
- namespace GetCustomerInfo {
231
+ namespace CreateUser {
232
+ export interface RequestBody {
233
+ /**
234
+ * example:
235
+ * email@test.com
236
+ */
237
+ email?: string;
238
+ /**
239
+ * example:
240
+ * example.com
241
+ */
242
+ domain?: string;
243
+ }
244
+ namespace Responses {
245
+ export type $201 = Components.Schemas.AddPortalResp;
246
+ export type $400 = Components.Schemas.ErrorResp;
247
+ export type $401 = Components.Schemas.ErrorResp;
248
+ export type $500 = Components.Schemas.ErrorResp;
249
+ }
250
+ }
251
+ namespace GetContact {
252
+ namespace Parameters {
253
+ export type Id = Components.Schemas.ContactId;
254
+ }
255
+ export interface PathParameters {
256
+ id: Parameters.Id;
257
+ }
88
258
  namespace Responses {
89
- export interface $200 {
90
- address?: {
91
- /**
92
- * example:
93
- * Melatengurtel
94
- */
95
- street?: string;
96
- /**
97
- * example:
98
- * 71
99
- */
100
- street_number?: string;
101
- /**
102
- * example:
103
- * Koln
104
- */
105
- city?: string;
106
- };
107
- }
259
+ export type $200 = Components.Schemas.Contact;
108
260
  }
109
261
  }
110
262
  namespace GetPortalConfig {
111
263
  namespace Parameters {
112
264
  /**
113
265
  * example:
114
- * 739224
266
+ * 12324
267
+ */
268
+ export type BrandId = string;
269
+ /**
270
+ * example:
271
+ * 2342
115
272
  */
116
273
  export type OrgId = string;
117
274
  }
118
275
  export interface QueryParameters {
119
- orgId: Parameters.OrgId;
276
+ brand_id: Parameters.BrandId;
277
+ org_id: Parameters.OrgId;
278
+ }
279
+ namespace Responses {
280
+ export type $200 = Components.Schemas.Brand;
281
+ }
282
+ }
283
+ namespace GetPortalConfigByDomain {
284
+ namespace Parameters {
285
+ /**
286
+ * example:
287
+ * example.com
288
+ */
289
+ export type Domain = string;
290
+ }
291
+ export interface QueryParameters {
292
+ domain: Parameters.Domain;
293
+ }
294
+ namespace Responses {
295
+ export type $200 = Components.Schemas.Brand;
296
+ }
297
+ }
298
+ namespace GetPortalUser {
299
+ namespace Parameters {
300
+ export type Id = Components.Schemas.PortalUserId;
301
+ }
302
+ export interface PathParameters {
303
+ id: Parameters.Id;
120
304
  }
121
305
  namespace Responses {
122
- export type $200 = Components.Schemas.PortalConfig;
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;
123
319
  }
124
320
  }
125
321
  namespace UserExists {
@@ -147,6 +343,36 @@ declare namespace Paths {
147
343
  }
148
344
 
149
345
  export interface OperationMethods {
346
+ /**
347
+ * createPortal - creates a portal
348
+ *
349
+ * Creates a portal and db item
350
+ */
351
+ 'createPortal'(
352
+ parameters?: Parameters<UnknownParamsObject> | null,
353
+ data?: Paths.CreatePortal.RequestBody,
354
+ config?: AxiosRequestConfig
355
+ ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
356
+ /**
357
+ * createUser - creates a user
358
+ *
359
+ * Creates a user in cognito pool and db item
360
+ */
361
+ 'createUser'(
362
+ parameters?: Parameters<UnknownParamsObject> | null,
363
+ data?: Paths.CreateUser.RequestBody,
364
+ config?: AxiosRequestConfig
365
+ ): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
366
+ /**
367
+ * activateUser - activateUser
368
+ *
369
+ * Activates the user
370
+ */
371
+ 'activateUser'(
372
+ parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
373
+ data?: Paths.ActivateUser.RequestBody,
374
+ config?: AxiosRequestConfig
375
+ ): OperationResponse<any>
150
376
  /**
151
377
  * testAuth - testAuth
152
378
  *
@@ -158,15 +384,15 @@ export interface OperationMethods {
158
384
  config?: AxiosRequestConfig
159
385
  ): OperationResponse<any>
160
386
  /**
161
- * createPortal - creates a portal
387
+ * getPortalConfigByDomain - getPortalConfigByDomain
162
388
  *
163
- * Creates a portal and db item
389
+ * TODO
164
390
  */
165
- 'createPortal'(
166
- parameters?: Parameters<UnknownParamsObject> | null,
167
- data?: Paths.CreatePortal.RequestBody,
391
+ 'getPortalConfigByDomain'(
392
+ parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
393
+ data?: any,
168
394
  config?: AxiosRequestConfig
169
- ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
395
+ ): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
170
396
  /**
171
397
  * getPortalConfig - getPortalConfig
172
398
  *
@@ -178,15 +404,35 @@ export interface OperationMethods {
178
404
  config?: AxiosRequestConfig
179
405
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
180
406
  /**
181
- * 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
182
428
  *
183
429
  * TODO
184
430
  */
185
- 'getCustomerInfo'(
186
- parameters?: Parameters<UnknownParamsObject> | null,
431
+ 'getPortalUser'(
432
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
187
433
  data?: any,
188
434
  config?: AxiosRequestConfig
189
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
435
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
190
436
  /**
191
437
  * userExists - userExists
192
438
  *
@@ -200,6 +446,42 @@ export interface OperationMethods {
200
446
  }
201
447
 
202
448
  export interface PathsDictionary {
449
+ ['/v1/customer-portal/portal']: {
450
+ /**
451
+ * createPortal - creates a portal
452
+ *
453
+ * Creates a portal and db item
454
+ */
455
+ 'post'(
456
+ parameters?: Parameters<UnknownParamsObject> | null,
457
+ data?: Paths.CreatePortal.RequestBody,
458
+ config?: AxiosRequestConfig
459
+ ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
460
+ }
461
+ ['/v1/customer-portal/public/user']: {
462
+ /**
463
+ * createUser - creates a user
464
+ *
465
+ * Creates a user in cognito pool and db item
466
+ */
467
+ 'post'(
468
+ parameters?: Parameters<UnknownParamsObject> | null,
469
+ data?: Paths.CreateUser.RequestBody,
470
+ config?: AxiosRequestConfig
471
+ ): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
472
+ }
473
+ ['/v1/customer-portal/public/activate']: {
474
+ /**
475
+ * activateUser - activateUser
476
+ *
477
+ * Activates the user
478
+ */
479
+ 'post'(
480
+ parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
481
+ data?: Paths.ActivateUser.RequestBody,
482
+ config?: AxiosRequestConfig
483
+ ): OperationResponse<any>
484
+ }
203
485
  ['/v1/customer-portal/auth']: {
204
486
  /**
205
487
  * testAuth - testAuth
@@ -212,19 +494,19 @@ export interface PathsDictionary {
212
494
  config?: AxiosRequestConfig
213
495
  ): OperationResponse<any>
214
496
  }
215
- ['/v1/customer-portal/portal']: {
497
+ ['/v1/customer-portal/public/config']: {
216
498
  /**
217
- * createPortal - creates a portal
499
+ * getPortalConfigByDomain - getPortalConfigByDomain
218
500
  *
219
- * Creates a portal and db item
501
+ * TODO
220
502
  */
221
- 'post'(
222
- parameters?: Parameters<UnknownParamsObject> | null,
223
- data?: Paths.CreatePortal.RequestBody,
503
+ 'get'(
504
+ parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
505
+ data?: any,
224
506
  config?: AxiosRequestConfig
225
- ): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
507
+ ): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
226
508
  }
227
- ['/v1/customer-portal/public/config']: {
509
+ ['/v1/customer-portal/config']: {
228
510
  /**
229
511
  * getPortalConfig - getPortalConfig
230
512
  *
@@ -236,17 +518,39 @@ export interface PathsDictionary {
236
518
  config?: AxiosRequestConfig
237
519
  ): OperationResponse<Paths.GetPortalConfig.Responses.$200>
238
520
  }
239
- ['/v1/customer-portal/info']: {
521
+ ['/v1/customer-portal/contact/{id}']: {
240
522
  /**
241
- * getCustomerInfo - getCustomerInfo
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}']: {
544
+ /**
545
+ * getPortalUser - getPortalUser
242
546
  *
243
547
  * TODO
244
548
  */
245
549
  'get'(
246
- parameters?: Parameters<UnknownParamsObject> | null,
550
+ parameters?: Parameters<Paths.GetPortalUser.PathParameters> | null,
247
551
  data?: any,
248
552
  config?: AxiosRequestConfig
249
- ): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
553
+ ): OperationResponse<Paths.GetPortalUser.Responses.$200>
250
554
  }
251
555
  ['/v1/customer-portal/public/register/exists']: {
252
556
  /**