2024-03-18 13:58:05 +01:00
|
|
|
import type { FromSchema } from 'json-schema-to-ts';
|
2022-06-22 13:31:41 +02:00
|
|
|
|
|
|
|
export const changePasswordSchema = {
|
|
|
|
$id: '#/components/schemas/changePasswordSchema',
|
|
|
|
type: 'object',
|
|
|
|
additionalProperties: false,
|
|
|
|
required: ['token', 'password'],
|
2023-07-04 10:31:54 +02:00
|
|
|
description: 'Change password as long as the token is a valid token',
|
2022-06-22 13:31:41 +02:00
|
|
|
properties: {
|
|
|
|
token: {
|
2023-07-04 10:31:54 +02:00
|
|
|
description:
|
|
|
|
'A reset token used to validate that the user is allowed to change the password.',
|
2022-06-22 13:31:41 +02:00
|
|
|
type: 'string',
|
2023-07-04 10:31:54 +02:00
|
|
|
example:
|
|
|
|
'$2a$15$QzeW/y5/MEppCWVEkoX5euejobYOLSd4We21LQjjKlWH9l2I3wCke',
|
2022-06-22 13:31:41 +02:00
|
|
|
},
|
|
|
|
password: {
|
|
|
|
type: 'string',
|
2023-07-04 10:31:54 +02:00
|
|
|
description: 'The new password for the user',
|
|
|
|
example: 'correct horse battery staple',
|
2022-06-22 13:31:41 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type ChangePasswordSchema = FromSchema<typeof changePasswordSchema>;
|