@interncom/diplomatic 0.3.0 → 0.3.1
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 +2 -1
- package/dist/web/index.d.ts +2 -2
- package/dist/web/index.mjs +1 -1
- package/dist/web/types.d.ts +2 -0
- package/dist/web/worker/client.d.ts +3 -1
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -1
package/dist/web/types.d.ts
CHANGED
|
@@ -136,6 +136,8 @@ export interface IClient<Handle extends HostHandle> {
|
|
|
136
136
|
setSeed(seed: MasterSeed): Promise<void>;
|
|
137
137
|
link(host: IHostConnectionInfo<Handle>): Promise<void>;
|
|
138
138
|
unlink(label: string): Promise<void>;
|
|
139
|
+
/** Linked hosts from the protocol store (handle, label, lastSeq, …). */
|
|
140
|
+
hosts(): Promise<IHostRow<Handle>[]>;
|
|
139
141
|
connect(): Promise<void>;
|
|
140
142
|
disconnect(): Promise<void>;
|
|
141
143
|
insertRaw(content: SerializedContent): Promise<ValStat<IMessageHead>>;
|
|
@@ -2,7 +2,7 @@ import { IClock } from "../shared/clock";
|
|
|
2
2
|
import { Status } from "../shared/consts";
|
|
3
3
|
import type { EntityID, IHostConnectionInfo, IInsertParams, IMessageHead, IStateManager, IUpsertParams, MasterSeed, SerializedContent } from "../shared/types";
|
|
4
4
|
import type { ValStat } from "../shared/valstat";
|
|
5
|
-
import type { IClient, IDiplomaticClientState, IDiplomaticClientXferState, IStateEmitter, IStore } from "../types";
|
|
5
|
+
import type { IClient, IDiplomaticClientState, IDiplomaticClientXferState, IHostRow, IStateEmitter, IStore } from "../types";
|
|
6
6
|
/**
|
|
7
7
|
* Options for attaching to an app-owned sync Worker.
|
|
8
8
|
*
|
|
@@ -62,6 +62,8 @@ export declare class WorkerClient implements IClient<URL> {
|
|
|
62
62
|
setSeed(seed: MasterSeed): Promise<void>;
|
|
63
63
|
link(host: IHostConnectionInfo<URL>, connect?: boolean): Promise<void>;
|
|
64
64
|
unlink(label: string): Promise<void>;
|
|
65
|
+
/** Hosts live in shared main IDB (same as local writer). */
|
|
66
|
+
hosts(): Promise<IHostRow<URL>[]>;
|
|
65
67
|
connect(listen?: boolean, sync?: boolean): Promise<void>;
|
|
66
68
|
disconnect(): Promise<void>;
|
|
67
69
|
/** Local UI write: archive + apply on main (fast UI); upload/sync via worker. */
|