Skip to Content

The MessageChangesFeed type of the TypeScript SDK, which messages.getChanges take or answer.

type MessageChangesFeed = {
  created: string[]
  destroyed: string[]
  hasMore: boolean
  labels?: LabelInfo[]
  newState: string
  oldState?: string
  sync?: Record<string, MessageSyncEntry>
  updated: string[]
}

Fields

FieldTypeDescription
createdstring[]Message IDs that newly appeared (delivered, imported, or restored)
destroyedstring[]Message IDs that were deleted, expunged, or purged
hasMorebooleanTrue if more changes remain to be polled immediately
labelsLabelInfo[]Optional. With include=labels: the label vector as of newState, exactly GET /labels' shape
newStatestringNew opaque state token for the next sync poll
oldStatestringOptional. Echo of the previous state token passed in the request
syncRecord<string, MessageSyncEntry>Optional. With include=sync: the folder-sync projection of every created/updated id on this page, keyed by id
updatedstring[]Message IDs whose flags, keywords, labels, or thread changed

Used by

MethodWhat it does
messages.getChangesGet message sync changes

On this page