@yorkie-js/sdk
    Preparing search index...

    Variable default

    default: {
        Change: typeof Change;
        ChangeApplyError: typeof ChangeApplyError;
        Channel: typeof Channel;
        ChannelEventType: typeof ChannelEventType;
        ChannelStatus: typeof ChannelStatus;
        Client: typeof Client;
        ClientCondition: typeof ClientCondition;
        ClientStatus: typeof ClientStatus;
        Code: typeof Code;
        converter: {
            bytesToChangeID: (bytes: Uint8Array) => ChangeID;
            bytesToHex: (bytes?: Uint8Array<ArrayBufferLike>) => string;
            bytesToObject: (bytes?: Uint8Array<ArrayBufferLike>) => CRDTObject;
            bytesToOperation: (bytes: Uint8Array) => Operation;
            bytesToSnapshot: <P extends Indexable>(
                bytes?: Uint8Array<ArrayBufferLike>,
            ) => { presences: Map<string, P>; root: CRDTObject };
            changeIDToBinary: (changeID: ChangeID) => Uint8Array<ArrayBuffer>;
            fromChangePack: <P extends Indexable>(pbPack: ChangePack) => ChangePack<P>;
            fromChanges: <P extends Indexable>(pbChanges: Change[]) => Change<P>[];
            fromPresence: <P extends Indexable>(pbPresence: Presence) => P;
            fromSchemaRules: (pbRules: Rule[]) => Rule[];
            fromTreeNodes: (pbTreeNodes: TreeNode[]) => CRDTTreeNode | undefined;
            hexToBytes: (hex: string) => Uint8Array;
            hexToVersionVector: (hex: string) => VersionVector;
            objectToBytes: (obj: CRDTObject) => Uint8Array;
            operationToBinary: (op: Operation) => Uint8Array<ArrayBuffer>;
            snapshotToBytes: <P extends Indexable>(
                root: CRDTObject,
                presences: Map<string, P>,
            ) => Uint8Array;
            toChangeID: (changeID: ChangeID) => ChangeID;
            toChangePack: (pack: ChangePack<Indexable>) => ChangePack;
            toHexString: (bytes: Uint8Array) => string;
            toOperation: (operation: Operation) => Operation;
            toRevisionSummary: (pbRevision: RevisionSummary) => RevisionSummary;
            toTreeNodes: (node: CRDTTreeNode) => TreeNode[];
            toUint8Array: (hex: string) => Uint8Array;
            versionVectorToHex: (vector: VersionVector) => string;
        };
        Counter: typeof Counter;
        CounterType: typeof CounterType;
        DedupCounter: typeof DedupCounter;
        Devtools: Devtools;
        DocEventType: typeof DocEventType;
        DocStatus: typeof DocStatus;
        DocSyncStatus: typeof DocSyncStatus;
        Document: typeof Document;
        EventSourceDevPanel: string;
        EventSourceSDK: string;
        LogLevel: typeof LogLevel;
        MemoryDocStore: typeof MemoryDocStore;
        OpSource: typeof OpSource;
        Presence: typeof Presence;
        Primitive: typeof Primitive;
        setLogLevel: (l: LogLevel) => void;
        StreamConnectionStatus: typeof StreamConnectionStatus;
        SyncMode: typeof SyncMode;
        teardownDevtools: <T, P extends Indexable>(doc: Document<T, P>) => void;
        Text: typeof Text;
        TimeTicket: typeof TimeTicket;
        Tree: typeof Tree;
        VersionVector: typeof VersionVector;
        WebLocksSessionLock: typeof WebLocksSessionLock;
        YorkieError: typeof YorkieError;
        YSON: yson;
    }

    The top-level yorkie namespace with additional properties.

    In production, this will be called exactly once and the result assigned to the yorkie global.

    e.g) new yorkie.Client(...);

    It carries every runtime export this module exposes by name, so a default import and a namespace import agree. Before the exports map, the UMD was the only published entry and Node, esbuild and webpack handed out the whole module.exports as the default; keep that surface. A new runtime export belongs here too, and test/unit/yorkie_test.ts fails until it is added.

    Type Declaration

    • Change: typeof Change
    • ChangeApplyError: typeof ChangeApplyError
    • Channel: typeof Channel
    • ChannelEventType: typeof ChannelEventType
    • ChannelStatus: typeof ChannelStatus
    • Client: typeof Client
    • ClientCondition: typeof ClientCondition
    • ClientStatus: typeof ClientStatus
    • Code: typeof Code
    • converter: {
          bytesToChangeID: (bytes: Uint8Array) => ChangeID;
          bytesToHex: (bytes?: Uint8Array<ArrayBufferLike>) => string;
          bytesToObject: (bytes?: Uint8Array<ArrayBufferLike>) => CRDTObject;
          bytesToOperation: (bytes: Uint8Array) => Operation;
          bytesToSnapshot: <P extends Indexable>(
              bytes?: Uint8Array<ArrayBufferLike>,
          ) => { presences: Map<string, P>; root: CRDTObject };
          changeIDToBinary: (changeID: ChangeID) => Uint8Array<ArrayBuffer>;
          fromChangePack: <P extends Indexable>(pbPack: ChangePack) => ChangePack<P>;
          fromChanges: <P extends Indexable>(pbChanges: Change[]) => Change<P>[];
          fromPresence: <P extends Indexable>(pbPresence: Presence) => P;
          fromSchemaRules: (pbRules: Rule[]) => Rule[];
          fromTreeNodes: (pbTreeNodes: TreeNode[]) => CRDTTreeNode | undefined;
          hexToBytes: (hex: string) => Uint8Array;
          hexToVersionVector: (hex: string) => VersionVector;
          objectToBytes: (obj: CRDTObject) => Uint8Array;
          operationToBinary: (op: Operation) => Uint8Array<ArrayBuffer>;
          snapshotToBytes: <P extends Indexable>(
              root: CRDTObject,
              presences: Map<string, P>,
          ) => Uint8Array;
          toChangeID: (changeID: ChangeID) => ChangeID;
          toChangePack: (pack: ChangePack<Indexable>) => ChangePack;
          toHexString: (bytes: Uint8Array) => string;
          toOperation: (operation: Operation) => Operation;
          toRevisionSummary: (pbRevision: RevisionSummary) => RevisionSummary;
          toTreeNodes: (node: CRDTTreeNode) => TreeNode[];
          toUint8Array: (hex: string) => Uint8Array;
          versionVectorToHex: (vector: VersionVector) => string;
      }

      converter is a converter that converts the given model to protobuf format. is also used to convert models to bytes and vice versa.

      • bytesToChangeID: (bytes: Uint8Array) => ChangeID
      • bytesToHex: (bytes?: Uint8Array<ArrayBufferLike>) => string
      • bytesToObject: (bytes?: Uint8Array<ArrayBufferLike>) => CRDTObject
      • bytesToOperation: (bytes: Uint8Array) => Operation
      • bytesToSnapshot: <P extends Indexable>(
            bytes?: Uint8Array<ArrayBufferLike>,
        ) => { presences: Map<string, P>; root: CRDTObject }
      • changeIDToBinary: (changeID: ChangeID) => Uint8Array<ArrayBuffer>
      • fromChangePack: <P extends Indexable>(pbPack: ChangePack) => ChangePack<P>
      • fromChanges: <P extends Indexable>(pbChanges: Change[]) => Change<P>[]
      • fromPresence: <P extends Indexable>(pbPresence: Presence) => P
      • fromSchemaRules: (pbRules: Rule[]) => Rule[]
      • fromTreeNodes: (pbTreeNodes: TreeNode[]) => CRDTTreeNode | undefined
      • hexToBytes: (hex: string) => Uint8Array
      • hexToVersionVector: (hex: string) => VersionVector
      • objectToBytes: (obj: CRDTObject) => Uint8Array
      • operationToBinary: (op: Operation) => Uint8Array<ArrayBuffer>
      • snapshotToBytes: <P extends Indexable>(root: CRDTObject, presences: Map<string, P>) => Uint8Array
      • toChangeID: (changeID: ChangeID) => ChangeID
      • toChangePack: (pack: ChangePack<Indexable>) => ChangePack
      • toHexString: (bytes: Uint8Array) => string
      • toOperation: (operation: Operation) => Operation
      • toRevisionSummary: (pbRevision: RevisionSummary) => RevisionSummary
      • toTreeNodes: (node: CRDTTreeNode) => TreeNode[]
      • toUint8Array: (hex: string) => Uint8Array
      • versionVectorToHex: (vector: VersionVector) => string
    • Counter: typeof Counter
    • CounterType: typeof CounterType
    • DedupCounter: typeof DedupCounter
    • Devtools: Devtools
    • DocEventType: typeof DocEventType
    • DocStatus: typeof DocStatus
    • DocSyncStatus: typeof DocSyncStatus
    • Document: typeof Document
    • EventSourceDevPanel: string

      EventSourceDevPanel is the name of the source representing messages from the Devtools panel.

    • EventSourceSDK: string

      EventSourceSDK is the name of the source representing messages from the SDK.

    • LogLevel: typeof LogLevel
    • MemoryDocStore: typeof MemoryDocStore
    • OpSource: typeof OpSource
    • Presence: typeof Presence
    • Primitive: typeof Primitive
    • setLogLevel: (l: LogLevel) => void
    • StreamConnectionStatus: typeof StreamConnectionStatus
    • SyncMode: typeof SyncMode
    • teardownDevtools: <T, P extends Indexable>(doc: Document<T, P>) => void
    • Text: typeof Text
    • TimeTicket: typeof TimeTicket
    • Tree: typeof Tree
    • VersionVector: typeof VersionVector
    • WebLocksSessionLock: typeof WebLocksSessionLock
    • YorkieError: typeof YorkieError
    • YSON: yson