diff --git a/server/openapi.js b/server/openapi.js index 62ba5fb..f7c46f6 100644 --- a/server/openapi.js +++ b/server/openapi.js @@ -457,11 +457,34 @@ function buildPaths() { }, '/api/v1/contacts': { get: op({ summary: 'List contacts', tag: 'Contacts' }), - post: op({ summary: 'Create contact', tag: 'Contacts', stateChanging: true, requestBody: jsonBody(null) }), + post: op({ summary: 'Create contact with multi-value fields', tag: 'Contacts', stateChanging: true, requestBody: jsonBody(null) }), }, '/api/v1/contacts/meta': { get: op({ summary: 'Get contact metadata', tag: 'Contacts' }) }, + '/api/v1/contacts/cardav/accounts': { + get: op({ summary: 'List CardDAV accounts', tag: 'Contacts' }), + post: op({ summary: 'Add CardDAV account', tag: 'Contacts', stateChanging: true, requestBody: jsonBody(null) }), + }, + '/api/v1/contacts/cardav/accounts/{id}': { + delete: op({ summary: 'Delete CardDAV account', tag: 'Contacts', params: [idParam()], stateChanging: true }), + }, + '/api/v1/contacts/cardav/accounts/{id}/test': { + post: op({ summary: 'Test CardDAV connection', tag: 'Contacts', params: [idParam()] }), + }, + '/api/v1/contacts/cardav/accounts/{id}/addressbooks': { + get: op({ summary: 'List addressbooks for account', tag: 'Contacts', params: [idParam()] }), + }, + '/api/v1/contacts/cardav/accounts/{id}/addressbooks/refresh': { + post: op({ summary: 'Refresh addressbooks for account', tag: 'Contacts', params: [idParam()], stateChanging: true }), + }, + '/api/v1/contacts/cardav/addressbooks/{id}': { + put: op({ summary: 'Toggle addressbook enabled state', tag: 'Contacts', params: [idParam()], stateChanging: true, requestBody: jsonBody(null) }), + }, + '/api/v1/contacts/cardav/accounts/{id}/sync': { + post: op({ summary: 'Sync CardDAV account', tag: 'Contacts', params: [idParam()], stateChanging: true }), + }, '/api/v1/contacts/{id}': { - put: op({ summary: 'Update contact', tag: 'Contacts', params: [idParam()], stateChanging: true, requestBody: jsonBody(null) }), + get: op({ summary: 'Get contact with multi-value fields', tag: 'Contacts', params: [idParam()] }), + put: op({ summary: 'Update contact with multi-value fields', tag: 'Contacts', params: [idParam()], stateChanging: true, requestBody: jsonBody(null) }), delete: op({ summary: 'Delete contact', tag: 'Contacts', params: [idParam()], stateChanging: true }), }, '/api/v1/contacts/{id}/vcard': { get: op({ summary: 'Download contact as vCard', tag: 'Contacts', params: [idParam()] }) },