Interface UseSchemaReturn

Represents the return value of useSchema hook.

Hierarchy

  • Partial<SchemaType>
    • UseSchemaReturn

Properties

approvalMethod?: string
category?: CategoryParentType[]
categoryId?: string
createdAt?: string
data?: string
description?: string
displayInteractive: string

The display interactive configuration (stringified JSON).

displayThumbnail: string

The display thumbnail configuration (stringified JSON).

fetched: boolean

Boolean indicating whether the schema data has been fetched.

id?: string
name?: string
projectId?: string

Function to push schema changes to the API, optionally updating it with new data.

Function to push a new thumbnail to the schema.

Function to fetch the schema by re-fetching them from the API.

schema: null | SchemaType

The currently loaded schema.

setSchema: Dispatch<SetStateAction<null | SchemaType>>

A state setter for updating the schema.

setThumbnail: Dispatch<SetStateAction<null | File>>

A state setter for updating the thumbnail file.

state?: "draft" | "open" | "closed"
tags?: string[]
thumbnail?: string
type?: string
voteThresholdSettings?: string

Generated using TypeDoc