# Webhook Endpoints

## Create

`client.projects.webhookEndpoints.create(stringprojectID, WebhookEndpointCreateParamsbody, RequestOptionsoptions?): WebhookEndpointCreateResponse`

**post** `/projects/{projectId}/webhook-endpoints`

Register a new webhook endpoint for the project

### Parameters

- `projectID: string`

- `body: WebhookEndpointCreateParams`

  - `enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

    The events that trigger the webhook. ['*'] indicates that all events are enabled

    - `"*"`

    - `"asset.download.completed"`

    - `"asset.download.created"`

    - `"asset.download.failed"`

    - `"generation.completed"`

    - `"generation.created"`

    - `"generation.failed"`

    - `"inference.cancelled"`

    - `"inference.completed"`

    - `"inference.created"`

    - `"inference.failed"`

    - `"model.download.completed"`

    - `"model.download.created"`

    - `"model.download.failed"`

    - `"model.training.cancelled"`

    - `"model.training.completed"`

    - `"model.training.failed"`

    - `"model.training.started"`

    - `"team.credit.threshold.crossed"`

  - `url: string`

    The URL of the webhook endpoint. Must be an absolute http(s) URL

  - `description?: string`

    A description of the webhook endpoint

### Returns

- `WebhookEndpointCreateResponse`

  - `webhookEndpoint: WebhookEndpoint`

    The creation response, and the only one that carries the secret: it is
    generated once and never returned again, so a client that loses it has to
    recreate the endpoint.

    - `id: string`

      The ID of the webhook endpoint

    - `createdAt: string`

      The date and time the webhook endpoint was created

    - `enabled: boolean`

      Whether the webhook is enabled

    - `enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

      The events that trigger the webhook. ['*'] indicates that all events are enabled

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `nbFailedCalls: number`

      The number of calls to the webhook endpoint that have failed

    - `nbTotalCalls: number`

      The number of calls to the webhook endpoint

    - `ownerId: string`

      The ID of the owner of the webhook endpoint: a project id for job
      lifecycle events, a team id for alert events

    - `ownerType: "project" | "team"`

      Whether the owner is a project or a team. Required to tell them apart: a
      project created before the team/project split shares its team's id

      - `"project"`

      - `"team"`

    - `secret: string`

      The endpoint's secret, used to generate webhook signatures

    - `updatedAt: string`

      The date and time the webhook endpoint was updated

    - `url: string`

      The URL of the webhook endpoint

    - `description?: string`

      A description of the webhook endpoint

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const webhookEndpoint = await client.projects.webhookEndpoints.create('projectId', {
  enabledEvents: ['*'],
  url: 'url',
});

console.log(webhookEndpoint.webhookEndpoint);
```

#### Response

```json
{
  "webhookEndpoint": {
    "id": "id",
    "createdAt": "createdAt",
    "enabled": true,
    "enabledEvents": [
      "*"
    ],
    "nbFailedCalls": 0,
    "nbTotalCalls": 0,
    "ownerId": "ownerId",
    "ownerType": "project",
    "secret": "secret",
    "updatedAt": "updatedAt",
    "url": "url",
    "description": "description"
  }
}
```

## Delete

`client.projects.webhookEndpoints.delete(stringwebhookEndpointID, WebhookEndpointDeleteParamsparams, RequestOptionsoptions?): WebhookEndpointDeleteResponse`

**delete** `/projects/{projectId}/webhook-endpoints/{webhookEndpointId}`

Delete a particular webhook endpoint by its Id

### Parameters

- `webhookEndpointID: string`

- `params: WebhookEndpointDeleteParams`

  - `projectId: string`

    The project Id

### Returns

- `WebhookEndpointDeleteResponse = unknown`

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const webhookEndpoint = await client.projects.webhookEndpoints.delete('webhookEndpointId', {
  projectId: 'projectId',
});

console.log(webhookEndpoint);
```

#### Response

```json
{}
```

## List

`client.projects.webhookEndpoints.list(stringprojectID, RequestOptionsoptions?): WebhookEndpointListResponse`

**get** `/projects/{projectId}/webhook-endpoints`

List the project's webhook endpoints

### Parameters

- `projectID: string`

### Returns

