/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Static, TSchema } from "@sinclair/typebox";
export declare const EncodedNodeUpdate: <Schema extends TSchema>(tNodeChange: Schema) => import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
    set: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
        fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
        globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
    }>, import("@sinclair/typebox").TObject<{
        value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
        type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<import("../../core").TreeNodeSchemaIdentifier>>;
    }>]>>;
    buildId: import("@sinclair/typebox").TObject<{
        revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
        localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
    }>;
    changes: import("@sinclair/typebox").TOptional<Schema>;
}>, import("@sinclair/typebox").TObject<{
    revert: import("@sinclair/typebox").TObject<{
        revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
        localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
    }>;
    changes: import("@sinclair/typebox").TOptional<Schema>;
}>]>;
/**
 * Note: TS doesn't easily support extracting a generic function's return type until 4.7:
 * https://github.com/microsoft/TypeScript/pull/47607
 * This type is a workaround and can be removed once we're on a version of typescript which
 * supports expressions more like:
 * `Static<ReturnType<typeof EncodedNodeUpdate<Schema>>>`
 */
declare class Wrapper<T extends TSchema> {
    encodedNodeUpdate(e: T): import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
        set: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
            fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
            globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
        }>, import("@sinclair/typebox").TObject<{
            value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
            type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<import("../../core").TreeNodeSchemaIdentifier>>;
        }>]>>;
        buildId: import("@sinclair/typebox").TObject<{
            revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
            localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
        }>;
        changes: import("@sinclair/typebox").TOptional<T>;
    }>, import("@sinclair/typebox").TObject<{
        revert: import("@sinclair/typebox").TObject<{
            revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
            localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
        }>;
        changes: import("@sinclair/typebox").TOptional<T>;
    }>]>;
    encodedOptionalFieldChange(e: T): import("@sinclair/typebox").TObject<{
        /**
         * Uniquely identifies, in the scope of the changeset, the change made to the field.
         * Globally unique across all changesets when paired with the changeset's revision tag.
         */
        id: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
        /**
         * When populated, indicates the revision that this field change is associated with.
         * Is left undefined when the revision is the same as that of the whole changeset
         * (which would also be undefined in the case of an anonymous changeset).
         */
        revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
        /**
         * The new content for the trait. If undefined, the trait will be cleared.
         */
        newContent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
            set: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
                fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
                globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
            }>, import("@sinclair/typebox").TObject<{
                value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
                type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<import("../../core").TreeNodeSchemaIdentifier>>;
            }>]>>;
            buildId: import("@sinclair/typebox").TObject<{
                revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
                localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
            }>;
            changes: import("@sinclair/typebox").TOptional<T>;
        }>, import("@sinclair/typebox").TObject<{
            revert: import("@sinclair/typebox").TObject<{
                revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
                localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
            }>;
            changes: import("@sinclair/typebox").TOptional<T>;
        }>]>>;
        /**
         * Whether the field was empty in the state this change is based on.
         */
        wasEmpty: import("@sinclair/typebox").TBoolean;
    }>;
    encodedOptionalChangeset(e: T): import("@sinclair/typebox").TObject<{
        fieldChange: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
            /**
             * Uniquely identifies, in the scope of the changeset, the change made to the field.
             * Globally unique across all changesets when paired with the changeset's revision tag.
             */
            id: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
            /**
             * When populated, indicates the revision that this field change is associated with.
             * Is left undefined when the revision is the same as that of the whole changeset
             * (which would also be undefined in the case of an anonymous changeset).
             */
            revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
            /**
             * The new content for the trait. If undefined, the trait will be cleared.
             */
            newContent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
                set: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
                    fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
                    globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
                }>, import("@sinclair/typebox").TObject<{
                    value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
                    type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<import("../../core").TreeNodeSchemaIdentifier>>;
                }>]>>;
                buildId: import("@sinclair/typebox").TObject<{
                    revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
                    localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
                }>;
                changes: import("@sinclair/typebox").TOptional<T>;
            }>, import("@sinclair/typebox").TObject<{
                revert: import("@sinclair/typebox").TObject<{
                    revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
                    localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
                }>;
                changes: import("@sinclair/typebox").TOptional<T>;
            }>]>>;
            /**
             * Whether the field was empty in the state this change is based on.
             */
            wasEmpty: import("@sinclair/typebox").TBoolean;
        }>>;
        childChanges: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
            revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
            localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
        }>, import("@sinclair/typebox").TLiteral<"self">]>, T]>>>;
    }>;
}
export type EncodedNodeUpdate<Schema extends TSchema> = Static<ReturnType<Wrapper<Schema>["encodedNodeUpdate"]>>;
export declare const EncodedOptionalFieldChange: <Schema extends TSchema>(tNodeChange: Schema) => import("@sinclair/typebox").TObject<{
    /**
     * Uniquely identifies, in the scope of the changeset, the change made to the field.
     * Globally unique across all changesets when paired with the changeset's revision tag.
     */
    id: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
    /**
     * When populated, indicates the revision that this field change is associated with.
     * Is left undefined when the revision is the same as that of the whole changeset
     * (which would also be undefined in the case of an anonymous changeset).
     */
    revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
    /**
     * The new content for the trait. If undefined, the trait will be cleared.
     */
    newContent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
        set: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
            fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
            globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
        }>, import("@sinclair/typebox").TObject<{
            value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
            type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<import("../../core").TreeNodeSchemaIdentifier>>;
        }>]>>;
        buildId: import("@sinclair/typebox").TObject<{
            revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
            localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
        }>;
        changes: import("@sinclair/typebox").TOptional<Schema>;
    }>, import("@sinclair/typebox").TObject<{
        revert: import("@sinclair/typebox").TObject<{
            revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
            localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
        }>;
        changes: import("@sinclair/typebox").TOptional<Schema>;
    }>]>>;
    /**
     * Whether the field was empty in the state this change is based on.
     */
    wasEmpty: import("@sinclair/typebox").TBoolean;
}>;
export declare const EncodedOptionalChangeset: <Schema extends TSchema>(tNodeChange: Schema) => import("@sinclair/typebox").TObject<{
    fieldChange: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
        /**
         * Uniquely identifies, in the scope of the changeset, the change made to the field.
         * Globally unique across all changesets when paired with the changeset's revision tag.
         */
        id: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
        /**
         * When populated, indicates the revision that this field change is associated with.
         * Is left undefined when the revision is the same as that of the whole changeset
         * (which would also be undefined in the case of an anonymous changeset).
         */
        revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
        /**
         * The new content for the trait. If undefined, the trait will be cleared.
         */
        newContent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
            set: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
                fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
                globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
            }>, import("@sinclair/typebox").TObject<{
                value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
                type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<import("../../core").TreeNodeSchemaIdentifier>>;
            }>]>>;
            buildId: import("@sinclair/typebox").TObject<{
                revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
                localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
            }>;
            changes: import("@sinclair/typebox").TOptional<Schema>;
        }>, import("@sinclair/typebox").TObject<{
            revert: import("@sinclair/typebox").TObject<{
                revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
                localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
            }>;
            changes: import("@sinclair/typebox").TOptional<Schema>;
        }>]>>;
        /**
         * Whether the field was empty in the state this change is based on.
         */
        wasEmpty: import("@sinclair/typebox").TBoolean;
    }>>;
    childChanges: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
        revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("@fluidframework/runtime-definitions").StableId>>;
        localId: import("@sinclair/typebox").TUnsafe<import("../../core").ChangesetLocalId>;
    }>, import("@sinclair/typebox").TLiteral<"self">]>, Schema]>>>;
}>;
export type EncodedOptionalChangeset<Schema extends TSchema> = Static<ReturnType<Wrapper<Schema>["encodedOptionalChangeset"]>>;
export {};
//# sourceMappingURL=defaultFieldChangeFormat.d.ts.map