API reference › @evolu/common › local‑first/Shared › EvoluOutput

type EvoluOutput =
  | {
      onCompleteIds: ReadonlyArray<Id>;
      patchesByQuery: ReadonlyMap<
        Query,
        Result<ReadonlyArray<Patch>, UnknownError>
      >;
      type: "OnPatchesByQuery";
    }
  | {
      type: "RefreshQueries";
    }
  | {
      file: Uint8Array<ArrayBuffer>;
      type: "OnExport";
    }
  | {
      error: UnknownError;
      type: "OnExportFailed";
    }
  | {
      onCompleteIds: ReadonlyArray<Id>;
      type: "OnMutateFailed";
    }
  | {
      devicePersistence: DevicePersistence;
      type: "OnDevicePersistence";
    };

Defined in: packages/common/src/local-first/Shared.ts:1299

Union Members

Type Literal

{
  onCompleteIds: ReadonlyArray<Id>;
  patchesByQuery: ReadonlyMap<
    Query,
    Result<ReadonlyArray<Patch>, UnknownError>
  >;
  type: "OnPatchesByQuery";
}
NameTypeDescriptionDefined in
onCompleteIdsReadonlyArray<Id>-packages/common/src/local-first/Shared.ts:1310
patchesByQueryReadonlyMap<Query, Result<ReadonlyArray<Patch>, UnknownError>>Each query with patches of its rows, or SQLite's failure, which keeps the query's previous rows.packages/common/src/local-first/Shared.ts:1306
type"OnPatchesByQuery"-packages/common/src/local-first/Shared.ts:1301

Type Literal

{
  type: "RefreshQueries";
}

Type Literal

{
  file: Uint8Array<ArrayBuffer>;
  type: "OnExport";
}

Type Literal

{
  error: UnknownError;
  type: "OnExportFailed";
}

Type Literal

{
  onCompleteIds: ReadonlyArray<Id>;
  type: "OnMutateFailed";
}
NameTypeDescriptionDefined in
onCompleteIdsReadonlyArray<Id>-packages/common/src/local-first/Shared.ts:1326
type"OnMutateFailed"The mutation with these onComplete callbacks could not be stored.packages/common/src/local-first/Shared.ts:1325

Type Literal

{
  devicePersistence: DevicePersistence;
  type: "OnDevicePersistence";
}
NameTypeDescriptionDefined in
devicePersistenceDevicePersistence-packages/common/src/local-first/Shared.ts:1331
type"OnDevicePersistence"Sent once, when the tenant adds the instance; see Storage.packages/common/src/local-first/Shared.ts:1330