@contrail/documents 1.6.0-alpha.document-transaction-consumer.3 → 1.6.0-alpha.document-transaction-consumer.4

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
@@ -14,6 +14,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
14
14
  - Optional `lastSequenceNumber` field on the `Document` interface, recording the sequence number of the latest WAL transaction persisted into the document.
15
15
  - `WriteTransactionRequest` now accepts either inline `operations` or an `operationsS3Key` referencing a client-uploaded payload, supporting transactions larger than the request-body limit.
16
16
  - `TransactionUploadTarget` type (`s3Key`, `presignedUploadUrl`, `expiresAt`) returned by the transaction upload-target endpoint.
17
+ - `DocumentTransactionMessage` type for the WebSocket broadcast of a committed transaction: operations inline, or an `operationsDownloadUrl` (presigned GET) when the payload overflowed to S3 and exceeds the WebSocket message limit.
17
18
 
18
19
  ## [1.5.6] - 2026-04-29
19
20
 
@@ -34,6 +34,20 @@ export interface TransactionUploadTarget {
34
34
  presignedUploadUrl: string;
35
35
  expiresAt: string;
36
36
  }
37
+ interface DocumentTransactionMessageBase {
38
+ type: 'DOCUMENT_TRANSACTION';
39
+ documentId: string;
40
+ sequenceNumber: number;
41
+ createdOn: string;
42
+ clientTransactionId?: string;
43
+ }
44
+ export type DocumentTransactionMessage = (DocumentTransactionMessageBase & {
45
+ operations: DocumentOperation[];
46
+ operationsDownloadUrl?: never;
47
+ }) | (DocumentTransactionMessageBase & {
48
+ operationsDownloadUrl: string;
49
+ operations?: never;
50
+ });
37
51
  export type DocumentTransactionPayload = {
38
52
  clientTransactionId?: string;
39
53
  } & ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.6.0-alpha.document-transaction-consumer.3",
3
+ "version": "1.6.0-alpha.document-transaction-consumer.4",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",