@interncom/diplomatic 0.15.1 → 0.17.0
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/cli/index.mjs +2 -2
- package/dist/cli/shared/crypto/enclave.d.ts +3 -1
- package/dist/cli/shared/seed.d.ts +0 -2
- package/dist/cli/shared/types.d.ts +1 -1
- package/dist/web/entdb/entdb.d.ts +41 -4
- package/dist/web/entdb/idb.d.ts +4 -3
- package/dist/web/entdb/memory.d.ts +11 -14
- package/dist/web/index.d.ts +2 -1
- package/dist/web/index.mjs +1 -1
- package/dist/web/shared/crypto/enclave.d.ts +3 -1
- package/dist/web/shared/seed.d.ts +0 -2
- package/dist/web/shared/types.d.ts +1 -1
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { IEntDB, IEntity, IEntRow } from "./entdb";
|
|
1
|
+
import { EntitiesQuery, IEntDB, IEntity, IEntRow } from "./entdb";
|
|
2
2
|
import { Status } from "../shared/consts";
|
|
3
|
-
import { EntityID,
|
|
3
|
+
import { EntityID, Hash, ICrypto, IOp } from "../shared/types";
|
|
4
4
|
import { ValStat } from "../shared/valstat.ts";
|
|
5
|
-
interface IDateRange {
|
|
6
|
-
start: Date;
|
|
7
|
-
end: Date;
|
|
8
|
-
}
|
|
9
|
-
type EntitiesQuery = {
|
|
10
|
-
type: string;
|
|
11
|
-
gid?: GroupID;
|
|
12
|
-
pid?: EntityID;
|
|
13
|
-
tag?: string;
|
|
14
|
-
updatedBetween?: IDateRange;
|
|
15
|
-
};
|
|
16
5
|
/** Options for {@link EntDBMemory}. */
|
|
17
6
|
export type EntDBMemoryOptions = {
|
|
18
7
|
/**
|
|
@@ -42,6 +31,15 @@ export declare class EntDBMemory implements IEntDB {
|
|
|
42
31
|
private unindex;
|
|
43
32
|
private clearIndexes;
|
|
44
33
|
private bucketList;
|
|
34
|
+
/**
|
|
35
|
+
* List by tag spec. Exact uses the tag map; range/prefix scan tag keys
|
|
36
|
+
* (Map order is insertion, not lexicographic).
|
|
37
|
+
*/
|
|
38
|
+
private byTagSpec;
|
|
39
|
+
/**
|
|
40
|
+
* List by updatedAt spec. Scans the type bucket (no date secondary map).
|
|
41
|
+
*/
|
|
42
|
+
private byDateSpec;
|
|
45
43
|
apply(ops: IOp[]): Promise<{
|
|
46
44
|
stats: Status[];
|
|
47
45
|
types: Set<string>;
|
|
@@ -57,4 +55,3 @@ export declare class EntDBMemory implements IEntDB {
|
|
|
57
55
|
}): Promise<ValStat<number>>;
|
|
58
56
|
checksum(crypto: ICrypto): Promise<ValStat<Hash>>;
|
|
59
57
|
}
|
|
60
|
-
export {};
|
package/dist/web/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { SyncClient } from "./client";
|
|
|
2
2
|
import crypto from "./crypto";
|
|
3
3
|
import { CachedEntDB, type CachedEntDBOptions, openEntDB, type OpenEntDBOptions } from "./entdb/cached";
|
|
4
4
|
import { EntitiesQuery, entStateManager, IEntDB, IEntity, IEntRow, isLiveEnt, isTombstone, ITombstone, normalizeTags, nullEntDB, revFromEntity, revFromHead } from "./entdb/entdb";
|
|
5
|
+
import type { DateSpec, IDateRange, ITagRange, TagSpec } from "./entdb/entdb";
|
|
5
6
|
import { EntIDB } from "./entdb/idb";
|
|
6
7
|
import { EntDBMemory, type EntDBMemoryOptions } from "./entdb/memory";
|
|
7
8
|
import { useClient, useClientState, useClientXferState, useSyncOnResume } from "./react/useClient";
|
|
@@ -43,4 +44,4 @@ import type { WipeOpts } from "./types";
|
|
|
43
44
|
export { largeBlobCapable } from "./shared/webauthn/largeBlob";
|
|
44
45
|
export { webAuthnLastError } from "./shared/webauthn/common";
|
|
45
46
|
export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, asDHKEReq, asDHKEResp, asSealedMasterKey, b64tob, b64urltob, btob64, btob64url, btoh, CachedEntDB, checksumEntRevs, checksumSet, Clock, cmpBytes, crypto, Decoder, DEFAULT_PRF_SALT, defaultPeekProgressEvery, defaultWebAuthnRpId, eidCodec, Enclave, encodeEntRev, Encoder, EntDBMemory, EntIDB, EntitiesQuery, EntityID, entStateManager, genSingletonEID, GroupID, hostHTTPTransport, htob, HTTPTransport, IDBSeedStore, IDBStore, idleProgress, IEntDB, IEntity, isApldState, isLiveEnt, isPendingApply, isTerminalApplyFailure, isTombstone, IStore, KEYRING_MAX, keyringCredIds, keyringKind, keyringLabel, MASTER_SEED_LEN, MemoryStore, normalizeTags, nullEntDB, nullStateManager, openDiplomaticClient, openEntDB, openIDBStore, PairRequest, PasskeySeedStore, prfCapable, PrfSeedStore, revFromEntity, revFromHead, SEALED_MASTER_KEY_LEN, setApld, shouldEmitItemProgress, SingletonStateManager, StateManager, Status, SyncClient, TypedEventEmitter, useClient, useClientState, useClientXferState, useStateWatcher, useStateWatcherSuspense, useSyncOnResume, WorkerClient, };
|
|
46
|
-
export type { ApldState, Applier, BundleHost, CachedEntDBOptions, DHKEReq, DHKEResp, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IEntRow, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITombstone, ITransport, IUpdateParams, Keyring, KeyringEntry, KeyringRow, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, PasskeySeedStoreOpts, PersistKeyring, PrfRp, PrfSeedStoreOpts, ReconcileOpts, ReconcileReport, SealedMasterKey, SetSeedOpts, SyncProgressEvent, WipeOpts, WorkerClientOptions, };
|
|
47
|
+
export type { ApldState, Applier, BundleHost, CachedEntDBOptions, DateSpec, DHKEReq, DHKEResp, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDateRange, IDeleteParams, IDiplomaticClientState, IEntRev, IEntRow, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITagRange, ITombstone, ITransport, IUpdateParams, Keyring, KeyringEntry, KeyringRow, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, PasskeySeedStoreOpts, PersistKeyring, PrfRp, PrfSeedStoreOpts, ReconcileOpts, ReconcileReport, SealedMasterKey, SetSeedOpts, SyncProgressEvent, TagSpec, WipeOpts, WorkerClientOptions, };
|