/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Type } from "@sinclair/typebox";
import { RevisionTagSchema, SessionIdSchema } from "../core/index.js";
import { MessageFormatVersion } from "./messageFormat.js";
// Return type is intentionally derived.
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export const Message = (tChange) => Type.Object({
    revision: RevisionTagSchema,
    originatorId: SessionIdSchema,
    changeset: tChange,
    version: Type.Optional(Type.Union([
        Type.Literal(MessageFormatVersion.v1),
        Type.Literal(MessageFormatVersion.v2),
        Type.Literal(MessageFormatVersion.v3),
        Type.Literal(MessageFormatVersion.v4),
        Type.Literal(MessageFormatVersion.v6),
    ])),
});
//# sourceMappingURL=messageFormatV1ToV4.js.map