@aws-sdk/client-textract 3.312.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-cjs/protocols/Aws_json1_1.js +247 -822
- package/dist-es/Textract.js +17 -182
- package/dist-es/protocols/Aws_json1_1.js +248 -823
- 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);
|