Files
pearcord-platform/mixins/json-export/poll-json-mixin.js
T
Raven ScottandCursor a5dba86570 refactor(platform): organize mixins into category directories
Move 136 prototype mixins under mixins/domain, json-export, and
runtime/* so the package root stays navigable. Manifest assign order
is unchanged; apply-platform-mixins and runtime registry paths updated.

Co-authored-by: Cursor <[email protected]>
2026-06-03 17:42:26 -04:00

35 lines
1.3 KiB
JavaScript

'use strict'
const { createJsonExportDualHealMixin } = require('pearcord-json-export-mixin')
const pollJsonMixin = createJsonExportDualHealMixin({
gossipEntries: [
{ method: '_shouldGossipPollRegistryJson', keysField: '_pollRegistryJsonGossipKeys', initMethod: '_initPollRegistryJsonMixinState' },
{ method: '_shouldGossipScheduledMessageExportJson', gossipHashPrefix: 'effective:', keysField: '_scheduledMessageRegistryJsonGossipKeys', initMethod: '_initScheduledMessageJsonMixinState' },
],
heals: [
{
watermarkField: '_pollJsonHealWatermark',
shouldGossipMethod: '_shouldGossipPollRegistryJson',
healMethod: '_healPollRegistryExportCursorOnPartition',
spanKind: 'poll.json',
healContext: 'heal.poll',
countField: 'guildPollJsonCount',
bridgeKind: 'poll.json',
listExportsMethod: 'listPollRegistryJsonExports'
},
{
watermarkField: '_scheduledMessageJsonHealWatermark',
shouldGossipMethod: '_shouldGossipScheduledMessageExportJson',
healMethod: '_healScheduledMessageExportCursorOnPartition',
spanKind: 'poll.json',
healContext: 'heal.schedule',
countField: 'guildPollJsonCount',
bridgeKind: 'poll.json',
listExportsMethod: 'listScheduledMessageExportJsonExports'
}
]
})
module.exports = { pollJsonMixin }