@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
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListTagsForResourceCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const types_1 = require("@smithy/types");
9
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
+ class ListTagsForResourceCommand extends smithy_client_1.Command {
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ constructor(input) {
20
+ super();
21
+ this.input = input;
22
+ }
23
+ resolveMiddleware(clientStack, configuration, options) {
24
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()));
26
+ const stack = clientStack.concat(this.middlewareStack);
27
+ const { logger } = configuration;
28
+ const clientName = "TextractClient";
29
+ const commandName = "ListTagsForResourceCommand";
30
+ const handlerExecutionContext = {
31
+ logger,
32
+ clientName,
33
+ commandName,
34
+ inputFilterSensitiveLog: (_) => _,
35
+ outputFilterSensitiveLog: (_) => _,
36
+ [types_1.SMITHY_CONTEXT_KEY]: {
37
+ service: "Textract",
38
+ operation: "ListTagsForResource",
39
+ },
40
+ };
41
+ const { requestHandler } = configuration;
42
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
+ }
44
+ serialize(input, context) {
45
+ return (0, Aws_json1_1_1.se_ListTagsForResourceCommand)(input, context);
46
+ }
47
+ deserialize(output, context) {
48
+ return (0, Aws_json1_1_1.de_ListTagsForResourceCommand)(output, context);
49
+ }
50
+ }
51
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TagResourceCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const types_1 = require("@smithy/types");
9
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
+ class TagResourceCommand extends smithy_client_1.Command {
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ constructor(input) {
20
+ super();
21
+ this.input = input;
22
+ }
23
+ resolveMiddleware(clientStack, configuration, options) {
24
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, TagResourceCommand.getEndpointParameterInstructions()));
26
+ const stack = clientStack.concat(this.middlewareStack);
27
+ const { logger } = configuration;
28
+ const clientName = "TextractClient";
29
+ const commandName = "TagResourceCommand";
30
+ const handlerExecutionContext = {
31
+ logger,
32
+ clientName,
33
+ commandName,
34
+ inputFilterSensitiveLog: (_) => _,
35
+ outputFilterSensitiveLog: (_) => _,
36
+ [types_1.SMITHY_CONTEXT_KEY]: {
37
+ service: "Textract",
38
+ operation: "TagResource",
39
+ },
40
+ };
41
+ const { requestHandler } = configuration;
42
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
+ }
44
+ serialize(input, context) {
45
+ return (0, Aws_json1_1_1.se_TagResourceCommand)(input, context);
46
+ }
47
+ deserialize(output, context) {
48
+ return (0, Aws_json1_1_1.de_TagResourceCommand)(output, context);
49
+ }
50
+ }
51
+ exports.TagResourceCommand = TagResourceCommand;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UntagResourceCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const types_1 = require("@smithy/types");
9
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
+ class UntagResourceCommand extends smithy_client_1.Command {
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ constructor(input) {
20
+ super();
21
+ this.input = input;
22
+ }
23
+ resolveMiddleware(clientStack, configuration, options) {
24
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UntagResourceCommand.getEndpointParameterInstructions()));
26
+ const stack = clientStack.concat(this.middlewareStack);
27
+ const { logger } = configuration;
28
+ const clientName = "TextractClient";
29
+ const commandName = "UntagResourceCommand";
30
+ const handlerExecutionContext = {
31
+ logger,
32
+ clientName,
33
+ commandName,
34
+ inputFilterSensitiveLog: (_) => _,
35
+ outputFilterSensitiveLog: (_) => _,
36
+ [types_1.SMITHY_CONTEXT_KEY]: {
37
+ service: "Textract",
38
+ operation: "UntagResource",
39
+ },
40
+ };
41
+ const { requestHandler } = configuration;
42
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
+ }
44
+ serialize(input, context) {
45
+ return (0, Aws_json1_1_1.se_UntagResourceCommand)(input, context);
46
+ }
47
+ deserialize(output, context) {
48
+ return (0, Aws_json1_1_1.de_UntagResourceCommand)(output, context);
49
+ }
50
+ }
51
+ exports.UntagResourceCommand = UntagResourceCommand;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateAdapterCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const types_1 = require("@smithy/types");
9
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
+ class UpdateAdapterCommand extends smithy_client_1.Command {
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ constructor(input) {
20
+ super();
21
+ this.input = input;
22
+ }
23
+ resolveMiddleware(clientStack, configuration, options) {
24
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateAdapterCommand.getEndpointParameterInstructions()));
26
+ const stack = clientStack.concat(this.middlewareStack);
27
+ const { logger } = configuration;
28
+ const clientName = "TextractClient";
29
+ const commandName = "UpdateAdapterCommand";
30
+ const handlerExecutionContext = {
31
+ logger,
32
+ clientName,
33
+ commandName,
34
+ inputFilterSensitiveLog: (_) => _,
35
+ outputFilterSensitiveLog: (_) => _,
36
+ [types_1.SMITHY_CONTEXT_KEY]: {
37
+ service: "Textract",
38
+ operation: "UpdateAdapter",
39
+ },
40
+ };
41
+ const { requestHandler } = configuration;
42
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
+ }
44
+ serialize(input, context) {
45
+ return (0, Aws_json1_1_1.se_UpdateAdapterCommand)(input, context);
46
+ }
47
+ deserialize(output, context) {
48
+ return (0, Aws_json1_1_1.de_UpdateAdapterCommand)(output, context);
49
+ }
50
+ }
51
+ exports.UpdateAdapterCommand = UpdateAdapterCommand;
@@ -4,13 +4,25 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./AnalyzeDocumentCommand"), exports);
5
5
  tslib_1.__exportStar(require("./AnalyzeExpenseCommand"), exports);
