Josh 3301d58a39
chore(deps): update DS to 1.13.2 (#18959)
* chore(deps): update DS to 1.13.2

* chore: update snapshots
2023-11-30 16:37:04 +00:00

67 lines
1.4 KiB
TypeScript

import type { errors } from '@strapi/utils';
import type { SanitizedAdminUser, Permission } from './shared';
/**
* GET /users/me - Log in as an admin user
*/
export declare namespace GetMe {
export interface Request {
query: {};
body: {};
}
export interface Response {
data: SanitizedAdminUser;
error?: errors.ApplicationError;
}
}
/**
* PUT /users/me - Update the current admin user
*/
export declare namespace UpdateMe {
export interface BaseRequestBody {
password?: never;
currentPassword?: never;
email?: string;
firstname?: string;
lastname?: string;
username?: string;
preferedLanguage?: string;
}
export interface PasswordRequestBody
extends Omit<BaseRequestBody, 'password' | 'currentPassword'> {
currentPassword: string;
password: string;
}
export interface Request {
query: {};
body: BaseRequestBody | PasswordRequestBody;
}
export interface Response {
data: SanitizedAdminUser;
error?:
| errors.ApplicationError
| errors.ValidationError<'ValidationError', { currentPassword: ['Invalid credentials'] }>
| errors.YupValidationError;
}
}
/**
* GET /users/me/permissions - Get the permissions of the current admin user
*/
export declare namespace GetOwnPermissions {
export interface Request {
query: {};
body: {};
}
export interface Response {
data: Permission[];
error?: errors.ApplicationError;
}
}