@aws-sdk/client-comprehend 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.
Files changed (27) hide show
  1. package/dist-cjs/Comprehend.js +88 -1176
  2. package/dist-cjs/models/models_0.js +10 -2
  3. package/dist-cjs/protocols/Aws_json1_1.js +1268 -2840
  4. package/dist-es/Comprehend.js +88 -1176
  5. package/dist-es/models/models_0.js +8 -0
  6. package/dist-es/protocols/Aws_json1_1.js +1269 -2841
  7. package/dist-types/Comprehend.d.ts +94 -369
  8. package/dist-types/commands/CreateDocumentClassifierCommand.d.ts +16 -4
  9. package/dist-types/commands/StartDocumentClassificationJobCommand.d.ts +4 -0
  10. package/dist-types/commands/StartDominantLanguageDetectionJobCommand.d.ts +4 -0
  11. package/dist-types/commands/StartEntitiesDetectionJobCommand.d.ts +4 -0
  12. package/dist-types/commands/StartEventsDetectionJobCommand.d.ts +4 -0
  13. package/dist-types/commands/StartKeyPhrasesDetectionJobCommand.d.ts +4 -0
  14. package/dist-types/commands/StartPiiEntitiesDetectionJobCommand.d.ts +4 -0
  15. package/dist-types/commands/StartSentimentDetectionJobCommand.d.ts +4 -0
  16. package/dist-types/commands/StartTargetedSentimentDetectionJobCommand.d.ts +4 -0
  17. package/dist-types/commands/StartTopicsDetectionJobCommand.d.ts +4 -0
  18. package/dist-types/commands/StopPiiEntitiesDetectionJobCommand.d.ts +1 -1
  19. package/dist-types/commands/StopSentimentDetectionJobCommand.d.ts +1 -1
  20. package/dist-types/models/models_0.d.ts +122 -53
  21. package/dist-types/models/models_1.d.ts +46 -0
  22. package/dist-types/ts3.4/Comprehend.d.ts +4 -1
  23. package/dist-types/ts3.4/commands/StopPiiEntitiesDetectionJobCommand.d.ts +1 -1
  24. package/dist-types/ts3.4/commands/StopSentimentDetectionJobCommand.d.ts +1 -1
  25. package/dist-types/ts3.4/models/models_0.d.ts +25 -14
  26. package/dist-types/ts3.4/models/models_1.d.ts +14 -0
  27. package/package.json +6 -6
