@docmana/sdk 0.4.0 → 0.9.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 +39 -4
- package/README.md +101 -26
- package/dist/api/flow-definition.d.ts +3 -0
- package/dist/api/flow-metadata.d.ts +3 -0
- package/dist/api/list-flows.d.ts +3 -0
- package/dist/api/list-organizations.d.ts +3 -0
- package/dist/api/organization-documents.d.ts +7 -0
- package/dist/cli.mjs +894 -527
- package/dist/cli.mjs.map +1 -1
- package/dist/client.d.ts +12 -7
- package/dist/files/resolve-input.d.ts +1 -3
- package/dist/http/http-client.d.ts +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +186 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -59
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +86 -17
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -25,11 +25,19 @@ export interface TokenCache {
|
|
|
25
25
|
export interface PathFileInput {
|
|
26
26
|
path: string;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
export interface NamedFileInput {
|
|
29
|
+
data: Uint8Array | NodeJS.ReadableStream;
|
|
30
|
+
filename: string;
|
|
31
|
+
contentType?: string;
|
|
32
|
+
}
|
|
33
|
+
export type FileInput = string | PathFileInput | NamedFileInput;
|
|
34
|
+
export interface RunFlowParams {
|
|
35
|
+
files: FileInput[];
|
|
36
|
+
useDraftVersion?: boolean;
|
|
37
|
+
language?: string;
|
|
38
|
+
context?: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
export interface RunFlowOptions {
|
|
33
41
|
signal?: AbortSignal;
|
|
34
42
|
timeoutMs?: number;
|
|
35
43
|
pollIntervalMs?: number;
|
|
@@ -47,20 +55,81 @@ export interface RunFlowInput {
|
|
|
47
55
|
elapsedMs: number;
|
|
48
56
|
retryAfterMs: number;
|
|
49
57
|
}) => void;
|
|
50
|
-
useDraftVersion?: boolean;
|
|
51
|
-
language?: string;
|
|
52
|
-
context?: Record<string, unknown>;
|
|
53
58
|
}
|
|
54
|
-
export interface
|
|
55
|
-
file?: FileInput;
|
|
56
|
-
files?: FileInput[];
|
|
57
|
-
fileName?: string;
|
|
59
|
+
export interface RunFlowAsyncOptions {
|
|
58
60
|
signal?: AbortSignal;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
}
|
|
62
|
+
export interface RunFlowAsyncParams extends RunFlowParams {
|
|
63
|
+
/** URL Consumer will POST the completion result to (wire: `callbackUrl`). */
|
|
64
|
+
callbackUrl?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface FlowListItem {
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
state: string;
|
|
70
|
+
}
|
|
71
|
+
export interface AccessibleOrganization {
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
}
|
|
75
|
+
export interface OrganizationDocument {
|
|
76
|
+
path: string;
|
|
77
|
+
name: string;
|
|
78
|
+
size: number;
|
|
79
|
+
lastModified: string;
|
|
80
|
+
contentType?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface OrganizationDocumentsPayload {
|
|
83
|
+
configured: boolean;
|
|
84
|
+
documents: OrganizationDocument[];
|
|
85
|
+
}
|
|
86
|
+
export interface DownloadedOrganizationDocument {
|
|
87
|
+
bytes: Uint8Array;
|
|
88
|
+
filename: string;
|
|
89
|
+
contentType?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface FlowDocumentRequirement {
|
|
92
|
+
docId: string;
|
|
93
|
+
label: string;
|
|
94
|
+
required: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface FlowMetadata {
|
|
97
|
+
flowId: string;
|
|
98
|
+
name?: string;
|
|
99
|
+
contextSchema: Record<string, unknown>;
|
|
100
|
+
languages: string[];
|
|
101
|
+
minScore?: number;
|
|
102
|
+
documents: FlowDocumentRequirement[];
|
|
103
|
+
}
|
|
104
|
+
export interface FlowDefinitionField {
|
|
105
|
+
fieldKey: string;
|
|
106
|
+
path: string;
|
|
107
|
+
type?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface FlowDefinitionNodeMetadata {
|
|
110
|
+
title?: string;
|
|
111
|
+
uniqueName?: string;
|
|
112
|
+
assessmentType?: string;
|
|
113
|
+
scoreAssessment: boolean;
|
|
114
|
+
scoreAcceptanceThreshold?: number;
|
|
115
|
+
description?: string;
|
|
116
|
+
enabled?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface FlowDefinitionNode {
|
|
119
|
+
nodeId: string;
|
|
120
|
+
type: string;
|
|
121
|
+
label: string;
|
|
122
|
+
uniqueName?: string;
|
|
123
|
+
parentId?: string;
|
|
124
|
+
fields: FlowDefinitionField[];
|
|
125
|
+
metadata?: FlowDefinitionNodeMetadata;
|
|
126
|
+
}
|
|
127
|
+
export interface FlowDefinition {
|
|
128
|
+
flowId: string;
|
|
129
|
+
name?: string;
|
|
130
|
+
languages: string[];
|
|
131
|
+
minScore?: number;
|
|
132
|
+
nodes: FlowDefinitionNode[];
|
|
64
133
|
}
|
|
65
134
|
export type { DocmanaExecutionResult } from "./models/docmana-execution-result.model.js";
|
|
66
135
|
export type { DocmanaDocumentMapping } from "./models/docmana-document-mapping.model.js";
|