@contrail/documents 1.8.0 → 1.9.0-alpha.s3-overflow.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/CHANGELOG.md CHANGED
@@ -13,6 +13,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
13
13
  - `DocumentWriteMode` (`'transactional' | 'legacy'`) and an optional `writeMode` field on the `Document` interface, used to gate the transactional write path. Both `undefined` and `'legacy'` mean the legacy path, so existing documents need no backfill; `'transactional'` opts a document in.
14
14
  - `DocumentTransaction` and `GetDocumentTransactionsResponse` types for reading committed transactions back (client catch-up and gap repair).
15
15
  - `DocumentTransactionMessage` — the WebSocket broadcast shape for a committed transaction (carries `sequenceNumber`, `clientTransactionId`, and inline `operations` or an `operationsDownloadUrl`).
16
+ - Optional `lastSequenceNumber` field on the `Document` interface, recording the sequence number of the latest WAL transaction persisted into the document.
16
17
 
17
18
  ## [1.5.6] - 2026-04-29
18
19
 
@@ -45,4 +45,13 @@ export type DocumentTransactionMessage = (DocumentTransactionMessageBase & {
45
45
  operationsDownloadUrl: string;
46
46
  operations?: never;
47
47
  });
48
+ export type DocumentTransactionPayload = {
49
+ clientTransactionId?: string;
50
+ } & ({
51
+ operations: DocumentOperation[];
52
+ operationsS3Key?: never;
53
+ } | {
54
+ operationsS3Key: string;
55
+ operations?: never;
56
+ });
48
57
  export {};
@@ -24,4 +24,5 @@ export interface Document {
24
24
  clipContent?: boolean;
25
25
  ownedByReference?: string;
26
26
  writeMode?: DocumentWriteMode;
27
+ lastSequenceNumber?: number;
27
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.8.0",
3
+ "version": "1.9.0-alpha.s3-overflow.0",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",