@@ -20,10 +20,10 @@ export interface CreateDocumentClassifierCommandOutput extends CreateDocumentCla
20
20
  /**
21
21
  * @public
22
22
  * <p>Creates a new document classifier that you can use to categorize documents. To create a
23
- * classifier, you provide a set of training documents that labeled with the categories that you
24
- * want to use. After the classifier is trained you can use it to categorize a set of labeled
25
- * documents into the categories. For more information, see
26
- * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html">Document Classification</a> in the Comprehend Developer Guide.
23
+ * classifier, you provide a set of training documents that are labeled with the categories that you
24
+ * want to use. For more information, see
25
+ * <a href="https://docs.aws.amazon.com/comprehend/latest/dg/training-classifier-model.html">Training classifier models</a>
26
+ * in the Comprehend Developer Guide.
27
27
  * </p>
28
28
  * @example
29
29
  * Use a bare-bones client and the command you need to make an API call.
@@ -58,6 +58,18 @@ export interface CreateDocumentClassifierCommandOutput extends CreateDocumentCla
58
58
  * DocumentType: "PLAIN_TEXT_DOCUMENT" || "SEMI_STRUCTURED_DOCUMENT",
59
59
  * },
60
60
  * ],
61
+ * DocumentType: "PLAIN_TEXT_DOCUMENT" || "SEMI_STRUCTURED_DOCUMENT",
62
+ * Documents: { // DocumentClassifierDocuments
63
+ * S3Uri: "STRING_VALUE", // required
64
+ * TestS3Uri: "STRING_VALUE",
65
+ * },
66
+ * DocumentReaderConfig: { // DocumentReaderConfig
67
+ * DocumentReadAction: "TEXTRACT_DETECT_DOCUMENT_TEXT" || "TEXTRACT_ANALYZE_DOCUMENT", // required
68
+ * DocumentReadMode: "SERVICE_DEFAULT" || "FORCE_DOCUMENT_READ_ACTION",
69
+ * FeatureTypes: [ // ListOfDocumentReadFeatureTypes
70
+ * "TABLES" || "FORMS",
71
+ * ],
72
+ * },
61
73
  * },
62
74
  * OutputDataConfig: { // DocumentClassifierOutputDataConfig
63
75
  * S3Uri: "STRING_VALUE",
@@ -85,6 +85,10 @@ export interface StartDocumentClassificationJobCommandOutput extends StartDocume
85
85
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
86
86
  * re-enter it.</p>
87
87
  *
88
+ * @throws {@link ResourceInUseException} (client fault)
89
+ * <p>The specified resource name is already in use. Use a different name and try your request
90
+ * again.</p>
91
+ *
88
92
  * @throws {@link ResourceNotFoundException} (client fault)
89
93
  * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
90
94
  *
@@ -83,6 +83,10 @@ export interface StartDominantLanguageDetectionJobCommandOutput extends StartDom
83
83
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
84
84
  * re-enter it.</p>
85
85
  *
86
+ * @throws {@link ResourceInUseException} (client fault)
87
+ * <p>The specified resource name is already in use. Use a different name and try your request
88
+ * again.</p>
89
+ *
86
90
  * @throws {@link TooManyRequestsException} (client fault)
87
91
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
88
92
  *
@@ -88,6 +88,10 @@ export interface StartEntitiesDetectionJobCommandOutput extends StartEntitiesDet
88
88
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
89
89
  * re-enter it.</p>
90
90
  *
91
+ * @throws {@link ResourceInUseException} (client fault)
92
+ * <p>The specified resource name is already in use. Use a different name and try your request
93
+ * again.</p>
94
+ *
91
95
  * @throws {@link ResourceNotFoundException} (client fault)
92
96
  * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
93
97
  *
@@ -76,6 +76,10 @@ export interface StartEventsDetectionJobCommandOutput extends StartEventsDetecti
76
76
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
77
77
  * re-enter it.</p>
78
78
  *
79
+ * @throws {@link ResourceInUseException} (client fault)
80
+ * <p>The specified resource name is already in use. Use a different name and try your request
81
+ * again.</p>
82
+ *
79
83
  * @throws {@link TooManyRequestsException} (client fault)
80
84
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
81
85
  *
@@ -84,6 +84,10 @@ export interface StartKeyPhrasesDetectionJobCommandOutput extends StartKeyPhrase
84
84
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
85
85
  * re-enter it.</p>
86
86
  *
87
+ * @throws {@link ResourceInUseException} (client fault)
88
+ * <p>The specified resource name is already in use. Use a different name and try your request
89
+ * again.</p>
90
+ *
87
91
  * @throws {@link TooManyRequestsException} (client fault)
88
92
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
89
93
  *
@@ -81,6 +81,10 @@ export interface StartPiiEntitiesDetectionJobCommandOutput extends StartPiiEntit
81
81
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
82
82
  * re-enter it.</p>
83
83
  *
84
+ * @throws {@link ResourceInUseException} (client fault)
85
+ * <p>The specified resource name is already in use. Use a different name and try your request
86
+ * again.</p>
87
+ *
84
88
  * @throws {@link TooManyRequestsException} (client fault)
85
89
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
86
90
  *
@@ -84,6 +84,10 @@ export interface StartSentimentDetectionJobCommandOutput extends StartSentimentD
84
84
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
85
85
  * re-enter it.</p>
86
86
  *
87
+ * @throws {@link ResourceInUseException} (client fault)
88
+ * <p>The specified resource name is already in use. Use a different name and try your request
89
+ * again.</p>
90
+ *
87
91
  * @throws {@link TooManyRequestsException} (client fault)
88
92
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
89
93
  *
@@ -84,6 +84,10 @@ export interface StartTargetedSentimentDetectionJobCommandOutput extends StartTa
84
84
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
85
85
  * re-enter it.</p>
86
86
  *
87
+ * @throws {@link ResourceInUseException} (client fault)
88
+ * <p>The specified resource name is already in use. Use a different name and try your request
89
+ * again.</p>
90
+ *
87
91
  * @throws {@link TooManyRequestsException} (client fault)
88
92
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
89
93
  *
@@ -83,6 +83,10 @@ export interface StartTopicsDetectionJobCommandOutput extends StartTopicsDetecti
83
83
  * <p>The KMS customer managed key (CMK) entered cannot be validated. Verify the key and
84
84
  * re-enter it.</p>
85
85
  *
86
+ * @throws {@link ResourceInUseException} (client fault)
87
+ * <p>The specified resource name is already in use. Use a different name and try your request
88
+ * again.</p>
89
+ *
86
90
  * @throws {@link TooManyRequestsException} (client fault)
87
91
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
88
92
  *
@@ -2,7 +2,7 @@ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { ComprehendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComprehendClient";
5
- import { StopPiiEntitiesDetectionJobRequest, StopPiiEntitiesDetectionJobResponse } from "../models/models_0";
5
+ import { StopPiiEntitiesDetectionJobRequest, StopPiiEntitiesDetectionJobResponse } from "../models/models_1";
6
6
  /**
7
7
  * @public
8
8
  *
@@ -2,7 +2,7 @@ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { ComprehendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComprehendClient";
5
- import { StopSentimentDetectionJobRequest, StopSentimentDetectionJobResponse } from "../models/models_0";
5
+ import { StopSentimentDetectionJobRequest, StopSentimentDetectionJobResponse } from "../models/models_1";
6
6
  /**
7
7
  * @public
8
8
  *
@@ -1212,8 +1212,8 @@ export type DocumentReadFeatureTypes = (typeof DocumentReadFeatureTypes)[keyof t
1212
1212
  * <code>DocumentReaderConfig</code> does not apply to plain text files or Word files.</p>
1213
1213
  * <p>
1214
1214
  * For image files and PDF documents, you can override these default actions using the fields listed below.
1215
- * For more information, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/detecting-cer.html#detecting-cer-pdf">
1216
- * Setting text extraction options</a>.
1215
+ * For more information, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/idp-set-textract-options.html">
1216
+ * Setting text extraction options</a> in the Comprehend Developer Guide.
1217
1217
  * </p>
1218
1218
  */
