MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getSyncStatus

Function getSyncStatus

server/src/slack/sync.ts:143–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141 * Get sync status summary
142 */
143export async function getSyncStatus(): Promise<{
144 configured: boolean;
145 stats: {
146 total: number;
147 mapped: number;
148 unmapped: number;
149 pending_verification: number;
150 bots: number;
151 deleted: number;
152 opted_out: number;
153 } | null;
154 last_sync: Date | null;
155}> {
156 if (!isSlackConfigured()) {
157 return {
158 configured: false,
159 stats: null,
160 last_sync: null,
161 };
162 }
163
164 const stats = await slackDb.getStats();
165
166 // Get most recent sync timestamp
167 const mappings = await slackDb.getAllMappings({ limit: 1, includeBots: true, includeDeleted: true });
168 const lastSync = mappings.length > 0 ? mappings[0].last_slack_sync_at : null;
169
170 return {
171 configured: true,
172 stats,
173 last_sync: lastSync,
174 };
175}
176
177// ============== Working Group Member Sync ==============
178

Callers 1

createAdminSlackRouterFunction · 0.85

Calls 3

isSlackConfiguredFunction · 0.85
getAllMappingsMethod · 0.80
getStatsMethod · 0.45

Tested by

no test coverage detected