import * as v from "valibot" import { notionDataSourceIdSchema } from "../ids.js" /** * Message sent by the sandbox to ask the host for the current rows in a resolved * Notion data source. */ export const queryDataSourceMessageSchema = v.object({ type: v.literal("queryDataSource"), requestId: v.string(), /** * The stable snapshot ID that identifies the SDK result slot to update. This is stable for the * lifetime of the subscription. */ snapshotId: v.string(), /** The raw Notion data source ID to read from. */ dataSourceId: notionDataSourceIdSchema, /** The number of items to return in the snapshot. */ limit: v.number(), }) export type QueryDataSourceMessage = v.InferOutput< typeof queryDataSourceMessageSchema >