Page MenuHomePhabricator

D13696.id45134.diff
No OneTemporary

D13696.id45134.diff

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

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)

Event Timeline