Skip to content

Commit 2fe9ba0

Browse files
committed
docs(storage): record the presigned-download options in the hand-written contract docs
The drift check flagged these: both storage-service pages transcribe IStorageService by hand, and this PR adds an optional PresignedDownloadOptions argument to getSignedUrl / getPresignedDownload. Left alone they would describe a signature the code no longer has — the same declared-vs-actual gap the rest of this PR is about, one level up in the docs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SHpGw3GBA9aFpfwVArRWfd
1 parent 874144e commit 2fe9ba0

3 files changed

Lines changed: 26 additions & 4 deletions

File tree

.claude/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,24 @@
1818
"file:/tmp/showcase-dogfood-3777/data.db"
1919
],
2020
"port": 3777
21+
},
22+
{
23+
"name": "pr3505-attach-3477",
24+
"runtimeExecutable": "pnpm",
25+
"runtimeArgs": [
26+
"-C",
27+
"/home/user/objectstack-pr3505/examples/app-showcase",
28+
"exec",
29+
"objectstack",
30+
"dev",
31+
"--ui",
32+
"--seed-admin",
33+
"-p",
34+
"3477",
35+
"-d",
36+
"file:/tmp/pr3505-attach/data.db"
37+
],
38+
"port": 3477
2139
}
2240
]
2341
}

content/docs/kernel/contracts/storage-service.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,19 @@ export interface IStorageService {
2929
list?(prefix: string): Promise<StorageFileInfo[]>;
3030

3131
// Signed URL (optional)
32-
getSignedUrl?(key: string, expiresIn: number): Promise<string>;
32+
getSignedUrl?(key: string, expiresIn: number, options?: PresignedDownloadOptions): Promise<string>;
3333

3434
// Presigned browser-direct upload / download (optional)
3535
getPresignedUpload?(
3636
key: string,
3737
expiresIn: number,
3838
options?: StorageUploadOptions,
3939
): Promise<PresignedUploadDescriptor>;
40-
getPresignedDownload?(key: string, expiresIn: number): Promise<PresignedDownloadDescriptor>;
40+
getPresignedDownload?(
41+
key: string,
42+
expiresIn: number,
43+
options?: PresignedDownloadOptions,
44+
): Promise<PresignedDownloadDescriptor>;
4145

4246
// Chunked / multipart upload (optional)
4347
initiateChunkedUpload?(key: string, options?: StorageUploadOptions): Promise<string>;

content/docs/kernel/runtime-services/storage-service.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ services.storage.delete(key: string): Promise<void>
1717
services.storage.exists(key: string): Promise<boolean>
1818
services.storage.getInfo(key: string): Promise<StorageFileInfo>
1919
services.storage.list?(prefix: string): Promise<StorageFileInfo[]>
20-
services.storage.getSignedUrl?(key: string, expiresIn: number): Promise<string>
20+
services.storage.getSignedUrl?(key: string, expiresIn: number, options?: PresignedDownloadOptions): Promise<string>
2121
```
2222
2323
## Presigned / Chunked (optional)
2424
2525
```ts
2626
services.storage.getPresignedUpload?(key: string, expiresIn: number, options?: StorageUploadOptions): Promise<PresignedUploadDescriptor>
27-
services.storage.getPresignedDownload?(key: string, expiresIn: number): Promise<PresignedDownloadDescriptor>
27+
services.storage.getPresignedDownload?(key: string, expiresIn: number, options?: PresignedDownloadOptions): Promise<PresignedDownloadDescriptor>
2828
services.storage.initiateChunkedUpload?(key: string, options?: StorageUploadOptions): Promise<string>
2929
services.storage.uploadChunk?(uploadId: string, partNumber: number, data: Buffer): Promise<string>
3030
services.storage.completeChunkedUpload?(uploadId: string, parts: Array<{ partNumber: number; eTag: string }>): Promise<string>

0 commit comments

Comments
 (0)