@contrail/documents 1.7.0 → 1.8.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
@@ -11,6 +11,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
11
 
12
12
  - Document transaction contract types for the transactional write path: `DocumentOperation`, `DocumentElementPatch`, `WriteTransactionRequest`, and `WriteTransactionResponse`.
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
+ - `DocumentTransaction` and `GetDocumentTransactionsResponse` types for reading committed transactions back (client catch-up and gap repair).
14
15
  - `DocumentTransactionMessage` — the WebSocket broadcast shape for a committed transaction (carries `sequenceNumber`, `clientTransactionId`, and inline `operations` or an `operationsDownloadUrl`).
15
16
 
16
17
  ## [1.5.6] - 2026-04-29
@@ -21,6 +21,16 @@ export interface WriteTransactionResponse {
21
21
  createdById: string;
22
22
  clientTransactionId?: string;
23
23
  }
24
+ export interface DocumentTransaction {
25
+ sequenceNumber: number;
26
+ clientTransactionId?: string;
27
+ operations: DocumentOperation[];
28
+ }
29
+ export interface GetDocumentTransactionsResponse {
30
+ transactions: DocumentTransaction[];
31
+ hasMore: boolean;
32
+ lastReturnedSequenceNumber: number;
33
+ }
24
34
  interface DocumentTransactionMessageBase {
25
35
  type: 'DOCUMENT_TRANSACTION';
26
36
  documentId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",