@stacksjs/ts-cloud 0.2.2 → 0.2.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/dist/aws/acm.d.ts +215 -0
- package/dist/aws/application-autoscaling.d.ts +345 -0
- package/dist/aws/bedrock.d.ts +2672 -0
- package/dist/aws/client.d.ts +181 -0
- package/dist/aws/cloudformation.d.ts +187 -0
- package/dist/aws/cloudfront.d.ts +416 -0
- package/dist/aws/cloudwatch-logs.d.ts +70 -0
- package/dist/aws/comprehend.d.ts +616 -0
- package/dist/aws/connect.d.ts +533 -0
- package/dist/aws/deploy-imap.d.ts +26 -0
- package/dist/aws/dynamodb.d.ts +270 -0
- package/dist/aws/ec2.d.ts +545 -0
- package/dist/aws/ecr.d.ts +240 -0
- package/dist/aws/ecs.d.ts +267 -0
- package/dist/aws/efs.d.ts +36 -0
- package/dist/aws/elasticache.d.ts +112 -0
- package/dist/aws/elbv2.d.ts +389 -0
- package/dist/aws/email.d.ts +260 -0
- package/dist/aws/eventbridge.d.ts +197 -0
- package/dist/aws/iam.d.ts +1013 -0
- package/dist/aws/imap-server.d.ts +298 -0
- package/dist/aws/index.d.ts +53 -0
- package/dist/aws/kendra.d.ts +831 -0
- package/dist/aws/lambda.d.ts +319 -0
- package/dist/aws/opensearch.d.ts +121 -0
- package/dist/aws/personalize.d.ts +586 -0
- package/dist/aws/polly.d.ts +243 -0
- package/dist/aws/rds.d.ts +346 -0
- package/dist/aws/rekognition.d.ts +691 -0
- package/dist/aws/route53-domains.d.ts +161 -0
- package/dist/aws/route53.d.ts +330 -0
- package/dist/aws/s3.d.ts +535 -0
- package/dist/aws/scheduler.d.ts +224 -0
- package/dist/aws/secrets-manager.d.ts +267 -0
- package/dist/aws/ses.d.ts +441 -0
- package/dist/aws/setup-phone.d.ts +1 -0
- package/dist/aws/setup-sms.d.ts +116 -0
- package/dist/aws/sms.d.ts +477 -0
- package/dist/aws/smtp-server.d.ts +108 -0
- package/dist/aws/sns.d.ts +224 -0
- package/dist/aws/sqs.d.ts +107 -0
- package/dist/aws/ssm.d.ts +311 -0
- package/dist/aws/sts.d.ts +21 -0
- package/dist/aws/support.d.ts +139 -0
- package/dist/aws/test-imap.d.ts +15 -0
- package/dist/aws/textract.d.ts +477 -0
- package/dist/aws/transcribe.d.ts +79 -0
- package/dist/aws/translate.d.ts +424 -0
- package/dist/aws/voice.d.ts +361 -0
- package/dist/bin/cli.js +4500 -809
- package/dist/config.d.ts +5 -0
- package/dist/deploy/index.d.ts +6 -0
- package/dist/deploy/static-site-external-dns.d.ts +70 -0
- package/dist/deploy/static-site.d.ts +110 -0
- package/dist/dns/cloudflare.d.ts +74 -0
- package/dist/dns/godaddy.d.ts +63 -0
- package/dist/dns/index.d.ts +67 -0
- package/dist/dns/porkbun.d.ts +43 -0
- package/dist/dns/route53-adapter.d.ts +67 -0
- package/dist/dns/types.d.ts +100 -0
- package/dist/dns/validator.d.ts +105 -0
- package/dist/generators/index.d.ts +4 -0
- package/dist/generators/infrastructure.d.ts +115 -0
- package/dist/index.d.ts +9 -165
- package/dist/index.js +24067 -6430
- package/dist/push/apns.d.ts +140 -0
- package/dist/push/fcm.d.ts +205 -0
- package/dist/push/index.d.ts +44 -0
- package/dist/security/pre-deploy-scanner.d.ts +97 -0
- package/dist/ssl/acme-client.d.ts +133 -0
- package/dist/ssl/index.d.ts +6 -0
- package/dist/ssl/letsencrypt.d.ts +96 -0
- package/dist/utils/cli.d.ts +121 -0
- package/dist/validation/index.d.ts +4 -0
- package/dist/validation/template.d.ts +27 -0
- package/package.json +6 -6
package/dist/aws/s3.d.ts
ADDED
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AWS S3 Operations
|
|
3
|
+
* Direct API calls without AWS CLI dependency
|
|
4
|
+
*/
|
|
5
|
+
export interface S3SyncOptions {
|
|
6
|
+
source: string;
|
|
7
|
+
bucket: string;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
delete?: boolean;
|
|
10
|
+
acl?: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read';
|
|
11
|
+
cacheControl?: string;
|
|
12
|
+
contentType?: string;
|
|
13
|
+
metadata?: Record<string, string>;
|
|
14
|
+
exclude?: string[];
|
|
15
|
+
include?: string[];
|
|
16
|
+
dryRun?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface S3CopyOptions {
|
|
19
|
+
source: string;
|
|
20
|
+
bucket: string;
|
|
21
|
+
key: string;
|
|
22
|
+
acl?: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read';
|
|
23
|
+
cacheControl?: string;
|
|
24
|
+
contentType?: string;
|
|
25
|
+
metadata?: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
export interface S3ListOptions {
|
|
28
|
+
bucket: string;
|
|
29
|
+
prefix?: string;
|
|
30
|
+
maxKeys?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface S3Object {
|
|
33
|
+
Key: string;
|
|
34
|
+
LastModified: string;
|
|
35
|
+
Size: number;
|
|
36
|
+
ETag?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* S3 client using direct API calls
|
|
40
|
+
*/
|
|
41
|
+
export declare class S3Client {
|
|
42
|
+
private client;
|
|
43
|
+
private region;
|
|
44
|
+
private profile;
|
|
45
|
+
constructor(region?: string, profile?: string);
|
|
46
|
+
/**
|
|
47
|
+
* Resolve credentials synchronously from file with the correct profile
|
|
48
|
+
*/
|
|
49
|
+
private resolveProfileCredentialsSync;
|
|
50
|
+
/**
|
|
51
|
+
* Get AWS credentials from environment or credentials file
|
|
52
|
+
*/
|
|
53
|
+
private getCredentials;
|
|
54
|
+
/**
|
|
55
|
+
* Load credentials from ~/.aws/credentials file
|
|
56
|
+
*/
|
|
57
|
+
private loadCredentialsFromFile;
|
|
58
|
+
/**
|
|
59
|
+
* List all S3 buckets in the account
|
|
60
|
+
*/
|
|
61
|
+
listBuckets(): Promise<{
|
|
62
|
+
Buckets: Array<{
|
|
63
|
+
Name: string;
|
|
64
|
+
CreationDate?: string;
|
|
65
|
+
}>;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Create an S3 bucket
|
|
69
|
+
*/
|
|
70
|
+
createBucket(bucket: string, options?: {
|
|
71
|
+
acl?: string;
|
|
72
|
+
}): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Delete an S3 bucket (must be empty)
|
|
75
|
+
*/
|
|
76
|
+
deleteBucket(bucket: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Empty and delete an S3 bucket
|
|
79
|
+
*/
|
|
80
|
+
emptyAndDeleteBucket(bucket: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* List all objects in a bucket (handles pagination)
|
|
83
|
+
*/
|
|
84
|
+
listAllObjects(options: S3ListOptions): Promise<S3Object[]>;
|
|
85
|
+
/**
|
|
86
|
+
* List objects in S3 bucket
|
|
87
|
+
*/
|
|
88
|
+
list(options: S3ListOptions): Promise<S3Object[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Put object to S3 bucket
|
|
91
|
+
*/
|
|
92
|
+
putObject(options: {
|
|
93
|
+
bucket: string;
|
|
94
|
+
key: string;
|
|
95
|
+
body: string | Buffer | Uint8Array;
|
|
96
|
+
acl?: string;
|
|
97
|
+
cacheControl?: string;
|
|
98
|
+
contentType?: string;
|
|
99
|
+
metadata?: Record<string, string>;
|
|
100
|
+
}): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Get object from S3 bucket
|
|
103
|
+
* Returns raw content as string (not parsed as XML)
|
|
104
|
+
*/
|
|
105
|
+
getObject(bucket: string, key: string): Promise<string>;
|
|
106
|
+
/**
|
|
107
|
+
* Copy object within S3 (server-side copy)
|
|
108
|
+
*/
|
|
109
|
+
copyObject(options: {
|
|
110
|
+
sourceBucket: string;
|
|
111
|
+
sourceKey: string;
|
|
112
|
+
destinationBucket: string;
|
|
113
|
+
destinationKey: string;
|
|
114
|
+
contentType?: string;
|
|
115
|
+
metadata?: Record<string, string>;
|
|
116
|
+
metadataDirective?: 'COPY' | 'REPLACE';
|
|
117
|
+
}): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Delete object from S3
|
|
120
|
+
*/
|
|
121
|
+
deleteObject(bucket: string, key: string): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Delete multiple objects from S3
|
|
124
|
+
*/
|
|
125
|
+
deleteObjects(bucket: string, keys: string[]): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Check if bucket exists
|
|
128
|
+
*/
|
|
129
|
+
bucketExists(bucket: string): Promise<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* Copy file to S3
|
|
132
|
+
*/
|
|
133
|
+
copy(options: S3CopyOptions): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Sync local directory to S3 bucket
|
|
136
|
+
* Note: This is a simplified version. For production use, implement proper sync logic
|
|
137
|
+
*/
|
|
138
|
+
sync(options: S3SyncOptions): Promise<void>;
|
|
139
|
+
/**
|
|
140
|
+
* Delete object from S3 (alias for deleteObject)
|
|
141
|
+
*/
|
|
142
|
+
delete(bucket: string, key: string): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Delete all objects in a prefix
|
|
145
|
+
*/
|
|
146
|
+
deletePrefix(bucket: string, prefix: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Get bucket size
|
|
149
|
+
*/
|
|
150
|
+
getBucketSize(bucket: string, prefix?: string): Promise<number>;
|
|
151
|
+
/**
|
|
152
|
+
* List files recursively in a directory
|
|
153
|
+
*/
|
|
154
|
+
private listFilesRecursive;
|
|
155
|
+
/**
|
|
156
|
+
* Put bucket policy for an S3 bucket
|
|
157
|
+
* Uses path-style URLs to avoid redirect issues
|
|
158
|
+
*/
|
|
159
|
+
putBucketPolicy(bucket: string, policy: object | string): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Get bucket policy for an S3 bucket
|
|
162
|
+
* Uses path-style URLs to avoid redirect issues
|
|
163
|
+
*/
|
|
164
|
+
getBucketPolicy(bucket: string): Promise<object | null>;
|
|
165
|
+
/**
|
|
166
|
+
* Delete bucket policy
|
|
167
|
+
*/
|
|
168
|
+
deleteBucketPolicy(bucket: string): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Head bucket - check if bucket exists and you have access
|
|
171
|
+
*/
|
|
172
|
+
headBucket(bucket: string): Promise<{
|
|
173
|
+
exists: boolean;
|
|
174
|
+
region?: string;
|
|
175
|
+
}>;
|
|
176
|
+
/**
|
|
177
|
+
* Head object - get object metadata without downloading
|
|
178
|
+
*/
|
|
179
|
+
headObject(bucket: string, key: string): Promise<{
|
|
180
|
+
ContentLength?: number;
|
|
181
|
+
ContentType?: string;
|
|
182
|
+
ETag?: string;
|
|
183
|
+
LastModified?: string;
|
|
184
|
+
Metadata?: Record<string, string>;
|
|
185
|
+
} | null>;
|
|
186
|
+
/**
|
|
187
|
+
* Get object as Buffer
|
|
188
|
+
*/
|
|
189
|
+
getObjectBuffer(bucket: string, key: string): Promise<Buffer>;
|
|
190
|
+
/**
|
|
191
|
+
* Get object as JSON
|
|
192
|
+
*/
|
|
193
|
+
getObjectJson<T = any>(bucket: string, key: string): Promise<T>;
|
|
194
|
+
/**
|
|
195
|
+
* Put JSON object
|
|
196
|
+
*/
|
|
197
|
+
putObjectJson(bucket: string, key: string, data: any, options?: {
|
|
198
|
+
acl?: string;
|
|
199
|
+
cacheControl?: string;
|
|
200
|
+
metadata?: Record<string, string>;
|
|
201
|
+
}): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* Get bucket versioning configuration
|
|
204
|
+
*/
|
|
205
|
+
getBucketVersioning(bucket: string): Promise<{
|
|
206
|
+
Status?: 'Enabled' | 'Suspended';
|
|
207
|
+
}>;
|
|
208
|
+
/**
|
|
209
|
+
* Put bucket versioning configuration
|
|
210
|
+
*/
|
|
211
|
+
putBucketVersioning(bucket: string, status: 'Enabled' | 'Suspended'): Promise<void>;
|
|
212
|
+
/**
|
|
213
|
+
* Get bucket lifecycle configuration
|
|
214
|
+
*/
|
|
215
|
+
getBucketLifecycleConfiguration(bucket: string): Promise<any>;
|
|
216
|
+
/**
|
|
217
|
+
* Put bucket lifecycle configuration
|
|
218
|
+
*/
|
|
219
|
+
putBucketLifecycleConfiguration(bucket: string, rules: Array<{
|
|
220
|
+
ID: string;
|
|
221
|
+
Status: 'Enabled' | 'Disabled';
|
|
222
|
+
Filter?: {
|
|
223
|
+
Prefix?: string;
|
|
224
|
+
};
|
|
225
|
+
Expiration?: {
|
|
226
|
+
Days?: number;
|
|
227
|
+
Date?: string;
|
|
228
|
+
};
|
|
229
|
+
Transitions?: Array<{
|
|
230
|
+
Days?: number;
|
|
231
|
+
StorageClass: string;
|
|
232
|
+
}>;
|
|
233
|
+
NoncurrentVersionExpiration?: {
|
|
234
|
+
NoncurrentDays: number;
|
|
235
|
+
};
|
|
236
|
+
}>): Promise<void>;
|
|
237
|
+
/**
|
|
238
|
+
* Delete bucket lifecycle configuration
|
|
239
|
+
*/
|
|
240
|
+
deleteBucketLifecycleConfiguration(bucket: string): Promise<void>;
|
|
241
|
+
/**
|
|
242
|
+
* Get bucket CORS configuration
|
|
243
|
+
*/
|
|
244
|
+
getBucketCors(bucket: string): Promise<any>;
|
|
245
|
+
/**
|
|
246
|
+
* Put bucket CORS configuration
|
|
247
|
+
*/
|
|
248
|
+
putBucketCors(bucket: string, rules: Array<{
|
|
249
|
+
AllowedOrigins: string[];
|
|
250
|
+
AllowedMethods: string[];
|
|
251
|
+
AllowedHeaders?: string[];
|
|
252
|
+
ExposeHeaders?: string[];
|
|
253
|
+
MaxAgeSeconds?: number;
|
|
254
|
+
}>): Promise<void>;
|
|
255
|
+
/**
|
|
256
|
+
* Delete bucket CORS configuration
|
|
257
|
+
*/
|
|
258
|
+
deleteBucketCors(bucket: string): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* Get bucket encryption configuration
|
|
261
|
+
*/
|
|
262
|
+
getBucketEncryption(bucket: string): Promise<any>;
|
|
263
|
+
/**
|
|
264
|
+
* Put bucket encryption configuration
|
|
265
|
+
*/
|
|
266
|
+
putBucketEncryption(bucket: string, sseAlgorithm: 'AES256' | 'aws:kms', kmsKeyId?: string): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* Delete bucket encryption configuration
|
|
269
|
+
*/
|
|
270
|
+
deleteBucketEncryption(bucket: string): Promise<void>;
|
|
271
|
+
/**
|
|
272
|
+
* Get bucket tagging
|
|
273
|
+
*/
|
|
274
|
+
getBucketTagging(bucket: string): Promise<Array<{
|
|
275
|
+
Key: string;
|
|
276
|
+
Value: string;
|
|
277
|
+
}>>;
|
|
278
|
+
/**
|
|
279
|
+
* Put bucket tagging
|
|
280
|
+
*/
|
|
281
|
+
putBucketTagging(bucket: string, tags: Array<{
|
|
282
|
+
Key: string;
|
|
283
|
+
Value: string;
|
|
284
|
+
}>): Promise<void>;
|
|
285
|
+
/**
|
|
286
|
+
* Delete bucket tagging
|
|
287
|
+
*/
|
|
288
|
+
deleteBucketTagging(bucket: string): Promise<void>;
|
|
289
|
+
/**
|
|
290
|
+
* Get object tagging
|
|
291
|
+
*/
|
|
292
|
+
getObjectTagging(bucket: string, key: string): Promise<Array<{
|
|
293
|
+
Key: string;
|
|
294
|
+
Value: string;
|
|
295
|
+
}>>;
|
|
296
|
+
/**
|
|
297
|
+
* Put object tagging
|
|
298
|
+
*/
|
|
299
|
+
putObjectTagging(bucket: string, key: string, tags: Array<{
|
|
300
|
+
Key: string;
|
|
301
|
+
Value: string;
|
|
302
|
+
}>): Promise<void>;
|
|
303
|
+
/**
|
|
304
|
+
* Delete object tagging
|
|
305
|
+
*/
|
|
306
|
+
deleteObjectTagging(bucket: string, key: string): Promise<void>;
|
|
307
|
+
/**
|
|
308
|
+
* Get bucket ACL
|
|
309
|
+
*/
|
|
310
|
+
getBucketAcl(bucket: string): Promise<any>;
|
|
311
|
+
/**
|
|
312
|
+
* Put bucket ACL (canned ACL)
|
|
313
|
+
*/
|
|
314
|
+
putBucketAcl(bucket: string, acl: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read'): Promise<void>;
|
|
315
|
+
/**
|
|
316
|
+
* Get object ACL
|
|
317
|
+
*/
|
|
318
|
+
getObjectAcl(bucket: string, key: string): Promise<any>;
|
|
319
|
+
/**
|
|
320
|
+
* Put object ACL (canned ACL)
|
|
321
|
+
*/
|
|
322
|
+
putObjectAcl(bucket: string, key: string, acl: 'private' | 'public-read' | 'public-read-write' | 'authenticated-read'): Promise<void>;
|
|
323
|
+
/**
|
|
324
|
+
* Get bucket location
|
|
325
|
+
*/
|
|
326
|
+
getBucketLocation(bucket: string): Promise<string>;
|
|
327
|
+
/**
|
|
328
|
+
* Get bucket logging configuration
|
|
329
|
+
*/
|
|
330
|
+
getBucketLogging(bucket: string): Promise<any>;
|
|
331
|
+
/**
|
|
332
|
+
* Put bucket logging configuration
|
|
333
|
+
*/
|
|
334
|
+
putBucketLogging(bucket: string, targetBucket: string, targetPrefix: string): Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* Get bucket notification configuration
|
|
337
|
+
*/
|
|
338
|
+
getBucketNotificationConfiguration(bucket: string): Promise<any>;
|
|
339
|
+
/**
|
|
340
|
+
* Put bucket notification configuration
|
|
341
|
+
*/
|
|
342
|
+
putBucketNotificationConfiguration(bucket: string, config: {
|
|
343
|
+
LambdaFunctionConfigurations?: Array<{
|
|
344
|
+
Id?: string;
|
|
345
|
+
LambdaFunctionArn: string;
|
|
346
|
+
Events: string[];
|
|
347
|
+
Filter?: {
|
|
348
|
+
Key?: {
|
|
349
|
+
FilterRules: Array<{
|
|
350
|
+
Name: string;
|
|
351
|
+
Value: string;
|
|
352
|
+
}>;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
}>;
|
|
356
|
+
TopicConfigurations?: Array<{
|
|
357
|
+
Id?: string;
|
|
358
|
+
TopicArn: string;
|
|
359
|
+
Events: string[];
|
|
360
|
+
Filter?: {
|
|
361
|
+
Key?: {
|
|
362
|
+
FilterRules: Array<{
|
|
363
|
+
Name: string;
|
|
364
|
+
Value: string;
|
|
365
|
+
}>;
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
}>;
|
|
369
|
+
QueueConfigurations?: Array<{
|
|
370
|
+
Id?: string;
|
|
371
|
+
QueueArn: string;
|
|
372
|
+
Events: string[];
|
|
373
|
+
Filter?: {
|
|
374
|
+
Key?: {
|
|
375
|
+
FilterRules: Array<{
|
|
376
|
+
Name: string;
|
|
377
|
+
Value: string;
|
|
378
|
+
}>;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
}>;
|
|
382
|
+
}): Promise<void>;
|
|
383
|
+
/**
|
|
384
|
+
* Get bucket website configuration
|
|
385
|
+
*/
|
|
386
|
+
getBucketWebsite(bucket: string): Promise<any>;
|
|
387
|
+
/**
|
|
388
|
+
* Put bucket website configuration
|
|
389
|
+
*/
|
|
390
|
+
putBucketWebsite(bucket: string, config: {
|
|
391
|
+
IndexDocument: string;
|
|
392
|
+
ErrorDocument?: string;
|
|
393
|
+
RedirectAllRequestsTo?: {
|
|
394
|
+
HostName: string;
|
|
395
|
+
Protocol?: string;
|
|
396
|
+
};
|
|
397
|
+
}): Promise<void>;
|
|
398
|
+
/**
|
|
399
|
+
* Delete bucket website configuration
|
|
400
|
+
*/
|
|
401
|
+
deleteBucketWebsite(bucket: string): Promise<void>;
|
|
402
|
+
/**
|
|
403
|
+
* Get bucket replication configuration
|
|
404
|
+
*/
|
|
405
|
+
getBucketReplication(bucket: string): Promise<any>;
|
|
406
|
+
/**
|
|
407
|
+
* Delete bucket replication configuration
|
|
408
|
+
*/
|
|
409
|
+
deleteBucketReplication(bucket: string): Promise<void>;
|
|
410
|
+
/**
|
|
411
|
+
* Get public access block configuration
|
|
412
|
+
*/
|
|
413
|
+
getPublicAccessBlock(bucket: string): Promise<any>;
|
|
414
|
+
/**
|
|
415
|
+
* Put public access block configuration
|
|
416
|
+
*/
|
|
417
|
+
putPublicAccessBlock(bucket: string, config: {
|
|
418
|
+
BlockPublicAcls?: boolean;
|
|
419
|
+
IgnorePublicAcls?: boolean;
|
|
420
|
+
BlockPublicPolicy?: boolean;
|
|
421
|
+
RestrictPublicBuckets?: boolean;
|
|
422
|
+
}): Promise<void>;
|
|
423
|
+
/**
|
|
424
|
+
* Delete public access block configuration
|
|
425
|
+
*/
|
|
426
|
+
deletePublicAccessBlock(bucket: string): Promise<void>;
|
|
427
|
+
/**
|
|
428
|
+
* Generate a presigned URL for GET
|
|
429
|
+
*/
|
|
430
|
+
generatePresignedGetUrl(bucket: string, key: string, expiresInSeconds?: number): string;
|
|
431
|
+
/**
|
|
432
|
+
* Generate a presigned URL for PUT
|
|
433
|
+
*/
|
|
434
|
+
generatePresignedPutUrl(bucket: string, key: string, contentType: string, expiresInSeconds?: number): string;
|
|
435
|
+
/**
|
|
436
|
+
* Initiate multipart upload
|
|
437
|
+
*/
|
|
438
|
+
createMultipartUpload(bucket: string, key: string, options?: {
|
|
439
|
+
contentType?: string;
|
|
440
|
+
metadata?: Record<string, string>;
|
|
441
|
+
}): Promise<{
|
|
442
|
+
UploadId: string;
|
|
443
|
+
}>;
|
|
444
|
+
/**
|
|
445
|
+
* Upload a part in multipart upload
|
|
446
|
+
*/
|
|
447
|
+
uploadPart(bucket: string, key: string, uploadId: string, partNumber: number, body: Uint8Array | Buffer): Promise<{
|
|
448
|
+
ETag: string;
|
|
449
|
+
}>;
|
|
450
|
+
/**
|
|
451
|
+
* Complete multipart upload
|
|
452
|
+
*/
|
|
453
|
+
completeMultipartUpload(bucket: string, key: string, uploadId: string, parts: Array<{
|
|
454
|
+
PartNumber: number;
|
|
455
|
+
ETag: string;
|
|
456
|
+
}>): Promise<void>;
|
|
457
|
+
/**
|
|
458
|
+
* Abort multipart upload
|
|
459
|
+
*/
|
|
460
|
+
abortMultipartUpload(bucket: string, key: string, uploadId: string): Promise<void>;
|
|
461
|
+
/**
|
|
462
|
+
* List multipart uploads
|
|
463
|
+
*/
|
|
464
|
+
listMultipartUploads(bucket: string): Promise<Array<{
|
|
465
|
+
Key: string;
|
|
466
|
+
UploadId: string;
|
|
467
|
+
Initiated: string;
|
|
468
|
+
}>>;
|
|
469
|
+
/**
|
|
470
|
+
* Restore object from Glacier
|
|
471
|
+
*/
|
|
472
|
+
restoreObject(bucket: string, key: string, days: number, tier?: 'Standard' | 'Bulk' | 'Expedited'): Promise<void>;
|
|
473
|
+
/**
|
|
474
|
+
* Select object content (S3 Select)
|
|
475
|
+
*/
|
|
476
|
+
selectObjectContent(bucket: string, key: string, expression: string, inputFormat: 'CSV' | 'JSON' | 'Parquet', outputFormat?: 'CSV' | 'JSON'): Promise<string>;
|
|
477
|
+
/**
|
|
478
|
+
* Generate a presigned URL for S3 object access
|
|
479
|
+
* Allows temporary access to private objects without authentication
|
|
480
|
+
*/
|
|
481
|
+
getSignedUrl(options: {
|
|
482
|
+
bucket: string;
|
|
483
|
+
key: string;
|
|
484
|
+
expiresIn?: number;
|
|
485
|
+
operation?: 'getObject' | 'putObject';
|
|
486
|
+
}): Promise<string>;
|
|
487
|
+
/**
|
|
488
|
+
* List objects in a bucket with pagination support
|
|
489
|
+
*/
|
|
490
|
+
listObjects(options: {
|
|
491
|
+
bucket: string;
|
|
492
|
+
prefix?: string;
|
|
493
|
+
maxKeys?: number;
|
|
494
|
+
continuationToken?: string;
|
|
495
|
+
}): Promise<{
|
|
496
|
+
objects: S3Object[];
|
|
497
|
+
nextContinuationToken?: string;
|
|
498
|
+
}>;
|
|
499
|
+
/**
|
|
500
|
+
* Empty a bucket by deleting all objects (required before bucket deletion)
|
|
501
|
+
*/
|
|
502
|
+
emptyBucket(bucket: string): Promise<{
|
|
503
|
+
deletedCount: number;
|
|
504
|
+
}>;
|
|
505
|
+
/**
|
|
506
|
+
* List object versions in a bucket
|
|
507
|
+
*/
|
|
508
|
+
listObjectVersions(options: {
|
|
509
|
+
bucket: string;
|
|
510
|
+
prefix?: string;
|
|
511
|
+
keyMarker?: string;
|
|
512
|
+
versionIdMarker?: string;
|
|
513
|
+
maxKeys?: number;
|
|
514
|
+
}): Promise<{
|
|
515
|
+
versions: Array<{
|
|
516
|
+
Key: string;
|
|
517
|
+
VersionId: string;
|
|
518
|
+
IsLatest: boolean;
|
|
519
|
+
}>;
|
|
520
|
+
deleteMarkers: Array<{
|
|
521
|
+
Key: string;
|
|
522
|
+
VersionId: string;
|
|
523
|
+
IsLatest: boolean;
|
|
524
|
+
}>;
|
|
525
|
+
nextKeyMarker?: string;
|
|
526
|
+
nextVersionIdMarker?: string;
|
|
527
|
+
}>;
|
|
528
|
+
/**
|
|
529
|
+
* Delete specific object versions
|
|
530
|
+
*/
|
|
531
|
+
deleteObjectVersions(bucket: string, objects: Array<{
|
|
532
|
+
Key: string;
|
|
533
|
+
VersionId?: string;
|
|
534
|
+
}>): Promise<void>;
|
|
535
|
+
}
|