# PimPublicCollection

The PimPublicCollection type of the TypeScript SDK, which pim.listPublicDirectory and 2 more methods take or answer.

```ts
type PimPublicCollection = {
  category: string | null
  collectionId: string
  components: ('VEVENT' | 'VTODO')[] | null
  createdAt: number
  description: string | null
  displayName: string | null
  id: string
  kind: ('calendar' | 'addressbook')
  ownerIdentityId: string
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `category` | `string` \| `null` | Public category tag, or null |
| `collectionId` | `string` | Public collection ULID |
| `components` | `('VEVENT' \| 'VTODO')[] \| null` | Supported 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. |
| `createdAt` | `number` | Creation timestamp in epoch seconds |
| `description` | `string` \| `null` | Public description, or null |
| `displayName` | `string` \| `null` | Public display name, or null |
| `id` | `string` | Directory entry id: the handle POST /subscriptions takes |
| `kind` | `('calendar' \| 'addressbook')` | Collection type ('calendar' or 'addressbook') |
| `ownerIdentityId` | `string` | Identity ULID of the owner |

## Used by

| Method | What it does |
| --- | --- |
| [`pim.listPublicDirectory`](/docs/sdks/typescript/pim/list-public-directory) | Browse account public directory |
| [`pim.subscribe`](/docs/sdks/typescript/pim/subscribe) | Subscribe to public collection |
| [`pim.listSubscriptions`](/docs/sdks/typescript/pim/list-subscriptions) | List public collection subscriptions |
