@aws-sdk/client-comprehend 3.445.0 → 3.448.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 +8 -0
- package/dist-cjs/Comprehend.js +2 -0
- package/dist-cjs/commands/DetectToxicContentCommand.js +52 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +21 -2
- package/dist-cjs/protocols/Aws_json1_1.js +86 -4
- package/dist-es/Comprehend.js +2 -0
- package/dist-es/commands/DetectToxicContentCommand.js +48 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +17 -0
- package/dist-es/protocols/Aws_json1_1.js +80 -0
- package/dist-types/Comprehend.d.ts +7 -0
- package/dist-types/ComprehendClient.d.ts +3 -2
- package/dist-types/commands/BatchDetectTargetedSentimentCommand.d.ts +1 -1
- package/dist-types/commands/ClassifyDocumentCommand.d.ts +15 -3
- package/dist-types/commands/DetectTargetedSentimentCommand.d.ts +1 -1
- package/dist-types/commands/DetectToxicContentCommand.d.ts +108 -0
- package/dist-types/commands/StopEntitiesDetectionJobCommand.d.ts +1 -1
- package/dist-types/commands/StopEventsDetectionJobCommand.d.ts +1 -1
- package/dist-types/commands/StopKeyPhrasesDetectionJobCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +136 -106
- package/dist-types/models/models_1.d.ts +79 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/Comprehend.d.ts +17 -0
- package/dist-types/ts3.4/ComprehendClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/DetectToxicContentCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/StopEntitiesDetectionJobCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopEventsDetectionJobCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopKeyPhrasesDetectionJobCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +33 -21
- package/dist-types/ts3.4/models/models_1.d.ts +21 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ import { DetectPiiEntitiesCommandInput, DetectPiiEntitiesCommandOutput } from ".
|
|
|
41
41
|
import { DetectSentimentCommandInput, DetectSentimentCommandOutput } from "../commands/DetectSentimentCommand";
|
|
42
42
|
import { DetectSyntaxCommandInput, DetectSyntaxCommandOutput } from "../commands/DetectSyntaxCommand";
|
|
43
43
|
import { DetectTargetedSentimentCommandInput, DetectTargetedSentimentCommandOutput } from "../commands/DetectTargetedSentimentCommand";
|
|
44
|
+
import { DetectToxicContentCommandInput, DetectToxicContentCommandOutput } from "../commands/DetectToxicContentCommand";
|
|
44
45
|
import { ImportModelCommandInput, ImportModelCommandOutput } from "../commands/ImportModelCommand";
|
|
45
46
|
import { ListDatasetsCommandInput, ListDatasetsCommandOutput } from "../commands/ListDatasetsCommand";
|
|
46
47
|
import { ListDocumentClassificationJobsCommandInput, ListDocumentClassificationJobsCommandOutput } from "../commands/ListDocumentClassificationJobsCommand";
|
|
@@ -248,6 +249,10 @@ export declare const se_DetectSyntaxCommand: (input: DetectSyntaxCommandInput, c
|
|
|
248
249
|
* serializeAws_json1_1DetectTargetedSentimentCommand
|
|
249
250
|
*/
|
|
250
251
|
export declare const se_DetectTargetedSentimentCommand: (input: DetectTargetedSentimentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
252
|
+
/**
|
|
253
|
+
* serializeAws_json1_1DetectToxicContentCommand
|
|
254
|
+
*/
|
|
255
|
+
export declare const se_DetectToxicContentCommand: (input: DetectToxicContentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
251
256
|
/**
|
|
252
257
|
* serializeAws_json1_1ImportModelCommand
|
|
253
258
|
*/
|
|
@@ -584,6 +589,10 @@ export declare const de_DetectSyntaxCommand: (output: __HttpResponse, context: _
|
|
|
584
589
|
* deserializeAws_json1_1DetectTargetedSentimentCommand
|
|
585
590
|
*/
|
|
586
591
|
export declare const de_DetectTargetedSentimentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectTargetedSentimentCommandOutput>;
|
|
592
|
+
/**
|
|
593
|
+
* deserializeAws_json1_1DetectToxicContentCommand
|
|
594
|
+
*/
|
|
595
|
+
export declare const de_DetectToxicContentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectToxicContentCommandOutput>;
|
|
587
596
|
/**
|
|
588
597
|
* deserializeAws_json1_1ImportModelCommand
|
|
589
598
|
*/
|
|
@@ -163,6 +163,10 @@ import {
|
|
|
163
163
|
DetectTargetedSentimentCommandInput,
|
|
164
164
|
DetectTargetedSentimentCommandOutput,
|
|
165
165
|
} from "./commands/DetectTargetedSentimentCommand";
|
|
166
|
+
import {
|
|
167
|
+
DetectToxicContentCommandInput,
|
|
168
|
+
DetectToxicContentCommandOutput,
|
|
169
|
+
} from "./commands/DetectToxicContentCommand";
|
|
166
170
|
import {
|
|
167
171
|
ImportModelCommandInput,
|
|
168
172
|
ImportModelCommandOutput,
|
|
@@ -888,6 +892,19 @@ export interface Comprehend {
|
|
|
888
892
|
options: __HttpHandlerOptions,
|
|
889
893
|
cb: (err: any, data?: DetectTargetedSentimentCommandOutput) => void
|
|
890
894
|
): void;
|
|
895
|
+
detectToxicContent(
|
|
896
|
+
args: DetectToxicContentCommandInput,
|
|
897
|
+
options?: __HttpHandlerOptions
|
|
898
|
+
): Promise<DetectToxicContentCommandOutput>;
|
|
899
|
+
detectToxicContent(
|
|
900
|
+
args: DetectToxicContentCommandInput,
|
|
901
|
+
cb: (err: any, data?: DetectToxicContentCommandOutput) => void
|
|
902
|
+
): void;
|
|
903
|
+
detectToxicContent(
|
|
904
|
+
args: DetectToxicContentCommandInput,
|
|
905
|
+
options: __HttpHandlerOptions,
|
|
906
|
+
cb: (err: any, data?: DetectToxicContentCommandOutput) => void
|
|
907
|
+
): void;
|
|
891
908
|
importModel(
|
|
892
909
|
args: ImportModelCommandInput,
|
|
893
910
|
options?: __HttpHandlerOptions
|
|
@@ -209,6 +209,10 @@ import {
|
|
|
209
209
|
DetectTargetedSentimentCommandInput,
|
|
210
210
|
DetectTargetedSentimentCommandOutput,
|
|
211
211
|
} from "./commands/DetectTargetedSentimentCommand";
|
|
212
|
+
import {
|
|
213
|
+
DetectToxicContentCommandInput,
|
|
214
|
+
DetectToxicContentCommandOutput,
|
|
215
|
+
} from "./commands/DetectToxicContentCommand";
|
|
212
216
|
import {
|
|
213
217
|
ImportModelCommandInput,
|
|
214
218
|
ImportModelCommandOutput,
|
|
@@ -430,6 +434,7 @@ export type ServiceInputTypes =
|
|
|
430
434
|
| DetectSentimentCommandInput
|
|
431
435
|
| DetectSyntaxCommandInput
|
|
432
436
|
| DetectTargetedSentimentCommandInput
|
|
437
|
+
| DetectToxicContentCommandInput
|
|
433
438
|
| ImportModelCommandInput
|
|
434
439
|
| ListDatasetsCommandInput
|
|
435
440
|
| ListDocumentClassificationJobsCommandInput
|
|
@@ -515,6 +520,7 @@ export type ServiceOutputTypes =
|
|
|
515
520
|
| DetectSentimentCommandOutput
|
|
516
521
|
| DetectSyntaxCommandOutput
|
|
517
522
|
| DetectTargetedSentimentCommandOutput
|
|
523
|
+
| DetectToxicContentCommandOutput
|
|
518
524
|
| ImportModelCommandOutput
|
|
519
525
|
| ListDatasetsCommandOutput
|
|
520
526
|
| ListDocumentClassificationJobsCommandOutput
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import {
|
|
4
|
+
Handler,
|
|
5
|
+
HttpHandlerOptions as __HttpHandlerOptions,
|
|
6
|
+
MetadataBearer as __MetadataBearer,
|
|
7
|
+
MiddlewareStack,
|
|
8
|
+
} from "@smithy/types";
|
|
9
|
+
import {
|
|
10
|
+
ComprehendClientResolvedConfig,
|
|
11
|
+
ServiceInputTypes,
|
|
12
|
+
ServiceOutputTypes,
|
|
13
|
+
} from "../ComprehendClient";
|
|
14
|
+
import {
|
|
15
|
+
DetectToxicContentRequest,
|
|
16
|
+
DetectToxicContentResponse,
|
|
17
|
+
} from "../models/models_0";
|
|
18
|
+
export { __MetadataBearer, $Command };
|
|
19
|
+
export interface DetectToxicContentCommandInput
|
|
20
|
+
extends DetectToxicContentRequest {}
|
|
21
|
+
export interface DetectToxicContentCommandOutput
|
|
22
|
+
extends DetectToxicContentResponse,
|
|
23
|
+
__MetadataBearer {}
|
|
24
|
+
export declare class DetectToxicContentCommand extends $Command<
|
|
25
|
+
DetectToxicContentCommandInput,
|
|
26
|
+
DetectToxicContentCommandOutput,
|
|
27
|
+
ComprehendClientResolvedConfig
|
|
28
|
+
> {
|
|
29
|
+
readonly input: DetectToxicContentCommandInput;
|
|
30
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
31
|
+
constructor(input: DetectToxicContentCommandInput);
|
|
32
|
+
resolveMiddleware(
|
|
33
|
+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
34
|
+
configuration: ComprehendClientResolvedConfig,
|
|
35
|
+
options?: __HttpHandlerOptions
|
|
36
|
+
): Handler<DetectToxicContentCommandInput, DetectToxicContentCommandOutput>;
|
|
37
|
+
private serialize;
|
|
38
|
+
private deserialize;
|
|
39
|
+
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
StopEntitiesDetectionJobRequest,
|
|
16
16
|
StopEntitiesDetectionJobResponse,
|
|
17
|
-
} from "../models/
|
|
17
|
+
} from "../models/models_1";
|
|
18
18
|
export { __MetadataBearer, $Command };
|
|
19
19
|
export interface StopEntitiesDetectionJobCommandInput
|
|
20
20
|
extends StopEntitiesDetectionJobRequest {}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
StopEventsDetectionJobRequest,
|
|
16
16
|
StopEventsDetectionJobResponse,
|
|
17
|
-
} from "../models/
|
|
17
|
+
} from "../models/models_1";
|
|
18
18
|
export { __MetadataBearer, $Command };
|
|
19
19
|
export interface StopEventsDetectionJobCommandInput
|
|
20
20
|
extends StopEventsDetectionJobRequest {}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
StopKeyPhrasesDetectionJobRequest,
|
|
16
16
|
StopKeyPhrasesDetectionJobResponse,
|
|
17
|
-
} from "../models/
|
|
17
|
+
} from "../models/models_1";
|
|
18
18
|
export { __MetadataBearer, $Command };
|
|
19
19
|
export interface StopKeyPhrasesDetectionJobCommandInput
|
|
20
20
|
extends StopKeyPhrasesDetectionJobRequest {}
|
|
@@ -39,6 +39,7 @@ export * from "./DetectPiiEntitiesCommand";
|
|
|
39
39
|
export * from "./DetectSentimentCommand";
|
|
40
40
|
export * from "./DetectSyntaxCommand";
|
|
41
41
|
export * from "./DetectTargetedSentimentCommand";
|
|
42
|
+
export * from "./DetectToxicContentCommand";
|
|
42
43
|
export * from "./ImportModelCommand";
|
|
43
44
|
export * from "./ListDatasetsCommand";
|
|
44
45
|
export * from "./ListDocumentClassificationJobsCommand";
|
|
@@ -1314,6 +1314,35 @@ export interface DetectTargetedSentimentRequest {
|
|
|
1314
1314
|
export interface DetectTargetedSentimentResponse {
|
|
1315
1315
|
Entities?: TargetedSentimentEntity[];
|
|
1316
1316
|
}
|
|
1317
|
+
export interface TextSegment {
|
|
1318
|
+
Text: string | undefined;
|
|
1319
|
+
}
|
|
1320
|
+
export interface DetectToxicContentRequest {
|
|
1321
|
+
TextSegments: TextSegment[] | undefined;
|
|
1322
|
+
LanguageCode: LanguageCode | undefined;
|
|
1323
|
+
}
|
|
1324
|
+
export declare const ToxicContentType: {
|
|
1325
|
+
readonly GRAPHIC: "GRAPHIC";
|
|
1326
|
+
readonly HARASSMENT_OR_ABUSE: "HARASSMENT_OR_ABUSE";
|
|
1327
|
+
readonly HATE_SPEECH: "HATE_SPEECH";
|
|
1328
|
+
readonly INSULT: "INSULT";
|
|
1329
|
+
readonly PROFANITY: "PROFANITY";
|
|
1330
|
+
readonly SEXUAL: "SEXUAL";
|
|
1331
|
+
readonly VIOLENCE_OR_THREAT: "VIOLENCE_OR_THREAT";
|
|
1332
|
+
};
|
|
1333
|
+
export type ToxicContentType =
|
|
1334
|
+
(typeof ToxicContentType)[keyof typeof ToxicContentType];
|
|
1335
|
+
export interface ToxicContent {
|
|
1336
|
+
Name?: ToxicContentType;
|
|
1337
|
+
Score?: number;
|
|
1338
|
+
}
|
|
1339
|
+
export interface ToxicLabels {
|
|
1340
|
+
Labels?: ToxicContent[];
|
|
1341
|
+
Toxicity?: number;
|
|
1342
|
+
}
|
|
1343
|
+
export interface DetectToxicContentResponse {
|
|
1344
|
+
ResultList?: ToxicLabels[];
|
|
1345
|
+
}
|
|
1317
1346
|
export interface ImportModelRequest {
|
|
1318
1347
|
SourceModelArn: string | undefined;
|
|
1319
1348
|
ModelName?: string;
|
|
@@ -1775,27 +1804,6 @@ export interface StopDominantLanguageDetectionJobResponse {
|
|
|
1775
1804
|
JobId?: string;
|
|
1776
1805
|
JobStatus?: JobStatus;
|
|
1777
1806
|
}
|
|
1778
|
-
export interface StopEntitiesDetectionJobRequest {
|
|
1779
|
-
JobId: string | undefined;
|
|
1780
|
-
}
|
|
1781
|
-
export interface StopEntitiesDetectionJobResponse {
|
|
1782
|
-
JobId?: string;
|
|
1783
|
-
JobStatus?: JobStatus;
|
|
1784
|
-
}
|
|
1785
|
-
export interface StopEventsDetectionJobRequest {
|
|
1786
|
-
JobId: string | undefined;
|
|
1787
|
-
}
|
|
1788
|
-
export interface StopEventsDetectionJobResponse {
|
|
1789
|
-
JobId?: string;
|
|
1790
|
-
JobStatus?: JobStatus;
|
|
1791
|
-
}
|
|
1792
|
-
export interface StopKeyPhrasesDetectionJobRequest {
|
|
1793
|
-
JobId: string | undefined;
|
|
1794
|
-
}
|
|
1795
|
-
export interface StopKeyPhrasesDetectionJobResponse {
|
|
1796
|
-
JobId?: string;
|
|
1797
|
-
JobStatus?: JobStatus;
|
|
1798
|
-
}
|
|
1799
1807
|
export declare const BatchDetectDominantLanguageRequestFilterSensitiveLog: (
|
|
1800
1808
|
obj: BatchDetectDominantLanguageRequest
|
|
1801
1809
|
) => any;
|
|
@@ -1892,6 +1900,10 @@ export declare const DetectTargetedSentimentRequestFilterSensitiveLog: (
|
|
|
1892
1900
|
export declare const DetectTargetedSentimentResponseFilterSensitiveLog: (
|
|
1893
1901
|
obj: DetectTargetedSentimentResponse
|
|
1894
1902
|
) => any;
|
|
1903
|
+
export declare const TextSegmentFilterSensitiveLog: (obj: TextSegment) => any;
|
|
1904
|
+
export declare const DetectToxicContentRequestFilterSensitiveLog: (
|
|
1905
|
+
obj: DetectToxicContentRequest
|
|
1906
|
+
) => any;
|
|
1895
1907
|
export declare const ListDocumentClassifiersResponseFilterSensitiveLog: (
|
|
1896
1908
|
obj: ListDocumentClassifiersResponse
|
|
1897
1909
|
) => any;
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
2
2
|
import { ComprehendServiceException as __BaseException } from "./ComprehendServiceException";
|
|
3
3
|
import { FlywheelProperties, JobStatus, Tag, VpcConfig } from "./models_0";
|
|
4
|
+
export interface StopEntitiesDetectionJobRequest {
|
|
5
|
+
JobId: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface StopEntitiesDetectionJobResponse {
|
|
8
|
+
JobId?: string;
|
|
9
|
+
JobStatus?: JobStatus;
|
|
10
|
+
}
|
|
11
|
+
export interface StopEventsDetectionJobRequest {
|
|
12
|
+
JobId: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface StopEventsDetectionJobResponse {
|
|
15
|
+
JobId?: string;
|
|
16
|
+
JobStatus?: JobStatus;
|
|
17
|
+
}
|
|
18
|
+
export interface StopKeyPhrasesDetectionJobRequest {
|
|
19
|
+
JobId: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
export interface StopKeyPhrasesDetectionJobResponse {
|
|
22
|
+
JobId?: string;
|
|
23
|
+
JobStatus?: JobStatus;
|
|
24
|
+
}
|
|
4
25
|
export interface StopPiiEntitiesDetectionJobRequest {
|
|
5
26
|
JobId: string | undefined;
|
|
6
27
|
}
|
|
@@ -167,6 +167,10 @@ import {
|
|
|
167
167
|
DetectTargetedSentimentCommandInput,
|
|
168
168
|
DetectTargetedSentimentCommandOutput,
|
|
169
169
|
} from "../commands/DetectTargetedSentimentCommand";
|
|
170
|
+
import {
|
|
171
|
+
DetectToxicContentCommandInput,
|
|
172
|
+
DetectToxicContentCommandOutput,
|
|
173
|
+
} from "../commands/DetectToxicContentCommand";
|
|
170
174
|
import {
|
|
171
175
|
ImportModelCommandInput,
|
|
172
176
|
ImportModelCommandOutput,
|
|
@@ -503,6 +507,10 @@ export declare const se_DetectTargetedSentimentCommand: (
|
|
|
503
507
|
input: DetectTargetedSentimentCommandInput,
|
|
504
508
|
context: __SerdeContext
|
|
505
509
|
) => Promise<__HttpRequest>;
|
|
510
|
+
export declare const se_DetectToxicContentCommand: (
|
|
511
|
+
input: DetectToxicContentCommandInput,
|
|
512
|
+
context: __SerdeContext
|
|
513
|
+
) => Promise<__HttpRequest>;
|
|
506
514
|
export declare const se_ImportModelCommand: (
|
|
507
515
|
input: ImportModelCommandInput,
|
|
508
516
|
context: __SerdeContext
|
|
@@ -839,6 +847,10 @@ export declare const de_DetectTargetedSentimentCommand: (
|
|
|
839
847
|
output: __HttpResponse,
|
|
840
848
|
context: __SerdeContext
|
|
841
849
|
) => Promise<DetectTargetedSentimentCommandOutput>;
|
|
850
|
+
export declare const de_DetectToxicContentCommand: (
|
|
851
|
+
output: __HttpResponse,
|
|
852
|
+
context: __SerdeContext
|
|
853
|
+
) => Promise<DetectToxicContentCommandOutput>;
|
|
842
854
|
export declare const de_ImportModelCommand: (
|
|
843
855
|
output: __HttpResponse,
|
|
844
856
|
context: __SerdeContext
|
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.
|
|
4
|
+
"version": "3.448.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",
|