@aws-sdk/client-textract 3.427.0 → 3.428.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/README.md +103 -7
- package/dist-cjs/Textract.js +24 -0
- package/dist-cjs/commands/CreateAdapterCommand.js +51 -0
- package/dist-cjs/commands/CreateAdapterVersionCommand.js +51 -0
- package/dist-cjs/commands/DeleteAdapterCommand.js +51 -0
- package/dist-cjs/commands/DeleteAdapterVersionCommand.js +51 -0
- package/dist-cjs/commands/GetAdapterCommand.js +51 -0
- package/dist-cjs/commands/GetAdapterVersionCommand.js +51 -0
- package/dist-cjs/commands/ListAdapterVersionsCommand.js +51 -0
- package/dist-cjs/commands/ListAdaptersCommand.js +51 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +51 -0
- package/dist-cjs/commands/TagResourceCommand.js +51 -0
- package/dist-cjs/commands/UntagResourceCommand.js +51 -0
- package/dist-cjs/commands/UpdateAdapterCommand.js +51 -0
- package/dist-cjs/commands/index.js +12 -0
- package/dist-cjs/index.js +1 -0
- package/dist-cjs/models/models_0.js +92 -21
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListAdapterVersionsPaginator.js +29 -0
- package/dist-cjs/pagination/ListAdaptersPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_json1_1.js +951 -40
- package/dist-es/Textract.js +24 -0
- package/dist-es/commands/CreateAdapterCommand.js +47 -0
- package/dist-es/commands/CreateAdapterVersionCommand.js +47 -0
- package/dist-es/commands/DeleteAdapterCommand.js +47 -0
- package/dist-es/commands/DeleteAdapterVersionCommand.js +47 -0
- package/dist-es/commands/GetAdapterCommand.js +47 -0
- package/dist-es/commands/GetAdapterVersionCommand.js +47 -0
- package/dist-es/commands/ListAdapterVersionsCommand.js +47 -0
- package/dist-es/commands/ListAdaptersCommand.js +47 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +47 -0
- package/dist-es/commands/TagResourceCommand.js +47 -0
- package/dist-es/commands/UntagResourceCommand.js +47 -0
- package/dist-es/commands/UpdateAdapterCommand.js +47 -0
- package/dist-es/commands/index.js +12 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/models_0.js +84 -17
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAdapterVersionsPaginator.js +25 -0
- package/dist-es/pagination/ListAdaptersPaginator.js +25 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_json1_1.js +927 -40
- package/dist-types/Textract.d.ts +84 -0
- package/dist-types/TextractClient.d.ts +14 -2
- package/dist-types/commands/AnalyzeDocumentCommand.d.ts +11 -0
- package/dist-types/commands/CreateAdapterCommand.d.ts +128 -0
- package/dist-types/commands/CreateAdapterVersionCommand.d.ts +148 -0
- package/dist-types/commands/DeleteAdapterCommand.d.ts +101 -0
- package/dist-types/commands/DeleteAdapterVersionCommand.d.ts +103 -0
- package/dist-types/commands/GetAdapterCommand.d.ts +111 -0
- package/dist-types/commands/GetAdapterVersionCommand.d.ts +140 -0
- package/dist-types/commands/ListAdapterVersionsCommand.d.ts +116 -0
- package/dist-types/commands/ListAdaptersCommand.d.ts +110 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +102 -0
- package/dist-types/commands/StartDocumentAnalysisCommand.d.ts +11 -0
- package/dist-types/commands/TagResourceCommand.d.ts +104 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +101 -0
- package/dist-types/commands/UpdateAdapterCommand.d.ts +114 -0
- package/dist-types/commands/index.d.ts +12 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +986 -171
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAdapterVersionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListAdaptersPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +108 -0
- package/dist-types/ts3.4/Textract.d.ts +204 -0
- package/dist-types/ts3.4/TextractClient.d.ts +74 -2
- package/dist-types/ts3.4/commands/CreateAdapterCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateAdapterVersionCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteAdapterCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteAdapterVersionCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetAdapterCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetAdapterVersionCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListAdapterVersionsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListAdaptersCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateAdapterCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +12 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +237 -40
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAdapterVersionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListAdaptersPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +144 -0
- package/package.json +34 -32
package/dist-es/index.js
CHANGED
|
@@ -20,6 +20,13 @@ export const FeatureType = {
|
|
|
20
20
|
SIGNATURES: "SIGNATURES",
|
|
21
21
|
TABLES: "TABLES",
|
|
22
22
|
};
|
|
23
|
+
export const AdapterVersionStatus = {
|
|
24
|
+
ACTIVE: "ACTIVE",
|
|
25
|
+
AT_RISK: "AT_RISK",
|
|
26
|
+
CREATION_ERROR: "CREATION_ERROR",
|
|
27
|
+
CREATION_IN_PROGRESS: "CREATION_IN_PROGRESS",
|
|
28
|
+
DEPRECATED: "DEPRECATED",
|
|
29
|
+
};
|
|
23
30
|
export const ContentClassifier = {
|
|
24
31
|
FREE_OF_ADULT_CONTENT: "FreeOfAdultContent",
|
|
25
32
|
FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation",
|
|
@@ -212,22 +219,76 @@ export class UnsupportedDocumentException extends __BaseException {
|
|
|
212
219
|
export const ValueType = {
|
|
213
220
|
DATE: "DATE",
|
|
214
221
|
};
|
|
215
|
-
export const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
PARTIAL_SUCCESS: "PARTIAL_SUCCESS",
|
|
219
|
-
SUCCEEDED: "SUCCEEDED",
|
|
222
|
+
export const AutoUpdate = {
|
|
223
|
+
DISABLED: "DISABLED",
|
|
224
|
+
ENABLED: "ENABLED",
|
|
220
225
|
};
|
|
221
|
-
export class
|
|
226
|
+
export class ConflictException extends __BaseException {
|
|
222
227
|
constructor(opts) {
|
|
223
228
|
super({
|
|
224
|
-
name: "
|
|
229
|
+
name: "ConflictException",
|
|
225
230
|
$fault: "client",
|
|
226
231
|
...opts,
|
|
227
232
|
});
|
|
228
|
-
this.name = "
|
|
233
|
+
this.name = "ConflictException";
|
|
229
234
|
this.$fault = "client";
|
|
230
|
-
Object.setPrototypeOf(this,
|
|
235
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
236
|
+
this.Message = opts.Message;
|
|
237
|
+
this.Code = opts.Code;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export class IdempotentParameterMismatchException extends __BaseException {
|
|
241
|
+
constructor(opts) {
|
|
242
|
+
super({
|
|
243
|
+
name: "IdempotentParameterMismatchException",
|
|
244
|
+
$fault: "client",
|
|
245
|
+
...opts,
|
|
246
|
+
});
|
|
247
|
+
this.name = "IdempotentParameterMismatchException";
|
|
248
|
+
this.$fault = "client";
|
|
249
|
+
Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype);
|
|
250
|
+
this.Message = opts.Message;
|
|
251
|
+
this.Code = opts.Code;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export class LimitExceededException extends __BaseException {
|
|
255
|
+
constructor(opts) {
|
|
256
|
+
super({
|
|
257
|
+
name: "LimitExceededException",
|
|
258
|
+
$fault: "client",
|
|
259
|
+
...opts,
|
|
260
|
+
});
|
|
261
|
+
this.name = "LimitExceededException";
|
|
262
|
+
this.$fault = "client";
|
|
263
|
+
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
264
|
+
this.Message = opts.Message;
|
|
265
|
+
this.Code = opts.Code;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
269
|
+
constructor(opts) {
|
|
270
|
+
super({
|
|
271
|
+
name: "ServiceQuotaExceededException",
|
|
272
|
+
$fault: "client",
|
|
273
|
+
...opts,
|
|
274
|
+
});
|
|
275
|
+
this.name = "ServiceQuotaExceededException";
|
|
276
|
+
this.$fault = "client";
|
|
277
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
278
|
+
this.Message = opts.Message;
|
|
279
|
+
this.Code = opts.Code;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
export class ValidationException extends __BaseException {
|
|
283
|
+
constructor(opts) {
|
|
284
|
+
super({
|
|
285
|
+
name: "ValidationException",
|
|
286
|
+
$fault: "client",
|
|
287
|
+
...opts,
|
|
288
|
+
});
|
|
289
|
+
this.name = "ValidationException";
|
|
290
|
+
this.$fault = "client";
|
|
291
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
231
292
|
this.Message = opts.Message;
|
|
232
293
|
this.Code = opts.Code;
|
|
233
294
|
}
|
|
@@ -246,30 +307,36 @@ export class InvalidKMSKeyException extends __BaseException {
|
|
|
246
307
|
this.Code = opts.Code;
|
|
247
308
|
}
|
|
248
309
|
}
|
|
249
|
-
export class
|
|
310
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
250
311
|
constructor(opts) {
|
|
251
312
|
super({
|
|
252
|
-
name: "
|
|
313
|
+
name: "ResourceNotFoundException",
|
|
253
314
|
$fault: "client",
|
|
254
315
|
...opts,
|
|
255
316
|
});
|
|
256
|
-
this.name = "
|
|
317
|
+
this.name = "ResourceNotFoundException";
|
|
257
318
|
this.$fault = "client";
|
|
258
|
-
Object.setPrototypeOf(this,
|
|
319
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
259
320
|
this.Message = opts.Message;
|
|
260
321
|
this.Code = opts.Code;
|
|
261
322
|
}
|
|
262
323
|
}
|
|
263
|
-
export
|
|
324
|
+
export const JobStatus = {
|
|
325
|
+
FAILED: "FAILED",
|
|
326
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
327
|
+
PARTIAL_SUCCESS: "PARTIAL_SUCCESS",
|
|
328
|
+
SUCCEEDED: "SUCCEEDED",
|
|
329
|
+
};
|
|
330
|
+
export class InvalidJobIdException extends __BaseException {
|
|
264
331
|
constructor(opts) {
|
|
265
332
|
super({
|
|
266
|
-
name: "
|
|
333
|
+
name: "InvalidJobIdException",
|
|
267
334
|
$fault: "client",
|
|
268
335
|
...opts,
|
|
269
336
|
});
|
|
270
|
-
this.name = "
|
|
337
|
+
this.name = "InvalidJobIdException";
|
|
271
338
|
this.$fault = "client";
|
|
272
|
-
Object.setPrototypeOf(this,
|
|
339
|
+
Object.setPrototypeOf(this, InvalidJobIdException.prototype);
|
|
273
340
|
this.Message = opts.Message;
|
|
274
341
|
this.Code = opts.Code;
|
|
275
342
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListAdapterVersionsCommand, } from "../commands/ListAdapterVersionsCommand";
|
|
2
|
+
import { TextractClient } from "../TextractClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListAdapterVersionsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListAdapterVersions(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof TextractClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected Textract | TextractClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListAdaptersCommand, } from "../commands/ListAdaptersCommand";
|
|
2
|
+
import { TextractClient } from "../TextractClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListAdaptersCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListAdapters(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof TextractClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected Textract | TextractClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|