mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-18 09:53:56 +01:00
Added calendars plugin and improved used part
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import repository from './repository'
|
||||
|
||||
export default {
|
||||
getUserCalendars() {
|
||||
return repository.get('/user-calendars/')
|
||||
},
|
||||
getUserCalendar(pk) {
|
||||
return repository.get(`/user-calendars/${pk}/`)
|
||||
},
|
||||
createUserCalendar(data) {
|
||||
return repository.post('/user-calendars/', data)
|
||||
},
|
||||
updateUserCalendar(pk, data) {
|
||||
return repository.put(`/user-calendars/${pk}/`, data)
|
||||
},
|
||||
deleteUserCalendar(pk) {
|
||||
return repository.delete(`/user-calendars/${pk}/`)
|
||||
},
|
||||
|
||||
getAccessRules(calendarPk) {
|
||||
return repository.get('/accessrules/')
|
||||
},
|
||||
createAccessRule(data) {
|
||||
return repository.post('/accessrules/', data)
|
||||
},
|
||||
updateAccessRule(ruleId, data) {
|
||||
return repository.put(`/accessrules/${ruleId}/`, data)
|
||||
},
|
||||
deleteAccessRule(ruleId) {
|
||||
return repository.delete(`/accessrules/${ruleId}/`)
|
||||
},
|
||||
|
||||
getUserCalendarEvents(calendarPk, params) {
|
||||
return repository.get(`/user-calendars/${calendarPk}/events/`, { params })
|
||||
},
|
||||
getUserEvent(calendarPk, eventId) {
|
||||
return repository.get(`/user-calendars/${calendarPk}/events/${eventId}/`)
|
||||
},
|
||||
createUserEvent(calendarPk, data) {
|
||||
return repository.post(`/user-calendars/${calendarPk}/events/`, data)
|
||||
},
|
||||
patchUserEvent(calendarPk, eventId, data) {
|
||||
return repository.patch(
|
||||
`/user-calendars/${calendarPk}/events/${eventId}/`,
|
||||
data
|
||||
)
|
||||
},
|
||||
importUserEvents(calendarPk, data) {
|
||||
return repository.post(
|
||||
`/user-calendars/${calendarPk}/events/import_from_file/`,
|
||||
data
|
||||
)
|
||||
},
|
||||
|
||||
getAttendees() {
|
||||
return repository.get('/attendees/')
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1,15 @@
|
||||
import repository from './repository'
|
||||
|
||||
export default {
|
||||
getDefaultAddressBook() {
|
||||
return repository.get('/address-books/default/')
|
||||
},
|
||||
synchronizeToAddressBook() {
|
||||
return repository.get('/address-books/sync_to_cdav/')
|
||||
},
|
||||
synchronizeFromAddressBook() {
|
||||
return repository.get('/address-books/sync_from_cdav/')
|
||||
},
|
||||
getContacts(params) {
|
||||
return repository.get('/contacts/', { params })
|
||||
},
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import repository from './repository'
|
||||
|
||||
const resource = 'mailboxes'
|
||||
|
||||
export default {
|
||||
getAll() {
|
||||
return repository.get(`${resource}/`)
|
||||
},
|
||||
}
|
||||
@@ -3,16 +3,29 @@ import repository from './repository'
|
||||
const resource = 'parameters'
|
||||
|
||||
export default {
|
||||
getApplications() {
|
||||
return repository.get(`/${resource}/applications/`)
|
||||
getGlobalApplications() {
|
||||
return repository.get(`/${resource}/global/applications/`)
|
||||
},
|
||||
getApplication(app) {
|
||||
return repository.get(`/${resource}/${app}/`)
|
||||
getGlobalApplication(app) {
|
||||
return repository.get(`/${resource}/global/${app}/`)
|
||||
},
|
||||
getApplicationStructure(app) {
|
||||
return repository.get(`/${resource}/structure/?app=${app}`)
|
||||
getGlobalApplicationStructure(app) {
|
||||
return repository.get(`/${resource}/global/structure/?app=${app}`)
|
||||
},
|
||||
saveApplication(app, data) {
|
||||
return repository.put(`/${resource}/${app}/`, data)
|
||||
saveGlobalApplication(app, data) {
|
||||
return repository.put(`/${resource}/global/${app}/`, data)
|
||||
},
|
||||
|
||||
getUserApplications() {
|
||||
return repository.get(`/${resource}/user/applications/`)
|
||||
},
|
||||
getUserApplication(app) {
|
||||
return repository.get(`/${resource}/user/${app}/`)
|
||||
},
|
||||
getUserApplicationStructure(app) {
|
||||
return repository.get(`/${resource}/user/structure/?app=${app}`)
|
||||
},
|
||||
saveUserApplication(app, data) {
|
||||
return repository.put(`/${resource}/user/${app}/`, data)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user