import * as v from "valibot" import { notionDataSourceBindingsSchema } from "../dataSources/dataSource.js" /** * Message sent by the host whenever the custom block's data-source mapping changes (e.g. a key is * added, removed, or remapped). The SDK replaces its list of configured data sources but keeps any * in-flight `useDataSource` query state for keys that still exist. */ export const dataSourcesChangedMessageSchema = v.object({ type: v.literal("dataSourcesChanged"), dataSources: v.object({ bindings: notionDataSourceBindingsSchema, }), }) export type DataSourcesChangedMessage = v.InferOutput< typeof dataSourcesChangedMessageSchema >