Files
pearcord-platform/mixins/json-export/thread-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

36 lines
1.4 KiB
JavaScript

'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 }