From 40d5792dfca90dca946cffadb8262b2aba275e0f Mon Sep 17 00:00:00 2001 From: JOOHOJANG Date: Tue, 24 Sep 2024 13:32:18 +0900 Subject: [PATCH] Modify buf generate --- packages/sdk/buf.gen.yaml | 4 +- .../sdk/src/api/yorkie/v1/resources_pb.d.ts | 48 +- .../sdk/src/api/yorkie/v1/resources_pb.js | 688 +++++ .../sdk/src/api/yorkie/v1/resources_pb.ts | 2712 ----------------- .../sdk/src/api/yorkie/v1/yorkie_connect.d.ts | 2 +- .../{yorkie_connect.ts => yorkie_connect.js} | 4 +- packages/sdk/src/api/yorkie/v1/yorkie_pb.d.ts | 2 +- packages/sdk/src/api/yorkie/v1/yorkie_pb.js | 205 ++ packages/sdk/src/api/yorkie/v1/yorkie_pb.ts | 738 ----- 9 files changed, 946 insertions(+), 3457 deletions(-) create mode 100644 packages/sdk/src/api/yorkie/v1/resources_pb.js delete mode 100644 packages/sdk/src/api/yorkie/v1/resources_pb.ts rename packages/sdk/src/api/yorkie/v1/{yorkie_connect.ts => yorkie_connect.js} (98%) create mode 100644 packages/sdk/src/api/yorkie/v1/yorkie_pb.js delete mode 100644 packages/sdk/src/api/yorkie/v1/yorkie_pb.ts diff --git a/packages/sdk/buf.gen.yaml b/packages/sdk/buf.gen.yaml index be0eaeb96..1b20df7bc 100644 --- a/packages/sdk/buf.gen.yaml +++ b/packages/sdk/buf.gen.yaml @@ -3,10 +3,10 @@ plugins: - plugin: es out: . opt: - - target=ts + - target=js+dts - js_import_style=module - plugin: connect-es out: . opt: - - target=ts + - target=js+dts - js_import_style=module diff --git a/packages/sdk/src/api/yorkie/v1/resources_pb.d.ts b/packages/sdk/src/api/yorkie/v1/resources_pb.d.ts index 7d77073f6..e384dc8d5 100644 --- a/packages/sdk/src/api/yorkie/v1/resources_pb.d.ts +++ b/packages/sdk/src/api/yorkie/v1/resources_pb.d.ts @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=module" +// @generated by protoc-gen-es v1.10.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/resources.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -176,21 +176,38 @@ export declare class ChangePack extends Message { */ snapshot: Uint8Array; + /** + * @generated from field: yorkie.v1.VersionVector snapshot_version_vector = 7; + */ + snapshotVersionVector?: VersionVector; + /** * @generated from field: repeated yorkie.v1.Change changes = 4; */ changes: Change[]; /** + * Deprecated + * * @generated from field: yorkie.v1.TimeTicket min_synced_ticket = 5; */ minSyncedTicket?: TimeTicket; + /** + * @generated from field: yorkie.v1.VersionVector min_synced_version_vector = 8; + */ + minSyncedVersionVector?: VersionVector; + /** * @generated from field: bool is_removed = 6; */ isRemoved: boolean; + /** + * @generated from field: yorkie.v1.VersionVector version_vector = 9; + */ + versionVector?: VersionVector; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; @@ -269,6 +286,11 @@ export declare class ChangeID extends Message { */ actorId: Uint8Array; + /** + * @generated from field: yorkie.v1.VersionVector version_vector = 5; + */ + versionVector?: VersionVector; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; @@ -284,6 +306,30 @@ export declare class ChangeID extends Message { static equals(a: ChangeID | PlainMessage | undefined, b: ChangeID | PlainMessage | undefined): boolean; } +/** + * @generated from message yorkie.v1.VersionVector + */ +export declare class VersionVector extends Message { + /** + * @generated from field: map vector = 1; + */ + vector: { [key: string]: bigint }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "yorkie.v1.VersionVector"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VersionVector; + + static fromJson(jsonValue: JsonValue, options?: Partial): VersionVector; + + static fromJsonString(jsonString: string, options?: Partial): VersionVector; + + static equals(a: VersionVector | PlainMessage | undefined, b: VersionVector | PlainMessage | undefined): boolean; +} + /** * @generated from message yorkie.v1.Operation */ diff --git a/packages/sdk/src/api/yorkie/v1/resources_pb.js b/packages/sdk/src/api/yorkie/v1/resources_pb.js new file mode 100644 index 000000000..6ac44c2ff --- /dev/null +++ b/packages/sdk/src/api/yorkie/v1/resources_pb.js @@ -0,0 +1,688 @@ +// +// Copyright 2022 The Yorkie Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.10.0 with parameter "target=js+dts,js_import_style=module" +// @generated from file src/api/yorkie/v1/resources.proto (package yorkie.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3, StringValue, Timestamp } from "@bufbuild/protobuf"; + +/** + * @generated from enum yorkie.v1.ValueType + */ +export const ValueType = /*@__PURE__*/ proto3.makeEnum( + "yorkie.v1.ValueType", + [ + {no: 0, name: "VALUE_TYPE_NULL", localName: "NULL"}, + {no: 1, name: "VALUE_TYPE_BOOLEAN", localName: "BOOLEAN"}, + {no: 2, name: "VALUE_TYPE_INTEGER", localName: "INTEGER"}, + {no: 3, name: "VALUE_TYPE_LONG", localName: "LONG"}, + {no: 4, name: "VALUE_TYPE_DOUBLE", localName: "DOUBLE"}, + {no: 5, name: "VALUE_TYPE_STRING", localName: "STRING"}, + {no: 6, name: "VALUE_TYPE_BYTES", localName: "BYTES"}, + {no: 7, name: "VALUE_TYPE_DATE", localName: "DATE"}, + {no: 8, name: "VALUE_TYPE_JSON_OBJECT", localName: "JSON_OBJECT"}, + {no: 9, name: "VALUE_TYPE_JSON_ARRAY", localName: "JSON_ARRAY"}, + {no: 10, name: "VALUE_TYPE_TEXT", localName: "TEXT"}, + {no: 11, name: "VALUE_TYPE_INTEGER_CNT", localName: "INTEGER_CNT"}, + {no: 12, name: "VALUE_TYPE_LONG_CNT", localName: "LONG_CNT"}, + {no: 13, name: "VALUE_TYPE_TREE", localName: "TREE"}, + ], +); + +/** + * @generated from enum yorkie.v1.DocEventType + */ +export const DocEventType = /*@__PURE__*/ proto3.makeEnum( + "yorkie.v1.DocEventType", + [ + {no: 0, name: "DOC_EVENT_TYPE_DOCUMENT_CHANGED", localName: "DOCUMENT_CHANGED"}, + {no: 1, name: "DOC_EVENT_TYPE_DOCUMENT_WATCHED", localName: "DOCUMENT_WATCHED"}, + {no: 2, name: "DOC_EVENT_TYPE_DOCUMENT_UNWATCHED", localName: "DOCUMENT_UNWATCHED"}, + {no: 3, name: "DOC_EVENT_TYPE_DOCUMENT_BROADCAST", localName: "DOCUMENT_BROADCAST"}, + ], +); + +/** + * /////////////////////////////////////// + * Messages for Snapshot // + * /////////////////////////////////////// + * + * @generated from message yorkie.v1.Snapshot + */ +export const Snapshot = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Snapshot", + () => [ + { no: 1, name: "root", kind: "message", T: JSONElement }, + { no: 2, name: "presences", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Presence} }, + ], +); + +/** + * ChangePack is a message that contains all changes that occurred in a document. + * It is used to synchronize changes between clients and servers. + * + * @generated from message yorkie.v1.ChangePack + */ +export const ChangePack = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.ChangePack", + () => [ + { no: 1, name: "document_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "checkpoint", kind: "message", T: Checkpoint }, + { no: 3, name: "snapshot", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 7, name: "snapshot_version_vector", kind: "message", T: VersionVector }, + { no: 4, name: "changes", kind: "message", T: Change, repeated: true }, + { no: 5, name: "min_synced_ticket", kind: "message", T: TimeTicket }, + { no: 8, name: "min_synced_version_vector", kind: "message", T: VersionVector }, + { no: 6, name: "is_removed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 9, name: "version_vector", kind: "message", T: VersionVector }, + ], +); + +/** + * @generated from message yorkie.v1.Change + */ +export const Change = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Change", + () => [ + { no: 1, name: "id", kind: "message", T: ChangeID }, + { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "operations", kind: "message", T: Operation, repeated: true }, + { no: 4, name: "presence_change", kind: "message", T: PresenceChange }, + ], +); + +/** + * @generated from message yorkie.v1.ChangeID + */ +export const ChangeID = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.ChangeID", + () => [ + { no: 1, name: "client_seq", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: "server_seq", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, + { no: 3, name: "lamport", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, + { no: 4, name: "actor_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 5, name: "version_vector", kind: "message", T: VersionVector }, + ], +); + +/** + * @generated from message yorkie.v1.VersionVector + */ +export const VersionVector = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.VersionVector", + () => [ + { no: 1, name: "vector", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 3 /* ScalarType.INT64 */} }, + ], +); + +/** + * @generated from message yorkie.v1.Operation + */ +export const Operation = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation", + () => [ + { no: 1, name: "set", kind: "message", T: Operation_Set, oneof: "body" }, + { no: 2, name: "add", kind: "message", T: Operation_Add, oneof: "body" }, + { no: 3, name: "move", kind: "message", T: Operation_Move, oneof: "body" }, + { no: 4, name: "remove", kind: "message", T: Operation_Remove, oneof: "body" }, + { no: 5, name: "edit", kind: "message", T: Operation_Edit, oneof: "body" }, + { no: 6, name: "select", kind: "message", T: Operation_Select, oneof: "body" }, + { no: 7, name: "style", kind: "message", T: Operation_Style, oneof: "body" }, + { no: 8, name: "increase", kind: "message", T: Operation_Increase, oneof: "body" }, + { no: 9, name: "tree_edit", kind: "message", T: Operation_TreeEdit, oneof: "body" }, + { no: 10, name: "tree_style", kind: "message", T: Operation_TreeStyle, oneof: "body" }, + ], +); + +/** + * @generated from message yorkie.v1.Operation.Set + */ +export const Operation_Set = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Set", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "value", kind: "message", T: JSONElementSimple }, + { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, + ], + {localName: "Operation_Set"}, +); + +/** + * @generated from message yorkie.v1.Operation.Add + */ +export const Operation_Add = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Add", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "prev_created_at", kind: "message", T: TimeTicket }, + { no: 3, name: "value", kind: "message", T: JSONElementSimple }, + { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, + ], + {localName: "Operation_Add"}, +); + +/** + * @generated from message yorkie.v1.Operation.Move + */ +export const Operation_Move = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Move", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "prev_created_at", kind: "message", T: TimeTicket }, + { no: 3, name: "created_at", kind: "message", T: TimeTicket }, + { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, + ], + {localName: "Operation_Move"}, +); + +/** + * @generated from message yorkie.v1.Operation.Remove + */ +export const Operation_Remove = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Remove", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "created_at", kind: "message", T: TimeTicket }, + { no: 3, name: "executed_at", kind: "message", T: TimeTicket }, + ], + {localName: "Operation_Remove"}, +); + +/** + * @generated from message yorkie.v1.Operation.Edit + */ +export const Operation_Edit = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Edit", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "from", kind: "message", T: TextNodePos }, + { no: 3, name: "to", kind: "message", T: TextNodePos }, + { no: 4, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, + { no: 5, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "executed_at", kind: "message", T: TimeTicket }, + { no: 7, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + ], + {localName: "Operation_Edit"}, +); + +/** + * NOTE(hackerwins): Select Operation is not used in the current version. + * In the previous version, it was used to represent selection of Text. + * However, it has been replaced by Presence now. It is retained for backward + * compatibility purposes. + * + * @generated from message yorkie.v1.Operation.Select + */ +export const Operation_Select = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Select", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "from", kind: "message", T: TextNodePos }, + { no: 3, name: "to", kind: "message", T: TextNodePos }, + { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, + ], + {localName: "Operation_Select"}, +); + +/** + * @generated from message yorkie.v1.Operation.Style + */ +export const Operation_Style = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Style", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "from", kind: "message", T: TextNodePos }, + { no: 3, name: "to", kind: "message", T: TextNodePos }, + { no: 4, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 5, name: "executed_at", kind: "message", T: TimeTicket }, + { no: 6, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, + ], + {localName: "Operation_Style"}, +); + +/** + * @generated from message yorkie.v1.Operation.Increase + */ +export const Operation_Increase = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.Increase", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "value", kind: "message", T: JSONElementSimple }, + { no: 3, name: "executed_at", kind: "message", T: TimeTicket }, + ], + {localName: "Operation_Increase"}, +); + +/** + * @generated from message yorkie.v1.Operation.TreeEdit + */ +export const Operation_TreeEdit = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.TreeEdit", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "from", kind: "message", T: TreePos }, + { no: 3, name: "to", kind: "message", T: TreePos }, + { no: 4, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, + { no: 5, name: "contents", kind: "message", T: TreeNodes, repeated: true }, + { no: 7, name: "split_level", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 6, name: "executed_at", kind: "message", T: TimeTicket }, + ], + {localName: "Operation_TreeEdit"}, +); + +/** + * @generated from message yorkie.v1.Operation.TreeStyle + */ +export const Operation_TreeStyle = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Operation.TreeStyle", + () => [ + { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "from", kind: "message", T: TreePos }, + { no: 3, name: "to", kind: "message", T: TreePos }, + { no: 4, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 5, name: "executed_at", kind: "message", T: TimeTicket }, + { no: 6, name: "attributes_to_remove", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 7, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, + ], + {localName: "Operation_TreeStyle"}, +); + +/** + * @generated from message yorkie.v1.JSONElementSimple + */ +export const JSONElementSimple = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElementSimple", + () => [ + { no: 1, name: "created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "moved_at", kind: "message", T: TimeTicket }, + { no: 3, name: "removed_at", kind: "message", T: TimeTicket }, + { no: 4, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, + { no: 5, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * @generated from message yorkie.v1.JSONElement + */ +export const JSONElement = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElement", + () => [ + { no: 1, name: "json_object", kind: "message", T: JSONElement_JSONObject, oneof: "body" }, + { no: 2, name: "json_array", kind: "message", T: JSONElement_JSONArray, oneof: "body" }, + { no: 3, name: "primitive", kind: "message", T: JSONElement_Primitive, oneof: "body" }, + { no: 5, name: "text", kind: "message", T: JSONElement_Text, oneof: "body" }, + { no: 6, name: "counter", kind: "message", T: JSONElement_Counter, oneof: "body" }, + { no: 7, name: "tree", kind: "message", T: JSONElement_Tree, oneof: "body" }, + ], +); + +/** + * @generated from message yorkie.v1.JSONElement.JSONObject + */ +export const JSONElement_JSONObject = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElement.JSONObject", + () => [ + { no: 1, name: "nodes", kind: "message", T: RHTNode, repeated: true }, + { no: 2, name: "created_at", kind: "message", T: TimeTicket }, + { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, + { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, + ], + {localName: "JSONElement_JSONObject"}, +); + +/** + * @generated from message yorkie.v1.JSONElement.JSONArray + */ +export const JSONElement_JSONArray = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElement.JSONArray", + () => [ + { no: 1, name: "nodes", kind: "message", T: RGANode, repeated: true }, + { no: 2, name: "created_at", kind: "message", T: TimeTicket }, + { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, + { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, + ], + {localName: "JSONElement_JSONArray"}, +); + +/** + * @generated from message yorkie.v1.JSONElement.Primitive + */ +export const JSONElement_Primitive = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElement.Primitive", + () => [ + { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, + { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "created_at", kind: "message", T: TimeTicket }, + { no: 4, name: "moved_at", kind: "message", T: TimeTicket }, + { no: 5, name: "removed_at", kind: "message", T: TimeTicket }, + ], + {localName: "JSONElement_Primitive"}, +); + +/** + * @generated from message yorkie.v1.JSONElement.Text + */ +export const JSONElement_Text = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElement.Text", + () => [ + { no: 1, name: "nodes", kind: "message", T: TextNode, repeated: true }, + { no: 2, name: "created_at", kind: "message", T: TimeTicket }, + { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, + { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, + ], + {localName: "JSONElement_Text"}, +); + +/** + * @generated from message yorkie.v1.JSONElement.Counter + */ +export const JSONElement_Counter = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElement.Counter", + () => [ + { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, + { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "created_at", kind: "message", T: TimeTicket }, + { no: 4, name: "moved_at", kind: "message", T: TimeTicket }, + { no: 5, name: "removed_at", kind: "message", T: TimeTicket }, + ], + {localName: "JSONElement_Counter"}, +); + +/** + * @generated from message yorkie.v1.JSONElement.Tree + */ +export const JSONElement_Tree = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.JSONElement.Tree", + () => [ + { no: 1, name: "nodes", kind: "message", T: TreeNode, repeated: true }, + { no: 2, name: "created_at", kind: "message", T: TimeTicket }, + { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, + { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, + ], + {localName: "JSONElement_Tree"}, +); + +/** + * @generated from message yorkie.v1.RHTNode + */ +export const RHTNode = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.RHTNode", + () => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "element", kind: "message", T: JSONElement }, + ], +); + +/** + * @generated from message yorkie.v1.RGANode + */ +export const RGANode = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.RGANode", + () => [ + { no: 1, name: "next", kind: "message", T: RGANode }, + { no: 2, name: "element", kind: "message", T: JSONElement }, + ], +); + +/** + * @generated from message yorkie.v1.NodeAttr + */ +export const NodeAttr = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.NodeAttr", + () => [ + { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "updated_at", kind: "message", T: TimeTicket }, + { no: 3, name: "is_removed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message yorkie.v1.TextNode + */ +export const TextNode = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TextNode", + () => [ + { no: 1, name: "id", kind: "message", T: TextNodeID }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "removed_at", kind: "message", T: TimeTicket }, + { no: 4, name: "ins_prev_id", kind: "message", T: TextNodeID }, + { no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: NodeAttr} }, + ], +); + +/** + * @generated from message yorkie.v1.TextNodeID + */ +export const TextNodeID = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TextNodeID", + () => [ + { no: 1, name: "created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ], +); + +/** + * @generated from message yorkie.v1.TreeNode + */ +export const TreeNode = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TreeNode", + () => [ + { no: 1, name: "id", kind: "message", T: TreeNodeID }, + { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, + { no: 5, name: "ins_prev_id", kind: "message", T: TreeNodeID }, + { no: 6, name: "ins_next_id", kind: "message", T: TreeNodeID }, + { no: 7, name: "depth", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 8, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: NodeAttr} }, + ], +); + +/** + * @generated from message yorkie.v1.TreeNodes + */ +export const TreeNodes = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TreeNodes", + () => [ + { no: 1, name: "content", kind: "message", T: TreeNode, repeated: true }, + ], +); + +/** + * @generated from message yorkie.v1.TreeNodeID + */ +export const TreeNodeID = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TreeNodeID", + () => [ + { no: 1, name: "created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ], +); + +/** + * @generated from message yorkie.v1.TreePos + */ +export const TreePos = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TreePos", + () => [ + { no: 1, name: "parent_id", kind: "message", T: TreeNodeID }, + { no: 2, name: "left_sibling_id", kind: "message", T: TreeNodeID }, + ], +); + +/** + * @generated from message yorkie.v1.User + */ +export const User = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.User", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "created_at", kind: "message", T: Timestamp }, + ], +); + +/** + * @generated from message yorkie.v1.Project + */ +export const Project = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Project", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "secret_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "auth_webhook_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "auth_webhook_methods", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 7, name: "client_deactivate_threshold", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "created_at", kind: "message", T: Timestamp }, + { no: 9, name: "updated_at", kind: "message", T: Timestamp }, + ], +); + +/** + * @generated from message yorkie.v1.UpdatableProjectFields + */ +export const UpdatableProjectFields = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.UpdatableProjectFields", + () => [ + { no: 1, name: "name", kind: "message", T: StringValue }, + { no: 2, name: "auth_webhook_url", kind: "message", T: StringValue }, + { no: 3, name: "auth_webhook_methods", kind: "message", T: UpdatableProjectFields_AuthWebhookMethods }, + { no: 4, name: "client_deactivate_threshold", kind: "message", T: StringValue }, + ], +); + +/** + * @generated from message yorkie.v1.UpdatableProjectFields.AuthWebhookMethods + */ +export const UpdatableProjectFields_AuthWebhookMethods = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.UpdatableProjectFields.AuthWebhookMethods", + () => [ + { no: 1, name: "methods", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], + {localName: "UpdatableProjectFields_AuthWebhookMethods"}, +); + +/** + * @generated from message yorkie.v1.DocumentSummary + */ +export const DocumentSummary = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.DocumentSummary", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "snapshot", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "created_at", kind: "message", T: Timestamp }, + { no: 5, name: "accessed_at", kind: "message", T: Timestamp }, + { no: 6, name: "updated_at", kind: "message", T: Timestamp }, + ], +); + +/** + * @generated from message yorkie.v1.PresenceChange + */ +export const PresenceChange = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.PresenceChange", + () => [ + { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(PresenceChange_ChangeType) }, + { no: 2, name: "presence", kind: "message", T: Presence }, + ], +); + +/** + * @generated from enum yorkie.v1.PresenceChange.ChangeType + */ +export const PresenceChange_ChangeType = /*@__PURE__*/ proto3.makeEnum( + "yorkie.v1.PresenceChange.ChangeType", + [ + {no: 0, name: "CHANGE_TYPE_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "CHANGE_TYPE_PUT", localName: "PUT"}, + {no: 2, name: "CHANGE_TYPE_DELETE", localName: "DELETE"}, + {no: 3, name: "CHANGE_TYPE_CLEAR", localName: "CLEAR"}, + ], +); + +/** + * @generated from message yorkie.v1.Presence + */ +export const Presence = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Presence", + () => [ + { no: 1, name: "data", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + ], +); + +/** + * @generated from message yorkie.v1.Checkpoint + */ +export const Checkpoint = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.Checkpoint", + () => [ + { no: 1, name: "server_seq", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, + { no: 2, name: "client_seq", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ], +); + +/** + * @generated from message yorkie.v1.TextNodePos + */ +export const TextNodePos = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TextNodePos", + () => [ + { no: 1, name: "created_at", kind: "message", T: TimeTicket }, + { no: 2, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: "relative_offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ], +); + +/** + * @generated from message yorkie.v1.TimeTicket + */ +export const TimeTicket = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.TimeTicket", + () => [ + { no: 1, name: "lamport", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, + { no: 2, name: "delimiter", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: "actor_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * @generated from message yorkie.v1.DocEventBody + */ +export const DocEventBody = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.DocEventBody", + () => [ + { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * @generated from message yorkie.v1.DocEvent + */ +export const DocEvent = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.DocEvent", + () => [ + { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(DocEventType) }, + { no: 2, name: "publisher", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "body", kind: "message", T: DocEventBody }, + ], +); + diff --git a/packages/sdk/src/api/yorkie/v1/resources_pb.ts b/packages/sdk/src/api/yorkie/v1/resources_pb.ts deleted file mode 100644 index 5aa23be10..000000000 --- a/packages/sdk/src/api/yorkie/v1/resources_pb.ts +++ /dev/null @@ -1,2712 +0,0 @@ -// -// Copyright 2022 The Yorkie Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,js_import_style=module" -// @generated from file src/api/yorkie/v1/resources.proto (package yorkie.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, StringValue, Timestamp } from "@bufbuild/protobuf"; - -/** - * @generated from enum yorkie.v1.ValueType - */ -export enum ValueType { - /** - * @generated from enum value: VALUE_TYPE_NULL = 0; - */ - NULL = 0, - - /** - * @generated from enum value: VALUE_TYPE_BOOLEAN = 1; - */ - BOOLEAN = 1, - - /** - * @generated from enum value: VALUE_TYPE_INTEGER = 2; - */ - INTEGER = 2, - - /** - * @generated from enum value: VALUE_TYPE_LONG = 3; - */ - LONG = 3, - - /** - * @generated from enum value: VALUE_TYPE_DOUBLE = 4; - */ - DOUBLE = 4, - - /** - * @generated from enum value: VALUE_TYPE_STRING = 5; - */ - STRING = 5, - - /** - * @generated from enum value: VALUE_TYPE_BYTES = 6; - */ - BYTES = 6, - - /** - * @generated from enum value: VALUE_TYPE_DATE = 7; - */ - DATE = 7, - - /** - * @generated from enum value: VALUE_TYPE_JSON_OBJECT = 8; - */ - JSON_OBJECT = 8, - - /** - * @generated from enum value: VALUE_TYPE_JSON_ARRAY = 9; - */ - JSON_ARRAY = 9, - - /** - * @generated from enum value: VALUE_TYPE_TEXT = 10; - */ - TEXT = 10, - - /** - * @generated from enum value: VALUE_TYPE_INTEGER_CNT = 11; - */ - INTEGER_CNT = 11, - - /** - * @generated from enum value: VALUE_TYPE_LONG_CNT = 12; - */ - LONG_CNT = 12, - - /** - * @generated from enum value: VALUE_TYPE_TREE = 13; - */ - TREE = 13, -} -// Retrieve enum metadata with: proto3.getEnumType(ValueType) -proto3.util.setEnumType(ValueType, "yorkie.v1.ValueType", [ - { no: 0, name: "VALUE_TYPE_NULL" }, - { no: 1, name: "VALUE_TYPE_BOOLEAN" }, - { no: 2, name: "VALUE_TYPE_INTEGER" }, - { no: 3, name: "VALUE_TYPE_LONG" }, - { no: 4, name: "VALUE_TYPE_DOUBLE" }, - { no: 5, name: "VALUE_TYPE_STRING" }, - { no: 6, name: "VALUE_TYPE_BYTES" }, - { no: 7, name: "VALUE_TYPE_DATE" }, - { no: 8, name: "VALUE_TYPE_JSON_OBJECT" }, - { no: 9, name: "VALUE_TYPE_JSON_ARRAY" }, - { no: 10, name: "VALUE_TYPE_TEXT" }, - { no: 11, name: "VALUE_TYPE_INTEGER_CNT" }, - { no: 12, name: "VALUE_TYPE_LONG_CNT" }, - { no: 13, name: "VALUE_TYPE_TREE" }, -]); - -/** - * @generated from enum yorkie.v1.DocEventType - */ -export enum DocEventType { - /** - * @generated from enum value: DOC_EVENT_TYPE_DOCUMENT_CHANGED = 0; - */ - DOCUMENT_CHANGED = 0, - - /** - * @generated from enum value: DOC_EVENT_TYPE_DOCUMENT_WATCHED = 1; - */ - DOCUMENT_WATCHED = 1, - - /** - * @generated from enum value: DOC_EVENT_TYPE_DOCUMENT_UNWATCHED = 2; - */ - DOCUMENT_UNWATCHED = 2, - - /** - * @generated from enum value: DOC_EVENT_TYPE_DOCUMENT_BROADCAST = 3; - */ - DOCUMENT_BROADCAST = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(DocEventType) -proto3.util.setEnumType(DocEventType, "yorkie.v1.DocEventType", [ - { no: 0, name: "DOC_EVENT_TYPE_DOCUMENT_CHANGED" }, - { no: 1, name: "DOC_EVENT_TYPE_DOCUMENT_WATCHED" }, - { no: 2, name: "DOC_EVENT_TYPE_DOCUMENT_UNWATCHED" }, - { no: 3, name: "DOC_EVENT_TYPE_DOCUMENT_BROADCAST" }, -]); - -/** - * /////////////////////////////////////// - * Messages for Snapshot // - * /////////////////////////////////////// - * - * @generated from message yorkie.v1.Snapshot - */ -export class Snapshot extends Message { - /** - * @generated from field: yorkie.v1.JSONElement root = 1; - */ - root?: JSONElement; - - /** - * @generated from field: map presences = 2; - */ - presences: { [key: string]: Presence } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Snapshot"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "root", kind: "message", T: JSONElement }, - { no: 2, name: "presences", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Presence} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Snapshot { - return new Snapshot().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Snapshot { - return new Snapshot().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Snapshot { - return new Snapshot().fromJsonString(jsonString, options); - } - - static equals(a: Snapshot | PlainMessage | undefined, b: Snapshot | PlainMessage | undefined): boolean { - return proto3.util.equals(Snapshot, a, b); - } -} - -/** - * ChangePack is a message that contains all changes that occurred in a document. - * It is used to synchronize changes between clients and servers. - * - * @generated from message yorkie.v1.ChangePack - */ -export class ChangePack extends Message { - /** - * @generated from field: string document_key = 1; - */ - documentKey = ""; - - /** - * @generated from field: yorkie.v1.Checkpoint checkpoint = 2; - */ - checkpoint?: Checkpoint; - - /** - * @generated from field: bytes snapshot = 3; - */ - snapshot = new Uint8Array(0); - - /** - * @generated from field: yorkie.v1.VersionVector snapshot_version_vector = 7; - */ - snapshotVersionVector?: VersionVector; - - /** - * @generated from field: repeated yorkie.v1.Change changes = 4; - */ - changes: Change[] = []; - - /** - * Deprecated - * - * @generated from field: yorkie.v1.TimeTicket min_synced_ticket = 5; - */ - minSyncedTicket?: TimeTicket; - - /** - * @generated from field: yorkie.v1.VersionVector min_synced_version_vector = 8; - */ - minSyncedVersionVector?: VersionVector; - - /** - * @generated from field: bool is_removed = 6; - */ - isRemoved = false; - - /** - * @generated from field: yorkie.v1.VersionVector version_vector = 9; - */ - versionVector?: VersionVector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.ChangePack"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "document_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "checkpoint", kind: "message", T: Checkpoint }, - { no: 3, name: "snapshot", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 7, name: "snapshot_version_vector", kind: "message", T: VersionVector }, - { no: 4, name: "changes", kind: "message", T: Change, repeated: true }, - { no: 5, name: "min_synced_ticket", kind: "message", T: TimeTicket }, - { no: 8, name: "min_synced_version_vector", kind: "message", T: VersionVector }, - { no: 6, name: "is_removed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 9, name: "version_vector", kind: "message", T: VersionVector }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ChangePack { - return new ChangePack().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ChangePack { - return new ChangePack().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ChangePack { - return new ChangePack().fromJsonString(jsonString, options); - } - - static equals(a: ChangePack | PlainMessage | undefined, b: ChangePack | PlainMessage | undefined): boolean { - return proto3.util.equals(ChangePack, a, b); - } -} - -/** - * @generated from message yorkie.v1.Change - */ -export class Change extends Message { - /** - * @generated from field: yorkie.v1.ChangeID id = 1; - */ - id?: ChangeID; - - /** - * @generated from field: string message = 2; - */ - message = ""; - - /** - * @generated from field: repeated yorkie.v1.Operation operations = 3; - */ - operations: Operation[] = []; - - /** - * @generated from field: yorkie.v1.PresenceChange presence_change = 4; - */ - presenceChange?: PresenceChange; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Change"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "message", T: ChangeID }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "operations", kind: "message", T: Operation, repeated: true }, - { no: 4, name: "presence_change", kind: "message", T: PresenceChange }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Change { - return new Change().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Change { - return new Change().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Change { - return new Change().fromJsonString(jsonString, options); - } - - static equals(a: Change | PlainMessage | undefined, b: Change | PlainMessage | undefined): boolean { - return proto3.util.equals(Change, a, b); - } -} - -/** - * @generated from message yorkie.v1.ChangeID - */ -export class ChangeID extends Message { - /** - * @generated from field: uint32 client_seq = 1; - */ - clientSeq = 0; - - /** - * @generated from field: int64 server_seq = 2 [jstype = JS_STRING]; - */ - serverSeq = "0"; - - /** - * @generated from field: int64 lamport = 3 [jstype = JS_STRING]; - */ - lamport = "0"; - - /** - * @generated from field: bytes actor_id = 4; - */ - actorId = new Uint8Array(0); - - /** - * @generated from field: yorkie.v1.VersionVector version_vector = 5; - */ - versionVector?: VersionVector; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.ChangeID"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_seq", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 2, name: "server_seq", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, - { no: 3, name: "lamport", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, - { no: 4, name: "actor_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 5, name: "version_vector", kind: "message", T: VersionVector }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ChangeID { - return new ChangeID().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ChangeID { - return new ChangeID().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ChangeID { - return new ChangeID().fromJsonString(jsonString, options); - } - - static equals(a: ChangeID | PlainMessage | undefined, b: ChangeID | PlainMessage | undefined): boolean { - return proto3.util.equals(ChangeID, a, b); - } -} - -/** - * @generated from message yorkie.v1.VersionVector - */ -export class VersionVector extends Message { - /** - * @generated from field: map vector = 1; - */ - vector: { [key: string]: bigint } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.VersionVector"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "vector", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 3 /* ScalarType.INT64 */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VersionVector { - return new VersionVector().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VersionVector { - return new VersionVector().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VersionVector { - return new VersionVector().fromJsonString(jsonString, options); - } - - static equals(a: VersionVector | PlainMessage | undefined, b: VersionVector | PlainMessage | undefined): boolean { - return proto3.util.equals(VersionVector, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation - */ -export class Operation extends Message { - /** - * @generated from oneof yorkie.v1.Operation.body - */ - body: { - /** - * @generated from field: yorkie.v1.Operation.Set set = 1; - */ - value: Operation_Set; - case: "set"; - } | { - /** - * @generated from field: yorkie.v1.Operation.Add add = 2; - */ - value: Operation_Add; - case: "add"; - } | { - /** - * @generated from field: yorkie.v1.Operation.Move move = 3; - */ - value: Operation_Move; - case: "move"; - } | { - /** - * @generated from field: yorkie.v1.Operation.Remove remove = 4; - */ - value: Operation_Remove; - case: "remove"; - } | { - /** - * @generated from field: yorkie.v1.Operation.Edit edit = 5; - */ - value: Operation_Edit; - case: "edit"; - } | { - /** - * @generated from field: yorkie.v1.Operation.Select select = 6; - */ - value: Operation_Select; - case: "select"; - } | { - /** - * @generated from field: yorkie.v1.Operation.Style style = 7; - */ - value: Operation_Style; - case: "style"; - } | { - /** - * @generated from field: yorkie.v1.Operation.Increase increase = 8; - */ - value: Operation_Increase; - case: "increase"; - } | { - /** - * @generated from field: yorkie.v1.Operation.TreeEdit tree_edit = 9; - */ - value: Operation_TreeEdit; - case: "treeEdit"; - } | { - /** - * @generated from field: yorkie.v1.Operation.TreeStyle tree_style = 10; - */ - value: Operation_TreeStyle; - case: "treeStyle"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "set", kind: "message", T: Operation_Set, oneof: "body" }, - { no: 2, name: "add", kind: "message", T: Operation_Add, oneof: "body" }, - { no: 3, name: "move", kind: "message", T: Operation_Move, oneof: "body" }, - { no: 4, name: "remove", kind: "message", T: Operation_Remove, oneof: "body" }, - { no: 5, name: "edit", kind: "message", T: Operation_Edit, oneof: "body" }, - { no: 6, name: "select", kind: "message", T: Operation_Select, oneof: "body" }, - { no: 7, name: "style", kind: "message", T: Operation_Style, oneof: "body" }, - { no: 8, name: "increase", kind: "message", T: Operation_Increase, oneof: "body" }, - { no: 9, name: "tree_edit", kind: "message", T: Operation_TreeEdit, oneof: "body" }, - { no: 10, name: "tree_style", kind: "message", T: Operation_TreeStyle, oneof: "body" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation { - return new Operation().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation { - return new Operation().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation { - return new Operation().fromJsonString(jsonString, options); - } - - static equals(a: Operation | PlainMessage | undefined, b: Operation | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.Set - */ -export class Operation_Set extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: string key = 2; - */ - key = ""; - - /** - * @generated from field: yorkie.v1.JSONElementSimple value = 3; - */ - value?: JSONElementSimple; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 4; - */ - executedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Set"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "value", kind: "message", T: JSONElementSimple }, - { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Set { - return new Operation_Set().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Set { - return new Operation_Set().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Set { - return new Operation_Set().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Set | PlainMessage | undefined, b: Operation_Set | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Set, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.Add - */ -export class Operation_Add extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket prev_created_at = 2; - */ - prevCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.JSONElementSimple value = 3; - */ - value?: JSONElementSimple; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 4; - */ - executedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Add"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "prev_created_at", kind: "message", T: TimeTicket }, - { no: 3, name: "value", kind: "message", T: JSONElementSimple }, - { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Add { - return new Operation_Add().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Add { - return new Operation_Add().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Add { - return new Operation_Add().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Add | PlainMessage | undefined, b: Operation_Add | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Add, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.Move - */ -export class Operation_Move extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket prev_created_at = 2; - */ - prevCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 3; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 4; - */ - executedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Move"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "prev_created_at", kind: "message", T: TimeTicket }, - { no: 3, name: "created_at", kind: "message", T: TimeTicket }, - { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Move { - return new Operation_Move().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Move { - return new Operation_Move().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Move { - return new Operation_Move().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Move | PlainMessage | undefined, b: Operation_Move | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Move, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.Remove - */ -export class Operation_Remove extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 2; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 3; - */ - executedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Remove"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "created_at", kind: "message", T: TimeTicket }, - { no: 3, name: "executed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Remove { - return new Operation_Remove().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Remove { - return new Operation_Remove().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Remove { - return new Operation_Remove().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Remove | PlainMessage | undefined, b: Operation_Remove | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Remove, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.Edit - */ -export class Operation_Edit extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TextNodePos from = 2; - */ - from?: TextNodePos; - - /** - * @generated from field: yorkie.v1.TextNodePos to = 3; - */ - to?: TextNodePos; - - /** - * @generated from field: map created_at_map_by_actor = 4; - */ - createdAtMapByActor: { [key: string]: TimeTicket } = {}; - - /** - * @generated from field: string content = 5; - */ - content = ""; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 6; - */ - executedAt?: TimeTicket; - - /** - * @generated from field: map attributes = 7; - */ - attributes: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Edit"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "from", kind: "message", T: TextNodePos }, - { no: 3, name: "to", kind: "message", T: TextNodePos }, - { no: 4, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, - { no: 5, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "executed_at", kind: "message", T: TimeTicket }, - { no: 7, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Edit { - return new Operation_Edit().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Edit { - return new Operation_Edit().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Edit { - return new Operation_Edit().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Edit | PlainMessage | undefined, b: Operation_Edit | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Edit, a, b); - } -} - -/** - * NOTE(hackerwins): Select Operation is not used in the current version. - * In the previous version, it was used to represent selection of Text. - * However, it has been replaced by Presence now. It is retained for backward - * compatibility purposes. - * - * @generated from message yorkie.v1.Operation.Select - */ -export class Operation_Select extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TextNodePos from = 2; - */ - from?: TextNodePos; - - /** - * @generated from field: yorkie.v1.TextNodePos to = 3; - */ - to?: TextNodePos; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 4; - */ - executedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Select"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "from", kind: "message", T: TextNodePos }, - { no: 3, name: "to", kind: "message", T: TextNodePos }, - { no: 4, name: "executed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Select { - return new Operation_Select().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Select { - return new Operation_Select().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Select { - return new Operation_Select().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Select | PlainMessage | undefined, b: Operation_Select | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Select, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.Style - */ -export class Operation_Style extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TextNodePos from = 2; - */ - from?: TextNodePos; - - /** - * @generated from field: yorkie.v1.TextNodePos to = 3; - */ - to?: TextNodePos; - - /** - * @generated from field: map attributes = 4; - */ - attributes: { [key: string]: string } = {}; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 5; - */ - executedAt?: TimeTicket; - - /** - * @generated from field: map created_at_map_by_actor = 6; - */ - createdAtMapByActor: { [key: string]: TimeTicket } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Style"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "from", kind: "message", T: TextNodePos }, - { no: 3, name: "to", kind: "message", T: TextNodePos }, - { no: 4, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 5, name: "executed_at", kind: "message", T: TimeTicket }, - { no: 6, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Style { - return new Operation_Style().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Style { - return new Operation_Style().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Style { - return new Operation_Style().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Style | PlainMessage | undefined, b: Operation_Style | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Style, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.Increase - */ -export class Operation_Increase extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.JSONElementSimple value = 2; - */ - value?: JSONElementSimple; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 3; - */ - executedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.Increase"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "value", kind: "message", T: JSONElementSimple }, - { no: 3, name: "executed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_Increase { - return new Operation_Increase().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_Increase { - return new Operation_Increase().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_Increase { - return new Operation_Increase().fromJsonString(jsonString, options); - } - - static equals(a: Operation_Increase | PlainMessage | undefined, b: Operation_Increase | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_Increase, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.TreeEdit - */ -export class Operation_TreeEdit extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TreePos from = 2; - */ - from?: TreePos; - - /** - * @generated from field: yorkie.v1.TreePos to = 3; - */ - to?: TreePos; - - /** - * @generated from field: map created_at_map_by_actor = 4; - */ - createdAtMapByActor: { [key: string]: TimeTicket } = {}; - - /** - * @generated from field: repeated yorkie.v1.TreeNodes contents = 5; - */ - contents: TreeNodes[] = []; - - /** - * @generated from field: int32 split_level = 7; - */ - splitLevel = 0; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 6; - */ - executedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.TreeEdit"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "from", kind: "message", T: TreePos }, - { no: 3, name: "to", kind: "message", T: TreePos }, - { no: 4, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, - { no: 5, name: "contents", kind: "message", T: TreeNodes, repeated: true }, - { no: 7, name: "split_level", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 6, name: "executed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_TreeEdit { - return new Operation_TreeEdit().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_TreeEdit { - return new Operation_TreeEdit().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_TreeEdit { - return new Operation_TreeEdit().fromJsonString(jsonString, options); - } - - static equals(a: Operation_TreeEdit | PlainMessage | undefined, b: Operation_TreeEdit | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_TreeEdit, a, b); - } -} - -/** - * @generated from message yorkie.v1.Operation.TreeStyle - */ -export class Operation_TreeStyle extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket parent_created_at = 1; - */ - parentCreatedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TreePos from = 2; - */ - from?: TreePos; - - /** - * @generated from field: yorkie.v1.TreePos to = 3; - */ - to?: TreePos; - - /** - * @generated from field: map attributes = 4; - */ - attributes: { [key: string]: string } = {}; - - /** - * @generated from field: yorkie.v1.TimeTicket executed_at = 5; - */ - executedAt?: TimeTicket; - - /** - * @generated from field: repeated string attributes_to_remove = 6; - */ - attributesToRemove: string[] = []; - - /** - * @generated from field: map created_at_map_by_actor = 7; - */ - createdAtMapByActor: { [key: string]: TimeTicket } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Operation.TreeStyle"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "from", kind: "message", T: TreePos }, - { no: 3, name: "to", kind: "message", T: TreePos }, - { no: 4, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 5, name: "executed_at", kind: "message", T: TimeTicket }, - { no: 6, name: "attributes_to_remove", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 7, name: "created_at_map_by_actor", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TimeTicket} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Operation_TreeStyle { - return new Operation_TreeStyle().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Operation_TreeStyle { - return new Operation_TreeStyle().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Operation_TreeStyle { - return new Operation_TreeStyle().fromJsonString(jsonString, options); - } - - static equals(a: Operation_TreeStyle | PlainMessage | undefined, b: Operation_TreeStyle | PlainMessage | undefined): boolean { - return proto3.util.equals(Operation_TreeStyle, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElementSimple - */ -export class JSONElementSimple extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 1; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket moved_at = 2; - */ - movedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 3; - */ - removedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.ValueType type = 4; - */ - type = ValueType.NULL; - - /** - * @generated from field: bytes value = 5; - */ - value = new Uint8Array(0); - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElementSimple"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "moved_at", kind: "message", T: TimeTicket }, - { no: 3, name: "removed_at", kind: "message", T: TimeTicket }, - { no: 4, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, - { no: 5, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElementSimple { - return new JSONElementSimple().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElementSimple { - return new JSONElementSimple().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElementSimple { - return new JSONElementSimple().fromJsonString(jsonString, options); - } - - static equals(a: JSONElementSimple | PlainMessage | undefined, b: JSONElementSimple | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElementSimple, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElement - */ -export class JSONElement extends Message { - /** - * @generated from oneof yorkie.v1.JSONElement.body - */ - body: { - /** - * @generated from field: yorkie.v1.JSONElement.JSONObject json_object = 1; - */ - value: JSONElement_JSONObject; - case: "jsonObject"; - } | { - /** - * @generated from field: yorkie.v1.JSONElement.JSONArray json_array = 2; - */ - value: JSONElement_JSONArray; - case: "jsonArray"; - } | { - /** - * @generated from field: yorkie.v1.JSONElement.Primitive primitive = 3; - */ - value: JSONElement_Primitive; - case: "primitive"; - } | { - /** - * @generated from field: yorkie.v1.JSONElement.Text text = 5; - */ - value: JSONElement_Text; - case: "text"; - } | { - /** - * @generated from field: yorkie.v1.JSONElement.Counter counter = 6; - */ - value: JSONElement_Counter; - case: "counter"; - } | { - /** - * @generated from field: yorkie.v1.JSONElement.Tree tree = 7; - */ - value: JSONElement_Tree; - case: "tree"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElement"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "json_object", kind: "message", T: JSONElement_JSONObject, oneof: "body" }, - { no: 2, name: "json_array", kind: "message", T: JSONElement_JSONArray, oneof: "body" }, - { no: 3, name: "primitive", kind: "message", T: JSONElement_Primitive, oneof: "body" }, - { no: 5, name: "text", kind: "message", T: JSONElement_Text, oneof: "body" }, - { no: 6, name: "counter", kind: "message", T: JSONElement_Counter, oneof: "body" }, - { no: 7, name: "tree", kind: "message", T: JSONElement_Tree, oneof: "body" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElement { - return new JSONElement().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElement { - return new JSONElement().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElement { - return new JSONElement().fromJsonString(jsonString, options); - } - - static equals(a: JSONElement | PlainMessage | undefined, b: JSONElement | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElement, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElement.JSONObject - */ -export class JSONElement_JSONObject extends Message { - /** - * @generated from field: repeated yorkie.v1.RHTNode nodes = 1; - */ - nodes: RHTNode[] = []; - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 2; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket moved_at = 3; - */ - movedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 4; - */ - removedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElement.JSONObject"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "nodes", kind: "message", T: RHTNode, repeated: true }, - { no: 2, name: "created_at", kind: "message", T: TimeTicket }, - { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, - { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElement_JSONObject { - return new JSONElement_JSONObject().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElement_JSONObject { - return new JSONElement_JSONObject().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElement_JSONObject { - return new JSONElement_JSONObject().fromJsonString(jsonString, options); - } - - static equals(a: JSONElement_JSONObject | PlainMessage | undefined, b: JSONElement_JSONObject | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElement_JSONObject, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElement.JSONArray - */ -export class JSONElement_JSONArray extends Message { - /** - * @generated from field: repeated yorkie.v1.RGANode nodes = 1; - */ - nodes: RGANode[] = []; - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 2; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket moved_at = 3; - */ - movedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 4; - */ - removedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElement.JSONArray"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "nodes", kind: "message", T: RGANode, repeated: true }, - { no: 2, name: "created_at", kind: "message", T: TimeTicket }, - { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, - { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElement_JSONArray { - return new JSONElement_JSONArray().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElement_JSONArray { - return new JSONElement_JSONArray().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElement_JSONArray { - return new JSONElement_JSONArray().fromJsonString(jsonString, options); - } - - static equals(a: JSONElement_JSONArray | PlainMessage | undefined, b: JSONElement_JSONArray | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElement_JSONArray, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElement.Primitive - */ -export class JSONElement_Primitive extends Message { - /** - * @generated from field: yorkie.v1.ValueType type = 1; - */ - type = ValueType.NULL; - - /** - * @generated from field: bytes value = 2; - */ - value = new Uint8Array(0); - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 3; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket moved_at = 4; - */ - movedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 5; - */ - removedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElement.Primitive"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, - { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "created_at", kind: "message", T: TimeTicket }, - { no: 4, name: "moved_at", kind: "message", T: TimeTicket }, - { no: 5, name: "removed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElement_Primitive { - return new JSONElement_Primitive().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElement_Primitive { - return new JSONElement_Primitive().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElement_Primitive { - return new JSONElement_Primitive().fromJsonString(jsonString, options); - } - - static equals(a: JSONElement_Primitive | PlainMessage | undefined, b: JSONElement_Primitive | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElement_Primitive, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElement.Text - */ -export class JSONElement_Text extends Message { - /** - * @generated from field: repeated yorkie.v1.TextNode nodes = 1; - */ - nodes: TextNode[] = []; - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 2; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket moved_at = 3; - */ - movedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 4; - */ - removedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElement.Text"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "nodes", kind: "message", T: TextNode, repeated: true }, - { no: 2, name: "created_at", kind: "message", T: TimeTicket }, - { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, - { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElement_Text { - return new JSONElement_Text().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElement_Text { - return new JSONElement_Text().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElement_Text { - return new JSONElement_Text().fromJsonString(jsonString, options); - } - - static equals(a: JSONElement_Text | PlainMessage | undefined, b: JSONElement_Text | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElement_Text, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElement.Counter - */ -export class JSONElement_Counter extends Message { - /** - * @generated from field: yorkie.v1.ValueType type = 1; - */ - type = ValueType.NULL; - - /** - * @generated from field: bytes value = 2; - */ - value = new Uint8Array(0); - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 3; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket moved_at = 4; - */ - movedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 5; - */ - removedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElement.Counter"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, - { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - { no: 3, name: "created_at", kind: "message", T: TimeTicket }, - { no: 4, name: "moved_at", kind: "message", T: TimeTicket }, - { no: 5, name: "removed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElement_Counter { - return new JSONElement_Counter().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElement_Counter { - return new JSONElement_Counter().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElement_Counter { - return new JSONElement_Counter().fromJsonString(jsonString, options); - } - - static equals(a: JSONElement_Counter | PlainMessage | undefined, b: JSONElement_Counter | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElement_Counter, a, b); - } -} - -/** - * @generated from message yorkie.v1.JSONElement.Tree - */ -export class JSONElement_Tree extends Message { - /** - * @generated from field: repeated yorkie.v1.TreeNode nodes = 1; - */ - nodes: TreeNode[] = []; - - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 2; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket moved_at = 3; - */ - movedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 4; - */ - removedAt?: TimeTicket; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.JSONElement.Tree"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "nodes", kind: "message", T: TreeNode, repeated: true }, - { no: 2, name: "created_at", kind: "message", T: TimeTicket }, - { no: 3, name: "moved_at", kind: "message", T: TimeTicket }, - { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JSONElement_Tree { - return new JSONElement_Tree().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JSONElement_Tree { - return new JSONElement_Tree().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JSONElement_Tree { - return new JSONElement_Tree().fromJsonString(jsonString, options); - } - - static equals(a: JSONElement_Tree | PlainMessage | undefined, b: JSONElement_Tree | PlainMessage | undefined): boolean { - return proto3.util.equals(JSONElement_Tree, a, b); - } -} - -/** - * @generated from message yorkie.v1.RHTNode - */ -export class RHTNode extends Message { - /** - * @generated from field: string key = 1; - */ - key = ""; - - /** - * @generated from field: yorkie.v1.JSONElement element = 2; - */ - element?: JSONElement; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.RHTNode"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "element", kind: "message", T: JSONElement }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RHTNode { - return new RHTNode().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RHTNode { - return new RHTNode().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RHTNode { - return new RHTNode().fromJsonString(jsonString, options); - } - - static equals(a: RHTNode | PlainMessage | undefined, b: RHTNode | PlainMessage | undefined): boolean { - return proto3.util.equals(RHTNode, a, b); - } -} - -/** - * @generated from message yorkie.v1.RGANode - */ -export class RGANode extends Message { - /** - * @generated from field: yorkie.v1.RGANode next = 1; - */ - next?: RGANode; - - /** - * @generated from field: yorkie.v1.JSONElement element = 2; - */ - element?: JSONElement; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.RGANode"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "next", kind: "message", T: RGANode }, - { no: 2, name: "element", kind: "message", T: JSONElement }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RGANode { - return new RGANode().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RGANode { - return new RGANode().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RGANode { - return new RGANode().fromJsonString(jsonString, options); - } - - static equals(a: RGANode | PlainMessage | undefined, b: RGANode | PlainMessage | undefined): boolean { - return proto3.util.equals(RGANode, a, b); - } -} - -/** - * @generated from message yorkie.v1.NodeAttr - */ -export class NodeAttr extends Message { - /** - * @generated from field: string value = 1; - */ - value = ""; - - /** - * @generated from field: yorkie.v1.TimeTicket updated_at = 2; - */ - updatedAt?: TimeTicket; - - /** - * @generated from field: bool is_removed = 3; - */ - isRemoved = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.NodeAttr"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "updated_at", kind: "message", T: TimeTicket }, - { no: 3, name: "is_removed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NodeAttr { - return new NodeAttr().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NodeAttr { - return new NodeAttr().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NodeAttr { - return new NodeAttr().fromJsonString(jsonString, options); - } - - static equals(a: NodeAttr | PlainMessage | undefined, b: NodeAttr | PlainMessage | undefined): boolean { - return proto3.util.equals(NodeAttr, a, b); - } -} - -/** - * @generated from message yorkie.v1.TextNode - */ -export class TextNode extends Message { - /** - * @generated from field: yorkie.v1.TextNodeID id = 1; - */ - id?: TextNodeID; - - /** - * @generated from field: string value = 2; - */ - value = ""; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 3; - */ - removedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TextNodeID ins_prev_id = 4; - */ - insPrevId?: TextNodeID; - - /** - * @generated from field: map attributes = 5; - */ - attributes: { [key: string]: NodeAttr } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TextNode"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "message", T: TextNodeID }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "removed_at", kind: "message", T: TimeTicket }, - { no: 4, name: "ins_prev_id", kind: "message", T: TextNodeID }, - { no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: NodeAttr} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextNode { - return new TextNode().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextNode { - return new TextNode().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextNode { - return new TextNode().fromJsonString(jsonString, options); - } - - static equals(a: TextNode | PlainMessage | undefined, b: TextNode | PlainMessage | undefined): boolean { - return proto3.util.equals(TextNode, a, b); - } -} - -/** - * @generated from message yorkie.v1.TextNodeID - */ -export class TextNodeID extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 1; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: int32 offset = 2; - */ - offset = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TextNodeID"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextNodeID { - return new TextNodeID().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextNodeID { - return new TextNodeID().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextNodeID { - return new TextNodeID().fromJsonString(jsonString, options); - } - - static equals(a: TextNodeID | PlainMessage | undefined, b: TextNodeID | PlainMessage | undefined): boolean { - return proto3.util.equals(TextNodeID, a, b); - } -} - -/** - * @generated from message yorkie.v1.TreeNode - */ -export class TreeNode extends Message { - /** - * @generated from field: yorkie.v1.TreeNodeID id = 1; - */ - id?: TreeNodeID; - - /** - * @generated from field: string type = 2; - */ - type = ""; - - /** - * @generated from field: string value = 3; - */ - value = ""; - - /** - * @generated from field: yorkie.v1.TimeTicket removed_at = 4; - */ - removedAt?: TimeTicket; - - /** - * @generated from field: yorkie.v1.TreeNodeID ins_prev_id = 5; - */ - insPrevId?: TreeNodeID; - - /** - * @generated from field: yorkie.v1.TreeNodeID ins_next_id = 6; - */ - insNextId?: TreeNodeID; - - /** - * @generated from field: int32 depth = 7; - */ - depth = 0; - - /** - * @generated from field: map attributes = 8; - */ - attributes: { [key: string]: NodeAttr } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TreeNode"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "message", T: TreeNodeID }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "removed_at", kind: "message", T: TimeTicket }, - { no: 5, name: "ins_prev_id", kind: "message", T: TreeNodeID }, - { no: 6, name: "ins_next_id", kind: "message", T: TreeNodeID }, - { no: 7, name: "depth", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 8, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: NodeAttr} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TreeNode { - return new TreeNode().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TreeNode { - return new TreeNode().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TreeNode { - return new TreeNode().fromJsonString(jsonString, options); - } - - static equals(a: TreeNode | PlainMessage | undefined, b: TreeNode | PlainMessage | undefined): boolean { - return proto3.util.equals(TreeNode, a, b); - } -} - -/** - * @generated from message yorkie.v1.TreeNodes - */ -export class TreeNodes extends Message { - /** - * @generated from field: repeated yorkie.v1.TreeNode content = 1; - */ - content: TreeNode[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TreeNodes"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "content", kind: "message", T: TreeNode, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TreeNodes { - return new TreeNodes().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TreeNodes { - return new TreeNodes().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TreeNodes { - return new TreeNodes().fromJsonString(jsonString, options); - } - - static equals(a: TreeNodes | PlainMessage | undefined, b: TreeNodes | PlainMessage | undefined): boolean { - return proto3.util.equals(TreeNodes, a, b); - } -} - -/** - * @generated from message yorkie.v1.TreeNodeID - */ -export class TreeNodeID extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 1; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: int32 offset = 2; - */ - offset = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TreeNodeID"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TreeNodeID { - return new TreeNodeID().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TreeNodeID { - return new TreeNodeID().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TreeNodeID { - return new TreeNodeID().fromJsonString(jsonString, options); - } - - static equals(a: TreeNodeID | PlainMessage | undefined, b: TreeNodeID | PlainMessage | undefined): boolean { - return proto3.util.equals(TreeNodeID, a, b); - } -} - -/** - * @generated from message yorkie.v1.TreePos - */ -export class TreePos extends Message { - /** - * @generated from field: yorkie.v1.TreeNodeID parent_id = 1; - */ - parentId?: TreeNodeID; - - /** - * @generated from field: yorkie.v1.TreeNodeID left_sibling_id = 2; - */ - leftSiblingId?: TreeNodeID; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TreePos"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "parent_id", kind: "message", T: TreeNodeID }, - { no: 2, name: "left_sibling_id", kind: "message", T: TreeNodeID }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TreePos { - return new TreePos().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TreePos { - return new TreePos().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TreePos { - return new TreePos().fromJsonString(jsonString, options); - } - - static equals(a: TreePos | PlainMessage | undefined, b: TreePos | PlainMessage | undefined): boolean { - return proto3.util.equals(TreePos, a, b); - } -} - -/** - * @generated from message yorkie.v1.User - */ -export class User extends Message { - /** - * @generated from field: string id = 1; - */ - id = ""; - - /** - * @generated from field: string username = 2; - */ - username = ""; - - /** - * @generated from field: google.protobuf.Timestamp created_at = 3; - */ - createdAt?: Timestamp; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.User"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "created_at", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): User { - return new User().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): User { - return new User().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): User { - return new User().fromJsonString(jsonString, options); - } - - static equals(a: User | PlainMessage | undefined, b: User | PlainMessage | undefined): boolean { - return proto3.util.equals(User, a, b); - } -} - -/** - * @generated from message yorkie.v1.Project - */ -export class Project extends Message { - /** - * @generated from field: string id = 1; - */ - id = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: string public_key = 3; - */ - publicKey = ""; - - /** - * @generated from field: string secret_key = 4; - */ - secretKey = ""; - - /** - * @generated from field: string auth_webhook_url = 5; - */ - authWebhookUrl = ""; - - /** - * @generated from field: repeated string auth_webhook_methods = 6; - */ - authWebhookMethods: string[] = []; - - /** - * @generated from field: string client_deactivate_threshold = 7; - */ - clientDeactivateThreshold = ""; - - /** - * @generated from field: google.protobuf.Timestamp created_at = 8; - */ - createdAt?: Timestamp; - - /** - * @generated from field: google.protobuf.Timestamp updated_at = 9; - */ - updatedAt?: Timestamp; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Project"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "secret_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "auth_webhook_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "auth_webhook_methods", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 7, name: "client_deactivate_threshold", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "created_at", kind: "message", T: Timestamp }, - { no: 9, name: "updated_at", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Project { - return new Project().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Project { - return new Project().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Project { - return new Project().fromJsonString(jsonString, options); - } - - static equals(a: Project | PlainMessage | undefined, b: Project | PlainMessage | undefined): boolean { - return proto3.util.equals(Project, a, b); - } -} - -/** - * @generated from message yorkie.v1.UpdatableProjectFields - */ -export class UpdatableProjectFields extends Message { - /** - * @generated from field: google.protobuf.StringValue name = 1; - */ - name?: string; - - /** - * @generated from field: google.protobuf.StringValue auth_webhook_url = 2; - */ - authWebhookUrl?: string; - - /** - * @generated from field: yorkie.v1.UpdatableProjectFields.AuthWebhookMethods auth_webhook_methods = 3; - */ - authWebhookMethods?: UpdatableProjectFields_AuthWebhookMethods; - - /** - * @generated from field: google.protobuf.StringValue client_deactivate_threshold = 4; - */ - clientDeactivateThreshold?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.UpdatableProjectFields"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "message", T: StringValue }, - { no: 2, name: "auth_webhook_url", kind: "message", T: StringValue }, - { no: 3, name: "auth_webhook_methods", kind: "message", T: UpdatableProjectFields_AuthWebhookMethods }, - { no: 4, name: "client_deactivate_threshold", kind: "message", T: StringValue }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdatableProjectFields { - return new UpdatableProjectFields().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdatableProjectFields { - return new UpdatableProjectFields().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdatableProjectFields { - return new UpdatableProjectFields().fromJsonString(jsonString, options); - } - - static equals(a: UpdatableProjectFields | PlainMessage | undefined, b: UpdatableProjectFields | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdatableProjectFields, a, b); - } -} - -/** - * @generated from message yorkie.v1.UpdatableProjectFields.AuthWebhookMethods - */ -export class UpdatableProjectFields_AuthWebhookMethods extends Message { - /** - * @generated from field: repeated string methods = 1; - */ - methods: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.UpdatableProjectFields.AuthWebhookMethods"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "methods", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdatableProjectFields_AuthWebhookMethods { - return new UpdatableProjectFields_AuthWebhookMethods().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdatableProjectFields_AuthWebhookMethods { - return new UpdatableProjectFields_AuthWebhookMethods().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): UpdatableProjectFields_AuthWebhookMethods { - return new UpdatableProjectFields_AuthWebhookMethods().fromJsonString(jsonString, options); - } - - static equals(a: UpdatableProjectFields_AuthWebhookMethods | PlainMessage | undefined, b: UpdatableProjectFields_AuthWebhookMethods | PlainMessage | undefined): boolean { - return proto3.util.equals(UpdatableProjectFields_AuthWebhookMethods, a, b); - } -} - -/** - * @generated from message yorkie.v1.DocumentSummary - */ -export class DocumentSummary extends Message { - /** - * @generated from field: string id = 1; - */ - id = ""; - - /** - * @generated from field: string key = 2; - */ - key = ""; - - /** - * @generated from field: string snapshot = 3; - */ - snapshot = ""; - - /** - * @generated from field: google.protobuf.Timestamp created_at = 4; - */ - createdAt?: Timestamp; - - /** - * @generated from field: google.protobuf.Timestamp accessed_at = 5; - */ - accessedAt?: Timestamp; - - /** - * @generated from field: google.protobuf.Timestamp updated_at = 6; - */ - updatedAt?: Timestamp; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.DocumentSummary"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "snapshot", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "created_at", kind: "message", T: Timestamp }, - { no: 5, name: "accessed_at", kind: "message", T: Timestamp }, - { no: 6, name: "updated_at", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DocumentSummary { - return new DocumentSummary().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DocumentSummary { - return new DocumentSummary().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DocumentSummary { - return new DocumentSummary().fromJsonString(jsonString, options); - } - - static equals(a: DocumentSummary | PlainMessage | undefined, b: DocumentSummary | PlainMessage | undefined): boolean { - return proto3.util.equals(DocumentSummary, a, b); - } -} - -/** - * @generated from message yorkie.v1.PresenceChange - */ -export class PresenceChange extends Message { - /** - * @generated from field: yorkie.v1.PresenceChange.ChangeType type = 1; - */ - type = PresenceChange_ChangeType.UNSPECIFIED; - - /** - * @generated from field: yorkie.v1.Presence presence = 2; - */ - presence?: Presence; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.PresenceChange"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(PresenceChange_ChangeType) }, - { no: 2, name: "presence", kind: "message", T: Presence }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PresenceChange { - return new PresenceChange().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PresenceChange { - return new PresenceChange().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PresenceChange { - return new PresenceChange().fromJsonString(jsonString, options); - } - - static equals(a: PresenceChange | PlainMessage | undefined, b: PresenceChange | PlainMessage | undefined): boolean { - return proto3.util.equals(PresenceChange, a, b); - } -} - -/** - * @generated from enum yorkie.v1.PresenceChange.ChangeType - */ -export enum PresenceChange_ChangeType { - /** - * @generated from enum value: CHANGE_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: CHANGE_TYPE_PUT = 1; - */ - PUT = 1, - - /** - * @generated from enum value: CHANGE_TYPE_DELETE = 2; - */ - DELETE = 2, - - /** - * @generated from enum value: CHANGE_TYPE_CLEAR = 3; - */ - CLEAR = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(PresenceChange_ChangeType) -proto3.util.setEnumType(PresenceChange_ChangeType, "yorkie.v1.PresenceChange.ChangeType", [ - { no: 0, name: "CHANGE_TYPE_UNSPECIFIED" }, - { no: 1, name: "CHANGE_TYPE_PUT" }, - { no: 2, name: "CHANGE_TYPE_DELETE" }, - { no: 3, name: "CHANGE_TYPE_CLEAR" }, -]); - -/** - * @generated from message yorkie.v1.Presence - */ -export class Presence extends Message { - /** - * @generated from field: map data = 1; - */ - data: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Presence"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "data", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Presence { - return new Presence().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Presence { - return new Presence().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Presence { - return new Presence().fromJsonString(jsonString, options); - } - - static equals(a: Presence | PlainMessage | undefined, b: Presence | PlainMessage | undefined): boolean { - return proto3.util.equals(Presence, a, b); - } -} - -/** - * @generated from message yorkie.v1.Checkpoint - */ -export class Checkpoint extends Message { - /** - * @generated from field: int64 server_seq = 1 [jstype = JS_STRING]; - */ - serverSeq = "0"; - - /** - * @generated from field: uint32 client_seq = 2; - */ - clientSeq = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.Checkpoint"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "server_seq", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, - { no: 2, name: "client_seq", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Checkpoint { - return new Checkpoint().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Checkpoint { - return new Checkpoint().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Checkpoint { - return new Checkpoint().fromJsonString(jsonString, options); - } - - static equals(a: Checkpoint | PlainMessage | undefined, b: Checkpoint | PlainMessage | undefined): boolean { - return proto3.util.equals(Checkpoint, a, b); - } -} - -/** - * @generated from message yorkie.v1.TextNodePos - */ -export class TextNodePos extends Message { - /** - * @generated from field: yorkie.v1.TimeTicket created_at = 1; - */ - createdAt?: TimeTicket; - - /** - * @generated from field: int32 offset = 2; - */ - offset = 0; - - /** - * @generated from field: int32 relative_offset = 3; - */ - relativeOffset = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TextNodePos"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "created_at", kind: "message", T: TimeTicket }, - { no: 2, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "relative_offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TextNodePos { - return new TextNodePos().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TextNodePos { - return new TextNodePos().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TextNodePos { - return new TextNodePos().fromJsonString(jsonString, options); - } - - static equals(a: TextNodePos | PlainMessage | undefined, b: TextNodePos | PlainMessage | undefined): boolean { - return proto3.util.equals(TextNodePos, a, b); - } -} - -/** - * @generated from message yorkie.v1.TimeTicket - */ -export class TimeTicket extends Message { - /** - * @generated from field: int64 lamport = 1 [jstype = JS_STRING]; - */ - lamport = "0"; - - /** - * @generated from field: uint32 delimiter = 2; - */ - delimiter = 0; - - /** - * @generated from field: bytes actor_id = 3; - */ - actorId = new Uint8Array(0); - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.TimeTicket"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "lamport", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, - { no: 2, name: "delimiter", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 3, name: "actor_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TimeTicket { - return new TimeTicket().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TimeTicket { - return new TimeTicket().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TimeTicket { - return new TimeTicket().fromJsonString(jsonString, options); - } - - static equals(a: TimeTicket | PlainMessage | undefined, b: TimeTicket | PlainMessage | undefined): boolean { - return proto3.util.equals(TimeTicket, a, b); - } -} - -/** - * @generated from message yorkie.v1.DocEventBody - */ -export class DocEventBody extends Message { - /** - * @generated from field: string topic = 1; - */ - topic = ""; - - /** - * @generated from field: bytes payload = 2; - */ - payload = new Uint8Array(0); - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.DocEventBody"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DocEventBody { - return new DocEventBody().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DocEventBody { - return new DocEventBody().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DocEventBody { - return new DocEventBody().fromJsonString(jsonString, options); - } - - static equals(a: DocEventBody | PlainMessage | undefined, b: DocEventBody | PlainMessage | undefined): boolean { - return proto3.util.equals(DocEventBody, a, b); - } -} - -/** - * @generated from message yorkie.v1.DocEvent - */ -export class DocEvent extends Message { - /** - * @generated from field: yorkie.v1.DocEventType type = 1; - */ - type = DocEventType.DOCUMENT_CHANGED; - - /** - * @generated from field: string publisher = 2; - */ - publisher = ""; - - /** - * @generated from field: yorkie.v1.DocEventBody body = 3; - */ - body?: DocEventBody; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.DocEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(DocEventType) }, - { no: 2, name: "publisher", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "body", kind: "message", T: DocEventBody }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DocEvent { - return new DocEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DocEvent { - return new DocEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DocEvent { - return new DocEvent().fromJsonString(jsonString, options); - } - - static equals(a: DocEvent | PlainMessage | undefined, b: DocEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(DocEvent, a, b); - } -} - diff --git a/packages/sdk/src/api/yorkie/v1/yorkie_connect.d.ts b/packages/sdk/src/api/yorkie/v1/yorkie_connect.d.ts index 3bb2e01ea..42ba095a2 100644 --- a/packages/sdk/src/api/yorkie/v1/yorkie_connect.d.ts +++ b/packages/sdk/src/api/yorkie/v1/yorkie_connect.d.ts @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-es v1.2.0 with parameter "target=js+dts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/sdk/src/api/yorkie/v1/yorkie_connect.ts b/packages/sdk/src/api/yorkie/v1/yorkie_connect.js similarity index 98% rename from packages/sdk/src/api/yorkie/v1/yorkie_connect.ts rename to packages/sdk/src/api/yorkie/v1/yorkie_connect.js index 19b5eb853..35af9855f 100644 --- a/packages/sdk/src/api/yorkie/v1/yorkie_connect.ts +++ b/packages/sdk/src/api/yorkie/v1/yorkie_connect.js @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -102,5 +102,5 @@ export const YorkieService = { kind: MethodKind.Unary, }, } -} as const; +}; diff --git a/packages/sdk/src/api/yorkie/v1/yorkie_pb.d.ts b/packages/sdk/src/api/yorkie/v1/yorkie_pb.d.ts index fa54d0267..893ab7b6f 100644 --- a/packages/sdk/src/api/yorkie/v1/yorkie_pb.d.ts +++ b/packages/sdk/src/api/yorkie/v1/yorkie_pb.d.ts @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=module" +// @generated by protoc-gen-es v1.10.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/sdk/src/api/yorkie/v1/yorkie_pb.js b/packages/sdk/src/api/yorkie/v1/yorkie_pb.js new file mode 100644 index 000000000..d7b6aa368 --- /dev/null +++ b/packages/sdk/src/api/yorkie/v1/yorkie_pb.js @@ -0,0 +1,205 @@ +// +// Copyright 2020 The Yorkie Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.10.0 with parameter "target=js+dts,js_import_style=module" +// @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { ChangePack, DocEvent } from "./resources_pb.js"; + +/** + * @generated from message yorkie.v1.ActivateClientRequest + */ +export const ActivateClientRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.ActivateClientRequest", + () => [ + { no: 1, name: "client_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message yorkie.v1.ActivateClientResponse + */ +export const ActivateClientResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.ActivateClientResponse", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message yorkie.v1.DeactivateClientRequest + */ +export const DeactivateClientRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.DeactivateClientRequest", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message yorkie.v1.DeactivateClientResponse + */ +export const DeactivateClientResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.DeactivateClientResponse", + [], +); + +/** + * @generated from message yorkie.v1.AttachDocumentRequest + */ +export const AttachDocumentRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.AttachDocumentRequest", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "change_pack", kind: "message", T: ChangePack }, + ], +); + +/** + * @generated from message yorkie.v1.AttachDocumentResponse + */ +export const AttachDocumentResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.AttachDocumentResponse", + () => [ + { no: 1, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "change_pack", kind: "message", T: ChangePack }, + ], +); + +/** + * @generated from message yorkie.v1.DetachDocumentRequest + */ +export const DetachDocumentRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.DetachDocumentRequest", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "change_pack", kind: "message", T: ChangePack }, + { no: 4, name: "remove_if_not_attached", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message yorkie.v1.DetachDocumentResponse + */ +export const DetachDocumentResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.DetachDocumentResponse", + () => [ + { no: 2, name: "change_pack", kind: "message", T: ChangePack }, + ], +); + +/** + * @generated from message yorkie.v1.WatchDocumentRequest + */ +export const WatchDocumentRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.WatchDocumentRequest", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message yorkie.v1.WatchDocumentResponse + */ +export const WatchDocumentResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.WatchDocumentResponse", + () => [ + { no: 1, name: "initialization", kind: "message", T: WatchDocumentResponse_Initialization, oneof: "body" }, + { no: 2, name: "event", kind: "message", T: DocEvent, oneof: "body" }, + ], +); + +/** + * @generated from message yorkie.v1.WatchDocumentResponse.Initialization + */ +export const WatchDocumentResponse_Initialization = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.WatchDocumentResponse.Initialization", + () => [ + { no: 1, name: "client_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], + {localName: "WatchDocumentResponse_Initialization"}, +); + +/** + * @generated from message yorkie.v1.RemoveDocumentRequest + */ +export const RemoveDocumentRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.RemoveDocumentRequest", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "change_pack", kind: "message", T: ChangePack }, + ], +); + +/** + * @generated from message yorkie.v1.RemoveDocumentResponse + */ +export const RemoveDocumentResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.RemoveDocumentResponse", + () => [ + { no: 1, name: "change_pack", kind: "message", T: ChangePack }, + ], +); + +/** + * @generated from message yorkie.v1.PushPullChangesRequest + */ +export const PushPullChangesRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.PushPullChangesRequest", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "change_pack", kind: "message", T: ChangePack }, + { no: 4, name: "push_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message yorkie.v1.PushPullChangesResponse + */ +export const PushPullChangesResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.PushPullChangesResponse", + () => [ + { no: 1, name: "change_pack", kind: "message", T: ChangePack }, + ], +); + +/** + * @generated from message yorkie.v1.BroadcastRequest + */ +export const BroadcastRequest = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.BroadcastRequest", + () => [ + { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * @generated from message yorkie.v1.BroadcastResponse + */ +export const BroadcastResponse = /*@__PURE__*/ proto3.makeMessageType( + "yorkie.v1.BroadcastResponse", + [], +); + diff --git a/packages/sdk/src/api/yorkie/v1/yorkie_pb.ts b/packages/sdk/src/api/yorkie/v1/yorkie_pb.ts deleted file mode 100644 index 231b5adcb..000000000 --- a/packages/sdk/src/api/yorkie/v1/yorkie_pb.ts +++ /dev/null @@ -1,738 +0,0 @@ -// -// Copyright 2020 The Yorkie Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,js_import_style=module" -// @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import { ChangePack, DocEvent } from "./resources_pb.js"; - -/** - * @generated from message yorkie.v1.ActivateClientRequest - */ -export class ActivateClientRequest extends Message { - /** - * @generated from field: string client_key = 1; - */ - clientKey = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.ActivateClientRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ActivateClientRequest { - return new ActivateClientRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ActivateClientRequest { - return new ActivateClientRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ActivateClientRequest { - return new ActivateClientRequest().fromJsonString(jsonString, options); - } - - static equals(a: ActivateClientRequest | PlainMessage | undefined, b: ActivateClientRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ActivateClientRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.ActivateClientResponse - */ -export class ActivateClientResponse extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.ActivateClientResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ActivateClientResponse { - return new ActivateClientResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ActivateClientResponse { - return new ActivateClientResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ActivateClientResponse { - return new ActivateClientResponse().fromJsonString(jsonString, options); - } - - static equals(a: ActivateClientResponse | PlainMessage | undefined, b: ActivateClientResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ActivateClientResponse, a, b); - } -} - -/** - * @generated from message yorkie.v1.DeactivateClientRequest - */ -export class DeactivateClientRequest extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.DeactivateClientRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateClientRequest { - return new DeactivateClientRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateClientRequest { - return new DeactivateClientRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeactivateClientRequest { - return new DeactivateClientRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeactivateClientRequest | PlainMessage | undefined, b: DeactivateClientRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeactivateClientRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.DeactivateClientResponse - */ -export class DeactivateClientResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.DeactivateClientResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeactivateClientResponse { - return new DeactivateClientResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeactivateClientResponse { - return new DeactivateClientResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeactivateClientResponse { - return new DeactivateClientResponse().fromJsonString(jsonString, options); - } - - static equals(a: DeactivateClientResponse | PlainMessage | undefined, b: DeactivateClientResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DeactivateClientResponse, a, b); - } -} - -/** - * @generated from message yorkie.v1.AttachDocumentRequest - */ -export class AttachDocumentRequest extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 2; - */ - changePack?: ChangePack; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.AttachDocumentRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "change_pack", kind: "message", T: ChangePack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AttachDocumentRequest { - return new AttachDocumentRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AttachDocumentRequest { - return new AttachDocumentRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AttachDocumentRequest { - return new AttachDocumentRequest().fromJsonString(jsonString, options); - } - - static equals(a: AttachDocumentRequest | PlainMessage | undefined, b: AttachDocumentRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(AttachDocumentRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.AttachDocumentResponse - */ -export class AttachDocumentResponse extends Message { - /** - * @generated from field: string document_id = 1; - */ - documentId = ""; - - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 2; - */ - changePack?: ChangePack; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.AttachDocumentResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "change_pack", kind: "message", T: ChangePack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AttachDocumentResponse { - return new AttachDocumentResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AttachDocumentResponse { - return new AttachDocumentResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AttachDocumentResponse { - return new AttachDocumentResponse().fromJsonString(jsonString, options); - } - - static equals(a: AttachDocumentResponse | PlainMessage | undefined, b: AttachDocumentResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(AttachDocumentResponse, a, b); - } -} - -/** - * @generated from message yorkie.v1.DetachDocumentRequest - */ -export class DetachDocumentRequest extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - /** - * @generated from field: string document_id = 2; - */ - documentId = ""; - - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 3; - */ - changePack?: ChangePack; - - /** - * @generated from field: bool remove_if_not_attached = 4; - */ - removeIfNotAttached = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.DetachDocumentRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "change_pack", kind: "message", T: ChangePack }, - { no: 4, name: "remove_if_not_attached", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DetachDocumentRequest { - return new DetachDocumentRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DetachDocumentRequest { - return new DetachDocumentRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DetachDocumentRequest { - return new DetachDocumentRequest().fromJsonString(jsonString, options); - } - - static equals(a: DetachDocumentRequest | PlainMessage | undefined, b: DetachDocumentRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DetachDocumentRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.DetachDocumentResponse - */ -export class DetachDocumentResponse extends Message { - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 2; - */ - changePack?: ChangePack; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.DetachDocumentResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "change_pack", kind: "message", T: ChangePack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DetachDocumentResponse { - return new DetachDocumentResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DetachDocumentResponse { - return new DetachDocumentResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DetachDocumentResponse { - return new DetachDocumentResponse().fromJsonString(jsonString, options); - } - - static equals(a: DetachDocumentResponse | PlainMessage | undefined, b: DetachDocumentResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(DetachDocumentResponse, a, b); - } -} - -/** - * @generated from message yorkie.v1.WatchDocumentRequest - */ -export class WatchDocumentRequest extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - /** - * @generated from field: string document_id = 2; - */ - documentId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.WatchDocumentRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WatchDocumentRequest { - return new WatchDocumentRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WatchDocumentRequest { - return new WatchDocumentRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WatchDocumentRequest { - return new WatchDocumentRequest().fromJsonString(jsonString, options); - } - - static equals(a: WatchDocumentRequest | PlainMessage | undefined, b: WatchDocumentRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(WatchDocumentRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.WatchDocumentResponse - */ -export class WatchDocumentResponse extends Message { - /** - * @generated from oneof yorkie.v1.WatchDocumentResponse.body - */ - body: { - /** - * @generated from field: yorkie.v1.WatchDocumentResponse.Initialization initialization = 1; - */ - value: WatchDocumentResponse_Initialization; - case: "initialization"; - } | { - /** - * @generated from field: yorkie.v1.DocEvent event = 2; - */ - value: DocEvent; - case: "event"; - } | { case: undefined; value?: undefined } = { case: undefined }; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.WatchDocumentResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "initialization", kind: "message", T: WatchDocumentResponse_Initialization, oneof: "body" }, - { no: 2, name: "event", kind: "message", T: DocEvent, oneof: "body" }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WatchDocumentResponse { - return new WatchDocumentResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WatchDocumentResponse { - return new WatchDocumentResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WatchDocumentResponse { - return new WatchDocumentResponse().fromJsonString(jsonString, options); - } - - static equals(a: WatchDocumentResponse | PlainMessage | undefined, b: WatchDocumentResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(WatchDocumentResponse, a, b); - } -} - -/** - * @generated from message yorkie.v1.WatchDocumentResponse.Initialization - */ -export class WatchDocumentResponse_Initialization extends Message { - /** - * @generated from field: repeated string client_ids = 1; - */ - clientIds: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.WatchDocumentResponse.Initialization"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WatchDocumentResponse_Initialization { - return new WatchDocumentResponse_Initialization().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WatchDocumentResponse_Initialization { - return new WatchDocumentResponse_Initialization().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WatchDocumentResponse_Initialization { - return new WatchDocumentResponse_Initialization().fromJsonString(jsonString, options); - } - - static equals(a: WatchDocumentResponse_Initialization | PlainMessage | undefined, b: WatchDocumentResponse_Initialization | PlainMessage | undefined): boolean { - return proto3.util.equals(WatchDocumentResponse_Initialization, a, b); - } -} - -/** - * @generated from message yorkie.v1.RemoveDocumentRequest - */ -export class RemoveDocumentRequest extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - /** - * @generated from field: string document_id = 2; - */ - documentId = ""; - - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 3; - */ - changePack?: ChangePack; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.RemoveDocumentRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "change_pack", kind: "message", T: ChangePack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveDocumentRequest { - return new RemoveDocumentRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveDocumentRequest { - return new RemoveDocumentRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoveDocumentRequest { - return new RemoveDocumentRequest().fromJsonString(jsonString, options); - } - - static equals(a: RemoveDocumentRequest | PlainMessage | undefined, b: RemoveDocumentRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoveDocumentRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.RemoveDocumentResponse - */ -export class RemoveDocumentResponse extends Message { - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 1; - */ - changePack?: ChangePack; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.RemoveDocumentResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "change_pack", kind: "message", T: ChangePack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RemoveDocumentResponse { - return new RemoveDocumentResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RemoveDocumentResponse { - return new RemoveDocumentResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RemoveDocumentResponse { - return new RemoveDocumentResponse().fromJsonString(jsonString, options); - } - - static equals(a: RemoveDocumentResponse | PlainMessage | undefined, b: RemoveDocumentResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(RemoveDocumentResponse, a, b); - } -} - -/** - * @generated from message yorkie.v1.PushPullChangesRequest - */ -export class PushPullChangesRequest extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - /** - * @generated from field: string document_id = 2; - */ - documentId = ""; - - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 3; - */ - changePack?: ChangePack; - - /** - * @generated from field: bool push_only = 4; - */ - pushOnly = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.PushPullChangesRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "change_pack", kind: "message", T: ChangePack }, - { no: 4, name: "push_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PushPullChangesRequest { - return new PushPullChangesRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PushPullChangesRequest { - return new PushPullChangesRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PushPullChangesRequest { - return new PushPullChangesRequest().fromJsonString(jsonString, options); - } - - static equals(a: PushPullChangesRequest | PlainMessage | undefined, b: PushPullChangesRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PushPullChangesRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.PushPullChangesResponse - */ -export class PushPullChangesResponse extends Message { - /** - * @generated from field: yorkie.v1.ChangePack change_pack = 1; - */ - changePack?: ChangePack; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.PushPullChangesResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "change_pack", kind: "message", T: ChangePack }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PushPullChangesResponse { - return new PushPullChangesResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PushPullChangesResponse { - return new PushPullChangesResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PushPullChangesResponse { - return new PushPullChangesResponse().fromJsonString(jsonString, options); - } - - static equals(a: PushPullChangesResponse | PlainMessage | undefined, b: PushPullChangesResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PushPullChangesResponse, a, b); - } -} - -/** - * @generated from message yorkie.v1.BroadcastRequest - */ -export class BroadcastRequest extends Message { - /** - * @generated from field: string client_id = 1; - */ - clientId = ""; - - /** - * @generated from field: string document_id = 2; - */ - documentId = ""; - - /** - * @generated from field: string topic = 3; - */ - topic = ""; - - /** - * @generated from field: bytes payload = 4; - */ - payload = new Uint8Array(0); - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.BroadcastRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BroadcastRequest { - return new BroadcastRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BroadcastRequest { - return new BroadcastRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BroadcastRequest { - return new BroadcastRequest().fromJsonString(jsonString, options); - } - - static equals(a: BroadcastRequest | PlainMessage | undefined, b: BroadcastRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(BroadcastRequest, a, b); - } -} - -/** - * @generated from message yorkie.v1.BroadcastResponse - */ -export class BroadcastResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "yorkie.v1.BroadcastResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BroadcastResponse { - return new BroadcastResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BroadcastResponse { - return new BroadcastResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BroadcastResponse { - return new BroadcastResponse().fromJsonString(jsonString, options); - } - - static equals(a: BroadcastResponse | PlainMessage | undefined, b: BroadcastResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(BroadcastResponse, a, b); - } -} -