@docmana/sdk 0.9.0 → 0.9.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/README.md CHANGED
@@ -103,7 +103,7 @@ use `RunFlowParams` for request data:
103
103
  - `listOrganizations()` calls `GET /v1/organizations` and returns
104
104
  `{ id, name }[]` for the organizations available to the Bearer token.
105
105
  - `getFlowMetadata(flowId)` calls `GET /v1/flows/:flowId/metadata` and returns
106
- `{ flowId, name?, contextSchema, languages, minScore?, documents }`.
106
+ `{ flowId, name?, jsonContextSchema, languages, minScore?, documents }`.
107
107
  - `getFlowDefinition(flowId)` calls `GET /v1/flows/:flowId/definition` and
108
108
  returns the normalized flow definition `{ flowId, name?, languages, minScore?, nodes }`.
109
109
  - `listOrganizationDocuments({ prefix? })` calls
@@ -140,14 +140,14 @@ console.log(organizations.map((org) => `${org.id}: ${org.name}`).join("\n"));
140
140
 
141
141
  ```ts
142
142
  const metadata = await docmana.getFlowMetadata("<flow-id>");
143
- console.log(metadata.contextSchema);
143
+ console.log(metadata.jsonContextSchema);
144
144
 
145
145
  const definition = await docmana.getFlowDefinition("<flow-id>");
146
146
  console.log(definition.nodes.map((node) => node.label).join("\n"));
147
147
  ```
148
148
 
149
149
  ```ts
150
- const depot = await docmana.listOrganizationDocuments({ prefix: "dossier/" });
150
+ const depot = await docmana.listOrganizationDocuments({ prefix: "folder/" });
151
151
  if (depot.configured) {
152
152
  const file = await docmana.downloadOrganizationDocument(depot.documents[0].path);
153
153
  console.log(file.filename, file.bytes.byteLength);
@@ -217,9 +217,9 @@ docmana organization list
217
217
 
218
218
  ```bash
219
219
  DOCMANA_API_URL="https://consumer.example.com/v1"
220
- docmana organization document list --prefix "dossier/"
221
- docmana organization document download "dossier/facture.pdf"
222
- docmana organization document download "dossier/facture.pdf" --output "./facture.pdf"
220
+ docmana organization document list --prefix "folder/"
221
+ docmana organization document download "folder/invoice.pdf"
222
+ docmana organization document download "folder/invoice.pdf" --output "./invoice.pdf"
223
223
  ```
224
224
 
225
225
  ```bash
@@ -239,7 +239,7 @@ You can also run without the cache:
239
239
  docmana flow run "<flow-id>" \
240
240
  --api-url "https://consumer.example.com/v1" \
241
241
  --access-token "$DOCMANA_ACCESS_TOKEN" \
242
- --files "./contract.pdf,./annexe.pdf" \
242
+ --files "./contract.pdf,./appendix.pdf" \
243
243
  --draft \
244
244
  --json
245
245
  ```
package/dist/types.d.ts CHANGED
@@ -96,7 +96,7 @@ export interface FlowDocumentRequirement {
96
96
  export interface FlowMetadata {
97
97
  flowId: string;
98
98
  name?: string;
99
- contextSchema: Record<string, unknown>;
99
+ jsonContextSchema: Record<string, unknown>;
100
100
  languages: string[];
101
101
  minScore?: number;
102
102
  documents: FlowDocumentRequirement[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docmana/sdk",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Official Docmana SDK — run document-analysis flows with a single call.",
5
5
  "license": "MIT",
6
6
  "type": "module",