-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.d.ts
More file actions
43 lines (38 loc) · 975 Bytes
/
index.d.ts
File metadata and controls
43 lines (38 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import type { S3Client } from '@aws-sdk/client-s3'
import type Got from 'got'
export interface KeyvS3Options {
namespace: string
hostname?: string
ttl?: number
gotOpts?: Got.Options
s3client?: S3Client
got?: Got
maxAttempts?: number
requestHandler?: {
socketTimeout?: number
}
[key: string]: unknown
}
export interface PutObjectOptions {
Key?: string
Body?: string
ContentType?: string
Bucket?: string
ACL?: string
Expires?: Date
[key: string]: unknown
}
export interface DeleteObjectOptions {
Key?: string
Bucket?: string
[key: string]: unknown
}
export default class KeyvS3 {
constructor (options: KeyvS3Options)
filename (key: unknown): string
fileUrl (filename: string): string
get (key: unknown): Promise<unknown>
set (key: unknown, value: unknown, ttl?: number, opts?: PutObjectOptions): Promise<boolean>
delete (key: unknown, opts?: DeleteObjectOptions): Promise<boolean>
}
export { KeyvS3 as KeyvS3Class }