1219
1219
  export interface DocumentReaderConfig {
@@ -1449,6 +1449,44 @@ export interface DocumentLabel {
1449
1449
  */
1450
1450
  Page?: number;
1451
1451
  }
1452
+ /**
1453
+ * @public
1454
+ * @enum
1455
+ */
1456
+ export declare const PageBasedWarningCode: {
1457
+ readonly INFERENCING_NATIVE_DOCUMENT_WITH_PLAINTEXT_TRAINED_MODEL: "INFERENCING_NATIVE_DOCUMENT_WITH_PLAINTEXT_TRAINED_MODEL";
1458
+ readonly INFERENCING_PLAINTEXT_WITH_NATIVE_TRAINED_MODEL: "INFERENCING_PLAINTEXT_WITH_NATIVE_TRAINED_MODEL";
1459
+ };
1460
+ /**
1461
+ * @public
1462
+ */
1463
+ export type PageBasedWarningCode = (typeof PageBasedWarningCode)[keyof typeof PageBasedWarningCode];
1464
+ /**
1465
+ * @public
1466
+ * <p>The system identified one of the following warnings while processing the input document:</p>
1467
+ * <ul>
1468
+ * <li>
1469
+ * <p>The document to classify is plain text, but the classifier is a native model.</p>
1470
+ * </li>
1471
+ * <li>
1472
+ * <p>The document to classify is semi-structured, but the classifier is a plain-text model.</p>
1473
+ * </li>
1474
+ * </ul>
1475
+ */
1476
+ export interface WarningsListItem {
1477
+ /**
1478
+ * <p>Page number in the input document.</p>
1479
+ */
1480
+ Page?: number;
1481
+ /**
1482
+ * <p>The type of warning.</p>
1483
+ */
1484
+ WarnCode?: PageBasedWarningCode | string;
1485
+ /**
1486
+ * <p>Text message associated with the warning.</p>
1487
+ */
1488
+ WarnMessage?: string;
1489
+ }
1452
1490
  /**
1453
1491
  * @public
1454
1492
  */
@@ -1482,6 +1520,14 @@ export interface ClassifyDocumentResponse {
1482
1520
  * The field is empty if the system encountered no errors.</p>
1483
1521
  */
1484
1522
  Errors?: ErrorsListItem[];
1523
+ /**
1524
+ * <p>Warnings detected while processing the input document.
1525
+ * The response includes a warning if there is a mismatch between the input document type
1526
+ * and the model type associated with the endpoint that you specified. The response can also include
1527
+ * warnings for individual pages that have a mismatch. </p>
1528
+ * <p>The field is empty if the system generated no warnings.</p>
1529
+ */
1530
+ Warnings?: WarningsListItem[];
1485
1531
  }
1486
1532
  /**
1487
1533
  * @public
@@ -1927,6 +1973,33 @@ export declare const DocumentClassifierDataFormat: {
1927
1973
  * @public
1928
1974
  */
1929
1975
  export type DocumentClassifierDataFormat = (typeof DocumentClassifierDataFormat)[keyof typeof DocumentClassifierDataFormat];
1976
+ /**
1977
+ * @public
1978
+ * <p>The location of the training documents. This parameter is required in a request to create a native classifier model.</p>
1979
+ */
1980
+ export interface DocumentClassifierDocuments {
1981
+ /**
1982
+ * <p>The S3 URI location of the training documents specified in the S3Uri CSV file.</p>
1983
+ */
1984
+ S3Uri: string | undefined;
1985
+ /**
1986
+ * <p>The S3 URI location of the test documents included in the TestS3Uri CSV file.
1987
+ * This field is not required if you do not specify a test CSV file.</p>
1988
+ */
1989
+ TestS3Uri?: string;
1990
+ }
1991
+ /**
1992
+ * @public
1993
+ * @enum
1994
+ */
1995
+ export declare const DocumentClassifierDocumentTypeFormat: {
1996
+ readonly PLAIN_TEXT_DOCUMENT: "PLAIN_TEXT_DOCUMENT";
1997
+ readonly SEMI_STRUCTURED_DOCUMENT: "SEMI_STRUCTURED_DOCUMENT";
1998
+ };
1999
+ /**
2000
+ * @public
2001
+ */
2002
+ export type DocumentClassifierDocumentTypeFormat = (typeof DocumentClassifierDocumentTypeFormat)[keyof typeof DocumentClassifierDocumentTypeFormat];
1930
2003
  /**
1931
2004
  * @public
1932
2005
  * <p>The input properties for training a document classifier. </p>
@@ -1991,6 +2064,43 @@ export interface DocumentClassifierInputDataConfig {
1991
2064
  * <code>AUGMENTED_MANIFEST</code>.</p>
1992
2065
  */
1993
2066
  AugmentedManifests?: AugmentedManifestsListItem[];
2067
+ /**
2068
+ * <p>The type of input documents for training the model. Provide plain-text documents to create a plain-text model, and
2069
+ * provide semi-structured documents to create a native model.</p>
2070
+ */
2071
+ DocumentType?: DocumentClassifierDocumentTypeFormat | string;
2072
+ /**
2073
+ * <p>The S3 location of the training documents.
2074
+ * This parameter is required in a request to create a native classifier model.</p>
2075
+ */
2076
+ Documents?: DocumentClassifierDocuments;
2077
+ /**
2078
+ * <p>Provides configuration parameters to override the default actions for extracting text from PDF documents and image files. </p>
2079
+ * <p> By default, Amazon Comprehend performs the following actions to extract text from files, based on the input file type: </p>
2080
+ * <ul>
2081
+ * <li>
2082
+ * <p>
2083
+ * <b>Word files</b> - Amazon Comprehend parser extracts the text. </p>
2084
+ * </li>
2085
+ * <li>
2086
+ * <p>
2087
+ * <b>Digital PDF files</b> - Amazon Comprehend parser extracts the text. </p>
2088
+ * </li>
2089
+ * <li>
2090
+ * <p>
2091
+ * <b>Image files and scanned PDF files</b> - Amazon Comprehend uses the Amazon Textract <code>DetectDocumentText</code>
2092
+ * API to extract the text. </p>
2093
+ * </li>
2094
+ * </ul>
2095
+ * <p>
2096
+ * <code>DocumentReaderConfig</code> does not apply to plain text files or Word files.</p>
2097
+ * <p>
2098
+ * For image files and PDF documents, you can override these default actions using the fields listed below.
2099
+ * For more information, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/idp-set-textract-options.html">
2100
+ * Setting text extraction options</a> in the Comprehend Developer Guide.
2101
+ * </p>
2102
+ */
2103
+ DocumentReaderConfig?: DocumentReaderConfig;
1994
2104
  }
