@contrail/documents 1.6.0-alpha.document-transaction-consumer.1 → 1.6.0-alpha.document-transaction-consumer.2
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 +2 -0
- package/lib/types/document-transaction.d.ts +12 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,8 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
12
12
|
- Document transaction contract types for the transactional write path: `DocumentOperation`, `DocumentElementPatch`, `WriteTransactionRequest`, and `WriteTransactionResponse`.
|
|
13
13
|
- `DocumentWriteMode` type and an optional `writeMode` field on the `Document` interface, used to gate the transactional write path.
|
|
14
14
|
- Optional `lastSequenceNumber` field on the `Document` interface, recording the sequence number of the latest WAL transaction persisted into the document.
|
|
15
|
+
- `WriteTransactionRequest` now accepts either inline `operations` or an `operationsS3Key` referencing a client-uploaded payload, supporting transactions larger than the request-body limit.
|
|
16
|
+
- `TransactionUploadTarget` type (`s3Key`, `presignedUploadUrl`, `expiresInSeconds`) returned by the transaction upload-target endpoint.
|
|
15
17
|
|
|
16
18
|
## [1.5.6] - 2026-04-29
|
|
17
19
|
|
|
@@ -11,16 +11,26 @@ export type DocumentOperation = {
|
|
|
11
11
|
elementId: string;
|
|
12
12
|
};
|
|
13
13
|
export type DocumentElementPatch = Partial<Omit<DocumentElement, 'id' | 'documentId'>>;
|
|
14
|
-
export
|
|
14
|
+
export type WriteTransactionRequest = {
|
|
15
15
|
clientTransactionId?: string;
|
|
16
|
+
} & ({
|
|
16
17
|
operations: DocumentOperation[];
|
|
17
|
-
|
|
18
|
+
operationsS3Key?: never;
|
|
19
|
+
} | {
|
|
20
|
+
operationsS3Key: string;
|
|
21
|
+
operations?: never;
|
|
22
|
+
});
|
|
18
23
|
export interface WriteTransactionResponse {
|
|
19
24
|
sequenceNumber: number;
|
|
20
25
|
createdOn: string;
|
|
21
26
|
createdById: string;
|
|
22
27
|
clientTransactionId?: string;
|
|
23
28
|
}
|
|
29
|
+
export interface TransactionUploadTarget {
|
|
30
|
+
s3Key: string;
|
|
31
|
+
presignedUploadUrl: string;
|
|
32
|
+
expiresInSeconds: number;
|
|
33
|
+
}
|
|
24
34
|
export type DocumentTransactionPayload = {
|
|
25
35
|
clientTransactionId?: string;
|
|
26
36
|
} & ({
|
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
|
+
"version": "1.6.0-alpha.document-transaction-consumer.2",
|
|
4
4
|
"description": "Documents library for contrail platform",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|