2024-09-24 15:06:35 +00:00
|
|
|
export default (client) => {
|
|
|
|
return {
|
2024-12-10 10:13:03 +00:00
|
|
|
get(dataSyncId) {
|
|
|
|
return client.get(`/database/data-sync/${dataSyncId}/`)
|
|
|
|
},
|
2024-09-24 15:06:35 +00:00
|
|
|
create(databaseId, values) {
|
|
|
|
return client.post(`/database/data-sync/database/${databaseId}/`, values)
|
|
|
|
},
|
2024-12-10 10:13:03 +00:00
|
|
|
update(dataSyncId, values) {
|
|
|
|
return client.patch(`/database/data-sync/${dataSyncId}/`, values)
|
|
|
|
},
|
2024-09-24 15:06:35 +00:00
|
|
|
syncTable(dataSyncId) {
|
|
|
|
return client.post(`/database/data-sync/${dataSyncId}/sync/async/`)
|
|
|
|
},
|
|
|
|
fetchProperties(values) {
|
|
|
|
return client.post(`/database/data-sync/properties/`, values)
|
|
|
|
},
|
2024-12-10 10:13:03 +00:00
|
|
|
fetchPropertiesOfDataSync(dataSyncId) {
|
|
|
|
return client.get(`/database/data-sync/${dataSyncId}/properties/`)
|
|
|
|
},
|
2024-09-24 15:06:35 +00:00
|
|
|
}
|
|
|
|
}
|