mirror of
https://github.com/strapi/strapi.git
synced 2025-07-21 16:10:18 +00:00

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
59 lines
1.2 KiB
TypeScript
59 lines
1.2 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 Request {
|
|
query: {};
|
|
body: {
|
|
email?: string;
|
|
firstname?: string;
|
|
lastname?: string;
|
|
username?: string;
|
|
password?: string;
|
|
currentPassword?: string;
|
|
preferedLanguage?: string;
|
|
};
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|