- `WebhookEndpointListResponse`

  - `webhookEndpoints: Array<WebhookEndpoint>`

    A list of the project webhooks

    - `id: string`

      The ID of the webhook endpoint

    - `createdAt: string`

      The date and time the webhook endpoint was created

    - `enabled: boolean`

      Whether the webhook is enabled

    - `enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

      The events that trigger the webhook. ['*'] indicates that all events are enabled

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `nbFailedCalls: number`

      The number of calls to the webhook endpoint that have failed

    - `nbTotalCalls: number`

      The number of calls to the webhook endpoint

    - `ownerId: string`

      The ID of the owner of the webhook endpoint: a project id for job
      lifecycle events, a team id for alert events

    - `ownerType: "project" | "team"`

      Whether the owner is a project or a team. Required to tell them apart: a
      project created before the team/project split shares its team's id

      - `"project"`

      - `"team"`

    - `updatedAt: string`

      The date and time the webhook endpoint was updated

    - `url: string`

      The URL of the webhook endpoint

    - `description?: string`

      A description of the webhook endpoint

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const webhookEndpoints = await client.projects.webhookEndpoints.list('projectId');

console.log(webhookEndpoints.webhookEndpoints);
```

#### Response

```json
{
  "webhookEndpoints": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "enabled": true,
      "enabledEvents": [
        "*"
      ],
      "nbFailedCalls": 0,
      "nbTotalCalls": 0,
      "ownerId": "ownerId",
      "ownerType": "project",
      "updatedAt": "updatedAt",
      "url": "url",
      "description": "description"
    }
  ]
}
```

## Update

`client.projects.webhookEndpoints.update(stringwebhookEndpointID, WebhookEndpointUpdateParamsparams, RequestOptionsoptions?): WebhookEndpointUpdateResponse`

**put** `/projects/{projectId}/webhook-endpoints/{webhookEndpointId}`

Update a particular webhook endpoint for a project

### Parameters

- `webhookEndpointID: string`

- `params: WebhookEndpointUpdateParams`

  - `projectId: string`

    Path param: The project Id

  - `description?: string`

    Body param: A description of the webhook endpoint

  - `enabled?: boolean`

    Body param: Whether the webhook is enabled

  - `enabledEvents?: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

    Body param: The events that trigger the webhook. ['*'] indicates that all events are enabled

    - `"*"`

    - `"asset.download.completed"`

    - `"asset.download.created"`

    - `"asset.download.failed"`

    - `"generation.completed"`

    - `"generation.created"`

    - `"generation.failed"`

    - `"inference.cancelled"`

    - `"inference.completed"`

    - `"inference.created"`

    - `"inference.failed"`

    - `"model.download.completed"`

    - `"model.download.created"`

    - `"model.download.failed"`

    - `"model.training.cancelled"`

    - `"model.training.completed"`

    - `"model.training.failed"`

    - `"model.training.started"`

    - `"team.credit.threshold.crossed"`

  - `url?: string`

    Body param: The URL of the webhook endpoint. Must be an absolute http(s) URL

### Returns

- `WebhookEndpointUpdateResponse`

  - `webhookEndpoint: WebhookEndpoint`

    - `id: string`

      The ID of the webhook endpoint

    - `createdAt: string`

      The date and time the webhook endpoint was created

    - `enabled: boolean`

      Whether the webhook is enabled

    - `enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

      The events that trigger the webhook. ['*'] indicates that all events are enabled

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `nbFailedCalls: number`

      The number of calls to the webhook endpoint that have failed

    - `nbTotalCalls: number`

      The number of calls to the webhook endpoint

    - `ownerId: string`

      The ID of the owner of the webhook endpoint: a project id for job
      lifecycle events, a team id for alert events

    - `ownerType: "project" | "team"`

      Whether the owner is a project or a team. Required to tell them apart: a
      project created before the team/project split shares its team's id

      - `"project"`

      - `"team"`

    - `updatedAt: string`

      The date and time the webhook endpoint was updated

    - `url: string`

      The URL of the webhook endpoint

    - `description?: string`

      A description of the webhook endpoint

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const webhookEndpoint = await client.projects.webhookEndpoints.update('webhookEndpointId', {
  projectId: 'projectId',
});

