Marc Roig 728d614ca4
feat: Migrate @strapi/admin server to typescript (#18232)
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
2023-11-16 15:38:15 +00:00

42 lines
865 B
TypeScript

import type { errors } from '@strapi/utils';
import { Permission } from './shared';
/**
* GET /permission - List all permissions
*/
export declare namespace GetAll {
export interface Request {
query: {};
body: {};
}
export interface Response {
data: {
conditions: {
id: string;
displayName: string;
category: string;
};
sections: Record<string, unknown>;
};
error?: errors.ApplicationError;
}
}
/**
* POST /permission/check - Check if the current user has the given permissions
*/
export declare namespace Check {
export interface Request {
query: {};
body: {
permissions: (Pick<Permission, 'action' | 'subject'> & { field?: string })[];
};
}
export interface Response {
data: boolean[];
error?: errors.ApplicationError | errors.YupValidationError;
}
}