Support per-map contact membership with scoped graph views, relation editing on edges, layout caching, and automatic detection of full JSON backups so contacts and relations import together. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
642 B
JavaScript
24 lines
642 B
JavaScript
import api from '../../api'
|
|
import { fetchAllPages } from '../../lib/api/pagination'
|
|
|
|
export const remoteNetworkMapRepository = {
|
|
async list() {
|
|
return fetchAllPages((page) => api.get('/network-maps/', { params: { page } }))
|
|
},
|
|
async getById(id) {
|
|
const { data } = await api.get(`/network-maps/${id}/`)
|
|
return data
|
|
},
|
|
async create(payload) {
|
|
const { data } = await api.post('/network-maps/', payload)
|
|
return data
|
|
},
|
|
async update(id, payload) {
|
|
const { data } = await api.patch(`/network-maps/${id}/`, payload)
|
|
return data
|
|
},
|
|
async remove(id) {
|
|
await api.delete(`/network-maps/${id}/`)
|
|
},
|
|
}
|