@contrail/documents 1.5.6 → 1.6.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
CHANGED
|
@@ -7,6 +7,12 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.5.6] - 2026-04-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `DynamicTextUtil.getItemCount` now filters out component models missing both `item` and `color` to avoid errors when underlying models fail to fetch.
|
|
15
|
+
|
|
10
16
|
## [1.5.3] - 2026-04-22
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DocumentElement } from './document-element';
|
|
2
|
+
export type DocumentOperation = {
|
|
3
|
+
action: 'createElement';
|
|
4
|
+
element: DocumentElement;
|
|
5
|
+
} | {
|
|
6
|
+
action: 'updateElement';
|
|
7
|
+
elementId: string;
|
|
8
|
+
changes: Partial<DocumentElement>;
|
|
9
|
+
} | {
|
|
10
|
+
action: 'deleteElement';
|
|
11
|
+
elementId: string;
|
|
12
|
+
};
|
|
13
|
+
export interface DocumentTransactionMetadata {
|
|
14
|
+
sequenceNumber: number;
|
|
15
|
+
documentId: string;
|
|
16
|
+
createdOn: string;
|
|
17
|
+
createdById: string;
|
|
18
|
+
clientTransactionId?: string;
|
|
19
|
+
}
|
|
20
|
+
export type StoredPayload = {
|
|
21
|
+
operations: DocumentOperation[];
|
|
22
|
+
} | {
|
|
23
|
+
operationsS3Key: string;
|
|
24
|
+
};
|
|
25
|
+
export type ReadPayload = {
|
|
26
|
+
operations: DocumentOperation[];
|
|
27
|
+
} | {
|
|
28
|
+
operationsDownloadUrl: string;
|
|
29
|
+
};
|
|
30
|
+
export type DocumentTransactionRecord = DocumentTransactionMetadata & StoredPayload;
|
|
31
|
+
export type DocumentTransactionMessage = DocumentTransactionMetadata & ReadPayload;
|
|
32
|
+
export type WriteTransactionRequest = {
|
|
33
|
+
clientTransactionId?: string;
|
|
34
|
+
} & StoredPayload;
|
|
35
|
+
export interface WriteTransactionResponse {
|
|
36
|
+
sequenceNumber: number;
|
|
37
|
+
createdOn: string;
|
|
38
|
+
createdById: string;
|
|
39
|
+
clientTransactionId?: string;
|
|
40
|
+
}
|
package/lib/types/document.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface ImportReferenceDetail {
|
|
|
4
4
|
importedSlideReference?: string;
|
|
5
5
|
importedFileReference?: string;
|
|
6
6
|
}
|
|
7
|
+
export type DocumentWriteMode = 'legacy' | 'transactional';
|
|
7
8
|
export interface Document {
|
|
8
9
|
id?: string;
|
|
9
10
|
name?: string;
|
|
@@ -22,4 +23,5 @@ export interface Document {
|
|
|
22
23
|
};
|
|
23
24
|
clipContent?: boolean;
|
|
24
25
|
ownedByReference?: string;
|
|
26
|
+
writeMode?: DocumentWriteMode;
|
|
25
27
|
}
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/index.js
CHANGED
|
@@ -22,4 +22,5 @@ __exportStar(require("./document-element-holder"), exports);
|
|
|
22
22
|
__exportStar(require("./document-element"), exports);
|
|
23
23
|
__exportStar(require("./document-navigation-event"), exports);
|
|
24
24
|
__exportStar(require("./document"), exports);
|
|
25
|
+
__exportStar(require("./document-transaction"), exports);
|
|
25
26
|
__exportStar(require("./element-transformation"), exports);
|