This adds typed asset APIs to the geo client, covers the 3D/image upload-share flow in integration tests, and introduces a simple Leaflet web demo that places objects on map features and manages sharing visibility via backend links. Made-with: Cursor
This commit is contained in:
Vendored
+20
@@ -638,6 +638,26 @@ class GeoApiClient {
|
||||
async deleteFeature(featureId) {
|
||||
return this.request(`/v1/features/${featureId}`, { method: "DELETE" });
|
||||
}
|
||||
async createOrLinkAsset(input) {
|
||||
return this.request("/v1/assets", { method: "POST", body: input });
|
||||
}
|
||||
async getAssetSignedUploadUrl(assetId, contentType) {
|
||||
return this.request(`/v1/assets/${assetId}/signed-upload`, {
|
||||
method: "POST",
|
||||
body: { contentType: contentType ?? "application/octet-stream" }
|
||||
});
|
||||
}
|
||||
async setAssetVisibility(assetId, isPublic) {
|
||||
return this.request(`/v1/assets/${assetId}`, {
|
||||
method: "PATCH",
|
||||
body: { isPublic }
|
||||
});
|
||||
}
|
||||
resolveRelativeLink(path) {
|
||||
if (!path.startsWith("/"))
|
||||
return `${this.baseUrl}/${path}`;
|
||||
return `${this.baseUrl}${path}`;
|
||||
}
|
||||
}
|
||||
export {
|
||||
signMessage,
|
||||
|
||||
Reference in New Issue
Block a user