@contrail/documents 1.9.0 → 1.11.0-alpha.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 +13 -0
- package/lib/types/document-transaction.d.ts +23 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `WriteTransactionRequest` now accepts either inline `operations` or an `operationsS3Key` referencing a client-uploaded payload, supporting transactions larger than the request-body limit.
|
|
13
|
+
- `TransactionUploadTarget` type (`s3Key`, `presignedUploadUrl`, `expiresAt`) returned by the transaction upload-target endpoint.
|
|
14
|
+
|
|
15
|
+
## [1.10.0] - 2026-06-26
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `DocumentTransactionPayload` — a shared either-or contract (`operations` XOR `operationsS3Key`) so client and server agree on whether a transaction's operations are inline or overflowed to S3.
|
|
20
|
+
|
|
8
21
|
## [1.9.0] - 2026-06-26
|
|
9
22
|
|
|
10
23
|
### Added
|
|
@@ -11,10 +11,18 @@ export type DocumentOperation = {
|
|
|
11
11
|
elementId: string;
|
|
12
12
|
};
|
|
13
13
|
export type DocumentElementPatch = Partial<Omit<DocumentElement, 'id' | 'documentId'>>;
|
|
14
|
-
|
|
14
|
+
interface WriteTransactionRequestBase {
|
|
15
15
|
clientTransactionId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface InlineWriteTransactionRequest extends WriteTransactionRequestBase {
|
|
16
18
|
operations: DocumentOperation[];
|
|
19
|
+
operationsS3Key?: never;
|
|
20
|
+
}
|
|
21
|
+
export interface S3WriteTransactionRequest extends WriteTransactionRequestBase {
|
|
22
|
+
operations?: never;
|
|
23
|
+
operationsS3Key: string;
|
|
17
24
|
}
|
|
25
|
+
export type WriteTransactionRequest = InlineWriteTransactionRequest | S3WriteTransactionRequest;
|
|
18
26
|
export interface WriteTransactionResponse {
|
|
19
27
|
sequenceNumber: number;
|
|
20
28
|
createdOn: string;
|
|
@@ -45,4 +53,18 @@ export type DocumentTransactionMessage = (DocumentTransactionMessageBase & {
|
|
|
45
53
|
operationsDownloadUrl: string;
|
|
46
54
|
operations?: never;
|
|
47
55
|
});
|
|
56
|
+
export interface TransactionUploadTarget {
|
|
57
|
+
s3Key: string;
|
|
58
|
+
presignedUploadUrl: string;
|
|
59
|
+
expiresAt: string;
|
|
60
|
+
}
|
|
61
|
+
export type DocumentTransactionPayload = {
|
|
62
|
+
clientTransactionId?: string;
|
|
63
|
+
} & ({
|
|
64
|
+
operations: DocumentOperation[];
|
|
65
|
+
operationsS3Key?: never;
|
|
66
|
+
} | {
|
|
67
|
+
operationsS3Key: string;
|
|
68
|
+
operations?: never;
|
|
69
|
+
});
|
|
48
70
|
export {};
|