@agentshouse/mdruntime 0.1.0-ca6edc1abd618 → 0.1.0-ca8707258fdde
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/README.md +2 -2
- package/dist/acceptance.d.ts +26 -0
- package/dist/acceptance.d.ts.map +1 -0
- package/dist/acceptance.js +384 -0
- package/dist/adapter.d.ts +102 -70
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +3 -10
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +29 -47
- package/dist/bootstrap.d.ts +16 -14
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +272 -129
- package/dist/chain.d.ts +2 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/change.d.ts +1 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/chat-types.d.ts +3 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +2 -0
- package/dist/client.d.ts +20 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +55 -6
- package/dist/collection.d.ts +7 -4
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +23 -17
- package/dist/compile.d.ts +6 -6
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +278 -282
- package/dist/connection.d.ts +22 -44
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1600 -3577
- package/dist/context.d.ts +2 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +7 -0
- package/dist/conversation-row.d.ts +33 -0
- package/dist/conversation-row.d.ts.map +1 -0
- package/dist/conversation-row.js +47 -0
- package/dist/conversation.d.ts +27 -18
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +484 -258
- package/dist/durability.d.ts +6 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/entry.d.ts +3 -2
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +18 -8
- package/dist/figures.d.ts +48 -0
- package/dist/figures.d.ts.map +1 -0
- package/dist/figures.js +197 -0
- package/dist/file.d.ts +2 -11
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +6 -4
- package/dist/host.d.ts +3 -7
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +29 -32
- package/dist/identity.d.ts +0 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +0 -3
- package/dist/index.d.ts +20 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/install.d.ts +86 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +537 -0
- package/dist/job.d.ts +33 -0
- package/dist/job.d.ts.map +1 -0
- package/dist/job.js +54 -0
- package/dist/live.d.ts +5 -4
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +62 -20
- package/dist/log.d.ts +1 -0
- package/dist/log.d.ts.map +1 -1
- package/dist/media.d.ts +8 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +218 -0
- package/dist/memory.d.ts +12 -5
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +216 -85
- package/dist/messages.d.ts +27 -3
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +97 -19
- package/dist/model.d.ts +8 -10
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +5 -17
- package/dist/observation.d.ts +3 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +8 -3
- package/dist/outcome.d.ts +14 -5
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +19 -2
- package/dist/overlay.d.ts +1 -0
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +11 -0
- package/dist/parts.d.ts +59 -0
- package/dist/parts.d.ts.map +1 -0
- package/dist/parts.js +118 -0
- package/dist/paths.d.ts +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +4 -0
- package/dist/query.d.ts +18 -207
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +3 -505
- package/dist/questions.d.ts +32 -0
- package/dist/questions.d.ts.map +1 -0
- package/dist/questions.js +118 -0
- package/dist/reach.d.ts +18 -11
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +206 -126
- package/dist/react.d.ts +5 -2
- package/dist/react.d.ts.map +1 -1
- package/dist/read.d.ts +7 -0
- package/dist/read.d.ts.map +1 -0
- package/dist/read.js +17 -0
- package/dist/readiness.d.ts +3 -17
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +4 -10
- package/dist/reads.d.ts +34 -10
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +114 -86
- package/dist/recovery.d.ts +1 -0
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +35 -1
- package/dist/refresh.d.ts +7 -5
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +33 -5
- package/dist/replica.d.ts +10 -11
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +52 -20
- package/dist/room-draft.d.ts +21 -5
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +98 -51
- package/dist/room-drafts.d.ts +29 -0
- package/dist/room-drafts.d.ts.map +1 -0
- package/dist/room-drafts.js +216 -0
- package/dist/rows.d.ts +18 -16
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +45 -153
- package/dist/save.d.ts +2 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +22 -13
- package/dist/saves.d.ts +96 -0
- package/dist/saves.d.ts.map +1 -0
- package/dist/saves.js +999 -0
- package/dist/search.d.ts +12 -63
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +9 -52
- package/dist/seed.d.ts +16 -2
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +66 -0
- package/dist/shared.d.ts +0 -1
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +0 -10
- package/dist/socket/admission.d.ts +7 -0
- package/dist/socket/admission.d.ts.map +1 -0
- package/dist/socket/admission.js +39 -0
- package/dist/socket/answers.d.ts +6 -0
- package/dist/socket/answers.d.ts.map +1 -0
- package/dist/socket/answers.js +20 -0
- package/dist/socket/reads.d.ts +10 -0
- package/dist/socket/reads.d.ts.map +1 -0
- package/dist/socket/reads.js +31 -0
- package/dist/socket.d.ts +43 -0
- package/dist/socket.d.ts.map +1 -0
- package/dist/socket.js +96 -0
- package/dist/source.d.ts +61 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +81 -0
- package/dist/status.d.ts +4 -5
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +3 -7
- package/dist/store/fences.d.ts +16 -0
- package/dist/store/fences.d.ts.map +1 -0
- package/dist/store/fences.js +26 -0
- package/dist/store/installs.d.ts +30 -0
- package/dist/store/installs.d.ts.map +1 -0
- package/dist/store/installs.js +34 -0
- package/dist/store/records.d.ts +212 -0
- package/dist/store/records.d.ts.map +1 -0
- package/dist/store/records.js +408 -0
- package/dist/store/room-held.d.ts +8 -0
- package/dist/store/room-held.d.ts.map +1 -0
- package/dist/store/room-held.js +17 -0
- package/dist/store/watchers.d.ts +15 -0
- package/dist/store/watchers.d.ts.map +1 -0
- package/dist/store/watchers.js +36 -0
- package/dist/store/writes.d.ts +24 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +125 -0
- package/dist/store.d.ts +76 -158
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +117 -403
- package/dist/stored.d.ts +66 -55
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +343 -273
- package/dist/tables.d.ts +118 -65
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +199 -99
- package/dist/tallies.d.ts +18 -0
- package/dist/tallies.d.ts.map +1 -0
- package/dist/tallies.js +129 -0
- package/dist/transfer.d.ts +0 -5
- package/dist/transfer.d.ts.map +1 -1
- package/dist/validation.d.ts +3 -4
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +42 -100
- package/dist/windows.d.ts +1 -12
- package/dist/windows.d.ts.map +1 -1
- package/dist/windows.js +2 -75
- package/dist/wire.d.ts +23 -8
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +8 -2
- package/package.json +2 -2
- package/dist/fence.d.ts +0 -6
- package/dist/fence.d.ts.map +0 -1
- package/dist/fence.js +0 -10
- package/dist/fulltext.d.ts +0 -27
- package/dist/fulltext.d.ts.map +0 -1
- package/dist/fulltext.js +0 -368
- package/dist/words.d.ts +0 -19
- package/dist/words.d.ts.map +0 -1
- package/dist/words.js +0 -150
package/dist/save.js
CHANGED
|
@@ -4,7 +4,7 @@ import { immutable, leaving, queuedFile, departure, } from './change.js';
|
|
|
4
4
|
import { collectionOf, documentsOf, governing, } from './collection.js';
|
|
5
5
|
import { changeBatchIdentity } from './identity.js';
|
|
6
6
|
import { overlaying } from './overlay.js';
|
|
7
|
-
import { covered, normalize } from './paths.js';
|
|
7
|
+
import { ancestors, covered, normalize } from './paths.js';
|
|
8
8
|
import { sorting } from './shared.js';
|
|
9
9
|
import { paced, ROW_WEIGHT, stepped } from './turn.js';
|
|
10
10
|
import { validatedCollection } from './validation.js';
|
|
@@ -321,6 +321,8 @@ function* incoming(collection, removed, candidates) {
|
|
|
321
321
|
function affected(change) {
|
|
322
322
|
return change.kind === 'move' ? [change.path, change.to] : [change.path];
|
|
323
323
|
}
|
|
324
|
+
const WRITE = ['write'];
|
|
325
|
+
const MOVE_OUT = ['write', 'erase'];
|
|
324
326
|
function guard(changes, input, removing) {
|
|
325
327
|
const overridden = new Map();
|
|
326
328
|
const existing = {
|
|
@@ -329,6 +331,7 @@ function guard(changes, input, removing) {
|
|
|
329
331
|
add: (path) => void overridden.set(path, true),
|
|
330
332
|
delete: (path) => void overridden.set(path, false),
|
|
331
333
|
};
|
|
334
|
+
const occupied = (path) => input.folders.has(path) ? path : (ancestors(path).find((one) => existing.has(one)) ?? null);
|
|
332
335
|
for (const [index, change] of changes.entries()) {
|
|
333
336
|
for (const path of affected(change)) {
|
|
334
337
|
const normalized = normalize(path);
|
|
@@ -337,13 +340,14 @@ function guard(changes, input, removing) {
|
|
|
337
340
|
if (covered(input.providerOwnedPaths, normalized)) {
|
|
338
341
|
return refuse('provider-owned-path', normalized);
|
|
339
342
|
}
|
|
340
|
-
const operation
|
|
341
|
-
|
|
342
|
-
|
|
343
|
+
for (const operation of change.kind === 'remove' ? removing : WRITE)
|
|
344
|
+
if (!input.local && !covered(input.operations[operation], normalized))
|
|
345
|
+
return refuse(`${operation}-grant`, normalized);
|
|
343
346
|
}
|
|
344
347
|
if (change.kind === 'create' || change.kind === 'arrival') {
|
|
345
|
-
|
|
346
|
-
|
|
348
|
+
const taken = existing.has(change.path) ? change.path : occupied(change.path);
|
|
349
|
+
if (taken !== null)
|
|
350
|
+
return refuse('path-collision', taken);
|
|
347
351
|
existing.add(change.path);
|
|
348
352
|
continue;
|
|
349
353
|
}
|
|
@@ -353,6 +357,9 @@ function guard(changes, input, removing) {
|
|
|
353
357
|
input.bases.some((base) => base.kind === 'absent' && base.path === change.path))) {
|
|
354
358
|
return refuse('path-collision', change.path);
|
|
355
359
|
}
|
|
360
|
+
const taken = occupied(change.path);
|
|
361
|
+
if (taken !== null)
|
|
362
|
+
return refuse('path-collision', taken);
|
|
356
363
|
if (!input.local &&
|
|
357
364
|
existing.has(change.path) &&
|
|
358
365
|
input.visible.revisions[departure(changes, index)] === undefined) {
|
|
@@ -364,8 +371,9 @@ function guard(changes, input, removing) {
|
|
|
364
371
|
if (change.kind === 'move') {
|
|
365
372
|
if (!existing.has(change.path))
|
|
366
373
|
return refuse('path-absent', change.path);
|
|
367
|
-
|
|
368
|
-
|
|
374
|
+
const taken = existing.has(change.to) ? change.to : occupied(change.to);
|
|
375
|
+
if (taken !== null)
|
|
376
|
+
return refuse('path-collision', taken);
|
|
369
377
|
if (unrevised(input, change.path)) {
|
|
370
378
|
return refuse('unknown-revision', change.path);
|
|
371
379
|
}
|
|
@@ -968,7 +976,7 @@ function roomReferencesIn(path, content, composition) {
|
|
|
968
976
|
const parsed = parse(content, path);
|
|
969
977
|
if (!parsed.ok)
|
|
970
978
|
return [];
|
|
971
|
-
return roomReferences(
|
|
979
|
+
return roomReferences(parsed.document, definitionOf(governing(composition, path), parsed.document.type));
|
|
972
980
|
}
|
|
973
981
|
function* admittedRooms(changes, visible, resulting, composition) {
|
|
974
982
|
const from = new Map();
|
|
@@ -1014,7 +1022,7 @@ async function batching(input) {
|
|
|
1014
1022
|
const rewritten = await stepped(rewrites(changes, input.visible));
|
|
1015
1023
|
if (rewritten.kind === 'refused')
|
|
1016
1024
|
return rewritten;
|
|
1017
|
-
const refusal = guard(changes, input,
|
|
1025
|
+
const refusal = guard(changes, input, WRITE);
|
|
1018
1026
|
if (refusal !== null)
|
|
1019
1027
|
return refusal;
|
|
1020
1028
|
const preconditions = await stepped(preconditionsOf(changes, input.visible, input.bases));
|
|
@@ -1063,9 +1071,10 @@ function arrivingText(path, to, source, moved) {
|
|
|
1063
1071
|
return applied.outcome === 'applied' ? serialize(applied.document) : content;
|
|
1064
1072
|
}
|
|
1065
1073
|
function arrivalOf({ path, to }, source, moved) {
|
|
1066
|
-
const { documents, revisions, fileIds, changes, binaries } = source.visible;
|
|
1074
|
+
const { documents, revisions, fileIds, created, changes, binaries } = source.visible;
|
|
1067
1075
|
const kept = {
|
|
1068
1076
|
...(fileIds[path] === undefined ? {} : { fileId: fileIds[path] }),
|
|
1077
|
+
...(created[path] === undefined ? {} : { created: created[path] }),
|
|
1069
1078
|
...(changes[path] === undefined ? {} : { change: changes[path] }),
|
|
1070
1079
|
};
|
|
1071
1080
|
const heads = {
|
|
@@ -1095,7 +1104,7 @@ async function moving(input) {
|
|
|
1095
1104
|
if (moves.length === 0)
|
|
1096
1105
|
return refuse('no-change');
|
|
1097
1106
|
const removals = moves.map(({ path }) => ({ kind: 'remove', path }));
|
|
1098
|
-
const leaves = guard(removals, { ...source, local: input.local, bases: [] },
|
|
1107
|
+
const leaves = guard(removals, { ...source, local: input.local, bases: [] }, MOVE_OUT);
|
|
1099
1108
|
if (leaves !== null)
|
|
1100
1109
|
return leaves;
|
|
1101
1110
|
const uploading = moves.find(({ path }) => source.visible.binaries[path]?.state === 'pending');
|
|
@@ -1103,7 +1112,7 @@ async function moving(input) {
|
|
|
1103
1112
|
return refuse('unknown-revision', uploading.path);
|
|
1104
1113
|
const moved = new Map(moves.map(({ path, to }) => [path, to]));
|
|
1105
1114
|
const arrivals = moves.map((move) => arrivalOf(move, source, moved));
|
|
1106
|
-
const arrives = guard(arrivals, { ...destination, local: input.local, bases: [] },
|
|
1115
|
+
const arrives = guard(arrivals, { ...destination, local: input.local, bases: [] }, WRITE);
|
|
1107
1116
|
if (arrives !== null)
|
|
1108
1117
|
return arrives;
|
|
1109
1118
|
const bound = input.providerLimits.find((limit) => limit.name === MOVE_DOCUMENTS)?.value;
|
package/dist/saves.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Authorization, DiscoveredRoom, ScopedRefusal } from './adapter.js';
|
|
2
|
+
import { type ChangeSet } from './change-set.js';
|
|
3
|
+
import { type ChangeBatch, type WrittenBy } from './change.js';
|
|
4
|
+
import { type Composition } from './collection.js';
|
|
5
|
+
import type { Log } from './log.js';
|
|
6
|
+
import { type AttachAnswer, type BinaryLinkAnswer, type HeldBinaryAnswer, type HeldShownAnswer } from './outcome.js';
|
|
7
|
+
import type { ConnectionAvailability } from './readiness.js';
|
|
8
|
+
import { type HeldReplica, type ReplicaRecord, type Slice, type VisibleLayer } from './replica.js';
|
|
9
|
+
import { type ReturnReason, type RoomDraftParts } from './room-draft.js';
|
|
10
|
+
import { type SaveRefusal } from './save.js';
|
|
11
|
+
import type { RuntimeSocket } from './socket.js';
|
|
12
|
+
import type { AuthoredWrite, CommittedWrite, PendingState, RoomCommit, RuntimeStore, Store, StoredEntry, View, Work } from './store.js';
|
|
13
|
+
export type SaveResult = {
|
|
14
|
+
outcome: 'saved';
|
|
15
|
+
identifier: string;
|
|
16
|
+
} | ({
|
|
17
|
+
outcome: 'refused';
|
|
18
|
+
} & SaveRefusal);
|
|
19
|
+
export type SavedRoomDraft = {
|
|
20
|
+
readonly path: string;
|
|
21
|
+
readonly revision: string;
|
|
22
|
+
};
|
|
23
|
+
export type SavedParts = {
|
|
24
|
+
readonly path: string;
|
|
25
|
+
readonly parts: RoomDraftParts;
|
|
26
|
+
};
|
|
27
|
+
export type BinaryFileSurface = {
|
|
28
|
+
read(room: string, path: string, revision?: string): Promise<HeldBinaryAnswer>;
|
|
29
|
+
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
30
|
+
show(room: string, path: string, revision?: string): Promise<HeldShownAnswer>;
|
|
31
|
+
attach(room: string, file: File): Promise<AttachAnswer>;
|
|
32
|
+
part(file: string, part: number): Promise<Uint8Array | null>;
|
|
33
|
+
};
|
|
34
|
+
export type Leaving = {
|
|
35
|
+
batch: ChangeBatch;
|
|
36
|
+
returned: ReturnReason | null;
|
|
37
|
+
};
|
|
38
|
+
export type Saver = {
|
|
39
|
+
readonly store: Store;
|
|
40
|
+
readonly socket: RuntimeSocket;
|
|
41
|
+
readonly journal: Log;
|
|
42
|
+
readonly localSaves: boolean;
|
|
43
|
+
readonly ready: Promise<void>;
|
|
44
|
+
readonly firstDiscovery: Promise<void>;
|
|
45
|
+
full(): boolean;
|
|
46
|
+
closed(): boolean;
|
|
47
|
+
refused(): boolean;
|
|
48
|
+
roomsNamed(): boolean;
|
|
49
|
+
authorized(): Authorization | undefined;
|
|
50
|
+
ensureAuthorization(): Promise<void>;
|
|
51
|
+
connectionNow(): Promise<ConnectionAvailability>;
|
|
52
|
+
scoped(result: ScopedRefusal, room: ReplicaRecord | DiscoveredRoom, local: RuntimeStore): Promise<void>;
|
|
53
|
+
refuse(reason: 'revoked-authorization'): Promise<void>;
|
|
54
|
+
compositionFor(record: ReplicaRecord): Composition;
|
|
55
|
+
prepare(locators: readonly string[]): void;
|
|
56
|
+
publishChangeSet(set: ChangeSet): Promise<void>;
|
|
57
|
+
pendingShown(): Promise<void>;
|
|
58
|
+
submitLater(locator: string): void;
|
|
59
|
+
};
|
|
60
|
+
export declare function withdrawable(states: ReadonlyMap<string, PendingState>): (batch: ChangeBatch) => boolean;
|
|
61
|
+
export declare function sliceAt(store: Store, record: ReplicaRecord, view: View, queue: readonly ChangeBatch[], extra?: Iterable<string>, moved?: Iterable<string>): Promise<Slice>;
|
|
62
|
+
export declare function landedWhole(store: Store, locator: string, batch: ChangeBatch, confirmedLayer: Slice, current?: Readonly<Record<string, string>>): Promise<boolean>;
|
|
63
|
+
export type Settling = {
|
|
64
|
+
leaving?: readonly Leaving[];
|
|
65
|
+
room?: boolean;
|
|
66
|
+
view?: View;
|
|
67
|
+
commit?: Pick<RoomCommit, 'published' | 'refreshed'>;
|
|
68
|
+
changes?: {
|
|
69
|
+
readonly set: readonly StoredEntry[];
|
|
70
|
+
readonly removed: readonly string[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export declare function preparedAfter({ prepare }: Saver, locator: string, answer: CommittedWrite): void;
|
|
74
|
+
export declare function replayed(store: Store, record: ReplicaRecord, confirmedLayer: Slice, queue: readonly ChangeBatch[]): import("./turn.js").Later<import("./replica.js").Replayed>;
|
|
75
|
+
export declare function overlayDiff(record: ReplicaRecord, before: HeldReplica | undefined, visible: VisibleLayer, touched: ReadonlySet<string>): Promise<{
|
|
76
|
+
overlay: NonNullable<RoomCommit['overlay']>;
|
|
77
|
+
touched: ReadonlySet<string>;
|
|
78
|
+
}>;
|
|
79
|
+
export type Settlement = {
|
|
80
|
+
readonly locator: string;
|
|
81
|
+
readonly left: readonly ChangeBatch[];
|
|
82
|
+
readonly commit: {
|
|
83
|
+
readonly rooms: readonly RoomCommit[];
|
|
84
|
+
readonly writes: readonly AuthoredWrite[];
|
|
85
|
+
};
|
|
86
|
+
apply(answer: CommittedWrite): ChangeSet;
|
|
87
|
+
};
|
|
88
|
+
export declare function settle(saver: Saver, local: RuntimeStore, locator: string, work: Work, record: ReplicaRecord, queue: readonly ChangeBatch[], settling?: Settling): Promise<ChangeSet>;
|
|
89
|
+
export declare function together(saver: Saver, local: RuntimeStore, settlements: readonly Settlement[]): Promise<ChangeSet>;
|
|
90
|
+
export declare function settlement(saver: Saver, local: RuntimeStore, locator: string, work: Work, record: ReplicaRecord, queue: readonly ChangeBatch[], settling?: Settling): Promise<Settlement>;
|
|
91
|
+
export declare function unpairing(saver: Saver, local: RuntimeStore, locator: string, batches: readonly ChangeBatch[]): Promise<Settlement>;
|
|
92
|
+
export declare function saveRoomDrafts(saver: Saver, locator: string, named: readonly SavedRoomDraft[], writtenBy: WrittenBy | undefined): Promise<SaveResult>;
|
|
93
|
+
export declare function saveParts(saver: Saver, locator: string, named: readonly SavedParts[], writtenBy: WrittenBy | undefined): Promise<SaveResult>;
|
|
94
|
+
export declare function batchFile(store: Store, batch: ChangeBatch): (localId: string) => Promise<Blob>;
|
|
95
|
+
export declare function binaryFileSurface(saver: Saver): BinaryFileSurface;
|
|
96
|
+
//# sourceMappingURL=saves.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saves.d.ts","sourceRoot":"","sources":["../src/saves.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,aAAa,EAGb,cAAc,EACd,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK1E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAEpC,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAWL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAClB,KAAK,KAAK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