import * as v from "valibot"; import type { CustomBlockErrorInfo } from "../errors.js"; export declare const customBlockInitErrorCodeSchema: v.StringSchema; export type CustomBlockInitErrorCode = "no_ready" | "invalid_ready" | "manifest_unavailable" | "manifest_invalid" | "invalid_protocol_version" | "unsupported_protocol_version" | "context_unavailable" | "current_user_unavailable" | "missing_data_source_binding" | "data_source_unavailable" | "missing_property_binding" | "invalid_property_binding" | "not_in_iframe" | "init_timeout" | "unknown_error" | (string & {}); export type CustomBlockInitErrorInfo = CustomBlockErrorInfo; export declare const customBlockInitErrorInfoSchema: v.ObjectSchema<{ readonly code: v.StringSchema; readonly message: v.StringSchema; readonly isRetryable: v.BooleanSchema; }, undefined>; export declare class CustomBlockInitError extends Error implements CustomBlockErrorInfo { constructor(error: CustomBlockInitErrorInfo); code: CustomBlockInitErrorCode; isRetryable: boolean; } /** * Initialization message sent by the host to the sandbox exactly once, in response to the * sandbox's `ready` message. After init, live updates flow through narrower messages * (`themeChanged`, `parentChanged`, `pageChanged`, `dataSourcesChanged`). */ export declare const initMessageSchema: v.VariantSchema<"status", [v.ObjectSchema<{ readonly type: v.LiteralSchema<"init", undefined>; readonly status: v.LiteralSchema<"success", undefined>; readonly theme: v.PicklistSchema<["light", "dark"], undefined>; readonly blockId: v.CustomSchema | undefined>; readonly parent: v.VariantSchema<"type", [v.ObjectSchema<{ readonly type: v.LiteralSchema<"page_id", undefined>; readonly page_id: v.CustomSchema | undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"data_source_id", undefined>; readonly data_source_id: v.CustomSchema | undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"workspace", undefined>; readonly workspace: v.LiteralSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"block_id", undefined>; readonly block_id: v.CustomSchema | undefined>; }, undefined>], undefined>; readonly page: v.ObjectSchema<{ readonly id: v.CustomSchema | undefined>; }, undefined>; readonly dataSources: v.ObjectSchema<{ readonly bindings: v.RecordSchema, v.ObjectSchema<{ readonly collectionPointer: v.OptionalSchema | undefined>; readonly table: v.StringSchema; readonly spaceId: v.OptionalSchema | undefined>, undefined>; }, undefined>, undefined>; readonly collectionSchema: v.OptionalSchema | undefined>, undefined>; readonly propertiesById: v.RecordSchema, v.VariantSchema<"type", [v.ObjectSchema<{ readonly type: v.LiteralSchema<"title", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"rich_text", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"number", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"checkbox", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"url", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"email", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"phone_number", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"select", undefined>; readonly options: v.ArraySchema; readonly name: v.StringSchema; readonly color: v.OptionalSchema, undefined>; readonly description: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"multi_select", undefined>; readonly options: v.ArraySchema; readonly name: v.StringSchema; readonly color: v.OptionalSchema, undefined>; readonly description: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"status", undefined>; readonly options: v.ArraySchema; readonly name: v.StringSchema; readonly color: v.OptionalSchema, undefined>; readonly description: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly groups: v.ArraySchema; readonly name: v.StringSchema; readonly color: v.OptionalSchema, undefined>; readonly option_ids: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"date", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"people", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"files", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"unique_id", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"relation", undefined>; readonly data_source_id: v.OptionalSchema, undefined>; readonly dual_property: v.OptionalSchema; readonly synced_property_name: v.StringSchema; }, undefined>, undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"place", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"formula", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"rollup", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"button", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"verification", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"last_visited_time", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"location", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"created_time", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"last_edited_time", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"created_by", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"last_edited_by", undefined>; readonly name: v.StringSchema; readonly description: v.OptionalSchema, undefined>; }, undefined>], undefined>, undefined>; }, undefined>, undefined>; readonly propertyIdsByKey: v.OptionalSchema, v.OptionalSchema, undefined>, undefined>, undefined>; }, undefined>, undefined>; }, undefined>; readonly currentUser: v.ObjectSchema<{ readonly object: v.LiteralSchema<"user", undefined>; readonly id: v.StringSchema; readonly name: v.OptionalSchema, undefined>; readonly avatar_url: v.NullableSchema, undefined>; readonly type: v.LiteralSchema<"person", undefined>; readonly person: v.ObjectSchema<{ readonly email: v.StringSchema; }, undefined>; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"init", undefined>; readonly status: v.LiteralSchema<"error", undefined>; readonly error: v.ObjectSchema<{ readonly code: v.StringSchema; readonly message: v.StringSchema; readonly isRetryable: v.BooleanSchema; }, undefined>; }, undefined>], undefined>; export type InitMessage = v.InferOutput; //# sourceMappingURL=init.d.ts.map