@epilot/customer-portal-client 0.2.2 → 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 +196 -33
- package/package.json +1 -1
- package/src/openapi.d.ts +196 -33
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,37 +83,78 @@ declare namespace Components {
|
|
|
48
83
|
exists: boolean;
|
|
49
84
|
active?: boolean;
|
|
50
85
|
}
|
|
86
|
+
export type InviteToken = string;
|
|
51
87
|
export interface PortalConfig {
|
|
52
|
-
theme?: string;
|
|
53
88
|
auth_config?: AuthConfig;
|
|
54
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
|
+
}
|
|
55
104
|
}
|
|
56
105
|
}
|
|
57
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
|
+
}
|
|
58
116
|
namespace CreatePortal {
|
|
59
117
|
export interface RequestBody {
|
|
60
118
|
/**
|
|
61
119
|
* example:
|
|
62
120
|
* testing-pool
|
|
63
121
|
*/
|
|
64
|
-
|
|
122
|
+
id?: string;
|
|
65
123
|
/**
|
|
66
124
|
* example:
|
|
67
|
-
*
|
|
125
|
+
* 15434
|
|
68
126
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
127
|
+
organization_id?: string;
|
|
128
|
+
/**
|
|
129
|
+
* example:
|
|
130
|
+
* example.com
|
|
131
|
+
*/
|
|
132
|
+
domain?: string;
|
|
133
|
+
/**
|
|
134
|
+
* example:
|
|
135
|
+
* 123e4567-e89b-12d3-a456-426614174000
|
|
136
|
+
*/
|
|
137
|
+
design_id?: string;
|
|
138
|
+
}
|
|
139
|
+
namespace Responses {
|
|
140
|
+
export type $201 = Components.Schemas.AddPortalResp;
|
|
141
|
+
export type $400 = Components.Schemas.ErrorResp;
|
|
142
|
+
export type $401 = Components.Schemas.ErrorResp;
|
|
143
|
+
export type $500 = Components.Schemas.ErrorResp;
|
|
144
|
+
}
|
|
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;
|
|
82
158
|
}
|
|
83
159
|
namespace Responses {
|
|
84
160
|
export type $201 = Components.Schemas.AddPortalResp;
|
|
@@ -114,15 +190,36 @@ declare namespace Paths {
|
|
|
114
190
|
namespace Parameters {
|
|
115
191
|
/**
|
|
116
192
|
* example:
|
|
117
|
-
*
|
|
193
|
+
* 12324
|
|
194
|
+
*/
|
|
195
|
+
export type BrandId = string;
|
|
196
|
+
/**
|
|
197
|
+
* example:
|
|
198
|
+
* 2342
|
|
118
199
|
*/
|
|
119
200
|
export type OrgId = string;
|
|
120
201
|
}
|
|
121
202
|
export interface QueryParameters {
|
|
122
|
-
|
|
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;
|
|
123
220
|
}
|
|
124
221
|
namespace Responses {
|
|
125
|
-
export type $200 = Components.Schemas.
|
|
222
|
+
export type $200 = Components.Schemas.Brand;
|
|
126
223
|
}
|
|
127
224
|
}
|
|
128
225
|
namespace UserExists {
|
|
@@ -150,6 +247,36 @@ declare namespace Paths {
|
|
|
150
247
|
}
|
|
151
248
|
|
|
152
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>
|
|
153
280
|
/**
|
|
154
281
|
* testAuth - testAuth
|
|
155
282
|
*
|
|
@@ -161,15 +288,15 @@ export interface OperationMethods {
|
|
|
161
288
|
config?: AxiosRequestConfig
|
|
162
289
|
): OperationResponse<any>
|
|
163
290
|
/**
|
|
164
|
-
*
|
|
291
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
165
292
|
*
|
|
166
|
-
*
|
|
293
|
+
* TODO
|
|
167
294
|
*/
|
|
168
|
-
'
|
|
169
|
-
parameters?: Parameters<
|
|
170
|
-
data?:
|
|
295
|
+
'getPortalConfigByDomain'(
|
|
296
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
297
|
+
data?: any,
|
|
171
298
|
config?: AxiosRequestConfig
|
|
172
|
-
): OperationResponse<Paths.
|
|
299
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
173
300
|
/**
|
|
174
301
|
* getPortalConfig - getPortalConfig
|
|
175
302
|
*
|
|
@@ -203,6 +330,42 @@ export interface OperationMethods {
|
|
|
203
330
|
}
|
|
204
331
|
|
|
205
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
|
+
}
|
|
206
369
|
['/v1/customer-portal/auth']: {
|
|
207
370
|
/**
|
|
208
371
|
* testAuth - testAuth
|
|
@@ -215,19 +378,19 @@ export interface PathsDictionary {
|
|
|
215
378
|
config?: AxiosRequestConfig
|
|
216
379
|
): OperationResponse<any>
|
|
217
380
|
}
|
|
218
|
-
['/v1/customer-portal/
|
|
381
|
+
['/v1/customer-portal/public/config']: {
|
|
219
382
|
/**
|
|
220
|
-
*
|
|
383
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
221
384
|
*
|
|
222
|
-
*
|
|
385
|
+
* TODO
|
|
223
386
|
*/
|
|
224
|
-
'
|
|
225
|
-
parameters?: Parameters<
|
|
226
|
-
data?:
|
|
387
|
+
'get'(
|
|
388
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
389
|
+
data?: any,
|
|
227
390
|
config?: AxiosRequestConfig
|
|
228
|
-
): OperationResponse<Paths.
|
|
391
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
229
392
|
}
|
|
230
|
-
['/v1/customer-portal/
|
|
393
|
+
['/v1/customer-portal/config']: {
|
|
231
394
|
/**
|
|
232
395
|
* getPortalConfig - getPortalConfig
|
|
233
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,37 +83,78 @@ declare namespace Components {
|
|
|
48
83
|
exists: boolean;
|
|
49
84
|
active?: boolean;
|
|
50
85
|
}
|
|
86
|
+
export type InviteToken = string;
|
|
51
87
|
export interface PortalConfig {
|
|
52
|
-
theme?: string;
|
|
53
88
|
auth_config?: AuthConfig;
|
|
54
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
|
+
}
|
|
55
104
|
}
|
|
56
105
|
}
|
|
57
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
|
+
}
|
|
58
116
|
namespace CreatePortal {
|
|
59
117
|
export interface RequestBody {
|
|
60
118
|
/**
|
|
61
119
|
* example:
|
|
62
120
|
* testing-pool
|
|
63
121
|
*/
|
|
64
|
-
|
|
122
|
+
id?: string;
|
|
65
123
|
/**
|
|
66
124
|
* example:
|
|
67
|
-
*
|
|
125
|
+
* 15434
|
|
68
126
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
127
|
+
organization_id?: string;
|
|
128
|
+
/**
|
|
129
|
+
* example:
|
|
130
|
+
* example.com
|
|
131
|
+
*/
|
|
132
|
+
domain?: string;
|
|
133
|
+
/**
|
|
134
|
+
* example:
|
|
135
|
+
* 123e4567-e89b-12d3-a456-426614174000
|
|
136
|
+
*/
|
|
137
|
+
design_id?: string;
|
|
138
|
+
}
|
|
139
|
+
namespace Responses {
|
|
140
|
+
export type $201 = Components.Schemas.AddPortalResp;
|
|
141
|
+
export type $400 = Components.Schemas.ErrorResp;
|
|
142
|
+
export type $401 = Components.Schemas.ErrorResp;
|
|
143
|
+
export type $500 = Components.Schemas.ErrorResp;
|
|
144
|
+
}
|
|
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;
|
|
82
158
|
}
|
|
83
159
|
namespace Responses {
|
|
84
160
|
export type $201 = Components.Schemas.AddPortalResp;
|
|
@@ -114,15 +190,36 @@ declare namespace Paths {
|
|
|
114
190
|
namespace Parameters {
|
|
115
191
|
/**
|
|
116
192
|
* example:
|
|
117
|
-
*
|
|
193
|
+
* 12324
|
|
194
|
+
*/
|
|
195
|
+
export type BrandId = string;
|
|
196
|
+
/**
|
|
197
|
+
* example:
|
|
198
|
+
* 2342
|
|
118
199
|
*/
|
|
119
200
|
export type OrgId = string;
|
|
120
201
|
}
|
|
121
202
|
export interface QueryParameters {
|
|
122
|
-
|
|
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;
|
|
123
220
|
}
|
|
124
221
|
namespace Responses {
|
|
125
|
-
export type $200 = Components.Schemas.
|
|
222
|
+
export type $200 = Components.Schemas.Brand;
|
|
126
223
|
}
|
|
127
224
|
}
|
|
128
225
|
namespace UserExists {
|
|
@@ -150,6 +247,36 @@ declare namespace Paths {
|
|
|
150
247
|
}
|
|
151
248
|
|
|
152
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>
|
|
153
280
|
/**
|
|
154
281
|
* testAuth - testAuth
|
|
155
282
|
*
|
|
@@ -161,15 +288,15 @@ export interface OperationMethods {
|
|
|
161
288
|
config?: AxiosRequestConfig
|
|
162
289
|
): OperationResponse<any>
|
|
163
290
|
/**
|
|
164
|
-
*
|
|
291
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
165
292
|
*
|
|
166
|
-
*
|
|
293
|
+
* TODO
|
|
167
294
|
*/
|
|
168
|
-
'
|
|
169
|
-
parameters?: Parameters<
|
|
170
|
-
data?:
|
|
295
|
+
'getPortalConfigByDomain'(
|
|
296
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
297
|
+
data?: any,
|
|
171
298
|
config?: AxiosRequestConfig
|
|
172
|
-
): OperationResponse<Paths.
|
|
299
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
173
300
|
/**
|
|
174
301
|
* getPortalConfig - getPortalConfig
|
|
175
302
|
*
|
|
@@ -203,6 +330,42 @@ export interface OperationMethods {
|
|
|
203
330
|
}
|
|
204
331
|
|
|
205
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
|
+
}
|
|
206
369
|
['/v1/customer-portal/auth']: {
|
|
207
370
|
/**
|
|
208
371
|
* testAuth - testAuth
|
|
@@ -215,19 +378,19 @@ export interface PathsDictionary {
|
|
|
215
378
|
config?: AxiosRequestConfig
|
|
216
379
|
): OperationResponse<any>
|
|
217
380
|
}
|
|
218
|
-
['/v1/customer-portal/
|
|
381
|
+
['/v1/customer-portal/public/config']: {
|
|
219
382
|
/**
|
|
220
|
-
*
|
|
383
|
+
* getPortalConfigByDomain - getPortalConfigByDomain
|
|
221
384
|
*
|
|
222
|
-
*
|
|
385
|
+
* TODO
|
|
223
386
|
*/
|
|
224
|
-
'
|
|
225
|
-
parameters?: Parameters<
|
|
226
|
-
data?:
|
|
387
|
+
'get'(
|
|
388
|
+
parameters?: Parameters<Paths.GetPortalConfigByDomain.QueryParameters> | null,
|
|
389
|
+
data?: any,
|
|
227
390
|
config?: AxiosRequestConfig
|
|
228
|
-
): OperationResponse<Paths.
|
|
391
|
+
): OperationResponse<Paths.GetPortalConfigByDomain.Responses.$200>
|
|
229
392
|
}
|
|
230
|
-
['/v1/customer-portal/
|
|
393
|
+
['/v1/customer-portal/config']: {
|
|
231
394
|
/**
|
|
232
395
|
* getPortalConfig - getPortalConfig
|
|
233
396
|
*
|