diff --git a/public/util.js b/public/util.js index 0b196ffac..042a2e8d8 100644 --- a/public/util.js +++ b/public/util.js @@ -25,7 +25,7 @@ const network = { (event.type == 'stream-connection-status-changed' && event.value == 'connected') || (event.type == 'document-sync-result' && event.value == 'synced') || - event.type == 'documents-changed') + event.type == 'document-changed') ) { network.showOnline(elem); } diff --git a/src/api/yorkie/v1/resources.proto b/src/api/yorkie/v1/resources.proto index 52e9b3920..aa2636878 100644 --- a/src/api/yorkie/v1/resources.proto +++ b/src/api/yorkie/v1/resources.proto @@ -353,9 +353,9 @@ enum ValueType { } enum DocEventType { - DOC_EVENT_TYPE_DOCUMENTS_CHANGED = 0; - DOC_EVENT_TYPE_DOCUMENTS_WATCHED = 1; - DOC_EVENT_TYPE_DOCUMENTS_UNWATCHED = 2; + DOC_EVENT_TYPE_DOCUMENT_CHANGED = 0; + DOC_EVENT_TYPE_DOCUMENT_WATCHED = 1; + DOC_EVENT_TYPE_DOCUMENT_UNWATCHED = 2; } message DocEvent { diff --git a/src/api/yorkie/v1/resources_pb.d.ts b/src/api/yorkie/v1/resources_pb.d.ts index 23ee13e65..95f993e91 100644 --- a/src/api/yorkie/v1/resources_pb.d.ts +++ b/src/api/yorkie/v1/resources_pb.d.ts @@ -1,8 +1,9 @@ -import * as jspb from 'google-protobuf'; +import * as jspb from 'google-protobuf' import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; + export class Snapshot extends jspb.Message { getRoot(): JSONElement | undefined; setRoot(value?: JSONElement): Snapshot; @@ -15,22 +16,16 @@ export class Snapshot extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Snapshot.AsObject; static toObject(includeInstance: boolean, msg: Snapshot): Snapshot.AsObject; - static serializeBinaryToWriter( - message: Snapshot, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Snapshot, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Snapshot; - static deserializeBinaryFromReader( - message: Snapshot, - reader: jspb.BinaryReader, - ): Snapshot; + static deserializeBinaryFromReader(message: Snapshot, reader: jspb.BinaryReader): Snapshot; } export namespace Snapshot { export type AsObject = { - root?: JSONElement.AsObject; - presencesMap: Array<[string, Presence.AsObject]>; - }; + root?: JSONElement.AsObject, + presencesMap: Array<[string, Presence.AsObject]>, + } } export class ChangePack extends jspb.Message { @@ -62,30 +57,21 @@ export class ChangePack extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ChangePack.AsObject; - static toObject( - includeInstance: boolean, - msg: ChangePack, - ): ChangePack.AsObject; - static serializeBinaryToWriter( - message: ChangePack, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: ChangePack): ChangePack.AsObject; + static serializeBinaryToWriter(message: ChangePack, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ChangePack; - static deserializeBinaryFromReader( - message: ChangePack, - reader: jspb.BinaryReader, - ): ChangePack; + static deserializeBinaryFromReader(message: ChangePack, reader: jspb.BinaryReader): ChangePack; } export namespace ChangePack { export type AsObject = { - documentKey: string; - checkpoint?: Checkpoint.AsObject; - snapshot: Uint8Array | string; - changesList: Array; - minSyncedTicket?: TimeTicket.AsObject; - isRemoved: boolean; - }; + documentKey: string, + checkpoint?: Checkpoint.AsObject, + snapshot: Uint8Array | string, + changesList: Array, + minSyncedTicket?: TimeTicket.AsObject, + isRemoved: boolean, + } } export class Change extends jspb.Message { @@ -110,24 +96,18 @@ export class Change extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Change.AsObject; static toObject(includeInstance: boolean, msg: Change): Change.AsObject; - static serializeBinaryToWriter( - message: Change, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Change, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Change; - static deserializeBinaryFromReader( - message: Change, - reader: jspb.BinaryReader, - ): Change; + static deserializeBinaryFromReader(message: Change, reader: jspb.BinaryReader): Change; } export namespace Change { export type AsObject = { - id?: ChangeID.AsObject; - message: string; - operationsList: Array; - presenceChange?: PresenceChange.AsObject; - }; + id?: ChangeID.AsObject, + message: string, + operationsList: Array, + presenceChange?: PresenceChange.AsObject, + } } export class ChangeID extends jspb.Message { @@ -148,24 +128,18 @@ export class ChangeID extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ChangeID.AsObject; static toObject(includeInstance: boolean, msg: ChangeID): ChangeID.AsObject; - static serializeBinaryToWriter( - message: ChangeID, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: ChangeID, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ChangeID; - static deserializeBinaryFromReader( - message: ChangeID, - reader: jspb.BinaryReader, - ): ChangeID; + static deserializeBinaryFromReader(message: ChangeID, reader: jspb.BinaryReader): ChangeID; } export namespace ChangeID { export type AsObject = { - clientSeq: number; - serverSeq: string; - lamport: string; - actorId: Uint8Array | string; - }; + clientSeq: number, + serverSeq: string, + lamport: string, + actorId: Uint8Array | string, + } } export class Operation extends jspb.Message { @@ -224,30 +198,24 @@ export class Operation extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Operation.AsObject; static toObject(includeInstance: boolean, msg: Operation): Operation.AsObject; - static serializeBinaryToWriter( - message: Operation, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Operation, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Operation; - static deserializeBinaryFromReader( - message: Operation, - reader: jspb.BinaryReader, - ): Operation; + static deserializeBinaryFromReader(message: Operation, reader: jspb.BinaryReader): Operation; } export namespace Operation { export type AsObject = { - set?: Operation.Set.AsObject; - add?: Operation.Add.AsObject; - move?: Operation.Move.AsObject; - remove?: Operation.Remove.AsObject; - edit?: Operation.Edit.AsObject; - select?: Operation.Select.AsObject; - style?: Operation.Style.AsObject; - increase?: Operation.Increase.AsObject; - treeEdit?: Operation.TreeEdit.AsObject; - treeStyle?: Operation.TreeStyle.AsObject; - }; + set?: Operation.Set.AsObject, + add?: Operation.Add.AsObject, + move?: Operation.Move.AsObject, + remove?: Operation.Remove.AsObject, + edit?: Operation.Edit.AsObject, + select?: Operation.Select.AsObject, + style?: Operation.Style.AsObject, + increase?: Operation.Increase.AsObject, + treeEdit?: Operation.TreeEdit.AsObject, + treeStyle?: Operation.TreeStyle.AsObject, + } export class Set extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; @@ -271,26 +239,21 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Set.AsObject; static toObject(includeInstance: boolean, msg: Set): Set.AsObject; - static serializeBinaryToWriter( - message: Set, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Set, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Set; - static deserializeBinaryFromReader( - message: Set, - reader: jspb.BinaryReader, - ): Set; + static deserializeBinaryFromReader(message: Set, reader: jspb.BinaryReader): Set; } export namespace Set { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - key: string; - value?: JSONElementSimple.AsObject; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + key: string, + value?: JSONElementSimple.AsObject, + executedAt?: TimeTicket.AsObject, + } } + export class Add extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): Add; @@ -315,26 +278,21 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Add.AsObject; static toObject(includeInstance: boolean, msg: Add): Add.AsObject; - static serializeBinaryToWriter( - message: Add, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Add, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Add; - static deserializeBinaryFromReader( - message: Add, - reader: jspb.BinaryReader, - ): Add; + static deserializeBinaryFromReader(message: Add, reader: jspb.BinaryReader): Add; } export namespace Add { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - prevCreatedAt?: TimeTicket.AsObject; - value?: JSONElementSimple.AsObject; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + prevCreatedAt?: TimeTicket.AsObject, + value?: JSONElementSimple.AsObject, + executedAt?: TimeTicket.AsObject, + } } + export class Move extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): Move; @@ -359,26 +317,21 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Move.AsObject; static toObject(includeInstance: boolean, msg: Move): Move.AsObject; - static serializeBinaryToWriter( - message: Move, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Move, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Move; - static deserializeBinaryFromReader( - message: Move, - reader: jspb.BinaryReader, - ): Move; + static deserializeBinaryFromReader(message: Move, reader: jspb.BinaryReader): Move; } export namespace Move { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - prevCreatedAt?: TimeTicket.AsObject; - createdAt?: TimeTicket.AsObject; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + prevCreatedAt?: TimeTicket.AsObject, + createdAt?: TimeTicket.AsObject, + executedAt?: TimeTicket.AsObject, + } } + export class Remove extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): Remove; @@ -398,25 +351,20 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Remove.AsObject; static toObject(includeInstance: boolean, msg: Remove): Remove.AsObject; - static serializeBinaryToWriter( - message: Remove, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Remove, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Remove; - static deserializeBinaryFromReader( - message: Remove, - reader: jspb.BinaryReader, - ): Remove; + static deserializeBinaryFromReader(message: Remove, reader: jspb.BinaryReader): Remove; } export namespace Remove { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - createdAt?: TimeTicket.AsObject; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + createdAt?: TimeTicket.AsObject, + executedAt?: TimeTicket.AsObject, + } } + export class Edit extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): Edit; @@ -450,29 +398,24 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Edit.AsObject; static toObject(includeInstance: boolean, msg: Edit): Edit.AsObject; - static serializeBinaryToWriter( - message: Edit, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Edit, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Edit; - static deserializeBinaryFromReader( - message: Edit, - reader: jspb.BinaryReader, - ): Edit; + static deserializeBinaryFromReader(message: Edit, reader: jspb.BinaryReader): Edit; } export namespace Edit { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - from?: TextNodePos.AsObject; - to?: TextNodePos.AsObject; - createdAtMapByActorMap: Array<[string, TimeTicket.AsObject]>; - content: string; - executedAt?: TimeTicket.AsObject; - attributesMap: Array<[string, string]>; - }; + parentCreatedAt?: TimeTicket.AsObject, + from?: TextNodePos.AsObject, + to?: TextNodePos.AsObject, + createdAtMapByActorMap: Array<[string, TimeTicket.AsObject]>, + content: string, + executedAt?: TimeTicket.AsObject, + attributesMap: Array<[string, string]>, + } } + export class Select extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): Select; @@ -497,26 +440,21 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Select.AsObject; static toObject(includeInstance: boolean, msg: Select): Select.AsObject; - static serializeBinaryToWriter( - message: Select, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Select, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Select; - static deserializeBinaryFromReader( - message: Select, - reader: jspb.BinaryReader, - ): Select; + static deserializeBinaryFromReader(message: Select, reader: jspb.BinaryReader): Select; } export namespace Select { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - from?: TextNodePos.AsObject; - to?: TextNodePos.AsObject; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + from?: TextNodePos.AsObject, + to?: TextNodePos.AsObject, + executedAt?: TimeTicket.AsObject, + } } + export class Style extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): Style; @@ -544,27 +482,22 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Style.AsObject; static toObject(includeInstance: boolean, msg: Style): Style.AsObject; - static serializeBinaryToWriter( - message: Style, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Style, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Style; - static deserializeBinaryFromReader( - message: Style, - reader: jspb.BinaryReader, - ): Style; + static deserializeBinaryFromReader(message: Style, reader: jspb.BinaryReader): Style; } export namespace Style { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - from?: TextNodePos.AsObject; - to?: TextNodePos.AsObject; - attributesMap: Array<[string, string]>; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + from?: TextNodePos.AsObject, + to?: TextNodePos.AsObject, + attributesMap: Array<[string, string]>, + executedAt?: TimeTicket.AsObject, + } } + export class Increase extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): Increase; @@ -584,25 +517,20 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Increase.AsObject; static toObject(includeInstance: boolean, msg: Increase): Increase.AsObject; - static serializeBinaryToWriter( - message: Increase, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Increase, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Increase; - static deserializeBinaryFromReader( - message: Increase, - reader: jspb.BinaryReader, - ): Increase; + static deserializeBinaryFromReader(message: Increase, reader: jspb.BinaryReader): Increase; } export namespace Increase { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - value?: JSONElementSimple.AsObject; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + value?: JSONElementSimple.AsObject, + executedAt?: TimeTicket.AsObject, + } } + export class TreeEdit extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): TreeEdit; @@ -635,28 +563,23 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TreeEdit.AsObject; static toObject(includeInstance: boolean, msg: TreeEdit): TreeEdit.AsObject; - static serializeBinaryToWriter( - message: TreeEdit, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: TreeEdit, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TreeEdit; - static deserializeBinaryFromReader( - message: TreeEdit, - reader: jspb.BinaryReader, - ): TreeEdit; + static deserializeBinaryFromReader(message: TreeEdit, reader: jspb.BinaryReader): TreeEdit; } export namespace TreeEdit { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - from?: TreePos.AsObject; - to?: TreePos.AsObject; - createdAtMapByActorMap: Array<[string, TimeTicket.AsObject]>; - contentsList: Array; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + from?: TreePos.AsObject, + to?: TreePos.AsObject, + createdAtMapByActorMap: Array<[string, TimeTicket.AsObject]>, + contentsList: Array, + executedAt?: TimeTicket.AsObject, + } } + export class TreeStyle extends jspb.Message { getParentCreatedAt(): TimeTicket | undefined; setParentCreatedAt(value?: TimeTicket): TreeStyle; @@ -683,32 +606,24 @@ export namespace Operation { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TreeStyle.AsObject; - static toObject( - includeInstance: boolean, - msg: TreeStyle, - ): TreeStyle.AsObject; - static serializeBinaryToWriter( - message: TreeStyle, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: TreeStyle): TreeStyle.AsObject; + static serializeBinaryToWriter(message: TreeStyle, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TreeStyle; - static deserializeBinaryFromReader( - message: TreeStyle, - reader: jspb.BinaryReader, - ): TreeStyle; + static deserializeBinaryFromReader(message: TreeStyle, reader: jspb.BinaryReader): TreeStyle; } export namespace TreeStyle { export type AsObject = { - parentCreatedAt?: TimeTicket.AsObject; - from?: TreePos.AsObject; - to?: TreePos.AsObject; - attributesMap: Array<[string, string]>; - executedAt?: TimeTicket.AsObject; - }; + parentCreatedAt?: TimeTicket.AsObject, + from?: TreePos.AsObject, + to?: TreePos.AsObject, + attributesMap: Array<[string, string]>, + executedAt?: TimeTicket.AsObject, + } } - export enum BodyCase { + + export enum BodyCase { BODY_NOT_SET = 0, SET = 1, ADD = 2, @@ -749,29 +664,20 @@ export class JSONElementSimple extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): JSONElementSimple.AsObject; - static toObject( - includeInstance: boolean, - msg: JSONElementSimple, - ): JSONElementSimple.AsObject; - static serializeBinaryToWriter( - message: JSONElementSimple, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: JSONElementSimple): JSONElementSimple.AsObject; + static serializeBinaryToWriter(message: JSONElementSimple, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): JSONElementSimple; - static deserializeBinaryFromReader( - message: JSONElementSimple, - reader: jspb.BinaryReader, - ): JSONElementSimple; + static deserializeBinaryFromReader(message: JSONElementSimple, reader: jspb.BinaryReader): JSONElementSimple; } export namespace JSONElementSimple { export type AsObject = { - createdAt?: TimeTicket.AsObject; - movedAt?: TimeTicket.AsObject; - removedAt?: TimeTicket.AsObject; - type: ValueType; - value: Uint8Array | string; - }; + createdAt?: TimeTicket.AsObject, + movedAt?: TimeTicket.AsObject, + removedAt?: TimeTicket.AsObject, + type: ValueType, + value: Uint8Array | string, + } } export class JSONElement extends jspb.Message { @@ -809,30 +715,21 @@ export class JSONElement extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): JSONElement.AsObject; - static toObject( - includeInstance: boolean, - msg: JSONElement, - ): JSONElement.AsObject; - static serializeBinaryToWriter( - message: JSONElement, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: JSONElement): JSONElement.AsObject; + static serializeBinaryToWriter(message: JSONElement, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): JSONElement; - static deserializeBinaryFromReader( - message: JSONElement, - reader: jspb.BinaryReader, - ): JSONElement; + static deserializeBinaryFromReader(message: JSONElement, reader: jspb.BinaryReader): JSONElement; } export namespace JSONElement { export type AsObject = { - jsonObject?: JSONElement.JSONObject.AsObject; - jsonArray?: JSONElement.JSONArray.AsObject; - primitive?: JSONElement.Primitive.AsObject; - text?: JSONElement.Text.AsObject; - counter?: JSONElement.Counter.AsObject; - tree?: JSONElement.Tree.AsObject; - }; + jsonObject?: JSONElement.JSONObject.AsObject, + jsonArray?: JSONElement.JSONArray.AsObject, + primitive?: JSONElement.Primitive.AsObject, + text?: JSONElement.Text.AsObject, + counter?: JSONElement.Counter.AsObject, + tree?: JSONElement.Tree.AsObject, + } export class JSONObject extends jspb.Message { getNodesList(): Array; @@ -857,30 +754,22 @@ export namespace JSONElement { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): JSONObject.AsObject; - static toObject( - includeInstance: boolean, - msg: JSONObject, - ): JSONObject.AsObject; - static serializeBinaryToWriter( - message: JSONObject, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: JSONObject): JSONObject.AsObject; + static serializeBinaryToWriter(message: JSONObject, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): JSONObject; - static deserializeBinaryFromReader( - message: JSONObject, - reader: jspb.BinaryReader, - ): JSONObject; + static deserializeBinaryFromReader(message: JSONObject, reader: jspb.BinaryReader): JSONObject; } export namespace JSONObject { export type AsObject = { - nodesList: Array; - createdAt?: TimeTicket.AsObject; - movedAt?: TimeTicket.AsObject; - removedAt?: TimeTicket.AsObject; - }; + nodesList: Array, + createdAt?: TimeTicket.AsObject, + movedAt?: TimeTicket.AsObject, + removedAt?: TimeTicket.AsObject, + } } + export class JSONArray extends jspb.Message { getNodesList(): Array; setNodesList(value: Array): JSONArray; @@ -904,30 +793,22 @@ export namespace JSONElement { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): JSONArray.AsObject; - static toObject( - includeInstance: boolean, - msg: JSONArray, - ): JSONArray.AsObject; - static serializeBinaryToWriter( - message: JSONArray, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: JSONArray): JSONArray.AsObject; + static serializeBinaryToWriter(message: JSONArray, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): JSONArray; - static deserializeBinaryFromReader( - message: JSONArray, - reader: jspb.BinaryReader, - ): JSONArray; + static deserializeBinaryFromReader(message: JSONArray, reader: jspb.BinaryReader): JSONArray; } export namespace JSONArray { export type AsObject = { - nodesList: Array; - createdAt?: TimeTicket.AsObject; - movedAt?: TimeTicket.AsObject; - removedAt?: TimeTicket.AsObject; - }; + nodesList: Array, + createdAt?: TimeTicket.AsObject, + movedAt?: TimeTicket.AsObject, + removedAt?: TimeTicket.AsObject, + } } + export class Primitive extends jspb.Message { getType(): ValueType; setType(value: ValueType): Primitive; @@ -954,31 +835,23 @@ export namespace JSONElement { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Primitive.AsObject; - static toObject( - includeInstance: boolean, - msg: Primitive, - ): Primitive.AsObject; - static serializeBinaryToWriter( - message: Primitive, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: Primitive): Primitive.AsObject; + static serializeBinaryToWriter(message: Primitive, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Primitive; - static deserializeBinaryFromReader( - message: Primitive, - reader: jspb.BinaryReader, - ): Primitive; + static deserializeBinaryFromReader(message: Primitive, reader: jspb.BinaryReader): Primitive; } export namespace Primitive { export type AsObject = { - type: ValueType; - value: Uint8Array | string; - createdAt?: TimeTicket.AsObject; - movedAt?: TimeTicket.AsObject; - removedAt?: TimeTicket.AsObject; - }; + type: ValueType, + value: Uint8Array | string, + createdAt?: TimeTicket.AsObject, + movedAt?: TimeTicket.AsObject, + removedAt?: TimeTicket.AsObject, + } } + export class Text extends jspb.Message { getNodesList(): Array; setNodesList(value: Array): Text; @@ -1003,26 +876,21 @@ export namespace JSONElement { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Text.AsObject; static toObject(includeInstance: boolean, msg: Text): Text.AsObject; - static serializeBinaryToWriter( - message: Text, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Text, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Text; - static deserializeBinaryFromReader( - message: Text, - reader: jspb.BinaryReader, - ): Text; + static deserializeBinaryFromReader(message: Text, reader: jspb.BinaryReader): Text; } export namespace Text { export type AsObject = { - nodesList: Array; - createdAt?: TimeTicket.AsObject; - movedAt?: TimeTicket.AsObject; - removedAt?: TimeTicket.AsObject; - }; + nodesList: Array, + createdAt?: TimeTicket.AsObject, + movedAt?: TimeTicket.AsObject, + removedAt?: TimeTicket.AsObject, + } } + export class Counter extends jspb.Message { getType(): ValueType; setType(value: ValueType): Counter; @@ -1050,27 +918,22 @@ export namespace JSONElement { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Counter.AsObject; static toObject(includeInstance: boolean, msg: Counter): Counter.AsObject; - static serializeBinaryToWriter( - message: Counter, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Counter, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Counter; - static deserializeBinaryFromReader( - message: Counter, - reader: jspb.BinaryReader, - ): Counter; + static deserializeBinaryFromReader(message: Counter, reader: jspb.BinaryReader): Counter; } export namespace Counter { export type AsObject = { - type: ValueType; - value: Uint8Array | string; - createdAt?: TimeTicket.AsObject; - movedAt?: TimeTicket.AsObject; - removedAt?: TimeTicket.AsObject; - }; + type: ValueType, + value: Uint8Array | string, + createdAt?: TimeTicket.AsObject, + movedAt?: TimeTicket.AsObject, + removedAt?: TimeTicket.AsObject, + } } + export class Tree extends jspb.Message { getNodesList(): Array; setNodesList(value: Array): Tree; @@ -1095,27 +958,22 @@ export namespace JSONElement { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Tree.AsObject; static toObject(includeInstance: boolean, msg: Tree): Tree.AsObject; - static serializeBinaryToWriter( - message: Tree, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Tree, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Tree; - static deserializeBinaryFromReader( - message: Tree, - reader: jspb.BinaryReader, - ): Tree; + static deserializeBinaryFromReader(message: Tree, reader: jspb.BinaryReader): Tree; } export namespace Tree { export type AsObject = { - nodesList: Array; - createdAt?: TimeTicket.AsObject; - movedAt?: TimeTicket.AsObject; - removedAt?: TimeTicket.AsObject; - }; + nodesList: Array, + createdAt?: TimeTicket.AsObject, + movedAt?: TimeTicket.AsObject, + removedAt?: TimeTicket.AsObject, + } } - export enum BodyCase { + + export enum BodyCase { BODY_NOT_SET = 0, JSON_OBJECT = 1, JSON_ARRAY = 2, @@ -1138,22 +996,16 @@ export class RHTNode extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RHTNode.AsObject; static toObject(includeInstance: boolean, msg: RHTNode): RHTNode.AsObject; - static serializeBinaryToWriter( - message: RHTNode, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: RHTNode, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RHTNode; - static deserializeBinaryFromReader( - message: RHTNode, - reader: jspb.BinaryReader, - ): RHTNode; + static deserializeBinaryFromReader(message: RHTNode, reader: jspb.BinaryReader): RHTNode; } export namespace RHTNode { export type AsObject = { - key: string; - element?: JSONElement.AsObject; - }; + key: string, + element?: JSONElement.AsObject, + } } export class RGANode extends jspb.Message { @@ -1170,22 +1022,16 @@ export class RGANode extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RGANode.AsObject; static toObject(includeInstance: boolean, msg: RGANode): RGANode.AsObject; - static serializeBinaryToWriter( - message: RGANode, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: RGANode, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RGANode; - static deserializeBinaryFromReader( - message: RGANode, - reader: jspb.BinaryReader, - ): RGANode; + static deserializeBinaryFromReader(message: RGANode, reader: jspb.BinaryReader): RGANode; } export namespace RGANode { export type AsObject = { - next?: RGANode.AsObject; - element?: JSONElement.AsObject; - }; + next?: RGANode.AsObject, + element?: JSONElement.AsObject, + } } export class NodeAttr extends jspb.Message { @@ -1200,22 +1046,16 @@ export class NodeAttr extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): NodeAttr.AsObject; static toObject(includeInstance: boolean, msg: NodeAttr): NodeAttr.AsObject; - static serializeBinaryToWriter( - message: NodeAttr, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: NodeAttr, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): NodeAttr; - static deserializeBinaryFromReader( - message: NodeAttr, - reader: jspb.BinaryReader, - ): NodeAttr; + static deserializeBinaryFromReader(message: NodeAttr, reader: jspb.BinaryReader): NodeAttr; } export namespace NodeAttr { export type AsObject = { - value: string; - updatedAt?: TimeTicket.AsObject; - }; + value: string, + updatedAt?: TimeTicket.AsObject, + } } export class TextNode extends jspb.Message { @@ -1243,25 +1083,19 @@ export class TextNode extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TextNode.AsObject; static toObject(includeInstance: boolean, msg: TextNode): TextNode.AsObject; - static serializeBinaryToWriter( - message: TextNode, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: TextNode, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TextNode; - static deserializeBinaryFromReader( - message: TextNode, - reader: jspb.BinaryReader, - ): TextNode; + static deserializeBinaryFromReader(message: TextNode, reader: jspb.BinaryReader): TextNode; } export namespace TextNode { export type AsObject = { - id?: TextNodeID.AsObject; - value: string; - removedAt?: TimeTicket.AsObject; - insPrevId?: TextNodeID.AsObject; - attributesMap: Array<[string, NodeAttr.AsObject]>; - }; + id?: TextNodeID.AsObject, + value: string, + removedAt?: TimeTicket.AsObject, + insPrevId?: TextNodeID.AsObject, + attributesMap: Array<[string, NodeAttr.AsObject]>, + } } export class TextNodeID extends jspb.Message { @@ -1275,26 +1109,17 @@ export class TextNodeID extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TextNodeID.AsObject; - static toObject( - includeInstance: boolean, - msg: TextNodeID, - ): TextNodeID.AsObject; - static serializeBinaryToWriter( - message: TextNodeID, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: TextNodeID): TextNodeID.AsObject; + static serializeBinaryToWriter(message: TextNodeID, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TextNodeID; - static deserializeBinaryFromReader( - message: TextNodeID, - reader: jspb.BinaryReader, - ): TextNodeID; + static deserializeBinaryFromReader(message: TextNodeID, reader: jspb.BinaryReader): TextNodeID; } export namespace TextNodeID { export type AsObject = { - createdAt?: TimeTicket.AsObject; - offset: number; - }; + createdAt?: TimeTicket.AsObject, + offset: number, + } } export class TreeNode extends jspb.Message { @@ -1328,27 +1153,21 @@ export class TreeNode extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TreeNode.AsObject; static toObject(includeInstance: boolean, msg: TreeNode): TreeNode.AsObject; - static serializeBinaryToWriter( - message: TreeNode, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: TreeNode, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TreeNode; - static deserializeBinaryFromReader( - message: TreeNode, - reader: jspb.BinaryReader, - ): TreeNode; + static deserializeBinaryFromReader(message: TreeNode, reader: jspb.BinaryReader): TreeNode; } export namespace TreeNode { export type AsObject = { - id?: TreeNodeID.AsObject; - type: string; - value: string; - removedAt?: TimeTicket.AsObject; - insPrevId?: TreeNodeID.AsObject; - depth: number; - attributesMap: Array<[string, NodeAttr.AsObject]>; - }; + id?: TreeNodeID.AsObject, + type: string, + value: string, + removedAt?: TimeTicket.AsObject, + insPrevId?: TreeNodeID.AsObject, + depth: number, + attributesMap: Array<[string, NodeAttr.AsObject]>, + } } export class TreeNodes extends jspb.Message { @@ -1360,21 +1179,15 @@ export class TreeNodes extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TreeNodes.AsObject; static toObject(includeInstance: boolean, msg: TreeNodes): TreeNodes.AsObject; - static serializeBinaryToWriter( - message: TreeNodes, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: TreeNodes, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TreeNodes; - static deserializeBinaryFromReader( - message: TreeNodes, - reader: jspb.BinaryReader, - ): TreeNodes; + static deserializeBinaryFromReader(message: TreeNodes, reader: jspb.BinaryReader): TreeNodes; } export namespace TreeNodes { export type AsObject = { - contentList: Array; - }; + contentList: Array, + } } export class TreeNodeID extends jspb.Message { @@ -1388,26 +1201,17 @@ export class TreeNodeID extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TreeNodeID.AsObject; - static toObject( - includeInstance: boolean, - msg: TreeNodeID, - ): TreeNodeID.AsObject; - static serializeBinaryToWriter( - message: TreeNodeID, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: TreeNodeID): TreeNodeID.AsObject; + static serializeBinaryToWriter(message: TreeNodeID, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TreeNodeID; - static deserializeBinaryFromReader( - message: TreeNodeID, - reader: jspb.BinaryReader, - ): TreeNodeID; + static deserializeBinaryFromReader(message: TreeNodeID, reader: jspb.BinaryReader): TreeNodeID; } export namespace TreeNodeID { export type AsObject = { - createdAt?: TimeTicket.AsObject; - offset: number; - }; + createdAt?: TimeTicket.AsObject, + offset: number, + } } export class TreePos extends jspb.Message { @@ -1424,22 +1228,16 @@ export class TreePos extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TreePos.AsObject; static toObject(includeInstance: boolean, msg: TreePos): TreePos.AsObject; - static serializeBinaryToWriter( - message: TreePos, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: TreePos, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TreePos; - static deserializeBinaryFromReader( - message: TreePos, - reader: jspb.BinaryReader, - ): TreePos; + static deserializeBinaryFromReader(message: TreePos, reader: jspb.BinaryReader): TreePos; } export namespace TreePos { export type AsObject = { - parentId?: TreeNodeID.AsObject; - leftSiblingId?: TreeNodeID.AsObject; - }; + parentId?: TreeNodeID.AsObject, + leftSiblingId?: TreeNodeID.AsObject, + } } export class User extends jspb.Message { @@ -1457,23 +1255,17 @@ export class User extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): User.AsObject; static toObject(includeInstance: boolean, msg: User): User.AsObject; - static serializeBinaryToWriter( - message: User, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): User; - static deserializeBinaryFromReader( - message: User, - reader: jspb.BinaryReader, - ): User; + static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User; } export namespace User { export type AsObject = { - id: string; - username: string; - createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - }; + id: string, + username: string, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } } export class Project extends jspb.Message { @@ -1513,88 +1305,61 @@ export class Project extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Project.AsObject; static toObject(includeInstance: boolean, msg: Project): Project.AsObject; - static serializeBinaryToWriter( - message: Project, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Project, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Project; - static deserializeBinaryFromReader( - message: Project, - reader: jspb.BinaryReader, - ): Project; + static deserializeBinaryFromReader(message: Project, reader: jspb.BinaryReader): Project; } export namespace Project { export type AsObject = { - id: string; - name: string; - publicKey: string; - secretKey: string; - authWebhookUrl: string; - authWebhookMethodsList: Array; - clientDeactivateThreshold: string; - createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - }; + id: string, + name: string, + publicKey: string, + secretKey: string, + authWebhookUrl: string, + authWebhookMethodsList: Array, + clientDeactivateThreshold: string, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } } export class UpdatableProjectFields extends jspb.Message { getName(): google_protobuf_wrappers_pb.StringValue | undefined; - setName( - value?: google_protobuf_wrappers_pb.StringValue, - ): UpdatableProjectFields; + setName(value?: google_protobuf_wrappers_pb.StringValue): UpdatableProjectFields; hasName(): boolean; clearName(): UpdatableProjectFields; getAuthWebhookUrl(): google_protobuf_wrappers_pb.StringValue | undefined; - setAuthWebhookUrl( - value?: google_protobuf_wrappers_pb.StringValue, - ): UpdatableProjectFields; + setAuthWebhookUrl(value?: google_protobuf_wrappers_pb.StringValue): UpdatableProjectFields; hasAuthWebhookUrl(): boolean; clearAuthWebhookUrl(): UpdatableProjectFields; - getAuthWebhookMethods(): - | UpdatableProjectFields.AuthWebhookMethods - | undefined; - setAuthWebhookMethods( - value?: UpdatableProjectFields.AuthWebhookMethods, - ): UpdatableProjectFields; + getAuthWebhookMethods(): UpdatableProjectFields.AuthWebhookMethods | undefined; + setAuthWebhookMethods(value?: UpdatableProjectFields.AuthWebhookMethods): UpdatableProjectFields; hasAuthWebhookMethods(): boolean; clearAuthWebhookMethods(): UpdatableProjectFields; - getClientDeactivateThreshold(): - | google_protobuf_wrappers_pb.StringValue - | undefined; - setClientDeactivateThreshold( - value?: google_protobuf_wrappers_pb.StringValue, - ): UpdatableProjectFields; + getClientDeactivateThreshold(): google_protobuf_wrappers_pb.StringValue | undefined; + setClientDeactivateThreshold(value?: google_protobuf_wrappers_pb.StringValue): UpdatableProjectFields; hasClientDeactivateThreshold(): boolean; clearClientDeactivateThreshold(): UpdatableProjectFields; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UpdatableProjectFields.AsObject; - static toObject( - includeInstance: boolean, - msg: UpdatableProjectFields, - ): UpdatableProjectFields.AsObject; - static serializeBinaryToWriter( - message: UpdatableProjectFields, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: UpdatableProjectFields): UpdatableProjectFields.AsObject; + static serializeBinaryToWriter(message: UpdatableProjectFields, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): UpdatableProjectFields; - static deserializeBinaryFromReader( - message: UpdatableProjectFields, - reader: jspb.BinaryReader, - ): UpdatableProjectFields; + static deserializeBinaryFromReader(message: UpdatableProjectFields, reader: jspb.BinaryReader): UpdatableProjectFields; } export namespace UpdatableProjectFields { export type AsObject = { - name?: google_protobuf_wrappers_pb.StringValue.AsObject; - authWebhookUrl?: google_protobuf_wrappers_pb.StringValue.AsObject; - authWebhookMethods?: UpdatableProjectFields.AuthWebhookMethods.AsObject; - clientDeactivateThreshold?: google_protobuf_wrappers_pb.StringValue.AsObject; - }; + name?: google_protobuf_wrappers_pb.StringValue.AsObject, + authWebhookUrl?: google_protobuf_wrappers_pb.StringValue.AsObject, + authWebhookMethods?: UpdatableProjectFields.AuthWebhookMethods.AsObject, + clientDeactivateThreshold?: google_protobuf_wrappers_pb.StringValue.AsObject, + } export class AuthWebhookMethods extends jspb.Message { getMethodsList(): Array; @@ -1604,26 +1369,18 @@ export namespace UpdatableProjectFields { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AuthWebhookMethods.AsObject; - static toObject( - includeInstance: boolean, - msg: AuthWebhookMethods, - ): AuthWebhookMethods.AsObject; - static serializeBinaryToWriter( - message: AuthWebhookMethods, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: AuthWebhookMethods): AuthWebhookMethods.AsObject; + static serializeBinaryToWriter(message: AuthWebhookMethods, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): AuthWebhookMethods; - static deserializeBinaryFromReader( - message: AuthWebhookMethods, - reader: jspb.BinaryReader, - ): AuthWebhookMethods; + static deserializeBinaryFromReader(message: AuthWebhookMethods, reader: jspb.BinaryReader): AuthWebhookMethods; } export namespace AuthWebhookMethods { export type AsObject = { - methodsList: Array; - }; + methodsList: Array, + } } + } export class DocumentSummary extends jspb.Message { @@ -1642,9 +1399,7 @@ export class DocumentSummary extends jspb.Message { clearCreatedAt(): DocumentSummary; getAccessedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setAccessedAt( - value?: google_protobuf_timestamp_pb.Timestamp, - ): DocumentSummary; + setAccessedAt(value?: google_protobuf_timestamp_pb.Timestamp): DocumentSummary; hasAccessedAt(): boolean; clearAccessedAt(): DocumentSummary; @@ -1655,30 +1410,21 @@ export class DocumentSummary extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DocumentSummary.AsObject; - static toObject( - includeInstance: boolean, - msg: DocumentSummary, - ): DocumentSummary.AsObject; - static serializeBinaryToWriter( - message: DocumentSummary, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: DocumentSummary): DocumentSummary.AsObject; + static serializeBinaryToWriter(message: DocumentSummary, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): DocumentSummary; - static deserializeBinaryFromReader( - message: DocumentSummary, - reader: jspb.BinaryReader, - ): DocumentSummary; + static deserializeBinaryFromReader(message: DocumentSummary, reader: jspb.BinaryReader): DocumentSummary; } export namespace DocumentSummary { export type AsObject = { - id: string; - key: string; - snapshot: string; - createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - accessedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject; - }; + id: string, + key: string, + snapshot: string, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + accessedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } } export class PresenceChange extends jspb.Message { @@ -1692,28 +1438,19 @@ export class PresenceChange extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PresenceChange.AsObject; - static toObject( - includeInstance: boolean, - msg: PresenceChange, - ): PresenceChange.AsObject; - static serializeBinaryToWriter( - message: PresenceChange, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: PresenceChange): PresenceChange.AsObject; + static serializeBinaryToWriter(message: PresenceChange, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): PresenceChange; - static deserializeBinaryFromReader( - message: PresenceChange, - reader: jspb.BinaryReader, - ): PresenceChange; + static deserializeBinaryFromReader(message: PresenceChange, reader: jspb.BinaryReader): PresenceChange; } export namespace PresenceChange { export type AsObject = { - type: PresenceChange.ChangeType; - presence?: Presence.AsObject; - }; + type: PresenceChange.ChangeType, + presence?: Presence.AsObject, + } - export enum ChangeType { + export enum ChangeType { CHANGE_TYPE_UNSPECIFIED = 0, CHANGE_TYPE_PUT = 1, CHANGE_TYPE_DELETE = 2, @@ -1728,21 +1465,15 @@ export class Presence extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Presence.AsObject; static toObject(includeInstance: boolean, msg: Presence): Presence.AsObject; - static serializeBinaryToWriter( - message: Presence, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: Presence, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Presence; - static deserializeBinaryFromReader( - message: Presence, - reader: jspb.BinaryReader, - ): Presence; + static deserializeBinaryFromReader(message: Presence, reader: jspb.BinaryReader): Presence; } export namespace Presence { export type AsObject = { - dataMap: Array<[string, string]>; - }; + dataMap: Array<[string, string]>, + } } export class Checkpoint extends jspb.Message { @@ -1754,26 +1485,17 @@ export class Checkpoint extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Checkpoint.AsObject; - static toObject( - includeInstance: boolean, - msg: Checkpoint, - ): Checkpoint.AsObject; - static serializeBinaryToWriter( - message: Checkpoint, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: Checkpoint): Checkpoint.AsObject; + static serializeBinaryToWriter(message: Checkpoint, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Checkpoint; - static deserializeBinaryFromReader( - message: Checkpoint, - reader: jspb.BinaryReader, - ): Checkpoint; + static deserializeBinaryFromReader(message: Checkpoint, reader: jspb.BinaryReader): Checkpoint; } export namespace Checkpoint { export type AsObject = { - serverSeq: string; - clientSeq: number; - }; + serverSeq: string, + clientSeq: number, + } } export class TextNodePos extends jspb.Message { @@ -1790,27 +1512,18 @@ export class TextNodePos extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TextNodePos.AsObject; - static toObject( - includeInstance: boolean, - msg: TextNodePos, - ): TextNodePos.AsObject; - static serializeBinaryToWriter( - message: TextNodePos, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: TextNodePos): TextNodePos.AsObject; + static serializeBinaryToWriter(message: TextNodePos, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TextNodePos; - static deserializeBinaryFromReader( - message: TextNodePos, - reader: jspb.BinaryReader, - ): TextNodePos; + static deserializeBinaryFromReader(message: TextNodePos, reader: jspb.BinaryReader): TextNodePos; } export namespace TextNodePos { export type AsObject = { - createdAt?: TimeTicket.AsObject; - offset: number; - relativeOffset: number; - }; + createdAt?: TimeTicket.AsObject, + offset: number, + relativeOffset: number, + } } export class TimeTicket extends jspb.Message { @@ -1827,27 +1540,18 @@ export class TimeTicket extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TimeTicket.AsObject; - static toObject( - includeInstance: boolean, - msg: TimeTicket, - ): TimeTicket.AsObject; - static serializeBinaryToWriter( - message: TimeTicket, - writer: jspb.BinaryWriter, - ): void; + static toObject(includeInstance: boolean, msg: TimeTicket): TimeTicket.AsObject; + static serializeBinaryToWriter(message: TimeTicket, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): TimeTicket; - static deserializeBinaryFromReader( - message: TimeTicket, - reader: jspb.BinaryReader, - ): TimeTicket; + static deserializeBinaryFromReader(message: TimeTicket, reader: jspb.BinaryReader): TimeTicket; } export namespace TimeTicket { export type AsObject = { - lamport: string; - delimiter: number; - actorId: Uint8Array | string; - }; + lamport: string, + delimiter: number, + actorId: Uint8Array | string, + } } export class DocEvent extends jspb.Message { @@ -1862,25 +1566,19 @@ export class DocEvent extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DocEvent.AsObject; static toObject(includeInstance: boolean, msg: DocEvent): DocEvent.AsObject; - static serializeBinaryToWriter( - message: DocEvent, - writer: jspb.BinaryWriter, - ): void; + static serializeBinaryToWriter(message: DocEvent, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): DocEvent; - static deserializeBinaryFromReader( - message: DocEvent, - reader: jspb.BinaryReader, - ): DocEvent; + static deserializeBinaryFromReader(message: DocEvent, reader: jspb.BinaryReader): DocEvent; } export namespace DocEvent { export type AsObject = { - type: DocEventType; - publisher: Uint8Array | string; - }; + type: DocEventType, + publisher: Uint8Array | string, + } } -export enum ValueType { +export enum ValueType { VALUE_TYPE_NULL = 0, VALUE_TYPE_BOOLEAN = 1, VALUE_TYPE_INTEGER = 2, @@ -1896,8 +1594,8 @@ export enum ValueType { VALUE_TYPE_LONG_CNT = 12, VALUE_TYPE_TREE = 13, } -export enum DocEventType { - DOC_EVENT_TYPE_DOCUMENTS_CHANGED = 0, - DOC_EVENT_TYPE_DOCUMENTS_WATCHED = 1, - DOC_EVENT_TYPE_DOCUMENTS_UNWATCHED = 2, +export enum DocEventType { + DOC_EVENT_TYPE_DOCUMENT_CHANGED = 0, + DOC_EVENT_TYPE_DOCUMENT_WATCHED = 1, + DOC_EVENT_TYPE_DOCUMENT_UNWATCHED = 2, } diff --git a/src/api/yorkie/v1/resources_pb.js b/src/api/yorkie/v1/resources_pb.js index 24e5fa1f7..fe812ff3e 100644 --- a/src/api/yorkie/v1/resources_pb.js +++ b/src/api/yorkie/v1/resources_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); @@ -1157,8 +1151,7 @@ proto.yorkie.v1.Snapshot.prototype.getPresencesMap = function(opt_noLazyCreate) */ proto.yorkie.v1.Snapshot.prototype.clearPresencesMap = function() { this.getPresencesMap().clear(); - return this; -}; + return this;}; @@ -3811,8 +3804,7 @@ proto.yorkie.v1.Operation.Edit.prototype.getCreatedAtMapByActorMap = function(op */ proto.yorkie.v1.Operation.Edit.prototype.clearCreatedAtMapByActorMap = function() { this.getCreatedAtMapByActorMap().clear(); - return this; -}; + return this;}; /** @@ -3889,8 +3881,7 @@ proto.yorkie.v1.Operation.Edit.prototype.getAttributesMap = function(opt_noLazyC */ proto.yorkie.v1.Operation.Edit.prototype.clearAttributesMap = function() { this.getAttributesMap().clear(); - return this; -}; + return this;}; @@ -4494,8 +4485,7 @@ proto.yorkie.v1.Operation.Style.prototype.getAttributesMap = function(opt_noLazy */ proto.yorkie.v1.Operation.Style.prototype.clearAttributesMap = function() { this.getAttributesMap().clear(); - return this; -}; + return this;}; /** @@ -5107,8 +5097,7 @@ proto.yorkie.v1.Operation.TreeEdit.prototype.getCreatedAtMapByActorMap = functio */ proto.yorkie.v1.Operation.TreeEdit.prototype.clearCreatedAtMapByActorMap = function() { this.getCreatedAtMapByActorMap().clear(); - return this; -}; + return this;}; /** @@ -5483,8 +5472,7 @@ proto.yorkie.v1.Operation.TreeStyle.prototype.getAttributesMap = function(opt_no */ proto.yorkie.v1.Operation.TreeStyle.prototype.clearAttributesMap = function() { this.getAttributesMap().clear(); - return this; -}; + return this;}; /** @@ -9470,8 +9458,7 @@ proto.yorkie.v1.TextNode.prototype.getAttributesMap = function(opt_noLazyCreate) */ proto.yorkie.v1.TextNode.prototype.clearAttributesMap = function() { this.getAttributesMap().clear(); - return this; -}; + return this;}; @@ -10028,8 +10015,7 @@ proto.yorkie.v1.TreeNode.prototype.getAttributesMap = function(opt_noLazyCreate) */ proto.yorkie.v1.TreeNode.prototype.clearAttributesMap = function() { this.getAttributesMap().clear(); - return this; -}; + return this;}; @@ -12348,8 +12334,7 @@ proto.yorkie.v1.Presence.prototype.getDataMap = function(opt_noLazyCreate) { */ proto.yorkie.v1.Presence.prototype.clearDataMap = function() { this.getDataMap().clear(); - return this; -}; + return this;}; @@ -13145,9 +13130,9 @@ proto.yorkie.v1.ValueType = { * @enum {number} */ proto.yorkie.v1.DocEventType = { - DOC_EVENT_TYPE_DOCUMENTS_CHANGED: 0, - DOC_EVENT_TYPE_DOCUMENTS_WATCHED: 1, - DOC_EVENT_TYPE_DOCUMENTS_UNWATCHED: 2 + DOC_EVENT_TYPE_DOCUMENT_CHANGED: 0, + DOC_EVENT_TYPE_DOCUMENT_WATCHED: 1, + DOC_EVENT_TYPE_DOCUMENT_UNWATCHED: 2 }; goog.object.extend(exports, proto.yorkie.v1); diff --git a/src/api/yorkie/v1/yorkie_grpc_web_pb.js b/src/api/yorkie/v1/yorkie_grpc_web_pb.js index a8e2e7513..2eef83bd0 100644 --- a/src/api/yorkie/v1/yorkie_grpc_web_pb.js +++ b/src/api/yorkie/v1/yorkie_grpc_web_pb.js @@ -4,11 +4,7 @@ * @public */ -// Code generated by protoc-gen-grpc-web. DO NOT EDIT. -// versions: -// protoc-gen-grpc-web v1.4.2 -// protoc v4.23.2 -// source: yorkie/v1/yorkie.proto +// GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ @@ -46,7 +42,7 @@ proto.yorkie.v1.YorkieServiceClient = /** * @private @const {string} The hostname */ - this.hostname_ = hostname.replace(/\/+$/, ''); + this.hostname_ = hostname; }; @@ -72,7 +68,7 @@ proto.yorkie.v1.YorkieServicePromiseClient = /** * @private @const {string} The hostname */ - this.hostname_ = hostname.replace(/\/+$/, ''); + this.hostname_ = hostname; }; diff --git a/src/api/yorkie/v1/yorkie_pb.js b/src/api/yorkie/v1/yorkie_pb.js index e8d8c1015..302ef5f8f 100644 --- a/src/api/yorkie/v1/yorkie_pb.js +++ b/src/api/yorkie/v1/yorkie_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var yorkie_v1_resources_pb = require('../../yorkie/v1/resources_pb.js'); goog.object.extend(proto, yorkie_v1_resources_pb); diff --git a/src/client/client.ts b/src/client/client.ts index abb207df3..e50083d7c 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -134,9 +134,9 @@ export enum ClientEventType { */ StatusChanged = 'status-changed', /** - * `DocumentsChanged` means that the documents of the client has changed. + * `DocumentChanged` means that the document has changed. */ - DocumentsChanged = 'documents-changed', + DocumentChanged = 'document-changed', /** * `StreamConnectionStatusChanged` means that the stream connection status of * the client has changed. @@ -156,7 +156,7 @@ export enum ClientEventType { */ export type ClientEvent = | StatusChangedEvent - | DocumentsChangedEvent + | DocumentChangedEvent | StreamConnectionStatusChangedEvent | DocumentSyncedEvent; @@ -178,24 +178,24 @@ export interface StatusChangedEvent extends BaseClientEvent { */ type: ClientEventType.StatusChanged; /** - * `DocumentsChangedEvent` value + * `StatusChangedEvent` value */ value: ClientStatus; } /** - * `DocumentsChangedEvent` is an event that occurs when documents attached to + * `DocumentChangedEvent` is an event that occurs when document attached to * the client changes. * * @public */ -export interface DocumentsChangedEvent extends BaseClientEvent { +export interface DocumentChangedEvent extends BaseClientEvent { /** - * enum {@link ClientEventType}.DocumentsChangedEvent + * enum {@link ClientEventType}.DocumentChangedEvent */ - type: ClientEventType.DocumentsChanged; + type: ClientEventType.DocumentChanged; /** - * `DocumentsChangedEvent` value + * `DocumentChangedEvent` value */ value: Array; } @@ -219,7 +219,7 @@ export interface StreamConnectionStatusChangedEvent extends BaseClientEvent { } /** - * `DocumentSyncedEvent` is an event that occurs when documents + * `DocumentSyncedEvent` is an event that occurs when document * attached to the client are synced. * * @public @@ -883,14 +883,14 @@ export class Client implements Observable { const eventType = pbWatchEvent.getType(); const publisher = converter.toHexString(pbWatchEvent.getPublisher_asU8()); switch (eventType) { - case PbDocEventType.DOC_EVENT_TYPE_DOCUMENTS_CHANGED: + case PbDocEventType.DOC_EVENT_TYPE_DOCUMENT_CHANGED: attachment.remoteChangeEventReceived = true; this.eventStreamObserver.next({ - type: ClientEventType.DocumentsChanged, + type: ClientEventType.DocumentChanged, value: [docKey], }); break; - case PbDocEventType.DOC_EVENT_TYPE_DOCUMENTS_WATCHED: + case PbDocEventType.DOC_EVENT_TYPE_DOCUMENT_WATCHED: attachment.doc.addOnlineClient(publisher); // NOTE(chacha912): We added to onlineClients, but we won't trigger watched event // unless we also know their initial presence data at this point. @@ -904,7 +904,7 @@ export class Client implements Observable { }); } break; - case PbDocEventType.DOC_EVENT_TYPE_DOCUMENTS_UNWATCHED: { + case PbDocEventType.DOC_EVENT_TYPE_DOCUMENT_UNWATCHED: { const presence = attachment.doc.getPresence(publisher); attachment.doc.removeOnlineClient(publisher); // NOTE(chacha912): There is no presence, when PresenceChange(clear) is applied before unwatching. diff --git a/src/document/document.ts b/src/document/document.ts index d23276571..a2246dea4 100644 --- a/src/document/document.ts +++ b/src/document/document.ts @@ -971,7 +971,11 @@ export class Document { change.execute(this.clone!.root, this.clone!.presences); let changeInfo: ChangeInfo | undefined; - let docEvent: DocEvent

| undefined; + let presenceEvent: + | WatchedEvent

+ | UnwatchedEvent

+ | PresenceChangedEvent

+ | undefined; const actorID = change.getID().getActorID()!; if (change.hasPresenceChange() && this.onlineClients.has(actorID)) { const presenceChange = change.getPresenceChange()!; @@ -980,7 +984,7 @@ export class Document { // NOTE(chacha912): When the user exists in onlineClients, but // their presence was initially absent, we can consider that we have // received their initial presence, so trigger the 'watched' event. - docEvent = { + presenceEvent = { type: this.presences.has(actorID) ? DocEventType.PresenceChanged : DocEventType.Watched, @@ -996,7 +1000,7 @@ export class Document { // occurring before unwatching. // Detached user is no longer participating in the document, we remove // them from the online clients and trigger the 'unwatched' event. - docEvent = { + presenceEvent = { type: DocEventType.Unwatched, value: { clientID: actorID, @@ -1029,8 +1033,8 @@ export class Document { value: changeInfo, }); } - if (docEvent) { - this.publish(docEvent); + if (presenceEvent) { + this.publish(presenceEvent); } this.changeID = this.changeID.syncLamport(change.getID().getLamport()); diff --git a/src/yorkie.ts b/src/yorkie.ts index cb9d89c34..91d4383d6 100644 --- a/src/yorkie.ts +++ b/src/yorkie.ts @@ -30,7 +30,7 @@ export { DocumentSyncResultType, ClientEventType, StatusChangedEvent, - DocumentsChangedEvent, + DocumentChangedEvent, StreamConnectionStatusChangedEvent, DocumentSyncedEvent, ClientOptions,