Sanity App SDK
    Preparing search index...

    Interface CreateDocumentAction<TDocumentType, TDataset, TProjectId>Beta

    Represents an action to create a new document. Specifies the document type and optionally a document ID (which will be treated as the published ID).

    interface CreateDocumentAction<
        TDocumentType extends string = string,
        TDataset extends string = string,
        TProjectId extends string = string,
    > {
        dataset?: TDataset;
        documentId?: string;
        documentType: TDocumentType;
        perspective?: ReleasePerspective | ClientPerspective;
        projectId?: TProjectId;
        type: "document.create";
    }

    Type Parameters

    • TDocumentType extends string = string
    • TDataset extends string = string
    • TProjectId extends string = string

    Hierarchy (View Summary)

    Index

    Properties

    dataset?: TDataset
    documentId?: string
    documentType: TDocumentType
    perspective?: ReleasePerspective | ClientPerspective
    projectId?: TProjectId
    type: "document.create"