Josh 86f98b66fe
chore(admin): convert settings pages (#18820)
* 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>
2023-11-21 11:40:51 +00:00

117 lines
2.0 KiB
TypeScript

import { errors } from '@strapi/utils';
import type {
AdminUserCreationPayload,
AdminUserUpdatePayload,
Pagination,
SanitizedAdminUser,
} from './shared';
import type { Entity } from '@strapi/types';
/**
* /create - Create an admin user
*/
export declare namespace Create {
export interface Request {
body: AdminUserCreationPayload;
query: {};
}
export interface Response {
data: SanitizedAdminUser;
error?: errors.ApplicationError | errors.YupValidationError;
}
}
/**
* /find - Find admin users
*/
export declare namespace FindAll {
// TODO make the types for this
export interface Request {
body: {};
query: {};
}
export interface Response {
data: {
results: SanitizedAdminUser[];
pagination: Pagination;
};
error?: errors.ApplicationError;
}
}
/**
* /findOne - Find an admin user
*/
export declare namespace FindOne {
export interface Request {
body: {};
query: {};
}
export interface Params {
id: Entity.ID;
}
export interface Response {
data: SanitizedAdminUser;
error?: errors.ApplicationError;
}
}
/**
* /update - Update an admin user
*/
export declare namespace Update {
export interface Request {
body: AdminUserUpdatePayload;
query: {};
}
export interface Params {
id: Entity.ID;
}
export interface Response {
data: SanitizedAdminUser;
error?: errors.ApplicationError | errors.YupValidationError;
}
}
/**
* /deleteOne - Delete an admin user
*/
export declare namespace DeleteOne {
export interface Request {
body: {};
query: {};
}
export interface Params {
id: Entity.ID;
}
export interface Response {
data: SanitizedAdminUser;
error?: errors.ApplicationError;
}
}
/**
* /users/batch-delete - Delete admin users
*/
export declare namespace DeleteMany {
export interface Request {
body: {
ids: Entity.ID[];
};
query: {};
}
export interface Response {
data: SanitizedAdminUser[];
error?: errors.ApplicationError | errors.YupValidationError;
}
}