1995
2105
  /**
1996
2106
  * @public
@@ -2006,12 +2116,14 @@ export declare const DocumentClassifierMode: {
2006
2116
  export type DocumentClassifierMode = (typeof DocumentClassifierMode)[keyof typeof DocumentClassifierMode];
2007
2117
  /**
2008
2118
  * @public
2009
- * <p>Provides output results configuration parameters for custom classifier jobs. </p>
2119
+ * <p>Provide the location for output data from a custom classifier job. This field is mandatory
2120
+ * if you are training a native classifier model.</p>
2010
2121
  */
2011
2122
  export interface DocumentClassifierOutputDataConfig {
2012
2123
  /**
2013
2124
  * <p>When you use the <code>OutputDataConfig</code> object while creating a custom
2014
- * classifier, you specify the Amazon S3 location where you want to write the confusion matrix.
2125
+ * classifier, you specify the Amazon S3 location where you want to write the confusion matrix
2126
+ * and other output files.
2015
2127
  * The URI must be in the same Region as the API endpoint that you are calling. The location is
2016
2128
  * used as the prefix for the actual location of this output file.</p>
2017
2129
  * <p>When the custom classifier job is finished, the service creates the output file in a
@@ -2105,8 +2217,8 @@ export interface CreateDocumentClassifierRequest {
2105
2217
  */
2106
2218
  InputDataConfig: DocumentClassifierInputDataConfig | undefined;
2107
2219
  /**
2108
- * <p>Enables the addition of output results configuration parameters for custom classifier
2109
- * jobs.</p>
2220
+ * <p>Specifies the location for the output files from a custom classifier job.
2221
+ * This parameter is required for a request that creates a native classifier model.</p>
2110
2222
  */
2111
2223
  OutputDataConfig?: DocumentClassifierOutputDataConfig;
2112
2224
  /**
@@ -3092,7 +3204,10 @@ export interface DocumentClassifierProperties {
3092
3204
  LanguageCode?: LanguageCode | string;
3093
3205
  /**
3094
3206
  * <p>The status of the document classifier. If the status is <code>TRAINED</code> the
3095
- * classifier is ready to use. If the status is <code>FAILED</code> you can see additional
3207
+ * classifier is ready to use. If the status is <code>TRAINED_WITH_WARNINGS</code> the
3208
+ * classifier training succeeded, but you should review the warnings returned in the
3209
+ * <code>CreateDocumentClassifier</code> response.</p>
3210
+ * <p> If the status is <code>FAILED</code> you can see additional
3096
3211
  * information about why the classifier wasn't trained in the <code>Message</code> field.</p>
3097
3212
  */
3098
3213
  Status?: ModelStatus | string;
@@ -7079,52 +7194,6 @@ export interface StopKeyPhrasesDetectionJobResponse {
7079
7194
  */
7080
7195
  JobStatus?: JobStatus | string;
7081
7196
  }
7082
- /**
7083
- * @public
7084
- */
7085
- export interface StopPiiEntitiesDetectionJobRequest {
7086
- /**
7087
- * <p>The identifier of the PII entities detection job to stop.</p>
7088
- */
7089
- JobId: string | undefined;
7090
- }
7091
- /**
7092
- * @public
7093
- */
7094
- export interface StopPiiEntitiesDetectionJobResponse {
7095
- /**
7096
- * <p>The identifier of the PII entities detection job to stop.</p>
7097
- */
7098
- JobId?: string;
7099
- /**
7100
- * <p>The status of the PII entities detection job.</p>
7101
- */
7102
- JobStatus?: JobStatus | string;
7103
- }
7104
- /**
7105
- * @public
7106
- */
7107
- export interface StopSentimentDetectionJobRequest {
7108
- /**
7109
- * <p>The identifier of the sentiment detection job to stop.</p>
7110
- */
7111
- JobId: string | undefined;
7112
- }
7113
- /**
7114
- * @public
7115
- */
7116
- export interface StopSentimentDetectionJobResponse {
7117
- /**
7118
- * <p>The identifier of the sentiment detection job to stop.</p>
7119
- */
7120
- JobId?: string;
7121
- /**
7122
- * <p>Either <code>STOP_REQUESTED</code> if the job is currently running, or
7123
- * <code>STOPPED</code> if the job was previously stopped with the
7124
- * <code>StopSentimentDetectionJob</code> operation.</p>
7125
- */
7126
- JobStatus?: JobStatus | string;
7127
- }
7128
7197
  /**
7129
7198
  * @internal
7130
7199
  */
@@ -1,6 +1,52 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { ComprehendServiceException as __BaseException } from "./ComprehendServiceException";
3
3
  import { FlywheelProperties, JobStatus, Tag, VpcConfig } from "./models_0";
4
+ /**
5
+ * @public
6
+ */
7
+ export interface StopPiiEntitiesDetectionJobRequest {
8
+ /**
9
+ * <p>The identifier of the PII entities detection job to stop.</p>
10
+ */
11
+ JobId: string | undefined;
12
+ }
13
+ /**
14
+ * @public
15
+ */
16
+ export interface StopPiiEntitiesDetectionJobResponse {
17
+ /**
18
+ * <p>The identifier of the PII entities detection job to stop.</p>
19
+ */
20
+ JobId?: string;
21
+ /**
22
+ * <p>The status of the PII entities detection job.</p>
23
+ */
24
+ JobStatus?: JobStatus | string;
25
+ }
26
+ /**
27
+ * @public
28
+ */
29
+ export interface StopSentimentDetectionJobRequest {
30
+ /**
31
+ * <p>The identifier of the sentiment detection job to stop.</p>
32
+ */
33
+ JobId: string | undefined;
34
+ }
35
+ /**
36
+ * @public
37
+ */
38
+ export interface StopSentimentDetectionJobResponse {
39
+ /**
40
+ * <p>The identifier of the sentiment detection job to stop.</p>
41
+ */
42
+ JobId?: string;
43
+ /**
44
+ * <p>Either <code>STOP_REQUESTED</code> if the job is currently running, or
45
+ * <code>STOPPED</code> if the job was previously stopped with the
46
+ * <code>StopSentimentDetectionJob</code> operation.</p>
47
+ */
48
+ JobStatus?: JobStatus | string;
49
+ }
4
50
  /**
5
51
  * @public
6
52
  */
@@ -336,7 +336,7 @@ import {
336
336
  UpdateFlywheelCommandOutput,
337
337
  } from "./commands/UpdateFlywheelCommand";
338
338
  import { ComprehendClient } from "./ComprehendClient";
339
- export declare class Comprehend extends ComprehendClient {
339
+ export interface Comprehend {
340
340
  batchDetectDominantLanguage(
341
341
  args: BatchDetectDominantLanguageCommandInput,
342
342
  options?: __HttpHandlerOptions
@@ -1478,3 +1478,6 @@ export declare class Comprehend extends ComprehendClient {
1478
1478
  cb: (err: any, data?: UpdateFlywheelCommandOutput) => void
1479
1479
  ): void;
1480
1480
  }
1481
+ export declare class Comprehend
1482
+ extends ComprehendClient
1483
+ implements Comprehend {}
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  StopPiiEntitiesDetectionJobRequest,
16
16
  StopPiiEntitiesDetectionJobResponse,
17
- } from "../models/models_0";
17
+ } from "../models/models_1";
18
18
  export interface StopPiiEntitiesDetectionJobCommandInput
19
19
  extends StopPiiEntitiesDetectionJobRequest {}
20
20
  export interface StopPiiEntitiesDetectionJobCommandOutput
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  StopSentimentDetectionJobRequest,
16
16
  StopSentimentDetectionJobResponse,
17
- } from "../models/models_0";
17
+ } from "../models/models_1";
18
18
  export interface StopSentimentDetectionJobCommandInput
