@jugarhoy/api 1.0.4 → 1.0.5
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/apis/AuthApi.ts
CHANGED
|
@@ -22,6 +22,10 @@ import type {
|
|
|
22
22
|
RequestPasswordReset200Response,
|
|
23
23
|
RequestPasswordReset500Response,
|
|
24
24
|
RequestPasswordResetRequest,
|
|
25
|
+
ResetPassword200Response,
|
|
26
|
+
ResetPassword400Response,
|
|
27
|
+
ResetPassword500Response,
|
|
28
|
+
ResetPasswordRequest,
|
|
25
29
|
UserAuth,
|
|
26
30
|
UserSession,
|
|
27
31
|
} from '../models/index';
|
|
@@ -40,6 +44,14 @@ import {
|
|
|
40
44
|
RequestPasswordReset500ResponseToJSON,
|
|
41
45
|
RequestPasswordResetRequestFromJSON,
|
|
42
46
|
RequestPasswordResetRequestToJSON,
|
|
47
|
+
ResetPassword200ResponseFromJSON,
|
|
48
|
+
ResetPassword200ResponseToJSON,
|
|
49
|
+
ResetPassword400ResponseFromJSON,
|
|
50
|
+
ResetPassword400ResponseToJSON,
|
|
51
|
+
ResetPassword500ResponseFromJSON,
|
|
52
|
+
ResetPassword500ResponseToJSON,
|
|
53
|
+
ResetPasswordRequestFromJSON,
|
|
54
|
+
ResetPasswordRequestToJSON,
|
|
43
55
|
UserAuthFromJSON,
|
|
44
56
|
UserAuthToJSON,
|
|
45
57
|
UserSessionFromJSON,
|
|
@@ -54,6 +66,10 @@ export interface RequestPasswordResetOperationRequest {
|
|
|
54
66
|
requestPasswordResetRequest: RequestPasswordResetRequest;
|
|
55
67
|
}
|
|
56
68
|
|
|
69
|
+
export interface ResetPasswordOperationRequest {
|
|
70
|
+
resetPasswordRequest: ResetPasswordRequest;
|
|
71
|
+
}
|
|
72
|
+
|
|
57
73
|
/**
|
|
58
74
|
*
|
|
59
75
|
*/
|
|
@@ -250,4 +266,48 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
250
266
|
return await response.value();
|
|
251
267
|
}
|
|
252
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Reset user password with oobCode
|
|
271
|
+
*/
|
|
272
|
+
async resetPasswordRaw(requestParameters: ResetPasswordOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResetPassword200Response>> {
|
|
273
|
+
if (requestParameters['resetPasswordRequest'] == null) {
|
|
274
|
+
throw new runtime.RequiredError(
|
|
275
|
+
'resetPasswordRequest',
|
|
276
|
+
'Required parameter "resetPasswordRequest" was null or undefined when calling resetPassword().'
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const queryParameters: any = {};
|
|
281
|
+
|
|
282
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
283
|
+
|
|
284
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
285
|
+
|
|
286
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
287
|
+
const token = this.configuration.accessToken;
|
|
288
|
+
const tokenString = await token("bearerAuth", []);
|
|
289
|
+
|
|
290
|
+
if (tokenString) {
|
|
291
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
const response = await this.request({
|
|
295
|
+
path: `/api/auth/reset-password`,
|
|
296
|
+
method: 'POST',
|
|
297
|
+
headers: headerParameters,
|
|
298
|
+
query: queryParameters,
|
|
299
|
+
body: ResetPasswordRequestToJSON(requestParameters['resetPasswordRequest']),
|
|
300
|
+
}, initOverrides);
|
|
301
|
+
|
|
302
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResetPassword200ResponseFromJSON(jsonValue));
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Reset user password with oobCode
|
|
307
|
+
*/
|
|
308
|
+
async resetPassword(requestParameters: ResetPasswordOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResetPassword200Response> {
|
|
309
|
+
const response = await this.resetPasswordRaw(requestParameters, initOverrides);
|
|
310
|
+
return await response.value();
|
|
311
|
+
}
|
|
312
|
+
|
|
253
313
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.0
|
|
8
|
+
*
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ResetPassword200Response
|
|
20
|
+
*/
|
|
21
|
+
export interface ResetPassword200Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof ResetPassword200Response
|
|
26
|
+
*/
|
|
27
|
+
success?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ResetPassword200Response
|
|
32
|
+
*/
|
|
33
|
+
email?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ResetPassword200Response interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfResetPassword200Response(value: object): value is ResetPassword200Response {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function ResetPassword200ResponseFromJSON(json: any): ResetPassword200Response {
|
|
44
|
+
return ResetPassword200ResponseFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ResetPassword200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResetPassword200Response {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
54
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ResetPassword200ResponseToJSON(json: any): ResetPassword200Response {
|
|
59
|
+
return ResetPassword200ResponseToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ResetPassword200ResponseToJSONTyped(value?: ResetPassword200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'success': value['success'],
|
|
70
|
+
'email': value['email'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.0
|
|
8
|
+
*
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ResetPassword400Response
|
|
20
|
+
*/
|
|
21
|
+
export interface ResetPassword400Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ResetPassword400Response
|
|
26
|
+
*/
|
|
27
|
+
error?: ResetPassword400ResponseErrorEnum;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export const ResetPassword400ResponseErrorEnum = {
|
|
35
|
+
PasswordResetExpired: 'PASSWORD_RESET_EXPIRED',
|
|
36
|
+
PasswordResetInvalid: 'PASSWORD_RESET_INVALID',
|
|
37
|
+
PasswordTooWeak: 'PASSWORD_TOO_WEAK',
|
|
38
|
+
UserDisabled: 'USER_DISABLED',
|
|
39
|
+
PasswordResetFailed: 'PASSWORD_RESET_FAILED'
|
|
40
|
+
} as const;
|
|
41
|
+
export type ResetPassword400ResponseErrorEnum = typeof ResetPassword400ResponseErrorEnum[keyof typeof ResetPassword400ResponseErrorEnum];
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the ResetPassword400Response interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfResetPassword400Response(value: object): value is ResetPassword400Response {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ResetPassword400ResponseFromJSON(json: any): ResetPassword400Response {
|
|
52
|
+
return ResetPassword400ResponseFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ResetPassword400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResetPassword400Response {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ResetPassword400ResponseToJSON(json: any): ResetPassword400Response {
|
|
66
|
+
return ResetPassword400ResponseToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ResetPassword400ResponseToJSONTyped(value?: ResetPassword400Response | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'error': value['error'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.0
|
|
8
|
+
*
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ResetPassword500Response
|
|
20
|
+
*/
|
|
21
|
+
export interface ResetPassword500Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ResetPassword500Response
|
|
26
|
+
*/
|
|
27
|
+
error?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ResetPassword500Response interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfResetPassword500Response(value: object): value is ResetPassword500Response {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function ResetPassword500ResponseFromJSON(json: any): ResetPassword500Response {
|
|
38
|
+
return ResetPassword500ResponseFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function ResetPassword500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResetPassword500Response {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ResetPassword500ResponseToJSON(json: any): ResetPassword500Response {
|
|
52
|
+
return ResetPassword500ResponseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ResetPassword500ResponseToJSONTyped(value?: ResetPassword500Response | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'error': value['error'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.0
|
|
8
|
+
*
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ResetPasswordRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ResetPasswordRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Password reset code from email link
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ResetPasswordRequest
|
|
26
|
+
*/
|
|
27
|
+
oobCode: string;
|
|
28
|
+
/**
|
|
29
|
+
* New password (minimum 6 characters)
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ResetPasswordRequest
|
|
32
|
+
*/
|
|
33
|
+
newPassword: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ResetPasswordRequest interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfResetPasswordRequest(value: object): value is ResetPasswordRequest {
|
|
40
|
+
if (!('oobCode' in value) || value['oobCode'] === undefined) return false;
|
|
41
|
+
if (!('newPassword' in value) || value['newPassword'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ResetPasswordRequestFromJSON(json: any): ResetPasswordRequest {
|
|
46
|
+
return ResetPasswordRequestFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ResetPasswordRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResetPasswordRequest {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'oobCode': json['oobCode'],
|
|
56
|
+
'newPassword': json['newPassword'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ResetPasswordRequestToJSON(json: any): ResetPasswordRequest {
|
|
61
|
+
return ResetPasswordRequestToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ResetPasswordRequestToJSONTyped(value?: ResetPasswordRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'oobCode': value['oobCode'],
|
|
72
|
+
'newPassword': value['newPassword'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
package/models/index.ts
CHANGED
|
@@ -144,6 +144,10 @@ export * from './ReserveDto';
|
|
|
144
144
|
export * from './ReserveSlotDto';
|
|
145
145
|
export * from './ReserveStatus';
|
|
146
146
|
export * from './ReserveType';
|
|
147
|
+
export * from './ResetPassword200Response';
|
|
148
|
+
export * from './ResetPassword400Response';
|
|
149
|
+
export * from './ResetPassword500Response';
|
|
150
|
+
export * from './ResetPasswordRequest';
|
|
147
151
|
export * from './SavePushTokenRequest';
|
|
148
152
|
export * from './SearchClubs400Response';
|
|
149
153
|
export * from './SearchClubs500Response';
|