Initial commit

This commit is contained in:
2025-08-22 21:09:48 +02:00
commit 2d84f535f4
68 changed files with 34807 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
import type { TaskConfig } from "payload"
import { deleteDocumentHandler } from "./delete-document-handler.js"
export const DeleteDocumentStepTask = {
slug: 'delete-document',
handler: deleteDocumentHandler,
inputSchema: [
{
name: 'collection',
type: 'text',
admin: {
description: 'The collection slug to delete from'
},
required: true
},
{
name: 'id',
type: 'text',
admin: {
description: 'The ID of a specific document to delete (leave empty to delete multiple)'
}
},
{
name: 'where',
type: 'json',
admin: {
description: 'Query conditions to find documents to delete (used when ID is not provided)'
}
}
],
outputSchema: [
{
name: 'doc',
type: 'json',
admin: {
description: 'The deleted document(s)'
}
},
{
name: 'deletedCount',
type: 'number',
admin: {
description: 'Number of documents deleted'
}
}
]
} satisfies TaskConfig<'delete-document'>