lsync API
    Preparing search index...

    Function parseClientMessage

    • Parameters

      • data: TransportPayload

      Returns
          | {
              id: string
              | number;
              input: {
                  collection: string;
                  cursor?: {
                      lastKey?: string | number;
                      whereCurrent: ReadPredicate;
                      whereFrom: ReadPredicate;
                  };
                  filters?: {
                      field: string;
                      op: "eq"
                      | "ne"
                      | "gt"
                      | "gte"
                      | "lt"
                      | "lte"
                      | "in";
                      value: unknown;
                  }[];
                  limit?: number;
                  offset?: number;
                  orderBy?: { direction: "asc"
                  | "desc"; field: string }[];
                  predicate?: ReadPredicate;
              };
              type: "read";
              version: 1;
          }
          | {
              id: string
              | number;
              input: {
                  updates: {
                      clientId?: string;
                      collection: string;
                      createdAt: number;
                      id: string;
                      key: string | number;
                      path?: string;
                      previousValue?: unknown;
                      type: "insert" | "update" | "delete";
                      value?: unknown;
                  }[];
              };
              type: "push";
              version: 1;
          }
          | {
              id: string
              | number;
              input: { collections: Record<string, number>; limit?: number };
              type: "changes";
              version: 1;
          }
          | {
              id: string
              | number;
              input: { input?: unknown; path: string };
              type: "api";
              version: 1;
          }
          | {
              id: string
              | number;
              input: { collection: string };
              type: "subscribe" | "unsubscribe";
              version: 1;
          }