@stacksjs/ts-cloud 0.1.3 → 0.1.5
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 +98 -13
- package/dist/aws/acm.d.ts +129 -0
- package/dist/aws/application-autoscaling.d.ts +282 -0
- package/dist/aws/bedrock.d.ts +2292 -0
- package/dist/aws/client.d.ts +79 -0
- package/dist/aws/cloudformation.d.ts +105 -0
- package/dist/aws/cloudfront.d.ts +265 -0
- package/dist/aws/cloudwatch-logs.d.ts +48 -0
- package/dist/aws/comprehend.d.ts +505 -0
- package/dist/aws/connect.d.ts +377 -0
- package/dist/aws/deploy-imap.d.ts +14 -0
- package/dist/aws/dynamodb.d.ts +176 -0
- package/dist/aws/ec2.d.ts +272 -0
- package/dist/aws/ecr.d.ts +149 -0
- package/dist/aws/ecs.d.ts +162 -0
- package/dist/aws/elasticache.d.ts +71 -0
- package/dist/aws/elbv2.d.ts +248 -0
- package/dist/aws/email.d.ts +175 -0
- package/dist/aws/eventbridge.d.ts +142 -0
- package/dist/aws/iam.d.ts +638 -0
- package/dist/aws/imap-server.d.ts +119 -0
- package/{src/aws/index.ts → dist/aws/index.d.ts} +62 -83
- package/{src/aws/kendra.ts → dist/aws/kendra.d.ts} +71 -386
- package/dist/aws/lambda.d.ts +232 -0
- package/dist/aws/opensearch.d.ts +87 -0
- package/dist/aws/personalize.d.ts +516 -0
- package/dist/aws/polly.d.ts +214 -0
- package/dist/aws/rds.d.ts +240 -0
- package/dist/aws/rekognition.d.ts +543 -0
- package/dist/aws/route53-domains.d.ts +113 -0
- package/dist/aws/route53.d.ts +215 -0
- package/dist/aws/s3.d.ts +212 -0
- package/dist/aws/scheduler.d.ts +140 -0
- package/dist/aws/secrets-manager.d.ts +170 -0
- package/dist/aws/ses.d.ts +288 -0
- package/dist/aws/setup-phone.d.ts +0 -0
- package/dist/aws/setup-sms.d.ts +115 -0
- package/dist/aws/sms.d.ts +304 -0
- package/dist/aws/smtp-server.d.ts +61 -0
- package/dist/aws/sns.d.ts +117 -0
- package/dist/aws/sqs.d.ts +65 -0
- package/dist/aws/ssm.d.ts +179 -0
- package/dist/aws/sts.d.ts +15 -0
- package/dist/aws/support.d.ts +104 -0
- package/dist/aws/test-imap.d.ts +0 -0
- package/dist/aws/textract.d.ts +403 -0
- package/dist/aws/transcribe.d.ts +60 -0
- package/dist/aws/translate.d.ts +358 -0
- package/dist/aws/voice.d.ts +219 -0
- package/dist/bin/cli.js +1724 -0
- package/dist/config.d.ts +7 -0
- package/dist/deploy/index.d.ts +2 -0
- package/dist/deploy/static-site-external-dns.d.ts +51 -0
- package/dist/deploy/static-site.d.ts +71 -0
- package/dist/dns/cloudflare.d.ts +52 -0
- package/dist/dns/godaddy.d.ts +38 -0
- package/dist/dns/index.d.ts +45 -0
- package/dist/dns/porkbun.d.ts +18 -0
- package/dist/dns/route53-adapter.d.ts +38 -0
- package/{src/dns/types.ts → dist/dns/types.d.ts} +26 -63
- package/dist/dns/validator.d.ts +78 -0
- package/dist/generators/index.d.ts +1 -0
- package/dist/generators/infrastructure.d.ts +30 -0
- package/{src/index.ts → dist/index.d.ts} +70 -93
- package/dist/index.js +7881 -0
- package/dist/push/apns.d.ts +60 -0
- package/dist/push/fcm.d.ts +117 -0
- package/dist/push/index.d.ts +14 -0
- package/dist/security/pre-deploy-scanner.d.ts +69 -0
- package/dist/ssl/acme-client.d.ts +67 -0
- package/dist/ssl/index.d.ts +2 -0
- package/dist/ssl/letsencrypt.d.ts +48 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/cli.d.ts +123 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/template.d.ts +23 -0
- package/package.json +8 -8
- package/bin/cli.ts +0 -133
- package/bin/commands/analytics.ts +0 -328
- package/bin/commands/api.ts +0 -379
- package/bin/commands/assets.ts +0 -221
- package/bin/commands/audit.ts +0 -501
- package/bin/commands/backup.ts +0 -682
- package/bin/commands/cache.ts +0 -294
- package/bin/commands/cdn.ts +0 -281
- package/bin/commands/config.ts +0 -202
- package/bin/commands/container.ts +0 -105
- package/bin/commands/cost.ts +0 -208
- package/bin/commands/database.ts +0 -401
- package/bin/commands/deploy.ts +0 -674
- package/bin/commands/domain.ts +0 -397
- package/bin/commands/email.ts +0 -423
- package/bin/commands/environment.ts +0 -285
- package/bin/commands/events.ts +0 -424
- package/bin/commands/firewall.ts +0 -145
- package/bin/commands/function.ts +0 -116
- package/bin/commands/generate.ts +0 -280
- package/bin/commands/git.ts +0 -139
- package/bin/commands/iam.ts +0 -464
- package/bin/commands/index.ts +0 -48
- package/bin/commands/init.ts +0 -120
- package/bin/commands/logs.ts +0 -148
- package/bin/commands/network.ts +0 -579
- package/bin/commands/notify.ts +0 -489
- package/bin/commands/queue.ts +0 -407
- package/bin/commands/scheduler.ts +0 -370
- package/bin/commands/secrets.ts +0 -54
- package/bin/commands/server.ts +0 -629
- package/bin/commands/shared.ts +0 -97
- package/bin/commands/ssl.ts +0 -138
- package/bin/commands/stack.ts +0 -325
- package/bin/commands/status.ts +0 -385
- package/bin/commands/storage.ts +0 -450
- package/bin/commands/team.ts +0 -96
- package/bin/commands/tunnel.ts +0 -489
- package/bin/commands/utils.ts +0 -202
- package/build.ts +0 -15
- package/cloud +0 -2
- package/src/aws/acm.ts +0 -768
- package/src/aws/application-autoscaling.ts +0 -845
- package/src/aws/bedrock.ts +0 -4074
- package/src/aws/client.ts +0 -878
- package/src/aws/cloudformation.ts +0 -896
- package/src/aws/cloudfront.ts +0 -1531
- package/src/aws/cloudwatch-logs.ts +0 -154
- package/src/aws/comprehend.ts +0 -839
- package/src/aws/connect.ts +0 -1056
- package/src/aws/deploy-imap.ts +0 -384
- package/src/aws/dynamodb.ts +0 -340
- package/src/aws/ec2.ts +0 -1385
- package/src/aws/ecr.ts +0 -621
- package/src/aws/ecs.ts +0 -615
- package/src/aws/elasticache.ts +0 -301
- package/src/aws/elbv2.ts +0 -942
- package/src/aws/email.ts +0 -928
- package/src/aws/eventbridge.ts +0 -248
- package/src/aws/iam.ts +0 -1689
- package/src/aws/imap-server.ts +0 -2100
- package/src/aws/lambda.ts +0 -786
- package/src/aws/opensearch.ts +0 -158
- package/src/aws/personalize.ts +0 -977
- package/src/aws/polly.ts +0 -559
- package/src/aws/rds.ts +0 -888
- package/src/aws/rekognition.ts +0 -846
- package/src/aws/route53-domains.ts +0 -359
- package/src/aws/route53.ts +0 -1046
- package/src/aws/s3.ts +0 -2318
- package/src/aws/scheduler.ts +0 -571
- package/src/aws/secrets-manager.ts +0 -769
- package/src/aws/ses.ts +0 -1081
- package/src/aws/setup-phone.ts +0 -104
- package/src/aws/setup-sms.ts +0 -580
- package/src/aws/sms.ts +0 -1735
- package/src/aws/smtp-server.ts +0 -531
- package/src/aws/sns.ts +0 -758
- package/src/aws/sqs.ts +0 -382
- package/src/aws/ssm.ts +0 -807
- package/src/aws/sts.ts +0 -92
- package/src/aws/support.ts +0 -391
- package/src/aws/test-imap.ts +0 -86
- package/src/aws/textract.ts +0 -780
- package/src/aws/transcribe.ts +0 -108
- package/src/aws/translate.ts +0 -641
- package/src/aws/voice.ts +0 -1379
- package/src/config.ts +0 -35
- package/src/deploy/index.ts +0 -7
- package/src/deploy/static-site-external-dns.ts +0 -906
- package/src/deploy/static-site.ts +0 -1125
- package/src/dns/godaddy.ts +0 -412
- package/src/dns/index.ts +0 -183
- package/src/dns/porkbun.ts +0 -362
- package/src/dns/route53-adapter.ts +0 -414
- package/src/dns/validator.ts +0 -369
- package/src/generators/index.ts +0 -5
- package/src/generators/infrastructure.ts +0 -1660
- package/src/push/apns.ts +0 -452
- package/src/push/fcm.ts +0 -506
- package/src/push/index.ts +0 -58
- package/src/ssl/acme-client.ts +0 -478
- package/src/ssl/index.ts +0 -7
- package/src/ssl/letsencrypt.ts +0 -747
- package/src/types.ts +0 -2
- package/src/utils/cli.ts +0 -398
- package/src/validation/index.ts +0 -5
- package/src/validation/template.ts +0 -405
- package/test/index.test.ts +0 -128
- package/tsconfig.json +0 -18
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import { AWSClient } from './client';
|
|
2
|
+
/**
|
|
3
|
+
* Quick image label detection from S3
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectLabelsFromS3(bucket: string, key: string, options?: { region?: string; maxLabels?: number }): Promise<string[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Quick face count from S3 image
|
|
8
|
+
*/
|
|
9
|
+
export declare function countFacesInS3Image(bucket: string, key: string, region?: string): Promise<number>;
|
|
10
|
+
/**
|
|
11
|
+
* Quick content moderation check
|
|
12
|
+
*/
|
|
13
|
+
export declare function isContentSafe(bucket: string, key: string, options?: { region?: string; threshold?: number }): Promise<boolean>;
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Types
|
|
16
|
+
// ============================================================================
|
|
17
|
+
export declare interface S3Object {
|
|
18
|
+
Bucket?: string
|
|
19
|
+
Name?: string
|
|
20
|
+
Version?: string
|
|
21
|
+
}
|
|
22
|
+
export declare interface Image {
|
|
23
|
+
Bytes?: Uint8Array
|
|
24
|
+
S3Object?: S3Object
|
|
25
|
+
}
|
|
26
|
+
export declare interface Video {
|
|
27
|
+
S3Object?: S3Object
|
|
28
|
+
}
|
|
29
|
+
export declare interface BoundingBox {
|
|
30
|
+
Width?: number
|
|
31
|
+
Height?: number
|
|
32
|
+
Left?: number
|
|
33
|
+
Top?: number
|
|
34
|
+
}
|
|
35
|
+
export declare interface Landmark {
|
|
36
|
+
Type?: string
|
|
37
|
+
X?: number
|
|
38
|
+
Y?: number
|
|
39
|
+
}
|
|
40
|
+
export declare interface Pose {
|
|
41
|
+
Roll?: number
|
|
42
|
+
Yaw?: number
|
|
43
|
+
Pitch?: number
|
|
44
|
+
}
|
|
45
|
+
export declare interface ImageQuality {
|
|
46
|
+
Brightness?: number
|
|
47
|
+
Sharpness?: number
|
|
48
|
+
}
|
|
49
|
+
export declare interface Emotion {
|
|
50
|
+
Type?: 'HAPPY' | 'SAD' | 'ANGRY' | 'CONFUSED' | 'DISGUSTED' | 'SURPRISED' | 'CALM' | 'UNKNOWN' | 'FEAR'
|
|
51
|
+
Confidence?: number
|
|
52
|
+
}
|
|
53
|
+
export declare interface FaceDetail {
|
|
54
|
+
BoundingBox?: BoundingBox
|
|
55
|
+
AgeRange?: { Low?: number; High?: number }
|
|
56
|
+
Smile?: { Value?: boolean; Confidence?: number }
|
|
57
|
+
Eyeglasses?: { Value?: boolean; Confidence?: number }
|
|
58
|
+
Sunglasses?: { Value?: boolean; Confidence?: number }
|
|
59
|
+
Gender?: { Value?: 'Male' | 'Female'; Confidence?: number }
|
|
60
|
+
Beard?: { Value?: boolean; Confidence?: number }
|
|
61
|
+
Mustache?: { Value?: boolean; Confidence?: number }
|
|
62
|
+
EyesOpen?: { Value?: boolean; Confidence?: number }
|
|
63
|
+
MouthOpen?: { Value?: boolean; Confidence?: number }
|
|
64
|
+
Emotions?: Emotion[]
|
|
65
|
+
Landmarks?: Landmark[]
|
|
66
|
+
Pose?: Pose
|
|
67
|
+
Quality?: ImageQuality
|
|
68
|
+
Confidence?: number
|
|
69
|
+
FaceOccluded?: { Value?: boolean; Confidence?: number }
|
|
70
|
+
EyeDirection?: { Yaw?: number; Pitch?: number; Confidence?: number }
|
|
71
|
+
}
|
|
72
|
+
export declare interface DetectFacesCommandInput {
|
|
73
|
+
Image: Image
|
|
74
|
+
Attributes?: ('DEFAULT' | 'ALL' | 'AGE_RANGE' | 'BEARD' | 'EMOTIONS' | 'EYE_DIRECTION' | 'EYEGLASSES' | 'EYES_OPEN' | 'FACE_OCCLUDED' | 'GENDER' | 'MOUTH_OPEN' | 'MUSTACHE' | 'POSE' | 'QUALITY' | 'SMILE' | 'SUNGLASSES')[]
|
|
75
|
+
}
|
|
76
|
+
export declare interface DetectFacesCommandOutput {
|
|
77
|
+
FaceDetails?: FaceDetail[]
|
|
78
|
+
OrientationCorrection?: 'ROTATE_0' | 'ROTATE_90' | 'ROTATE_180' | 'ROTATE_270'
|
|
79
|
+
}
|
|
80
|
+
export declare interface Label {
|
|
81
|
+
Name?: string
|
|
82
|
+
Confidence?: number
|
|
83
|
+
Instances?: Array<{
|
|
84
|
+
BoundingBox?: BoundingBox
|
|
85
|
+
Confidence?: number
|
|
86
|
+
DominantColors?: Array<{
|
|
87
|
+
Red?: number
|
|
88
|
+
Green?: number
|
|
89
|
+
Blue?: number
|
|
90
|
+
HexCode?: string
|
|
91
|
+
SimplifiedColor?: string
|
|
92
|
+
CSSColor?: string
|
|
93
|
+
PixelPercent?: number
|
|
94
|
+
}>
|
|
95
|
+
}>
|
|
96
|
+
Parents?: Array<{ Name?: string }>
|
|
97
|
+
Aliases?: Array<{ Name?: string }>
|
|
98
|
+
Categories?: Array<{ Name?: string }>
|
|
99
|
+
}
|
|
100
|
+
export declare interface DetectLabelsCommandInput {
|
|
101
|
+
Image: Image
|
|
102
|
+
MaxLabels?: number
|
|
103
|
+
MinConfidence?: number
|
|
104
|
+
Features?: ('GENERAL_LABELS' | 'IMAGE_PROPERTIES')[]
|
|
105
|
+
Settings?: {
|
|
106
|
+
GeneralLabels?: {
|
|
107
|
+
LabelInclusionFilters?: string[]
|
|
108
|
+
LabelExclusionFilters?: string[]
|
|
109
|
+
LabelCategoryInclusionFilters?: string[]
|
|
110
|
+
LabelCategoryExclusionFilters?: string[]
|
|
111
|
+
}
|
|
112
|
+
ImageProperties?: {
|
|
113
|
+
MaxDominantColors?: number
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export declare interface DetectLabelsCommandOutput {
|
|
118
|
+
Labels?: Label[]
|
|
119
|
+
OrientationCorrection?: string
|
|
120
|
+
LabelModelVersion?: string
|
|
121
|
+
ImageProperties?: {
|
|
122
|
+
Quality?: {
|
|
123
|
+
Brightness?: number
|
|
124
|
+
Sharpness?: number
|
|
125
|
+
Contrast?: number
|
|
126
|
+
}
|
|
127
|
+
DominantColors?: Array<{
|
|
128
|
+
Red?: number
|
|
129
|
+
Green?: number
|
|
130
|
+
Blue?: number
|
|
131
|
+
HexCode?: string
|
|
132
|
+
SimplifiedColor?: string
|
|
133
|
+
CSSColor?: string
|
|
134
|
+
PixelPercent?: number
|
|
135
|
+
}>
|
|
136
|
+
Foreground?: {
|
|
137
|
+
Quality?: { Brightness?: number; Sharpness?: number }
|
|
138
|
+
DominantColors?: Array<{
|
|
139
|
+
Red?: number
|
|
140
|
+
Green?: number
|
|
141
|
+
Blue?: number
|
|
142
|
+
HexCode?: string
|
|
143
|
+
CSSColor?: string
|
|
144
|
+
PixelPercent?: number
|
|
145
|
+
}>
|
|
146
|
+
}
|
|
147
|
+
Background?: {
|
|
148
|
+
Quality?: { Brightness?: number; Sharpness?: number }
|
|
149
|
+
DominantColors?: Array<{
|
|
150
|
+
Red?: number
|
|
151
|
+
Green?: number
|
|
152
|
+
Blue?: number
|
|
153
|
+
HexCode?: string
|
|
154
|
+
CSSColor?: string
|
|
155
|
+
PixelPercent?: number
|
|
156
|
+
}>
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export declare interface DetectTextCommandInput {
|
|
161
|
+
Image: Image
|
|
162
|
+
Filters?: {
|
|
163
|
+
WordFilter?: {
|
|
164
|
+
MinConfidence?: number
|
|
165
|
+
MinBoundingBoxHeight?: number
|
|
166
|
+
MinBoundingBoxWidth?: number
|
|
167
|
+
}
|
|
168
|
+
RegionsOfInterest?: Array<{
|
|
169
|
+
BoundingBox?: BoundingBox
|
|
170
|
+
Polygon?: Array<{ X?: number; Y?: number }>
|
|
171
|
+
}>
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
export declare interface TextDetection {
|
|
175
|
+
DetectedText?: string
|
|
176
|
+
Type?: 'LINE' | 'WORD'
|
|
177
|
+
Id?: number
|
|
178
|
+
ParentId?: number
|
|
179
|
+
Confidence?: number
|
|
180
|
+
Geometry?: {
|
|
181
|
+
BoundingBox?: BoundingBox
|
|
182
|
+
Polygon?: Array<{ X?: number; Y?: number }>
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export declare interface DetectTextCommandOutput {
|
|
186
|
+
TextDetections?: TextDetection[]
|
|
187
|
+
TextModelVersion?: string
|
|
188
|
+
}
|
|
189
|
+
export declare interface DetectModerationLabelsCommandInput {
|
|
190
|
+
Image: Image
|
|
191
|
+
MinConfidence?: number
|
|
192
|
+
HumanLoopConfig?: {
|
|
193
|
+
HumanLoopName: string
|
|
194
|
+
FlowDefinitionArn: string
|
|
195
|
+
DataAttributes?: {
|
|
196
|
+
ContentClassifiers?: ('FreeOfPersonallyIdentifiableInformation' | 'FreeOfAdultContent')[]
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
ProjectVersion?: string
|
|
200
|
+
}
|
|
201
|
+
export declare interface ModerationLabel {
|
|
202
|
+
Confidence?: number
|
|
203
|
+
Name?: string
|
|
204
|
+
ParentName?: string
|
|
205
|
+
TaxonomyLevel?: number
|
|
206
|
+
}
|
|
207
|
+
export declare interface DetectModerationLabelsCommandOutput {
|
|
208
|
+
ModerationLabels?: ModerationLabel[]
|
|
209
|
+
ModerationModelVersion?: string
|
|
210
|
+
HumanLoopActivationOutput?: {
|
|
211
|
+
HumanLoopArn?: string
|
|
212
|
+
HumanLoopActivationReasons?: string[]
|
|
213
|
+
HumanLoopActivationConditionsEvaluationResults?: string
|
|
214
|
+
}
|
|
215
|
+
ProjectVersion?: string
|
|
216
|
+
ContentTypes?: Array<{
|
|
217
|
+
Confidence?: number
|
|
218
|
+
Name?: string
|
|
219
|
+
}>
|
|
220
|
+
}
|
|
221
|
+
export declare interface Celebrity {
|
|
222
|
+
Urls?: string[]
|
|
223
|
+
Name?: string
|
|
224
|
+
Id?: string
|
|
225
|
+
Face?: {
|
|
226
|
+
BoundingBox?: BoundingBox
|
|
227
|
+
Confidence?: number
|
|
228
|
+
Landmarks?: Landmark[]
|
|
229
|
+
Pose?: Pose
|
|
230
|
+
Quality?: ImageQuality
|
|
231
|
+
Emotions?: Emotion[]
|
|
232
|
+
Smile?: { Value?: boolean; Confidence?: number }
|
|
233
|
+
}
|
|
234
|
+
MatchConfidence?: number
|
|
235
|
+
KnownGender?: { Type?: 'Male' | 'Female' | 'Nonbinary' | 'Unlisted' }
|
|
236
|
+
}
|
|
237
|
+
export declare interface RecognizeCelebritiesCommandInput {
|
|
238
|
+
Image: Image
|
|
239
|
+
}
|
|
240
|
+
export declare interface RecognizeCelebritiesCommandOutput {
|
|
241
|
+
CelebrityFaces?: Celebrity[]
|
|
242
|
+
UnrecognizedFaces?: FaceDetail[]
|
|
243
|
+
OrientationCorrection?: string
|
|
244
|
+
}
|
|
245
|
+
export declare interface CompareFacesCommandInput {
|
|
246
|
+
SourceImage: Image
|
|
247
|
+
TargetImage: Image
|
|
248
|
+
SimilarityThreshold?: number
|
|
249
|
+
QualityFilter?: 'NONE' | 'AUTO' | 'LOW' | 'MEDIUM' | 'HIGH'
|
|
250
|
+
}
|
|
251
|
+
export declare interface CompareFacesMatch {
|
|
252
|
+
Similarity?: number
|
|
253
|
+
Face?: {
|
|
254
|
+
BoundingBox?: BoundingBox
|
|
255
|
+
Confidence?: number
|
|
256
|
+
Landmarks?: Landmark[]
|
|
257
|
+
Pose?: Pose
|
|
258
|
+
Quality?: ImageQuality
|
|
259
|
+
Emotions?: Emotion[]
|
|
260
|
+
Smile?: { Value?: boolean; Confidence?: number }
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
export declare interface CompareFacesCommandOutput {
|
|
264
|
+
SourceImageFace?: {
|
|
265
|
+
BoundingBox?: BoundingBox
|
|
266
|
+
Confidence?: number
|
|
267
|
+
}
|
|
268
|
+
FaceMatches?: CompareFacesMatch[]
|
|
269
|
+
UnmatchedFaces?: FaceDetail[]
|
|
270
|
+
SourceImageOrientationCorrection?: string
|
|
271
|
+
TargetImageOrientationCorrection?: string
|
|
272
|
+
}
|
|
273
|
+
export declare interface CreateCollectionCommandInput {
|
|
274
|
+
CollectionId: string
|
|
275
|
+
Tags?: Record<string, string>
|
|
276
|
+
}
|
|
277
|
+
export declare interface CreateCollectionCommandOutput {
|
|
278
|
+
StatusCode?: number
|
|
279
|
+
CollectionArn?: string
|
|
280
|
+
FaceModelVersion?: string
|
|
281
|
+
}
|
|
282
|
+
export declare interface DeleteCollectionCommandInput {
|
|
283
|
+
CollectionId: string
|
|
284
|
+
}
|
|
285
|
+
export declare interface DeleteCollectionCommandOutput {
|
|
286
|
+
StatusCode?: number
|
|
287
|
+
}
|
|
288
|
+
export declare interface ListCollectionsCommandInput {
|
|
289
|
+
NextToken?: string
|
|
290
|
+
MaxResults?: number
|
|
291
|
+
}
|
|
292
|
+
export declare interface ListCollectionsCommandOutput {
|
|
293
|
+
CollectionIds?: string[]
|
|
294
|
+
NextToken?: string
|
|
295
|
+
FaceModelVersions?: string[]
|
|
296
|
+
}
|
|
297
|
+
export declare interface IndexFacesCommandInput {
|
|
298
|
+
CollectionId: string
|
|
299
|
+
Image: Image
|
|
300
|
+
ExternalImageId?: string
|
|
301
|
+
DetectionAttributes?: ('DEFAULT' | 'ALL')[]
|
|
302
|
+
MaxFaces?: number
|
|
303
|
+
QualityFilter?: 'NONE' | 'AUTO' | 'LOW' | 'MEDIUM' | 'HIGH'
|
|
304
|
+
}
|
|
305
|
+
export declare interface FaceRecord {
|
|
306
|
+
Face?: {
|
|
307
|
+
FaceId?: string
|
|
308
|
+
BoundingBox?: BoundingBox
|
|
309
|
+
ImageId?: string
|
|
310
|
+
ExternalImageId?: string
|
|
311
|
+
Confidence?: number
|
|
312
|
+
IndexFacesModelVersion?: string
|
|
313
|
+
}
|
|
314
|
+
FaceDetail?: FaceDetail
|
|
315
|
+
}
|
|
316
|
+
export declare interface IndexFacesCommandOutput {
|
|
317
|
+
FaceRecords?: FaceRecord[]
|
|
318
|
+
OrientationCorrection?: string
|
|
319
|
+
FaceModelVersion?: string
|
|
320
|
+
UnindexedFaces?: Array<{
|
|
321
|
+
Reasons?: ('EXCEEDS_MAX_FACES' | 'EXTREME_POSE' | 'LOW_BRIGHTNESS' | 'LOW_SHARPNESS' | 'LOW_CONFIDENCE' | 'SMALL_BOUNDING_BOX' | 'LOW_FACE_QUALITY')[]
|
|
322
|
+
FaceDetail?: FaceDetail
|
|
323
|
+
}>
|
|
324
|
+
}
|
|
325
|
+
export declare interface SearchFacesByImageCommandInput {
|
|
326
|
+
CollectionId: string
|
|
327
|
+
Image: Image
|
|
328
|
+
MaxFaces?: number
|
|
329
|
+
FaceMatchThreshold?: number
|
|
330
|
+
QualityFilter?: 'NONE' | 'AUTO' | 'LOW' | 'MEDIUM' | 'HIGH'
|
|
331
|
+
}
|
|
332
|
+
export declare interface FaceMatch {
|
|
333
|
+
Similarity?: number
|
|
334
|
+
Face?: {
|
|
335
|
+
FaceId?: string
|
|
336
|
+
BoundingBox?: BoundingBox
|
|
337
|
+
ImageId?: string
|
|
338
|
+
ExternalImageId?: string
|
|
339
|
+
Confidence?: number
|
|
340
|
+
IndexFacesModelVersion?: string
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
export declare interface SearchFacesByImageCommandOutput {
|
|
344
|
+
SearchedFaceBoundingBox?: BoundingBox
|
|
345
|
+
SearchedFaceConfidence?: number
|
|
346
|
+
FaceMatches?: FaceMatch[]
|
|
347
|
+
FaceModelVersion?: string
|
|
348
|
+
}
|
|
349
|
+
export declare interface SearchFacesCommandInput {
|
|
350
|
+
CollectionId: string
|
|
351
|
+
FaceId: string
|
|
352
|
+
MaxFaces?: number
|
|
353
|
+
FaceMatchThreshold?: number
|
|
354
|
+
}
|
|
355
|
+
export declare interface SearchFacesCommandOutput {
|
|
356
|
+
SearchedFaceId?: string
|
|
357
|
+
FaceMatches?: FaceMatch[]
|
|
358
|
+
FaceModelVersion?: string
|
|
359
|
+
}
|
|
360
|
+
export declare interface StartLabelDetectionCommandInput {
|
|
361
|
+
Video: Video
|
|
362
|
+
ClientRequestToken?: string
|
|
363
|
+
MinConfidence?: number
|
|
364
|
+
NotificationChannel?: {
|
|
365
|
+
SNSTopicArn: string
|
|
366
|
+
RoleArn: string
|
|
367
|
+
}
|
|
368
|
+
JobTag?: string
|
|
369
|
+
Features?: ('GENERAL_LABELS' | 'IMAGE_PROPERTIES')[]
|
|
370
|
+
Settings?: {
|
|
371
|
+
GeneralLabels?: {
|
|
372
|
+
LabelInclusionFilters?: string[]
|
|
373
|
+
LabelExclusionFilters?: string[]
|
|
374
|
+
LabelCategoryInclusionFilters?: string[]
|
|
375
|
+
LabelCategoryExclusionFilters?: string[]
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
export declare interface StartLabelDetectionCommandOutput {
|
|
380
|
+
JobId?: string
|
|
381
|
+
}
|
|
382
|
+
export declare interface GetLabelDetectionCommandInput {
|
|
383
|
+
JobId: string
|
|
384
|
+
MaxResults?: number
|
|
385
|
+
NextToken?: string
|
|
386
|
+
SortBy?: 'NAME' | 'TIMESTAMP'
|
|
387
|
+
AggregateBy?: 'TIMESTAMPS' | 'SEGMENTS'
|
|
388
|
+
}
|
|
389
|
+
export declare interface LabelDetection {
|
|
390
|
+
Timestamp?: number
|
|
391
|
+
Label?: Label
|
|
392
|
+
StartTimestampMillis?: number
|
|
393
|
+
EndTimestampMillis?: number
|
|
394
|
+
DurationMillis?: number
|
|
395
|
+
}
|
|
396
|
+
export declare interface GetLabelDetectionCommandOutput {
|
|
397
|
+
JobStatus?: 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED'
|
|
398
|
+
StatusMessage?: string
|
|
399
|
+
VideoMetadata?: {
|
|
400
|
+
Codec?: string
|
|
401
|
+
DurationMillis?: number
|
|
402
|
+
Format?: string
|
|
403
|
+
FrameRate?: number
|
|
404
|
+
FrameHeight?: number
|
|
405
|
+
FrameWidth?: number
|
|
406
|
+
ColorRange?: string
|
|
407
|
+
}
|
|
408
|
+
NextToken?: string
|
|
409
|
+
Labels?: LabelDetection[]
|
|
410
|
+
LabelModelVersion?: string
|
|
411
|
+
JobId?: string
|
|
412
|
+
Video?: { S3Object?: S3Object }
|
|
413
|
+
JobTag?: string
|
|
414
|
+
GetRequestMetadata?: {
|
|
415
|
+
SortBy?: string
|
|
416
|
+
AggregateBy?: string
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
export declare interface StartFaceDetectionCommandInput {
|
|
420
|
+
Video: Video
|
|
421
|
+
ClientRequestToken?: string
|
|
422
|
+
NotificationChannel?: {
|
|
423
|
+
SNSTopicArn: string
|
|
424
|
+
RoleArn: string
|
|
425
|
+
}
|
|
426
|
+
FaceAttributes?: 'DEFAULT' | 'ALL'
|
|
427
|
+
JobTag?: string
|
|
428
|
+
}
|
|
429
|
+
export declare interface StartFaceDetectionCommandOutput {
|
|
430
|
+
JobId?: string
|
|
431
|
+
}
|
|
432
|
+
export declare interface GetFaceDetectionCommandInput {
|
|
433
|
+
JobId: string
|
|
434
|
+
MaxResults?: number
|
|
435
|
+
NextToken?: string
|
|
436
|
+
}
|
|
437
|
+
export declare interface FaceDetection {
|
|
438
|
+
Timestamp?: number
|
|
439
|
+
Face?: FaceDetail
|
|
440
|
+
}
|
|
441
|
+
export declare interface GetFaceDetectionCommandOutput {
|
|
442
|
+
JobStatus?: 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED'
|
|
443
|
+
StatusMessage?: string
|
|
444
|
+
VideoMetadata?: {
|
|
445
|
+
Codec?: string
|
|
446
|
+
DurationMillis?: number
|
|
447
|
+
Format?: string
|
|
448
|
+
FrameRate?: number
|
|
449
|
+
FrameHeight?: number
|
|
450
|
+
FrameWidth?: number
|
|
451
|
+
}
|
|
452
|
+
NextToken?: string
|
|
453
|
+
Faces?: FaceDetection[]
|
|
454
|
+
JobId?: string
|
|
455
|
+
Video?: { S3Object?: S3Object }
|
|
456
|
+
JobTag?: string
|
|
457
|
+
}
|
|
458
|
+
export declare interface StartContentModerationCommandInput {
|
|
459
|
+
Video: Video
|
|
460
|
+
MinConfidence?: number
|
|
461
|
+
ClientRequestToken?: string
|
|
462
|
+
NotificationChannel?: {
|
|
463
|
+
SNSTopicArn: string
|
|
464
|
+
RoleArn: string
|
|
465
|
+
}
|
|
466
|
+
JobTag?: string
|
|
467
|
+
}
|
|
468
|
+
export declare interface StartContentModerationCommandOutput {
|
|
469
|
+
JobId?: string
|
|
470
|
+
}
|
|
471
|
+
export declare interface GetContentModerationCommandInput {
|
|
472
|
+
JobId: string
|
|
473
|
+
MaxResults?: number
|
|
474
|
+
NextToken?: string
|
|
475
|
+
SortBy?: 'NAME' | 'TIMESTAMP'
|
|
476
|
+
AggregateBy?: 'TIMESTAMPS' | 'SEGMENTS'
|
|
477
|
+
}
|
|
478
|
+
export declare interface ContentModerationDetection {
|
|
479
|
+
Timestamp?: number
|
|
480
|
+
ModerationLabel?: ModerationLabel
|
|
481
|
+
StartTimestampMillis?: number
|
|
482
|
+
EndTimestampMillis?: number
|
|
483
|
+
DurationMillis?: number
|
|
484
|
+
ContentTypes?: Array<{
|
|
485
|
+
Confidence?: number
|
|
486
|
+
Name?: string
|
|
487
|
+
}>
|
|
488
|
+
}
|
|
489
|
+
export declare interface GetContentModerationCommandOutput {
|
|
490
|
+
JobStatus?: 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED'
|
|
491
|
+
StatusMessage?: string
|
|
492
|
+
VideoMetadata?: {
|
|
493
|
+
Codec?: string
|
|
494
|
+
DurationMillis?: number
|
|
495
|
+
Format?: string
|
|
496
|
+
FrameRate?: number
|
|
497
|
+
FrameHeight?: number
|
|
498
|
+
FrameWidth?: number
|
|
499
|
+
}
|
|
500
|
+
ModerationLabels?: ContentModerationDetection[]
|
|
501
|
+
NextToken?: string
|
|
502
|
+
ModerationModelVersion?: string
|
|
503
|
+
JobId?: string
|
|
504
|
+
Video?: { S3Object?: S3Object }
|
|
505
|
+
JobTag?: string
|
|
506
|
+
GetRequestMetadata?: {
|
|
507
|
+
SortBy?: string
|
|
508
|
+
AggregateBy?: string
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
// ============================================================================
|
|
512
|
+
// Rekognition Client
|
|
513
|
+
// ============================================================================
|
|
514
|
+
export declare class RekognitionClient {
|
|
515
|
+
private client: AWSClient;
|
|
516
|
+
private region: string;
|
|
517
|
+
constructor(region?: string);
|
|
518
|
+
private request<T>(action: string, params: Record<string, unknown>): Promise<T>;
|
|
519
|
+
detectFaces(params: DetectFacesCommandInput): Promise<DetectFacesCommandOutput>;
|
|
520
|
+
detectLabels(params: DetectLabelsCommandInput): Promise<DetectLabelsCommandOutput>;
|
|
521
|
+
detectText(params: DetectTextCommandInput): Promise<DetectTextCommandOutput>;
|
|
522
|
+
detectModerationLabels(params: DetectModerationLabelsCommandInput): Promise<DetectModerationLabelsCommandOutput>;
|
|
523
|
+
recognizeCelebrities(params: RecognizeCelebritiesCommandInput): Promise<RecognizeCelebritiesCommandOutput>;
|
|
524
|
+
compareFaces(params: CompareFacesCommandInput): Promise<CompareFacesCommandOutput>;
|
|
525
|
+
createCollection(params: CreateCollectionCommandInput): Promise<CreateCollectionCommandOutput>;
|
|
526
|
+
deleteCollection(params: DeleteCollectionCommandInput): Promise<DeleteCollectionCommandOutput>;
|
|
527
|
+
listCollections(params?: ListCollectionsCommandInput): Promise<ListCollectionsCommandOutput>;
|
|
528
|
+
indexFaces(params: IndexFacesCommandInput): Promise<IndexFacesCommandOutput>;
|
|
529
|
+
searchFacesByImage(params: SearchFacesByImageCommandInput): Promise<SearchFacesByImageCommandOutput>;
|
|
530
|
+
searchFaces(params: SearchFacesCommandInput): Promise<SearchFacesCommandOutput>;
|
|
531
|
+
startLabelDetection(params: StartLabelDetectionCommandInput): Promise<StartLabelDetectionCommandOutput>;
|
|
532
|
+
getLabelDetection(params: GetLabelDetectionCommandInput): Promise<GetLabelDetectionCommandOutput>;
|
|
533
|
+
startFaceDetection(params: StartFaceDetectionCommandInput): Promise<StartFaceDetectionCommandOutput>;
|
|
534
|
+
getFaceDetection(params: GetFaceDetectionCommandInput): Promise<GetFaceDetectionCommandOutput>;
|
|
535
|
+
startContentModeration(params: StartContentModerationCommandInput): Promise<StartContentModerationCommandOutput>;
|
|
536
|
+
getContentModeration(params: GetContentModerationCommandInput): Promise<GetContentModerationCommandOutput>;
|
|
537
|
+
analyzeS3Image(bucket: string, key: string, options?: { maxLabels?: number; minConfidence?: number }): Promise<Label[]>;
|
|
538
|
+
analyzeImageBytes(bytes: Uint8Array, options?: { maxLabels?: number; minConfidence?: number }): Promise<Label[]>;
|
|
539
|
+
isImageSafe(image: Image, threshold?: number): Promise<boolean>;
|
|
540
|
+
countFaces(image: Image): Promise<number>;
|
|
541
|
+
extractText(image: Image): Promise<string[]>;
|
|
542
|
+
findFace(collectionId: string, image: Image, threshold?: number): Promise<FaceMatch | null>;
|
|
543
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { AWSClient } from './client';
|
|
2
|
+
export declare interface Nameserver {
|
|
3
|
+
Name: string
|
|
4
|
+
GlueIps?: string[]
|
|
5
|
+
}
|
|
6
|
+
export declare interface DomainDetail {
|
|
7
|
+
DomainName: string
|
|
8
|
+
Nameservers?: Nameserver[]
|
|
9
|
+
AutoRenew?: boolean
|
|
10
|
+
AdminContact?: ContactDetail
|
|
11
|
+
RegistrantContact?: ContactDetail
|
|
12
|
+
TechContact?: ContactDetail
|
|
13
|
+
AdminPrivacy?: boolean
|
|
14
|
+
RegistrantPrivacy?: boolean
|
|
15
|
+
TechPrivacy?: boolean
|
|
16
|
+
RegistrarName?: string
|
|
17
|
+
WhoIsServer?: string
|
|
18
|
+
RegistrarUrl?: string
|
|
19
|
+
AbuseContactEmail?: string
|
|
20
|
+
AbuseContactPhone?: string
|
|
21
|
+
RegistryDomainId?: string
|
|
22
|
+
CreationDate?: string
|
|
23
|
+
UpdatedDate?: string
|
|
24
|
+
ExpirationDate?: string
|
|
25
|
+
Reseller?: string
|
|
26
|
+
DnsSec?: string
|
|
27
|
+
StatusList?: string[]
|
|
28
|
+
}
|
|
29
|
+
export declare interface ContactDetail {
|
|
30
|
+
FirstName?: string
|
|
31
|
+
LastName?: string
|
|
32
|
+
ContactType?: string
|
|
33
|
+
OrganizationName?: string
|
|
34
|
+
AddressLine1?: string
|
|
35
|
+
AddressLine2?: string
|
|
36
|
+
City?: string
|
|
37
|
+
State?: string
|
|
38
|
+
CountryCode?: string
|
|
39
|
+
ZipCode?: string
|
|
40
|
+
PhoneNumber?: string
|
|
41
|
+
Email?: string
|
|
42
|
+
Fax?: string
|
|
43
|
+
ExtraParams?: { Name: string, Value: string }[]
|
|
44
|
+
}
|
|
45
|
+
export declare interface UpdateDomainNameserversResult {
|
|
46
|
+
OperationId: string
|
|
47
|
+
}
|
|
48
|
+
export declare interface GetDomainDetailResult extends DomainDetail {
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Route53 Domains Client for domain registration management
|
|
53
|
+
* Note: Route53 Domains API is only available in us-east-1
|
|
54
|
+
*/
|
|
55
|
+
export declare class Route53DomainsClient {
|
|
56
|
+
private client: AWSClient;
|
|
57
|
+
private region: string;
|
|
58
|
+
constructor();
|
|
59
|
+
getDomainDetail(params: {
|
|
60
|
+
DomainName: string
|
|
61
|
+
}): Promise<GetDomainDetailResult>;
|
|
62
|
+
updateDomainNameservers(params: {
|
|
63
|
+
DomainName: string
|
|
64
|
+
Nameservers: { Name: string, GlueIps?: string[] }[]
|
|
65
|
+
}): Promise<UpdateDomainNameserversResult>;
|
|
66
|
+
listDomains(params?: {
|
|
67
|
+
Marker?: string
|
|
68
|
+
MaxItems?: number
|
|
69
|
+
SortCondition?: {
|
|
70
|
+
Name: 'DomainName' | 'Expiry'
|
|
71
|
+
SortOrder: 'ASC' | 'DESC'
|
|
72
|
+
}
|
|
73
|
+
}): Promise<{
|
|
74
|
+
Domains: { DomainName: string, AutoRenew?: boolean, TransferLock?: boolean, Expiry?: string }[]
|
|
75
|
+
NextPageMarker?: string
|
|
76
|
+
}>;
|
|
77
|
+
checkDomainAvailability(params: {
|
|
78
|
+
DomainName: string
|
|
79
|
+
}): Promise<{
|
|
80
|
+
Availability: 'AVAILABLE' | 'AVAILABLE_RESERVED' | 'AVAILABLE_PREORDER' | 'UNAVAILABLE' | 'UNAVAILABLE_PREMIUM' | 'UNAVAILABLE_RESTRICTED' | 'RESERVED' | 'DONT_KNOW'
|
|
81
|
+
}>;
|
|
82
|
+
getDomainPrice(params: {
|
|
83
|
+
DomainName: string
|
|
84
|
+
}): Promise<{
|
|
85
|
+
RegistrationPrice?: { Price: number, Currency: string }
|
|
86
|
+
RenewalPrice?: { Price: number, Currency: string }
|
|
87
|
+
TransferPrice?: { Price: number, Currency: string }
|
|
88
|
+
}>;
|
|
89
|
+
registerDomain(params: {
|
|
90
|
+
DomainName: string
|
|
91
|
+
DurationInYears: number
|
|
92
|
+
AutoRenew?: boolean
|
|
93
|
+
AdminContact: ContactDetail
|
|
94
|
+
RegistrantContact: ContactDetail
|
|
95
|
+
TechContact: ContactDetail
|
|
96
|
+
PrivacyProtectAdminContact?: boolean
|
|
97
|
+
PrivacyProtectRegistrantContact?: boolean
|
|
98
|
+
PrivacyProtectTechContact?: boolean
|
|
99
|
+
}): Promise<{
|
|
100
|
+
OperationId: string
|
|
101
|
+
}>;
|
|
102
|
+
getOperationDetail(params: {
|
|
103
|
+
OperationId: string
|
|
104
|
+
}): Promise<{
|
|
105
|
+
OperationId: string
|
|
106
|
+
Status: 'SUBMITTED' | 'IN_PROGRESS' | 'ERROR' | 'SUCCESSFUL' | 'FAILED'
|
|
107
|
+
Message?: string
|
|
108
|
+
DomainName?: string
|
|
109
|
+
Type?: string
|
|
110
|
+
SubmittedDate?: string
|
|
111
|
+
}>;
|
|
112
|
+
private parseDomainDetail(result: any): GetDomainDetailResult;
|
|
113
|
+
}
|