@aws-sdk/client-textract 3.315.0 → 3.316.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/dist-cjs/Textract.js +17 -182
- package/dist-es/Textract.js +17 -182
- package/dist-types/Textract.d.ts +22 -305
- package/dist-types/ts3.4/Textract.d.ts +2 -1
- package/package.json +6 -6
package/dist-cjs/Textract.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Textract = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const AnalyzeDocumentCommand_1 = require("./commands/AnalyzeDocumentCommand");
|
|
5
6
|
const AnalyzeExpenseCommand_1 = require("./commands/AnalyzeExpenseCommand");
|
|
6
7
|
const AnalyzeIDCommand_1 = require("./commands/AnalyzeIDCommand");
|
|
@@ -15,188 +16,22 @@ const StartDocumentTextDetectionCommand_1 = require("./commands/StartDocumentTex
|
|
|
15
16
|
const StartExpenseAnalysisCommand_1 = require("./commands/StartExpenseAnalysisCommand");
|
|
16
17
|
const StartLendingAnalysisCommand_1 = require("./commands/StartLendingAnalysisCommand");
|
|
17
18
|
const TextractClient_1 = require("./TextractClient");
|
|
19
|
+
const commands = {
|
|
20
|
+
AnalyzeDocumentCommand: AnalyzeDocumentCommand_1.AnalyzeDocumentCommand,
|
|
21
|
+
AnalyzeExpenseCommand: AnalyzeExpenseCommand_1.AnalyzeExpenseCommand,
|
|
22
|
+
AnalyzeIDCommand: AnalyzeIDCommand_1.AnalyzeIDCommand,
|
|
23
|
+
DetectDocumentTextCommand: DetectDocumentTextCommand_1.DetectDocumentTextCommand,
|
|
24
|
+
GetDocumentAnalysisCommand: GetDocumentAnalysisCommand_1.GetDocumentAnalysisCommand,
|
|
25
|
+
GetDocumentTextDetectionCommand: GetDocumentTextDetectionCommand_1.GetDocumentTextDetectionCommand,
|
|
26
|
+
GetExpenseAnalysisCommand: GetExpenseAnalysisCommand_1.GetExpenseAnalysisCommand,
|
|
27
|
+
GetLendingAnalysisCommand: GetLendingAnalysisCommand_1.GetLendingAnalysisCommand,
|
|
28
|
+
GetLendingAnalysisSummaryCommand: GetLendingAnalysisSummaryCommand_1.GetLendingAnalysisSummaryCommand,
|
|
29
|
+
StartDocumentAnalysisCommand: StartDocumentAnalysisCommand_1.StartDocumentAnalysisCommand,
|
|
30
|
+
StartDocumentTextDetectionCommand: StartDocumentTextDetectionCommand_1.StartDocumentTextDetectionCommand,
|
|
31
|
+
StartExpenseAnalysisCommand: StartExpenseAnalysisCommand_1.StartExpenseAnalysisCommand,
|
|
32
|
+
StartLendingAnalysisCommand: StartLendingAnalysisCommand_1.StartLendingAnalysisCommand,
|
|
33
|
+
};
|
|
18
34
|
class Textract extends TextractClient_1.TextractClient {
|
|
19
|
-
analyzeDocument(args, optionsOrCb, cb) {
|
|
20
|
-
const command = new AnalyzeDocumentCommand_1.AnalyzeDocumentCommand(args);
|
|
21
|
-
if (typeof optionsOrCb === "function") {
|
|
22
|
-
this.send(command, optionsOrCb);
|
|
23
|
-
}
|
|
24
|
-
else if (typeof cb === "function") {
|
|
25
|
-
if (typeof optionsOrCb !== "object")
|
|
26
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
27
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return this.send(command, optionsOrCb);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
analyzeExpense(args, optionsOrCb, cb) {
|
|
34
|
-
const command = new AnalyzeExpenseCommand_1.AnalyzeExpenseCommand(args);
|
|
35
|
-
if (typeof optionsOrCb === "function") {
|
|
36
|
-
this.send(command, optionsOrCb);
|
|
37
|
-
}
|
|
38
|
-
else if (typeof cb === "function") {
|
|
39
|
-
if (typeof optionsOrCb !== "object")
|
|
40
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
41
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return this.send(command, optionsOrCb);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
analyzeID(args, optionsOrCb, cb) {
|
|
48
|
-
const command = new AnalyzeIDCommand_1.AnalyzeIDCommand(args);
|
|
49
|
-
if (typeof optionsOrCb === "function") {
|
|
50
|
-
this.send(command, optionsOrCb);
|
|
51
|
-
}
|
|
52
|
-
else if (typeof cb === "function") {
|
|
53
|
-
if (typeof optionsOrCb !== "object")
|
|
54
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
55
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
return this.send(command, optionsOrCb);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
detectDocumentText(args, optionsOrCb, cb) {
|
|
62
|
-
const command = new DetectDocumentTextCommand_1.DetectDocumentTextCommand(args);
|
|
63
|
-
if (typeof optionsOrCb === "function") {
|
|
64
|
-
this.send(command, optionsOrCb);
|
|
65
|
-
}
|
|
66
|
-
else if (typeof cb === "function") {
|
|
67
|
-
if (typeof optionsOrCb !== "object")
|
|
68
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
69
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
return this.send(command, optionsOrCb);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
getDocumentAnalysis(args, optionsOrCb, cb) {
|
|
76
|
-
const command = new GetDocumentAnalysisCommand_1.GetDocumentAnalysisCommand(args);
|
|
77
|
-
if (typeof optionsOrCb === "function") {
|
|
78
|
-
this.send(command, optionsOrCb);
|
|
79
|
-
}
|
|
80
|
-
else if (typeof cb === "function") {
|
|
81
|
-
if (typeof optionsOrCb !== "object")
|
|
82
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
83
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
return this.send(command, optionsOrCb);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
getDocumentTextDetection(args, optionsOrCb, cb) {
|
|
90
|
-
const command = new GetDocumentTextDetectionCommand_1.GetDocumentTextDetectionCommand(args);
|
|
91
|
-
if (typeof optionsOrCb === "function") {
|
|
92
|
-
this.send(command, optionsOrCb);
|
|
93
|
-
}
|
|
94
|
-
else if (typeof cb === "function") {
|
|
95
|
-
if (typeof optionsOrCb !== "object")
|
|
96
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
97
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
return this.send(command, optionsOrCb);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
getExpenseAnalysis(args, optionsOrCb, cb) {
|
|
104
|
-
const command = new GetExpenseAnalysisCommand_1.GetExpenseAnalysisCommand(args);
|
|
105
|
-
if (typeof optionsOrCb === "function") {
|
|
106
|
-
this.send(command, optionsOrCb);
|
|
107
|
-
}
|
|
108
|
-
else if (typeof cb === "function") {
|
|
109
|
-
if (typeof optionsOrCb !== "object")
|
|
110
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
111
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
return this.send(command, optionsOrCb);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
getLendingAnalysis(args, optionsOrCb, cb) {
|
|
118
|
-
const command = new GetLendingAnalysisCommand_1.GetLendingAnalysisCommand(args);
|
|
119
|
-
if (typeof optionsOrCb === "function") {
|
|
120
|
-
this.send(command, optionsOrCb);
|
|
121
|
-
}
|
|
122
|
-
else if (typeof cb === "function") {
|
|
123
|
-
if (typeof optionsOrCb !== "object")
|
|
124
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
125
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
return this.send(command, optionsOrCb);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
getLendingAnalysisSummary(args, optionsOrCb, cb) {
|
|
132
|
-
const command = new GetLendingAnalysisSummaryCommand_1.GetLendingAnalysisSummaryCommand(args);
|
|
133
|
-
if (typeof optionsOrCb === "function") {
|
|
134
|
-
this.send(command, optionsOrCb);
|
|
135
|
-
}
|
|
136
|
-
else if (typeof cb === "function") {
|
|
137
|
-
if (typeof optionsOrCb !== "object")
|
|
138
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
139
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
return this.send(command, optionsOrCb);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
startDocumentAnalysis(args, optionsOrCb, cb) {
|
|
146
|
-
const command = new StartDocumentAnalysisCommand_1.StartDocumentAnalysisCommand(args);
|
|
147
|
-
if (typeof optionsOrCb === "function") {
|
|
148
|
-
this.send(command, optionsOrCb);
|
|
149
|
-
}
|
|
150
|
-
else if (typeof cb === "function") {
|
|
151
|
-
if (typeof optionsOrCb !== "object")
|
|
152
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
153
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
return this.send(command, optionsOrCb);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
startDocumentTextDetection(args, optionsOrCb, cb) {
|
|
160
|
-
const command = new StartDocumentTextDetectionCommand_1.StartDocumentTextDetectionCommand(args);
|
|
161
|
-
if (typeof optionsOrCb === "function") {
|
|
162
|
-
this.send(command, optionsOrCb);
|
|
163
|
-
}
|
|
164
|
-
else if (typeof cb === "function") {
|
|
165
|
-
if (typeof optionsOrCb !== "object")
|
|
166
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
167
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
return this.send(command, optionsOrCb);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
startExpenseAnalysis(args, optionsOrCb, cb) {
|
|
174
|
-
const command = new StartExpenseAnalysisCommand_1.StartExpenseAnalysisCommand(args);
|
|
175
|
-
if (typeof optionsOrCb === "function") {
|
|
176
|
-
this.send(command, optionsOrCb);
|
|
177
|
-
}
|
|
178
|
-
else if (typeof cb === "function") {
|
|
179
|
-
if (typeof optionsOrCb !== "object")
|
|
180
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
181
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
return this.send(command, optionsOrCb);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
startLendingAnalysis(args, optionsOrCb, cb) {
|
|
188
|
-
const command = new StartLendingAnalysisCommand_1.StartLendingAnalysisCommand(args);
|
|
189
|
-
if (typeof optionsOrCb === "function") {
|
|
190
|
-
this.send(command, optionsOrCb);
|
|
191
|
-
}
|
|
192
|
-
else if (typeof cb === "function") {
|
|
193
|
-
if (typeof optionsOrCb !== "object")
|
|
194
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
195
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
return this.send(command, optionsOrCb);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
35
|
}
|
|
202
36
|
exports.Textract = Textract;
|
|
37
|
+
(0, smithy_client_1.createAggregatedClient)(commands, Textract);
|
package/dist-es/Textract.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { AnalyzeDocumentCommand, } from "./commands/AnalyzeDocumentCommand";
|
|
2
3
|
import { AnalyzeExpenseCommand, } from "./commands/AnalyzeExpenseCommand";
|
|
3
4
|
import { AnalyzeIDCommand } from "./commands/AnalyzeIDCommand";
|
|
@@ -12,187 +13,21 @@ import { StartDocumentTextDetectionCommand, } from "./commands/StartDocumentText
|
|
|
12
13
|
import { StartExpenseAnalysisCommand, } from "./commands/StartExpenseAnalysisCommand";
|
|
13
14
|
import { StartLendingAnalysisCommand, } from "./commands/StartLendingAnalysisCommand";
|
|
14
15
|
import { TextractClient } from "./TextractClient";
|
|
16
|
+
const commands = {
|
|
17
|
+
AnalyzeDocumentCommand,
|
|
18
|
+
AnalyzeExpenseCommand,
|
|
19
|
+
AnalyzeIDCommand,
|
|
20
|
+
DetectDocumentTextCommand,
|
|
21
|
+
GetDocumentAnalysisCommand,
|
|
22
|
+
GetDocumentTextDetectionCommand,
|
|
23
|
+
GetExpenseAnalysisCommand,
|
|
24
|
+
GetLendingAnalysisCommand,
|
|
25
|
+
GetLendingAnalysisSummaryCommand,
|
|
26
|
+
StartDocumentAnalysisCommand,
|
|
27
|
+
StartDocumentTextDetectionCommand,
|
|
28
|
+
StartExpenseAnalysisCommand,
|
|
29
|
+
StartLendingAnalysisCommand,
|
|
30
|
+
};
|
|
15
31
|
export class Textract extends TextractClient {
|
|
16
|
-
analyzeDocument(args, optionsOrCb, cb) {
|
|
17
|
-
const command = new AnalyzeDocumentCommand(args);
|
|
18
|
-
if (typeof optionsOrCb === "function") {
|
|
19
|
-
this.send(command, optionsOrCb);
|
|
20
|
-
}
|
|
21
|
-
else if (typeof cb === "function") {
|
|
22
|
-
if (typeof optionsOrCb !== "object")
|
|
23
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
24
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
return this.send(command, optionsOrCb);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
analyzeExpense(args, optionsOrCb, cb) {
|
|
31
|
-
const command = new AnalyzeExpenseCommand(args);
|
|
32
|
-
if (typeof optionsOrCb === "function") {
|
|
33
|
-
this.send(command, optionsOrCb);
|
|
34
|
-
}
|
|
35
|
-
else if (typeof cb === "function") {
|
|
36
|
-
if (typeof optionsOrCb !== "object")
|
|
37
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
38
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return this.send(command, optionsOrCb);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
analyzeID(args, optionsOrCb, cb) {
|
|
45
|
-
const command = new AnalyzeIDCommand(args);
|
|
46
|
-
if (typeof optionsOrCb === "function") {
|
|
47
|
-
this.send(command, optionsOrCb);
|
|
48
|
-
}
|
|
49
|
-
else if (typeof cb === "function") {
|
|
50
|
-
if (typeof optionsOrCb !== "object")
|
|
51
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
52
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return this.send(command, optionsOrCb);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
detectDocumentText(args, optionsOrCb, cb) {
|
|
59
|
-
const command = new DetectDocumentTextCommand(args);
|
|
60
|
-
if (typeof optionsOrCb === "function") {
|
|
61
|
-
this.send(command, optionsOrCb);
|
|
62
|
-
}
|
|
63
|
-
else if (typeof cb === "function") {
|
|
64
|
-
if (typeof optionsOrCb !== "object")
|
|
65
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
66
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
return this.send(command, optionsOrCb);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
getDocumentAnalysis(args, optionsOrCb, cb) {
|
|
73
|
-
const command = new GetDocumentAnalysisCommand(args);
|
|
74
|
-
if (typeof optionsOrCb === "function") {
|
|
75
|
-
this.send(command, optionsOrCb);
|
|
76
|
-
}
|
|
77
|
-
else if (typeof cb === "function") {
|
|
78
|
-
if (typeof optionsOrCb !== "object")
|
|
79
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
80
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
return this.send(command, optionsOrCb);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
getDocumentTextDetection(args, optionsOrCb, cb) {
|
|
87
|
-
const command = new GetDocumentTextDetectionCommand(args);
|
|
88
|
-
if (typeof optionsOrCb === "function") {
|
|
89
|
-
this.send(command, optionsOrCb);
|
|
90
|
-
}
|
|
91
|
-
else if (typeof cb === "function") {
|
|
92
|
-
if (typeof optionsOrCb !== "object")
|
|
93
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
94
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
return this.send(command, optionsOrCb);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
getExpenseAnalysis(args, optionsOrCb, cb) {
|
|
101
|
-
const command = new GetExpenseAnalysisCommand(args);
|
|
102
|
-
if (typeof optionsOrCb === "function") {
|
|
103
|
-
this.send(command, optionsOrCb);
|
|
104
|
-
}
|
|
105
|
-
else if (typeof cb === "function") {
|
|
106
|
-
if (typeof optionsOrCb !== "object")
|
|
107
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
108
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
return this.send(command, optionsOrCb);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
getLendingAnalysis(args, optionsOrCb, cb) {
|
|
115
|
-
const command = new GetLendingAnalysisCommand(args);
|
|
116
|
-
if (typeof optionsOrCb === "function") {
|
|
117
|
-
this.send(command, optionsOrCb);
|
|
118
|
-
}
|
|
119
|
-
else if (typeof cb === "function") {
|
|
120
|
-
if (typeof optionsOrCb !== "object")
|
|
121
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
122
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
return this.send(command, optionsOrCb);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
getLendingAnalysisSummary(args, optionsOrCb, cb) {
|
|
129
|
-
const command = new GetLendingAnalysisSummaryCommand(args);
|
|
130
|
-
if (typeof optionsOrCb === "function") {
|
|
131
|
-
this.send(command, optionsOrCb);
|
|
132
|
-
}
|
|
133
|
-
else if (typeof cb === "function") {
|
|
134
|
-
if (typeof optionsOrCb !== "object")
|
|
135
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
136
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
return this.send(command, optionsOrCb);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
startDocumentAnalysis(args, optionsOrCb, cb) {
|
|
143
|
-
const command = new StartDocumentAnalysisCommand(args);
|
|
144
|
-
if (typeof optionsOrCb === "function") {
|
|
145
|
-
this.send(command, optionsOrCb);
|
|
146
|
-
}
|
|
147
|
-
else if (typeof cb === "function") {
|
|
148
|
-
if (typeof optionsOrCb !== "object")
|
|
149
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
150
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
return this.send(command, optionsOrCb);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
startDocumentTextDetection(args, optionsOrCb, cb) {
|
|
157
|
-
const command = new StartDocumentTextDetectionCommand(args);
|
|
158
|
-
if (typeof optionsOrCb === "function") {
|
|
159
|
-
this.send(command, optionsOrCb);
|
|
160
|
-
}
|
|
161
|
-
else if (typeof cb === "function") {
|
|
162
|
-
if (typeof optionsOrCb !== "object")
|
|
163
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
164
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
return this.send(command, optionsOrCb);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
startExpenseAnalysis(args, optionsOrCb, cb) {
|
|
171
|
-
const command = new StartExpenseAnalysisCommand(args);
|
|
172
|
-
if (typeof optionsOrCb === "function") {
|
|
173
|
-
this.send(command, optionsOrCb);
|
|
174
|
-
}
|
|
175
|
-
else if (typeof cb === "function") {
|
|
176
|
-
if (typeof optionsOrCb !== "object")
|
|
177
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
178
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
return this.send(command, optionsOrCb);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
startLendingAnalysis(args, optionsOrCb, cb) {
|
|
185
|
-
const command = new StartLendingAnalysisCommand(args);
|
|
186
|
-
if (typeof optionsOrCb === "function") {
|
|
187
|
-
this.send(command, optionsOrCb);
|
|
188
|
-
}
|
|
189
|
-
else if (typeof cb === "function") {
|
|
190
|
-
if (typeof optionsOrCb !== "object")
|
|
191
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
192
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
return this.send(command, optionsOrCb);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
32
|
}
|
|
33
|
+
createAggregatedClient(commands, Textract);
|
package/dist-types/Textract.d.ts
CHANGED
|
@@ -13,374 +13,91 @@ import { StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionComma
|
|
|
13
13
|
import { StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput } from "./commands/StartExpenseAnalysisCommand";
|
|
14
14
|
import { StartLendingAnalysisCommandInput, StartLendingAnalysisCommandOutput } from "./commands/StartLendingAnalysisCommand";
|
|
15
15
|
import { TextractClient } from "./TextractClient";
|
|
16
|
-
|
|
17
|
-
* @public
|
|
18
|
-
* <p>Amazon Textract detects and analyzes text in documents and converts it
|
|
19
|
-
* into machine-readable text. This is the API reference documentation for
|
|
20
|
-
* Amazon Textract.</p>
|
|
21
|
-
*/
|
|
22
|
-
export declare class Textract extends TextractClient {
|
|
16
|
+
export interface Textract {
|
|
23
17
|
/**
|
|
24
|
-
* @
|
|
25
|
-
* <p>Analyzes an input document for relationships between detected items. </p>
|
|
26
|
-
* <p>The types of information returned are as follows: </p>
|
|
27
|
-
* <ul>
|
|
28
|
-
* <li>
|
|
29
|
-
* <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
|
|
30
|
-
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
31
|
-
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
32
|
-
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
33
|
-
* the value.</p>
|
|
34
|
-
* </li>
|
|
35
|
-
* <li>
|
|
36
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
37
|
-
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
38
|
-
* a table.</p>
|
|
39
|
-
* </li>
|
|
40
|
-
* <li>
|
|
41
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
42
|
-
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
43
|
-
* document are returned (including text that doesn't have a relationship with the value
|
|
44
|
-
* of <code>FeatureTypes</code>). </p>
|
|
45
|
-
* </li>
|
|
46
|
-
* <li>
|
|
47
|
-
* <p>Signatures. A SIGNATURE <code>Block</code> object contains the location information
|
|
48
|
-
* of a signature in a document. If used in conjunction with forms or tables, a signature
|
|
49
|
-
* can be given a Key-Value pairing or be detected in the cell of a table.</p>
|
|
50
|
-
* </li>
|
|
51
|
-
* <li>
|
|
52
|
-
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
53
|
-
* associated Query results block object.</p>
|
|
54
|
-
* </li>
|
|
55
|
-
* <li>
|
|
56
|
-
* <p>Query Result. A QUERY_RESULT Block object contains the answer to the query and an
|
|
57
|
-
* ID that connects it to the query asked. This Block also contains a confidence
|
|
58
|
-
* score.</p>
|
|
59
|
-
* </li>
|
|
60
|
-
* </ul>
|
|
61
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
62
|
-
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
63
|
-
* information about a selection element, including the selection status.</p>
|
|
64
|
-
* <p>You can choose which type of analysis to perform by specifying the
|
|
65
|
-
* <code>FeatureTypes</code> list. </p>
|
|
66
|
-
* <p>The output is returned in a list of <code>Block</code> objects.</p>
|
|
67
|
-
* <p>
|
|
68
|
-
* <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
|
|
69
|
-
* asynchronously, use <a>StartDocumentAnalysis</a>.</p>
|
|
70
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
71
|
-
* Analysis</a>.</p>
|
|
18
|
+
* @see {@link AnalyzeDocumentCommand}
|
|
72
19
|
*/
|
|
73
20
|
analyzeDocument(args: AnalyzeDocumentCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeDocumentCommandOutput>;
|
|
74
21
|
analyzeDocument(args: AnalyzeDocumentCommandInput, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
75
22
|
analyzeDocument(args: AnalyzeDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
76
23
|
/**
|
|
77
|
-
* @
|
|
78
|
-
* <p>
|
|
79
|
-
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
80
|
-
* related relationships between text.</p>
|
|
81
|
-
* <p>Information is returned as <code>ExpenseDocuments</code> and seperated as
|
|
82
|
-
* follows:</p>
|
|
83
|
-
* <ul>
|
|
84
|
-
* <li>
|
|
85
|
-
* <p>
|
|
86
|
-
* <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
|
|
87
|
-
* store information about the lines of text, such as an item purchased and its price on
|
|
88
|
-
* a receipt.</p>
|
|
89
|
-
* </li>
|
|
90
|
-
* <li>
|
|
91
|
-
* <p>
|
|
92
|
-
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
93
|
-
* header information or the vendors name.</p>
|
|
94
|
-
* </li>
|
|
95
|
-
* </ul>
|
|
24
|
+
* @see {@link AnalyzeExpenseCommand}
|
|
96
25
|
*/
|
|
97
26
|
analyzeExpense(args: AnalyzeExpenseCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeExpenseCommandOutput>;
|
|
98
27
|
analyzeExpense(args: AnalyzeExpenseCommandInput, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
99
28
|
analyzeExpense(args: AnalyzeExpenseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
100
29
|
/**
|
|
101
|
-
* @
|
|
102
|
-
* <p>Analyzes identity documents for relevant information. This information is extracted and
|
|
103
|
-
* returned as <code>IdentityDocumentFields</code>, which records both the normalized field
|
|
104
|
-
* and value of the extracted text. Unlike other Amazon Textract operations,
|
|
105
|
-
* <code>AnalyzeID</code> doesn't return any Geometry data.</p>
|
|
30
|
+
* @see {@link AnalyzeIDCommand}
|
|
106
31
|
*/
|
|
107
32
|
analyzeID(args: AnalyzeIDCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeIDCommandOutput>;
|
|
108
33
|
analyzeID(args: AnalyzeIDCommandInput, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
109
34
|
analyzeID(args: AnalyzeIDCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
110
35
|
/**
|
|
111
|
-
* @
|
|
112
|
-
* <p>Detects text in the input document. Amazon Textract can detect lines of text and the
|
|
113
|
-
* words that make up a line of text. The input document must be in one of the following image
|
|
114
|
-
* formats: JPEG, PNG, PDF, or TIFF. <code>DetectDocumentText</code> returns the detected
|
|
115
|
-
* text in an array of <a>Block</a> objects. </p>
|
|
116
|
-
* <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
|
|
117
|
-
* is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
|
|
118
|
-
* a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
|
|
119
|
-
* <p>
|
|
120
|
-
* <code>DetectDocumentText</code> is a synchronous operation. To analyze documents
|
|
121
|
-
* asynchronously, use <a>StartDocumentTextDetection</a>.</p>
|
|
122
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html">Document Text Detection</a>.</p>
|
|
36
|
+
* @see {@link DetectDocumentTextCommand}
|
|
123
37
|
*/
|
|
124
38
|
detectDocumentText(args: DetectDocumentTextCommandInput, options?: __HttpHandlerOptions): Promise<DetectDocumentTextCommandOutput>;
|
|
125
39
|
detectDocumentText(args: DetectDocumentTextCommandInput, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
126
40
|
detectDocumentText(args: DetectDocumentTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
127
41
|
/**
|
|
128
|
-
* @
|
|
129
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
130
|
-
* document.</p>
|
|
131
|
-
* <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>,
|
|
132
|
-
* which returns a job identifier (<code>JobId</code>). When the text analysis operation
|
|
133
|
-
* finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic
|
|
134
|
-
* that's registered in the initial call to <code>StartDocumentAnalysis</code>. To get the
|
|
135
|
-
* results of the text-detection operation, first check that the status value published to the
|
|
136
|
-
* Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <code>GetDocumentAnalysis</code>, and
|
|
137
|
-
* pass the job identifier (<code>JobId</code>) from the initial call to
|
|
138
|
-
* <code>StartDocumentAnalysis</code>.</p>
|
|
139
|
-
* <p>
|
|
140
|
-
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
141
|
-
* The following types of information are returned: </p>
|
|
142
|
-
* <ul>
|
|
143
|
-
* <li>
|
|
144
|
-
* <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
|
|
145
|
-
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
146
|
-
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
147
|
-
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
148
|
-
* the value.</p>
|
|
149
|
-
* </li>
|
|
150
|
-
* <li>
|
|
151
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
152
|
-
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
153
|
-
* a table.</p>
|
|
154
|
-
* </li>
|
|
155
|
-
* <li>
|
|
156
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
157
|
-
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
158
|
-
* document are returned (including text that doesn't have a relationship with the value
|
|
159
|
-
* of the <code>StartDocumentAnalysis</code>
|
|
160
|
-
* <code>FeatureTypes</code> input parameter). </p>
|
|
161
|
-
* </li>
|
|
162
|
-
* <li>
|
|
163
|
-
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
164
|
-
* associated Query results block object.</p>
|
|
165
|
-
* </li>
|
|
166
|
-
* <li>
|
|
167
|
-
* <p>Query Results. A QUERY_RESULT Block object contains the answer to the query and an
|
|
168
|
-
* ID that connects it to the query asked. This Block also contains a confidence
|
|
169
|
-
* score.</p>
|
|
170
|
-
* </li>
|
|
171
|
-
* </ul>
|
|
172
|
-
* <note>
|
|
173
|
-
* <p>While processing a document with queries, look out for
|
|
174
|
-
* <code>INVALID_REQUEST_PARAMETERS</code> output. This indicates that either the per
|
|
175
|
-
* page query limit has been exceeded or that the operation is trying to query a page in
|
|
176
|
-
* the document which doesn’t exist. </p>
|
|
177
|
-
* </note>
|
|
178
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
179
|
-
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
180
|
-
* information about a selection element, including the selection status.</p>
|
|
181
|
-
* <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
|
|
182
|
-
* returned. If there are more results than specified in <code>MaxResults</code>, the value of
|
|
183
|
-
* <code>NextToken</code> in the operation response contains a pagination token for getting
|
|
184
|
-
* the next set of results. To get the next page of results, call
|
|
185
|
-
* <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
|
|
186
|
-
* parameter with the token value that's returned from the previous call to
|
|
187
|
-
* <code>GetDocumentAnalysis</code>.</p>
|
|
188
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
189
|
-
* Analysis</a>.</p>
|
|
42
|
+
* @see {@link GetDocumentAnalysisCommand}
|
|
190
43
|
*/
|
|
191
44
|
getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentAnalysisCommandOutput>;
|
|
192
45
|
getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void): void;
|
|
193
46
|
getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void): void;
|
|
194
47
|
/**
|
|
195
|
-
* @
|
|
196
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that detects text in a document.
|
|
197
|
-
* Amazon Textract can detect lines of text and the words that make up a line of text.</p>
|
|
198
|
-
* <p>You start asynchronous text detection by calling <a>StartDocumentTextDetection</a>, which returns a job identifier
|
|
199
|
-
* (<code>JobId</code>). When the text detection operation finishes, Amazon Textract publishes a
|
|
200
|
-
* completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
|
|
201
|
-
* <code>StartDocumentTextDetection</code>. To get the results of the text-detection
|
|
202
|
-
* operation, first check that the status value published to the Amazon SNS topic is
|
|
203
|
-
* <code>SUCCEEDED</code>. If so, call <code>GetDocumentTextDetection</code>, and pass the
|
|
204
|
-
* job identifier (<code>JobId</code>) from the initial call to
|
|
205
|
-
* <code>StartDocumentTextDetection</code>.</p>
|
|
206
|
-
* <p>
|
|
207
|
-
* <code>GetDocumentTextDetection</code> returns an array of <a>Block</a>
|
|
208
|
-
* objects. </p>
|
|
209
|
-
* <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
|
|
210
|
-
* is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
|
|
211
|
-
* a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
|
|
212
|
-
* <p>Use the MaxResults parameter to limit the number of blocks that are returned. If there
|
|
213
|
-
* are more results than specified in <code>MaxResults</code>, the value of
|
|
214
|
-
* <code>NextToken</code> in the operation response contains a pagination token for getting
|
|
215
|
-
* the next set of results. To get the next page of results, call
|
|
216
|
-
* <code>GetDocumentTextDetection</code>, and populate the <code>NextToken</code> request
|
|
217
|
-
* parameter with the token value that's returned from the previous call to
|
|
218
|
-
* <code>GetDocumentTextDetection</code>.</p>
|
|
219
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html">Document Text Detection</a>.</p>
|
|
48
|
+
* @see {@link GetDocumentTextDetectionCommand}
|
|
220
49
|
*/
|
|
221
50
|
getDocumentTextDetection(args: GetDocumentTextDetectionCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentTextDetectionCommandOutput>;
|
|
222
51
|
getDocumentTextDetection(args: GetDocumentTextDetectionCommandInput, cb: (err: any, data?: GetDocumentTextDetectionCommandOutput) => void): void;
|
|
223
52
|
getDocumentTextDetection(args: GetDocumentTextDetectionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentTextDetectionCommandOutput) => void): void;
|
|
224
53
|
/**
|
|
225
|
-
* @
|
|
226
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes invoices and
|
|
227
|
-
* receipts. Amazon Textract finds contact information, items purchased, and vendor name, from input
|
|
228
|
-
* invoices and receipts.</p>
|
|
229
|
-
* <p>You start asynchronous invoice/receipt analysis by calling <a>StartExpenseAnalysis</a>, which returns a job identifier (<code>JobId</code>). Upon
|
|
230
|
-
* completion of the invoice/receipt analysis, Amazon Textract publishes the completion status to the
|
|
231
|
-
* Amazon Simple Notification Service (Amazon SNS) topic. This topic must be registered in the initial call to
|
|
232
|
-
* <code>StartExpenseAnalysis</code>. To get the results of the invoice/receipt analysis operation,
|
|
233
|
-
* first ensure that the status value published to the Amazon SNS topic is <code>SUCCEEDED</code>. If so,
|
|
234
|
-
* call <code>GetExpenseAnalysis</code>, and pass the job identifier (<code>JobId</code>) from the
|
|
235
|
-
* initial call to <code>StartExpenseAnalysis</code>.</p>
|
|
236
|
-
* <p>Use the MaxResults parameter to limit the number of blocks that are returned. If there are
|
|
237
|
-
* more results than specified in <code>MaxResults</code>, the value of <code>NextToken</code> in
|
|
238
|
-
* the operation response contains a pagination token for getting the next set of results. To get
|
|
239
|
-
* the next page of results, call <code>GetExpenseAnalysis</code>, and populate the
|
|
240
|
-
* <code>NextToken</code> request parameter with the token value that's returned from the previous
|
|
241
|
-
* call to <code>GetExpenseAnalysis</code>.</p>
|
|
242
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/invoices-receipts.html">Analyzing Invoices and Receipts</a>.</p>
|
|
54
|
+
* @see {@link GetExpenseAnalysisCommand}
|
|
243
55
|
*/
|
|
244
56
|
getExpenseAnalysis(args: GetExpenseAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<GetExpenseAnalysisCommandOutput>;
|
|
245
57
|
getExpenseAnalysis(args: GetExpenseAnalysisCommandInput, cb: (err: any, data?: GetExpenseAnalysisCommandOutput) => void): void;
|
|
246
58
|
getExpenseAnalysis(args: GetExpenseAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetExpenseAnalysisCommandOutput) => void): void;
|
|
247
59
|
/**
|
|
248
|
-
* @
|
|
249
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
250
|
-
* lending document. </p>
|
|
251
|
-
* <p>You start asynchronous text analysis by calling <code>StartLendingAnalysis</code>,
|
|
252
|
-
* which returns a job identifier (<code>JobId</code>). When the text analysis operation
|
|
253
|
-
* finishes, Amazon Textract publishes a completion status to the Amazon Simple
|
|
254
|
-
* Notification Service (Amazon SNS) topic that's registered in the initial call to
|
|
255
|
-
* <code>StartLendingAnalysis</code>. </p>
|
|
256
|
-
* <p>To get the results of the text analysis operation, first check that the status value
|
|
257
|
-
* published to the Amazon SNS topic is SUCCEEDED. If so, call GetLendingAnalysis, and pass
|
|
258
|
-
* the job identifier (<code>JobId</code>) from the initial call to
|
|
259
|
-
* <code>StartLendingAnalysis</code>.</p>
|
|
60
|
+
* @see {@link GetLendingAnalysisCommand}
|
|
260
61
|
*/
|
|
261
62
|
getLendingAnalysis(args: GetLendingAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<GetLendingAnalysisCommandOutput>;
|
|
262
63
|
getLendingAnalysis(args: GetLendingAnalysisCommandInput, cb: (err: any, data?: GetLendingAnalysisCommandOutput) => void): void;
|
|
263
64
|
getLendingAnalysis(args: GetLendingAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetLendingAnalysisCommandOutput) => void): void;
|
|
264
65
|
/**
|
|
265
|
-
* @
|
|
266
|
-
* <p>Gets summarized results for the <code>StartLendingAnalysis</code> operation, which analyzes
|
|
267
|
-
* text in a lending document. The returned summary consists of information about documents grouped
|
|
268
|
-
* together by a common document type. Information like detected signatures, page numbers, and split
|
|
269
|
-
* documents is returned with respect to the type of grouped document. </p>
|
|
270
|
-
* <p>You start asynchronous text analysis by calling <code>StartLendingAnalysis</code>, which
|
|
271
|
-
* returns a job identifier (<code>JobId</code>). When the text analysis operation finishes, Amazon
|
|
272
|
-
* Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
|
|
273
|
-
* topic that's registered in the initial call to <code>StartLendingAnalysis</code>. </p>
|
|
274
|
-
* <p>To get the results of the text analysis operation, first check that the status value
|
|
275
|
-
* published to the Amazon SNS topic is SUCCEEDED. If so, call
|
|
276
|
-
* <code>GetLendingAnalysisSummary</code>, and pass the job identifier (<code>JobId</code>) from
|
|
277
|
-
* the initial call to <code>StartLendingAnalysis</code>.</p>
|
|
66
|
+
* @see {@link GetLendingAnalysisSummaryCommand}
|
|
278
67
|
*/
|
|
279
68
|
getLendingAnalysisSummary(args: GetLendingAnalysisSummaryCommandInput, options?: __HttpHandlerOptions): Promise<GetLendingAnalysisSummaryCommandOutput>;
|
|
280
69
|
getLendingAnalysisSummary(args: GetLendingAnalysisSummaryCommandInput, cb: (err: any, data?: GetLendingAnalysisSummaryCommandOutput) => void): void;
|
|
281
70
|
getLendingAnalysisSummary(args: GetLendingAnalysisSummaryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetLendingAnalysisSummaryCommandOutput) => void): void;
|
|
282
71
|
/**
|
|
283
|
-
* @
|
|
284
|
-
* <p>Starts the asynchronous analysis of an input document for relationships between detected
|
|
285
|
-
* items such as key-value pairs, tables, and selection elements.</p>
|
|
286
|
-
* <p>
|
|
287
|
-
* <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The
|
|
288
|
-
* documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
|
|
289
|
-
* of the document.
|
|
290
|
-
* </p>
|
|
291
|
-
* <p>
|
|
292
|
-
* <code>StartDocumentAnalysis</code> returns a job identifier
|
|
293
|
-
* (<code>JobId</code>) that you use to get the results of the operation. When text
|
|
294
|
-
* analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
|
|
295
|
-
* topic that you specify in <code>NotificationChannel</code>. To get the results of the text
|
|
296
|
-
* analysis operation, first check that the status value published to the Amazon SNS topic is
|
|
297
|
-
* <code>SUCCEEDED</code>. If so, call <a>GetDocumentAnalysis</a>, and pass
|
|
298
|
-
* the job identifier (<code>JobId</code>) from the initial call to
|
|
299
|
-
* <code>StartDocumentAnalysis</code>.</p>
|
|
300
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text Analysis</a>.</p>
|
|
72
|
+
* @see {@link StartDocumentAnalysisCommand}
|
|
301
73
|
*/
|
|
302
74
|
startDocumentAnalysis(args: StartDocumentAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<StartDocumentAnalysisCommandOutput>;
|
|
303
75
|
startDocumentAnalysis(args: StartDocumentAnalysisCommandInput, cb: (err: any, data?: StartDocumentAnalysisCommandOutput) => void): void;
|
|
304
76
|
startDocumentAnalysis(args: StartDocumentAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartDocumentAnalysisCommandOutput) => void): void;
|
|
305
77
|
/**
|
|
306
|
-
* @
|
|
307
|
-
* <p>Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of
|
|
308
|
-
* text and the words that make up a line of text.</p>
|
|
309
|
-
* <p>
|
|
310
|
-
* <code>StartDocumentTextDetection</code> can analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The
|
|
311
|
-
* documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
|
|
312
|
-
* of the document.
|
|
313
|
-
* </p>
|
|
314
|
-
* <p>
|
|
315
|
-
* <code>StartTextDetection</code> returns a job identifier
|
|
316
|
-
* (<code>JobId</code>) that you use to get the results of the operation. When text
|
|
317
|
-
* detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
|
|
318
|
-
* topic that you specify in <code>NotificationChannel</code>. To get the results of the text
|
|
319
|
-
* detection operation, first check that the status value published to the Amazon SNS topic is
|
|
320
|
-
* <code>SUCCEEDED</code>. If so, call <a>GetDocumentTextDetection</a>, and
|
|
321
|
-
* pass the job identifier (<code>JobId</code>) from the initial call to
|
|
322
|
-
* <code>StartDocumentTextDetection</code>.</p>
|
|
323
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html">Document Text Detection</a>.</p>
|
|
78
|
+
* @see {@link StartDocumentTextDetectionCommand}
|
|
324
79
|
*/
|
|
325
80
|
startDocumentTextDetection(args: StartDocumentTextDetectionCommandInput, options?: __HttpHandlerOptions): Promise<StartDocumentTextDetectionCommandOutput>;
|
|
326
81
|
startDocumentTextDetection(args: StartDocumentTextDetectionCommandInput, cb: (err: any, data?: StartDocumentTextDetectionCommandOutput) => void): void;
|
|
327
82
|
startDocumentTextDetection(args: StartDocumentTextDetectionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartDocumentTextDetectionCommandOutput) => void): void;
|
|
328
83
|
/**
|
|
329
|
-
* @
|
|
330
|
-
* <p>Starts the asynchronous analysis of invoices or receipts for data like contact information,
|
|
331
|
-
* items purchased, and vendor names.</p>
|
|
332
|
-
* <p>
|
|
333
|
-
* <code>StartExpenseAnalysis</code> can analyze text in documents that are in JPEG, PNG, and
|
|
334
|
-
* PDF format. The documents must be stored in an Amazon S3 bucket. Use the <a>DocumentLocation</a> parameter to specify the name of your S3 bucket and the name of the
|
|
335
|
-
* document in that bucket. </p>
|
|
336
|
-
* <p>
|
|
337
|
-
* <code>StartExpenseAnalysis</code> returns a job identifier (<code>JobId</code>) that you
|
|
338
|
-
* will provide to <code>GetExpenseAnalysis</code> to retrieve the results of the operation. When
|
|
339
|
-
* the analysis of the input invoices/receipts is finished, Amazon Textract publishes a completion
|
|
340
|
-
* status to the Amazon Simple Notification Service (Amazon SNS) topic that you provide to the <code>NotificationChannel</code>.
|
|
341
|
-
* To obtain the results of the invoice and receipt analysis operation, ensure that the status value
|
|
342
|
-
* published to the Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <a>GetExpenseAnalysis</a>, and pass the job identifier (<code>JobId</code>) that was
|
|
343
|
-
* returned by your call to <code>StartExpenseAnalysis</code>.</p>
|
|
344
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html">Analyzing Invoices and Receipts</a>.</p>
|
|
84
|
+
* @see {@link StartExpenseAnalysisCommand}
|
|
345
85
|
*/
|
|
346
86
|
startExpenseAnalysis(args: StartExpenseAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<StartExpenseAnalysisCommandOutput>;
|
|
347
87
|
startExpenseAnalysis(args: StartExpenseAnalysisCommandInput, cb: (err: any, data?: StartExpenseAnalysisCommandOutput) => void): void;
|
|
348
88
|
startExpenseAnalysis(args: StartExpenseAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartExpenseAnalysisCommandOutput) => void): void;
|
|
349
89
|
/**
|
|
350
|
-
* @
|
|
351
|
-
* <p>Starts the classification and analysis of an input document.
|
|
352
|
-
* <code>StartLendingAnalysis</code> initiates the classification and analysis of a packet of
|
|
353
|
-
* lending documents. <code>StartLendingAnalysis</code> operates on a document file located in an
|
|
354
|
-
* Amazon S3 bucket.</p>
|
|
355
|
-
* <p>
|
|
356
|
-
* <code>StartLendingAnalysis</code> can analyze text in documents that are in one of the
|
|
357
|
-
* following formats: JPEG, PNG, TIFF, PDF. Use <code>DocumentLocation</code> to specify the bucket
|
|
358
|
-
* name and the file name of the document. </p>
|
|
359
|
-
* <p>
|
|
360
|
-
* <code>StartLendingAnalysis</code> returns a job identifier (<code>JobId</code>) that you use
|
|
361
|
-
* to get the results of the operation. When the text analysis is finished, Amazon Textract
|
|
362
|
-
* publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that
|
|
363
|
-
* you specify in <code>NotificationChannel</code>. To get the results of the text analysis
|
|
364
|
-
* operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If
|
|
365
|
-
* the status is SUCCEEDED you can call either <code>GetLendingAnalysis</code> or
|
|
366
|
-
* <code>GetLendingAnalysisSummary</code> and provide the <code>JobId</code> to obtain the results
|
|
367
|
-
* of the analysis.</p>
|
|
368
|
-
* <p>If using <code>OutputConfig</code> to specify an Amazon S3 bucket, the output will be contained
|
|
369
|
-
* within the specified prefix in a directory labeled with the job-id. In the directory there are 3
|
|
370
|
-
* sub-directories: </p>
|
|
371
|
-
* <ul>
|
|
372
|
-
* <li>
|
|
373
|
-
* <p>detailedResponse (contains the GetLendingAnalysis response)</p>
|
|
374
|
-
* </li>
|
|
375
|
-
* <li>
|
|
376
|
-
* <p>summaryResponse (for the GetLendingAnalysisSummary response)</p>
|
|
377
|
-
* </li>
|
|
378
|
-
* <li>
|
|
379
|
-
* <p>splitDocuments (documents split across logical boundaries)</p>
|
|
380
|
-
* </li>
|
|
381
|
-
* </ul>
|
|
90
|
+
* @see {@link StartLendingAnalysisCommand}
|
|
382
91
|
*/
|
|
383
92
|
startLendingAnalysis(args: StartLendingAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<StartLendingAnalysisCommandOutput>;
|
|
384
93
|
startLendingAnalysis(args: StartLendingAnalysisCommandInput, cb: (err: any, data?: StartLendingAnalysisCommandOutput) => void): void;
|
|
385
94
|
startLendingAnalysis(args: StartLendingAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartLendingAnalysisCommandOutput) => void): void;
|
|
386
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @public
|
|
98
|
+
* <p>Amazon Textract detects and analyzes text in documents and converts it
|
|
99
|
+
* into machine-readable text. This is the API reference documentation for
|
|
100
|
+
* Amazon Textract.</p>
|
|
101
|
+
*/
|
|
102
|
+
export declare class Textract extends TextractClient implements Textract {
|
|
103
|
+
}
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
StartLendingAnalysisCommandOutput,
|
|
53
53
|
} from "./commands/StartLendingAnalysisCommand";
|
|
54
54
|
import { TextractClient } from "./TextractClient";
|
|
55
|
-
export
|
|
55
|
+
export interface Textract {
|
|
56
56
|
analyzeDocument(
|
|
57
57
|
args: AnalyzeDocumentCommandInput,
|
|
58
58
|
options?: __HttpHandlerOptions
|
|
@@ -223,3 +223,4 @@ export declare class Textract extends TextractClient {
|
|
|
223
223
|
cb: (err: any, data?: StartLendingAnalysisCommandOutput) => void
|
|
224
224
|
): void;
|
|
225
225
|
}
|
|
226
|
+
export declare class Textract extends TextractClient implements Textract {}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-textract",
|
|
3
3
|
"description": "AWS SDK for JavaScript Textract Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.316.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.316.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.316.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.316.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.316.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.316.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|