@interncom/diplomatic 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/client.d.ts +7 -8
- package/dist/web/index.d.ts +2 -2
- package/dist/web/index.mjs +1 -1
- package/dist/web/stores/memory/hosts.d.ts +0 -2
- package/dist/web/sync.d.ts +4 -4
- package/dist/web/types.d.ts +23 -44
- package/dist/web/worker/client.d.ts +3 -3
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -1
package/dist/web/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Status } from "./shared/consts";
|
|
|
4
4
|
import { EncodedMessage } from "./shared/message";
|
|
5
5
|
import { EntityID, Hash, HostHandle, ICrypto, IDeleteParams, IEntRev, IHostConnectionInfo, IInsertParams, IMessageHead, IStateManager, ITransport, IUpdateParams, MasterSeed } from "./shared/types";
|
|
6
6
|
import { ValStat } from "./shared/valstat";
|
|
7
|
-
import { ApldState, IClient, IDiplomaticClientState, IDiplomaticClientXferState, IHostRow, IStateEmitter, IStore, IStoredMessage, ListMsgsOpts, ReconcileOpts } from "./types";
|
|
7
|
+
import { ApldState, IClient, IDiplomaticClientState, IDiplomaticClientXferState, IHostRow, IStateEmitter, IStore, IStoredMessage, ListMsgsOpts, ReconcileOpts, ReconcileReport } from "./types";
|
|
8
8
|
export declare class SyncClient<Handle extends HostHandle> implements IClient<Handle> {
|
|
9
9
|
private clock;
|
|
10
10
|
private state;
|
|
@@ -160,14 +160,13 @@ export declare class SyncClient<Handle extends HostHandle> implements IClient<Ha
|
|
|
160
160
|
/** Count archive rows; optional apld filter. Prefer over list+length. */
|
|
161
161
|
countMsgs(apld?: ApldState): Promise<number>;
|
|
162
162
|
/**
|
|
163
|
-
* Full inventory of one host (peek seq 0):
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* same construction as {@link msgcheck}). Read counts via {@link hosts}.
|
|
163
|
+
* Full inventory of one host (peek seq 0): advances lastSeq; optionally
|
|
164
|
+
* enqueues pull/push. Waits out in-flight {@link sync} first (same as
|
|
165
|
+
* {@link rebuild}). By default drains via {@link sync}, then re-inventories.
|
|
166
|
+
* Returns ephemeral {@link ReconcileReport} (msgcheck, numBags, numDupes) —
|
|
167
|
+
* bag tallies are not persisted.
|
|
169
168
|
*/
|
|
170
|
-
reconcile(hostLabel: string, opts?: ReconcileOpts): Promise<ValStat<
|
|
169
|
+
reconcile(hostLabel: string, opts?: ReconcileOpts): Promise<ValStat<ReconcileReport>>;
|
|
171
170
|
/**
|
|
172
171
|
* Peek each host from seq 0 and pull any bags not already in the archive.
|
|
173
172
|
* Leaves open msgs as APLD_PENDING; does not exec (rebuild replays everything).
|
package/dist/web/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { nullStateManager, StateManager } from "./state";
|
|
|
18
18
|
import { IDBStore, openIDBStore } from "./stores/idb/store";
|
|
19
19
|
import { MemoryStore } from "./stores/memory/store";
|
|
20
20
|
import { SingletonStateManager } from "./shared/singleton";
|
|
21
|
-
import type { ApldState, Applier, HostStatsUpdate, IClient, IDiplomaticClientState, IHostRow, IStore, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ListMsgsOpts, ReconcileOpts } from "./types";
|
|
21
|
+
import type { ApldState, Applier, HostStatsUpdate, IClient, IDiplomaticClientState, IHostRow, IStore, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ListMsgsOpts, ReconcileOpts, ReconcileReport } from "./types";
|
|
22
22
|
import { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, isApldState, isPendingApply, isTerminalApplyFailure, setApld } from "./types";
|
|
23
23
|
import type { SyncProgressEvent } from "./progress";
|
|
24
24
|
import { defaultPeekProgressEvery, idleProgress, shouldEmitItemProgress } from "./progress";
|
|
@@ -31,4 +31,4 @@ export declare function genWebClient(stateMgr: IStateManager, url: URL): Promise
|
|
|
31
31
|
setSeed: (seedHex: string) => Promise<void>;
|
|
32
32
|
}>;
|
|
33
33
|
export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, b64tob, btob64, btoh, CachedEntDB, checksumEntRevs, checksumSet, Clock, cmpBytes, crypto, Decoder, defaultPeekProgressEvery, eidCodec, encodeEntRev, Encoder, EntDBMemory, EntIDB, EntitiesQuery, EntityID, entStateManager, genSingletonEID, GroupID, hostHTTPTransport, htob, HTTPTransport, IDBStore, idleProgress, IEntDB, IEntity, isApldState, isPendingApply, isTerminalApplyFailure, IStore, MasterSeed, MemoryStore, normalizeTags, nullEntDB, nullStateManager, openDiplomaticClient, openEntDB, openIDBStore, revFromEntity, revFromHead, setApld, shouldEmitItemProgress, SingletonStateManager, StateManager, Status, SyncClient, TypedEventEmitter, useClient, useClientState, useClientXferState, useStateWatcher, useStateWatcherSuspense, useSyncOnResume, WorkerClient, };
|
|
34
|
-
export type { ApldState, Applier, CachedEntDBOptions, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITransport, IUpdateParams, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, ReconcileOpts, SyncProgressEvent, WorkerClientOptions, };
|
|
34
|
+
export type { ApldState, Applier, CachedEntDBOptions, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITransport, IUpdateParams, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, ReconcileOpts, ReconcileReport, SyncProgressEvent, WorkerClientOptions, };
|