@emilgroup/customer-sdk-node 1.9.1 → 1.10.0
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/.openapi-generator/FILES +5 -0
- package/README.md +2 -2
- package/api/authentication-api.ts +601 -0
- package/api/claims-api.ts +16 -16
- package/api/customers-api.ts +72 -1770
- package/api/documents-api.ts +442 -0
- package/api/invites-api.ts +443 -0
- package/api/invoices-api.ts +245 -0
- package/api/payments-api.ts +277 -0
- package/api/policies-api.ts +16 -16
- package/api/products-api.ts +16 -16
- package/api.ts +10 -0
- package/dist/api/authentication-api.d.ts +332 -0
- package/dist/api/authentication-api.js +604 -0
- package/dist/api/claims-api.d.ts +16 -16
- package/dist/api/claims-api.js +12 -12
- package/dist/api/customers-api.d.ts +0 -954
- package/dist/api/customers-api.js +20 -1381
- package/dist/api/documents-api.d.ts +262 -0
- package/dist/api/documents-api.js +417 -0
- package/dist/api/invites-api.d.ts +248 -0
- package/dist/api/invites-api.js +456 -0
- package/dist/api/invoices-api.d.ts +150 -0
- package/dist/api/invoices-api.js +253 -0
- package/dist/api/payments-api.d.ts +162 -0
- package/dist/api/payments-api.js +306 -0
- package/dist/api/policies-api.d.ts +16 -16
- package/dist/api/policies-api.js +12 -12
- package/dist/api/products-api.d.ts +16 -16
- package/dist/api/products-api.js +12 -12
- package/dist/api.d.ts +5 -0
- package/dist/api.js +5 -0
- package/dist/models/account-class.d.ts +26 -1
- package/dist/models/account-class.js +7 -0
- package/dist/models/create-account-request-dto.d.ts +39 -9
- package/dist/models/create-account-request-dto.js +11 -1
- package/models/account-class.ts +29 -1
- package/models/create-account-request-dto.ts +41 -9
- package/package.json +2 -2
package/.openapi-generator/FILES
CHANGED
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
.openapi-generator-ignore
|
|
4
4
|
README.md
|
|
5
5
|
api.ts
|
|
6
|
+
api/authentication-api.ts
|
|
6
7
|
api/claims-api.ts
|
|
7
8
|
api/customers-api.ts
|
|
9
|
+
api/documents-api.ts
|
|
10
|
+
api/invites-api.ts
|
|
11
|
+
api/invoices-api.ts
|
|
12
|
+
api/payments-api.ts
|
|
8
13
|
api/policies-api.ts
|
|
9
14
|
api/products-api.ts
|
|
10
15
|
base.ts
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/customer-sdk-node@1.
|
|
20
|
+
npm install @emilgroup/customer-sdk-node@1.10.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/customer-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/customer-sdk-node@1.10.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `CustomersApi`.
|
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL CustomerService
|
|
5
|
+
* The EMIL CustomerService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { ForgotPasswordRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { InitiateAuthRequestDto } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { InitiateAuthResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { RefreshTokenDto } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import { ResetPasswordByCustomerRequestDto } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import { RespondToAuthChallengeClass } from '../models';
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import { RespondToAuthChallengeRequestDto } from '../models';
|
|
37
|
+
// URLSearchParams not necessarily used
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
import { URL, URLSearchParams } from 'url';
|
|
40
|
+
const FormData = require('form-data');
|
|
41
|
+
/**
|
|
42
|
+
* AuthenticationApi - axios parameter creator
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
46
|
+
return {
|
|
47
|
+
/**
|
|
48
|
+
* Send a customer a reset-password token via email.
|
|
49
|
+
* @summary Forgot password by customer
|
|
50
|
+
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
51
|
+
* @param {*} [options] Override http request option.
|
|
52
|
+
* @throws {RequiredError}
|
|
53
|
+
*/
|
|
54
|
+
forgotPassword: async (forgotPasswordRequestDto: ForgotPasswordRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
55
|
+
// verify required parameter 'forgotPasswordRequestDto' is not null or undefined
|
|
56
|
+
assertParamExists('forgotPassword', 'forgotPasswordRequestDto', forgotPasswordRequestDto)
|
|
57
|
+
const localVarPath = `/v1/customers/forgot-password`;
|
|
58
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
59
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
60
|
+
let baseOptions;
|
|
61
|
+
let baseAccessToken;
|
|
62
|
+
if (configuration) {
|
|
63
|
+
baseOptions = configuration.baseOptions;
|
|
64
|
+
baseAccessToken = configuration.accessToken;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
68
|
+
const localVarHeaderParameter = {} as any;
|
|
69
|
+
const localVarQueryParameter = {} as any;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
74
|
+
|
|
75
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
76
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
78
|
+
localVarRequestOptions.data = serializeDataIfNeeded(forgotPasswordRequestDto, localVarRequestOptions, configuration)
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
url: toPathString(localVarUrlObj),
|
|
82
|
+
options: localVarRequestOptions,
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
87
|
+
* @summary Initiate auth by customer
|
|
88
|
+
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
initiateAuth: async (initiateAuthRequestDto: InitiateAuthRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
93
|
+
// verify required parameter 'initiateAuthRequestDto' is not null or undefined
|
|
94
|
+
assertParamExists('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto)
|
|
95
|
+
const localVarPath = `/v1/customers/auth/initiate`;
|
|
96
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
97
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
98
|
+
let baseOptions;
|
|
99
|
+
let baseAccessToken;
|
|
100
|
+
if (configuration) {
|
|
101
|
+
baseOptions = configuration.baseOptions;
|
|
102
|
+
baseAccessToken = configuration.accessToken;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
106
|
+
const localVarHeaderParameter = {} as any;
|
|
107
|
+
const localVarQueryParameter = {} as any;
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
112
|
+
|
|
113
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
114
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
115
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
116
|
+
localVarRequestOptions.data = serializeDataIfNeeded(initiateAuthRequestDto, localVarRequestOptions, configuration)
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
url: toPathString(localVarUrlObj),
|
|
120
|
+
options: localVarRequestOptions,
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* Get new access token, new refresh token.
|
|
125
|
+
* @summary Refresh token by customer
|
|
126
|
+
* @param {RefreshTokenDto} refreshTokenDto
|
|
127
|
+
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
*/
|
|
131
|
+
refreshToken: async (refreshTokenDto: RefreshTokenDto, cookie?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
132
|
+
// verify required parameter 'refreshTokenDto' is not null or undefined
|
|
133
|
+
assertParamExists('refreshToken', 'refreshTokenDto', refreshTokenDto)
|
|
134
|
+
const localVarPath = `/v1/customers/refresh-token`;
|
|
135
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
136
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
137
|
+
let baseOptions;
|
|
138
|
+
let baseAccessToken;
|
|
139
|
+
if (configuration) {
|
|
140
|
+
baseOptions = configuration.baseOptions;
|
|
141
|
+
baseAccessToken = configuration.accessToken;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
145
|
+
const localVarHeaderParameter = {} as any;
|
|
146
|
+
const localVarQueryParameter = {} as any;
|
|
147
|
+
|
|
148
|
+
if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
149
|
+
localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
155
|
+
|
|
156
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
157
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
158
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
159
|
+
localVarRequestOptions.data = serializeDataIfNeeded(refreshTokenDto, localVarRequestOptions, configuration)
|
|
160
|
+
|
|
161
|
+
return {
|
|
162
|
+
url: toPathString(localVarUrlObj),
|
|
163
|
+
options: localVarRequestOptions,
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
/**
|
|
167
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
168
|
+
* @summary Change password by customer
|
|
169
|
+
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
170
|
+
* @param {*} [options] Override http request option.
|
|
171
|
+
* @throws {RequiredError}
|
|
172
|
+
*/
|
|
173
|
+
resetPassword: async (resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
174
|
+
// verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
|
|
175
|
+
assertParamExists('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto)
|
|
176
|
+
const localVarPath = `/v1/customers/reset-password`;
|
|
177
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
178
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
179
|
+
let baseOptions;
|
|
180
|
+
let baseAccessToken;
|
|
181
|
+
if (configuration) {
|
|
182
|
+
baseOptions = configuration.baseOptions;
|
|
183
|
+
baseAccessToken = configuration.accessToken;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
187
|
+
const localVarHeaderParameter = {} as any;
|
|
188
|
+
const localVarQueryParameter = {} as any;
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
193
|
+
|
|
194
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
197
|
+
localVarRequestOptions.data = serializeDataIfNeeded(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration)
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
url: toPathString(localVarUrlObj),
|
|
201
|
+
options: localVarRequestOptions,
|
|
202
|
+
};
|
|
203
|
+
},
|
|
204
|
+
/**
|
|
205
|
+
* Respond to the auth challenge to get new access token, refresh token after successful login.
|
|
206
|
+
* @summary Respond to auth challenge by customer
|
|
207
|
+
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
208
|
+
* @param {*} [options] Override http request option.
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
*/
|
|
211
|
+
respondToAuthChallenge: async (respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
212
|
+
// verify required parameter 'respondToAuthChallengeRequestDto' is not null or undefined
|
|
213
|
+
assertParamExists('respondToAuthChallenge', 'respondToAuthChallengeRequestDto', respondToAuthChallengeRequestDto)
|
|
214
|
+
const localVarPath = `/v1/customers/auth/respond`;
|
|
215
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
216
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
217
|
+
let baseOptions;
|
|
218
|
+
let baseAccessToken;
|
|
219
|
+
if (configuration) {
|
|
220
|
+
baseOptions = configuration.baseOptions;
|
|
221
|
+
baseAccessToken = configuration.accessToken;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
225
|
+
const localVarHeaderParameter = {} as any;
|
|
226
|
+
const localVarQueryParameter = {} as any;
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
231
|
+
|
|
232
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
233
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
234
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
235
|
+
localVarRequestOptions.data = serializeDataIfNeeded(respondToAuthChallengeRequestDto, localVarRequestOptions, configuration)
|
|
236
|
+
|
|
237
|
+
return {
|
|
238
|
+
url: toPathString(localVarUrlObj),
|
|
239
|
+
options: localVarRequestOptions,
|
|
240
|
+
};
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
244
|
+
* @summary Verify a reset password token
|
|
245
|
+
* @param {string} resetToken reset password token
|
|
246
|
+
* @param {*} [options] Override http request option.
|
|
247
|
+
* @throws {RequiredError}
|
|
248
|
+
*/
|
|
249
|
+
verifyResetPasswordToken: async (resetToken: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
250
|
+
// verify required parameter 'resetToken' is not null or undefined
|
|
251
|
+
assertParamExists('verifyResetPasswordToken', 'resetToken', resetToken)
|
|
252
|
+
const localVarPath = `/v1/customers/verify-reset-password`;
|
|
253
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
254
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
255
|
+
let baseOptions;
|
|
256
|
+
let baseAccessToken;
|
|
257
|
+
if (configuration) {
|
|
258
|
+
baseOptions = configuration.baseOptions;
|
|
259
|
+
baseAccessToken = configuration.accessToken;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
263
|
+
const localVarHeaderParameter = {} as any;
|
|
264
|
+
const localVarQueryParameter = {} as any;
|
|
265
|
+
|
|
266
|
+
if (resetToken !== undefined) {
|
|
267
|
+
localVarQueryParameter['resetToken'] = resetToken;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
273
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
274
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
275
|
+
|
|
276
|
+
return {
|
|
277
|
+
url: toPathString(localVarUrlObj),
|
|
278
|
+
options: localVarRequestOptions,
|
|
279
|
+
};
|
|
280
|
+
},
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* AuthenticationApi - functional programming interface
|
|
286
|
+
* @export
|
|
287
|
+
*/
|
|
288
|
+
export const AuthenticationApiFp = function(configuration?: Configuration) {
|
|
289
|
+
const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration)
|
|
290
|
+
return {
|
|
291
|
+
/**
|
|
292
|
+
* Send a customer a reset-password token via email.
|
|
293
|
+
* @summary Forgot password by customer
|
|
294
|
+
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
295
|
+
* @param {*} [options] Override http request option.
|
|
296
|
+
* @throws {RequiredError}
|
|
297
|
+
*/
|
|
298
|
+
async forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
299
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options);
|
|
300
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
301
|
+
},
|
|
302
|
+
/**
|
|
303
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
304
|
+
* @summary Initiate auth by customer
|
|
305
|
+
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
306
|
+
* @param {*} [options] Override http request option.
|
|
307
|
+
* @throws {RequiredError}
|
|
308
|
+
*/
|
|
309
|
+
async initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateAuthResponseClass>> {
|
|
310
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options);
|
|
311
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
312
|
+
},
|
|
313
|
+
/**
|
|
314
|
+
* Get new access token, new refresh token.
|
|
315
|
+
* @summary Refresh token by customer
|
|
316
|
+
* @param {RefreshTokenDto} refreshTokenDto
|
|
317
|
+
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
318
|
+
* @param {*} [options] Override http request option.
|
|
319
|
+
* @throws {RequiredError}
|
|
320
|
+
*/
|
|
321
|
+
async refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
322
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options);
|
|
323
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
327
|
+
* @summary Change password by customer
|
|
328
|
+
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
329
|
+
* @param {*} [options] Override http request option.
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
*/
|
|
332
|
+
async resetPassword(resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
333
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.resetPassword(resetPasswordByCustomerRequestDto, options);
|
|
334
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
* Respond to the auth challenge to get new access token, refresh token after successful login.
|
|
338
|
+
* @summary Respond to auth challenge by customer
|
|
339
|
+
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
*/
|
|
343
|
+
async respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RespondToAuthChallengeClass>> {
|
|
344
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.respondToAuthChallenge(respondToAuthChallengeRequestDto, options);
|
|
345
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
346
|
+
},
|
|
347
|
+
/**
|
|
348
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
349
|
+
* @summary Verify a reset password token
|
|
350
|
+
* @param {string} resetToken reset password token
|
|
351
|
+
* @param {*} [options] Override http request option.
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
*/
|
|
354
|
+
async verifyResetPasswordToken(resetToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
355
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options);
|
|
356
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
357
|
+
},
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* AuthenticationApi - factory interface
|
|
363
|
+
* @export
|
|
364
|
+
*/
|
|
365
|
+
export const AuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
366
|
+
const localVarFp = AuthenticationApiFp(configuration)
|
|
367
|
+
return {
|
|
368
|
+
/**
|
|
369
|
+
* Send a customer a reset-password token via email.
|
|
370
|
+
* @summary Forgot password by customer
|
|
371
|
+
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @throws {RequiredError}
|
|
374
|
+
*/
|
|
375
|
+
forgotPassword(forgotPasswordRequestDto: ForgotPasswordRequestDto, options?: any): AxiosPromise<void> {
|
|
376
|
+
return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then((request) => request(axios, basePath));
|
|
377
|
+
},
|
|
378
|
+
/**
|
|
379
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
380
|
+
* @summary Initiate auth by customer
|
|
381
|
+
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
382
|
+
* @param {*} [options] Override http request option.
|
|
383
|
+
* @throws {RequiredError}
|
|
384
|
+
*/
|
|
385
|
+
initiateAuth(initiateAuthRequestDto: InitiateAuthRequestDto, options?: any): AxiosPromise<InitiateAuthResponseClass> {
|
|
386
|
+
return localVarFp.initiateAuth(initiateAuthRequestDto, options).then((request) => request(axios, basePath));
|
|
387
|
+
},
|
|
388
|
+
/**
|
|
389
|
+
* Get new access token, new refresh token.
|
|
390
|
+
* @summary Refresh token by customer
|
|
391
|
+
* @param {RefreshTokenDto} refreshTokenDto
|
|
392
|
+
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
393
|
+
* @param {*} [options] Override http request option.
|
|
394
|
+
* @throws {RequiredError}
|
|
395
|
+
*/
|
|
396
|
+
refreshToken(refreshTokenDto: RefreshTokenDto, cookie?: string, options?: any): AxiosPromise<void> {
|
|
397
|
+
return localVarFp.refreshToken(refreshTokenDto, cookie, options).then((request) => request(axios, basePath));
|
|
398
|
+
},
|
|
399
|
+
/**
|
|
400
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
401
|
+
* @summary Change password by customer
|
|
402
|
+
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
403
|
+
* @param {*} [options] Override http request option.
|
|
404
|
+
* @throws {RequiredError}
|
|
405
|
+
*/
|
|
406
|
+
resetPassword(resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto, options?: any): AxiosPromise<void> {
|
|
407
|
+
return localVarFp.resetPassword(resetPasswordByCustomerRequestDto, options).then((request) => request(axios, basePath));
|
|
408
|
+
},
|
|
409
|
+
/**
|
|
410
|
+
* Respond to the auth challenge to get new access token, refresh token after successful login.
|
|
411
|
+
* @summary Respond to auth challenge by customer
|
|
412
|
+
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
413
|
+
* @param {*} [options] Override http request option.
|
|
414
|
+
* @throws {RequiredError}
|
|
415
|
+
*/
|
|
416
|
+
respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: any): AxiosPromise<RespondToAuthChallengeClass> {
|
|
417
|
+
return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then((request) => request(axios, basePath));
|
|
418
|
+
},
|
|
419
|
+
/**
|
|
420
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
421
|
+
* @summary Verify a reset password token
|
|
422
|
+
* @param {string} resetToken reset password token
|
|
423
|
+
* @param {*} [options] Override http request option.
|
|
424
|
+
* @throws {RequiredError}
|
|
425
|
+
*/
|
|
426
|
+
verifyResetPasswordToken(resetToken: string, options?: any): AxiosPromise<void> {
|
|
427
|
+
return localVarFp.verifyResetPasswordToken(resetToken, options).then((request) => request(axios, basePath));
|
|
428
|
+
},
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Request parameters for forgotPassword operation in AuthenticationApi.
|
|
434
|
+
* @export
|
|
435
|
+
* @interface AuthenticationApiForgotPasswordRequest
|
|
436
|
+
*/
|
|
437
|
+
export interface AuthenticationApiForgotPasswordRequest {
|
|
438
|
+
/**
|
|
439
|
+
*
|
|
440
|
+
* @type {ForgotPasswordRequestDto}
|
|
441
|
+
* @memberof AuthenticationApiForgotPassword
|
|
442
|
+
*/
|
|
443
|
+
readonly forgotPasswordRequestDto: ForgotPasswordRequestDto
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Request parameters for initiateAuth operation in AuthenticationApi.
|
|
448
|
+
* @export
|
|
449
|
+
* @interface AuthenticationApiInitiateAuthRequest
|
|
450
|
+
*/
|
|
451
|
+
export interface AuthenticationApiInitiateAuthRequest {
|
|
452
|
+
/**
|
|
453
|
+
*
|
|
454
|
+
* @type {InitiateAuthRequestDto}
|
|
455
|
+
* @memberof AuthenticationApiInitiateAuth
|
|
456
|
+
*/
|
|
457
|
+
readonly initiateAuthRequestDto: InitiateAuthRequestDto
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Request parameters for refreshToken operation in AuthenticationApi.
|
|
462
|
+
* @export
|
|
463
|
+
* @interface AuthenticationApiRefreshTokenRequest
|
|
464
|
+
*/
|
|
465
|
+
export interface AuthenticationApiRefreshTokenRequest {
|
|
466
|
+
/**
|
|
467
|
+
*
|
|
468
|
+
* @type {RefreshTokenDto}
|
|
469
|
+
* @memberof AuthenticationApiRefreshToken
|
|
470
|
+
*/
|
|
471
|
+
readonly refreshTokenDto: RefreshTokenDto
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* HTTP only cookie that was sent during login.
|
|
475
|
+
* @type {string}
|
|
476
|
+
* @memberof AuthenticationApiRefreshToken
|
|
477
|
+
*/
|
|
478
|
+
readonly cookie?: string
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Request parameters for resetPassword operation in AuthenticationApi.
|
|
483
|
+
* @export
|
|
484
|
+
* @interface AuthenticationApiResetPasswordRequest
|
|
485
|
+
*/
|
|
486
|
+
export interface AuthenticationApiResetPasswordRequest {
|
|
487
|
+
/**
|
|
488
|
+
*
|
|
489
|
+
* @type {ResetPasswordByCustomerRequestDto}
|
|
490
|
+
* @memberof AuthenticationApiResetPassword
|
|
491
|
+
*/
|
|
492
|
+
readonly resetPasswordByCustomerRequestDto: ResetPasswordByCustomerRequestDto
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Request parameters for respondToAuthChallenge operation in AuthenticationApi.
|
|
497
|
+
* @export
|
|
498
|
+
* @interface AuthenticationApiRespondToAuthChallengeRequest
|
|
499
|
+
*/
|
|
500
|
+
export interface AuthenticationApiRespondToAuthChallengeRequest {
|
|
501
|
+
/**
|
|
502
|
+
*
|
|
503
|
+
* @type {RespondToAuthChallengeRequestDto}
|
|
504
|
+
* @memberof AuthenticationApiRespondToAuthChallenge
|
|
505
|
+
*/
|
|
506
|
+
readonly respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Request parameters for verifyResetPasswordToken operation in AuthenticationApi.
|
|
511
|
+
* @export
|
|
512
|
+
* @interface AuthenticationApiVerifyResetPasswordTokenRequest
|
|
513
|
+
*/
|
|
514
|
+
export interface AuthenticationApiVerifyResetPasswordTokenRequest {
|
|
515
|
+
/**
|
|
516
|
+
* reset password token
|
|
517
|
+
* @type {string}
|
|
518
|
+
* @memberof AuthenticationApiVerifyResetPasswordToken
|
|
519
|
+
*/
|
|
520
|
+
readonly resetToken: string
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* AuthenticationApi - object-oriented interface
|
|
525
|
+
* @export
|
|
526
|
+
* @class AuthenticationApi
|
|
527
|
+
* @extends {BaseAPI}
|
|
528
|
+
*/
|
|
529
|
+
export class AuthenticationApi extends BaseAPI {
|
|
530
|
+
/**
|
|
531
|
+
* Send a customer a reset-password token via email.
|
|
532
|
+
* @summary Forgot password by customer
|
|
533
|
+
* @param {AuthenticationApiForgotPasswordRequest} requestParameters Request parameters.
|
|
534
|
+
* @param {*} [options] Override http request option.
|
|
535
|
+
* @throws {RequiredError}
|
|
536
|
+
* @memberof AuthenticationApi
|
|
537
|
+
*/
|
|
538
|
+
public forgotPassword(requestParameters: AuthenticationApiForgotPasswordRequest, options?: AxiosRequestConfig) {
|
|
539
|
+
return AuthenticationApiFp(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
544
|
+
* @summary Initiate auth by customer
|
|
545
|
+
* @param {AuthenticationApiInitiateAuthRequest} requestParameters Request parameters.
|
|
546
|
+
* @param {*} [options] Override http request option.
|
|
547
|
+
* @throws {RequiredError}
|
|
548
|
+
* @memberof AuthenticationApi
|
|
549
|
+
*/
|
|
550
|
+
public initiateAuth(requestParameters: AuthenticationApiInitiateAuthRequest, options?: AxiosRequestConfig) {
|
|
551
|
+
return AuthenticationApiFp(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Get new access token, new refresh token.
|
|
556
|
+
* @summary Refresh token by customer
|
|
557
|
+
* @param {AuthenticationApiRefreshTokenRequest} requestParameters Request parameters.
|
|
558
|
+
* @param {*} [options] Override http request option.
|
|
559
|
+
* @throws {RequiredError}
|
|
560
|
+
* @memberof AuthenticationApi
|
|
561
|
+
*/
|
|
562
|
+
public refreshToken(requestParameters: AuthenticationApiRefreshTokenRequest, options?: AxiosRequestConfig) {
|
|
563
|
+
return AuthenticationApiFp(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then((request) => request(this.axios, this.basePath));
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
568
|
+
* @summary Change password by customer
|
|
569
|
+
* @param {AuthenticationApiResetPasswordRequest} requestParameters Request parameters.
|
|
570
|
+
* @param {*} [options] Override http request option.
|
|
571
|
+
* @throws {RequiredError}
|
|
572
|
+
* @memberof AuthenticationApi
|
|
573
|
+
*/
|
|
574
|
+
public resetPassword(requestParameters: AuthenticationApiResetPasswordRequest, options?: AxiosRequestConfig) {
|
|
575
|
+
return AuthenticationApiFp(this.configuration).resetPassword(requestParameters.resetPasswordByCustomerRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Respond to the auth challenge to get new access token, refresh token after successful login.
|
|
580
|
+
* @summary Respond to auth challenge by customer
|
|
581
|
+
* @param {AuthenticationApiRespondToAuthChallengeRequest} requestParameters Request parameters.
|
|
582
|
+
* @param {*} [options] Override http request option.
|
|
583
|
+
* @throws {RequiredError}
|
|
584
|
+
* @memberof AuthenticationApi
|
|
585
|
+
*/
|
|
586
|
+
public respondToAuthChallenge(requestParameters: AuthenticationApiRespondToAuthChallengeRequest, options?: AxiosRequestConfig) {
|
|
587
|
+
return AuthenticationApiFp(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
592
|
+
* @summary Verify a reset password token
|
|
593
|
+
* @param {AuthenticationApiVerifyResetPasswordTokenRequest} requestParameters Request parameters.
|
|
594
|
+
* @param {*} [options] Override http request option.
|
|
595
|
+
* @throws {RequiredError}
|
|
596
|
+
* @memberof AuthenticationApi
|
|
597
|
+
*/
|
|
598
|
+
public verifyResetPasswordToken(requestParameters: AuthenticationApiVerifyResetPasswordTokenRequest, options?: AxiosRequestConfig) {
|
|
599
|
+
return AuthenticationApiFp(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then((request) => request(this.axios, this.basePath));
|
|
600
|
+
}
|
|
601
|
+
}
|