diff --git a/packages/sdk/src/api/converter.ts b/packages/sdk/src/api/converter.ts
index e5a1e1752..9f102e1d9 100644
--- a/packages/sdk/src/api/converter.ts
+++ b/packages/sdk/src/api/converter.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-import Long from 'long';
import { ConnectError } from '@connectrpc/connect';
import { ErrorInfo } from '@buf/googleapis_googleapis.bufbuild_es/google/rpc/error_details_pb';
import { Code, YorkieError } from '@yorkie-js-sdk/src/util/error';
@@ -149,7 +148,7 @@ function toPresenceChange(
*/
function toCheckpoint(checkpoint: Checkpoint): PbCheckpoint {
return new PbCheckpoint({
- serverSeq: checkpoint.getServerSeqAsString(),
+ serverSeq: checkpoint.getServerSeq(),
clientSeq: checkpoint.getClientSeq(),
});
}
@@ -160,7 +159,7 @@ function toCheckpoint(checkpoint: Checkpoint): PbCheckpoint {
function toChangeID(changeID: ChangeID): PbChangeID {
return new PbChangeID({
clientSeq: changeID.getClientSeq(),
- lamport: changeID.getLamportAsString(),
+ lamport: changeID.getLamport(),
actorId: toUint8Array(changeID.getActorID()),
});
}
@@ -174,7 +173,7 @@ function toTimeTicket(ticket?: TimeTicket): PbTimeTicket | undefined {
}
return new PbTimeTicket({
- lamport: ticket.getLamportAsString(),
+ lamport: ticket.getLamport(),
delimiter: ticket.getDelimiter(),
actorId: toUint8Array(ticket.getActorID()),
});
@@ -805,16 +804,11 @@ export function errorCodeOf(error: ConnectError): string {
* `fromChangeID` converts the given Protobuf format to model format.
*/
function fromChangeID(pbChangeID: PbChangeID): ChangeID {
- let serverSeq: Long | undefined;
- if (pbChangeID.serverSeq) {
- serverSeq = Long.fromString(pbChangeID.serverSeq, true);
- }
-
return ChangeID.of(
pbChangeID.clientSeq,
- Long.fromString(pbChangeID.lamport, true),
+ BigInt(pbChangeID.lamport),
toHexString(pbChangeID.actorId),
- serverSeq,
+ BigInt(pbChangeID.serverSeq),
);
}
@@ -827,7 +821,7 @@ function fromTimeTicket(pbTimeTicket?: PbTimeTicket): TimeTicket | undefined {
}
return TimeTicket.of(
- Long.fromString(pbTimeTicket.lamport, true),
+ BigInt(pbTimeTicket.lamport),
pbTimeTicket.delimiter,
toHexString(pbTimeTicket.actorId),
);
@@ -1314,10 +1308,7 @@ function fromChanges
(
* `fromCheckpoint` converts the given Protobuf format to model format.
*/
function fromCheckpoint(pbCheckpoint: PbCheckpoint): Checkpoint {
- return Checkpoint.of(
- Long.fromString(pbCheckpoint.serverSeq, true),
- pbCheckpoint.clientSeq,
- );
+ return Checkpoint.of(BigInt(pbCheckpoint.serverSeq), pbCheckpoint.clientSeq);
}
/**
diff --git a/packages/sdk/src/api/yorkie/v1/resources.proto b/packages/sdk/src/api/yorkie/v1/resources.proto
index d1a8c3776..9f31d95b0 100644
--- a/packages/sdk/src/api/yorkie/v1/resources.proto
+++ b/packages/sdk/src/api/yorkie/v1/resources.proto
@@ -57,8 +57,8 @@ message Change {
message ChangeID {
uint32 client_seq = 1;
- int64 server_seq = 2 [jstype = JS_STRING];
- int64 lamport = 3 [jstype = JS_STRING];
+ int64 server_seq = 2;
+ int64 lamport = 3;
bytes actor_id = 4;
}
@@ -136,6 +136,12 @@ message Operation {
repeated string attributes_to_remove = 6;
map created_at_map_by_actor = 7;
}
+ message ArraySet {
+ TimeTicket parent_created_at = 1;
+ TimeTicket created_at = 2;
+ JSONElementSimple value = 3;
+ TimeTicket executed_at = 4;
+ }
oneof body {
Set set = 1;
@@ -148,6 +154,7 @@ message Operation {
Increase increase = 8;
TreeEdit tree_edit = 9;
TreeStyle tree_style = 10;
+ ArraySet array_set = 11;
}
}
@@ -325,7 +332,7 @@ message Presence {
}
message Checkpoint {
- int64 server_seq = 1 [jstype = JS_STRING];
+ int64 server_seq = 1;
uint32 client_seq = 2;
}
@@ -336,7 +343,7 @@ message TextNodePos {
}
message TimeTicket {
- int64 lamport = 1 [jstype = JS_STRING];
+ int64 lamport = 1;
uint32 delimiter = 2;
bytes actor_id = 3;
}
diff --git a/packages/sdk/src/api/yorkie/v1/resources_pb.ts b/packages/sdk/src/api/yorkie/v1/resources_pb.ts
new file mode 100644
index 000000000..c646d98b9
--- /dev/null
+++ b/packages/sdk/src/api/yorkie/v1/resources_pb.ts
@@ -0,0 +1,2711 @@
+//
+// 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, protoInt64, 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: repeated yorkie.v1.Change changes = 4;
+ */
+ changes: Change[] = [];
+
+ /**
+ * @generated from field: yorkie.v1.TimeTicket min_synced_ticket = 5;
+ */
+ minSyncedTicket?: TimeTicket;
+
+ /**
+ * @generated from field: bool is_removed = 6;
+ */
+ isRemoved = false;
+
+ 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: 4, name: "changes", kind: "message", T: Change, repeated: true },
+ { no: 5, name: "min_synced_ticket", kind: "message", T: TimeTicket },
+ { no: 6, name: "is_removed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
+ ]);
+
+ 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;
+ */
+ serverSeq = protoInt64.zero;
+
+ /**
+ * @generated from field: int64 lamport = 3;
+ */
+ lamport = protoInt64.zero;
+
+ /**
+ * @generated from field: bytes actor_id = 4;
+ */
+ actorId = new Uint8Array(0);
+
+ 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 */ },
+ { no: 3, name: "lamport", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
+ { no: 4, name: "actor_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
+ ]);
+
+ 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.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";
+ } | {
+ /**
+ * @generated from field: yorkie.v1.Operation.ArraySet array_set = 11;
+ */
+ value: Operation_ArraySet;
+ case: "arraySet";
+ } | { 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" },
+ { no: 11, name: "array_set", kind: "message", T: Operation_ArraySet, 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.Operation.ArraySet
+ */
+export class Operation_ArraySet 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.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.ArraySet";
+ 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: "value", kind: "message", T: JSONElementSimple },
+ { no: 4, name: "executed_at", kind: "message", T: TimeTicket },
+ ]);
+
+ static fromBinary(bytes: Uint8Array, options?: Partial): Operation_ArraySet {
+ return new Operation_ArraySet().fromBinary(bytes, options);
+ }
+
+ static fromJson(jsonValue: JsonValue, options?: Partial): Operation_ArraySet {
+ return new Operation_ArraySet().fromJson(jsonValue, options);
+ }
+
+ static fromJsonString(jsonString: string, options?: Partial): Operation_ArraySet {
+ return new Operation_ArraySet().fromJsonString(jsonString, options);
+ }
+
+ static equals(a: Operation_ArraySet | PlainMessage | undefined, b: Operation_ArraySet | PlainMessage | undefined): boolean {
+ return proto3.util.equals(Operation_ArraySet, 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