@microdelta/history 0.0.0 → 0.2.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/README.md +30 -4
- package/dist/api/history.alpha.d.ts +3 -0
- package/dist/api/history.beta.d.ts +3 -0
- package/dist/api/history.conformance.store.alpha.d.ts +3 -0
- package/dist/api/history.conformance.store.beta.d.ts +3 -0
- package/dist/api/history.conformance.store.public.d.ts +3 -0
- package/dist/api/history.conformance.store.raw.alpha.d.ts +215 -0
- package/dist/api/history.conformance.store.raw.beta.d.ts +215 -0
- package/dist/api/history.conformance.store.raw.public.d.ts +215 -0
- package/dist/api/history.conformance.store.raw.untrimmed.d.ts +215 -0
- package/dist/api/history.conformance.store.untrimmed.d.ts +3 -0
- package/dist/api/history.public.d.ts +3 -0
- package/dist/api/history.root.raw.alpha.d.ts +1371 -0
- package/dist/api/history.root.raw.beta.d.ts +425 -0
- package/dist/api/history.root.raw.public.d.ts +425 -0
- package/dist/api/history.root.raw.untrimmed.d.ts +1372 -0
- package/dist/api/history.shared.alpha.d.ts +1402 -0
- package/dist/api/history.shared.beta.d.ts +456 -0
- package/dist/api/history.shared.public.d.ts +456 -0
- package/dist/api/history.shared.untrimmed.d.ts +1403 -0
- package/dist/api/history.untrimmed.d.ts +3 -0
- package/dist/api/tsdoc-metadata.json +11 -0
- package/dist/src/completed-results.d.ts +99 -0
- package/dist/src/completed-results.d.ts.map +1 -0
- package/dist/src/completed-results.js +2 -0
- package/dist/src/completed-results.js.map +1 -0
- package/dist/src/durable/contracts.d.ts +612 -0
- package/dist/src/durable/contracts.d.ts.map +1 -0
- package/dist/src/durable/contracts.js +2 -0
- package/dist/src/durable/contracts.js.map +1 -0
- package/dist/src/durable/errors.d.ts +94 -0
- package/dist/src/durable/errors.d.ts.map +1 -0
- package/dist/src/durable/errors.js +118 -0
- package/dist/src/durable/errors.js.map +1 -0
- package/dist/src/durable/index.d.ts +9 -0
- package/dist/src/durable/index.d.ts.map +1 -0
- package/dist/src/durable/index.js +770 -0
- package/dist/src/durable/index.js.map +1 -0
- package/dist/src/durable/journal.d.ts +53 -0
- package/dist/src/durable/journal.d.ts.map +1 -0
- package/dist/src/durable/journal.js +174 -0
- package/dist/src/durable/journal.js.map +1 -0
- package/dist/src/durable/locator.d.ts +31 -0
- package/dist/src/durable/locator.d.ts.map +1 -0
- package/dist/src/durable/locator.js +50 -0
- package/dist/src/durable/locator.js.map +1 -0
- package/dist/src/durable/records.d.ts +40 -0
- package/dist/src/durable/records.d.ts.map +1 -0
- package/dist/src/durable/records.js +74 -0
- package/dist/src/durable/records.js.map +1 -0
- package/dist/src/durable/schema.d.ts +37 -0
- package/dist/src/durable/schema.d.ts.map +1 -0
- package/dist/src/durable/schema.js +335 -0
- package/dist/src/durable/schema.js.map +1 -0
- package/dist/src/durable/selected-index.d.ts +94 -0
- package/dist/src/durable/selected-index.d.ts.map +1 -0
- package/dist/src/durable/selected-index.js +594 -0
- package/dist/src/durable/selected-index.js.map +1 -0
- package/dist/src/index.d.ts +28 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +15 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/store/index.d.ts +128 -0
- package/dist/src/store/index.d.ts.map +1 -0
- package/dist/src/store/index.js +33 -0
- package/dist/src/store/index.js.map +1 -0
- package/dist/src/store/memory/index.d.ts +24 -0
- package/dist/src/store/memory/index.d.ts.map +1 -0
- package/dist/src/store/memory/index.js +162 -0
- package/dist/src/store/memory/index.js.map +1 -0
- package/dist/src/types.d.ts +100 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/test/conformance/store/index.d.ts +34 -0
- package/dist/test/conformance/store/index.d.ts.map +1 -0
- package/dist/test/conformance/store/index.js +368 -0
- package/dist/test/conformance/store/index.js.map +1 -0
- package/package.json +48 -8
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Entry-specific exports preserve one History type identity per release tier. */
|
|
2
|
+
export { AttemptConflictError, AttemptStateError, DuplicateRowError, FingerprintAlgorithmMismatchError, HistoryClockError, HistoryIntegrityError, HistorySchemaError, InvalidStorePatchError, JournalConflictError, JournalVersionError, MissingRowError, StaleWriterError, createMemoryStore, openDurableHistory } from './history.shared.untrimmed.js';
|
|
3
|
+
export type { Divergence, FieldRow, Fingerprint, GenerationPatch, GenerationRow, GenerationState, IAbandonRequest, IAcceptanceRecord, IAcceptanceRequest, IAddressSegment, IAttemptRecord, IAttemptRequest, IAttemptState, IClockCapability, ICompletedEnvelope, ICompletedNavigationReader, ICompletedProjectionReader, ICompletedResultReader, ICompletedResultReference, IDurableHistory, IDurableHistoryOptions, IHistoryScope, IJournalAddress, IJournalCommit, IJournalDeclaration, IJournalFormat, IJournalQuery, IJournalRecord, IJournalWrite, IOperation, IOperationJournal, IPromotionQuery, IPromotionRecord, IPromotionRequest, IRecoveryOutcome, IResultVerification, IScopedSubject, ISelectedFact, ISelectedFingerprintRequest, ISelectedFingerprintResolution, ISelectedNode, ISelectedReadRequest, ISha256Capability, ISqliteCapability, ISqliteConnection, ISqliteRow, ISqliteRunResult, ISqliteStatement, ISqliteSynchronousResult, ISqliteValue, IStageRequest, IValueProjectionDescriptor, IValueProjectionFact, IValueProjectionMember, IValueProjectionTraversal, IVersionedRecord, IVersionedSubject, IWriterAcquisition, IWriterAcquisitionRequest, IWriterContention, IWriterLease, IWriterRenewal, Identity, MemoryStoreOptions, Outcome, Path, RecordedRead, ResultKey, Store, StoreMetadata, Subject, SubjectPatch, SubjectRow } from './history.shared.untrimmed.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.59.2"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exact completed-snapshot reading contracts used by Materialization. These
|
|
3
|
+
* interfaces locate immutable results but neither implement a backend nor decide
|
|
4
|
+
* freshness, publication, authorization, or candidate eligibility.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import type { IAddressSegment, IOperation, ISelectedFact, ISelectedNode, IValueProjectionDescriptor, IValueProjectionFact } from '@microdelta/value';
|
|
8
|
+
/**
|
|
9
|
+
* A caller-visible locator for one completed immutable snapshot. The opaque
|
|
10
|
+
* locator carries whatever analysis and environment scope its reader requires;
|
|
11
|
+
* it is never a payload or a request to follow a current pointer.
|
|
12
|
+
* @alpha
|
|
13
|
+
*/
|
|
14
|
+
export interface ICompletedResultReference {
|
|
15
|
+
/** Dispatches resolution to the completed-result contract. */
|
|
16
|
+
readonly kind: 'completed-result';
|
|
17
|
+
/** Opaque exact snapshot locator interpreted only by its injected reader. */
|
|
18
|
+
readonly locator: string;
|
|
19
|
+
}
|
|
20
|
+
/** A selected Value-owned scalar fact requested at an exact retained address. @alpha */
|
|
21
|
+
export interface ISelectedReadRequest {
|
|
22
|
+
/** The literal operation whose fact is requested. */
|
|
23
|
+
readonly operation: IOperation;
|
|
24
|
+
/** Container-aware path within this selected result value. */
|
|
25
|
+
readonly address: readonly IAddressSegment[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Metadata lookup is scoped to the exact result reference and full requested
|
|
29
|
+
* selection. The encoding tag prevents an indexed digest from another semantic
|
|
30
|
+
* version being mistaken for this selection.
|
|
31
|
+
* @alpha
|
|
32
|
+
*/
|
|
33
|
+
export type ISelectedFingerprintRequest = {
|
|
34
|
+
readonly kind: 'selected';
|
|
35
|
+
readonly operation: IOperation;
|
|
36
|
+
readonly address: readonly IAddressSegment[];
|
|
37
|
+
readonly encoding: 'MDO1';
|
|
38
|
+
} | {
|
|
39
|
+
readonly kind: 'projection';
|
|
40
|
+
readonly descriptor: IValueProjectionDescriptor;
|
|
41
|
+
readonly encoding: 'MDP1';
|
|
42
|
+
} | {
|
|
43
|
+
readonly kind: 'materialized-output';
|
|
44
|
+
readonly address: readonly IAddressSegment[];
|
|
45
|
+
readonly encoding: 'MDS1';
|
|
46
|
+
};
|
|
47
|
+
/** Explicit results keep absent or incompatible metadata from implying equality. @alpha */
|
|
48
|
+
export type ISelectedFingerprintResolution = {
|
|
49
|
+
readonly kind: 'compatible';
|
|
50
|
+
readonly fingerprint: string;
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: 'unavailable';
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: 'incompatible';
|
|
55
|
+
} | {
|
|
56
|
+
readonly kind: 'ambiguous';
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Synchronous scalar access and fingerprint-only resolution for one exact
|
|
60
|
+
* completed snapshot. A compatible fingerprint answer must be backed by the
|
|
61
|
+
* same semantics as a selected read; resolving metadata never reads payload.
|
|
62
|
+
* @alpha
|
|
63
|
+
*/
|
|
64
|
+
export interface ICompletedResultReader {
|
|
65
|
+
/** Read the requested fact from exactly this reference, never from current. */
|
|
66
|
+
readSelected(reference: ICompletedResultReference, request: ISelectedReadRequest): ISelectedFact;
|
|
67
|
+
/** Resolve matching metadata only; unavailable metadata does not trigger a read. */
|
|
68
|
+
resolveFingerprint(reference: ICompletedResultReference, request: ISelectedFingerprintRequest): ISelectedFingerprintResolution;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Optional capability for readers that can supply an exact keyed projection as
|
|
72
|
+
* selected member values. Scalar readers do not need to implement projections.
|
|
73
|
+
* @alpha
|
|
74
|
+
*/
|
|
75
|
+
export interface ICompletedProjectionReader {
|
|
76
|
+
/** Read only the projection's requested address and keyed selected values. */
|
|
77
|
+
readProjection(reference: ICompletedResultReference, descriptor: IValueProjectionDescriptor): IValueProjectionFact;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Optional capability for readers that can navigate one exact completed
|
|
81
|
+
* snapshot node by node, for lazy nested views. A navigation answer is the
|
|
82
|
+
* scalar value fact or the record/array shape at exactly the requested address;
|
|
83
|
+
* answering it must not read the root payload, a sibling or an unrequested
|
|
84
|
+
* descendant. Presence and key-order facts at nested addresses are answered by
|
|
85
|
+
* the same reader's {@link ICompletedResultReader.readSelected}. Every answer is
|
|
86
|
+
* synchronous: storage that can only load asynchronously cannot implement this
|
|
87
|
+
* capability. Scalar-only readers need not implement it.
|
|
88
|
+
* @alpha
|
|
89
|
+
*/
|
|
90
|
+
export interface ICompletedNavigationReader {
|
|
91
|
+
/** Navigate to exactly one node of this reference, never following a current pointer. */
|
|
92
|
+
readNode(reference: ICompletedResultReference, address: readonly IAddressSegment[]): ISelectedNode;
|
|
93
|
+
/**
|
|
94
|
+
* Return the complete supported data of one container subtree, only for an
|
|
95
|
+
* explicit output request. Record key order must be the snapshot's order.
|
|
96
|
+
*/
|
|
97
|
+
readSubtree(reference: ICompletedResultReference, address: readonly IAddressSegment[]): unknown;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=completed-results.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completed-results.d.ts","sourceRoot":"","sources":["../../src/completed-results.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,aAAa,EACb,aAAa,EACb,0BAA0B,EAC1B,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,wFAAwF;AACxF,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,QAAQ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