Merge pull request #809 from cbcoutinho/feat/deck-webhook-presets

feat(webhooks): add Deck card sync preset with vector indexing
This commit is contained in:
Chris Coutinho
2026-05-24 12:42:18 +02:00
committed by GitHub
5 changed files with 309 additions and 11 deletions
+35 -5
View File
@@ -43,11 +43,18 @@ TABLES_EVENT_ROW_DELETED = "OCA\\Tables\\Event\\RowDeletedEvent"
# Forms webhook events (Nextcloud 30+)
FORMS_EVENT_FORM_SUBMITTED = "OCA\\Forms\\Events\\FormSubmittedEvent"
# NOTE: Deck and Contacts do NOT support webhooks
# Their event classes do not implement IWebhookCompatibleEvent interface.
# Alternative sync strategies:
# - Deck: Use polling with ETag-based change detection
# - Contacts: Use CardDAV sync-token mechanism for efficient syncing
# Deck webhook events (require nextcloud/deck PR #7910, which adds
# IWebhookCompatibleEvent to these event classes). BoardUpdatedEvent only
# carries a board ID and is used as a fan-out signal; the polling scanner
# reconciles affected cards.
DECK_EVENT_CARD_CREATED = "OCA\\Deck\\Event\\CardCreatedEvent"
DECK_EVENT_CARD_UPDATED = "OCA\\Deck\\Event\\CardUpdatedEvent"
DECK_EVENT_CARD_DELETED = "OCA\\Deck\\Event\\CardDeletedEvent"
DECK_EVENT_BOARD_UPDATED = "OCA\\Deck\\Event\\BoardUpdatedEvent"
# NOTE: Contacts does NOT support webhooks — its event classes do not
# implement IWebhookCompatibleEvent. Use CardDAV sync-token mechanism for
# efficient syncing.
WEBHOOK_PRESETS: Dict[str, WebhookPreset] = {
@@ -138,6 +145,29 @@ WEBHOOK_PRESETS: Dict[str, WebhookPreset] = {
},
],
},
"deck_sync": {
"name": "Deck Sync",
"description": "Real-time synchronization for Deck cards (create, update, delete) and board updates",
"app": "deck",
"events": [
{
"event": DECK_EVENT_CARD_CREATED,
"filter": {},
},
{
"event": DECK_EVENT_CARD_UPDATED,
"filter": {},
},
{
"event": DECK_EVENT_CARD_DELETED,
"filter": {},
},
{
"event": DECK_EVENT_BOARD_UPDATED,
"filter": {},
},
],
},
}