@docmana/sdk 0.38.0 → 0.40.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 +8 -0
- package/README.md +4 -1
- package/dist/authoring.d.ts +20 -0
- package/dist/cli.mjs +28 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/errors.d.ts +3 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +28 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -1
- package/dist/index.mjs.map +1 -1
- package/dist/reviews.d.ts +7 -1
- package/package.json +1 -1
package/dist/errors.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
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
|
-
decidedBy?: {
|
|
7
|
+
decidedBy?: (ReviewReviewerIdentity & {
|
|
7
8
|
id?: string;
|
|
8
9
|
name?: string;
|
|
9
10
|
source?: "integrator" | "token";
|
|
10
|
-
} | null;
|
|
11
|
+
}) | null;
|
|
11
12
|
decidedAt?: string | null;
|
|
12
13
|
/** @deprecated Use currentVersion. Retained for existing SDK consumers. */
|
|
13
14
|
version: number | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ export { REVIEW_EVENT_TYPES, parseReviewEventCallback, verifyReviewEventCallback
|
|
|
3
3
|
export type { ReviewEventCallback, ReviewEventType } from "./review-events.js";
|
|
4
4
|
export { FormulaAuthoring } from "./authoring.js";
|
|
5
5
|
export type { ReviewConflictDetails } from "./errors.js";
|
|
6
|
-
export type { AuthoringDocumentTrialNode, AuthoringDocumentTrialSpec, AuthoringDocumentTrialReport, AuthoringSource, AuthoringGitPublication, AuthoringGitProjection, AuthoringPublication, AuthoringConversation, AuthoringConversationInput, AuthoringConversationContext, AuthoringConversationTurn, AuthoringData, AuthoringNode, AuthoringEdge, AuthoringRevisions, AuthoringFlowSummary, AuthoringSnapshot, AuthoringChanges, AuthoringDraft, AuthoringCreate, AuthoringReceipt, AuthoringOptions, AuthoringEditorCatalog, AuthoringPageOptions, } from "./authoring.js";
|
|
6
|
+
export type { AuthoringDocumentTrialNode, AuthoringDocumentTrialSpec, AuthoringDocumentTrialReport, AuthoringSource, AuthoringGitPublication, AuthoringGitProjection, AuthoringPublication, AuthoringConversation, AuthoringConversationInput, AuthoringConversationContext, AuthoringConversationTurn, AuthoringData, AuthoringNode, AuthoringEdge, AuthoringRevisions, AuthoringFlowSummary, AuthoringSnapshot, AuthoringRuleImpact, AuthoringChanges, AuthoringDraft, AuthoringCreate, AuthoringReceipt, AuthoringOptions, AuthoringEditorCatalog, AuthoringPageOptions, } from "./authoring.js";
|
|
7
7
|
export { DocmanaError, DocmanaAuthError, DocmanaRequestError, DocmanaPayloadTooLargeError, DocmanaPermissionError, DocmanaNotFoundError, DocmanaExecutionError, DocmanaFraudDetectionError, DocmanaTimeoutError, DocmanaAbortError, DocmanaServiceUnavailableError, } from "./errors.js";
|
|
8
8
|
export type { AccessibleOrganization, DownloadedOrganizationDocument, DocmanaConfig, FlowDefinition, FlowDefinitionField, FlowDefinitionNode, FlowDefinitionNodeMetadata, FlowDocumentRequirement, FlowListItem, FlowMetadata, FraudDetectionAccepted, FraudDetectionAsyncOptions, FraudDetectionBaseParams, FraudDetectionError, FraudDetectionFileParams, FraudDetectionOptions, FraudDetectionParams, FraudDetectionProcessor, FraudDetectionResult, FraudDetectionStatus, FraudDetectionStatusResult, FraudDetectionSummary, FraudDetectionUrlParams, FraudDetectionVerdict, FraudFinding, FraudFindingLocation, FraudFindingSeverity, FraudSeverityCounts, OrganizationDocument, OrganizationDocumentsPayload, PartialExecutionFlowVersion, PartialExecutionMetadata, PartialExecutionScope, RunFlowAsyncParams, RunFlowAsyncOptions, RunFlowOptions, RunFlowParams, RunPartialFlowAsyncParams, RunPartialFlowOptions, RunPartialFlowParams, FileInput, NamedFileInput, PathFileInput, DocmanaExecutionResult, DocmanaExecutionVerdict, ExecutionStatus, DocmanaDocumentMapping, DocmanaSourceDocument, DocmanaDocumentResult, DocmanaNodeResult, DocmanaScoreNodeResult, DocmanaCrossValidationResult, DocmanaConclusionResult, DocmanaClassificationResult, DocmanaMetadataExtractionResult, DocmanaExtractionResult, DocmanaGrounding, DocmanaGroundingEvidence, DocmanaGroundingField, DocmanaGroundingTool, GroundingBox, GroundingOrigin, DocmanaValidationResult, DocmanaPreprocessingResult, } from "./types.js";
|
|
9
9
|
export type { ExecutionProgress, VirtualDocument, PhysicalDocument, DocumentContent, FlowNodeType, FlowConfigs, FlowNode, FlowEdge, Flow, NodeTranslationResult, DocmanaApiExecutionResult, DocmanaApiNodeResult, DocmanaApiDocumentExecutionResult, DocmanaApiDocumentRequest, DocmanaApiPreprocessDocumentResult, } from "./models/index.js";
|
|
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
|
@@ -180,6 +180,20 @@ var FormulaAuthoring = class {
|
|
|
180
180
|
get(id, options) {
|
|
181
181
|
return this.request("GET", `flows/${identity(id)}`, options);
|
|
182
182
|
}
|
|
183
|
+
registrySnapshot(id, options) {
|
|
184
|
+
return this.request("GET", `flows/${identity(id)}/rule-registry`, options);
|
|
185
|
+
}
|
|
186
|
+
ruleImpact(id, ruleId, options) {
|
|
187
|
+
return this.request("POST", `flows/${identity(id)}/rules/${identity(ruleId)}/impact`, options);
|
|
188
|
+
}
|
|
189
|
+
setRuleAssignment(id, ruleId, nodeId, body, options) {
|
|
190
|
+
return this.request(
|
|
191
|
+
"PATCH",
|
|
192
|
+
`flows/${identity(id)}/rules/${identity(ruleId)}/assignments/${identity(nodeId)}`,
|
|
193
|
+
options,
|
|
194
|
+
body
|
|
195
|
+
);
|
|
196
|
+
}
|
|
183
197
|
create(body, options) {
|
|
184
198
|
return this.request("POST", "flows", options, body);
|
|
185
199
|
}
|
|
@@ -687,10 +701,23 @@ function reviewConflictDetails(raw) {
|
|
|
687
701
|
const actor = isRecord(raw.decidedBy) ? raw.decidedBy : {};
|
|
688
702
|
const id = text(actor.id, 200);
|
|
689
703
|
const name = text(actor.name, 200);
|
|
704
|
+
const firstName = text(actor.firstName, 200);
|
|
705
|
+
const lastName = text(actor.lastName, 200);
|
|
706
|
+
const email = text(actor.email, 200);
|
|
690
707
|
const source = actor.source === "integrator" || actor.source === "token" ? actor.source : null;
|
|
691
|
-
const decidedBy =
|
|
708
|
+
const decidedBy = [
|
|
709
|
+
id,
|
|
710
|
+
name,
|
|
711
|
+
firstName,
|
|
712
|
+
lastName,
|
|
713
|
+
email,
|
|
714
|
+
source
|
|
715
|
+
].some((part) => part !== null) ? {
|
|
692
716
|
...id !== null ? { id } : {},
|
|
693
717
|
...name !== null ? { name } : {},
|
|
718
|
+
...firstName !== null ? { firstName } : {},
|
|
719
|
+
...lastName !== null ? { lastName } : {},
|
|
720
|
+
...email !== null ? { email } : {},
|
|
694
721
|
...source ? { source } : {}
|
|
695
722
|
} : null;
|
|
696
723
|
const currentVersion = version(raw.currentVersion) ?? version(raw.version);
|