@contrail/documents 1.13.0 → 1.14.0-alpha.fad0c9c

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
@@ -5,6 +5,16 @@ All notable changes to `@contrail/documents` are documented here.
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
  Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.14.0] - 2026-07-29
9
+
10
+ ### Added
11
+
12
+ - `InlineDocumentTransaction` and `S3DocumentTransaction` — the two named variants of `DocumentTransaction`, mirroring `InlineWriteTransactionRequest` / `S3WriteTransactionRequest`. Use these when you need a single variant, or something to extend.
13
+
14
+ ### Changed
15
+
16
+ - `DocumentTransaction` is now a union of inline `operations` or an `operationsDownloadUrl`, matching the shape `DocumentTransactionMessage` already uses for WebSocket broadcasts. A transaction whose operations overflowed to S3 is read back as a presigned download URL rather than having its operations inlined, so a page of transactions cannot exceed the response size limit. Readers that assumed `operations` was always present must handle both variants, and anything that did `extends DocumentTransaction` should now extend `InlineDocumentTransaction` or `S3DocumentTransaction`.
17
+
8
18
  ## [1.13.0] - 2026-07-27
9
19
 
10
20
  ### Added
@@ -29,11 +29,19 @@ export interface WriteTransactionResponse {
29
29
  createdById: string;
30
30
  clientTransactionId?: string;
31
31
  }
32
- export interface DocumentTransaction {
32
+ interface DocumentTransactionBase {
33
33
  sequenceNumber: number;
34
34
  clientTransactionId?: string;
35
+ }
36
+ export interface InlineDocumentTransaction extends DocumentTransactionBase {
35
37
  operations: DocumentOperation[];
38
+ operationsDownloadUrl?: never;
39
+ }
40
+ export interface S3DocumentTransaction extends DocumentTransactionBase {
41
+ operations?: never;
42
+ operationsDownloadUrl: string;
36
43
  }
44
+ export type DocumentTransaction = InlineDocumentTransaction | S3DocumentTransaction;
37
45
  export interface GetDocumentTransactionsResponse {
38
46
  transactions: DocumentTransaction[];
39
47
  hasMore: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/documents",
3
- "version": "1.13.0",
3
+ "version": "1.14.0-alpha.fad0c9c",
4
4
  "description": "Documents library for contrail platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",