Skip to Content

The PimCollection type of the TypeScript SDK, which calendars.create and 9 more methods take or answer.

type PimCollection = {
  color: string | null
  components: ('VEVENT' | 'VTODO')[] | null
  createdAt: number
  description: string | null
  descriptionLang: string | null
  displayName: string | null
  id: string
  kind: ('calendar' | 'addressbook')
  myPermission: ('owner' | 'read' | 'read-write')
  name: string
  objectCount: number
  ownerAddress: string | null
  ownerIdentityId: string
  role: string | null
  scheduleTransp: ('opaque' | 'transparent')
  syncToken: string
  taskCounts: PimCollectionTaskCounts
  visibility: ('private' | 'shared' | 'public')
}

Fields

FieldTypeDescription
colorstring | nullHex color code (e.g. #3b82f6), or null
components('VEVENT' | 'VTODO')[] | nullSupported primary components, in VEVENT then VTODO order; null for addressbooks. Legacy mixed calendars may also retain journals or unparsed resources. Narrowing refuses with components_conflict and a count of incompatible live and restorable trashed objects.
createdAtnumberCreation timestamp in epoch seconds
descriptionstring | nullCollection description, or null
descriptionLangstring | nullBCP 47 language tag (xml:lang) of the collection description, or null
displayNamestring | nullDisplay name of the calendar or addressbook, or null
idstringCollection ULID: stable across renames; the JMAP id
kind('calendar' | 'addressbook')Collection type ('calendar' or 'addressbook')
myPermission('owner' | 'read' | 'read-write')What the CALLING identity may do with this collection: 'owner' for its own, otherwise the granted level.
namestringURL path segment slug (e.g. 'work-calendar')
objectCountnumberTotal number of events, tasks, or contacts in this collection
ownerAddressstring | nullPrimary address of the owning mailbox, or null when it has none
ownerIdentityIdstringIdentity ULID that owns this collection
rolestring | nullSpecial role ('default', 'tasks'), or null
scheduleTransp('opaque' | 'transparent')RFC 6638 §9.1 CALDAV:schedule-calendar-transp — whether this calendar's objects contribute to the owner's free/busy. transparent excludes the whole calendar (a birthdays or subscribed-holidays feed); opaque is the default the RFC assumes when the property is absent. An addressbook always reports opaque and cannot be set otherwise: the property is defined for calendar collections, and the addressbook PATCH body does not carry it
syncTokenstringOpaque sync token for delta synchronization
taskCountsPimCollectionTaskCountsMembers that are tasks, split by the two progress buckets. Exact complements; events and contacts are in neither, so the pair need not sum to objectCount.
visibility('private' | 'shared' | 'public')Access visibility scope

Used by

MethodWhat it does
calendars.createCreate calendar
calendars.listList calendars
calendars.getGet calendar by ID
calendars.getByNameGet calendar by name
calendars.updateUpdate calendar
addressbooks.createCreate addressbook
addressbooks.listList addressbooks
addressbooks.getGet addressbook by ID
addressbooks.getByNameGet addressbook by name
addressbooks.updateUpdate addressbook

Used in

PimCollectionRestored.