19
19
  extends StopSentimentDetectionJobRequest {}
20
20
  export interface StopSentimentDetectionJobCommandOutput
@@ -434,12 +434,24 @@ export interface DocumentLabel {
434
434
  Score?: number;
435
435
  Page?: number;
436
436
  }
437
+ export declare const PageBasedWarningCode: {
438
+ readonly INFERENCING_NATIVE_DOCUMENT_WITH_PLAINTEXT_TRAINED_MODEL: "INFERENCING_NATIVE_DOCUMENT_WITH_PLAINTEXT_TRAINED_MODEL";
439
+ readonly INFERENCING_PLAINTEXT_WITH_NATIVE_TRAINED_MODEL: "INFERENCING_PLAINTEXT_WITH_NATIVE_TRAINED_MODEL";
440
+ };
441
+ export type PageBasedWarningCode =
442
+ (typeof PageBasedWarningCode)[keyof typeof PageBasedWarningCode];
443
+ export interface WarningsListItem {
444
+ Page?: number;
445
+ WarnCode?: PageBasedWarningCode | string;
446
+ WarnMessage?: string;
447
+ }
437
448
  export interface ClassifyDocumentResponse {
438
449
  Classes?: DocumentClass[];
439
450
  Labels?: DocumentLabel[];
440
451
  DocumentMetadata?: DocumentMetadata;
441
452
  DocumentType?: DocumentTypeListItem[];
442
453
  Errors?: ErrorsListItem[];
454
+ Warnings?: WarningsListItem[];
443
455
  }
