@fenixalliance/abs-api-client 1.0.12 → 1.0.14
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/app/index.js +3 -3
- package/app/index.ts +1 -1
- package/clients/authService/core/ApiError.js +20 -0
- package/clients/authService/core/ApiError.ts +25 -0
- package/clients/authService/core/ApiRequestOptions.js +2 -0
- package/clients/authService/core/ApiRequestOptions.ts +17 -0
- package/clients/authService/core/ApiResult.js +2 -0
- package/clients/authService/core/ApiResult.ts +11 -0
- package/clients/authService/core/CancelablePromise.js +104 -0
- package/clients/authService/core/CancelablePromise.ts +131 -0
- package/clients/authService/core/OpenAPI.js +14 -0
- package/clients/authService/core/OpenAPI.ts +32 -0
- package/clients/authService/core/request.js +294 -0
- package/clients/authService/core/request.ts +322 -0
- package/clients/authService/index.js +28 -0
- package/clients/authService/index.ts +48 -0
- package/clients/authService/models/AccessTokenResponse.js +2 -0
- package/clients/authService/models/AccessTokenResponse.ts +11 -0
- package/clients/authService/models/AccountHolderCreateDto.js +12 -0
- package/clients/authService/models/AccountHolderCreateDto.ts +41 -0
- package/clients/authService/models/AccountHolderCreateDtoEnvelope.js +2 -0
- package/clients/authService/models/AccountHolderCreateDtoEnvelope.ts +14 -0
- package/clients/authService/models/ApiAuthorizationResult.js +2 -0
- package/clients/authService/models/ApiAuthorizationResult.ts +17 -0
- package/clients/authService/models/ApiAuthorizationResultEnvelope.js +2 -0
- package/clients/authService/models/ApiAuthorizationResultEnvelope.ts +14 -0
- package/clients/authService/models/EnrollmentId.js +2 -0
- package/clients/authService/models/EnrollmentId.ts +5 -0
- package/clients/authService/models/ErrorEnvelope.js +2 -0
- package/clients/authService/models/ErrorEnvelope.ts +12 -0
- package/clients/authService/models/ForgotPasswordRequest.js +2 -0
- package/clients/authService/models/ForgotPasswordRequest.ts +8 -0
- package/clients/authService/models/HttpValidationProblemDetails.js +2 -0
- package/clients/authService/models/HttpValidationProblemDetails.ts +5 -0
- package/clients/authService/models/InfoRequest.js +2 -0
- package/clients/authService/models/InfoRequest.ts +10 -0
- package/clients/authService/models/InfoResponse.js +2 -0
- package/clients/authService/models/InfoResponse.ts +9 -0
- package/clients/authService/models/JsonWebKey.js +2 -0
- package/clients/authService/models/JsonWebKey.ts +13 -0
- package/clients/authService/models/JsonWebKeySet.js +2 -0
- package/clients/authService/models/JsonWebKeySet.ts +9 -0
- package/clients/authService/models/JsonWebKeySetEnvelope.js +2 -0
- package/clients/authService/models/JsonWebKeySetEnvelope.ts +14 -0
- package/clients/authService/models/JsonWebToken.js +2 -0
- package/clients/authService/models/JsonWebToken.ts +15 -0
- package/clients/authService/models/JsonWebTokenEnvelope.js +2 -0
- package/clients/authService/models/JsonWebTokenEnvelope.ts +14 -0
- package/clients/authService/models/JsonWebTokenHeader.js +2 -0
- package/clients/authService/models/JsonWebTokenHeader.ts +11 -0
- package/clients/authService/models/JsonWebTokenPayload.js +2 -0
- package/clients/authService/models/JsonWebTokenPayload.ts +17 -0
- package/clients/authService/models/LoginRequest.js +2 -0
- package/clients/authService/models/LoginRequest.ts +11 -0
- package/clients/authService/models/OAuthTokenRequest.js +2 -0
- package/clients/authService/models/OAuthTokenRequest.ts +12 -0
- package/clients/authService/models/OpenIdConfiguration.js +2 -0
- package/clients/authService/models/OpenIdConfiguration.ts +19 -0
- package/clients/authService/models/OpenIdConfigurationEnvelope.js +2 -0
- package/clients/authService/models/OpenIdConfigurationEnvelope.ts +14 -0
- package/clients/authService/models/RefreshRequest.js +2 -0
- package/clients/authService/models/RefreshRequest.ts +8 -0
- package/clients/authService/models/RegisterRequest.js +2 -0
- package/clients/authService/models/RegisterRequest.ts +9 -0
- package/clients/authService/models/ResendConfirmationEmailRequest.js +2 -0
- package/clients/authService/models/ResendConfirmationEmailRequest.ts +8 -0
- package/clients/authService/models/ResetPasswordRequest.js +2 -0
- package/clients/authService/models/ResetPasswordRequest.ts +10 -0
- package/clients/authService/models/SigninModel.js +2 -0
- package/clients/authService/models/SigninModel.ts +9 -0
- package/clients/authService/models/StringListEnvelope.js +2 -0
- package/clients/authService/models/StringListEnvelope.ts +13 -0
- package/clients/authService/models/TenantId.js +2 -0
- package/clients/authService/models/TenantId.ts +5 -0
- package/clients/authService/models/TwoFactorRequest.js +2 -0
- package/clients/authService/models/TwoFactorRequest.ts +12 -0
- package/clients/authService/models/TwoFactorResponse.js +2 -0
- package/clients/authService/models/TwoFactorResponse.ts +12 -0
- package/clients/authService/models/UserId.js +2 -0
- package/clients/authService/models/UserId.ts +5 -0
- package/clients/authService/services/ApplicationsService.js +112 -0
- package/clients/authService/services/ApplicationsService.ts +132 -0
- package/clients/authService/services/AuthService.js +246 -0
- package/clients/authService/services/AuthService.ts +293 -0
- package/clients/authService/services/CheckerService.js +22 -0
- package/clients/authService/services/CheckerService.ts +25 -0
- package/clients/{holderService/services/TenantsService.js → authService/services/OAuthService.js} +52 -51
- package/clients/authService/services/OAuthService.ts +183 -0
- package/clients/authService/services/ResourceService.js +22 -0
- package/clients/authService/services/ResourceService.ts +25 -0
- package/clients/authService/services/UserInfoService.js +36 -0
- package/clients/authService/services/UserInfoService.ts +41 -0
- package/clients/cartService/index.js +3 -7
- package/clients/cartService/index.ts +1 -3
- package/clients/cartService/services/{CartService.js → CartsService.js} +3 -3
- package/clients/cartService/services/{CartService.ts → CartsService.ts} +1 -1
- package/clients/cartService/services/WishListsService.js +0 -321
- package/clients/cartService/services/WishListsService.ts +0 -373
- package/clients/holderService/index.js +1 -5
- package/clients/holderService/index.ts +0 -2
- package/clients/holderService/services/UserService.js +143 -0
- package/clients/holderService/services/UserService.ts +166 -0
- package/clients/identityService/index.js +3 -1
- package/clients/identityService/index.ts +13 -0
- package/clients/identityService/models/AccessTokenResponse.js +2 -0
- package/clients/identityService/models/AccessTokenResponse.ts +11 -0
- package/clients/identityService/models/ForgotPasswordRequest.js +2 -0
- package/clients/identityService/models/ForgotPasswordRequest.ts +8 -0
- package/clients/identityService/models/HttpValidationProblemDetails.js +2 -0
- package/clients/identityService/models/HttpValidationProblemDetails.ts +5 -0
- package/clients/identityService/models/InfoRequest.js +2 -0
- package/clients/identityService/models/InfoRequest.ts +10 -0
- package/clients/identityService/models/InfoResponse.js +2 -0
- package/clients/identityService/models/InfoResponse.ts +9 -0
- package/clients/identityService/models/LoginRequest.js +2 -0
- package/clients/identityService/models/LoginRequest.ts +11 -0
- package/clients/identityService/models/RefreshRequest.js +2 -0
- package/clients/identityService/models/RefreshRequest.ts +8 -0
- package/clients/identityService/models/RegisterRequest.js +2 -0
- package/clients/identityService/models/RegisterRequest.ts +9 -0
- package/clients/identityService/models/ResendConfirmationEmailRequest.js +2 -0
- package/clients/identityService/models/ResendConfirmationEmailRequest.ts +8 -0
- package/clients/identityService/models/ResetPasswordRequest.js +2 -0
- package/clients/identityService/models/ResetPasswordRequest.ts +10 -0
- package/clients/identityService/models/TwoFactorRequest.js +2 -0
- package/clients/identityService/models/TwoFactorRequest.ts +12 -0
- package/clients/identityService/models/TwoFactorResponse.js +2 -0
- package/clients/identityService/models/TwoFactorResponse.ts +12 -0
- package/clients/identityService/services/FenixAllianceAbsModulesWebService.js +246 -0
- package/clients/identityService/services/FenixAllianceAbsModulesWebService.ts +293 -0
- package/clients/tenantService/services/TenantsService.js +33 -57
- package/clients/tenantService/services/TenantsService.ts +33 -65
- package/package.json +1 -1
- package/schemas/authService/schema.s.js +6 -0
- package/schemas/authService/schema.s.ts +894 -0
- package/schemas/identityService/schema.s.ts +382 -1
- package/schemas/tenantService/schema.s.ts +144 -70
- package/tsconfig.json +1 -1
- package/clients/cartService/services/CartLinesService.js +0 -173
- package/clients/cartService/services/CartLinesService.ts +0 -203
- package/clients/cartService/services/ECommerceService.js +0 -1104
- package/clients/cartService/services/ECommerceService.ts +0 -1289
- package/clients/holderService/services/IdentityService.js +0 -364
- package/clients/holderService/services/IdentityService.ts +0 -421
- package/clients/holderService/services/TenantsService.ts +0 -176
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import { ApiError } from './ApiError';
|
|
6
|
+
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
7
|
+
import type { ApiResult } from './ApiResult';
|
|
8
|
+
import { CancelablePromise } from './CancelablePromise';
|
|
9
|
+
import type { OnCancel } from './CancelablePromise';
|
|
10
|
+
import type { OpenAPIConfig } from './OpenAPI';
|
|
11
|
+
|
|
12
|
+
export const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
|
|
13
|
+
return value !== undefined && value !== null;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const isString = (value: any): value is string => {
|
|
17
|
+
return typeof value === 'string';
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const isStringWithValue = (value: any): value is string => {
|
|
21
|
+
return isString(value) && value !== '';
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const isBlob = (value: any): value is Blob => {
|
|
25
|
+
return (
|
|
26
|
+
typeof value === 'object' &&
|
|
27
|
+
typeof value.type === 'string' &&
|
|
28
|
+
typeof value.stream === 'function' &&
|
|
29
|
+
typeof value.arrayBuffer === 'function' &&
|
|
30
|
+
typeof value.constructor === 'function' &&
|
|
31
|
+
typeof value.constructor.name === 'string' &&
|
|
32
|
+
/^(Blob|File)$/.test(value.constructor.name) &&
|
|
33
|
+
/^(Blob|File)$/.test(value[Symbol.toStringTag])
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const isFormData = (value: any): value is FormData => {
|
|
38
|
+
return value instanceof FormData;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const base64 = (str: string): string => {
|
|
42
|
+
try {
|
|
43
|
+
return btoa(str);
|
|
44
|
+
} catch (err) {
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
return Buffer.from(str).toString('base64');
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const getQueryString = (params: Record<string, any>): string => {
|
|
51
|
+
const qs: string[] = [];
|
|
52
|
+
|
|
53
|
+
const append = (key: string, value: any) => {
|
|
54
|
+
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const process = (key: string, value: any) => {
|
|
58
|
+
if (isDefined(value)) {
|
|
59
|
+
if (Array.isArray(value)) {
|
|
60
|
+
value.forEach(v => {
|
|
61
|
+
process(key, v);
|
|
62
|
+
});
|
|
63
|
+
} else if (typeof value === 'object') {
|
|
64
|
+
Object.entries(value).forEach(([k, v]) => {
|
|
65
|
+
process(`${key}[${k}]`, v);
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
append(key, value);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
74
|
+
process(key, value);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
if (qs.length > 0) {
|
|
78
|
+
return `?${qs.join('&')}`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return '';
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
|
85
|
+
const encoder = config.ENCODE_PATH || encodeURI;
|
|
86
|
+
|
|
87
|
+
const path = options.url
|
|
88
|
+
.replace('{api-version}', config.VERSION)
|
|
89
|
+
.replace(/{(.*?)}/g, (substring: string, group: string) => {
|
|
90
|
+
if (options.path?.hasOwnProperty(group)) {
|
|
91
|
+
return encoder(String(options.path[group]));
|
|
92
|
+
}
|
|
93
|
+
return substring;
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const url = `${config.BASE}${path}`;
|
|
97
|
+
if (options.query) {
|
|
98
|
+
return `${url}${getQueryString(options.query)}`;
|
|
99
|
+
}
|
|
100
|
+
return url;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const getFormData = (options: ApiRequestOptions): FormData | undefined => {
|
|
104
|
+
if (options.formData) {
|
|
105
|
+
const formData = new FormData();
|
|
106
|
+
|
|
107
|
+
const process = (key: string, value: any) => {
|
|
108
|
+
if (isString(value) || isBlob(value)) {
|
|
109
|
+
formData.append(key, value);
|
|
110
|
+
} else {
|
|
111
|
+
formData.append(key, JSON.stringify(value));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
Object.entries(options.formData)
|
|
116
|
+
.filter(([_, value]) => isDefined(value))
|
|
117
|
+
.forEach(([key, value]) => {
|
|
118
|
+
if (Array.isArray(value)) {
|
|
119
|
+
value.forEach(v => process(key, v));
|
|
120
|
+
} else {
|
|
121
|
+
process(key, value);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
return formData;
|
|
126
|
+
}
|
|
127
|
+
return undefined;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
131
|
+
|
|
132
|
+
export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
|
|
133
|
+
if (typeof resolver === 'function') {
|
|
134
|
+
return (resolver as Resolver<T>)(options);
|
|
135
|
+
}
|
|
136
|
+
return resolver;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {
|
|
140
|
+
const [token, username, password, additionalHeaders] = await Promise.all([
|
|
141
|
+
resolve(options, config.TOKEN),
|
|
142
|
+
resolve(options, config.USERNAME),
|
|
143
|
+
resolve(options, config.PASSWORD),
|
|
144
|
+
resolve(options, config.HEADERS),
|
|
145
|
+
]);
|
|
146
|
+
|
|
147
|
+
const headers = Object.entries({
|
|
148
|
+
Accept: 'application/json',
|
|
149
|
+
...additionalHeaders,
|
|
150
|
+
...options.headers,
|
|
151
|
+
})
|
|
152
|
+
.filter(([_, value]) => isDefined(value))
|
|
153
|
+
.reduce((headers, [key, value]) => ({
|
|
154
|
+
...headers,
|
|
155
|
+
[key]: String(value),
|
|
156
|
+
}), {} as Record<string, string>);
|
|
157
|
+
|
|
158
|
+
if (isStringWithValue(token)) {
|
|
159
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (isStringWithValue(username) && isStringWithValue(password)) {
|
|
163
|
+
const credentials = base64(`${username}:${password}`);
|
|
164
|
+
headers['Authorization'] = `Basic ${credentials}`;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (options.body) {
|
|
168
|
+
if (options.mediaType) {
|
|
169
|
+
headers['Content-Type'] = options.mediaType;
|
|
170
|
+
} else if (isBlob(options.body)) {
|
|
171
|
+
headers['Content-Type'] = options.body.type || 'application/octet-stream';
|
|
172
|
+
} else if (isString(options.body)) {
|
|
173
|
+
headers['Content-Type'] = 'text/plain';
|
|
174
|
+
} else if (!isFormData(options.body)) {
|
|
175
|
+
headers['Content-Type'] = 'application/json';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return new Headers(headers);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export const getRequestBody = (options: ApiRequestOptions): any => {
|
|
183
|
+
if (options.body !== undefined) {
|
|
184
|
+
if (options.mediaType?.includes('/json')) {
|
|
185
|
+
return JSON.stringify(options.body)
|
|
186
|
+
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
|
187
|
+
return options.body;
|
|
188
|
+
} else {
|
|
189
|
+
return JSON.stringify(options.body);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return undefined;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export const sendRequest = async (
|
|
196
|
+
config: OpenAPIConfig,
|
|
197
|
+
options: ApiRequestOptions,
|
|
198
|
+
url: string,
|
|
199
|
+
body: any,
|
|
200
|
+
formData: FormData | undefined,
|
|
201
|
+
headers: Headers,
|
|
202
|
+
onCancel: OnCancel
|
|
203
|
+
): Promise<Response> => {
|
|
204
|
+
const controller = new AbortController();
|
|
205
|
+
|
|
206
|
+
const request: RequestInit = {
|
|
207
|
+
headers,
|
|
208
|
+
body: body ?? formData,
|
|
209
|
+
method: options.method,
|
|
210
|
+
signal: controller.signal,
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
if (config.WITH_CREDENTIALS) {
|
|
214
|
+
request.credentials = config.CREDENTIALS;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
onCancel(() => controller.abort());
|
|
218
|
+
|
|
219
|
+
return await fetch(url, request);
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {
|
|
223
|
+
if (responseHeader) {
|
|
224
|
+
const content = response.headers.get(responseHeader);
|
|
225
|
+
if (isString(content)) {
|
|
226
|
+
return content;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return undefined;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export const getResponseBody = async (response: Response): Promise<any> => {
|
|
233
|
+
if (response.status !== 204) {
|
|
234
|
+
try {
|
|
235
|
+
const contentType = response.headers.get('Content-Type');
|
|
236
|
+
if (contentType) {
|
|
237
|
+
const jsonTypes = ['application/json', 'application/problem+json']
|
|
238
|
+
const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type));
|
|
239
|
+
if (isJSON) {
|
|
240
|
+
return await response.json();
|
|
241
|
+
} else {
|
|
242
|
+
return await response.text();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} catch (error) {
|
|
246
|
+
console.error(error);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return undefined;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {
|
|
253
|
+
const errors: Record<number, string> = {
|
|
254
|
+
400: 'Bad Request',
|
|
255
|
+
401: 'Unauthorized',
|
|
256
|
+
403: 'Forbidden',
|
|
257
|
+
404: 'Not Found',
|
|
258
|
+
500: 'Internal Server Error',
|
|
259
|
+
502: 'Bad Gateway',
|
|
260
|
+
503: 'Service Unavailable',
|
|
261
|
+
...options.errors,
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const error = errors[result.status];
|
|
265
|
+
if (error) {
|
|
266
|
+
throw new ApiError(options, result, error);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (!result.ok) {
|
|
270
|
+
const errorStatus = result.status ?? 'unknown';
|
|
271
|
+
const errorStatusText = result.statusText ?? 'unknown';
|
|
272
|
+
const errorBody = (() => {
|
|
273
|
+
try {
|
|
274
|
+
return JSON.stringify(result.body, null, 2);
|
|
275
|
+
} catch (e) {
|
|
276
|
+
return undefined;
|
|
277
|
+
}
|
|
278
|
+
})();
|
|
279
|
+
|
|
280
|
+
throw new ApiError(options, result,
|
|
281
|
+
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Request method
|
|
288
|
+
* @param config The OpenAPI configuration object
|
|
289
|
+
* @param options The request options from the service
|
|
290
|
+
* @returns CancelablePromise<T>
|
|
291
|
+
* @throws ApiError
|
|
292
|
+
*/
|
|
293
|
+
export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {
|
|
294
|
+
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
|
295
|
+
try {
|
|
296
|
+
const url = getUrl(config, options);
|
|
297
|
+
const formData = getFormData(options);
|
|
298
|
+
const body = getRequestBody(options);
|
|
299
|
+
const headers = await getHeaders(config, options);
|
|
300
|
+
|
|
301
|
+
if (!onCancel.isCancelled) {
|
|
302
|
+
const response = await sendRequest(config, options, url, body, formData, headers, onCancel);
|
|
303
|
+
const responseBody = await getResponseBody(response);
|
|
304
|
+
const responseHeader = getResponseHeader(response, options.responseHeader);
|
|
305
|
+
|
|
306
|
+
const result: ApiResult = {
|
|
307
|
+
url,
|
|
308
|
+
ok: response.ok,
|
|
309
|
+
status: response.status,
|
|
310
|
+
statusText: response.statusText,
|
|
311
|
+
body: responseHeader ?? responseBody,
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
catchErrorCodes(options, result);
|
|
315
|
+
|
|
316
|
+
resolve(result.body);
|
|
317
|
+
}
|
|
318
|
+
} catch (error) {
|
|
319
|
+
reject(error);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserInfoService = exports.ResourceService = exports.OAuthService = exports.AuthService = exports.CheckerService = exports.ApplicationsService = exports.AccountHolderCreateDto = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.ApiError = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var ApiError_1 = require("./core/ApiError");
|
|
9
|
+
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } });
|
|
10
|
+
var CancelablePromise_1 = require("./core/CancelablePromise");
|
|
11
|
+
Object.defineProperty(exports, "CancelablePromise", { enumerable: true, get: function () { return CancelablePromise_1.CancelablePromise; } });
|
|
12
|
+
Object.defineProperty(exports, "CancelError", { enumerable: true, get: function () { return CancelablePromise_1.CancelError; } });
|
|
13
|
+
var OpenAPI_1 = require("./core/OpenAPI");
|
|
14
|
+
Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } });
|
|
15
|
+
var AccountHolderCreateDto_1 = require("./models/AccountHolderCreateDto");
|
|
16
|
+
Object.defineProperty(exports, "AccountHolderCreateDto", { enumerable: true, get: function () { return AccountHolderCreateDto_1.AccountHolderCreateDto; } });
|
|
17
|
+
var ApplicationsService_1 = require("./services/ApplicationsService");
|
|
18
|
+
Object.defineProperty(exports, "ApplicationsService", { enumerable: true, get: function () { return ApplicationsService_1.ApplicationsService; } });
|
|
19
|
+
var CheckerService_1 = require("./services/CheckerService");
|
|
20
|
+
Object.defineProperty(exports, "CheckerService", { enumerable: true, get: function () { return CheckerService_1.CheckerService; } });
|
|
21
|
+
var AuthService_1 = require("./services/AuthService");
|
|
22
|
+
Object.defineProperty(exports, "AuthService", { enumerable: true, get: function () { return AuthService_1.AuthService; } });
|
|
23
|
+
var OAuthService_1 = require("./services/OAuthService");
|
|
24
|
+
Object.defineProperty(exports, "OAuthService", { enumerable: true, get: function () { return OAuthService_1.OAuthService; } });
|
|
25
|
+
var ResourceService_1 = require("./services/ResourceService");
|
|
26
|
+
Object.defineProperty(exports, "ResourceService", { enumerable: true, get: function () { return ResourceService_1.ResourceService; } });
|
|
27
|
+
var UserInfoService_1 = require("./services/UserInfoService");
|
|
28
|
+
Object.defineProperty(exports, "UserInfoService", { enumerable: true, get: function () { return UserInfoService_1.UserInfoService; } });
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export { ApiError } from './core/ApiError';
|
|
6
|
+
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
7
|
+
export { OpenAPI } from './core/OpenAPI';
|
|
8
|
+
export type { OpenAPIConfig } from './core/OpenAPI';
|
|
9
|
+
|
|
10
|
+
export type { AccessTokenResponse } from './models/AccessTokenResponse';
|
|
11
|
+
export { AccountHolderCreateDto } from './models/AccountHolderCreateDto';
|
|
12
|
+
export type { AccountHolderCreateDtoEnvelope } from './models/AccountHolderCreateDtoEnvelope';
|
|
13
|
+
export type { ApiAuthorizationResult } from './models/ApiAuthorizationResult';
|
|
14
|
+
export type { ApiAuthorizationResultEnvelope } from './models/ApiAuthorizationResultEnvelope';
|
|
15
|
+
export type { EnrollmentId } from './models/EnrollmentId';
|
|
16
|
+
export type { ErrorEnvelope } from './models/ErrorEnvelope';
|
|
17
|
+
export type { ForgotPasswordRequest } from './models/ForgotPasswordRequest';
|
|
18
|
+
export type { HttpValidationProblemDetails } from './models/HttpValidationProblemDetails';
|
|
19
|
+
export type { InfoRequest } from './models/InfoRequest';
|
|
20
|
+
export type { InfoResponse } from './models/InfoResponse';
|
|
21
|
+
export type { JsonWebKey } from './models/JsonWebKey';
|
|
22
|
+
export type { JsonWebKeySet } from './models/JsonWebKeySet';
|
|
23
|
+
export type { JsonWebKeySetEnvelope } from './models/JsonWebKeySetEnvelope';
|
|
24
|
+
export type { JsonWebToken } from './models/JsonWebToken';
|
|
25
|
+
export type { JsonWebTokenEnvelope } from './models/JsonWebTokenEnvelope';
|
|
26
|
+
export type { JsonWebTokenHeader } from './models/JsonWebTokenHeader';
|
|
27
|
+
export type { JsonWebTokenPayload } from './models/JsonWebTokenPayload';
|
|
28
|
+
export type { LoginRequest } from './models/LoginRequest';
|
|
29
|
+
export type { OAuthTokenRequest } from './models/OAuthTokenRequest';
|
|
30
|
+
export type { OpenIdConfiguration } from './models/OpenIdConfiguration';
|
|
31
|
+
export type { OpenIdConfigurationEnvelope } from './models/OpenIdConfigurationEnvelope';
|
|
32
|
+
export type { RefreshRequest } from './models/RefreshRequest';
|
|
33
|
+
export type { RegisterRequest } from './models/RegisterRequest';
|
|
34
|
+
export type { ResendConfirmationEmailRequest } from './models/ResendConfirmationEmailRequest';
|
|
35
|
+
export type { ResetPasswordRequest } from './models/ResetPasswordRequest';
|
|
36
|
+
export type { SigninModel } from './models/SigninModel';
|
|
37
|
+
export type { StringListEnvelope } from './models/StringListEnvelope';
|
|
38
|
+
export type { TenantId } from './models/TenantId';
|
|
39
|
+
export type { TwoFactorRequest } from './models/TwoFactorRequest';
|
|
40
|
+
export type { TwoFactorResponse } from './models/TwoFactorResponse';
|
|
41
|
+
export type { UserId } from './models/UserId';
|
|
42
|
+
|
|
43
|
+
export { ApplicationsService } from './services/ApplicationsService';
|
|
44
|
+
export { CheckerService } from './services/CheckerService';
|
|
45
|
+
export { AuthService } from './services/AuthService';
|
|
46
|
+
export { OAuthService } from './services/OAuthService';
|
|
47
|
+
export { ResourceService } from './services/ResourceService';
|
|
48
|
+
export { UserInfoService } from './services/UserInfoService';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type AccessTokenResponse = {
|
|
6
|
+
readonly tokenType?: string | null;
|
|
7
|
+
accessToken: string | null;
|
|
8
|
+
expiresIn: number;
|
|
9
|
+
refreshToken: string | null;
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountHolderCreateDto = void 0;
|
|
4
|
+
var AccountHolderCreateDto;
|
|
5
|
+
(function (AccountHolderCreateDto) {
|
|
6
|
+
let gender;
|
|
7
|
+
(function (gender) {
|
|
8
|
+
gender[gender["_0"] = 0] = "_0";
|
|
9
|
+
gender[gender["_1"] = 1] = "_1";
|
|
10
|
+
gender[gender["_2"] = 2] = "_2";
|
|
11
|
+
})(gender = AccountHolderCreateDto.gender || (AccountHolderCreateDto.gender = {}));
|
|
12
|
+
})(AccountHolderCreateDto = exports.AccountHolderCreateDto || (exports.AccountHolderCreateDto = {}));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type AccountHolderCreateDto = {
|
|
6
|
+
readonly id?: string;
|
|
7
|
+
readonly timestamp?: string;
|
|
8
|
+
qualifiedName?: string | null;
|
|
9
|
+
birthday?: string;
|
|
10
|
+
firstName?: string | null;
|
|
11
|
+
lastName?: string | null;
|
|
12
|
+
publicName?: string | null;
|
|
13
|
+
idProvider?: string | null;
|
|
14
|
+
gender?: AccountHolderCreateDto.gender;
|
|
15
|
+
email?: string | null;
|
|
16
|
+
about?: string | null;
|
|
17
|
+
status?: string | null;
|
|
18
|
+
jobTitle?: string | null;
|
|
19
|
+
gitHubUrl?: string | null;
|
|
20
|
+
websiteUrl?: string | null;
|
|
21
|
+
twitterUrl?: string | null;
|
|
22
|
+
facebookUrl?: string | null;
|
|
23
|
+
youTubeUrl?: string | null;
|
|
24
|
+
linkedInUrl?: string | null;
|
|
25
|
+
instagramUrl?: string | null;
|
|
26
|
+
timezoneId?: string | null;
|
|
27
|
+
languageId?: string | null;
|
|
28
|
+
currencyId?: string | null;
|
|
29
|
+
countryId?: string | null;
|
|
30
|
+
stateId?: string | null;
|
|
31
|
+
cityId?: string | null;
|
|
32
|
+
password?: string | null;
|
|
33
|
+
};
|
|
34
|
+
export namespace AccountHolderCreateDto {
|
|
35
|
+
export enum gender {
|
|
36
|
+
'_0' = 0,
|
|
37
|
+
'_1' = 1,
|
|
38
|
+
'_2' = 2,
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { AccountHolderCreateDto } from './AccountHolderCreateDto';
|
|
6
|
+
export type AccountHolderCreateDtoEnvelope = {
|
|
7
|
+
readonly isSuccess?: boolean;
|
|
8
|
+
errorMessage?: string | null;
|
|
9
|
+
correlationId?: string | null;
|
|
10
|
+
readonly timestamp?: string;
|
|
11
|
+
readonly activityId?: string | null;
|
|
12
|
+
result?: AccountHolderCreateDto;
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { EnrollmentId } from './EnrollmentId';
|
|
6
|
+
import type { TenantId } from './TenantId';
|
|
7
|
+
import type { UserId } from './UserId';
|
|
8
|
+
export type ApiAuthorizationResult = {
|
|
9
|
+
userId?: UserId;
|
|
10
|
+
tenantId?: TenantId;
|
|
11
|
+
enrollmentId?: EnrollmentId;
|
|
12
|
+
correlationId?: string | null;
|
|
13
|
+
scopes?: Array<string> | null;
|
|
14
|
+
error?: string | null;
|
|
15
|
+
applicationId?: string | null;
|
|
16
|
+
};
|
|
17
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { ApiAuthorizationResult } from './ApiAuthorizationResult';
|
|
6
|
+
export type ApiAuthorizationResultEnvelope = {
|
|
7
|
+
readonly isSuccess?: boolean;
|
|
8
|
+
errorMessage?: string | null;
|
|
9
|
+
correlationId?: string | null;
|
|
10
|
+
readonly timestamp?: string;
|
|
11
|
+
readonly activityId?: string | null;
|
|
12
|
+
result?: ApiAuthorizationResult;
|
|
13
|
+
};
|
|
14
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type ErrorEnvelope = {
|
|
6
|
+
readonly isSuccess?: boolean;
|
|
7
|
+
errorMessage?: string | null;
|
|
8
|
+
correlationId?: string | null;
|
|
9
|
+
readonly timestamp?: string;
|
|
10
|
+
readonly activityId?: string | null;
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type InfoRequest = {
|
|
6
|
+
newEmail?: string | null;
|
|
7
|
+
newPassword?: string | null;
|
|
8
|
+
oldPassword?: string | null;
|
|
9
|
+
};
|
|
10
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type JsonWebKey = {
|
|
6
|
+
kid?: string | null;
|
|
7
|
+
nbf?: number;
|
|
8
|
+
use?: string | null;
|
|
9
|
+
kty?: string | null;
|
|
10
|
+
'e'?: string | null;
|
|
11
|
+
'n'?: string | null;
|
|
12
|
+
};
|
|
13
|
+
|