import { createGetDb, getDbExec } from "@agent-native/core/db"; import { registerShareableResource } from "@agent-native/core/sharing"; import * as schema from "./schema.js"; export const getDb = createGetDb(schema); export { schema, getDbExec }; registerShareableResource({ type: "recording", resourceTable: schema.recordings, sharesTable: schema.recordingShares, displayName: "Recording", titleColumn: "title", getResourcePath: (recording) => `/r/${recording.id}`, getDb, ownerAccessIgnoresOrg: true, }); registerShareableResource({ type: "meeting", resourceTable: schema.meetings, sharesTable: schema.meetingShares, displayName: "Meeting", titleColumn: "title", getResourcePath: (meeting) => `/meetings/${meeting.id}`, getDb, }); registerShareableResource({ type: "calendar-account", resourceTable: schema.calendarAccounts, sharesTable: schema.calendarAccountShares, displayName: "Calendar account", titleColumn: "displayName", getDb, }); registerShareableResource({ type: "dictation", resourceTable: schema.dictations, sharesTable: schema.dictationShares, displayName: "Dictation", // Dictations don't have a meaningful title field — fall back to id. titleColumn: "id", getDb, });