Go back to top

vivaldi.calendar Modders API Reference

Use the vivaldi.calendar API to manipulate calendar events.

Types

#AccountType

ENUM

The account type. Maps to int in db: 0: Local. 1: Vivaldi.net calendar. 2: Google Calendar. 3: CalDAV. 4: Read only iCal.

  • local
  • vivaldi
  • google
  • caldav
  • ical
  • fastmail
  • #RecurrenceException

    A object describing how an instance of event recurrence is changed.

    Properties:

    exception_id
    (optional)
    string

    The id of the exception.

    cancelled
    (optional)
    boolean

    If a certain instance of recurring event is cancelled.

    date
    (optional)
    number

    The date of a recurring event that an exception should be added to. In milliseconds since the epoch.

    exception_event_id
    (optional)
    string

    The id of the event that serves as exception to the event in a recurrence series.

    parent_event_id
    (optional)
    string

    The id of the event that is parent to all the others events in the recurrence series.

    #CreateNotificationRow

    An object describing notification to be created during event creation.

    Properties:

    name
    string

    Name of the notification.

    when
    number

    When this notification should fire. In milliseconds since the epoch.

    #CreateInviteRow

    An object describing invite to be created during event creation.

    Properties:

    name
    string

    Name of the invite.

    address
    string

    The invite address.

    partstat
    string

    The participation status for the event invite.

    #SupportedCalendarComponents

    An object describing supported calendar component set.

    Properties:

    vevent
    boolean

    Does the calendar support vevent.

    vtodo
    boolean

    Does the calendar support vtodo.

    vjournal
    boolean

    Does the calendar support vjournal.

    #Notification

    An object describing notification.

    Properties:

    id
    string

    The unique identifier for the notification. IDs are unique within the current profile, and they remain valid even after the browser is restarted.

    event_id
    (optional)
    string

    The event id this notification applies to.

    name
    string

    Name of the notification.

    description
    (optional)
    string

    The description of the notification.

    when
    number

    When this notification should fire. In milliseconds since the epoch.

    period
    (optional)
    number

    If not null, when the notification will fire. In milliseconds since the epoch.

    delay
    (optional)
    integer

    The notification will fire after delay minutes from now. Can not be used together with when.

    #Invite

    Object describing event invite.

    Properties:

    id
    string

    The id of the invite.

    event_id
    string

    The id of the event that this invite applies to.

    name
    (optional)
    string

    The name of the contact to send the invite to.

    address
    string

    The address of the contact to send the invite to.

    sent
    (optional)
    boolean

    States if the event invite has been sent or not.

    partstat
    (optional)
    string

    The participation status for the event invite.

    #CalendarEvent

    A calendar event. An event belongs to a single Calendar.

    Properties:

    id
    string

    The unique identifier for the event. IDs are unique within the current profile, and they remain valid even after the browser is restarted.

    calendarId
    string

    The calendar id of the event.

    alarmId
    (optional)
    string

    The alarm id of the event.

    title
    string

    Title of event.

    description
    (optional)
    string

    The event description.

    start
    (optional)
    number

    When this event starts, in milliseconds since the epoch.

    end
    (optional)
    number

    When this event ends, in milliseconds since the epoch.

    allDay
    (optional)
    boolean

    All day event.

    is_recurring
    (optional)
    boolean

    Is this a recurring event.

    location
    (optional)
    string

    The location of the event.

    url
    (optional)
    string

    The url of the event.

    etag
    (optional)
    string

    The CalDAV etag id of the event.

    href
    (optional)
    string

    The CalDAV href id of the event.

    uid
    (optional)
    string

    The event uid.

    eventTypeId
    (optional)
    string

    The event type id.

    task
    (optional)
    boolean

    Whether this event is a task. Tasks can be marked as completed.

    complete
    (optional)
    boolean

    If this event is a task type you can mark it as complete.

    trash
    (optional)
    boolean

    Is this event trashed.

    trash_time
    (optional)
    number

    When this event was trashed, in milliseconds since the epoch.

    sequence
    (optional)
    integer

    iCal sequence field according to: https://tools.ietf.org/html/rfc5545#section-3.8.7.4.

    ical
    (optional)
    string

    The original ical message.

    rrule
    (optional)
    string

    The recurring rule. In iCalendar format.

    recurrenceExceptions
    (optional)

    List of recurrence exceptions. Either cancelled instances or moved.

    Array of:

    • RecurrenceException
    notifications
    (optional)

    List of notifications.

    Array of:

    • Notification
    organizer
    (optional)
    string

    The organizer of the event.

    invites
    (optional)

    List of invites.

    Array of:

    • Invite
    timezone
    (optional)
    string

    The timezone of the event.

    priority
    (optional)
    integer

    Priority of event or task. Must be in the range [0..9]. 0 is equivalent of no priority.

    status
    (optional)
    string

    The overall status or confirmation for the event or todo.

    percentage_complete
    (optional)
    integer

    The percent completion of a todo to the organizer.

    categories
    (optional)
    string

    Event or todo categories. A comma separated list.

    component_class
    (optional)
    string

    Access classification for a event or todo.

    attachment
    (optional)
    string

    Document object for a event or todo.

    completed
    (optional)
    number

    The date and time that a todo was actually completed.

    syncPending
    (optional)
    boolean

    Does this event have any pending sync changes.

    deletePending
    (optional)
    boolean

    Should the event be deleted locally once server deletion is completed.

    end_recurring
    (optional)
    number

    When this event ends re-occurring. In milliseconds since the epoch.

    #CreateDetails

    Object passed to the create() function.

    Properties:

    title
    string

    ⚠ NO DESCRIPTION PROVIDED

    description
    (optional)
    string

    ⚠ NO DESCRIPTION PROVIDED

    start
    (optional)
    number

    When this event shoud starts, in milliseconds since the epoch.

    end
    (optional)
    number

    When this event should ends, in milliseconds since the epoch.

    allDay
    (optional)
    boolean

    Is this a all day event.

    is_recurring
    (optional)
    boolean

    Is this a recurring event.

    location
    (optional)
    string

    The location of the event.

    url
    (optional)
    string

    The url of the event.

    calendarId
    string

    The calendar id of the event.

    etag
    (optional)
    string

    The CalDAV etag id of the event.

    href
    (optional)
    string

    The CalDAV href id of the event.

    uid
    (optional)
    string

    The event uid.

    task
    (optional)
    boolean

    Whether this event is a task. Tasks can be marked as completed.

    complete
    (optional)
    boolean

    If this event is a task type you can mark it as complete.

    sequence
    (optional)
    integer

    iCal sequence field according to: https://tools.ietf.org/html/rfc5545#section-3.8.7.4.

    ical
    (optional)
    string

    The original ical message.

    rrule
    (optional)
    string

    The recurring rule. In iCalendar format.

    eventTypeId
    (optional)
    string

    The event type id of the event.

    organizer
    (optional)
    string

    The organizer of the event.

    recurrenceExceptions
    (optional)

    List of recurrence exceptions.

    Array of:

    • RecurrenceException
    notifications
    (optional)

    List of notifications to create.

    Array of:

    • CreateNotificationRow
    invites
    (optional)

    List of invites to create.

    Array of:

    • CreateInviteRow
    timezone
    (optional)
    string

    The timezone of the event to create.

    is_template
    boolean

    Is the event a template or not.

    priority
    (optional)
    integer

    Priority of event or task. Must be in the range [0..9]. 0 is equivalent of no priority.

    status
    (optional)
    string

    The overall status or confirmation for the event or todo.

    percentage_complete
    (optional)
    integer

    The percent completion of a todo to the organizer.

    categories
    (optional)
    string

    Event or todo categories. A comma separated list.

    component_class
    (optional)
    string

    Access classification for a event or todo.

    attachment
    (optional)
    string

    Document object for a event or todo.

    completed
    (optional)
    number

    The date and time that a todo was actually completed.

    syncPending
    (optional)
    boolean

    Does this event have any pending sync changes.

    deletePending
    (optional)
    boolean

    Should the event be deleted locally once server deletion is completed.

    end_recurring
    (optional)
    number

    When this event ends re-occurring. In milliseconds since the epoch.

    #EventType

    A event type.

    Properties:

    id
    string

    The unique identifier for the event type. IDs are unique within the current profile, and they remain valid even after the browser is restarted.

    name
    string

    The event type name.

    color
    (optional)
    string

    The color of the event type.

    iconindex
    (optional)
    integer

    The event type icon index.

    #CreateEventType

    Object passed to the typeCreate() function.

    Properties:

    name
    string

    ⚠ NO DESCRIPTION PROVIDED

    color
    (optional)
    string

    The color of the event type.

    iconindex
    (optional)
    integer

    The event type iconindex.

    #CreateEventsResults

    Object stating how many events were created successfully and how many creations resulted in errors.

    Properties:

    created_count
    integer

    Number of events created.

    failed_count
    integer

    Number of failed event creation attempts.

    #CreateCalendarDetails

    Object passed to the createCalendar() function.

    Properties:

    accountId
    string

    The id of the account the calendar belongs to.

    name
    string

    The name of the calendar to be created.

    description
    (optional)
    string

    The description of the calendar to be created.

    orderindex
    (optional)
    integer

    The UI order of the calendar.

    iconindex
    (optional)
    integer

    The iconindex of the calendar.

    color
    (optional)
    string

    The color of the calendar.

    hidden
    (optional)
    boolean

    If this calendar should be visible.

    active
    (optional)
    boolean

    If this CalDAV calendar should be polled.

    lastChecked
    (optional)
    number

    When this calendar last checked for updates. In milliseconds since the epoch.

    timezone
    (optional)
    string

    The timezone of the calendar.

    ctag
    (optional)
    string

    The ctag field of the CalDAV calendar.

    supportedCalendarComponent
    SupportedCalendarComponents

    ⚠ NO DESCRIPTION PROVIDED

    #Calendar

    Calendar that owns events.

    Properties:

    id
    string

    The unique identifier for the calendar. IDs are unique within the current profile, and they remain valid even after the browser is restarted.

    accountId
    string

    The id of the account the calendar belongs to.

    name
    string

    The name of the calendar.

    description
    (optional)
    string

    The calendar description.

    orderindex
    (optional)
    integer

    The UI order of the calendar.

    color
    (optional)
    string

    The UI color of the calendar.

    hidden
    (optional)
    boolean

    States if the calendar is hidden in the UI.

    active
    (optional)
    boolean

    States if a CalDAV calendar should be polled.

    iconindex
    (optional)
    integer

    Icon index of the calendar.

    ctag
    (optional)
    string

    The ctag field of the CalDAV calendar.

    lastChecked
    (optional)
    number

    When this calendar last checked for updates. In milliseconds since the epoch.

    timezone
    (optional)
    string

    The timezone of the calendar.

    supportedCalendarComponent
    SupportedCalendarComponents

    ⚠ NO DESCRIPTION PROVIDED

    #updateCalendar

    Object to update calendar.

    Properties:

    accountId
    (optional)
    string

    The id of the account the calendar belongs to.

    name
    (optional)
    string

    The name of the calendar.

    description
    (optional)
    string

    The calendar description.

    orderindex
    (optional)
    integer

    The UI order of the calendar.

    color
    (optional)
    string

    The UI color of the calendar.

    hidden
    (optional)
    boolean

    States if the calendar is hidden in the UI.

    active
    (optional)
    boolean

    States if a CalDAV calendar should be polled.

    iconindex
    (optional)
    integer

    Icon index of the calendar.

    ctag
    (optional)
    string

    The ctag field of the CalDAV calendar.

    lastChecked
    (optional)
    number

    When this calendar last checked for updates. In milliseconds since the epoch.

    timezone
    (optional)
    string

    The timezone of the calendar.

    supportedCalendarComponent
    (optional)
    SupportedCalendarComponents

    ⚠ NO DESCRIPTION PROVIDED

    #updatedAccount

    Object to update calendar.

    Properties:

    name
    (optional)
    string

    ⚠ NO DESCRIPTION PROVIDED

    username
    (optional)
    string

    ⚠ NO DESCRIPTION PROVIDED

    url
    (optional)
    string

    The updated url of the account.

    account_type
    (optional)
    AccountType

    The type of account.

    interval
    (optional)
    integer

    The interval how often this account should poll. In seconds.

    #createdAccount

    Object to create calendar.

    Properties:

    name
    string

    ⚠ NO DESCRIPTION PROVIDED

    username
    string

    ⚠ NO DESCRIPTION PROVIDED

    url
    string

    The url of the account to create.

    account_type
    (optional)
    AccountType

    The type of account.

    interval
    (optional)
    integer

    The interval how often this account should poll. In seconds.

    #Account

    An object describing calendar account.

    Properties:

    id
    string

    The unique identifier for the account. IDs are unique within the current profile, and they remain valid even after the browser is restarted.

    name
    string

    Name of the account.

    username
    string

    The username of the account.

    url
    string

    The base url of the account.

    account_type
    (optional)
    AccountType

    The type of account.

    interval
    (optional)
    integer

    The interval how often this account should poll. In seconds.

    #EventTemplate

    A event template object.

    Properties:

    id
    string

    The unique identifier for the event template.

    name
    string

    The name of the event template.

    ical
    string

    The ical of the event template.

    Listeners

    How to use listeners

    Each listener type has the same functions, used for each listener API in the same way:

    .addListener(function callback)

    Adds a function to a listener for an event

    .removeListener(function callback)

    Removes a function to a listener for an event

    .hasListener(function callback)

    Returns a boolean if a function is attached to a listener for an event

    .hasListeners()

    Returns a boolean if a listener has any attached functions

    .dispatch()

    Returns array of promises dispatched to the listener

    #onIcsFileOpened

    Called when the user opens a downloaded ics file

    Parameters:

    filePath
    string

    ⚠ NO DESCRIPTION PROVIDED

    #onWebcalUrlOpened

    Called when the user opens a webcal link

    Parameters:

    url
    string

    ⚠ NO DESCRIPTION PROVIDED

    #onMailtoOpened

    Called when the user opens a mailto link

    Parameters:

    mailto
    string

    ⚠ NO DESCRIPTION PROVIDED

    #onEventCreated

    Fired when a event is created.

    Parameters:

    createdEvent
    CalendarEvent

    The created event.

    #onNotificationChanged

    Fired when notification is created, updated or deleted.

    Parameters:

    changedNotification
    Notification

    The created, changed or updated notification.

    #onCalendarDataChanged

    Fired when the calendar datamodel should be reloaded.

    Methods

    #getAllEvents

    Retrieves all events in calendar.

    #getAllEventTypes

    Retrieves all event types.

    #getAllNotifications

    Retrieves all notifications.

    #eventCreate

    Creates a event in the specified calendar.

    Parameters:

    event
    CreateDetails

    ⚠ NO DESCRIPTION PROVIDED

    #eventsCreate

    Creates multiple events.

    Parameters:

    eventsList

    ⚠ NO DESCRIPTION PROVIDED

    Array of:

    • CreateDetailsMinimum items: 1

    #deleteEvent

    Deletes an event.

    Parameters:

    id
    string

    ⚠ NO DESCRIPTION PROVIDED

    #deleteEventException

    Deletes an recurring event exception.

    Parameters:

    exception_id
    string

    The id of the exception to delete.

    #updateRecurrenceException

    Updates the recurrence exception of an event. Specify only the properties that you want to change. Unspecified properties will be left unchanged.

    Parameters:

    recurrenceId
    string

    ⚠ NO DESCRIPTION PROVIDED

    changes
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    cancelled
    (optional)
    boolean

    If a certain instance of recurring event is cancelled.

    date
    (optional)
    number

    The date of a recurring event that an exception should be added to. In milliseconds since the epoch.

    exception_event_id
    (optional)
    string

    The id of the event that serves as exception to the event in a recurrence series.

    parent_event_id
    (optional)
    string

    The id of the event that is parent to all the others events in the recurrence series.

    #updateEvent

    Updates the properties of an event. Specify only the properties that you want to change. Unspecified properties will be left unchanged.

    Parameters:

    id
    string

    ⚠ NO DESCRIPTION PROVIDED

    changes
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    calendarId
    (optional)
    string

    The updated calendar id of event.

    alarmId
    (optional)
    string

    The updated alarm id of event.

    title
    (optional)
    string

    The updated title of event.

    description
    (optional)
    string

    The updated description of event.

    start
    (optional)
    number

    When this event shoud starts, in milliseconds since the epoch.

    end
    (optional)
    number

    Updated time when this event should end, in milliseconds since the epoch.

    allDay
    (optional)
    boolean

    Is this all day event.

    location
    (optional)
    string

    The location of the event.

    is_recurring
    (optional)
    boolean

    Is this a recurring event.

    url
    (optional)
    string

    The url of the event.

    etag
    (optional)
    string

    The CalDAV.etag of the event.

    href
    (optional)
    string

    The href id of the event.

    uid
    (optional)
    string

    The event uid.

    eventTypeId
    (optional)
    string

    The event type id.

    task
    (optional)
    boolean

    Whether this event is a task. Tasks can be marked as completed.

    complete
    (optional)
    boolean

    If this event is a task type you can mark it as complete.

    trash
    (optional)
    boolean

    Is this event trashed.

    sequence
    (optional)
    integer

    iCal sequence field according to: https://tools.ietf.org/html/rfc5545#section-3.8.7.4.

    ical
    (optional)
    string

    The original ical message.

    rrule
    (optional)
    string

    The recurring rule. In iCalendar format.

    organizer
    (optional)
    string

    The organizer of the event.

    timezone
    (optional)
    string

    The timezone of the event.

    priority
    (optional)
    integer

    Priority of event or task. Must be in the range [0..9]. 0 is equivalent of no priority.

    status
    (optional)
    string

    The overall status or confirmation for the event or todo.

    percentage_complete
    (optional)
    integer

    The percent completion of a todo to the Organizer.

    categories
    (optional)
    string

    Event or todo categories. A comma separated list.

    component_class
    (optional)
    string

    Access classification for a event or todo.

    attachment
    (optional)
    string

    Access classification for a event or todo.

    completed
    (optional)
    number

    The date and time that a todo was actually completed.

    syncPending
    (optional)
    boolean

    Does this event have any pending sync changes.

    deletePending
    (optional)
    boolean

    Should the event be deleted locally once server deletion is completed.

    end_recurring
    (optional)
    number

    When this event ends re-occurring. In milliseconds since the epoch.

    #create

    Creates a calendar.

    Parameters:

    calendar
    CreateCalendarDetails

    ⚠ NO DESCRIPTION PROVIDED

    #getAll

    Returns all calendars.

    #delete

    Deletes a calendar, with all its events and event exceptions.

    Parameters:

    id
    string

    The id of the calendar to be deleted.

    #update

    Updates the properties of an calendar. Specify only the properties that you want to change. Unspecified properties will be left unchanged.

    Parameters:

    id
    string

    ⚠ NO DESCRIPTION PROVIDED

    changes
    updateCalendar

    ⚠ NO DESCRIPTION PROVIDED

    #eventTypeCreate

    Creates a event type.

    Parameters:

    event_type
    CreateEventType

    ⚠ NO DESCRIPTION PROVIDED

    #eventTypeUpdate

    Updates the properties of an event type. Specify only the properties that you want to change. Unspecified properties will be left unchanged.

    Parameters:

    id
    string

    ⚠ NO DESCRIPTION PROVIDED

    changes
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    name
    (optional)
    string

    ⚠ NO DESCRIPTION PROVIDED

    color
    (optional)
    string

    The updated color of the event type.

    iconindex
    (optional)
    integer

    The iconindex of the event type.

    #deleteEventType

    Deletes an event type.

    Parameters:

    id
    string

    ⚠ NO DESCRIPTION PROVIDED

    #createEventException

    Creates an exception to event instance in recurring series.

    Parameters:

    parent_event_id
    string

    The parent id of the event in the recurrence series.

    exception_event_id
    (optional)
    string

    The id of the event that serves as exception to the event in a recurrence series.

    cancelled
    boolean

    Cancel this instance of recurring event.

    date
    (optional)
    number

    When the exception should happen. In milliseconds since the epoch.

    #createNotification

    Creates a notification.

    Parameters:

    createNotification
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    event_id
    (optional)
    string

    The event id of the event to create the notification for.

    name
    string

    The name of the notification.

    description
    (optional)
    string

    The description of the notification.

    when
    number

    When the notification should fire. In milliseconds since the epoch.

    period
    (optional)
    number

    If not null, when the notification will fire. In milliseconds since the epoch.

    delay
    (optional)
    integer

    The notification will fire after delay minutes from now. Can not be used together with when.

    #updateNotification

    Updates the properties of a notification. Specify only the properties that you want to change. Unspecified properties will be left unchanged.

    Parameters:

    id
    string

    The id of the notification to update.

    changes
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    name
    (optional)
    string

    The name of the notification.

    description
    (optional)
    string

    The description of the notification.

    when
    (optional)
    number

    When the notification should fire. In milliseconds since the epoch.

    period
    (optional)
    number

    If not null, when the notification will fire. In milliseconds since the epoch.

    delay
    (optional)
    integer

    The notification will fire after delay minutes from now. Can not be used together with when.

    #deleteNotification

    Deletes a notification.

    Parameters:

    id
    string

    ⚠ NO DESCRIPTION PROVIDED

    #createInvite

    Creates an invite for event.

    Parameters:

    createInvite
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    event_id
    string

    The event id of the event to create the invite for.

    address
    string

    The email address to send the invite to.

    name
    string

    The name of the persion to send the invite to.

    partstat
    (optional)
    string

    The participation status for the event invite

    sent
    (optional)
    boolean

    Has the invite been sent.

    #deleteInvite

    Deletes an invite.

    Parameters:

    id
    string

    The invite id to delete.

    #updateInvite

    Updates an invite for event.

    Parameters:

    updateInvite
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    id
    string

    The id of the invite to update.

    address
    (optional)
    string

    The email address to send the invite to.

    name
    (optional)
    string

    The name of the persion to send the invite to.

    partstat
    (optional)
    string

    The participation status for the event invite.

    sent
    (optional)
    boolean

    Has the invite been sent.

    #getAllAccounts

    Retrieves all calendar accounts.

    #createAccount

    Creates an account.

    Parameters:

    toCreate
    createdAccount

    ⚠ NO DESCRIPTION PROVIDED

    callback

    ⚠ NO DESCRIPTION PROVIDED

    Parameters:

    createAccount
    Account

    ⚠ NO DESCRIPTION PROVIDED

    result
    boolean

    ⚠ NO DESCRIPTION PROVIDED

    #updateAccount

    Updates the properties of an account. Specify only the properties that you want to change. Unspecified properties will be left unchanged.

    Parameters:

    id
    string

    ⚠ NO DESCRIPTION PROVIDED

    changes
    updatedAccount

    ⚠ NO DESCRIPTION PROVIDED

    callback

    ⚠ NO DESCRIPTION PROVIDED

    Parameters:

    result
    Account

    ⚠ NO DESCRIPTION PROVIDED

    res
    (optional)
    string

    ⚠ NO DESCRIPTION PROVIDED

    #deleteAccount

    Deletes an account and its calendars, events, recurring_exceptions, notifications etc

    Parameters:

    id
    string

    The account id to be deleted

    #createEventTemplate

    Creates an event template.

    Parameters:

    name
    string

    The event template name.

    ical
    string

    The event template ical.

    #getAllEventTemplates

    Retrieves all event templates.

    #updateEventTemplate

    Updates the properties of an event template. Specify only the properties that you want to change. Unspecified properties will be left unchanged.

    Parameters:

    id
    string

    The id of the event template to update.

    changes
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    name
    (optional)
    string

    The updated name of the event template.

    ical
    (optional)
    string

    The updated ical of the event template.

    #deleteEventTemplate

    Deletes an event template.

    Parameters:

    id
    string

    The id of the event template to delete.