1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/openapi/spec/change-password-schema.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

27 lines
895 B
TypeScript

import type { FromSchema } from 'json-schema-to-ts';
export const changePasswordSchema = {
$id: '#/components/schemas/changePasswordSchema',
type: 'object',
additionalProperties: false,
required: ['token', 'password'],
description: 'Change password as long as the token is a valid token',
properties: {
token: {
description:
'A reset token used to validate that the user is allowed to change the password.',
type: 'string',
example:
'$2a$15$QzeW/y5/MEppCWVEkoX5euejobYOLSd4We21LQjjKlWH9l2I3wCke',
},
password: {
type: 'string',
description: 'The new password for the user',
example: 'correct horse battery staple',
},
},
components: {},
} as const;
export type ChangePasswordSchema = FromSchema<typeof changePasswordSchema>;