console.log(webhookEndpoint.webhookEndpoint);
```

#### Response

```json
{
  "webhookEndpoint": {
    "id": "id",
    "createdAt": "createdAt",
    "enabled": true,
    "enabledEvents": [
      "*"
    ],
    "nbFailedCalls": 0,
    "nbTotalCalls": 0,
    "ownerId": "ownerId",
    "ownerType": "project",
    "updatedAt": "updatedAt",
    "url": "url",
    "description": "description"
  }
}
```

## Domain Types

### Webhook Endpoint Create Response

- `WebhookEndpointCreateResponse`

  - `webhookEndpoint: WebhookEndpoint`

    The creation response, and the only one that carries the secret: it is
    generated once and never returned again, so a client that loses it has to
    recreate the endpoint.

    - `id: string`

      The ID of the webhook endpoint

    - `createdAt: string`

      The date and time the webhook endpoint was created

    - `enabled: boolean`

      Whether the webhook is enabled

    - `enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

      The events that trigger the webhook. ['*'] indicates that all events are enabled

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `nbFailedCalls: number`

      The number of calls to the webhook endpoint that have failed

    - `nbTotalCalls: number`

      The number of calls to the webhook endpoint

    - `ownerId: string`

      The ID of the owner of the webhook endpoint: a project id for job
      lifecycle events, a team id for alert events

    - `ownerType: "project" | "team"`

      Whether the owner is a project or a team. Required to tell them apart: a
      project created before the team/project split shares its team's id

      - `"project"`

      - `"team"`

    - `secret: string`

      The endpoint's secret, used to generate webhook signatures

    - `updatedAt: string`

      The date and time the webhook endpoint was updated

    - `url: string`

      The URL of the webhook endpoint

    - `description?: string`

      A description of the webhook endpoint

### Webhook Endpoint Delete Response

- `WebhookEndpointDeleteResponse = unknown`

### Webhook Endpoint List Response

- `WebhookEndpointListResponse`

  - `webhookEndpoints: Array<WebhookEndpoint>`

    A list of the project webhooks

    - `id: string`

      The ID of the webhook endpoint

    - `createdAt: string`

      The date and time the webhook endpoint was created

    - `enabled: boolean`

      Whether the webhook is enabled

    - `enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

      The events that trigger the webhook. ['*'] indicates that all events are enabled

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `nbFailedCalls: number`

      The number of calls to the webhook endpoint that have failed

    - `nbTotalCalls: number`

      The number of calls to the webhook endpoint

    - `ownerId: string`

      The ID of the owner of the webhook endpoint: a project id for job
      lifecycle events, a team id for alert events

    - `ownerType: "project" | "team"`

      Whether the owner is a project or a team. Required to tell them apart: a
      project created before the team/project split shares its team's id

      - `"project"`

      - `"team"`

    - `updatedAt: string`

      The date and time the webhook endpoint was updated

    - `url: string`

      The URL of the webhook endpoint

    - `description?: string`

      A description of the webhook endpoint

### Webhook Endpoint Update Response

- `WebhookEndpointUpdateResponse`

  - `webhookEndpoint: WebhookEndpoint`

    - `id: string`

      The ID of the webhook endpoint

    - `createdAt: string`

      The date and time the webhook endpoint was created

    - `enabled: boolean`

      Whether the webhook is enabled

    - `enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>`

      The events that trigger the webhook. ['*'] indicates that all events are enabled

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `nbFailedCalls: number`

      The number of calls to the webhook endpoint that have failed

    - `nbTotalCalls: number`

      The number of calls to the webhook endpoint

    - `ownerId: string`

      The ID of the owner of the webhook endpoint: a project id for job
      lifecycle events, a team id for alert events

    - `ownerType: "project" | "team"`

      Whether the owner is a project or a team. Required to tell them apart: a
      project created before the team/project split shares its team's id

      - `"project"`

      - `"team"`

    - `updatedAt: string`

      The date and time the webhook endpoint was updated

    - `url: string`

      The URL of the webhook endpoint

    - `description?: string`

      A description of the webhook endpoint

# Events

## List

`client.projects.webhookEndpoints.events.list(stringwebhookEndpointID, EventListParamsparams, RequestOptionsoptions?): EventListResponse`

**get** `/projects/{projectId}/webhook-endpoints/{webhookEndpointId}/events`

List the project's webhook events

### Parameters

- `webhookEndpointID: string`

- `params: EventListParams`

  - `projectId: string`

    Path param: The project Id

  - `paginationToken?: string`

    Query param: A token you received in a previous request to query the next page of items

### Returns

- `EventListResponse`

  - `items: Array<Item>`

    A list of the project webhook events

    - `id: string`

    - `endpointId: string`

    - `status: "created" | "failed" | "retrying" | "success"`

      - `"created"`

      - `"failed"`

      - `"retrying"`

      - `"success"`

    - `type: "*" | "asset.download.completed" | "asset.download.created" | 16 more`

      Every event a webhook endpoint can subscribe to: a project endpoint takes the
      job lifecycle events, a team endpoint takes the alert events.

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `updatedAt: string`

  - `nextPaginationToken?: string`

    A token to query the next page of events

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const events = await client.projects.webhookEndpoints.events.list('webhookEndpointId', {
  projectId: 'projectId',
});

console.log(events.items);
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "endpointId": "endpointId",
      "status": "created",
      "type": "*",
      "updatedAt": "updatedAt"
    }
  ],
  "nextPaginationToken": "nextPaginationToken"
}
```

