# AlertRoutes
(*alertRoutes*)

## Overview

### Available Operations

* [create](#create) - Create Alert Routes V2
* [delete](#delete) - Destroy Alert Routes V2
* [show](#show) - Show Alert Routes V2
* [update](#update) - Update Alert Routes V2

## create

Create an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow
previewing filter and grouping rules.


### Example Usage

```typescript
import { Incidentio } from "incidentio";

const incidentio = new Incidentio();

async function run() {
  const result = await incidentio.alertRoutes.create({
    alertSourceIds: [
      "02FCNDV6P870EA6S7TK1DSYDG2",
    ],
    autoDeclineEnabled: false,
    conditionGroups: [
      {
        conditions: [
          {
            operation: "one_of",
            paramBindings: [
              {
                arrayValue: [
                  {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                ],
                value: {
                  literal: "SEV123",
                  reference: "incident.severity",
                },
              },
            ],
            subject: "incident.severity",
          },
        ],
      },
    ],
    deferTimeSeconds: 1,
    enabled: false,
    escalationBindings: [
      {
        binding: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
      },
    ],
    expressions: [
      {
        elseBranch: {
          result: {
            arrayValue: [
              {
                literal: "SEV123",
                reference: "incident.severity",
              },
            ],
            value: {
              literal: "SEV123",
              reference: "incident.severity",
            },
          },
        },
        label: "Team Slack channel",
        operations: [
          {
            branches: {
              branches: [
                {
                  conditionGroups: [
                    {
                      conditions: [
                        {
                          operation: "one_of",
                          paramBindings: [
                            {
                              arrayValue: [
                                {
                                  literal: "SEV123",
                                  reference: "incident.severity",
                                },
                              ],
                              value: {
                                literal: "SEV123",
                                reference: "incident.severity",
                              },
                            },
                          ],
                          subject: "incident.severity",
                        },
                      ],
                    },
                  ],
                  result: {
                    arrayValue: [
                      {
                        literal: "SEV123",
                        reference: "incident.severity",
                      },
                    ],
                    value: {
                      literal: "SEV123",
                      reference: "incident.severity",
                    },
                  },
                },
              ],
              returns: {
                array: true,
                type: "IncidentStatus",
              },
            },
            filter: {
              conditionGroups: [
                {
                  conditions: [
                    {
                      operation: "one_of",
                      paramBindings: [
                        {
                          arrayValue: [
                            {
                              literal: "SEV123",
                              reference: "incident.severity",
                            },
                          ],
                          value: {
                            literal: "SEV123",
                            reference: "incident.severity",
                          },
                        },
                      ],
                      subject: "incident.severity",
                    },
                  ],
                },
              ],
            },
            navigate: {
              reference: "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]",
            },
            operationType: "navigate",
            parse: {
              returns: {
                array: true,
                type: "IncidentStatus",
              },
              source: "metadata.annotations[\"github.com/repo\"]",
            },
          },
        ],
        reference: "abc123",
        rootReference: "incident.status",
      },
    ],
    groupingKeys: [
      {
        id: "01FCNDV6P870EA6S7TK1DSYDG0",
      },
    ],
    groupingWindowSeconds: 1,
    incidentConditionGroups: [
      {
        conditions: [
          {
            operation: "one_of",
            paramBindings: [
              {
                arrayValue: [
                  {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                ],
                value: {
                  literal: "SEV123",
                  reference: "incident.severity",
                },
              },
            ],
            subject: "incident.severity",
          },
        ],
      },
    ],
    incidentEnabled: false,
    name: "Production incidents",
    template: {
      customFieldPriorities: {
        "abc123": "abc123",
      },
      customFields: {
        "custom_field_10014": {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
      },
      incidentMode: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      incidentType: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      name: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      prioritySeverity: "severity-first-wins",
      severity: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      summary: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      workspace: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
    },
  });
  
  // Handle the result
  console.log(result)
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { IncidentioCore } from "incidentio/core.js";
import { alertRoutesCreate } from "incidentio/funcs/alertRoutesCreate.js";

// Use `IncidentioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const incidentio = new IncidentioCore();

async function run() {
  const res = await alertRoutesCreate(incidentio, {
    alertSourceIds: [
      "02FCNDV6P870EA6S7TK1DSYDG2",
    ],
    autoDeclineEnabled: false,
    conditionGroups: [
      {
        conditions: [
          {
            operation: "one_of",
            paramBindings: [
              {
                arrayValue: [
                  {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                ],
                value: {
                  literal: "SEV123",
                  reference: "incident.severity",
                },
              },
            ],
            subject: "incident.severity",
          },
        ],
      },
    ],
    deferTimeSeconds: 1,
    enabled: false,
    escalationBindings: [
      {
        binding: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
      },
    ],
    expressions: [
      {
        elseBranch: {
          result: {
            arrayValue: [
              {
                literal: "SEV123",
                reference: "incident.severity",
              },
            ],
            value: {
              literal: "SEV123",
              reference: "incident.severity",
            },
          },
        },
        label: "Team Slack channel",
        operations: [
          {
            branches: {
              branches: [
                {
                  conditionGroups: [
                    {
                      conditions: [
                        {
                          operation: "one_of",
                          paramBindings: [
                            {
                              arrayValue: [
                                {
                                  literal: "SEV123",
                                  reference: "incident.severity",
                                },
                              ],
                              value: {
                                literal: "SEV123",
                                reference: "incident.severity",
                              },
                            },
                          ],
                          subject: "incident.severity",
                        },
                      ],
                    },
                  ],
                  result: {
                    arrayValue: [
                      {
                        literal: "SEV123",
                        reference: "incident.severity",
                      },
                    ],
                    value: {
                      literal: "SEV123",
                      reference: "incident.severity",
                    },
                  },
                },
              ],
              returns: {
                array: true,
                type: "IncidentStatus",
              },
            },
            filter: {
              conditionGroups: [
                {
                  conditions: [
                    {
                      operation: "one_of",
                      paramBindings: [
                        {
                          arrayValue: [
                            {
                              literal: "SEV123",
                              reference: "incident.severity",
                            },
                          ],
                          value: {
                            literal: "SEV123",
                            reference: "incident.severity",
                          },
                        },
                      ],
                      subject: "incident.severity",
                    },
                  ],
                },
              ],
            },
            navigate: {
              reference: "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]",
            },
            operationType: "navigate",
            parse: {
              returns: {
                array: true,
                type: "IncidentStatus",
              },
              source: "metadata.annotations[\"github.com/repo\"]",
            },
          },
        ],
        reference: "abc123",
        rootReference: "incident.status",
      },
    ],
    groupingKeys: [
      {
        id: "01FCNDV6P870EA6S7TK1DSYDG0",
      },
    ],
    groupingWindowSeconds: 1,
    incidentConditionGroups: [
      {
        conditions: [
          {
            operation: "one_of",
            paramBindings: [
              {
                arrayValue: [
                  {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                ],
                value: {
                  literal: "SEV123",
                  reference: "incident.severity",
                },
              },
            ],
            subject: "incident.severity",
          },
        ],
      },
    ],
    incidentEnabled: false,
    name: "Production incidents",
    template: {
      customFieldPriorities: {
        "abc123": "abc123",
      },
      customFields: {
        "custom_field_10014": {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
      },
      incidentMode: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      incidentType: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      name: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      prioritySeverity: "severity-first-wins",
      severity: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      summary: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
      workspace: {
        arrayValue: [
          {
            literal: "SEV123",
            reference: "incident.severity",
          },
        ],
        value: {
          literal: "SEV123",
          reference: "incident.severity",
        },
      },
    },
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result)
}

run();
```

### Parameters

| Parameter                                                                                                                                                                      | Type                                                                                                                                                                           | Required                                                                                                                                                                       | Description                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`                                                                                                                                                                      | [components.CreateRequestBody](../../models/components/createrequestbody.md)                                                                                                   | :heavy_check_mark:                                                                                                                                                             | The request object to use for the request.                                                                                                                                     |
| `options`                                                                                                                                                                      | RequestOptions                                                                                                                                                                 | :heavy_minus_sign:                                                                                                                                                             | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions`                                                                                                                                                         | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                        | :heavy_minus_sign:                                                                                                                                                             | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries`                                                                                                                                                              | [RetryConfig](../../lib/utils/retryconfig.md)                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                             | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise\<[components.CreateResponseBody](../../models/components/createresponsebody.md)\>**

### Errors

| Error Object    | Status Code     | Content Type    |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx         | */*             |


## delete

Archives an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow
previewing filter and grouping rules.


### Example Usage

```typescript
import { Incidentio } from "incidentio";

const incidentio = new Incidentio();

async function run() {
  await incidentio.alertRoutes.delete({
    id: "01FCNDV6P870EA6S7TK1DSYDG0",
  });
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { IncidentioCore } from "incidentio/core.js";
import { alertRoutesDelete } from "incidentio/funcs/alertRoutesDelete.js";

// Use `IncidentioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const incidentio = new IncidentioCore();

async function run() {
  const res = await alertRoutesDelete(incidentio, {
    id: "01FCNDV6P870EA6S7TK1DSYDG0",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();
```

### Parameters

| Parameter                                                                                                                                                                      | Type                                                                                                                                                                           | Required                                                                                                                                                                       | Description                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`                                                                                                                                                                      | [operations.AlertRoutesV2NumberDestroyRequest](../../models/operations/alertroutesv2numberdestroyrequest.md)                                                                   | :heavy_check_mark:                                                                                                                                                             | The request object to use for the request.                                                                                                                                     |
| `options`                                                                                                                                                                      | RequestOptions                                                                                                                                                                 | :heavy_minus_sign:                                                                                                                                                             | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions`                                                                                                                                                         | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                        | :heavy_minus_sign:                                                                                                                                                             | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries`                                                                                                                                                              | [RetryConfig](../../lib/utils/retryconfig.md)                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                             | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise\<void\>**

### Errors

| Error Object    | Status Code     | Content Type    |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx         | */*             |


## show

Show an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow
previewing filter and grouping rules.


### Example Usage

```typescript
import { Incidentio } from "incidentio";

const incidentio = new Incidentio();

async function run() {
  const result = await incidentio.alertRoutes.show({
    id: "01FCNDV6P870EA6S7TK1DSYDG0",
  });
  
  // Handle the result
  console.log(result)
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { IncidentioCore } from "incidentio/core.js";
import { alertRoutesShow } from "incidentio/funcs/alertRoutesShow.js";

// Use `IncidentioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const incidentio = new IncidentioCore();

async function run() {
  const res = await alertRoutesShow(incidentio, {
    id: "01FCNDV6P870EA6S7TK1DSYDG0",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result)
}

run();
```

### Parameters

| Parameter                                                                                                                                                                      | Type                                                                                                                                                                           | Required                                                                                                                                                                       | Description                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`                                                                                                                                                                      | [operations.AlertRoutesV2NumberShowRequest](../../models/operations/alertroutesv2numbershowrequest.md)                                                                         | :heavy_check_mark:                                                                                                                                                             | The request object to use for the request.                                                                                                                                     |
| `options`                                                                                                                                                                      | RequestOptions                                                                                                                                                                 | :heavy_minus_sign:                                                                                                                                                             | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions`                                                                                                                                                         | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                        | :heavy_minus_sign:                                                                                                                                                             | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries`                                                                                                                                                              | [RetryConfig](../../lib/utils/retryconfig.md)                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                             | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise\<[components.CreateResponseBody](../../models/components/createresponsebody.md)\>**

### Errors

| Error Object    | Status Code     | Content Type    |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx         | */*             |


## update

Updates an alert route.

We recommend you create alert routes in the incident.io dashboard where we allow
previewing filter and grouping rules.


### Example Usage

```typescript
import { Incidentio } from "incidentio";

const incidentio = new Incidentio();

async function run() {
  const result = await incidentio.alertRoutes.update({
    id: "01FCNDV6P870EA6S7TK1DSYDG0",
    updateRequestBody: {
      alertSourceIds: [
        "02FCNDV6P870EA6S7TK1DSYDG2",
      ],
      autoDeclineEnabled: false,
      conditionGroups: [
        {
          conditions: [
            {
              operation: "one_of",
              paramBindings: [
                {
                  arrayValue: [
                    {
                      literal: "SEV123",
                      reference: "incident.severity",
                    },
                  ],
                  value: {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                },
              ],
              subject: "incident.severity",
            },
          ],
        },
      ],
      deferTimeSeconds: 1,
      enabled: false,
      escalationBindings: [
        {
          binding: {
            arrayValue: [
              {
                literal: "SEV123",
                reference: "incident.severity",
              },
            ],
            value: {
              literal: "SEV123",
              reference: "incident.severity",
            },
          },
        },
      ],
      expressions: [
        {
          elseBranch: {
            result: {
              arrayValue: [
                {
                  literal: "SEV123",
                  reference: "incident.severity",
                },
              ],
              value: {
                literal: "SEV123",
                reference: "incident.severity",
              },
            },
          },
          label: "Team Slack channel",
          operations: [
            {
              branches: {
                branches: [
                  {
                    conditionGroups: [
                      {
                        conditions: [
                          {
                            operation: "one_of",
                            paramBindings: [
                              {
                                arrayValue: [
                                  {
                                    literal: "SEV123",
                                    reference: "incident.severity",
                                  },
                                ],
                                value: {
                                  literal: "SEV123",
                                  reference: "incident.severity",
                                },
                              },
                            ],
                            subject: "incident.severity",
                          },
                        ],
                      },
                    ],
                    result: {
                      arrayValue: [
                        {
                          literal: "SEV123",
                          reference: "incident.severity",
                        },
                      ],
                      value: {
                        literal: "SEV123",
                        reference: "incident.severity",
                      },
                    },
                  },
                ],
                returns: {
                  array: true,
                  type: "IncidentStatus",
                },
              },
              filter: {
                conditionGroups: [
                  {
                    conditions: [
                      {
                        operation: "one_of",
                        paramBindings: [
                          {
                            arrayValue: [
                              {
                                literal: "SEV123",
                                reference: "incident.severity",
                              },
                            ],
                            value: {
                              literal: "SEV123",
                              reference: "incident.severity",
                            },
                          },
                        ],
                        subject: "incident.severity",
                      },
                    ],
                  },
                ],
              },
              navigate: {
                reference: "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]",
              },
              operationType: "navigate",
              parse: {
                returns: {
                  array: true,
                  type: "IncidentStatus",
                },
                source: "metadata.annotations[\"github.com/repo\"]",
              },
            },
          ],
          reference: "abc123",
          rootReference: "incident.status",
        },
      ],
      groupingKeys: [
        {
          id: "01FCNDV6P870EA6S7TK1DSYDG0",
        },
      ],
      groupingWindowSeconds: 1,
      incidentConditionGroups: [
        {
          conditions: [
            {
              operation: "one_of",
              paramBindings: [
                {
                  arrayValue: [
                    {
                      literal: "SEV123",
                      reference: "incident.severity",
                    },
                  ],
                  value: {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                },
              ],
              subject: "incident.severity",
            },
          ],
        },
      ],
      incidentEnabled: false,
      name: "Production incidents",
      template: {
        customFieldPriorities: {
          "abc123": "abc123",
        },
        customFields: {
          "custom_field_10014": {
            arrayValue: [
              {
                literal: "SEV123",
                reference: "incident.severity",
              },
            ],
            value: {
              literal: "SEV123",
              reference: "incident.severity",
            },
          },
        },
        incidentMode: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        incidentType: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        name: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        prioritySeverity: "severity-first-wins",
        severity: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        summary: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        workspace: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
      },
    },
  });
  
  // Handle the result
  console.log(result)
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { IncidentioCore } from "incidentio/core.js";
import { alertRoutesUpdate } from "incidentio/funcs/alertRoutesUpdate.js";

// Use `IncidentioCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const incidentio = new IncidentioCore();

async function run() {
  const res = await alertRoutesUpdate(incidentio, {
    id: "01FCNDV6P870EA6S7TK1DSYDG0",
    updateRequestBody: {
      alertSourceIds: [
        "02FCNDV6P870EA6S7TK1DSYDG2",
      ],
      autoDeclineEnabled: false,
      conditionGroups: [
        {
          conditions: [
            {
              operation: "one_of",
              paramBindings: [
                {
                  arrayValue: [
                    {
                      literal: "SEV123",
                      reference: "incident.severity",
                    },
                  ],
                  value: {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                },
              ],
              subject: "incident.severity",
            },
          ],
        },
      ],
      deferTimeSeconds: 1,
      enabled: false,
      escalationBindings: [
        {
          binding: {
            arrayValue: [
              {
                literal: "SEV123",
                reference: "incident.severity",
              },
            ],
            value: {
              literal: "SEV123",
              reference: "incident.severity",
            },
          },
        },
      ],
      expressions: [
        {
          elseBranch: {
            result: {
              arrayValue: [
                {
                  literal: "SEV123",
                  reference: "incident.severity",
                },
              ],
              value: {
                literal: "SEV123",
                reference: "incident.severity",
              },
            },
          },
          label: "Team Slack channel",
          operations: [
            {
              branches: {
                branches: [
                  {
                    conditionGroups: [
                      {
                        conditions: [
                          {
                            operation: "one_of",
                            paramBindings: [
                              {
                                arrayValue: [
                                  {
                                    literal: "SEV123",
                                    reference: "incident.severity",
                                  },
                                ],
                                value: {
                                  literal: "SEV123",
                                  reference: "incident.severity",
                                },
                              },
                            ],
                            subject: "incident.severity",
                          },
                        ],
                      },
                    ],
                    result: {
                      arrayValue: [
                        {
                          literal: "SEV123",
                          reference: "incident.severity",
                        },
                      ],
                      value: {
                        literal: "SEV123",
                        reference: "incident.severity",
                      },
                    },
                  },
                ],
                returns: {
                  array: true,
                  type: "IncidentStatus",
                },
              },
              filter: {
                conditionGroups: [
                  {
                    conditions: [
                      {
                        operation: "one_of",
                        paramBindings: [
                          {
                            arrayValue: [
                              {
                                literal: "SEV123",
                                reference: "incident.severity",
                              },
                            ],
                            value: {
                              literal: "SEV123",
                              reference: "incident.severity",
                            },
                          },
                        ],
                        subject: "incident.severity",
                      },
                    ],
                  },
                ],
              },
              navigate: {
                reference: "catalog_attribute[\"01FCNDV6P870EA6S7TK1DSYD5H\"]",
              },
              operationType: "navigate",
              parse: {
                returns: {
                  array: true,
                  type: "IncidentStatus",
                },
                source: "metadata.annotations[\"github.com/repo\"]",
              },
            },
          ],
          reference: "abc123",
          rootReference: "incident.status",
        },
      ],
      groupingKeys: [
        {
          id: "01FCNDV6P870EA6S7TK1DSYDG0",
        },
      ],
      groupingWindowSeconds: 1,
      incidentConditionGroups: [
        {
          conditions: [
            {
              operation: "one_of",
              paramBindings: [
                {
                  arrayValue: [
                    {
                      literal: "SEV123",
                      reference: "incident.severity",
                    },
                  ],
                  value: {
                    literal: "SEV123",
                    reference: "incident.severity",
                  },
                },
              ],
              subject: "incident.severity",
            },
          ],
        },
      ],
      incidentEnabled: false,
      name: "Production incidents",
      template: {
        customFieldPriorities: {
          "abc123": "abc123",
        },
        customFields: {
          "custom_field_10014": {
            arrayValue: [
              {
                literal: "SEV123",
                reference: "incident.severity",
              },
            ],
            value: {
              literal: "SEV123",
              reference: "incident.severity",
            },
          },
        },
        incidentMode: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        incidentType: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        name: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        prioritySeverity: "severity-first-wins",
        severity: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        summary: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
        workspace: {
          arrayValue: [
            {
              literal: "SEV123",
              reference: "incident.severity",
            },
          ],
          value: {
            literal: "SEV123",
            reference: "incident.severity",
          },
        },
      },
    },
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result)
}

run();
```

### Parameters

| Parameter                                                                                                                                                                      | Type                                                                                                                                                                           | Required                                                                                                                                                                       | Description                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`                                                                                                                                                                      | [operations.AlertRoutesV2NumberUpdateRequest](../../models/operations/alertroutesv2numberupdaterequest.md)                                                                     | :heavy_check_mark:                                                                                                                                                             | The request object to use for the request.                                                                                                                                     |
| `options`                                                                                                                                                                      | RequestOptions                                                                                                                                                                 | :heavy_minus_sign:                                                                                                                                                             | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions`                                                                                                                                                         | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                        | :heavy_minus_sign:                                                                                                                                                             | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries`                                                                                                                                                              | [RetryConfig](../../lib/utils/retryconfig.md)                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                             | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise\<[components.CreateResponseBody](../../models/components/createresponsebody.md)\>**

### Errors

| Error Object    | Status Code     | Content Type    |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx         | */*             |
