'use strict' const { createJsonExportDualHealMixin } = require('pearcord-json-export-mixin') const threadJsonMixin = createJsonExportDualHealMixin({ gossipEntries: [ { method: '_shouldGossipThreadArchiveJson', keysField: '_threadArchiveRegistryJsonGossipKeys', initMethod: '_initThreadArchiveJsonMixinState' }, { method: '_shouldGossipForumTagExportJson', gossipHashPrefix: 'effective:', keysField: '_forumTagRegistryJsonGossipKeys', initMethod: '_initForumTagJsonMixinState' }, ], heals: [ { watermarkField: '_threadJsonHealWatermark', shouldGossipMethod: '_shouldGossipThreadArchiveJson', healMethod: '_healThreadArchiveExportCursorOnPartition', spanKind: 'thread.json', healContext: 'heal.thread', countField: 'guildThreadJsonCount', bridgeKind: 'thread.json', listExportsMethod: 'listThreadArchiveJsonExports' }, { watermarkField: '_forumTagExportJsonHealWatermark', shouldGossipMethod: '_shouldGossipForumTagExportJson', healMethod: '_healForumTagExportCursorOnPartition', spanKind: 'thread.json', healContext: 'heal.forum', countField: 'guildThreadJsonCount', bridgeKind: 'thread.json', listExportsMethod: 'listForumTagExportJsonExports', extraSpanEnd: (rows) => ({ threadCount: rows[0]?.threadCount || 0 }) } ] }) module.exports = { threadJsonMixin }