@docmana/sdk 0.39.0 → 0.40.1
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 +9 -0
- package/README.md +6 -1
- package/dist/cli.mjs +17 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/errors.d.ts +4 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/dist/reviews.d.ts +11 -1
- package/package.json +1 -1
package/dist/errors.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { DocmanaExecutionResult } from "./models/docmana-execution-result.model.js";
|
|
2
2
|
import type { FraudDetectionError, FraudDetectionResult } from "./types.js";
|
|
3
|
+
import type { ReviewReviewerIdentity } from "./reviews.js";
|
|
3
4
|
/** Whitelisted metadata returned by Consumer Edge for a review HTTP 409. */
|
|
4
5
|
export interface ReviewConflictDetails {
|
|
5
6
|
currentVersion?: number | null;
|
|
6
|
-
|
|
7
|
+
/** Profile fields are non-enumerable. Read them directly before copying or serializing. */
|
|
8
|
+
decidedBy?: (ReviewReviewerIdentity & {
|
|
7
9
|
id?: string;
|
|
8
10
|
name?: string;
|
|
9
11
|
source?: "integrator" | "token";
|
|
10
|
-
} | null;
|
|
12
|
+
}) | null;
|
|
11
13
|
decidedAt?: string | null;
|
|
12
14
|
/** @deprecated Use currentVersion. Retained for existing SDK consumers. */
|
|
13
15
|
version: number | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export type { ExecutionProgress, VirtualDocument, PhysicalDocument, DocumentCont
|
|
|
10
10
|
export { Reviews } from "./reviews.js";
|
|
11
11
|
export { ExecutionEvents, EXECUTION_NODE_EVENT_TYPES, parseExecutionEventCallback, verifyExecutionEventCallback, } from "./execution-events.js";
|
|
12
12
|
export type { ExecutionNodeEvent, ExecutionEventCallback, ExecutionEventsPage, } from "./execution-events.js";
|
|
13
|
-
export type { ReviewCalculation, ReviewFlowOutline, ReviewItem, DocumentPreviewManifest, ReviewDocument, ReviewAssessment, ReviewFinding, ReviewTask, ReviewStep, ReviewSummary, ReviewDecision, ReviewReadOptions, ReviewDocumentOptions, ReviewLocation, ReviewLocationsResponse, } from "./reviews.js";
|
|
13
|
+
export type { ReviewCalculation, ReviewFlowOutline, ReviewItem, DocumentPreviewManifest, ReviewDocument, ReviewAssessment, ReviewFinding, ReviewTask, ReviewStep, ReviewSummary, ReviewDecision, ReviewReviewerIdentity, ReviewReadOptions, ReviewDocumentOptions, ReviewLocation, ReviewLocationsResponse, } from "./reviews.js";
|
package/dist/index.js
CHANGED
|
@@ -701,12 +701,28 @@ function reviewConflictDetails(raw) {
|
|
|
701
701
|
const actor = isRecord(raw.decidedBy) ? raw.decidedBy : {};
|
|
702
702
|
const id = text(actor.id, 200);
|
|
703
703
|
const name = text(actor.name, 200);
|
|
704
|
+
const profile = {
|
|
705
|
+
firstName: text(actor.firstName, 200),
|
|
706
|
+
lastName: text(actor.lastName, 200),
|
|
707
|
+
email: text(actor.email, 200)
|
|
708
|
+
};
|
|
704
709
|
const source = actor.source === "integrator" || actor.source === "token" ? actor.source : null;
|
|
705
|
-
const decidedBy =
|
|
710
|
+
const decidedBy = [
|
|
711
|
+
id,
|
|
712
|
+
name,
|
|
713
|
+
...Object.values(profile),
|
|
714
|
+
source
|
|
715
|
+
].some((part) => part !== null) ? {
|
|
706
716
|
...id !== null ? { id } : {},
|
|
707
717
|
...name !== null ? { name } : {},
|
|
708
718
|
...source ? { source } : {}
|
|
709
719
|
} : null;
|
|
720
|
+
if (decidedBy) {
|
|
721
|
+
for (const [key, value] of Object.entries(profile)) {
|
|
722
|
+
if (value !== null)
|
|
723
|
+
Object.defineProperty(decidedBy, key, { value, writable: true, configurable: true });
|
|
724
|
+
}
|
|
725
|
+
}
|
|
710
726
|
const currentVersion = version(raw.currentVersion) ?? version(raw.version);
|
|
711
727
|
const decidedAt = text(raw.decidedAt, 40) ?? text(raw.submittedAt, 40);
|
|
712
728
|
return {
|