Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nextcloud/cdav-library",
"version": "2.2.0",
"version": "2.3.0",
"description": "CalDAV and CardDAV client library for Nextcloud",
"type": "module",
"main": "dist/index.cjs",
Expand Down
12 changes: 8 additions & 4 deletions src/models/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ const debug = debugFactory('Calendar')
* - enabled
* - order
* - timezone
* - defaultAlarm
* - defaultAlarmPartDay
* - defaultAlarmFullDay
* - transparency
* - components
*
* The first five allowing read-write access
* The first seven allowing read-write access
*
* @augments DavCollection
*/
Expand All @@ -54,7 +56,8 @@ export class Calendar extends davCollectionPublishable(davCollectionShareable(Da
super._exposeProperty('timezone', NS.IETF_CALDAV, 'calendar-timezone', true)
super._exposeProperty('components', NS.IETF_CALDAV, 'supported-calendar-component-set')
super._exposeProperty('transparency', NS.IETF_CALDAV, 'schedule-calendar-transp', true)
super._exposeProperty('defaultAlarm', NS.NEXTCLOUD, 'default-alarm', true)
super._exposeProperty('defaultAlarmPartDay', NS.NEXTCLOUD, 'default-alarm-part-day', true)
super._exposeProperty('defaultAlarmFullDay', NS.NEXTCLOUD, 'default-alarm-full-day', true)
}

/**
Expand Down Expand Up @@ -283,7 +286,8 @@ export class Calendar extends davCollectionPublishable(davCollectionShareable(Da
[NS.IETF_CALDAV, 'schedule-calendar-transp'],
[NS.IETF_CALDAV, 'schedule-default-calendar-URL'],
[NS.OWNCLOUD, 'calendar-enabled'],
[NS.NEXTCLOUD, 'default-alarm'],
[NS.NEXTCLOUD, 'default-alarm-part-day'],
[NS.NEXTCLOUD, 'default-alarm-full-day'],
[NS.NEXTCLOUD, 'owner-displayname'],
[NS.NEXTCLOUD, 'trash-bin-retention-duration'],
[NS.NEXTCLOUD, 'deleted-at'],
Expand Down
3 changes: 2 additions & 1 deletion src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ export default class Parser {
this.registerParser('{http://owncloud.org/ns}calendar-enabled', Parser.bool)
this.registerParser('{http://owncloud.org/ns}enabled', Parser.bool)
this.registerParser('{http://owncloud.org/ns}read-only', Parser.bool)
this.registerParser('{http://nextcloud.com/ns}default-alarm', Parser.decInt)
this.registerParser('{http://nextcloud.com/ns}default-alarm-part-day', Parser.decInt)
this.registerParser('{http://nextcloud.com/ns}default-alarm-full-day', Parser.decInt)
this.registerParser('{http://nextcloud.com/ns}owner-displayname', Parser.text)
this.registerParser('{http://nextcloud.com/ns}deleted-at', Parser.iso8601DateTime)
this.registerParser('{http://nextcloud.com/ns}calendar-uri', Parser.text)
Expand Down
13 changes: 10 additions & 3 deletions src/propset/calendarPropSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import * as NS from '../utility/namespaceUtility.js'
* - {urn:ietf:params:xml:ns:caldav}calendar-description
* - {urn:ietf:params:xml:ns:caldav}calendar-timezone
* - {http://owncloud.org/ns}calendar-enabled
* - {http://nextcloud.com/ns}default-alarm
* - {http://nextcloud.com/ns}default-alarm-part-day
* - {http://nextcloud.com/ns}default-alarm-full-day
*
* @param {object} props
* @return {object}
Expand Down Expand Up @@ -72,9 +73,15 @@ export default function calendarPropSet(props) {
value: value ? '1' : '0',
})
break
case '{http://nextcloud.com/ns}default-alarm':
case '{http://nextcloud.com/ns}default-alarm-part-day':
xmlified.push({
name: [NS.NEXTCLOUD, 'default-alarm'],
name: [NS.NEXTCLOUD, 'default-alarm-part-day'],
value,
})
break
case '{http://nextcloud.com/ns}default-alarm-full-day':
xmlified.push({
name: [NS.NEXTCLOUD, 'default-alarm-full-day'],
value,
})
break
Expand Down
Loading