## Retrieve

`client.projects.webhookEndpoints.events.retrieve(stringeventID, EventRetrieveParamsparams, RequestOptionsoptions?): EventRetrieveResponse`

**get** `/projects/{projectId}/webhook-endpoints/{webhookEndpointId}/events/{eventId}`

Retrieve one delivery event of one of the project's webhook endpoints

### Parameters

- `eventID: string`

- `params: EventRetrieveParams`

  - `projectId: string`

    The project Id

  - `webhookEndpointId: string`

    The webhook endpoint that delivered the event

### Returns

- `EventRetrieveResponse`

  - `webhookEvent: WebhookEvent`

    - `id: string`

    - `attempts: Array<Attempt>`

      - `responseStatusCode: number`

      - `sentAt: string`

    - `createdAt: string`

    - `endpointId: string`

    - `payload: unknown`

    - `sentAt: string`

    - `status: "created" | "failed" | "retrying" | "success"`

      - `"created"`

      - `"failed"`

      - `"retrying"`

      - `"success"`

    - `type: "*" | "asset.download.completed" | "asset.download.created" | 16 more`

      Every event a webhook endpoint can subscribe to: a project endpoint takes the
      job lifecycle events, a team endpoint takes the alert events.

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `updatedAt: string`

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const event = await client.projects.webhookEndpoints.events.retrieve('eventId', {
  projectId: 'projectId',
  webhookEndpointId: 'webhookEndpointId',
});

console.log(event.webhookEvent);
```

#### Response

```json
{
  "webhookEvent": {
    "id": "id",
    "attempts": [
      {
        "responseStatusCode": 0,
        "sentAt": "sentAt"
      }
    ],
    "createdAt": "createdAt",
    "endpointId": "endpointId",
    "payload": {},
    "sentAt": "sentAt",
    "status": "created",
    "type": "*",
    "updatedAt": "updatedAt"
  }
}
```

## Domain Types

### Event List Response

- `EventListResponse`

  - `items: Array<Item>`

    A list of the project webhook events

    - `id: string`

    - `endpointId: string`

    - `status: "created" | "failed" | "retrying" | "success"`

      - `"created"`

      - `"failed"`

      - `"retrying"`

      - `"success"`

    - `type: "*" | "asset.download.completed" | "asset.download.created" | 16 more`

      Every event a webhook endpoint can subscribe to: a project endpoint takes the
      job lifecycle events, a team endpoint takes the alert events.

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `updatedAt: string`

  - `nextPaginationToken?: string`

    A token to query the next page of events

### Event Retrieve Response

- `EventRetrieveResponse`

  - `webhookEvent: WebhookEvent`

    - `id: string`

    - `attempts: Array<Attempt>`

      - `responseStatusCode: number`

      - `sentAt: string`

    - `createdAt: string`

    - `endpointId: string`

    - `payload: unknown`

    - `sentAt: string`

    - `status: "created" | "failed" | "retrying" | "success"`

      - `"created"`

      - `"failed"`

      - `"retrying"`

      - `"success"`

    - `type: "*" | "asset.download.completed" | "asset.download.created" | 16 more`

      Every event a webhook endpoint can subscribe to: a project endpoint takes the
      job lifecycle events, a team endpoint takes the alert events.

      - `"*"`

      - `"asset.download.completed"`

      - `"asset.download.created"`

      - `"asset.download.failed"`

      - `"generation.completed"`

      - `"generation.created"`

      - `"generation.failed"`

      - `"inference.cancelled"`

      - `"inference.completed"`

      - `"inference.created"`

      - `"inference.failed"`

      - `"model.download.completed"`

      - `"model.download.created"`

      - `"model.download.failed"`

      - `"model.training.cancelled"`

      - `"model.training.completed"`

      - `"model.training.failed"`

      - `"model.training.started"`

      - `"team.credit.threshold.crossed"`

    - `updatedAt: string`
