@aws-sdk/client-rekognition 3.208.0 → 3.209.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 +4 -13
- package/dist-cjs/endpoint/ruleset.js +6 -6
- package/dist-cjs/models/models_0.js +63 -6
- package/dist-cjs/protocols/Aws_json1_1.js +138 -0
- package/dist-cjs/runtimeConfig.shared.js +2 -1
- package/dist-es/endpoint/ruleset.js +6 -6
- package/dist-es/models/models_0.js +47 -0
- package/dist-es/protocols/Aws_json1_1.js +138 -0
- package/dist-es/runtimeConfig.shared.js +2 -1
- package/dist-types/Rekognition.d.ts +226 -229
- package/dist-types/RekognitionClient.d.ts +4 -17
- package/dist-types/commands/CompareFacesCommand.d.ts +30 -41
- package/dist-types/commands/CreateCollectionCommand.d.ts +5 -3
- package/dist-types/commands/DeleteCollectionCommand.d.ts +3 -3
- package/dist-types/commands/DetectFacesCommand.d.ts +6 -10
- package/dist-types/commands/DetectLabelsCommand.d.ts +83 -38
- package/dist-types/commands/DetectModerationLabelsCommand.d.ts +8 -8
- package/dist-types/commands/DetectTextCommand.d.ts +4 -2
- package/dist-types/commands/GetCelebrityInfoCommand.d.ts +2 -2
- package/dist-types/commands/IndexFacesCommand.d.ts +22 -28
- package/dist-types/commands/ListCollectionsCommand.d.ts +7 -5
- package/dist-types/commands/ListFacesCommand.d.ts +6 -8
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +3 -4
- package/dist-types/commands/RecognizeCelebritiesCommand.d.ts +7 -10
- package/dist-types/commands/SearchFacesByImageCommand.d.ts +20 -29
- package/dist-types/commands/SearchFacesCommand.d.ts +7 -11
- package/dist-types/commands/TagResourceCommand.d.ts +5 -5
- package/dist-types/commands/UntagResourceCommand.d.ts +3 -4
- package/dist-types/models/models_0.d.ts +564 -320
- package/dist-types/runtimeConfig.shared.d.ts +2 -3
- package/dist-types/ts3.4/models/models_0.d.ts +96 -10
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -3
- package/package.json +11 -13
|
@@ -4324,11 +4324,35 @@ const serializeAws_json1_1DetectionFilter = (input, context) => {
|
|
|
4324
4324
|
...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }),
|
|
4325
4325
|
};
|
|
4326
4326
|
};
|
|
4327
|
+
const serializeAws_json1_1DetectLabelsFeatureList = (input, context) => {
|
|
4328
|
+
return input
|
|
4329
|
+
.filter((e) => e != null)
|
|
4330
|
+
.map((entry) => {
|
|
4331
|
+
return entry;
|
|
4332
|
+
});
|
|
4333
|
+
};
|
|
4334
|
+
const serializeAws_json1_1DetectLabelsImagePropertiesSettings = (input, context) => {
|
|
4335
|
+
return {
|
|
4336
|
+
...(input.MaxDominantColors != null && { MaxDominantColors: input.MaxDominantColors }),
|
|
4337
|
+
};
|
|
4338
|
+
};
|
|
4327
4339
|
const serializeAws_json1_1DetectLabelsRequest = (input, context) => {
|
|
4328
4340
|
return {
|
|
4341
|
+
...(input.Features != null && { Features: serializeAws_json1_1DetectLabelsFeatureList(input.Features, context) }),
|
|
4329
4342
|
...(input.Image != null && { Image: serializeAws_json1_1Image(input.Image, context) }),
|
|
4330
4343
|
...(input.MaxLabels != null && { MaxLabels: input.MaxLabels }),
|
|
4331
4344
|
...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }),
|
|
4345
|
+
...(input.Settings != null && { Settings: serializeAws_json1_1DetectLabelsSettings(input.Settings, context) }),
|
|
4346
|
+
};
|
|
4347
|
+
};
|
|
4348
|
+
const serializeAws_json1_1DetectLabelsSettings = (input, context) => {
|
|
4349
|
+
return {
|
|
4350
|
+
...(input.GeneralLabels != null && {
|
|
4351
|
+
GeneralLabels: serializeAws_json1_1GeneralLabelsSettings(input.GeneralLabels, context),
|
|
4352
|
+
}),
|
|
4353
|
+
...(input.ImageProperties != null && {
|
|
4354
|
+
ImageProperties: serializeAws_json1_1DetectLabelsImagePropertiesSettings(input.ImageProperties, context),
|
|
4355
|
+
}),
|
|
4332
4356
|
};
|
|
4333
4357
|
};
|
|
4334
4358
|
const serializeAws_json1_1DetectModerationLabelsRequest = (input, context) => {
|
|
@@ -4394,6 +4418,29 @@ const serializeAws_json1_1FaceSearchSettings = (input, context) => {
|
|
|
4394
4418
|
...(input.FaceMatchThreshold != null && { FaceMatchThreshold: __serializeFloat(input.FaceMatchThreshold) }),
|
|
4395
4419
|
};
|
|
4396
4420
|
};
|
|
4421
|
+
const serializeAws_json1_1GeneralLabelsFilterList = (input, context) => {
|
|
4422
|
+
return input
|
|
4423
|
+
.filter((e) => e != null)
|
|
4424
|
+
.map((entry) => {
|
|
4425
|
+
return entry;
|
|
4426
|
+
});
|
|
4427
|
+
};
|
|
4428
|
+
const serializeAws_json1_1GeneralLabelsSettings = (input, context) => {
|
|
4429
|
+
return {
|
|
4430
|
+
...(input.LabelCategoryExclusionFilters != null && {
|
|
4431
|
+
LabelCategoryExclusionFilters: serializeAws_json1_1GeneralLabelsFilterList(input.LabelCategoryExclusionFilters, context),
|
|
4432
|
+
}),
|
|
4433
|
+
...(input.LabelCategoryInclusionFilters != null && {
|
|
4434
|
+
LabelCategoryInclusionFilters: serializeAws_json1_1GeneralLabelsFilterList(input.LabelCategoryInclusionFilters, context),
|
|
4435
|
+
}),
|
|
4436
|
+
...(input.LabelExclusionFilters != null && {
|
|
4437
|
+
LabelExclusionFilters: serializeAws_json1_1GeneralLabelsFilterList(input.LabelExclusionFilters, context),
|
|
4438
|
+
}),
|
|
4439
|
+
...(input.LabelInclusionFilters != null && {
|
|
4440
|
+
LabelInclusionFilters: serializeAws_json1_1GeneralLabelsFilterList(input.LabelInclusionFilters, context),
|
|
4441
|
+
}),
|
|
4442
|
+
};
|
|
4443
|
+
};
|
|
4397
4444
|
const serializeAws_json1_1GetCelebrityInfoRequest = (input, context) => {
|
|
4398
4445
|
return {
|
|
4399
4446
|
...(input.Id != null && { Id: input.Id }),
|
|
@@ -5434,8 +5481,42 @@ const deserializeAws_json1_1DetectFacesResponse = (output, context) => {
|
|
|
5434
5481
|
OrientationCorrection: __expectString(output.OrientationCorrection),
|
|
5435
5482
|
};
|
|
5436
5483
|
};
|
|
5484
|
+
const deserializeAws_json1_1DetectLabelsImageBackground = (output, context) => {
|
|
5485
|
+
return {
|
|
5486
|
+
DominantColors: output.DominantColors != null ? deserializeAws_json1_1DominantColors(output.DominantColors, context) : undefined,
|
|
5487
|
+
Quality: output.Quality != null ? deserializeAws_json1_1DetectLabelsImageQuality(output.Quality, context) : undefined,
|
|
5488
|
+
};
|
|
5489
|
+
};
|
|
5490
|
+
const deserializeAws_json1_1DetectLabelsImageForeground = (output, context) => {
|
|
5491
|
+
return {
|
|
5492
|
+
DominantColors: output.DominantColors != null ? deserializeAws_json1_1DominantColors(output.DominantColors, context) : undefined,
|
|
5493
|
+
Quality: output.Quality != null ? deserializeAws_json1_1DetectLabelsImageQuality(output.Quality, context) : undefined,
|
|
5494
|
+
};
|
|
5495
|
+
};
|
|
5496
|
+
const deserializeAws_json1_1DetectLabelsImageProperties = (output, context) => {
|
|
5497
|
+
return {
|
|
5498
|
+
Background: output.Background != null
|
|
5499
|
+
? deserializeAws_json1_1DetectLabelsImageBackground(output.Background, context)
|
|
5500
|
+
: undefined,
|
|
5501
|
+
DominantColors: output.DominantColors != null ? deserializeAws_json1_1DominantColors(output.DominantColors, context) : undefined,
|
|
5502
|
+
Foreground: output.Foreground != null
|
|
5503
|
+
? deserializeAws_json1_1DetectLabelsImageForeground(output.Foreground, context)
|
|
5504
|
+
: undefined,
|
|
5505
|
+
Quality: output.Quality != null ? deserializeAws_json1_1DetectLabelsImageQuality(output.Quality, context) : undefined,
|
|
5506
|
+
};
|
|
5507
|
+
};
|
|
5508
|
+
const deserializeAws_json1_1DetectLabelsImageQuality = (output, context) => {
|
|
5509
|
+
return {
|
|
5510
|
+
Brightness: __limitedParseFloat32(output.Brightness),
|
|
5511
|
+
Contrast: __limitedParseFloat32(output.Contrast),
|
|
5512
|
+
Sharpness: __limitedParseFloat32(output.Sharpness),
|
|
5513
|
+
};
|
|
5514
|
+
};
|
|
5437
5515
|
const deserializeAws_json1_1DetectLabelsResponse = (output, context) => {
|
|
5438
5516
|
return {
|
|
5517
|
+
ImageProperties: output.ImageProperties != null
|
|
5518
|
+
? deserializeAws_json1_1DetectLabelsImageProperties(output.ImageProperties, context)
|
|
5519
|
+
: undefined,
|
|
5439
5520
|
LabelModelVersion: __expectString(output.LabelModelVersion),
|
|
5440
5521
|
Labels: output.Labels != null ? deserializeAws_json1_1Labels(output.Labels, context) : undefined,
|
|
5441
5522
|
OrientationCorrection: __expectString(output.OrientationCorrection),
|
|
@@ -5470,6 +5551,28 @@ const deserializeAws_json1_1DetectTextResponse = (output, context) => {
|
|
|
5470
5551
|
const deserializeAws_json1_1DistributeDatasetEntriesResponse = (output, context) => {
|
|
5471
5552
|
return {};
|
|
5472
5553
|
};
|
|
5554
|
+
const deserializeAws_json1_1DominantColor = (output, context) => {
|
|
5555
|
+
return {
|
|
5556
|
+
Blue: __expectInt32(output.Blue),
|
|
5557
|
+
CSSColor: __expectString(output.CSSColor),
|
|
5558
|
+
Green: __expectInt32(output.Green),
|
|
5559
|
+
HexCode: __expectString(output.HexCode),
|
|
5560
|
+
PixelPercent: __limitedParseFloat32(output.PixelPercent),
|
|
5561
|
+
Red: __expectInt32(output.Red),
|
|
5562
|
+
SimplifiedColor: __expectString(output.SimplifiedColor),
|
|
5563
|
+
};
|
|
5564
|
+
};
|
|
5565
|
+
const deserializeAws_json1_1DominantColors = (output, context) => {
|
|
5566
|
+
const retVal = (output || [])
|
|
5567
|
+
.filter((e) => e != null)
|
|
5568
|
+
.map((entry) => {
|
|
5569
|
+
if (entry === null) {
|
|
5570
|
+
return null;
|
|
5571
|
+
}
|
|
5572
|
+
return deserializeAws_json1_1DominantColor(entry, context);
|
|
5573
|
+
});
|
|
5574
|
+
return retVal;
|
|
5575
|
+
};
|
|
5473
5576
|
const deserializeAws_json1_1Emotion = (output, context) => {
|
|
5474
5577
|
return {
|
|
5475
5578
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
@@ -5825,6 +5928,7 @@ const deserializeAws_json1_1Instance = (output, context) => {
|
|
|
5825
5928
|
return {
|
|
5826
5929
|
BoundingBox: output.BoundingBox != null ? deserializeAws_json1_1BoundingBox(output.BoundingBox, context) : undefined,
|
|
5827
5930
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
5931
|
+
DominantColors: output.DominantColors != null ? deserializeAws_json1_1DominantColors(output.DominantColors, context) : undefined,
|
|
5828
5932
|
};
|
|
5829
5933
|
};
|
|
5830
5934
|
const deserializeAws_json1_1Instances = (output, context) => {
|
|
@@ -5897,12 +6001,46 @@ const deserializeAws_json1_1KnownGender = (output, context) => {
|
|
|
5897
6001
|
};
|
|
5898
6002
|
const deserializeAws_json1_1Label = (output, context) => {
|
|
5899
6003
|
return {
|
|
6004
|
+
Aliases: output.Aliases != null ? deserializeAws_json1_1LabelAliases(output.Aliases, context) : undefined,
|
|
6005
|
+
Categories: output.Categories != null ? deserializeAws_json1_1LabelCategories(output.Categories, context) : undefined,
|
|
5900
6006
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
5901
6007
|
Instances: output.Instances != null ? deserializeAws_json1_1Instances(output.Instances, context) : undefined,
|
|
5902
6008
|
Name: __expectString(output.Name),
|
|
5903
6009
|
Parents: output.Parents != null ? deserializeAws_json1_1Parents(output.Parents, context) : undefined,
|
|
5904
6010
|
};
|
|
5905
6011
|
};
|
|
6012
|
+
const deserializeAws_json1_1LabelAlias = (output, context) => {
|
|
6013
|
+
return {
|
|
6014
|
+
Name: __expectString(output.Name),
|
|
6015
|
+
};
|
|
6016
|
+
};
|
|
6017
|
+
const deserializeAws_json1_1LabelAliases = (output, context) => {
|
|
6018
|
+
const retVal = (output || [])
|
|
6019
|
+
.filter((e) => e != null)
|
|
6020
|
+
.map((entry) => {
|
|
6021
|
+
if (entry === null) {
|
|
6022
|
+
return null;
|
|
6023
|
+
}
|
|
6024
|
+
return deserializeAws_json1_1LabelAlias(entry, context);
|
|
6025
|
+
});
|
|
6026
|
+
return retVal;
|
|
6027
|
+
};
|
|
6028
|
+
const deserializeAws_json1_1LabelCategories = (output, context) => {
|
|
6029
|
+
const retVal = (output || [])
|
|
6030
|
+
.filter((e) => e != null)
|
|
6031
|
+
.map((entry) => {
|
|
6032
|
+
if (entry === null) {
|
|
6033
|
+
return null;
|
|
6034
|
+
}
|
|
6035
|
+
return deserializeAws_json1_1LabelCategory(entry, context);
|
|
6036
|
+
});
|
|
6037
|
+
return retVal;
|
|
6038
|
+
};
|
|
6039
|
+
const deserializeAws_json1_1LabelCategory = (output, context) => {
|
|
6040
|
+
return {
|
|
6041
|
+
Name: __expectString(output.Name),
|
|
6042
|
+
};
|
|
6043
|
+
};
|
|
5906
6044
|
const deserializeAws_json1_1LabelDetection = (output, context) => {
|
|
5907
6045
|
return {
|
|
5908
6046
|
Label: output.Label != null ? deserializeAws_json1_1Label(output.Label, context) : undefined,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NoOpLogger } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { parseUrl } from "@aws-sdk/url-parser";
|
|
2
3
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
|
|
3
4
|
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
@@ -7,7 +8,7 @@ export const getRuntimeConfig = (config) => ({
|
|
|
7
8
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
8
9
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
9
10
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
10
|
-
logger: config?.logger ??
|
|
11
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
11
12
|
serviceId: config?.serviceId ?? "Rekognition",
|
|
12
13
|
urlParser: config?.urlParser ?? parseUrl,
|
|
13
14
|
});
|