mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 00:51:17 +00:00

* chore(wip): convert settings pages * chore: add api-tokens contract * fix: types * chore: convert webhooks page (#18682) * chore: convert webhooks * fix: configurations provider * chore: add all contracts * chore(admin): add workflow contracts (#18707) * chore(admin): add audit-logs contracts (#18708) * chore: convert users page to TS (#18710) * chore(admin): convert Roles Settings (#18774) * chore(admin): fix types from merge * chore(admin): convert Single Sign On settings page to TS and refactoring * chore: pretty --------- Co-authored-by: HichamELBSI <elabbassih@gmail.com>
48 lines
899 B
TypeScript
48 lines
899 B
TypeScript
import { errors } from '@strapi/utils';
|
||
import { Entity, Pagination, SanitizedAdminUser } from './shared';
|
||
|
||
interface AuditLog extends Pick<Entity, 'id'> {
|
||
date: string;
|
||
action: string;
|
||
/**
|
||
* TODO: could this be better typed – working on the server-side code could indicate this.
|
||
* However, we know it's JSON.
|
||
*/
|
||
payload: Record<string, unknown>;
|
||
user?: SanitizedAdminUser;
|
||
}
|
||
|
||
namespace GetAll {
|
||
export interface Request {
|
||
body: {};
|
||
query: {};
|
||
}
|
||
|
||
export interface Response {
|
||
data: {
|
||
pagination: Pagination;
|
||
results: AuditLog[];
|
||
};
|
||
error?: errors.ApplicationError;
|
||
}
|
||
}
|
||
|
||
namespace Get {
|
||
export interface Request {
|
||
body: {};
|
||
query: {};
|
||
}
|
||
|
||
export interface Params {
|
||
id: Entity['id'];
|
||
}
|
||
|
||
export type Response =
|
||
| AuditLog
|
||
| {
|
||
error?: errors.ApplicationError;
|
||
};
|
||
}
|
||
|
||
export { AuditLog, GetAll, Get };
|