6
6
  tslib_1.__exportStar(require("./AnalyzeIDCommand"), exports);
7
+ tslib_1.__exportStar(require("./CreateAdapterCommand"), exports);
8
+ tslib_1.__exportStar(require("./CreateAdapterVersionCommand"), exports);
9
+ tslib_1.__exportStar(require("./DeleteAdapterCommand"), exports);
10
+ tslib_1.__exportStar(require("./DeleteAdapterVersionCommand"), exports);
7
11
  tslib_1.__exportStar(require("./DetectDocumentTextCommand"), exports);
12
+ tslib_1.__exportStar(require("./GetAdapterCommand"), exports);
13
+ tslib_1.__exportStar(require("./GetAdapterVersionCommand"), exports);
8
14
  tslib_1.__exportStar(require("./GetDocumentAnalysisCommand"), exports);
9
15
  tslib_1.__exportStar(require("./GetDocumentTextDetectionCommand"), exports);
10
16
  tslib_1.__exportStar(require("./GetExpenseAnalysisCommand"), exports);
11
17
  tslib_1.__exportStar(require("./GetLendingAnalysisCommand"), exports);
12
18
  tslib_1.__exportStar(require("./GetLendingAnalysisSummaryCommand"), exports);
19
+ tslib_1.__exportStar(require("./ListAdapterVersionsCommand"), exports);
20
+ tslib_1.__exportStar(require("./ListAdaptersCommand"), exports);
21
+ tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
13
22
  tslib_1.__exportStar(require("./StartDocumentAnalysisCommand"), exports);
14
23
  tslib_1.__exportStar(require("./StartDocumentTextDetectionCommand"), exports);
15
24
  tslib_1.__exportStar(require("./StartExpenseAnalysisCommand"), exports);
16
25
  tslib_1.__exportStar(require("./StartLendingAnalysisCommand"), exports);
26
+ tslib_1.__exportStar(require("./TagResourceCommand"), exports);
27
+ tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
28
+ tslib_1.__exportStar(require("./UpdateAdapterCommand"), exports);
package/dist-cjs/index.js CHANGED
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./TextractClient"), exports);
6
6
  tslib_1.__exportStar(require("./Textract"), exports);
