@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.
Files changed (90) hide show
  1. package/README.md +103 -7
  2. package/dist-cjs/Textract.js +24 -0
  3. package/dist-cjs/commands/CreateAdapterCommand.js +51 -0
  4. package/dist-cjs/commands/CreateAdapterVersionCommand.js +51 -0
  5. package/dist-cjs/commands/DeleteAdapterCommand.js +51 -0
  6. package/dist-cjs/commands/DeleteAdapterVersionCommand.js +51 -0
  7. package/dist-cjs/commands/GetAdapterCommand.js +51 -0
  8. package/dist-cjs/commands/GetAdapterVersionCommand.js +51 -0
  9. package/dist-cjs/commands/ListAdapterVersionsCommand.js +51 -0
  10. package/dist-cjs/commands/ListAdaptersCommand.js +51 -0
  11. package/dist-cjs/commands/ListTagsForResourceCommand.js +51 -0
  12. package/dist-cjs/commands/TagResourceCommand.js +51 -0
  13. package/dist-cjs/commands/UntagResourceCommand.js +51 -0
  14. package/dist-cjs/commands/UpdateAdapterCommand.js +51 -0
  15. package/dist-cjs/commands/index.js +12 -0
  16. package/dist-cjs/index.js +1 -0
  17. package/dist-cjs/models/models_0.js +92 -21
  18. package/dist-cjs/pagination/Interfaces.js +2 -0
  19. package/dist-cjs/pagination/ListAdapterVersionsPaginator.js +29 -0
  20. package/dist-cjs/pagination/ListAdaptersPaginator.js +29 -0
  21. package/dist-cjs/pagination/index.js +6 -0
  22. package/dist-cjs/protocols/Aws_json1_1.js +951 -40
  23. package/dist-es/Textract.js +24 -0
  24. package/dist-es/commands/CreateAdapterCommand.js +47 -0
  25. package/dist-es/commands/CreateAdapterVersionCommand.js +47 -0
  26. package/dist-es/commands/DeleteAdapterCommand.js +47 -0
  27. package/dist-es/commands/DeleteAdapterVersionCommand.js +47 -0
  28. package/dist-es/commands/GetAdapterCommand.js +47 -0
  29. package/dist-es/commands/GetAdapterVersionCommand.js +47 -0
  30. package/dist-es/commands/ListAdapterVersionsCommand.js +47 -0
  31. package/dist-es/commands/ListAdaptersCommand.js +47 -0
  32. package/dist-es/commands/ListTagsForResourceCommand.js +47 -0
  33. package/dist-es/commands/TagResourceCommand.js +47 -0
  34. package/dist-es/commands/UntagResourceCommand.js +47 -0
  35. package/dist-es/commands/UpdateAdapterCommand.js +47 -0
  36. package/dist-es/commands/index.js +12 -0
  37. package/dist-es/index.js +1 -0
  38. package/dist-es/models/models_0.js +84 -17
  39. package/dist-es/pagination/Interfaces.js +1 -0
  40. package/dist-es/pagination/ListAdapterVersionsPaginator.js +25 -0
  41. package/dist-es/pagination/ListAdaptersPaginator.js +25 -0
  42. package/dist-es/pagination/index.js +3 -0
  43. package/dist-es/protocols/Aws_json1_1.js +927 -40
  44. package/dist-types/Textract.d.ts +84 -0
  45. package/dist-types/TextractClient.d.ts +14 -2
  46. package/dist-types/commands/AnalyzeDocumentCommand.d.ts +11 -0
  47. package/dist-types/commands/CreateAdapterCommand.d.ts +128 -0
  48. package/dist-types/commands/CreateAdapterVersionCommand.d.ts +148 -0
  49. package/dist-types/commands/DeleteAdapterCommand.d.ts +101 -0
  50. package/dist-types/commands/DeleteAdapterVersionCommand.d.ts +103 -0
  51. package/dist-types/commands/GetAdapterCommand.d.ts +111 -0
  52. package/dist-types/commands/GetAdapterVersionCommand.d.ts +140 -0
  53. package/dist-types/commands/ListAdapterVersionsCommand.d.ts +116 -0
  54. package/dist-types/commands/ListAdaptersCommand.d.ts +110 -0
  55. package/dist-types/commands/ListTagsForResourceCommand.d.ts +102 -0
  56. package/dist-types/commands/StartDocumentAnalysisCommand.d.ts +11 -0
  57. package/dist-types/commands/TagResourceCommand.d.ts +104 -0
  58. package/dist-types/commands/UntagResourceCommand.d.ts +101 -0
  59. package/dist-types/commands/UpdateAdapterCommand.d.ts +114 -0
  60. package/dist-types/commands/index.d.ts +12 -0
  61. package/dist-types/index.d.ts +1 -0
  62. package/dist-types/models/models_0.d.ts +986 -171
  63. package/dist-types/pagination/Interfaces.d.ts +8 -0
  64. package/dist-types/pagination/ListAdapterVersionsPaginator.d.ts +7 -0
  65. package/dist-types/pagination/ListAdaptersPaginator.d.ts +7 -0
  66. package/dist-types/pagination/index.d.ts +3 -0
  67. package/dist-types/protocols/Aws_json1_1.d.ts +108 -0
  68. package/dist-types/ts3.4/Textract.d.ts +204 -0
  69. package/dist-types/ts3.4/TextractClient.d.ts +74 -2
  70. package/dist-types/ts3.4/commands/CreateAdapterCommand.d.ts +38 -0
  71. package/dist-types/ts3.4/commands/CreateAdapterVersionCommand.d.ts +42 -0
  72. package/dist-types/ts3.4/commands/DeleteAdapterCommand.d.ts +38 -0
  73. package/dist-types/ts3.4/commands/DeleteAdapterVersionCommand.d.ts +42 -0
  74. package/dist-types/ts3.4/commands/GetAdapterCommand.d.ts +35 -0
  75. package/dist-types/ts3.4/commands/GetAdapterVersionCommand.d.ts +39 -0
  76. package/dist-types/ts3.4/commands/ListAdapterVersionsCommand.d.ts +39 -0
  77. package/dist-types/ts3.4/commands/ListAdaptersCommand.d.ts +35 -0
  78. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
  79. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
  80. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
  81. package/dist-types/ts3.4/commands/UpdateAdapterCommand.d.ts +38 -0
  82. package/dist-types/ts3.4/commands/index.d.ts +12 -0
  83. package/dist-types/ts3.4/index.d.ts +1 -0
  84. package/dist-types/ts3.4/models/models_0.d.ts +237 -40
  85. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  86. package/dist-types/ts3.4/pagination/ListAdapterVersionsPaginator.d.ts +11 -0
  87. package/dist-types/ts3.4/pagination/ListAdaptersPaginator.d.ts +11 -0
  88. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  89. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +144 -0
  90. package/package.json +34 -32
