Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3518802
D13696.id45134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13696.id45134.diff
View Options
diff --git a/lib/facts/blob-service.js b/lib/facts/blob-service.js
--- a/lib/facts/blob-service.js
+++ b/lib/facts/blob-service.js
@@ -2,16 +2,21 @@
import { isDev } from '../utils/dev-utils.js';
-type BlobServicePath = '/blob/:blobHash' | '/blob' | '/holders';
-
-export type BlobServiceHTTPEndpoint = {
- +path: BlobServicePath,
- +method: 'GET' | 'POST' | 'PUT' | 'DELETE',
+type BlobHTTPEndpoints = {
+ +GET_BLOB: { +path: '/blob/:blobHash', +method: 'GET' },
+ +ASSIGN_HOLDER: { +path: '/blob', +method: 'POST' },
+ +ASSIGN_MULTIPLE_HOLDERS: { +path: '/holders', +method: 'POST' },
+ +UPLOAD_BLOB: { +path: '/blob', +method: 'PUT' },
+ +DELETE_BLOB: { +path: '/blob', +method: 'DELETE' },
+ +REMOVE_MULTIPLE_HOLDERS: { +path: '/holders', +method: 'DELETE' },
};
+export type BlobServiceHTTPEndpoint =
+ BlobHTTPEndpoints[$Keys<BlobHTTPEndpoints>];
+
type BlobServiceConfig = {
+url: string,
- +httpEndpoints: { +[endpoint: string]: BlobServiceHTTPEndpoint },
+ +httpEndpoints: BlobHTTPEndpoints,
};
const httpEndpoints = Object.freeze({
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 8:44 PM (19 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696406
Default Alt Text
D13696.id45134.diff (1 KB)
Attached To
Mode
D13696: [lib] Make Blob service facts types more strict
Attached
Detach File
Event Timeline
Log In to Comment