/**
 * GraphQL schema types for custom operations
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import type { Commit, GetAllRecord, Object, Ref, Store, BooleanFilter, DatetimeFilter, JSONFilter, StringFilter, StringListFilter, UUIDFilter, UUIDListFilter } from './types';
/** Methods to use when ordering `Ref`. */
export type RefOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'STORE_ID_ASC' | 'STORE_ID_DESC' | 'COMMIT_ID_ASC' | 'COMMIT_ID_DESC';
/** Methods to use when ordering `Store`. */
export type StoreOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'HASH_ASC' | 'HASH_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC';
/** Methods to use when ordering `Commit`. */
export type CommitOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'MESSAGE_ASC' | 'MESSAGE_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'STORE_ID_ASC' | 'STORE_ID_DESC' | 'PARENT_IDS_ASC' | 'PARENT_IDS_DESC' | 'AUTHOR_ID_ASC' | 'AUTHOR_ID_DESC' | 'COMMITTER_ID_ASC' | 'COMMITTER_ID_DESC' | 'TREE_ID_ASC' | 'TREE_ID_DESC' | 'DATE_ASC' | 'DATE_DESC';
/** Methods to use when ordering `Object`. */
export type ObjectOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'KIDS_ASC' | 'KIDS_DESC' | 'KTREE_ASC' | 'KTREE_DESC' | 'DATA_ASC' | 'DATA_DESC' | 'FRZN_ASC' | 'FRZN_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC';
/** A filter to be used against `Ref` object types. All fields are combined with a logical ‘and.’ */
export interface RefFilter {
    /** Filter by the object’s `id` field. */
    id?: UUIDFilter;
    /** Filter by the object’s `name` field. */
    name?: StringFilter;
    /** Filter by the object’s `databaseId` field. */
    databaseId?: UUIDFilter;
    /** Filter by the object’s `storeId` field. */
    storeId?: UUIDFilter;
    /** Filter by the object’s `commitId` field. */
    commitId?: UUIDFilter;
    /** Checks for all expressions in this list. */
    and?: RefFilter[];
    /** Checks for any expressions in this list. */
    or?: RefFilter[];
    /** Negates the expression. */
    not?: RefFilter;
}
/** A filter to be used against `Store` object types. All fields are combined with a logical ‘and.’ */
export interface StoreFilter {
    /** Filter by the object’s `id` field. */
    id?: UUIDFilter;
    /** Filter by the object’s `name` field. */
    name?: StringFilter;
    /** Filter by the object’s `databaseId` field. */
    databaseId?: UUIDFilter;
    /** Filter by the object’s `hash` field. */
    hash?: UUIDFilter;
    /** Filter by the object’s `createdAt` field. */
    createdAt?: DatetimeFilter;
    /** Checks for all expressions in this list. */
    and?: StoreFilter[];
    /** Checks for any expressions in this list. */
    or?: StoreFilter[];
    /** Negates the expression. */
    not?: StoreFilter;
}
/** A filter to be used against `Commit` object types. All fields are combined with a logical ‘and.’ */
export interface CommitFilter {
    /** Filter by the object’s `id` field. */
    id?: UUIDFilter;
    /** Filter by the object’s `message` field. */
    message?: StringFilter;
    /** Filter by the object’s `databaseId` field. */
    databaseId?: UUIDFilter;
    /** Filter by the object’s `storeId` field. */
    storeId?: UUIDFilter;
    /** Filter by the object’s `parentIds` field. */
    parentIds?: UUIDListFilter;
    /** Filter by the object’s `authorId` field. */
    authorId?: UUIDFilter;
    /** Filter by the object’s `committerId` field. */
    committerId?: UUIDFilter;
    /** Filter by the object’s `treeId` field. */
    treeId?: UUIDFilter;
    /** Filter by the object’s `date` field. */
    date?: DatetimeFilter;
    /** Checks for all expressions in this list. */
    and?: CommitFilter[];
    /** Checks for any expressions in this list. */
    or?: CommitFilter[];
    /** Negates the expression. */
    not?: CommitFilter;
}
/** A filter to be used against `Object` object types. All fields are combined with a logical ‘and.’ */
export interface ObjectFilter {
    /** Filter by the object’s `id` field. */
    id?: UUIDFilter;
    /** Filter by the object’s `databaseId` field. */
    databaseId?: UUIDFilter;
    /** Filter by the object’s `kids` field. */
    kids?: UUIDListFilter;
    /** Filter by the object’s `ktree` field. */
    ktree?: StringListFilter;
    /** Filter by the object’s `data` field. */
    data?: JSONFilter;
    /** Filter by the object’s `frzn` field. */
    frzn?: BooleanFilter;
    /** Filter by the object’s `createdAt` field. */
    createdAt?: DatetimeFilter;
    /** Checks for all expressions in this list. */
    and?: ObjectFilter[];
    /** Checks for any expressions in this list. */
    or?: ObjectFilter[];
    /** Negates the expression. */
    not?: ObjectFilter;
}
export interface FreezeObjectsInput {
    clientMutationId?: string;
    databaseId?: string;
    id?: string;
}
export interface InitEmptyRepoInput {
    clientMutationId?: string;
    dbId?: string;
    storeId?: string;
}
export interface RemoveNodeAtPathInput {
    clientMutationId?: string;
    dbId?: string;
    root?: string;
    path?: string[];
}
export interface SetDataAtPathInput {
    clientMutationId?: string;
    dbId?: string;
    root?: string;
    path?: string[];
    data?: unknown;
}
export interface SetPropsAndCommitInput {
    clientMutationId?: string;
    dbId?: string;
    storeId?: string;
    refname?: string;
    path?: string[];
    data?: unknown;
}
export interface InsertNodeAtPathInput {
    clientMutationId?: string;
    dbId?: string;
    root?: string;
    path?: string[];
    data?: unknown;
    kids?: string[];
    ktree?: string[];
}
export interface UpdateNodeAtPathInput {
    clientMutationId?: string;
    dbId?: string;
    root?: string;
    path?: string[];
    data?: unknown;
    kids?: string[];
    ktree?: string[];
}
export interface SetAndCommitInput {
    clientMutationId?: string;
    dbId?: string;
    storeId?: string;
    refname?: string;
    path?: string[];
    data?: unknown;
    kids?: string[];
    ktree?: string[];
}
export interface CreateRefInput {
    clientMutationId?: string;
    /** The `Ref` to be created by this mutation. */
    ref: RefInput;
}
/** An input for mutations affecting `Ref` */
export interface RefInput {
    /** The primary unique identifier for the ref. */
    id?: string;
    /** The name of the ref or branch */
    name: string;
    databaseId: string;
    storeId: string;
    commitId?: string;
}
export interface CreateStoreInput {
    clientMutationId?: string;
    /** The `Store` to be created by this mutation. */
    store: StoreInput;
}
/** An input for mutations affecting `Store` */
export interface StoreInput {
    /** The primary unique identifier for the store. */
    id?: string;
    /** The name of the store (e.g., metaschema, migrations). */
    name: string;
    /** The database this store belongs to. */
    databaseId: string;
    /** The current head tree_id for this store. */
    hash?: string;
    createdAt?: string;
}
export interface CreateCommitInput {
    clientMutationId?: string;
    /** The `Commit` to be created by this mutation. */
    commit: CommitInput;
}
/** An input for mutations affecting `Commit` */
export interface CommitInput {
    /** The primary unique identifier for the commit. */
    id?: string;
    /** The commit message */
    message?: string;
    /** The repository identifier */
    databaseId: string;
    storeId: string;
    /** Parent commits */
    parentIds?: string[];
    /** The author of the commit */
    authorId?: string;
    /** The committer of the commit */
    committerId?: string;
    /** The root of the tree */
    treeId?: string;
    date?: string;
}
export interface CreateObjectInput {
    clientMutationId?: string;
    /** The `Object` to be created by this mutation. */
    object: ObjectInput;
}
/** An input for mutations affecting `Object` */
export interface ObjectInput {
    id: string;
    databaseId: string;
    kids?: string[];
    ktree?: string[];
    data?: unknown;
    frzn?: boolean;
    createdAt?: string;
}
export interface UpdateRefInput {
    clientMutationId?: string;
    /** The primary unique identifier for the ref. */
    id: string;
    databaseId: string;
    /** An object where the defined keys will be set on the `Ref` being updated. */
    refPatch: RefPatch;
}
/** Represents an update to a `Ref`. Fields that are set will be updated. */
export interface RefPatch {
    /** The primary unique identifier for the ref. */
    id?: string;
    /** The name of the ref or branch */
    name?: string;
    databaseId?: string;
    storeId?: string;
    commitId?: string;
}
export interface UpdateStoreInput {
    clientMutationId?: string;
    /** The primary unique identifier for the store. */
    id: string;
    /** An object where the defined keys will be set on the `Store` being updated. */
    storePatch: StorePatch;
}
/** Represents an update to a `Store`. Fields that are set will be updated. */
export interface StorePatch {
    /** The primary unique identifier for the store. */
    id?: string;
    /** The name of the store (e.g., metaschema, migrations). */
    name?: string;
    /** The database this store belongs to. */
    databaseId?: string;
    /** The current head tree_id for this store. */
    hash?: string;
    createdAt?: string;
}
export interface UpdateCommitInput {
    clientMutationId?: string;
    /** The primary unique identifier for the commit. */
    id: string;
    /** The repository identifier */
    databaseId: string;
    /** An object where the defined keys will be set on the `Commit` being updated. */
    commitPatch: CommitPatch;
}
/** Represents an update to a `Commit`. Fields that are set will be updated. */
export interface CommitPatch {
    /** The primary unique identifier for the commit. */
    id?: string;
    /** The commit message */
    message?: string;
    /** The repository identifier */
    databaseId?: string;
    storeId?: string;
    /** Parent commits */
    parentIds?: string[];
    /** The author of the commit */
    authorId?: string;
    /** The committer of the commit */
    committerId?: string;
    /** The root of the tree */
    treeId?: string;
    date?: string;
}
export interface UpdateObjectInput {
    clientMutationId?: string;
    id: string;
    databaseId: string;
    /** An object where the defined keys will be set on the `Object` being updated. */
    objectPatch: ObjectPatch;
}
/** Represents an update to a `Object`. Fields that are set will be updated. */
export interface ObjectPatch {
    id?: string;
    databaseId?: string;
    kids?: string[];
    ktree?: string[];
    data?: unknown;
    frzn?: boolean;
    createdAt?: string;
}
export interface DeleteRefInput {
    clientMutationId?: string;
    /** The primary unique identifier for the ref. */
    id: string;
    databaseId: string;
}
export interface DeleteStoreInput {
    clientMutationId?: string;
    /** The primary unique identifier for the store. */
    id: string;
}
export interface DeleteCommitInput {
    clientMutationId?: string;
    /** The primary unique identifier for the commit. */
    id: string;
    /** The repository identifier */
    databaseId: string;
}
export interface DeleteObjectInput {
    clientMutationId?: string;
    id: string;
    databaseId: string;
}
export interface RequestUploadUrlInput {
    /** Bucket key (e.g., "public", "private") */
    bucketKey: string;
    /**
     * Owner entity ID for entity-scoped uploads.
     * Omit for app-level (database-wide) storage.
     * When provided, resolves the storage module for the entity type
     * that owns this entity instance (e.g., a data room ID, team ID).
     */
    ownerId?: string;
    /** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
    contentHash: string;
    /** MIME type of the file (e.g., "image/png") */
    contentType: string;
    /** File size in bytes */
    size: number;
    /** Original filename (optional, for display and Content-Disposition) */
    filename?: string;
}
export interface ProvisionBucketInput {
    /** The logical bucket key (e.g., "public", "private") */
    bucketKey: string;
    /**
     * Owner entity ID for entity-scoped bucket provisioning.
     * Omit for app-level (database-wide) storage.
     */
    ownerId?: string;
}
/** A connection to a list of `GetAllRecord` values. */
export interface GetAllConnection {
    nodes: GetAllRecord[];
    edges: GetAllEdge[];
    pageInfo: PageInfo;
    totalCount: number;
}
/** A connection to a list of `Object` values. */
export interface ObjectConnection {
    nodes: Object[];
    edges: ObjectEdge[];
    pageInfo: PageInfo;
    totalCount: number;
}
/** A connection to a list of `Ref` values. */
export interface RefConnection {
    nodes: Ref[];
    edges: RefEdge[];
    pageInfo: PageInfo;
    totalCount: number;
}
/** A connection to a list of `Store` values. */
export interface StoreConnection {
    nodes: Store[];
    edges: StoreEdge[];
    pageInfo: PageInfo;
    totalCount: number;
}
/** A connection to a list of `Commit` values. */
export interface CommitConnection {
    nodes: Commit[];
    edges: CommitEdge[];
    pageInfo: PageInfo;
    totalCount: number;
}
/** Root meta schema type */
export interface MetaSchema {
    tables: MetaTable[];
}
export interface FreezeObjectsPayload {
    clientMutationId?: string | null;
}
export interface InitEmptyRepoPayload {
    clientMutationId?: string | null;
}
export interface RemoveNodeAtPathPayload {
    clientMutationId?: string | null;
    result?: string | null;
}
export interface SetDataAtPathPayload {
    clientMutationId?: string | null;
    result?: string | null;
}
export interface SetPropsAndCommitPayload {
    clientMutationId?: string | null;
    result?: string | null;
}
export interface InsertNodeAtPathPayload {
    clientMutationId?: string | null;
    result?: string | null;
}
export interface UpdateNodeAtPathPayload {
    clientMutationId?: string | null;
    result?: string | null;
}
export interface SetAndCommitPayload {
    clientMutationId?: string | null;
    result?: string | null;
}
export interface CreateRefPayload {
    clientMutationId?: string | null;
    /** The `Ref` that was created by this mutation. */
    ref?: Ref | null;
    refEdge?: RefEdge | null;
}
export interface CreateStorePayload {
    clientMutationId?: string | null;
    /** The `Store` that was created by this mutation. */
    store?: Store | null;
    storeEdge?: StoreEdge | null;
}
export interface CreateCommitPayload {
    clientMutationId?: string | null;
    /** The `Commit` that was created by this mutation. */
    commit?: Commit | null;
    commitEdge?: CommitEdge | null;
}
export interface CreateObjectPayload {
    clientMutationId?: string | null;
    /** The `Object` that was created by this mutation. */
    object?: Object | null;
    objectEdge?: ObjectEdge | null;
}
export interface UpdateRefPayload {
    clientMutationId?: string | null;
    /** The `Ref` that was updated by this mutation. */
    ref?: Ref | null;
    refEdge?: RefEdge | null;
}
export interface UpdateStorePayload {
    clientMutationId?: string | null;
    /** The `Store` that was updated by this mutation. */
    store?: Store | null;
    storeEdge?: StoreEdge | null;
}
export interface UpdateCommitPayload {
    clientMutationId?: string | null;
    /** The `Commit` that was updated by this mutation. */
    commit?: Commit | null;
    commitEdge?: CommitEdge | null;
}
export interface UpdateObjectPayload {
    clientMutationId?: string | null;
    /** The `Object` that was updated by this mutation. */
    object?: Object | null;
    objectEdge?: ObjectEdge | null;
}
export interface DeleteRefPayload {
    clientMutationId?: string | null;
    /** The `Ref` that was deleted by this mutation. */
    ref?: Ref | null;
    refEdge?: RefEdge | null;
}
export interface DeleteStorePayload {
    clientMutationId?: string | null;
    /** The `Store` that was deleted by this mutation. */
    store?: Store | null;
    storeEdge?: StoreEdge | null;
}
export interface DeleteCommitPayload {
    clientMutationId?: string | null;
    /** The `Commit` that was deleted by this mutation. */
    commit?: Commit | null;
    commitEdge?: CommitEdge | null;
}
export interface DeleteObjectPayload {
    clientMutationId?: string | null;
    /** The `Object` that was deleted by this mutation. */
    object?: Object | null;
    objectEdge?: ObjectEdge | null;
}
export interface RequestUploadUrlPayload {
    /** Presigned PUT URL (null if file was deduplicated) */
    uploadUrl?: string | null;
    /** The file ID (existing if deduplicated, new if fresh upload) */
    fileId: string;
    /** The S3 object key */
    key: string;
    /** Whether this file was deduplicated (already exists with same hash) */
    deduplicated: boolean;
    /** Presigned URL expiry time (null if deduplicated) */
    expiresAt?: string | null;
}
export interface ProvisionBucketPayload {
    /** Whether provisioning succeeded */
    success: boolean;
    /** The S3 bucket name that was provisioned */
    bucketName: string;
    /** The access type applied */
    accessType: string;
    /** The storage provider used */
    provider: string;
    /** The S3 endpoint (null for AWS S3 default) */
    endpoint?: string | null;
    /** Error message if provisioning failed */
    error?: string | null;
}
/** A `GetAllRecord` edge in the connection. */
export interface GetAllEdge {
    cursor?: string | null;
    /** The `GetAllRecord` at the end of the edge. */
    node?: GetAllRecord | null;
}
/** Information about pagination in a connection. */
export interface PageInfo {
    /** When paginating forwards, are there more items? */
    hasNextPage: boolean;
    /** When paginating backwards, are there more items? */
    hasPreviousPage: boolean;
    /** When paginating backwards, the cursor to continue. */
    startCursor?: string | null;
    /** When paginating forwards, the cursor to continue. */
    endCursor?: string | null;
}
/** A `Object` edge in the connection. */
export interface ObjectEdge {
    cursor?: string | null;
    /** The `Object` at the end of the edge. */
    node?: Object | null;
}
/** A `Ref` edge in the connection. */
export interface RefEdge {
    cursor?: string | null;
    /** The `Ref` at the end of the edge. */
    node?: Ref | null;
}
/** A `Store` edge in the connection. */
export interface StoreEdge {
    cursor?: string | null;
    /** The `Store` at the end of the edge. */
    node?: Store | null;
}
/** A `Commit` edge in the connection. */
export interface CommitEdge {
    cursor?: string | null;
    /** The `Commit` at the end of the edge. */
    node?: Commit | null;
}
/** Information about a database table */
export interface MetaTable {
    name: string;
    schemaName: string;
    fields: MetaField[];
    indexes: MetaIndex[];
    constraints: MetaConstraints;
    foreignKeyConstraints: MetaForeignKeyConstraint[];
    primaryKeyConstraints: MetaPrimaryKeyConstraint[];
    uniqueConstraints: MetaUniqueConstraint[];
    relations: MetaRelations;
    inflection: MetaInflection;
    query: MetaQuery;
}
/** Information about a table field/column */
export interface MetaField {
    name: string;
    type: MetaType;
    isNotNull: boolean;
    hasDefault: boolean;
    isPrimaryKey: boolean;
    isForeignKey: boolean;
    description?: string | null;
}
/** Information about a database index */
export interface MetaIndex {
    name: string;
    isUnique: boolean;
    isPrimary: boolean;
    columns: string[];
    fields?: MetaField[] | null;
}
/** Table constraints */
export interface MetaConstraints {
    primaryKey?: MetaPrimaryKeyConstraint | null;
    unique: MetaUniqueConstraint[];
    foreignKey: MetaForeignKeyConstraint[];
}
/** Information about a foreign key constraint */
export interface MetaForeignKeyConstraint {
    name: string;
    fields: MetaField[];
    referencedTable: string;
    referencedFields: string[];
    refFields?: MetaField[] | null;
    refTable?: MetaRefTable | null;
}
/** Information about a primary key constraint */
export interface MetaPrimaryKeyConstraint {
    name: string;
    fields: MetaField[];
}
/** Information about a unique constraint */
export interface MetaUniqueConstraint {
    name: string;
    fields: MetaField[];
}
/** Table relations */
export interface MetaRelations {
    belongsTo: MetaBelongsToRelation[];
    has: MetaHasRelation[];
    hasOne: MetaHasRelation[];
    hasMany: MetaHasRelation[];
    manyToMany: MetaManyToManyRelation[];
}
/** Table inflection names */
export interface MetaInflection {
    tableType: string;
    allRows: string;
    connection: string;
    edge: string;
    filterType?: string | null;
    orderByType: string;
    conditionType: string;
    patchType?: string | null;
    createInputType: string;
    createPayloadType: string;
    updatePayloadType?: string | null;
    deletePayloadType: string;
}
/** Table query/mutation names */
export interface MetaQuery {
    all: string;
    one?: string | null;
    create?: string | null;
    update?: string | null;
    delete?: string | null;
}
/** Information about a PostgreSQL type */
export interface MetaType {
    pgType: string;
    gqlType: string;
    isArray: boolean;
    isNotNull?: boolean | null;
    hasDefault?: boolean | null;
    subtype?: string | null;
}
/** Reference to a related table */
export interface MetaRefTable {
    name: string;
}
/** A belongs-to (forward FK) relation */
export interface MetaBelongsToRelation {
    fieldName?: string | null;
    isUnique: boolean;
    type?: string | null;
    keys: MetaField[];
    references: MetaRefTable;
}
/** A has-one or has-many (reverse FK) relation */
export interface MetaHasRelation {
    fieldName?: string | null;
    isUnique: boolean;
    type?: string | null;
    keys: MetaField[];
    referencedBy: MetaRefTable;
}
/** A many-to-many relation via junction table */
export interface MetaManyToManyRelation {
    fieldName?: string | null;
    type?: string | null;
    junctionTable: MetaRefTable;
    junctionLeftConstraint: MetaForeignKeyConstraint;
    junctionLeftKeyAttributes: MetaField[];
    junctionRightConstraint: MetaForeignKeyConstraint;
    junctionRightKeyAttributes: MetaField[];
    leftKeyAttributes: MetaField[];
    rightKeyAttributes: MetaField[];
    rightTable: MetaRefTable;
}
