Files
PaperClipAI/server/src/services/external-object-refresh-notifications.ts
T
DottaandPaperclip 2bca873c63 Integrate external refresh with existing deadline owners
Preserve all company mutation consumers and verify both merge-confirmation and external-refresh startup registrations.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-30 18:19:58 -05:00

9 lines
583 B
TypeScript

import { DELIVERY_QUEUES, notifyDeliveryWork } from "./delivery-work-notifications.js";
export type ExternalObjectRefreshIdentity = { providerKey: string; objectType: string; externalId: string; ignoreExternalIdCase?: boolean };
export async function notifyExternalObjectRefresh(tx: object, companyId?: string, object?: string | ExternalObjectRefreshIdentity) {
await notifyDeliveryWork(tx, DELIVERY_QUEUES.externalObjectRefresh,
companyId ? JSON.stringify({ companyId, ...(typeof object === "string" ? { objectId: object } : object ? { identity: object } : {}) }) : "*");
}