@epilot/customer-portal-client 0.2.3 → 0.2.4
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.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +183 -17
- package/package.json +1 -1
- package/src/openapi.d.ts +183 -17
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var
|
|
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)})());
|
package/dist/openapi.d.ts
CHANGED
|
@@ -34,6 +34,41 @@ 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
|
+
}
|
|
37
72
|
export interface ErrorResp {
|
|
38
73
|
message?: string;
|
|
39
74
|
}
|
|
@@ -48,12 +83,36 @@ declare namespace Components {
|
|
|
48
83
|
exists: boolean;
|
|
49
84
|
active?: boolean;
|
|
50
85
|
}
|
|
86
|
+
export type InviteToken = string;
|
|
51
87
|
export interface PortalConfig {
|
|
52
88
|
auth_config?: AuthConfig;
|
|
53
89
|
}
|
|
90
|
+
export interface UserActivationPayload {
|
|
91
|
+
/**
|
|
92
|
+
* User's display name (default: email address)
|
|
93
|
+
* example:
|
|
94
|
+
* Example User
|
|
95
|
+
*/
|
|
96
|
+
display_name?: string;
|
|
97
|
+
/**
|
|
98
|
+
* User's password
|
|
99
|
+
* example:
|
|
100
|
+
* AKjhdakjsdh@!34
|
|
101
|
+
*/
|
|
102
|
+
password?: string;
|
|
103
|
+
}
|
|
54
104
|
}
|
|
55
105
|
}
|
|
56
106
|
declare namespace Paths {
|
|
107
|
+
namespace ActivateUser {
|
|
108
|
+
namespace Parameters {
|
|
109
|
+
export type Token = Components.Schemas.InviteToken;
|
|
110
|
+
}
|
|
111
|
+
export interface QueryParameters {
|
|
112
|
+
token: Parameters.Token;
|
|
113
|
+
}
|
|
114
|
+
export type RequestBody = Components.Schemas.UserActivationPayload;
|
|
115
|
+
}
|
|
57
116
|
namespace CreatePortal {
|
|
58
117
|
export interface RequestBody {
|
|
59
118
|
/**
|
|
@@ -84,6 +143,26 @@ declare namespace Paths {
|
|
|
84
143
|
export type $500 = Components.Schemas.ErrorResp;
|
|
85
144
|
}
|
|
86
145
|
}
|
|
146
|
+
namespace CreateUser {
|
|
147
|
+
export interface RequestBody {
|
|
148
|
+
/**
|
|
149
|
+
* example:
|
|
150
|
+
* email@test.com
|
|
151
|
+
*/
|
|
152
|
+
email?: string;
|
|
153
|
+
/**
|
|
154
|
+
* example:
|
|
155
|
+
* example.com
|
|
156
|
+
*/
|
|
157
|
+
domain?: string;
|
|
158
|
+
}
|
|
159
|
+
namespace Responses {
|
|
160
|
+
export type $201 = Components.Schemas.AddPortalResp;
|
|
161
|
+
export type $400 = Components.Schemas.ErrorResp;
|
|
162
|
+
export type $401 = Components.Schemas.ErrorResp;
|
|
163
|
+
export type $500 = Components.Schemas.ErrorResp;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
87
166
|
namespace GetCustomerInfo {
|
|
88
167
|
namespace Responses {
|
|
89
168
|
export interface $200 {
|
|
@@ -111,15 +190,36 @@ declare namespace Paths {
|
|
|
111
190
|
namespace Parameters {
|
|
112
191
|
/**
|
|
113
192
|
* example:
|
|
114
|
-
*
|
|
193
|
+
* 12324
|
|
194
|
+
*/
|
|
195
|
+
export type BrandId = string;
|
|
196
|
+
/**
|
|
197
|
+
* example:
|
|
198
|
+
* 2342
|
|
115
199
|
*/
|
|
116
200
|
export type OrgId = string;
|
|
117
201
|
}
|
|
118
202
|
export interface QueryParameters {
|
|
119
|
-
|
|
203
|
+
brand_id: Parameters.BrandId;
|
|
204
|
+
org_id: Parameters.OrgId;
|
|
205
|
+
}
|
|
206
|
+
namespace Responses {
|
|
207
|
+
export type $200 = Components.Schemas.Brand;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
namespace GetPortalConfigByDomain {
|
|
211
|
+
namespace Parameters {
|
|
212
|
+
/**
|
|
213
|
+
* example:
|
|
214
|
+
* example.com
|
|
215
|
+
*/
|
|
216
|
+
export type Domain = string;
|
|
217
|
+
}
|
|
218
|
+
export interface QueryParameters {
|
|
219
|
+
domain: Parameters.Domain;
|
|
120
220
|
}
|
|
121
221
|
namespace Responses {
|
|
122
|
-
export type $200 = Components.Schemas.
|
|
222
|
+
export type $200 = Components.Schemas.Brand;
|
|
123
223
|
}
|
|
124
224
|
}
|
|
125
225
|
namespace UserExists {
|
|
@@ -147,6 +247,36 @@ declare namespace Paths {
|
|
|
147
247
|
}
|
|
148
248
|
|
|
149
249
|
export interface OperationMethods {
|
|
250
|
+
/**
|
|
251
|
+
* createPortal - creates a portal
|
|
252
|
+
*
|
|
253
|
+
* Creates a portal and db item
|
|
254
|
+
*/
|
|
255
|
+
'createPortal'(
|
|
256
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
257
|
+
data?: Paths.CreatePortal.RequestBody,
|
|
258
|
+
config?: AxiosRequestConfig
|
|
259
|
+
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
|
|
260
|
+
/**
|
|
261
|
+
* createUser - creates a user
|
|
262
|
+
*
|
|
263
|
+
* Creates a user in cognito pool and db item
|
|
264
|
+
*/
|
|
265
|
+
'createUser'(
|
|
266
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
267
|
+
data?: Paths.CreateUser.RequestBody,
|
|
268
|
+
config?: AxiosRequestConfig
|
|
269
|
+
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
|
|
270
|
+
/**
|
|
271
|
+
* activateUser - activateUser
|
|
272
|
+
*
|
|
273
|
+
* Activates the user
|
|
274
|
+
*/
|
|
275
|
+
'activateUser'(
|
|
276
|
+
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
|
|
277
|
+
data?: Paths.ActivateUser.RequestBody,
|
|
278
|
+
config?: AxiosRequestConfig
|
|
279
|
+
): OperationResponse<any>
|
|
150
280
|
/**
|
|
151
281
|
* testAuth - testAuth
|
|
152
282
|
*
|
|
@@ -158,15 +288,15 @@ export interface OperationMethods {
|
|
|
158
288
|
config?: AxiosRequestConfig
|
|
159
289
|
): OperationResponse<any>
|
|
160
290
|
/**
|
|
161
|
-
*
|
|
291
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
162
292
|
*
|
|
163
|
-
*
|
|
293
|
+
* TODO
|
|
164
294
|
*/
|
|
165
|
-
'
|
|
166
|
-
parameters?: Parameters<
|
|
167
|
-
data?:
|
|
295
|
+
'getPortalConfigByDomain'(
|
|
296
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
297
|
+
data?: any,
|
|
168
298
|
config?: AxiosRequestConfig
|
|
169
|
-
): OperationResponse<Paths.
|
|
299
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
170
300
|
/**
|
|
171
301
|
* getPortalConfig - getPortalConfig
|
|
172
302
|
*
|
|
@@ -200,6 +330,42 @@ export interface OperationMethods {
|
|
|
200
330
|
}
|
|
201
331
|
|
|
202
332
|
export interface PathsDictionary {
|
|
333
|
+
['/v1/customer-portal/portal']: {
|
|
334
|
+
/**
|
|
335
|
+
* createPortal - creates a portal
|
|
336
|
+
*
|
|
337
|
+
* Creates a portal and db item
|
|
338
|
+
*/
|
|
339
|
+
'post'(
|
|
340
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
341
|
+
data?: Paths.CreatePortal.RequestBody,
|
|
342
|
+
config?: AxiosRequestConfig
|
|
343
|
+
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
|
|
344
|
+
}
|
|
345
|
+
['/v1/customer-portal/public/user']: {
|
|
346
|
+
/**
|
|
347
|
+
* createUser - creates a user
|
|
348
|
+
*
|
|
349
|
+
* Creates a user in cognito pool and db item
|
|
350
|
+
*/
|
|
351
|
+
'post'(
|
|
352
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
353
|
+
data?: Paths.CreateUser.RequestBody,
|
|
354
|
+
config?: AxiosRequestConfig
|
|
355
|
+
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
|
|
356
|
+
}
|
|
357
|
+
['/v1/customer-portal/public/activate']: {
|
|
358
|
+
/**
|
|
359
|
+
* activateUser - activateUser
|
|
360
|
+
*
|
|
361
|
+
* Activates the user
|
|
362
|
+
*/
|
|
363
|
+
'post'(
|
|
364
|
+
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
|
|
365
|
+
data?: Paths.ActivateUser.RequestBody,
|
|
366
|
+
config?: AxiosRequestConfig
|
|
367
|
+
): OperationResponse<any>
|
|
368
|
+
}
|
|
203
369
|
['/v1/customer-portal/auth']: {
|
|
204
370
|
/**
|
|
205
371
|
* testAuth - testAuth
|
|
@@ -212,19 +378,19 @@ export interface PathsDictionary {
|
|
|
212
378
|
config?: AxiosRequestConfig
|
|
213
379
|
): OperationResponse<any>
|
|
214
380
|
}
|
|
215
|
-
['/v1/customer-portal/
|
|
381
|
+
['/v1/customer-portal/public/config']: {
|
|
216
382
|
/**
|
|
217
|
-
*
|
|
383
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
218
384
|
*
|
|
219
|
-
*
|
|
385
|
+
* TODO
|
|
220
386
|
*/
|
|
221
|
-
'
|
|
222
|
-
parameters?: Parameters<
|
|
223
|
-
data?:
|
|
387
|
+
'get'(
|
|
388
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
389
|
+
data?: any,
|
|
224
390
|
config?: AxiosRequestConfig
|
|
225
|
-
): OperationResponse<Paths.
|
|
391
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
226
392
|
}
|
|
227
|
-
['/v1/customer-portal/
|
|
393
|
+
['/v1/customer-portal/config']: {
|
|
228
394
|
/**
|
|
229
395
|
* getPortalConfig - getPortalConfig
|
|
230
396
|
*
|
package/package.json
CHANGED
package/src/openapi.d.ts
CHANGED
|
@@ -34,6 +34,41 @@ 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
|
+
}
|
|
37
72
|
export interface ErrorResp {
|
|
38
73
|
message?: string;
|
|
39
74
|
}
|
|
@@ -48,12 +83,36 @@ declare namespace Components {
|
|
|
48
83
|
exists: boolean;
|
|
49
84
|
active?: boolean;
|
|
50
85
|
}
|
|
86
|
+
export type InviteToken = string;
|
|
51
87
|
export interface PortalConfig {
|
|
52
88
|
auth_config?: AuthConfig;
|
|
53
89
|
}
|
|
90
|
+
export interface UserActivationPayload {
|
|
91
|
+
/**
|
|
92
|
+
* User's display name (default: email address)
|
|
93
|
+
* example:
|
|
94
|
+
* Example User
|
|
95
|
+
*/
|
|
96
|
+
display_name?: string;
|
|
97
|
+
/**
|
|
98
|
+
* User's password
|
|
99
|
+
* example:
|
|
100
|
+
* AKjhdakjsdh@!34
|
|
101
|
+
*/
|
|
102
|
+
password?: string;
|
|
103
|
+
}
|
|
54
104
|
}
|
|
55
105
|
}
|
|
56
106
|
declare namespace Paths {
|
|
107
|
+
namespace ActivateUser {
|
|
108
|
+
namespace Parameters {
|
|
109
|
+
export type Token = Components.Schemas.InviteToken;
|
|
110
|
+
}
|
|
111
|
+
export interface QueryParameters {
|
|
112
|
+
token: Parameters.Token;
|
|
113
|
+
}
|
|
114
|
+
export type RequestBody = Components.Schemas.UserActivationPayload;
|
|
115
|
+
}
|
|
57
116
|
namespace CreatePortal {
|
|
58
117
|
export interface RequestBody {
|
|
59
118
|
/**
|
|
@@ -84,6 +143,26 @@ declare namespace Paths {
|
|
|
84
143
|
export type $500 = Components.Schemas.ErrorResp;
|
|
85
144
|
}
|
|
86
145
|
}
|
|
146
|
+
namespace CreateUser {
|
|
147
|
+
export interface RequestBody {
|
|
148
|
+
/**
|
|
149
|
+
* example:
|
|
150
|
+
* email@test.com
|
|
151
|
+
*/
|
|
152
|
+
email?: string;
|
|
153
|
+
/**
|
|
154
|
+
* example:
|
|
155
|
+
* example.com
|
|
156
|
+
*/
|
|
157
|
+
domain?: string;
|
|
158
|
+
}
|
|
159
|
+
namespace Responses {
|
|
160
|
+
export type $201 = Components.Schemas.AddPortalResp;
|
|
161
|
+
export type $400 = Components.Schemas.ErrorResp;
|
|
162
|
+
export type $401 = Components.Schemas.ErrorResp;
|
|
163
|
+
export type $500 = Components.Schemas.ErrorResp;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
87
166
|
namespace GetCustomerInfo {
|
|
88
167
|
namespace Responses {
|
|
89
168
|
export interface $200 {
|
|
@@ -111,15 +190,36 @@ declare namespace Paths {
|
|
|
111
190
|
namespace Parameters {
|
|
112
191
|
/**
|
|
113
192
|
* example:
|
|
114
|
-
*
|
|
193
|
+
* 12324
|
|
194
|
+
*/
|
|
195
|
+
export type BrandId = string;
|
|
196
|
+
/**
|
|
197
|
+
* example:
|
|
198
|
+
* 2342
|
|
115
199
|
*/
|
|
116
200
|
export type OrgId = string;
|
|
117
201
|
}
|
|
118
202
|
export interface QueryParameters {
|
|
119
|
-
|
|
203
|
+
brand_id: Parameters.BrandId;
|
|
204
|
+
org_id: Parameters.OrgId;
|
|
205
|
+
}
|
|
206
|
+
namespace Responses {
|
|
207
|
+
export type $200 = Components.Schemas.Brand;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
namespace GetPortalConfigByDomain {
|
|
211
|
+
namespace Parameters {
|
|
212
|
+
/**
|
|
213
|
+
* example:
|
|
214
|
+
* example.com
|
|
215
|
+
*/
|
|
216
|
+
export type Domain = string;
|
|
217
|
+
}
|
|
218
|
+
export interface QueryParameters {
|
|
219
|
+
domain: Parameters.Domain;
|
|
120
220
|
}
|
|
121
221
|
namespace Responses {
|
|
122
|
-
export type $200 = Components.Schemas.
|
|
222
|
+
export type $200 = Components.Schemas.Brand;
|
|
123
223
|
}
|
|
124
224
|
}
|
|
125
225
|
namespace UserExists {
|
|
@@ -147,6 +247,36 @@ declare namespace Paths {
|
|
|
147
247
|
}
|
|
148
248
|
|
|
149
249
|
export interface OperationMethods {
|
|
250
|
+
/**
|
|
251
|
+
* createPortal - creates a portal
|
|
252
|
+
*
|
|
253
|
+
* Creates a portal and db item
|
|
254
|
+
*/
|
|
255
|
+
'createPortal'(
|
|
256
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
257
|
+
data?: Paths.CreatePortal.RequestBody,
|
|
258
|
+
config?: AxiosRequestConfig
|
|
259
|
+
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
|
|
260
|
+
/**
|
|
261
|
+
* createUser - creates a user
|
|
262
|
+
*
|
|
263
|
+
* Creates a user in cognito pool and db item
|
|
264
|
+
*/
|
|
265
|
+
'createUser'(
|
|
266
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
267
|
+
data?: Paths.CreateUser.RequestBody,
|
|
268
|
+
config?: AxiosRequestConfig
|
|
269
|
+
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
|
|
270
|
+
/**
|
|
271
|
+
* activateUser - activateUser
|
|
272
|
+
*
|
|
273
|
+
* Activates the user
|
|
274
|
+
*/
|
|
275
|
+
'activateUser'(
|
|
276
|
+
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
|
|
277
|
+
data?: Paths.ActivateUser.RequestBody,
|
|
278
|
+
config?: AxiosRequestConfig
|
|
279
|
+
): OperationResponse<any>
|
|
150
280
|
/**
|
|
151
281
|
* testAuth - testAuth
|
|
152
282
|
*
|
|
@@ -158,15 +288,15 @@ export interface OperationMethods {
|
|
|
158
288
|
config?: AxiosRequestConfig
|
|
159
289
|
): OperationResponse<any>
|
|
160
290
|
/**
|
|
161
|
-
*
|
|
291
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
162
292
|
*
|
|
163
|
-
*
|
|
293
|
+
* TODO
|
|
164
294
|
*/
|
|
165
|
-
'
|
|
166
|
-
parameters?: Parameters<
|
|
167
|
-
data?:
|
|
295
|
+
'getPortalConfigByDomain'(
|
|
296
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
297
|
+
data?: any,
|
|
168
298
|
config?: AxiosRequestConfig
|
|
169
|
-
): OperationResponse<Paths.
|
|
299
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
170
300
|
/**
|
|
171
301
|
* getPortalConfig - getPortalConfig
|
|
172
302
|
*
|
|
@@ -200,6 +330,42 @@ export interface OperationMethods {
|
|
|
200
330
|
}
|
|
201
331
|
|
|
202
332
|
export interface PathsDictionary {
|
|
333
|
+
['/v1/customer-portal/portal']: {
|
|
334
|
+
/**
|
|
335
|
+
* createPortal - creates a portal
|
|
336
|
+
*
|
|
337
|
+
* Creates a portal and db item
|
|
338
|
+
*/
|
|
339
|
+
'post'(
|
|
340
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
341
|
+
data?: Paths.CreatePortal.RequestBody,
|
|
342
|
+
config?: AxiosRequestConfig
|
|
343
|
+
): OperationResponse<Paths.CreatePortal.Responses.$201 | Paths.CreatePortal.Responses.$400 | Paths.CreatePortal.Responses.$401 | Paths.CreatePortal.Responses.$500>
|
|
344
|
+
}
|
|
345
|
+
['/v1/customer-portal/public/user']: {
|
|
346
|
+
/**
|
|
347
|
+
* createUser - creates a user
|
|
348
|
+
*
|
|
349
|
+
* Creates a user in cognito pool and db item
|
|
350
|
+
*/
|
|
351
|
+
'post'(
|
|
352
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
353
|
+
data?: Paths.CreateUser.RequestBody,
|
|
354
|
+
config?: AxiosRequestConfig
|
|
355
|
+
): OperationResponse<Paths.CreateUser.Responses.$201 | Paths.CreateUser.Responses.$400 | Paths.CreateUser.Responses.$401 | Paths.CreateUser.Responses.$500>
|
|
356
|
+
}
|
|
357
|
+
['/v1/customer-portal/public/activate']: {
|
|
358
|
+
/**
|
|
359
|
+
* activateUser - activateUser
|
|
360
|
+
*
|
|
361
|
+
* Activates the user
|
|
362
|
+
*/
|
|
363
|
+
'post'(
|
|
364
|
+
parameters?: Parameters<Paths.ActivateUser.QueryParameters> | null,
|
|
365
|
+
data?: Paths.ActivateUser.RequestBody,
|
|
366
|
+
config?: AxiosRequestConfig
|
|
367
|
+
): OperationResponse<any>
|
|
368
|
+
}
|
|
203
369
|
['/v1/customer-portal/auth']: {
|
|
204
370
|
/**
|
|
205
371
|
* testAuth - testAuth
|
|
@@ -212,19 +378,19 @@ export interface PathsDictionary {
|
|
|
212
378
|
config?: AxiosRequestConfig
|
|
213
379
|
): OperationResponse<any>
|
|
214
380
|
}
|
|
215
|
-
['/v1/customer-portal/
|
|
381
|
+
['/v1/customer-portal/public/config']: {
|
|
216
382
|
/**
|
|
217
|
-
*
|
|
383
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
218
384
|
*
|
|
219
|
-
*
|
|
385
|
+
* TODO
|
|
220
386
|
*/
|
|
221
|
-
'
|
|
222
|
-
parameters?: Parameters<
|
|
223
|
-
data?:
|
|
387
|
+
'get'(
|
|
388
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
389
|
+
data?: any,
|
|
224
390
|
config?: AxiosRequestConfig
|
|
225
|
-
): OperationResponse<Paths.
|
|
391
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
226
392
|
}
|
|
227
|
-
['/v1/customer-portal/
|
|
393
|
+
['/v1/customer-portal/config']: {
|
|
228
394
|
/**
|
|
229
395
|
* getPortalConfig - getPortalConfig
|
|
230
396
|
*
|