package/dist-es/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./TextractClient";
2
2
  export * from "./Textract";
3
3
  export * from "./commands";
4
+ export * from "./pagination";
4
5
  export * from "./models";
5
6
  export { TextractServiceException } from "./models/TextractServiceException";
@@ -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 JobStatus = {
216
- FAILED: "FAILED",
217
- IN_PROGRESS: "IN_PROGRESS",
218
- PARTIAL_SUCCESS: "PARTIAL_SUCCESS",
219
- SUCCEEDED: "SUCCEEDED",
222
+ export const AutoUpdate = {
223
+ DISABLED: "DISABLED",
224
+ ENABLED: "ENABLED",
220
225
  };
221
- export class InvalidJobIdException extends __BaseException {
226
+ export class ConflictException extends __BaseException {
222
227
  constructor(opts) {
223
228
  super({
224
- name: "InvalidJobIdException",
229
+ name: "ConflictException",
225
230
  $fault: "client",
226
231
  ...opts,
227
232
  });
228
- this.name = "InvalidJobIdException";
233
+ this.name = "ConflictException";
229
234
  this.$fault = "client";
230
- Object.setPrototypeOf(this, InvalidJobIdException.prototype);
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 IdempotentParameterMismatchException extends __BaseException {
310
+ export class ResourceNotFoundException extends __BaseException {
250
311
  constructor(opts) {
251
312
  super({
252
- name: "IdempotentParameterMismatchException",
313
+ name: "ResourceNotFoundException",
253
314
  $fault: "client",
254
315
  ...opts,
255
316
  });
256
- this.name = "IdempotentParameterMismatchException";
317
+ this.name = "ResourceNotFoundException";
257
318
  this.$fault = "client";
258
- Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype);
319
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
259
320
  this.Message = opts.Message;
260
321
  this.Code = opts.Code;
261
322
  }
262
323
  }
263
- export class LimitExceededException extends __BaseException {
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: "LimitExceededException",
333
+ name: "InvalidJobIdException",
267
334
  $fault: "client",
268
335
  ...opts,
269
336
  });
270
- this.name = "LimitExceededException";
337
+ this.name = "InvalidJobIdException";
271
338
  this.$fault = "client";
272
- Object.setPrototypeOf(this, LimitExceededException.prototype);
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
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./Interfaces";
2
+ export * from "./ListAdapterVersionsPaginator";
3
+ export * from "./ListAdaptersPaginator";