-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.ts
More file actions
47 lines (46 loc) · 1.47 KB
/
index.ts
File metadata and controls
47 lines (46 loc) · 1.47 KB
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
44
45
46
47
/**
* Presigned URL Plugin for PostGraphile v5
*
* Provides presigned URL upload capabilities for PostGraphile v5:
* - requestUploadUrl mutation (presigned PUT URL generation)
* - confirmUpload mutation (upload verification + status transition)
* - downloadUrl computed field (presigned GET URL / public URL)
*
* @example
* ```typescript
* import { PresignedUrlPreset } from 'graphile-presigned-url-plugin';
* import { S3Client } from '@aws-sdk/client-s3';
*
* const s3Client = new S3Client({ region: 'us-east-1' });
*
* const preset = {
* extends: [
* PresignedUrlPreset({
* s3: {
* client: s3Client,
* bucket: 'my-uploads',
* publicUrlPrefix: 'https://cdn.example.com',
* },
* }),
* ],
* };
* ```
*/
export { PresignedUrlPlugin, createPresignedUrlPlugin } from './plugin';
export { createDownloadUrlPlugin } from './download-url-field';
export { PresignedUrlPreset } from './preset';
export { getStorageModuleConfig, getBucketConfig, clearStorageModuleCache, clearBucketCache, isS3BucketProvisioned, markS3BucketProvisioned } from './storage-module-cache';
export { generatePresignedPutUrl, generatePresignedGetUrl, headObject } from './s3-signer';
export type {
BucketConfig,
StorageModuleConfig,
RequestUploadUrlInput,
RequestUploadUrlPayload,
ConfirmUploadInput,
ConfirmUploadPayload,
S3Config,
S3ConfigOrGetter,
PresignedUrlPluginOptions,
BucketNameResolver,
EnsureBucketProvisioned,
} from './types';