mirror of
https://github.com/strapi/strapi.git
synced 2025-07-17 05:53:01 +00:00

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
42 lines
865 B
TypeScript
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;
|
|
}
|
|
}
|