# MessageChangesFeed

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

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

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `created` | `string[]` | Message IDs that newly appeared (delivered, imported, or restored) |
| `destroyed` | `string[]` | Message IDs that were deleted, expunged, or purged |
| `hasMore` | `boolean` | True if more changes remain to be polled immediately |
| `labels` | [`LabelInfo[]`](/docs/sdks/typescript/types/label-info) | Optional. With `include=labels`: the label vector as of `newState`, exactly `GET /labels`' shape |
| `newState` | `string` | New opaque state token for the next sync poll |
| `oldState` | `string` | Optional. Echo of the previous state token passed in the request |
| `sync` | `Record<string, MessageSyncEntry>` | Optional. With `include=sync`: the folder-sync projection of every `created`/`updated` id on this page, keyed by id |
| `updated` | `string[]` | Message IDs whose flags, keywords, labels, or thread changed |

## Used by

| Method | What it does |
| --- | --- |
| [`messages.getChanges`](/docs/sdks/typescript/messages/get-changes) | Get message sync changes |
