@epilot/customer-portal-client 0.1.6 → 0.1.8
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 +72 -2
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var
|
|
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 i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(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/public/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"TODO","tags":["mock"],"security":[],"parameters":[{"in":"query","name":"domain","required":true,"schema":{"type":"string","example":"exmaple.com"}}],"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/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"]}}},"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(i){if(t[i])return t[i].exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,r),o.exports}(914)})());
|
package/dist/openapi.d.ts
CHANGED
|
@@ -25,6 +25,22 @@ declare namespace Components {
|
|
|
25
25
|
* eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1
|
|
26
26
|
*/
|
|
27
27
|
user_pool_identity_pool_id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* example:
|
|
30
|
+
* 7h2hwdj7hhjsdcjkq03eidna3ep
|
|
31
|
+
*/
|
|
32
|
+
portal_id: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* example:
|
|
36
|
+
* {
|
|
37
|
+
* "exists": true,
|
|
38
|
+
* "active": false
|
|
39
|
+
* }
|
|
40
|
+
*/
|
|
41
|
+
export interface Exists {
|
|
42
|
+
exists: boolean;
|
|
43
|
+
active?: boolean;
|
|
28
44
|
}
|
|
29
45
|
export interface PortalConfig {
|
|
30
46
|
auth_config?: AuthConfig;
|
|
@@ -56,10 +72,42 @@ declare namespace Paths {
|
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
74
|
namespace GetPortalConfig {
|
|
75
|
+
namespace Parameters {
|
|
76
|
+
/**
|
|
77
|
+
* example:
|
|
78
|
+
* exmaple.com
|
|
79
|
+
*/
|
|
80
|
+
export type Domain = string;
|
|
81
|
+
}
|
|
82
|
+
export interface QueryParameters {
|
|
83
|
+
domain: Parameters.Domain;
|
|
84
|
+
}
|
|
59
85
|
namespace Responses {
|
|
60
86
|
export type $200 = Components.Schemas.PortalConfig;
|
|
61
87
|
}
|
|
62
88
|
}
|
|
89
|
+
namespace UserExists {
|
|
90
|
+
namespace Parameters {
|
|
91
|
+
/**
|
|
92
|
+
* example:
|
|
93
|
+
* 12345678
|
|
94
|
+
*/
|
|
95
|
+
export type CustomerId = string;
|
|
96
|
+
/**
|
|
97
|
+
* example:
|
|
98
|
+
* user@example.com
|
|
99
|
+
*/
|
|
100
|
+
export type Username = string;
|
|
101
|
+
}
|
|
102
|
+
export interface QueryParameters {
|
|
103
|
+
username?: Parameters.Username;
|
|
104
|
+
customerId?: Parameters.CustomerId;
|
|
105
|
+
}
|
|
106
|
+
namespace Responses {
|
|
107
|
+
export type $200 = Components.Schemas.Exists;
|
|
108
|
+
export type $404 = Components.Schemas.Exists;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
63
111
|
}
|
|
64
112
|
|
|
65
113
|
export interface OperationMethods {
|
|
@@ -79,7 +127,7 @@ export interface OperationMethods {
|
|
|
79
127
|
* TODO
|
|
80
128
|
*/
|
|
81
129
|
'getPortalConfig'(
|
|
82
|
-
parameters?: Parameters<
|
|
130
|
+
parameters?: Parameters<Paths.GetPortalConfig.QueryParameters> | null,
|
|
83
131
|
data?: any,
|
|
84
132
|
config?: AxiosRequestConfig
|
|
85
133
|
): OperationResponse<Paths.GetPortalConfig.Responses.$200>
|
|
@@ -93,6 +141,16 @@ export interface OperationMethods {
|
|
|
93
141
|
data?: any,
|
|
94
142
|
config?: AxiosRequestConfig
|
|
95
143
|
): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
|
|
144
|
+
/**
|
|
145
|
+
* userExists - userExists
|
|
146
|
+
*
|
|
147
|
+
* Checks whether a user exists in the customer portal
|
|
148
|
+
*/
|
|
149
|
+
'userExists'(
|
|
150
|
+
parameters?: Parameters<Paths.UserExists.QueryParameters> | null,
|
|
151
|
+
data?: any,
|
|
152
|
+
config?: AxiosRequestConfig
|
|
153
|
+
): OperationResponse<Paths.UserExists.Responses.$200 | Paths.UserExists.Responses.$404>
|
|
96
154
|
}
|
|
97
155
|
|
|
98
156
|
export interface PathsDictionary {
|
|
@@ -115,7 +173,7 @@ export interface PathsDictionary {
|
|
|
115
173
|
* TODO
|
|
116
174
|
*/
|
|
117
175
|
'get'(
|
|
118
|
-
parameters?: Parameters<
|
|
176
|
+
parameters?: Parameters<Paths.GetPortalConfig.QueryParameters> | null,
|
|
119
177
|
data?: any,
|
|
120
178
|
config?: AxiosRequestConfig
|
|
121
179
|
): OperationResponse<Paths.GetPortalConfig.Responses.$200>
|
|
@@ -132,6 +190,18 @@ export interface PathsDictionary {
|
|
|
132
190
|
config?: AxiosRequestConfig
|
|
133
191
|
): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
|
|
134
192
|
}
|
|
193
|
+
['/v1/customer-portal/register/exists']: {
|
|
194
|
+
/**
|
|
195
|
+
* userExists - userExists
|
|
196
|
+
*
|
|
197
|
+
* Checks whether a user exists in the customer portal
|
|
198
|
+
*/
|
|
199
|
+
'get'(
|
|
200
|
+
parameters?: Parameters<Paths.UserExists.QueryParameters> | null,
|
|
201
|
+
data?: any,
|
|
202
|
+
config?: AxiosRequestConfig
|
|
203
|
+
): OperationResponse<Paths.UserExists.Responses.$200 | Paths.UserExists.Responses.$404>
|
|
204
|
+
}
|
|
135
205
|
}
|
|
136
206
|
|
|
137
207
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|