Sanity Library Reference Docs
    Preparing search index...

    Type Alias GenerateTargetDocument<T>Beta

    GenerateTargetDocument:
        | { operation: "edit"; _id: string }
        | { operation: "create"; _id?: string; _type: string; initialValues?: T }
        | {
            operation: "createIfNotExists";
            _id: string;
            _type: string;
            initialValues?: T;
        }
        | {
            operation: "createOrReplace";
            _id: string;
            _type: string;
            initialValues?: T;
        }

    Type Parameters

    Type declaration

    • { operation: "edit"; _id: string }
      • operation: "edit"
      • _id: string

        #AgentActionSchema.forcePublishedWrite

    • { operation: "create"; _id?: string; _type: string; initialValues?: T }
      • operation: "create"
      • Optional_id?: string

        #AgentActionSchema.forcePublishedWrite

      • _type: string
      • OptionalinitialValues?: T
    • {
          operation: "createIfNotExists";
          _id: string;
          _type: string;
          initialValues?: T;
      }
      • operation: "createIfNotExists"
      • _id: string

        #AgentActionSchema.forcePublishedWrite

      • _type: string
      • OptionalinitialValues?: T
    • { operation: "createOrReplace"; _id: string; _type: string; initialValues?: T }
      • operation: "createOrReplace"
      • _id: string

        #AgentActionSchema.forcePublishedWrite

      • _type: string
      • OptionalinitialValues?: T