mirror of
https://github.com/strapi/strapi.git
synced 2025-07-13 20:11:47 +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>
129 lines
2.1 KiB
TypeScript
129 lines
2.1 KiB
TypeScript
import { errors } from '@strapi/utils';
|
|
import type { Webhook } from '@strapi/types';
|
|
|
|
/**
|
|
* /webhooks - GET all webhooks
|
|
*/
|
|
export declare namespace GetWebhooks {
|
|
export interface Request {
|
|
body: {};
|
|
query: {};
|
|
}
|
|
|
|
export interface Response {
|
|
data: Webhook[];
|
|
error?: errors.ApplicationError;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* GET /webhooks/:id - Get a webhook
|
|
*/
|
|
export declare namespace GetWebhook {
|
|
export interface Request {
|
|
body: {};
|
|
query: {};
|
|
}
|
|
|
|
export interface Params {
|
|
id: string;
|
|
}
|
|
|
|
export interface Response {
|
|
data: Webhook;
|
|
error?: errors.ApplicationError;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* POST /webhooks - Create a webhook
|
|
*/
|
|
export declare namespace CreateWebhook {
|
|
export interface Request {
|
|
body: Webhook;
|
|
query: {};
|
|
}
|
|
|
|
export interface Response {
|
|
data: Webhook;
|
|
error?: errors.ApplicationError | errors.YupValidationError;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* PUT /webhooks/:id - Update a webhook
|
|
*/
|
|
export declare namespace UpdateWebhook {
|
|
export interface Request {
|
|
body: Partial<Webhook>;
|
|
query: {};
|
|
}
|
|
|
|
export interface Params {
|
|
id: string;
|
|
}
|
|
|
|
export interface Response {
|
|
data: Webhook;
|
|
error?: errors.ApplicationError | errors.YupValidationError;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* DELETE /webhooks/:id - Delete a webhook
|
|
*/
|
|
export declare namespace DeleteWebhook {
|
|
export interface Request {
|
|
body: {};
|
|
query: {};
|
|
}
|
|
|
|
export interface Params {
|
|
id: string;
|
|
}
|
|
|
|
export interface Response {
|
|
data: Webhook;
|
|
error?: errors.ApplicationError;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* POST /webhooks/batch-delete' - Delete multiple webhooks
|
|
*/
|
|
export declare namespace DeleteWebhooks {
|
|
export interface Request {
|
|
body: {
|
|
ids: string[];
|
|
};
|
|
query: {};
|
|
}
|
|
|
|
export interface Response {
|
|
data: {};
|
|
error?: errors.ApplicationError;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* POST /webhooks/:id/trigger - Trigger a webhook
|
|
*/
|
|
export declare namespace TriggerWebhook {
|
|
export interface Request {
|
|
body: {};
|
|
query: {};
|
|
}
|
|
|
|
export interface Params {
|
|
id: string;
|
|
}
|
|
|
|
export interface Response {
|
|
data: {
|
|
statusCode: number;
|
|
message?: string;
|
|
};
|
|
error?: errors.ApplicationError;
|
|
}
|
|
}
|