@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.40.1 - 2026-11-10
|
|
4
|
+
|
|
5
|
+
- Keep reviewer profile fields accessible in review conflicts while excluding them from standard error serialization.
|
|
6
|
+
- Document the server versions needed for the reviewer object and how to obtain the authenticated identity.
|
|
7
|
+
|
|
8
|
+
## 0.40.0 - 2026-11-10
|
|
9
|
+
|
|
10
|
+
- Accept an optional server-authenticated reviewer profile (first name, last name and email) on review decisions and preserve it in conflict metadata. Legacy reviewer strings remain supported.
|
|
11
|
+
|
|
3
12
|
## 0.39.0 - 2026-11-06
|
|
4
13
|
|
|
5
14
|
- Read per-node rule assignments and rule impact and update an existing assignment through Consumer Edge formula authoring.
|
package/README.md
CHANGED
|
@@ -582,11 +582,16 @@ This read is available before the first review and after final callback delivery
|
|
|
582
582
|
it never consumes the single-use final result or triggers pipelines/callbacks.
|
|
583
583
|
|
|
584
584
|
Requires Consumer's review routes and the compatible HITL Document API branch.
|
|
585
|
+
Use the reviewer object or omit `reviewer` only when Consumer Edge includes DOC-2577
|
|
586
|
+
and Document API includes DOC-2623. On earlier deployments, send a reviewer string
|
|
587
|
+
from the authenticated server session.
|
|
585
588
|
No pipelines are required. Start published manual formulas with `runFlowAsync`;
|
|
586
589
|
`AWAITING_REVIEW` is non-terminal. `runFlow` still waits for final completion and
|
|
587
590
|
retains its configured timeout, so do not hold an HTTP request open for human work.
|
|
588
591
|
|
|
589
592
|
```ts
|
|
593
|
+
// Read this profile from the server's authenticated session.
|
|
594
|
+
const { firstName, lastName, email } = authenticatedServerActor;
|
|
590
595
|
const scope = { organization: "your-organization", signal: controller.signal };
|
|
591
596
|
const { reviews, nextCursor } = await docmana.reviews.list({
|
|
592
597
|
...scope,
|
|
@@ -599,7 +604,7 @@ await docmana.reviews.decide(
|
|
|
599
604
|
{
|
|
600
605
|
decision: "continue",
|
|
601
606
|
version: task.version,
|
|
602
|
-
reviewer:
|
|
607
|
+
reviewer: { firstName, lastName, email },
|
|
603
608
|
corrections: [{ itemId: task.documents[0].items![0].itemId, value: false }],
|
|
604
609
|
},
|
|
605
610
|
scope,
|
package/dist/cli.mjs
CHANGED
|
@@ -620,12 +620,28 @@ function reviewConflictDetails(raw) {
|
|
|
620
620
|
const actor = isRecord(raw.decidedBy) ? raw.decidedBy : {};
|
|
621
621
|
const id = text(actor.id, 200);
|
|
622
622
|
const name = text(actor.name, 200);
|
|
623
|
+
const profile = {
|
|
624
|
+
firstName: text(actor.firstName, 200),
|
|
625
|
+
lastName: text(actor.lastName, 200),
|
|
626
|
+
email: text(actor.email, 200)
|
|
627
|
+
};
|
|
623
628
|
const source = actor.source === "integrator" || actor.source === "token" ? actor.source : null;
|
|
624
|
-
const decidedBy =
|
|
629
|
+
const decidedBy = [
|
|
630
|
+
id,
|
|
631
|
+
name,
|
|
632
|
+
...Object.values(profile),
|
|
633
|
+
source
|
|
634
|
+
].some((part) => part !== null) ? {
|
|
625
635
|
...id !== null ? { id } : {},
|
|
626
636
|
...name !== null ? { name } : {},
|
|
627
637
|
...source ? { source } : {}
|
|
628
638
|
} : null;
|
|
639
|
+
if (decidedBy) {
|
|
640
|
+
for (const [key, value] of Object.entries(profile)) {
|
|
641
|
+
if (value !== null)
|
|
642
|
+
Object.defineProperty(decidedBy, key, { value, writable: true, configurable: true });
|
|
643
|
+
}
|
|
644
|
+
}
|
|
629
645
|
const currentVersion = version(raw.currentVersion) ?? version(raw.version);
|
|
630
646
|
const decidedAt = text(raw.decidedAt, 40) ?? text(raw.submittedAt, 40);
|
|
631
647
|
return {
|