> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> API reference for OneDrive: every `onedrive.api.*` operation with input and output types.

Every `onedrive.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Drive

### get

`drive.get`

Get a drive by ID

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `select_fields` | `string[]` | No | — |
| `expand_fields` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `name` | `string` | No | — |
| `driveType` | `string` | No | — |
| `webUrl` | `string` | No | — |
| `description` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |
| `owner` | `object` | No | — |
| `quota` | `object` | No | — |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] quota full type
>
> ```ts theme={null}
> {
>   deleted?: number,
>   remaining?: number,
>   total?: number,
>   used?: number,
>   state?: string
> }
> ```

***

### getGroup

`drive.getGroup`

Get a group's drive

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.getGroup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_id` | `string` | Yes | — |
| `select_fields` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `name` | `string` | No | — |
| `driveType` | `string` | No | — |
| `webUrl` | `string` | No | — |
| `description` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |
| `owner` | `object` | No | — |
| `quota` | `object` | No | — |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] quota full type
>
> ```ts theme={null}
> {
>   deleted?: number,
>   remaining?: number,
>   total?: number,
>   used?: number,
>   state?: string
> }
> ```

***

### getQuota

`drive.getQuota`

Get the user's drive and quota information

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.getQuota({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `select_fields` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `name` | `string` | No | — |
| `driveType` | `string` | No | — |
| `webUrl` | `string` | No | — |
| `description` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |
| `owner` | `object` | No | — |
| `quota` | `object` | No | — |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] quota full type
>
> ```ts theme={null}
> {
>   deleted?: number,
>   remaining?: number,
>   total?: number,
>   used?: number,
>   state?: string
> }
> ```

***

### getRecentItems

`drive.getRecentItems`

Get recently accessed drive items

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.getRecentItems({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `top` | `number` | No | — |
| `select` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### getRoot

`drive.getRoot`

Get the root folder of the user's drive

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.getRoot({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `select_fields` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `size` | `number` | No | — |
| `webUrl` | `string` | No | — |
| `eTag` | `string` | No | — |
| `cTag` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |
| `createdBy` | `object` | No | — |
| `lastModifiedBy` | `object` | No | — |
| `parentReference` | `object` | No | — |
| `file` | `object` | No | — |
| `folder` | `object` | No | — |
| `deleted` | `object` | No | — |
| `@microsoft.graph.downloadUrl` | `string` | No | — |
| `root` | `object` | No | — |
| `description` | `string` | No | — |

> [accordion] createdBy full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] lastModifiedBy full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] parentReference full type
>
> ```ts theme={null}
> {
>   driveId?: string,
>   id?: string,
>   path?: string,
>   name?: string,
>   siteId?: string
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string,
>   hashes?: {
>     quickXorHash?: string,
>     sha1Hash?: string,
>     sha256Hash?: string
>   }
> }
> ```

> [accordion] folder full type
>
> ```ts theme={null}
> {
>   childCount?: number
> }
> ```

> [accordion] deleted full type
>
> ```ts theme={null}
> {
>   state?: string
> }
> ```

> [accordion] root full type
>
> ```ts theme={null}
> {
> }
> ```

***

### getSharedItems

`drive.getSharedItems`

Get items shared with the user

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.getSharedItems({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allow_external` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### getSpecialFolder

`drive.getSpecialFolder`

Get a special folder (documents, photos, cameraroll)

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.getSpecialFolder({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `special_folder_name` | `documents \| photos \| cameraroll` | Yes | — |
| `select_fields` | `string[]` | No | — |
| `expand_relations` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `size` | `number` | No | — |
| `webUrl` | `string` | No | — |
| `eTag` | `string` | No | — |
| `cTag` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |
| `createdBy` | `object` | No | — |
| `lastModifiedBy` | `object` | No | — |
| `parentReference` | `object` | No | — |
| `file` | `object` | No | — |
| `folder` | `object` | No | — |
| `deleted` | `object` | No | — |
| `@microsoft.graph.downloadUrl` | `string` | No | — |
| `children` | `object[]` | No | — |

> [accordion] createdBy full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] lastModifiedBy full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] parentReference full type
>
> ```ts theme={null}
> {
>   driveId?: string,
>   id?: string,
>   path?: string,
>   name?: string,
>   siteId?: string
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string,
>   hashes?: {
>     quickXorHash?: string,
>     sha1Hash?: string,
>     sha256Hash?: string
>   }
> }
> ```

> [accordion] folder full type
>
> ```ts theme={null}
> {
>   childCount?: number
> }
> ```

> [accordion] deleted full type
>
> ```ts theme={null}
> {
>   state?: string
> }
> ```

> [accordion] children full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string
> }[]
> ```

***

### list

`drive.list`

List available drives

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `top` | `number` | No | — |
| `expand` | `string` | No | — |
| `select` | `string` | No | — |
| `orderby` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `skip_token` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   name?: string,
>   driveType?: string,
>   webUrl?: string,
>   description?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   owner?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   quota?: {
>     deleted?: number,
>     remaining?: number,
>     total?: number,
>     used?: number,
>     state?: string
>   }
> }[]
> ```

***

### listActivities

`drive.listActivities`

List activities across the drive

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.listActivities({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `top` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   action?: {
>     comment?: Record<string, any>,
>     create?: Record<string, any>,
>     delete?: Record<string, any>,
>     edit?: Record<string, any>,
>     mention?: Record<string, any>,
>     move?: Record<string, any>,
>     rename?: Record<string, any>,
>     restore?: Record<string, any>,
>     share?: Record<string, any>,
>     version?: Record<string, any>
>   },
>   actor?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   times?: {
>     recordedTime?: string
>   }
> }[]
> ```

***

### listBundles

`drive.listBundles`

List bundles in a drive

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.listBundles({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `expand` | `string` | No | — |
| `filter` | `string` | No | — |
| `select` | `string` | No | — |
| `orderby` | `string` | No | — |
| `skip_token` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### listChanges

`drive.listChanges`

List changes to drive items using delta

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.drive.listChanges({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `top` | `number` | No | — |
| `token` | `string` | No | — |
| `expand` | `string` | No | — |
| `select` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |
| `@odata.deltaLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

## Files

### createFolder

`files.createFolder`

Create a new folder

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.files.createFolder({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `user_id` | `string` | No | — |
| `description` | `string` | No | — |
| `parent_folder` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `webUrl` | `string` | No | — |

***

### createTextFile

`files.createTextFile`

Create a new text file with content

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.files.createTextFile({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `folder` | `string` | No | — |
| `user_id` | `string` | No | — |
| `conflict_behavior` | `fail \| replace \| rename` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `file` | `object` | No | — |
| `name` | `string` | Yes | — |
| `size` | `number` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string
> }
> ```

***

### findFile

`files.findFile`

Find a file by name

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.files.findFile({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `folder` | `string` | No | — |
| `user_id` | `string` | No | — |
| `include_metadata` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `odata_context` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### findFolder

`files.findFolder`

Find a folder by name

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.files.findFolder({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | — |
| `top` | `number` | No | — |
| `expand` | `string` | No | — |
| `folder` | `string` | No | — |
| `select` | `string[]` | No | — |
| `orderby` | `string` | No | — |
| `user_id` | `string` | No | — |
| `skip_token` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### list

`files.list`

List files in the root drive

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.files.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `top` | `number` | No | — |
| `select` | `string[]` | No | — |
| `user_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### upload

`files.upload`

Upload a file to OneDrive

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.files.upload({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `object` | Yes | — |
| `folder` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `drive_id` | `string` | No | — |
| `description` | `string` | No | — |
| `defer_commit` | `boolean` | No | — |
| `if_match_etag` | `string` | No | — |
| `file_system_info` | `object` | No | — |
| `conflict_behavior` | `rename \| fail \| replace` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> {
>   name: string,
>   s3key: string,
>   mimetype: string
> }
> ```

> [accordion] file\_system\_info full type
>
> ```ts theme={null}
> {
>   createdDateTime?: string,
>   lastAccessedDateTime?: string,
>   lastModifiedDateTime?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `file` | `object` | No | — |
| `name` | `string` | Yes | — |
| `size` | `number` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string
> }
> ```

***

## Items

### checkin

`items.checkin`

Check in a checked-out drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.checkin({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `driveItem_id` | `string` | Yes | — |
| `comment` | `string` | No | — |
| `checkInAs` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### checkout

`items.checkout`

Check out a drive item for editing

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.checkout({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `driveItem_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### copy

`items.copy`

Copy a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.copy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `drive_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `children_only` | `boolean` | No | — |
| `parent_reference` | `object` | No | — |
| `conflict_behavior` | `fail \| replace \| rename` | No | — |
| `include_all_version_history` | `boolean` | No | — |

> [accordion] parent\_reference full type
>
> ```ts theme={null}
> {
>   id?: string,
>   driveId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | — |
| `item_id` | `string` | No | — |
| `message` | `string` | Yes | — |
| `web_url` | `string` | No | — |
| `monitor_url` | `string` | No | — |
| `status_code` | `number` | Yes | — |

***

### delete

`items.delete`

Delete a drive item

**Risk:** `destructive`

```ts theme={null}
await corsair.onedrive.api.items.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `if_match` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### deletePermanently

`items.deletePermanently`

Permanently delete a drive item

**Risk:** `destructive`

```ts theme={null}
await corsair.onedrive.api.items.deletePermanently({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `drive_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### discardCheckout

`items.discardCheckout`

Discard the checkout of a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.discardCheckout({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `driveItem_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### download

`items.download`

Download a file

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.download({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `file_name` | `string` | Yes | — |
| `drive_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `format` | `pdf \| html` | No | — |
| `if_none_match` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string` | Yes | — |

***

### downloadAsFormat

`items.downloadAsFormat`

Download a file converted to a different format

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.downloadAsFormat({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path_and_filename` | `string` | Yes | — |
| `file_name` | `string` | Yes | — |
| `format` | `pdf \| html` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string` | Yes | — |

***

### downloadByPath

`items.downloadByPath`

Download a file by path

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.downloadByPath({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_path` | `string` | Yes | — |
| `file_name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string` | Yes | — |

***

### downloadVersion

`items.downloadVersion`

Download a specific version of a file

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.downloadVersion({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `version_id` | `string` | Yes | — |
| `file_name` | `string` | Yes | — |
| `drive_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string` | Yes | — |

***

### follow

`items.follow`

Follow a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.follow({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `driveItem_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `size` | `number` | No | — |
| `webUrl` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |

***

### get

`items.get`

Get a drive item by ID

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `drive_id` | `string` | No | — |
| `select_fields` | `string[]` | No | — |
| `expand_relations` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `size` | `number` | No | — |
| `webUrl` | `string` | No | — |
| `eTag` | `string` | No | — |
| `cTag` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |
| `createdBy` | `object` | No | — |
| `lastModifiedBy` | `object` | No | — |
| `parentReference` | `object` | No | — |
| `file` | `object` | No | — |
| `folder` | `object` | No | — |
| `deleted` | `object` | No | — |
| `@microsoft.graph.downloadUrl` | `string` | No | — |
| `children` | `object[]` | No | — |

> [accordion] createdBy full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] lastModifiedBy full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] parentReference full type
>
> ```ts theme={null}
> {
>   driveId?: string,
>   id?: string,
>   path?: string,
>   name?: string,
>   siteId?: string
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string,
>   hashes?: {
>     quickXorHash?: string,
>     sha1Hash?: string,
>     sha256Hash?: string
>   }
> }
> ```

> [accordion] folder full type
>
> ```ts theme={null}
> {
>   childCount?: number
> }
> ```

> [accordion] deleted full type
>
> ```ts theme={null}
> {
>   state?: string
> }
> ```

> [accordion] children full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string
> }[]
> ```

***

### getDriveItemBySharingUrl

`items.getDriveItemBySharingUrl`

Get a drive item by sharing URL

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.getDriveItemBySharingUrl({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sharing_url` | `string` | No | — |
| `prefer_redeem` | `redeemSharingLinkIfNecessary \| redeemSharingLink` | No | — |
| `select_fields` | `string[]` | No | — |
| `expand_children` | `boolean` | No | — |
| `share_id_or_encoded_url` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `size` | `number` | No | — |
| `webUrl` | `string` | No | — |
| `eTag` | `string` | No | — |
| `cTag` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |
| `file` | `object` | No | — |
| `folder` | `object` | No | — |
| `@microsoft.graph.downloadUrl` | `string` | No | — |
| `parentReference` | `object` | No | — |
| `item_id` | `string` | No | — |
| `drive_id` | `string` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string
> }
> ```

> [accordion] folder full type
>
> ```ts theme={null}
> {
>   childCount?: number
> }
> ```

> [accordion] parentReference full type
>
> ```ts theme={null}
> {
>   driveId?: string,
>   id?: string,
>   path?: string
> }
> ```

***

### getFollowed

`items.getFollowed`

Get a followed drive item

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.getFollowed({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `driveItem_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `file` | `object` | No | — |
| `name` | `string` | Yes | — |
| `size` | `number` | No | — |
| `folder` | `object` | No | — |
| `webUrl` | `string` | No | — |
| `followed` | `boolean` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string
> }
> ```

> [accordion] folder full type
>
> ```ts theme={null}
> {
>   childCount?: number
> }
> ```

***

### getThumbnails

`items.getThumbnails`

Get thumbnails for a drive item

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.getThumbnails({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `drive_id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `select` | `string` | No | — |
| `original_orientation` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   large?: {
>     height?: number,
>     width?: number,
>     url?: string,
>     content?: string
>   },
>   medium?: {
>     height?: number,
>     width?: number,
>     url?: string,
>     content?: string
>   },
>   small?: {
>     height?: number,
>     width?: number,
>     url?: string,
>     content?: string
>   },
>   source?: {
>     height?: number,
>     width?: number,
>     url?: string,
>     content?: string
>   }
> }[]
> ```

***

### getVersions

`items.getVersions`

Get versions of a drive item

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.getVersions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `drive_id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   lastModifiedDateTime?: string,
>   size?: number,
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   published?: {
>     level?: string,
>     versionId?: string
>   }
> }[]
> ```

***

### listActivities

`items.listActivities`

List activities on a drive item

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.listActivities({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `drive_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `skip` | `string` | No | — |
| `expand` | `string[]` | No | — |
| `filter` | `string` | No | — |
| `select` | `string[]` | No | — |
| `orderby` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   action?: {
>     comment?: Record<string, any>,
>     create?: Record<string, any>,
>     delete?: Record<string, any>,
>     edit?: Record<string, any>,
>     mention?: Record<string, any>,
>     move?: Record<string, any>,
>     rename?: Record<string, any>,
>     restore?: Record<string, any>,
>     share?: Record<string, any>,
>     version?: Record<string, any>
>   },
>   actor?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   times?: {
>     recordedTime?: string
>   }
> }[]
> ```

***

### listFolderChildren

`items.listFolderChildren`

List children of a folder

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.listFolderChildren({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `top` | `number` | No | — |
| `expand` | `string[]` | No | — |
| `select` | `string[]` | No | — |
| `orderby` | `string` | No | — |
| `site_id` | `string` | No | — |
| `drive_id` | `string` | No | — |
| `next_link` | `string` | No | — |
| `skip_token` | `string` | No | — |
| `folder_path` | `string` | No | — |
| `use_me_drive` | `boolean` | No | — |
| `folder_item_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### move

`items.move`

Move a drive item to a new location

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.move({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `itemId` | `string` | Yes | — |
| `parentReference` | `object` | Yes | — |
| `name` | `string` | No | — |
| `siteId` | `string` | No | — |
| `userId` | `string` | No | — |
| `driveId` | `string` | No | — |
| `groupId` | `string` | No | — |
| `description` | `string` | No | — |

> [accordion] parentReference full type
>
> ```ts theme={null}
> {
>   id: string,
>   driveId: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `size` | `number` | No | — |
| `webUrl` | `string` | No | — |
| `parentReference` | `object` | No | — |

> [accordion] parentReference full type
>
> ```ts theme={null}
> {
>   driveId?: string,
>   id?: string,
>   path?: string
> }
> ```

***

### preview

`items.preview`

Get a preview URL for a drive item

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.preview({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `drive_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `share_id` | `string` | No | — |
| `page` | `string` | No | — |
| `zoom` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `getUrl` | `string` | No | — |
| `postUrl` | `string` | No | — |
| `postParameters` | `string` | No | — |

***

### restore

`items.restore`

Restore a deleted drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.restore({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `parent_reference_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `file` | `object` | No | — |
| `name` | `string` | Yes | — |
| `size` | `number` | No | — |
| `folder` | `object` | No | — |
| `webUrl` | `string` | No | — |
| `deleted` | `object` | No | — |
| `createdDateTime` | `string` | No | — |
| `parentReference` | `object` | No | — |
| `lastModifiedDateTime` | `string` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string
> }
> ```

> [accordion] folder full type
>
> ```ts theme={null}
> {
>   childCount?: number
> }
> ```

> [accordion] deleted full type
>
> ```ts theme={null}
> {
>   state?: string
> }
> ```

> [accordion] parentReference full type
>
> ```ts theme={null}
> {
>   driveId?: string,
>   id?: string,
>   path?: string
> }
> ```

***

### search

`items.search`

Search for drive items

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.items.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | Yes | — |
| `top` | `number` | No | — |
| `expand` | `string` | No | — |
| `select` | `string` | No | — |
| `orderby` | `string` | No | — |
| `drive_id` | `string` | No | — |
| `skip_token` | `string` | No | — |
| `search_scope` | `drive \| root` | No | — |
| `stripped_annotations` | `string[]` | No | — |
| `transformed_path_query` | `string` | No | — |
| `transformed_kql_operator` | `string` | No | — |
| `transformed_parent_query` | `string` | No | — |
| `transformed_wildcard_query` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### unfollow

`items.unfollow`

Unfollow a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.unfollow({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### updateContent

`items.updateContent`

Update the content of a file

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.updateContent({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `drive_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `file_size` | `number` | No | — |
| `description` | `string` | No | — |
| `defer_commit` | `boolean` | No | — |
| `media_source` | `object` | No | — |
| `if_match_etag` | `string` | No | — |
| `file_system_info` | `object` | No | — |
| `conflict_behavior` | `string` | No | — |
| `drive_item_source` | `object` | No | — |
| `if_none_match_etag` | `string` | No | — |

> [accordion] media\_source full type
>
> ```ts theme={null}
> {
>   contentCategory?: string
> }
> ```

> [accordion] file\_system\_info full type
>
> ```ts theme={null}
> {
>   createdDateTime?: string,
>   lastAccessedDateTime?: string,
>   lastModifiedDateTime?: string
> }
> ```

> [accordion] drive\_item\_source full type
>
> ```ts theme={null}
> {
>   externalId?: string,
>   application?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uploadUrl` | `string` | No | — |
| `expirationDateTime` | `string` | No | — |
| `nextExpectedRanges` | `string[]` | No | — |

***

### updateMetadata

`items.updateMetadata`

Update metadata for a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.items.updateMetadata({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `drive_id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `name` | `string` | No | — |
| `description` | `string` | No | — |
| `ifMatch` | `string` | No | — |
| `fileSystemInfo` | `object` | No | — |
| `parent_reference_id` | `string` | No | — |
| `parent_reference_drive_id` | `string` | No | — |
| `additional_properties` | `Record<string, any>` | No | — |

> [accordion] fileSystemInfo full type
>
> ```ts theme={null}
> {
>   createdDateTime?: string,
>   lastAccessedDateTime?: string,
>   lastModifiedDateTime?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `cTag` | `string` | No | — |
| `eTag` | `string` | No | — |
| `file` | `object` | No | — |
| `name` | `string` | Yes | — |
| `size` | `number` | No | — |
| `folder` | `object` | No | — |
| `webUrl` | `string` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> {
>   mimeType?: string
> }
> ```

> [accordion] folder full type
>
> ```ts theme={null}
> {
>   childCount?: number
> }
> ```

***

## Permissions

### createForItem

`permissions.createForItem`

Create a permission for a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.permissions.createForItem({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `drive_id` | `string` | Yes | — |
| `driveItem_id` | `string` | Yes | — |
| `roles` | `string[]` | Yes | — |
| `grantedToV2` | `object` | Yes | — |

> [accordion] grantedToV2 full type
>
> ```ts theme={null}
> {
>   siteGroup?: Record<string, any>,
>   application?: Record<string, any>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `link` | `object` | No | — |
| `roles` | `string[]` | No | — |
| `grantedTo` | `object` | No | — |
| `grantedToV2` | `object` | No | — |
| `hasPassword` | `boolean` | No | — |
| `expirationDateTime` | `string` | No | — |

> [accordion] link full type
>
> ```ts theme={null}
> {
>   type?: string,
>   scope?: string,
>   webUrl?: string,
>   webHtml?: string,
>   preventsDownload?: boolean,
>   application?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] grantedTo full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   },
>   siteUser?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string,
>     email?: string
>   },
>   siteGroup?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string
>   },
>   group?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] grantedToV2 full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   },
>   siteUser?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string,
>     email?: string
>   },
>   siteGroup?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string
>   },
>   group?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

***

### createLink

`permissions.createLink`

Create a sharing link for a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.permissions.createLink({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `type` | `view \| edit \| embed` | Yes | — |
| `scope` | `anonymous \| organization \| users` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `drive_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `password` | `string` | No | — |
| `expiration_date_time` | `string` | No | — |
| `retain_inherited_permissions` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `link` | `object` | No | — |
| `roles` | `string[]` | No | — |
| `shareId` | `string` | No | — |
| `hasPassword` | `boolean` | No | — |

> [accordion] link full type
>
> ```ts theme={null}
> {
>   type?: string,
>   scope?: string,
>   webUrl?: string,
>   webHtml?: string,
>   preventsDownload?: boolean,
>   application?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

***

### deleteFromItem

`permissions.deleteFromItem`

Delete a permission from a drive item

**Risk:** `destructive`

```ts theme={null}
await corsair.onedrive.api.permissions.deleteFromItem({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `perm_id` | `string` | Yes | — |
| `drive_id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### deleteSharePermission

`permissions.deleteSharePermission`

Delete a share permission

**Risk:** `destructive`

```ts theme={null}
await corsair.onedrive.api.permissions.deleteSharePermission({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `shared_drive_item_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | — |

***

### getForItem

`permissions.getForItem`

Get permissions for a drive item

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.permissions.getForItem({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `drive_id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `item_path` | `string` | No | — |
| `select` | `string` | No | — |
| `if_none_match` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   link?: {
>     type?: string,
>     scope?: string,
>     webUrl?: string,
>     webHtml?: string,
>     preventsDownload?: boolean,
>     application?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   roles?: string[],
>   grantedTo?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     },
>     siteUser?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string,
>       email?: string
>     },
>     siteGroup?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string
>     },
>     group?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   grantedToV2?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     },
>     siteUser?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string,
>       email?: string
>     },
>     siteGroup?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string
>     },
>     group?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   hasPassword?: boolean,
>   expirationDateTime?: string
> }[]
> ```

***

### getShare

`permissions.getShare`

Get a shared item by share ID or encoded URL

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.permissions.getShare({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `share_id_or_encoded_sharing_url` | `string` | Yes | — |
| `prefer_redeem` | `redeemSharingLinkIfNecessary \| redeemSharingLink` | No | — |
| `expand_children` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `name` | `string` | No | — |
| `root` | `object` | No | — |
| `items` | `object[]` | No | — |
| `owner` | `object` | No | — |
| `children` | `object[]` | No | — |

> [accordion] root full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] children full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### grantSharePermission

`permissions.grantSharePermission`

Grant a permission on a shared item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.permissions.grantSharePermission({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `encoded_sharing_url` | `string` | Yes | — |
| `roles` | `string[]` | Yes | — |
| `recipients` | `Record<string, string>[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   link?: {
>     type?: string,
>     scope?: string,
>     webUrl?: string,
>     webHtml?: string,
>     preventsDownload?: boolean,
>     application?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   roles?: string[],
>   grantedTo?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     },
>     siteUser?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string,
>       email?: string
>     },
>     siteGroup?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string
>     },
>     group?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   grantedToV2?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     },
>     siteUser?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string,
>       email?: string
>     },
>     siteGroup?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string
>     },
>     group?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   hasPassword?: boolean,
>   expirationDateTime?: string
> }[]
> ```

***

### inviteUser

`permissions.inviteUser`

Invite a user to access a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.permissions.inviteUser({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `roles` | `string[]` | Yes | — |
| `recipients` | `Record<string, string>[]` | Yes | — |
| `drive_id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |
| `message` | `string` | No | — |
| `password` | `string` | No | — |
| `require_sign_in` | `boolean` | No | — |
| `send_invitation` | `boolean` | No | — |
| `expiration_date_time` | `string` | No | — |
| `retain_inherited_permissions` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   link?: {
>     type?: string,
>     scope?: string,
>     webUrl?: string,
>     webHtml?: string,
>     preventsDownload?: boolean,
>     application?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   roles?: string[],
>   grantedTo?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     },
>     siteUser?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string,
>       email?: string
>     },
>     siteGroup?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string
>     },
>     group?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   grantedToV2?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     },
>     siteUser?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string,
>       email?: string
>     },
>     siteGroup?: {
>       id?: string,
>       displayName?: string,
>       loginName?: string
>     },
>     group?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   hasPassword?: boolean,
>   expirationDateTime?: string
> }[]
> ```

***

### listSharePermissions

`permissions.listSharePermissions`

List permissions on a shared drive item

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.permissions.listSharePermissions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `shared_drive_item_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `link` | `object` | No | — |
| `roles` | `string[]` | No | — |
| `hasPassword` | `boolean` | No | — |

> [accordion] link full type
>
> ```ts theme={null}
> {
>   type?: string,
>   scope?: string,
>   webUrl?: string,
>   webHtml?: string,
>   preventsDownload?: boolean,
>   application?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

***

### updateForItem

`permissions.updateForItem`

Update a permission on a drive item

**Risk:** `write`

```ts theme={null}
await corsair.onedrive.api.permissions.updateForItem({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_id` | `string` | Yes | — |
| `permission_id` | `string` | Yes | — |
| `roles` | `string[]` | Yes | — |
| `drive_id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `user_id` | `string` | No | — |
| `group_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `link` | `object` | No | — |
| `roles` | `string[]` | No | — |
| `grantedTo` | `object` | No | — |
| `grantedToV2` | `object` | No | — |
| `hasPassword` | `boolean` | No | — |
| `expirationDateTime` | `string` | No | — |

> [accordion] link full type
>
> ```ts theme={null}
> {
>   type?: string,
>   scope?: string,
>   webUrl?: string,
>   webHtml?: string,
>   preventsDownload?: boolean,
>   application?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] grantedTo full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   },
>   siteUser?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string,
>     email?: string
>   },
>   siteGroup?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string
>   },
>   group?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

> [accordion] grantedToV2 full type
>
> ```ts theme={null}
> {
>   user?: {
>     id?: string,
>     displayName?: string
>   },
>   application?: {
>     id?: string,
>     displayName?: string
>   },
>   device?: {
>     id?: string,
>     displayName?: string
>   },
>   siteUser?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string,
>     email?: string
>   },
>   siteGroup?: {
>     id?: string,
>     displayName?: string,
>     loginName?: string
>   },
>   group?: {
>     id?: string,
>     displayName?: string
>   }
> }
> ```

***

## Sharepoint

### getListItems

`sharepoint.getListItems`

Get items from a SharePoint list

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.getListItems({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `list_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `skip` | `number` | No | — |
| `count` | `boolean` | No | — |
| `expand` | `string` | No | — |
| `filter` | `string` | No | — |
| `select` | `string` | No | — |
| `orderby` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.count` | `number` | No | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   eTag?: string,
>   webUrl?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   contentType?: {
>     id?: string,
>     name?: string
>   },
>   fields?: Record<string, any>,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   }
> }[]
> ```

***

### getSite

`sharepoint.getSite`

Get a SharePoint site by ID

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.getSite({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `expand` | `string` | No | — |
| `select` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `eTag` | `string` | No | — |
| `name` | `string` | No | — |
| `webUrl` | `string` | No | — |
| `description` | `string` | No | — |
| `displayName` | `string` | No | — |
| `sharepointIds` | `object` | No | — |
| `isPersonalSite` | `boolean` | No | — |
| `siteCollection` | `object` | No | — |
| `createdDateTime` | `string` | No | — |
| `lastModifiedDateTime` | `string` | No | — |

> [accordion] sharepointIds full type
>
> ```ts theme={null}
> {
>   siteId?: string,
>   siteUrl?: string,
>   webId?: string,
>   webUrl?: string,
>   listId?: string,
>   tenantId?: string
> }
> ```

> [accordion] siteCollection full type
>
> ```ts theme={null}
> {
>   hostname?: string,
>   dataLocationCode?: string,
>   root?: {
>   }
> }
> ```

***

### getSitePage

`sharepoint.getSitePage`

Get a page from a SharePoint site

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.getSitePage({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `page_id` | `string` | Yes | — |
| `expand` | `string` | No | — |
| `select` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `title` | `string` | No | — |
| `webUrl` | `string` | No | — |

***

### listListItemsDelta

`sharepoint.listListItemsDelta`

List changes to SharePoint list items using delta

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.listListItemsDelta({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `list_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `token` | `string` | No | — |
| `expand` | `string` | No | — |
| `select` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |
| `@odata.deltaLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   eTag?: string,
>   webUrl?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   contentType?: {
>     id?: string,
>     name?: string
>   },
>   fields?: Record<string, any>,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   }
> }[]
> ```

***

### listSiteColumns

`sharepoint.listSiteColumns`

List site columns in a SharePoint site

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.listSiteColumns({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `skip` | `number` | No | — |
| `count` | `boolean` | No | — |
| `expand` | `string` | No | — |
| `filter` | `string` | No | — |
| `select` | `string` | No | — |
| `orderby` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.count` | `number` | No | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   name?: string,
>   displayName?: string,
>   description?: string,
>   columnGroup?: string,
>   indexed?: boolean,
>   readOnly?: boolean,
>   required?: boolean,
>   hidden?: boolean,
>   enforceUniqueValues?: boolean,
>   boolean?: {
>   },
>   text?: {
>     allowMultipleLines?: boolean,
>     maxLength?: number,
>     textType?: string
>   },
>   number?: {
>     decimalPlaces?: string,
>     displayAs?: string,
>     maximum?: number,
>     minimum?: number
>   },
>   dateTime?: {
>     displayAs?: string,
>     format?: string
>   },
>   choice?: {
>     allowTextEntry?: boolean,
>     choices?: string[],
>     displayAs?: string
>   },
>   lookup?: {
>     allowMultipleValues?: boolean,
>     columnName?: string,
>     listId?: string
>   }
> }[]
> ```

***

### listSiteItemsDelta

`sharepoint.listSiteItemsDelta`

List changes to all drive items in a site using delta

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.listSiteItemsDelta({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `token` | `string` | No | — |
| `expand` | `string` | No | — |
| `select` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |
| `@odata.deltaLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   size?: number,
>   webUrl?: string,
>   eTag?: string,
>   cTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   parentReference?: {
>     driveId?: string,
>     id?: string,
>     path?: string,
>     name?: string,
>     siteId?: string
>   },
>   file?: {
>     mimeType?: string,
>     hashes?: {
>       quickXorHash?: string,
>       sha1Hash?: string,
>       sha256Hash?: string
>     }
>   },
>   folder?: {
>     childCount?: number
>   },
>   deleted?: {
>     state?: string
>   },
>   @microsoft.graph.downloadUrl?: string,
>   children?: {
>     id: string,
>     name?: string,
>     size?: number,
>     webUrl?: string,
>     eTag?: string,
>     cTag?: string,
>     createdDateTime?: string,
>     lastModifiedDateTime?: string,
>     createdBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     lastModifiedBy?: {
>       user?: {
>         id?: string,
>         displayName?: string
>       },
>       application?: {
>         id?: string,
>         displayName?: string
>       },
>       device?: {
>         id?: string,
>         displayName?: string
>       }
>     },
>     parentReference?: {
>       driveId?: string,
>       id?: string,
>       path?: string,
>       name?: string,
>       siteId?: string
>     },
>     file?: {
>       mimeType?: string,
>       hashes?: {
>         quickXorHash?: string,
>         sha1Hash?: string,
>         sha256Hash?: string
>       }
>     },
>     folder?: {
>       childCount?: number
>     },
>     deleted?: {
>       state?: string
>     },
>     @microsoft.graph.downloadUrl?: string
>   }[]
> }[]
> ```

***

### listSiteLists

`sharepoint.listSiteLists`

List all lists in a SharePoint site

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.listSiteLists({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `skip` | `number` | No | — |
| `count` | `boolean` | No | — |
| `expand` | `string` | No | — |
| `filter` | `string` | No | — |
| `select` | `string` | No | — |
| `orderby` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.count` | `number` | No | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   name?: string,
>   displayName?: string,
>   description?: string,
>   webUrl?: string,
>   eTag?: string,
>   createdDateTime?: string,
>   lastModifiedDateTime?: string,
>   createdBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   lastModifiedBy?: {
>     user?: {
>       id?: string,
>       displayName?: string
>     },
>     application?: {
>       id?: string,
>       displayName?: string
>     },
>     device?: {
>       id?: string,
>       displayName?: string
>     }
>   },
>   list?: {
>     hidden?: boolean,
>     template?: string
>   }
> }[]
> ```

***

### listSiteSubsites

`sharepoint.listSiteSubsites`

List subsites of a SharePoint site

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.sharepoint.listSiteSubsites({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `top` | `number` | No | — |
| `skip` | `number` | No | — |
| `count` | `boolean` | No | — |
| `expand` | `string` | No | — |
| `filter` | `string` | No | — |
| `select` | `string` | No | — |
| `orderby` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.count` | `number` | No | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id: string,
>   eTag?: string,
>   name?: string,
>   webUrl?: string,
>   description?: string,
>   displayName?: string,
>   sharepointIds?: {
>     siteId?: string,
>     siteUrl?: string,
>     webId?: string,
>     webUrl?: string,
>     listId?: string,
>     tenantId?: string
>   },
>   isPersonalSite?: boolean,
>   siteCollection?: {
>     hostname?: string,
>     dataLocationCode?: string,
>     root?: {
>     }
>   },
>   createdDateTime?: string,
>   lastModifiedDateTime?: string
> }[]
> ```

***

## Subscriptions

### list

`subscriptions.list`

List all active subscriptions

**Risk:** `read`

```ts theme={null}
await corsair.onedrive.api.subscriptions.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `value` | `object[]` | Yes | — |
| `@odata.nextLink` | `string` | No | — |

> [accordion] value full type
>
> ```ts theme={null}
> {
>   id?: string,
>   resource?: string | null,
>   changeType?: string | null,
>   clientState?: string | null,
>   notificationUrl?: string | null,
>   expirationDateTime?: string | null,
>   applicationId?: string | null,
>   creatorId?: string | null,
>   notificationQueryOptions?: string | null,
>   lifecycleNotificationUrl?: string | null
> }[]
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.