Skip to content

Commit 6d7d0cf

Browse files
committed
feat(client-rekognitionstreaming): model update for challenge events
1 parent 9ab725b commit 6d7d0cf

File tree

5 files changed

+367
-66
lines changed

5 files changed

+367
-66
lines changed

clients/client-rekognitionstreaming/src/commands/StartFaceLivenessSessionCommand.ts

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness
4848
* <p>The maximum video size for Face Liveness is 10 MB. Face Liveness throws a
4949
* <code>ValidationException</code> if the video does not match the necessary formatting and
5050
* size parameters. </p>
51-
* <p>StartFaceLivenessSession supports the websockets and <a href="https://aws.amazon.com/sdk-for-javascript/">the AWS SDK
52-
* for JavaScript</a>.</p>
5351
* @example
5452
* Use a bare-bones client and the command you need to make an API call.
5553
* ```javascript
@@ -106,6 +104,30 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness
106104
* CurrentColorStartTimestamp: Number("long"), // required
107105
* },
108106
* },
107+
* FaceMovementChallenge: { // FaceMovementClientChallenge
108+
* ChallengeId: "STRING_VALUE", // required
109+
* VideoStartTimestamp: Number("long"),
110+
* VideoEndTimestamp: Number("long"),
111+
* InitialFace: {
112+
* BoundingBox: {
113+
* Width: Number("float"), // required
114+
* Height: Number("float"), // required
115+
* Left: Number("float"), // required
116+
* Top: Number("float"), // required
117+
* },
118+
* InitialFaceDetectedTimestamp: Number("long"), // required
119+
* },
120+
* TargetFace: {
121+
* BoundingBox: {
122+
* Width: Number("float"), // required
123+
* Height: Number("float"), // required
124+
* Left: Number("float"), // required
125+
* Top: Number("float"), // required
126+
* },
127+
* FaceDetectedInTargetPositionStartTimestamp: Number("long"), // required
128+
* FaceDetectedInTargetPositionEndTimestamp: Number("long"), // required
129+
* },
130+
* },
109131
* },
110132
* },
111133
* },
@@ -151,12 +173,37 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness
151173
* // },
152174
* // ],
153175
* // },
176+
* // FaceMovementChallenge: { // FaceMovementServerChallenge
177+
* // OvalParameters: {
178+
* // Width: Number("float"), // required
179+
* // Height: Number("float"), // required
180+
* // CenterX: Number("float"), // required
181+
* // CenterY: Number("float"), // required
182+
* // },
183+
* // ChallengeConfig: {
184+
* // BlazeFaceDetectionThreshold: Number("float"),
185+
* // FaceDistanceThresholdMin: Number("float"),
186+
* // FaceDistanceThreshold: Number("float"),
187+
* // FaceDistanceThresholdMax: Number("float"),
188+
* // OvalIouThreshold: Number("float"),
189+
* // OvalHeightWidthRatio: Number("float"),
190+
* // OvalIouWidthThreshold: Number("float"),
191+
* // OvalIouHeightThreshold: Number("float"),
192+
* // FaceIouWidthThreshold: Number("float"),
193+
* // FaceIouHeightThreshold: Number("float"),
194+
* // OvalFitTimeout: Number("int"),
195+
* // },
196+
* // },
154197
* // },
155198
* // },
156199
* // },
157200
* // DisconnectionEvent: { // DisconnectionEvent
158201
* // TimestampMillis: Number("long"), // required
159202
* // },
203+
* // ChallengeEvent: { // ChallengeEvent
204+
* // Version: "STRING_VALUE", // required
205+
* // Type: "FaceMovementAndLightChallenge" || "FaceMovementChallenge", // required
206+
* // },
160207
* // ValidationException: { // ValidationException
161208
* // Message: "STRING_VALUE",
162209
* // Code: "STRING_VALUE",

clients/client-rekognitionstreaming/src/endpoint/ruleset.ts

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,27 @@ import { RuleSetObject } from "@smithy/types";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/rekognitionstreaming.json */
88

9-
const q="required",
10-
r="fn",
11-
s="argv",
12-
t="ref";
13-
const a="isSet",
14-
b="tree",
15-
c="error",
16-
d="endpoint",
17-
e="PartitionResult",
18-
f={[q]:false,"type":"String"},
19-
g={[q]:true,"default":false,"type":"Boolean"},
20-
h={[t]:"Endpoint"},
21-
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
22-
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
23-
k={},
24-
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
25-
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
26-
n=[i],
27-
o=[j],
28-
p=[{[t]:"Region"}];
29-
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
9+
const s="required",
10+
t="fn",
11+
u="argv",
12+
v="ref";
13+
const a=true,
14+
b="isSet",
15+
c="booleanEquals",
16+
d="error",
17+
e="endpoint",
18+
f="tree",
19+
g="PartitionResult",
20+
h={[s]:false,"type":"String"},
21+
i={[s]:true,"default":false,"type":"Boolean"},
22+
j={[v]:"Endpoint"},
23+
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
24+
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},
25+
m={},
26+
n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},
27+
o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},
28+
p=[k],
29+
q=[l],
30+
r=[{[v]:"Region"}];
31+
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f}],type:f},{rules:[{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]};
3032
export const ruleSet: RuleSetObject = _data;

0 commit comments

Comments
 (0)