Added slug to certain types of collection in webhook message

This commit is contained in:
DrMint 2024-07-13 23:56:50 +02:00
parent 47c9900801
commit 97ca2c3d3e
1 changed files with 48 additions and 5 deletions

View File

@ -1,8 +1,51 @@
import type { Collections } from "./constants"; import type { Collections } from "./constants";
export type AfterOperationWebHookMessage = { export type AfterOperationWebHookMessage = {
collection: Collections; operation: "update" | "create" | "delete";
id?: string; addedDependantIds: string[];
addedDependantIds: string[]; urls: string[];
urls: string[]; } & (
}; | {
collection: Collections.WebsiteConfig;
}
| {
collection: Collections.Pages;
id: string;
slug: string;
}
| {
collection: Collections.Collectibles;
id: string;
slug: string;
}
| {
collection: Collections.Folders;
id: string;
slug: string;
}
| {
collection:
| Collections.Attributes
| Collections.Audios
| Collections.ChronologyEvents
// | Collections.Collectibles
| Collections.CreditsRole
| Collections.Currencies
| Collections.Files
// | Collections.Folders
| Collections.GenericContents
| Collections.Images
| Collections.Languages
| Collections.MediaThumbnails
// | Collections.Pages
| Collections.Recorders
| Collections.Scans
| Collections.Tags
| Collections.Videos
| Collections.VideosChannels
| Collections.VideosSubtitles
| Collections.Wordings
// | Collections.WebsiteConfig;
id: string;
}
);