mirror of
https://github.com/strapi/strapi.git
synced 2025-07-16 13:32:05 +00:00
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;
|
||
|
}
|
||
|
}
|