7
7
  tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./pagination"), exports);
8
9
  tslib_1.__exportStar(require("./models"), exports);
9
10
  var TextractServiceException_1 = require("./models/TextractServiceException");
10
11
  Object.defineProperty(exports, "TextractServiceException", { enumerable: true, get: function () { return TextractServiceException_1.TextractServiceException; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LimitExceededException = exports.IdempotentParameterMismatchException = exports.InvalidKMSKeyException = exports.InvalidJobIdException = exports.JobStatus = exports.ValueType = exports.UnsupportedDocumentException = exports.ThrottlingException = exports.ProvisionedThroughputExceededException = exports.InvalidS3ObjectException = exports.InvalidParameterException = exports.InternalServerError = exports.HumanLoopQuotaExceededException = exports.DocumentTooLargeException = exports.BadDocumentException = exports.TextType = exports.SelectionStatus = exports.RelationshipType = exports.EntityType = exports.BlockType = exports.ContentClassifier = exports.FeatureType = exports.AccessDeniedException = void 0;
3
+ exports.InvalidJobIdException = exports.JobStatus = exports.ResourceNotFoundException = exports.InvalidKMSKeyException = exports.ValidationException = exports.ServiceQuotaExceededException = exports.LimitExceededException = exports.IdempotentParameterMismatchException = exports.ConflictException = exports.AutoUpdate = exports.ValueType = exports.UnsupportedDocumentException = exports.ThrottlingException = exports.ProvisionedThroughputExceededException = exports.InvalidS3ObjectException = exports.InvalidParameterException = exports.InternalServerError = exports.HumanLoopQuotaExceededException = exports.DocumentTooLargeException = exports.BadDocumentException = exports.TextType = exports.SelectionStatus = exports.RelationshipType = exports.EntityType = exports.BlockType = exports.ContentClassifier = exports.AdapterVersionStatus = exports.FeatureType = exports.AccessDeniedException = void 0;
4
4
  const TextractServiceException_1 = require("./TextractServiceException");
5
5
  class AccessDeniedException extends TextractServiceException_1.TextractServiceException {
6
6
  constructor(opts) {
@@ -24,6 +24,13 @@ exports.FeatureType = {
24
24
  SIGNATURES: "SIGNATURES",
25
25
  TABLES: "TABLES",
26
26
  };
27
+ exports.AdapterVersionStatus = {
28
+ ACTIVE: "ACTIVE",
29
+ AT_RISK: "AT_RISK",
30
+ CREATION_ERROR: "CREATION_ERROR",
31
+ CREATION_IN_PROGRESS: "CREATION_IN_PROGRESS",
32
+ DEPRECATED: "DEPRECATED",
33
+ };
27
34
  exports.ContentClassifier = {
28
35
  FREE_OF_ADULT_CONTENT: "FreeOfAdultContent",
29
36
  FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation",
@@ -225,27 +232,85 @@ exports.UnsupportedDocumentException = UnsupportedDocumentException;
225
232
  exports.ValueType = {
226
233
  DATE: "DATE",
227
234
  };
228
- exports.JobStatus = {
229
- FAILED: "FAILED",
230
- IN_PROGRESS: "IN_PROGRESS",
231
- PARTIAL_SUCCESS: "PARTIAL_SUCCESS",
232
- SUCCEEDED: "SUCCEEDED",
235
+ exports.AutoUpdate = {
236
+ DISABLED: "DISABLED",
237
+ ENABLED: "ENABLED",
233
238
  };
234
- class InvalidJobIdException extends TextractServiceException_1.TextractServiceException {
239
+ class ConflictException extends TextractServiceException_1.TextractServiceException {
235
240
  constructor(opts) {
236
241
  super({
237
- name: "InvalidJobIdException",
242
+ name: "ConflictException",
238
243
  $fault: "client",
239
244
  ...opts,
240
245
  });
241
- this.name = "InvalidJobIdException";
246
+ this.name = "ConflictException";
242
247
  this.$fault = "client";
243
- Object.setPrototypeOf(this, InvalidJobIdException.prototype);
248
+ Object.setPrototypeOf(this, ConflictException.prototype);
244
249
  this.Message = opts.Message;
245
250
  this.Code = opts.Code;
246
251
  }
247
252
  }
248
- exports.InvalidJobIdException = InvalidJobIdException;
253
+ exports.ConflictException = ConflictException;
254
+ class IdempotentParameterMismatchException extends TextractServiceException_1.TextractServiceException {
255
+ constructor(opts) {
256
+ super({
257
+ name: "IdempotentParameterMismatchException",
258
+ $fault: "client",
259
+ ...opts,
260
+ });
261
+ this.name = "IdempotentParameterMismatchException";
262
+ this.$fault = "client";
263
+ Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype);
264
+ this.Message = opts.Message;
265
+ this.Code = opts.Code;
266
+ }
267
+ }
268
+ exports.IdempotentParameterMismatchException = IdempotentParameterMismatchException;
269
+ class LimitExceededException extends TextractServiceException_1.TextractServiceException {
270
+ constructor(opts) {
271
+ super({
272
+ name: "LimitExceededException",
273
+ $fault: "client",
274
+ ...opts,
275
+ });
276
+ this.name = "LimitExceededException";
277
+ this.$fault = "client";
278
+ Object.setPrototypeOf(this, LimitExceededException.prototype);
279
+ this.Message = opts.Message;
280
+ this.Code = opts.Code;
281
+ }
282
+ }
283
+ exports.LimitExceededException = LimitExceededException;
284
+ class ServiceQuotaExceededException extends TextractServiceException_1.TextractServiceException {
285
+ constructor(opts) {
286
+ super({
287
+ name: "ServiceQuotaExceededException",
288
+ $fault: "client",
289
+ ...opts,
290
+ });
291
+ this.name = "ServiceQuotaExceededException";
292
+ this.$fault = "client";
293
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
294
+ this.Message = opts.Message;
295
+ this.Code = opts.Code;
296
+ }
297
+ }
298
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
299
+ class ValidationException extends TextractServiceException_1.TextractServiceException {
300
+ constructor(opts) {
301
+ super({
302
+ name: "ValidationException",
303
+ $fault: "client",
304
+ ...opts,
305
+ });
306
+ this.name = "ValidationException";
307
+ this.$fault = "client";
308
+ Object.setPrototypeOf(this, ValidationException.prototype);
309
+ this.Message = opts.Message;
310
+ this.Code = opts.Code;
311
+ }
312
+ }
313
+ exports.ValidationException = ValidationException;
249
314
  class InvalidKMSKeyException extends TextractServiceException_1.TextractServiceException {
250
315
  constructor(opts) {
251
316
  super({
@@ -261,33 +326,39 @@ class InvalidKMSKeyException extends TextractServiceException_1.TextractServiceE
261
326
  }
262
327
  }
263
328
  exports.InvalidKMSKeyException = InvalidKMSKeyException;
264
- class IdempotentParameterMismatchException extends TextractServiceException_1.TextractServiceException {
329
+ class ResourceNotFoundException extends TextractServiceException_1.TextractServiceException {
265
330
  constructor(opts) {
266
331
  super({
267
- name: "IdempotentParameterMismatchException",
332
+ name: "ResourceNotFoundException",
268
333
  $fault: "client",
269
334
  ...opts,
270
335
  });
271
- this.name = "IdempotentParameterMismatchException";
336
+ this.name = "ResourceNotFoundException";
272
337
  this.$fault = "client";
273
- Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype);
338
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
274
339
  this.Message = opts.Message;
275
340
  this.Code = opts.Code;
276
341
  }
277
342
  }
278
- exports.IdempotentParameterMismatchException = IdempotentParameterMismatchException;
279
- class LimitExceededException extends TextractServiceException_1.TextractServiceException {
343
+ exports.ResourceNotFoundException = ResourceNotFoundException;
344
+ exports.JobStatus = {
345
+ FAILED: "FAILED",
346
+ IN_PROGRESS: "IN_PROGRESS",
347
+ PARTIAL_SUCCESS: "PARTIAL_SUCCESS",
348
+ SUCCEEDED: "SUCCEEDED",
349
+ };
350
+ class InvalidJobIdException extends TextractServiceException_1.TextractServiceException {
280
351
  constructor(opts) {
281
352
  super({
282
- name: "LimitExceededException",
353
+ name: "InvalidJobIdException",
283
354
  $fault: "client",
284
355
  ...opts,
285
356
  });
286
- this.name = "LimitExceededException";
357
+ this.name = "InvalidJobIdException";
287
358
  this.$fault = "client";
288
- Object.setPrototypeOf(this, LimitExceededException.prototype);
359
+ Object.setPrototypeOf(this, InvalidJobIdException.prototype);
289
360
  this.Message = opts.Message;
290
361
  this.Code = opts.Code;
291
362
  }
292
363
  }
293
- exports.LimitExceededException = LimitExceededException;
364
+ exports.InvalidJobIdException = InvalidJobIdException;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListAdapterVersions = void 0;
4
+ const ListAdapterVersionsCommand_1 = require("../commands/ListAdapterVersionsCommand");
5
+ const TextractClient_1 = require("../TextractClient");
6
+ const makePagedClientRequest = async (client, input, ...args) => {
7
+ return await client.send(new ListAdapterVersionsCommand_1.ListAdapterVersionsCommand(input), ...args);
8
+ };
9
+ async function* paginateListAdapterVersions(config, input, ...additionalArguments) {
10
+ let token = config.startingToken || undefined;
11
+ let hasNext = true;
12
+ let page;
13
+ while (hasNext) {
14
+ input.NextToken = token;
15
+ input["MaxResults"] = config.pageSize;
16
+ if (config.client instanceof TextractClient_1.TextractClient) {
17
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
+ }
19
+ else {
20
+ throw new Error("Invalid client, expected Textract | TextractClient");
21
+ }
22
+ yield page;
23
+ const prevToken = token;
24
+ token = page.NextToken;
25
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
+ }
27
+ return undefined;
28
+ }
29
+ exports.paginateListAdapterVersions = paginateListAdapterVersions;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListAdapters = void 0;
4
+ const ListAdaptersCommand_1 = require("../commands/ListAdaptersCommand");
5
+ const TextractClient_1 = require("../TextractClient");
6
+ const makePagedClientRequest = async (client, input, ...args) => {
7
+ return await client.send(new ListAdaptersCommand_1.ListAdaptersCommand(input), ...args);
8
+ };
9
+ async function* paginateListAdapters(config, input, ...additionalArguments) {
10
+ let token = config.startingToken || undefined;
11
+ let hasNext = true;
12
+ let page;
13
+ while (hasNext) {
14
+ input.NextToken = token;
15
+ input["MaxResults"] = config.pageSize;
16
+ if (config.client instanceof TextractClient_1.TextractClient) {
17
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
+ }
19
+ else {
20
+ throw new Error("Invalid client, expected Textract | TextractClient");
21
+ }
22
+ yield page;
23
+ const prevToken = token;
24
+ token = page.NextToken;
25
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
+ }
27
+ return undefined;
28
+ }
29
+ exports.paginateListAdapters = paginateListAdapters;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Interfaces"), exports);
5
+ tslib_1.__exportStar(require("./ListAdapterVersionsPaginator"), exports);
6
+ tslib_1.__exportStar(require("./ListAdaptersPaginator"), exports);