@heybox/hb-sdk API Reference - v0.9.5
    正在准备搜索索引...

    接口 WorkspaceCardDefinition

    interface WorkspaceCardDefinition {
        actions: readonly { id: string; kind: "invoke" | "openMiniProgram" }[];
        documents?: Partial<
            Record<
                "1x1"
                | "2x1"
                | "2x2",
                {
                    regions: {
                        emptyText?: string;
                        errorText?: string;
                        id: string;
                        nodes: ViewNode[];
                        notice?: {
                            dismissible?: boolean;
                            id: string;
                            text: string;
                            tone?:
                                | "default"
                                | "success"
                                | "warning"
                                | "accent"
                                | "muted"
                                | "danger";
                        };
                        refreshing?: boolean;
                        retry?: {
                            commandId: string;
                            input?: JSONType;
                            inputFrom?: Record<string, string>;
                        };
                        retryPresentation?: "button"
                        | "inline";
                        status: "error" | "ready" | "empty" | "loading";
                        title?: string;
                    }[];
                    schema: number;
                    transition?: { effect: "crossfade"
                    | "morph" };
                },
            >,
        >;
        errorDocuments?: Partial<
            Record<
                "1x1"
                | "2x1"
                | "2x2",
                {
                    regions: {
                        emptyText?: string;
                        errorText?: string;
                        id: string;
                        nodes: ViewNode[];
                        notice?: {
                            dismissible?: boolean;
                            id: string;
                            text: string;
                            tone?:
                                | "default"
                                | "success"
                                | "warning"
                                | "accent"
                                | "muted"
                                | "danger";
                        };
                        refreshing?: boolean;
                        retry?: {
                            commandId: string;
                            input?: JSONType;
                            inputFrom?: Record<string, string>;
                        };
                        retryPresentation?: "button"
                        | "inline";
                        status: "error" | "ready" | "empty" | "loading";
                        title?: string;
                    }[];
                    schema: number;
                    transition?: { effect: "crossfade"
                    | "morph" };
                },
            >,
        >;
        id: string;
        loadingDocuments?: Partial<
            Record<
                "1x1"
                | "2x1"
                | "2x2",
                {
                    regions: {
                        emptyText?: string;
                        errorText?: string;
                        id: string;
                        nodes: ViewNode[];
                        notice?: {
                            dismissible?: boolean;
                            id: string;
                            text: string;
                            tone?:
                                | "default"
                                | "success"
                                | "warning"
                                | "accent"
                                | "muted"
                                | "danger";
                        };
                        refreshing?: boolean;
                        retry?: {
                            commandId: string;
                            input?: JSONType;
                            inputFrom?: Record<string, string>;
                        };
                        retryPresentation?: "button"
                        | "inline";
                        status: "error" | "ready" | "empty" | "loading";
                        title?: string;
                    }[];
                    schema: number;
                    transition?: { effect: "crossfade"
                    | "morph" };
                },
            >,
        >;
        sizes: {
            allowed: readonly ("1x1" | "2x1" | "2x2")[];
            default: "1x1" | "2x1" | "2x2";
        };
        title: string;
    }
    索引

    属性

    actions: readonly { id: string; kind: "invoke" | "openMiniProgram" }[]
    documents?: Partial<
        Record<
            "1x1"
            | "2x1"
            | "2x2",
            {
                regions: {
                    emptyText?: string;
                    errorText?: string;
                    id: string;
                    nodes: ViewNode[];
                    notice?: {
                        dismissible?: boolean;
                        id: string;
                        text: string;
                        tone?:
                            | "default"
                            | "success"
                            | "warning"
                            | "accent"
                            | "muted"
                            | "danger";
                    };
                    refreshing?: boolean;
                    retry?: {
                        commandId: string;
                        input?: JSONType;
                        inputFrom?: Record<string, string>;
                    };
                    retryPresentation?: "button"
                    | "inline";
                    status: "error" | "ready" | "empty" | "loading";
                    title?: string;
                }[];
                schema: number;
                transition?: { effect: "crossfade"
                | "morph" };
            },
        >,
    >
    errorDocuments?: Partial<
        Record<
            "1x1"
            | "2x1"
            | "2x2",
            {
                regions: {
                    emptyText?: string;
                    errorText?: string;
                    id: string;
                    nodes: ViewNode[];
                    notice?: {
                        dismissible?: boolean;
                        id: string;
                        text: string;
                        tone?:
                            | "default"
                            | "success"
                            | "warning"
                            | "accent"
                            | "muted"
                            | "danger";
                    };
                    refreshing?: boolean;
                    retry?: {
                        commandId: string;
                        input?: JSONType;
                        inputFrom?: Record<string, string>;
                    };
                    retryPresentation?: "button"
                    | "inline";
                    status: "error" | "ready" | "empty" | "loading";
                    title?: string;
                }[];
                schema: number;
                transition?: { effect: "crossfade"
                | "morph" };
            },
        >,
    >
    id: string
    loadingDocuments?: Partial<
        Record<
            "1x1"
            | "2x1"
            | "2x2",
            {
                regions: {
                    emptyText?: string;
                    errorText?: string;
                    id: string;
                    nodes: ViewNode[];
                    notice?: {
                        dismissible?: boolean;
                        id: string;
                        text: string;
                        tone?:
                            | "default"
                            | "success"
                            | "warning"
                            | "accent"
                            | "muted"
                            | "danger";
                    };
                    refreshing?: boolean;
                    retry?: {
                        commandId: string;
                        input?: JSONType;
                        inputFrom?: Record<string, string>;
                    };
                    retryPresentation?: "button"
                    | "inline";
                    status: "error" | "ready" | "empty" | "loading";
                    title?: string;
                }[];
                schema: number;
                transition?: { effect: "crossfade"
                | "morph" };
            },
        >,
    >
    sizes: {
        allowed: readonly ("1x1" | "2x1" | "2x2")[];
        default: "1x1" | "2x1" | "2x2";
    }
    title: string