feat(catalog): expose entityRef on Location type and add PUT /locations/:id
- Add `entityRef` field to all Location API responses, carrying the stable entity ref (e.g. `location:default/generated-<sha1hex>`) that was already persisted to the `location_entity_ref` column. - Make `entityRef` filterable via `POST /locations/by-query`. - Add `PUT /locations/:id` endpoint that updates the `type`/`target` of an existing location and issues the corresponding delta mutation so the catalog entity is updated in-place without changing its entity ref. - Wire `updateLocation` through `CatalogApi`, `CatalogService`, `CatalogClient`, `LocationService`, `LocationStore`, and their implementations and mocks. Signed-off-by: Fredrik Adelöw <freben@spotify.com> Made-with: Cursor
This commit is contained in:
@@ -58,7 +58,12 @@ describe('DefaultApiExplorerPage', () => {
|
||||
],
|
||||
}),
|
||||
getLocationByRef: () =>
|
||||
Promise.resolve({ id: 'id', type: 'url', target: 'url' }),
|
||||
Promise.resolve({
|
||||
id: 'id',
|
||||
type: 'url',
|
||||
target: 'url',
|
||||
entityRef: 'location:default/generated-id',
|
||||
}),
|
||||
getEntitiesByRefs: () => Promise.resolve({ items: [] }),
|
||||
getEntityFacets: async () => ({
|
||||
facets: { 'relations.ownedBy': [] },
|
||||
|
||||
Reference in New Issue
Block a user