@docmana/sdk 0.12.0 → 0.13.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
@@ -1,22 +1,29 @@
1
- # Changelog
2
-
3
- ## 0.12.0
4
- - Add `--context <json>` to `docmana flow run`, parsed as a JSON object and
5
- passed through to `runFlow` as `RunFlowParams.context`.
6
- - Return CLI usage errors when `--context` is invalid JSON or is not a JSON
7
- object.
8
-
9
- ## 0.11.0
10
- - Normalize execution statuses to uppercase SDK values:
11
- `PENDING`, `RUNNING`, `INCOMPLETED`, `COMPLETED`, and `FAILED`.
12
- - Normalize raw API and polling statuses before checking terminal or failed
13
- states, so legacy mixed-case values still map consistently.
14
- - Rename flow metadata `contextSchema` to `jsonContextSchema` in the public
15
- `FlowMetadata` shape and README examples.
16
-
17
- ## 0.10.0
18
- - Add an optional `organization` to flow selection, emitted as a
19
- `?organization=<org>` query param on the request to
1
+ # Changelog
2
+
3
+ ## 0.13.0
4
+ - Add normalized execution metrics to `DocmanaExecutionResult`:
5
+ `flowId`, `totalDocuments`, `totalPages`, `totalTokens`, `totalMana`, and
6
+ `totalRunningTime`.
7
+ - Add node-level execution metrics to mapped node results: `runningTime` and
8
+ `mana`.
9
+
10
+ ## 0.12.0
11
+ - Add `--context <json>` to `docmana flow run`, parsed as a JSON object and
12
+ passed through to `runFlow` as `RunFlowParams.context`.
13
+ - Return CLI usage errors when `--context` is invalid JSON or is not a JSON
14
+ object.
15
+
16
+ ## 0.11.0
17
+ - Normalize execution statuses to uppercase SDK values:
18
+ `PENDING`, `RUNNING`, `INCOMPLETED`, `COMPLETED`, and `FAILED`.
19
+ - Normalize raw API and polling statuses before checking terminal or failed
20
+ states, so legacy mixed-case values still map consistently.
21
+ - Rename flow metadata `contextSchema` to `jsonContextSchema` in the public
22
+ `FlowMetadata` shape and README examples.
23
+
24
+ ## 0.10.0
25
+ - Add an optional `organization` to flow selection, emitted as a
26
+ `?organization=<org>` query param on the request to
20
27
  `docmana-consumer-edge-api`. Purely additive — existing calls are unchanged.
21
28
  - `listFlows({ organization })`, `getFlowMetadata(flowId, { organization })`,
22
29
  and `getFlowDefinition(flowId, { organization })` accept the option.
@@ -12,6 +12,7 @@ export interface DocmanaApiExecutionResult {
12
12
  results?: DocmanaApiDocumentExecutionResult[];
13
13
  restructured_documents?: VirtualDocument[];
14
14
  execution_id?: string;
15
+ flowId?: string;
15
16
  total_running_time?: number;
16
17
  total_running_time_node?: number;
17
18
  total_tokens?: number;
@@ -19,6 +20,7 @@ export interface DocmanaApiExecutionResult {
19
20
  total_output_tokens?: number;
20
21
  total_documents?: number;
21
22
  total_pages?: number;
23
+ total_mana?: number | null;
22
24
  event_timestamp?: string;
23
25
  [key: string]: unknown;
24
26
  }
@@ -5,6 +5,12 @@ import { DocmanaConclusionResult } from "./docmana-conclusion-result.model.js";
5
5
  export interface DocmanaExecutionResult {
6
6
  status: string;
7
7
  executionId: string;
8
+ flowId?: string;
9
+ totalDocuments?: number;
10
+ totalPages?: number;
11
+ totalTokens?: number;
12
+ totalMana?: number;
13
+ totalRunningTime?: number;
8
14
  errors?: string[];
9
15
  documents: {
10
16
  mappings: DocmanaDocumentMapping[];
@@ -1,5 +1,7 @@
1
1
  export interface DocmanaNodeResult {
2
2
  status: string;
3
+ runningTime?: number;
4
+ mana?: number;
3
5
  errors?: string[];
4
6
  /** Human-readable rationale (language-specific). Returned for every node. */
5
7
  feedback?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docmana/sdk",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Official Docmana SDK — run document-analysis flows with a single call.",
5
5
  "license": "MIT",
6
6
  "type": "module",