444
456
  export declare class ResourceUnavailableException extends __BaseException {
445
457
  readonly name: "ResourceUnavailableException";
@@ -610,12 +622,25 @@ export declare const DocumentClassifierDataFormat: {
610
622
  };
611
623
  export type DocumentClassifierDataFormat =
612
624
  (typeof DocumentClassifierDataFormat)[keyof typeof DocumentClassifierDataFormat];
625
+ export interface DocumentClassifierDocuments {
626
+ S3Uri: string | undefined;
627
+ TestS3Uri?: string;
628
+ }
629
+ export declare const DocumentClassifierDocumentTypeFormat: {
630
+ readonly PLAIN_TEXT_DOCUMENT: "PLAIN_TEXT_DOCUMENT";
631
+ readonly SEMI_STRUCTURED_DOCUMENT: "SEMI_STRUCTURED_DOCUMENT";
632
+ };
633
+ export type DocumentClassifierDocumentTypeFormat =
634
+ (typeof DocumentClassifierDocumentTypeFormat)[keyof typeof DocumentClassifierDocumentTypeFormat];
613
635
  export interface DocumentClassifierInputDataConfig {
614
636
  DataFormat?: DocumentClassifierDataFormat | string;
615
637
  S3Uri?: string;
616
638
  TestS3Uri?: string;
617
639
  LabelDelimiter?: string;
618
640
  AugmentedManifests?: AugmentedManifestsListItem[];
641
+ DocumentType?: DocumentClassifierDocumentTypeFormat | string;
642
+ Documents?: DocumentClassifierDocuments;
643
+ DocumentReaderConfig?: DocumentReaderConfig;
619
644
  }
620
645
  export declare const DocumentClassifierMode: {
621
646
  readonly MULTI_CLASS: "MULTI_CLASS";
@@ -1771,20 +1796,6 @@ export interface StopKeyPhrasesDetectionJobResponse {
1771
1796
  JobId?: string;
1772
1797
  JobStatus?: JobStatus | string;
1773
1798
  }
1774
- export interface StopPiiEntitiesDetectionJobRequest {
1775
- JobId: string | undefined;
1776
- }
1777
- export interface StopPiiEntitiesDetectionJobResponse {
1778
- JobId?: string;
1779
- JobStatus?: JobStatus | string;
1780
- }
1781
- export interface StopSentimentDetectionJobRequest {
1782
- JobId: string | undefined;
1783
- }
1784
- export interface StopSentimentDetectionJobResponse {
1785
- JobId?: string;
1786
- JobStatus?: JobStatus | string;
1787
- }
1788
1799
  export declare const BatchDetectDominantLanguageRequestFilterSensitiveLog: (
1789
1800
  obj: BatchDetectDominantLanguageRequest
1790
1801
  ) => any;
@@ -1,6 +1,20 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { ComprehendServiceException as __BaseException } from "./ComprehendServiceException";
3
3
  import { FlywheelProperties, JobStatus, Tag, VpcConfig } from "./models_0";
4
+ export interface StopPiiEntitiesDetectionJobRequest {
5
+ JobId: string | undefined;
6
+ }
7
+ export interface StopPiiEntitiesDetectionJobResponse {
8
+ JobId?: string;
9
+ JobStatus?: JobStatus | string;
10
+ }
11
+ export interface StopSentimentDetectionJobRequest {
12
+ JobId: string | undefined;
13
+ }
14
+ export interface StopSentimentDetectionJobResponse {
15
+ JobId?: string;
16
+ JobStatus?: JobStatus | string;
17
+ }
4
18
  export interface StopTargetedSentimentDetectionJobRequest {
5
19
  JobId: string | undefined;
6
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-comprehend",
3
3
  "description": "AWS SDK for JavaScript Comprehend Client for Node.js, Browser and React Native",
4
- "version": "3.312.0",
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.312.0",
24
+ "@aws-sdk/client-sts": "3.316.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.310.0",
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.310.0",
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.310.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
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",